:root {
  --theme-primary: #3b82f6;
  --theme-hover: #2563eb;
  --theme-light: #dbeafe;
  --font-size-base: 16px;
  --line-height-base: 1.5;
  --list-item-padding: 0.75rem;
  --list-item-padding-y: 6px;
  --list-item-spacing: 0.5rem;
  --list-icon-size: 2rem;
  --icon-display: flex;
  --item-min-height: 46px;
}

/* モーダル背景のポインターイベント制御 */
.modal-overlay {
  pointer-events: auto;
}

.modal-content {
  pointer-events: auto;
}

/* モーダル内のすべての要素がクリック可能 */
.modal-content * {
  pointer-events: auto;
}

/* グローバルリストスタイルをリセット */
ul, ol, li {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

.completed {
  text-decoration: line-through;
  opacity: 0.6;
}
.list-enter {
  animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* FABアニメーション */
@keyframes fabSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ボトムシートアニメーション */
.animate-slideUp {
  animation: slideUpModal 0.3s ease-out;
}

@keyframes slideUpModal {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 半円メニューアニメーション */
@keyframes semicircleSlideIn {
  from {
    opacity: 0;
    transform: scale(0) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes semicircleSlideOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0) translateY(20px);
  }
}

/* ユーザー設定適用 */
.user-content-text {
  font-size: var(--font-size-base, 16px) !important;
  line-height: var(--line-height-base, 1.5) !important;
}

.user-content-text p {
  font-size: inherit !important;
  line-height: inherit !important;
}

/* リストアイテムに設定を適用 */
.shopping-item-text {
  font-size: var(--font-size-base, 16px) !important;
  line-height: var(--line-height-base, 1.5) !important;
}

.shopping-item-category {
  font-size: calc(var(--font-size-base, 16px) * 0.75) !important;
  line-height: var(--line-height-base, 1.5) !important;
}

.shopping-item-quantity {
  font-size: calc(var(--font-size-base, 16px) * 0.875) !important;
  line-height: var(--line-height-base, 1.5) !important;
}

/* リスト密度設定 */
.list-item {
  padding-left: var(--list-item-padding);
  padding-right: var(--list-item-padding);
  padding-top: var(--list-item-padding-y);
  padding-bottom: var(--list-item-padding-y);
  list-style: none !important;
}

.list-spacing {
  gap: var(--list-item-spacing);
}

/* アイコン設定 */
.category-icon {
  display: var(--icon-display);
  width: var(--list-icon-size);
  height: var(--list-icon-size);
}

/* テーマカラー適用 */
.btn-theme {
  background-color: var(--theme-primary);
}

.btn-theme:hover {
  background-color: var(--theme-hover);
}

.bg-theme {
  background-color: var(--theme-primary);
}

.bg-theme-light {
  background-color: var(--theme-light);
}

.text-theme {
  color: var(--theme-primary);
}

.border-theme {
  border-color: var(--theme-primary);
}

/* セーフエリアサポート */
.pb-safe {
  padding-bottom: env(safe-area-inset-bottom);
}

/* オフラインインジケーター */
#offline-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: white;
  padding: 12px 16px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-100%);
  transition: transform 0.3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#offline-indicator.show {
  transform: translateY(0);
}

#offline-indicator i {
  font-size: 16px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* オンラインインジケーター */
#online-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 12px 16px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-100%);
  transition: transform 0.3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#online-indicator.show {
  transform: translateY(0);
}

#online-indicator i {
  font-size: 16px;
}
