/* ================================================================
   SNS Store フロントエンドスタイルシート

   テーマカラーを変更したい場合は :root ブロック内の変数のみ編集。
   その他のスタイルには触れなくてよい設計にしています。
   ================================================================ */

/* ピンチズーム防止（touch-action: manipulation でダブルタップズームも無効） */
html, body {
  touch-action: manipulation;
}


/* ================================================================
   テーマトークン（ここだけ編集すれば全体の色が変わる）
   ================================================================ */
:root {
  /* ブランドカラー */
  --color-primary:        #2d8a4e;   /* メインカラー（緑） */
  --color-primary-hover:  #1f6b3a;
  --color-primary-light:  #e8f5ed;
  --color-accent:         #f4a261;   /* アクセントカラー（オレンジ） */
  --color-accent-hover:   #e07b3a;

  /* テキスト */
  --color-text:           #1a1a1a;
  --color-text-muted:     #6b7280;
  --color-text-light:     #9ca3af;

  /* 背景 */
  --color-bg:             #f5f4ef;   /* ページ背景 */
  --color-bg-card:        #ffffff;   /* カード背景 */
  --color-bg-sidebar:     #ffffff;   /* サイドバー背景 */
  --color-bg-header:      #ffffff;   /* ヘッダー背景 */

  /* ボーダー */
  --color-border:         #e5e7eb;

  /* バッジ */
  --color-badge-post:     #2d8a4e;   /* 生産者投稿バッジ */
  --color-badge-reaction: #3b82f6;   /* リアクション投稿バッジ */

  /* シャドウ */
  --shadow-card:          0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-header:        0 1px 4px rgba(0,0,0,0.10);

  /* レイアウト */
  --header-height:        56px;
  --sidebar-left-width:   240px;
  --sidebar-right-width:  220px;
  --card-radius:          12px;
  --gap:                  12px;
}


/* ================================================================
   リセット & ベーススタイル
   ================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN',
               'Noto Sans JP', 'Yu Gothic', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; }


/* ================================================================
   サイトヘッダー
   ================================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-height);
  background: var(--color-bg-header);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-header);
  z-index: 100;
  transition: transform 0.25s ease;
}

@media (max-width: 768px) {
  .site-header.header--hidden {
    transform: translateY(-100%);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}


/* ================================================================
   ハンバーガーボタン（モバイル）
   ================================================================ */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  padding: 0;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }


/* ================================================================
   オーバーレイ（モバイルドロワー背景）
   ================================================================ */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 110;
}
.overlay.is-open { display: block; }


/* ================================================================
   ドロワーメニュー（モバイル）
   ================================================================ */
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 285px;
  height: 100dvh;
  background: var(--color-bg-sidebar);
  z-index: 120;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
}
.drawer.is-open { transform: translateX(0); }

.drawer-inner {
  padding: 16px var(--gap);
  padding-top: 20px;
}

/* スクロールバー非表示 */
.drawer::-webkit-scrollbar { display: none; }
.drawer { -ms-overflow-style: none; scrollbar-width: none; }


/* ================================================================
   3カラムレイアウト
   ================================================================ */
.layout-wrapper {
  padding-top: calc(var(--header-height) + var(--gap));
  padding-left: var(--gap);
  padding-right: var(--gap);
  padding-bottom: 40px;
}

/* サイドバーはモバイルでは非表示 */
.sidebar { display: none; }

/* メインコンテンツ（モバイル：センタリング） */
.main-content {
  max-width: 680px;
  margin: 0 auto;
}


/* ============================================================
   PC / タブレット (768px以上) → 3カラムグリッド
   ============================================================ */
@media (min-width: 768px) {
  .hamburger { display: none; }

  .layout-wrapper {
    display: grid;
    grid-template-columns: var(--sidebar-left-width) 1fr var(--sidebar-right-width);
    grid-template-areas: "left main right";
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    gap: var(--gap);
    align-items: start;
  }

  .sidebar-left  { grid-area: left;  display: block; }
  .main-content  { grid-area: main;  max-width: none; margin: 0; }
  .sidebar-right { grid-area: right; display: block; }

  /* サイドバーをスクロールに追従させる */
  .sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--gap));
    max-height: calc(100dvh - var(--header-height) - var(--gap) * 2);
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }
}


/* ================================================================
   サイドバー共通セクション
   ================================================================ */
.sidebar-section {
  background: var(--color-bg-sidebar);
  border-radius: var(--card-radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  padding: 14px;
  margin-bottom: var(--gap);
}

.sidebar-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}


/* ================================================================
   ナビゲーション
   ================================================================ */
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--color-text);
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
  user-select: none;
}

.nav-link:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.nav-link.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
}

/* ログアウトボタン（<button>タグ） */
.nav-link-btn {
  width: 100%;
  background: none;
  border: none;
  font-size: inherit;
  font-family: inherit;
  text-align: left;
}

.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.nav-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 6px 0;
}


/* ================================================================
   右サイドバー：生産者ウィジェット
   ================================================================ */
.producer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}
.producer-item:last-child { border-bottom: none; }
.producer-item-link {
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  transition: background 0.15s;
}
.producer-item-link:hover { background: var(--color-primary-light); }

.producer-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.producer-avatar img { width: 100%; height: 100%; object-fit: cover; }

.producer-name {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
}

.producer-followers {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}


/* ================================================================
   右サイドバー：新着商品ウィジェット
   ================================================================ */
.product-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}
.product-item:last-child { border-bottom: none; }

.product-info { flex: 1; min-width: 0; }

.product-name {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text);
}

.product-price {
  font-size: 0.75rem;
  color: var(--color-primary);
  font-weight: 700;
}


/* ================================================================
   フィードカード
   ================================================================ */
.feed-card {
  background: var(--color-bg-card);
  border-radius: var(--card-radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--gap);
  overflow: hidden;
}

#feed-container {
  max-width: 468px;
  margin: 0 auto;
}

/* ---- カードヘッダー ---- */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  gap: 8px;
}

.card-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.card-avatar img { width: 100%; height: 100%; object-fit: cover; }

.card-author-name {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-author-link {
  color: var(--color-text);
  text-decoration: none;
}
.card-author-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.card-time {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

/* ---- バッジ ---- */
.card-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-post {
  background: var(--color-primary-light);
  color: var(--color-badge-post);
}

.badge-reaction {
  background: #eff6ff;
  color: var(--color-badge-reaction);
}

/* ---- カードメディア ---- */
.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--color-primary-light);
  overflow: hidden;
}

.card-media.ratio-4-3 {
  aspect-ratio: 4 / 3;
}

.card-media.ratio-1-1 {
  aspect-ratio: 1 / 1;
}

/* 動画：縦動画対応・黒帯レターボックス。videoはフロー配置にしてコンテナの崩壊を防ぐ */
.card-media.ratio-video {
  aspect-ratio: unset;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-media.ratio-video .card-media-video {
  position: static;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
}

.card-media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, #d1fae5 100%);
  font-size: 2.8rem;
  z-index: 1;
}

.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

.card-media-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  cursor: pointer;
}

.card-video-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  z-index: 3;
}

/* 動画ミュート／ボリュームコントロール */
.card-video-controls {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 4;
}

.video-mute-btn {
  background: rgba(0, 0, 0, 0.55);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #fff;
  padding: 0;
  flex-shrink: 0;
}

.video-volume-slider {
  width: 80px;
  accent-color: #fff;
  cursor: pointer;
}

/* ---- カードボディ ---- */
.card-body {
  padding: 10px 14px 6px;
}

.card-title {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
  color: var(--color-text);
}

.card-caption {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-origin-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--color-primary);
  margin-top: 6px;
}
.card-origin-link:hover { text-decoration: underline; }

/* ---- カードフッター ---- */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 12px;
  gap: 8px;
  flex-wrap: wrap;
}

.card-product {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: var(--color-text);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  max-width: 220px;
  overflow: hidden;
}
.card-product:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.card-product-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-product-price {
  font-weight: 700;
  white-space: nowrap;
  color: var(--color-primary);
}

.card-likes {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.like-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: #9ca3af;
  transition: color 0.15s, transform 0.1s;
  line-height: 1;
}

.like-btn:hover {
  color: #ef4444;
}

.like-btn.liked {
  color: #ef4444;
}

.like-btn:active {
  transform: scale(1.3);
}

.like-count {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  min-width: 1ch;
}


/* ================================================================
   無限スクロール：ローディング / フィード終端
   ================================================================ */
.feed-loading {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 20px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.feed-end {
  text-align: center;
  padding: 24px;
  color: var(--color-text-light);
  font-size: 0.82rem;
  display: none;
}

#scroll-sentinel {
  height: 1px;
}

/* ================================================================
   空の状態
   ================================================================ */
.feed-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--color-text-muted);
}
.feed-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.feed-empty-text { font-size: 0.95rem; }


/* ================================================================
   ボタン
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-hover); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-block { width: 100%; }


/* ================================================================
   会員登録：ロール選択カード
   ================================================================ */
.role-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 2px solid var(--color-border);
  border-radius: var(--card-radius);
  transition: border-color 0.15s, background 0.15s;
  text-decoration: none;
  color: var(--color-text);
}

.role-card:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.role-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.role-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.role-desc {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.role-arrow {
  margin-left: auto;
  font-size: 1.4rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
}


/* ================================================================
   フラッシュメッセージ
   ================================================================ */
.flash-message {
  max-width: 600px;
  margin: 0 auto var(--gap);
  background: var(--color-primary-light);
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--color-primary);
  font-weight: 600;
}

/* ================================================================
   マイページ
   ================================================================ */
.mypage-wrapper {
  padding: 0 16px;
}

/* ---- プロフィールヘッダー ---- */
.mypage-header {
  display: grid;
  grid-template-columns: 88px 1fr;
  grid-template-areas:
    "avatar profile"
    "actions actions";
  column-gap: 24px;
  row-gap: 16px;
  align-items: start;
  padding: 24px 0 20px;
}

.mypage-avatar  { grid-area: avatar; }
.mypage-profile { grid-area: profile; }
.mypage-actions { grid-area: actions; }

.mypage-avatar {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-primary-light);
  border: 2px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mypage-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mypage-avatar-placeholder {
  font-size: 2rem;
  color: var(--color-primary);
  font-weight: 700;
}

.mypage-profile {
  flex: 1;
  min-width: 0;
}

.mypage-username-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.mypage-username {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
}

.mypage-role-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  line-height: 1.6;
}
.mypage-role-producer {
  background: #e6f4ea;
  color: #2e7d32;
}
.mypage-role-pending {
  background: #fff8e1;
  color: #f57c00;
}
.mypage-role-buyer {
  background: #e3f2fd;
  color: #1565c0;
}

.mypage-name-sub {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

/* ---- 統計 ---- */
.mypage-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
}

.mypage-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.mypage-stat-num {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.mypage-stat-label {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

/* ---- アクションボタン ---- */
.mypage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mypage-bio {
  width: 100%;
  font-size: 0.85rem;
  color: var(--color-text);
  line-height: 1.6;
  margin-top: 8px;
  white-space: pre-line;
}

.mypage-pending-badge {
  font-size: 0.78rem;
  background: #fef9c3;
  border: 1px solid #facc15;
  color: #92400e;
  border-radius: 20px;
  padding: 4px 12px;
  font-weight: 600;
}

/* ---- タブ ---- */
.mypage-tabs {
  display: flex;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: 16px 0 0;
}

.mypage-tab {
  flex: 1;
  padding: 12px 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.mypage-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* ================================================================
   投稿タイルグリッド
   ================================================================ */
.post-grid {
  margin-top: 2px;
}

.post-grid-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.post-grid-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

.post-tile {
  aspect-ratio: 1 / 1;
  background: none;
  border: none;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
}

/* 3列目はright border不要 */
.post-grid-tiles > :nth-child(3n) .post-tile,
.post-grid-tiles > button.post-tile:nth-child(3n) {
  border-right: none;
}

/* 最終行はbottom border不要（動的行数対応で最後3件を消すのは難しいためpost-tile-wrapで対応） */

.post-tile-inner {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--color-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-tile-inner img,
.post-tile-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.15s;
}

.post-tile:hover .post-tile-inner img,
.post-tile:hover .post-tile-video {
  opacity: 0.85;
}

.post-tile-placeholder {
  font-size: 2rem;
}

.post-tile-video-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.7rem;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border-radius: 4px;
  padding: 2px 5px;
}

.post-tile-status-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 0.65rem;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 4px;
  padding: 2px 6px;
}

/* ================================================================
   投稿モーダル
   ================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 16px;
}

.modal-box {
  background: var(--color-bg);
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--color-text-muted);
  cursor: pointer;
  z-index: 1;
  line-height: 1;
}

.modal-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-media-placeholder {
  font-size: 3rem;
}

/* モーダル動画ラッパー */
.modal-media.modal-media-video-wrap {
  aspect-ratio: unset;
  background: #000;
}

/* モーダル動画要素 */
.modal-media-video {
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
  display: block;
}

.modal-video-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.72rem;
  border-radius: 4px;
  padding: 3px 7px;
  font-weight: 700;
}

.modal-info {
  padding: 16px 20px 20px;
}

.modal-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.modal-post-type-badge {
  font-size: 0.72rem;
  border-radius: 20px;
  padding: 2px 10px;
  font-weight: 700;
}

.modal-time {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.modal-caption {
  font-size: 0.85rem;
  color: var(--color-text);
  line-height: 1.6;
  white-space: pre-line;
  margin-bottom: 10px;
}

.modal-likes {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.modal-product {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-bg-secondary);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.modal-product-name {
  flex: 1;
  font-weight: 600;
  color: var(--color-text);
}

.modal-product-price {
  font-weight: 700;
  color: var(--color-primary);
}

.modal-status-note {
  font-size: 0.82rem;
  color: #92400e;
  background: #fef9c3;
  border: 1px solid #facc15;
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 8px;
}

/* Vue Transition */
.modal-enter-active,
.modal-leave-active {
  transition: opacity 0.2s ease;
}
.modal-enter-from,
.modal-leave-to {
  opacity: 0;
}

/* btn-outline / btn-sm */
.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s;
}
.btn-outline:hover {
  background: var(--color-bg-secondary);
}
.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
}


/* ============ 共通フォームスタイル ============ */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text);
}
.form-required {
  color: #ef4444;
  font-size: 0.78rem;
  margin-left: 4px;
}
.form-optional {
  color: var(--color-text-secondary, #888);
  font-size: 0.78rem;
  margin-left: 4px;
}
.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--color-bg);
  color: var(--color-text);
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.form-hint {
  font-size: 0.8rem;
  color: var(--color-text-secondary, #888);
  margin-top: 4px;
}
.form-errors {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
}
.form-errors li {
  font-size: 0.82rem;
  color: #ef4444;
}
.form-error-msg {
  font-size: 0.82rem;
  color: #ef4444;
}
.radio-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ============ ファイルドロップエリア ============ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.file-drop-area {
  border: 2px dashed var(--color-border);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: var(--color-text-secondary, #888);
  font-size: 0.9rem;
}
.file-drop-area:hover,
.file-drop-area.dragover {
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb, 34,197,94), 0.04);
}
.file-preview {
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
  max-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.file-preview img,
.file-preview video {
  max-width: 100%;
  max-height: 320px;
  display: block;
}
.file-clear-btn {
  margin-top: 8px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  color: #ef4444;
}
.file-clear-btn:hover {
  background: #fee2e2;
}
.upload-progress {
  margin-top: 8px;
  height: 6px;
  width: 100%;
  background: var(--color-bg-secondary, #f3f4f6);
  border-radius: 99px;
  overflow: hidden;
}
.upload-progress-bar {
  height: 100%;
  background: var(--color-primary);
  transition: width 0.2s;
}

/* ============ 商品一覧ページ ============ */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--color-bg-card, #fff);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 16px;
}
.product-list-info {
  flex: 1;
  min-width: 0;
}
.product-list-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.product-list-meta {
  font-size: 0.82rem;
  color: var(--color-text-secondary, #888);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.product-list-desc {
  font-size: 0.85rem;
  color: var(--color-text-secondary, #888);
  margin-top: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product-list-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.product-status-public  { color: #22c55e; font-weight: 600; font-size: 0.82rem; }
.product-status-private { color: #6b7280; font-weight: 600; font-size: 0.82rem; }
.product-status-soldout { color: #ef4444; font-weight: 600; font-size: 0.82rem; }

/* ============ 投稿グリッド - 編集オーバーレイ ============ */
.post-tile-wrap {
  position: relative;
  aspect-ratio: 1;
}
.post-tile-wrap .post-tile {
  width: 100%;
  height: 100%;
}
.post-tile-edit-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  text-decoration: none;
  z-index: 2;
  transition: background 0.15s;
}
.post-tile-edit-btn:hover {
  background: rgba(0,0,0,0.8);
}

/* ============ メディアプレビュー（投稿編集） ============ */
.media-preview {
  border-radius: 10px;
  overflow: hidden;
  max-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  margin-bottom: 4px;
}
.media-preview img,
.media-preview video {
  max-width: 100%;
  max-height: 300px;
  display: block;
}

/* ============ ページ内共通UtilCSS ============ */
.page-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px;
}
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.page-title {
  font-size: 1.15rem;
  font-weight: 700;
  flex: 1;
}
.page-actions {
  display: flex;
  gap: 8px;
}
.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--color-text-secondary, #888);
  font-size: 0.9rem;
}
.pagination-wrap {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.pagination-btn {
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg);
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--color-text);
  text-decoration: none;
}
.pagination-btn.active,
.pagination-btn:disabled {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  cursor: default;
}
.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-primary);
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
}
.btn-link.danger {
  color: #ef4444;
}

/* ============ 削除確認モーダル（汎用） ============ */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.confirm-modal-box {
  background: var(--color-bg-card, #fff);
  border-radius: 14px;
  padding: 28px 24px;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.confirm-modal-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.confirm-modal-body {
  font-size: 0.9rem;
  color: var(--color-text-secondary, #888);
  margin-bottom: 20px;
}
.confirm-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ============ 投稿比率選択UI ============ */
.ratio-option {
  cursor: pointer;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  padding: 6px;
  transition: border-color 0.15s;
  display: inline-block;
}
.ratio-option.active {
  border-color: var(--color-primary);
}
.ratio-preview {
  background: var(--color-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-secondary, #888);
  border-radius: 4px;
}
.ratio-preview.ratio-4-3 {
  width: 80px;
  aspect-ratio: 4 / 3;
}
.ratio-preview.ratio-1-1 {
  width: 60px;
  aspect-ratio: 1 / 1;
}
.ratio-option.active .ratio-preview {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* ============ プロフィールページ（フォローボタン） ============ */

/* フォロー中ボタン */
.btn-follow-active {
  background: var(--color-border);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-follow-active:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

/* ============ フォロワー統計ボタン ============ */

.mypage-stat-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s;
}
.mypage-stat-btn:hover {
  opacity: 0.7;
}
.mypage-stat-btn .mypage-stat-num,
.mypage-stat-btn .mypage-stat-label {
  display: block;
}

/* ============ フォローリストモーダル ============ */

.follow-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.follow-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.follow-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}

.follow-modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.follow-modal-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}
.follow-modal-close:hover {
  background: var(--color-bg-secondary, #f5f5f5);
  color: var(--color-text);
}

.follow-modal-body {
  overflow-y: auto;
  flex: 1;
}

.follow-modal-loading {
  display: flex;
  justify-content: center;
  padding: 32px 0;
}

.follow-modal-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.follow-modal-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.follow-modal-item {
  border-bottom: 1px solid var(--color-border);
}
.follow-modal-item:last-child {
  border-bottom: none;
}

.follow-modal-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--color-text);
  transition: background 0.12s;
}
.follow-modal-user:hover {
  background: var(--color-bg-secondary, #fafafa);
}

.follow-modal-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary-light);
  border: 2px solid var(--color-primary);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
}
.follow-modal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.follow-modal-info {
  flex: 1;
  min-width: 0;
}

.follow-modal-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.follow-modal-subname {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.follow-modal-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  background: #e6f4ea;
  color: #2e7d32;
  padding: 2px 8px;
  border-radius: 20px;
}


/* ================================================================
   注文ページ共通
================================================================ */

.order-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.order-page-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 24px;
}

.order-section {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.order-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

/* ---- フラッシュエラー ---- */
.flash-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
}

/* ================================================================
   注文確認ページ - 商品カード
================================================================ */

.order-product-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.order-product-info {
  flex: 1;
}

.order-product-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.order-product-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  line-height: 1.5;
}

.order-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.order-product-price-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.order-product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
}

.order-product-stock {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ================================================================
   数量コントロール
================================================================ */

.order-qty-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.order-qty-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-bg-card);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: background 0.2s, border-color 0.2s;
}

.order-qty-btn:hover:not(:disabled) {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.order-qty-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.order-qty-num {
  font-size: 1.3rem;
  font-weight: 700;
  min-width: 32px;
  text-align: center;
  color: var(--color-text);
}

.order-qty-max {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ================================================================
   配送先
================================================================ */

.order-addr-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-addr-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.order-addr-item:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.order-addr-item.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.order-addr-radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.order-addr-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
}

.order-addr-body {
  flex: 1;
  font-size: 0.88rem;
  color: var(--color-text);
  line-height: 1.7;
}

.order-addr-name {
  font-weight: 600;
  margin-bottom: 2px;
}

.order-addr-phone {
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.order-addr-default-badge {
  font-size: 0.72rem;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
  margin-top: 2px;
}

/* フォームフィールド */
.order-addr-form {
  margin-top: 12px;
}

.order-field {
  margin-bottom: 14px;
}

.order-label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 5px;
}

.order-required {
  color: #ef4444;
}

.order-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--color-text);
  background: var(--color-bg-card);
  transition: border-color 0.2s;
}

.order-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45, 138, 78, 0.12);
}

.order-input-sm {
  max-width: 220px;
}

.order-field-error {
  margin-top: 4px;
  font-size: 0.8rem;
  color: #ef4444;
}

/* ================================================================
   金額テーブル
================================================================ */

.order-price-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-price-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--color-text);
}

.order-price-total {
  border-top: 1px solid var(--color-border);
  padding-top: 10px;
  font-weight: 700;
  font-size: 1rem;
}

.order-total-num {
  font-size: 1.15rem;
  color: var(--color-primary);
}

/* ================================================================
   注文ボタン
================================================================ */

.order-submit-area {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.order-submit-btn {
  width: 100%;
  max-width: 360px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
}

/* ================================================================
   注文確認モーダル
================================================================ */

.order-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.order-modal {
  background: var(--color-bg-card);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
}

.order-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--color-border);
}

.order-modal-title {
  font-weight: 700;
  font-size: 1rem;
}

.order-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.order-modal-row {
  display: flex;
  gap: 12px;
  font-size: 0.9rem;
}

.order-modal-row-total {
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
  font-weight: 700;
}

.order-modal-label {
  width: 70px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.order-modal-value {
  flex: 1;
  line-height: 1.7;
}

.order-modal-total {
  font-size: 1.2rem;
  color: var(--color-primary);
}

.order-modal-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  background: var(--color-bg);
  padding: 10px 12px;
  border-radius: 8px;
}

.order-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
}

.order-modal-confirm-btn {
  min-width: 120px;
}

/* ================================================================
   注文完了ページ
================================================================ */

.order-complete-hero {
  text-align: center;
  padding: 32px 16px 24px;
}

.order-complete-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-weight: 700;
  border: 2px solid var(--color-primary);
}

.order-complete-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.order-complete-sub {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.order-complete-addr {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.9;
}

.order-complete-addr-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.order-complete-date {
  font-size: 0.9rem;
  color: var(--color-text);
}

.order-complete-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.order-complete-actions .btn {
  min-width: 160px;
}


/* ================================================================
   注文ステータスバッジ（共通）
================================================================ */

.order-status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.order-status-badge.status-received {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.order-status-badge.status-confirmed {
  background: #fefce8;
  color: #92400e;
  border: 1px solid #fde68a;
}

.order-status-badge.status-preparing {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.order-status-badge.status-shipped {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.order-status-badge.status-cancelled {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

/* ================================================================
   注文履歴ページ（購入者）
================================================================ */

.order-hist-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.order-hist-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.order-hist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--color-border);
}

.order-hist-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-hist-num {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--color-text);
}

.order-hist-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.order-hist-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
}

.order-hist-product-info {
  flex: 1;
}

.order-hist-product-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 4px;
}

.order-hist-producer {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.order-hist-amounts {
  text-align: right;
  flex-shrink: 0;
}

.order-hist-sub {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.order-hist-total {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-primary);
  margin-top: 4px;
}

.order-hist-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 16px;
  background: #eef0f3;
  border: none;
  border-top: 1px solid var(--color-border);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.2s;
}

.order-hist-toggle:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.order-hist-detail {
  padding: 14px 16px;
  border-top: 1px solid var(--color-border);
  background: #eef0f3;
}

.order-hist-addr-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}

.order-hist-addr {
  font-size: 0.88rem;
  color: var(--color-text);
  line-height: 1.9;
}

.order-hist-shipped-date {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--color-primary);
  font-weight: 600;
}

/* ================================================================
   受注管理ページ（生産者）
================================================================ */

.po-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.po-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-bg-card);
  font-size: 0.83rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.po-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.po-tab.active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
}

.po-tab-count {
  background: currentColor;
  color: var(--color-bg-card);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0 6px;
  min-width: 18px;
  text-align: center;
}

.po-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

.po-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--color-border);
}

.po-card-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
}

.po-card-info {
  flex: 1;
}

.po-card-product {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 4px;
}

.po-card-buyer {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.po-card-right {
  text-align: right;
  flex-shrink: 0;
}

.po-card-qty {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.po-card-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  display: flex;
  justify-content: flex-end;
}

/* モーダル追加スタイル */
.order-modal-lg {
  max-width: 520px;
}

.order-modal-divider {
  height: 1px;
  background: var(--color-border);
  margin: 16px 0;
}

.po-modal-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
}

/* 確認ステップ */
.po-confirm-body {
  text-align: center;
  padding-top: 8px;
  padding-bottom: 8px;
}

.po-confirm-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.po-confirm-msg {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: 12px;
}

/* キャンセルボタン */
.po-btn-danger {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}

.po-btn-danger:hover {
  background: #fef2f2 !important;
}

.po-btn-danger-solid {
  padding: 7px 18px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.po-btn-danger-solid:hover:not(:disabled) {
  background: #dc2626;
}

.po-btn-danger-solid:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ================================================================
   注文履歴 - キャンセルエリア
================================================================ */

.order-hist-cancel-area {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--color-border);
  display: flex;
  justify-content: flex-end;
}

.order-hist-cancel-note {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--color-border);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-align: right;
}

/* ================================================================
   マイページ：管理リンク（住所・カード）
================================================================ */

.mypage-manage-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.mypage-manage-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid #b7dfc5;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.mypage-manage-link:hover {
  background: #d0eeda;
}

/* ================================================================
   配送先住所管理ページ / クレジットカード管理ページ（共通）
================================================================ */

.addr-page,
.pm-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 0 60px;
}

.addr-page-header,
.pm-page-header {
  margin-bottom: 20px;
}

.addr-back-link {
  display: inline-block;
  font-size: 0.83rem;
  color: var(--color-text-muted);
  text-decoration: none;
  margin-bottom: 8px;
}

.addr-back-link:hover {
  color: var(--color-primary);
}

.addr-page-title,
.pm-page-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

/* エラーボックス */
.addr-error-box {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #dc2626;
}

.addr-error-box ul {
  margin: 0;
  padding-left: 16px;
}

/* 住所カード */
.addr-list,
.pm-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.addr-card,
.pm-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px 18px;
  position: relative;
}

.addr-card-default,
.pm-card-default {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.addr-default-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--color-primary);
  color: #fff;
  border-radius: 10px;
  padding: 2px 8px;
  margin-bottom: 8px;
}

.addr-card-body,
.pm-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.addr-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.addr-detail {
  font-size: 0.87rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* カードアクションボタン */
.addr-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.addr-btn {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: opacity 0.15s;
}

.addr-btn-default {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: #b7dfc5;
}

.addr-btn-edit {
  background: #f3f4f6;
  color: #374151;
  border-color: var(--color-border);
}

.addr-btn-delete {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fca5a5;
}

.addr-btn:hover {
  opacity: 0.8;
}

/* 空メッセージ */
.addr-empty {
  text-align: center;
  padding: 32px 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* 追加ボタン */
.addr-add-section {
  margin-top: 8px;
}

.addr-add-btn {
  width: 100%;
  padding: 14px;
  border: 2px dashed var(--color-border);
  border-radius: 12px;
  background: transparent;
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.addr-add-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

/* フォームカード */
.addr-form-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px 20px 16px;
}

.addr-form-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 16px;
}

/* フォーム内部 */
.addr-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.addr-form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.addr-form-row-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.addr-form-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--color-text);
}

.addr-required {
  color: #ef4444;
}

.addr-optional {
  color: var(--color-text-muted);
  font-weight: 400;
}

.addr-form-input,
.addr-form-select {
  padding: 9px 11px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.93rem;
  outline: none;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}

.addr-form-input:focus,
.addr-form-select:focus {
  border-color: var(--color-primary);
}

.addr-form-input-short {
  max-width: 200px;
}

.addr-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.87rem;
  cursor: pointer;
}

.addr-check-input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.addr-form-btns {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

/* 削除確認モーダル */
.addr-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
}

.addr-modal {
  background: #fff;
  border-radius: 14px;
  padding: 28px 28px 22px;
  min-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.addr-modal-text {
  font-size: 0.98rem;
  font-weight: 600;
  margin: 0 0 18px;
  text-align: center;
}

.addr-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ================================================================
   クレジットカード固有
================================================================ */

.pm-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #92400e;
  margin-bottom: 16px;
}

/* カード一覧アイテム */
.pm-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pm-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.pm-card-number {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-family: 'Courier New', monospace;
  color: var(--color-text);
}

.pm-card-holder {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.pm-card-expiry {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ブランドアイコン */
.pm-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 32px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.pm-brand-inline {
  width: auto;
  height: auto;
  padding: 1px 6px;
  margin-left: 8px;
  vertical-align: middle;
  font-size: 0.68rem;
}

.pm-brand-visa       { background: #1a1f71; color: #fff; }
.pm-brand-mastercard { background: #eb001b; color: #fff; }
.pm-brand-amex       { background: #007bc1; color: #fff; }
.pm-brand-jcb        { background: #003087; color: #fff; }
.pm-brand-discover   { background: #ff6600; color: #fff; }
.pm-brand-diners     { background: #444;    color: #fff; }
.pm-brand-unknown    { background: #9ca3af; color: #fff; }

/* ================================================================
   カード 3D プレビュー
================================================================ */

.pm-preview-wrap {
  perspective: 1200px;
  width: min(360px, 100%);
  height: 200px;
  margin: 0 auto 28px;
}

.pm-card-3d {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.pm-card-3d.flipped {
  transform: rotateY(180deg);
}

.pm-card-3d-face {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 18px 22px;
  box-sizing: border-box;
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
  color: #fff;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.pm-card-3d-back {
  transform: rotateY(180deg);
}

/* ブランドごとのグラデーション */
.pm-grad-visa        { background: linear-gradient(135deg, #1a1f71 0%, #2d5be3 100%); }
.pm-grad-mastercard  { background: linear-gradient(135deg, #c0002a 0%, #f79e1b 100%); }
.pm-grad-amex        { background: linear-gradient(135deg, #007bc1 0%, #00c6ff 100%); }
.pm-grad-jcb         { background: linear-gradient(135deg, #003087 0%, #1565c0 100%); }
.pm-grad-discover    { background: linear-gradient(135deg, #d44000 0%, #ff9800 100%); }
.pm-grad-diners      { background: linear-gradient(135deg, #3a3a3a 0%, #787878 100%); }
.pm-grad-default     { background: linear-gradient(135deg, #374151 0%, #6b7280 100%); }

/* カード表面パーツ */
.pm-3d-toprow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}

.pm-3d-chip {
  width: 38px;
  height: 28px;
  background: linear-gradient(135deg, #e8c84a, #c9a020);
  border-radius: 4px;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.pm-3d-chip-h {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0,0,0,0.25);
  transform: translateY(-50%);
}

.pm-3d-chip-v {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(0,0,0,0.25);
  transform: translateX(-50%);
}

.pm-3d-brand-name {
  font-size: 0.9rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  line-height: 1;
  padding-top: 4px;
}

.pm-3d-number {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  letter-spacing: 0.16em;
  margin: 6px 0 10px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.pm-3d-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.pm-3d-label {
  font-size: 0.58rem;
  opacity: 0.75;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.pm-3d-value {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* カード裏面パーツ */
.pm-3d-magstripe {
  height: 38px;
  background: #111;
  margin: 14px -22px 14px;
}

.pm-3d-sig-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pm-3d-sig-strip {
  flex: 1;
  background: repeating-linear-gradient(
    -60deg,
    #e8e4dc,
    #e8e4dc 4px,
    #f5f2ec 4px,
    #f5f2ec 8px
  );
  padding: 8px 10px;
  border-radius: 3px;
  min-height: 34px;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  color: #333;
  text-align: right;
  letter-spacing: 0.15em;
}

.pm-3d-cvv-box {
  text-align: center;
  flex-shrink: 0;
}

.pm-3d-cvv-val {
  font-size: 1rem;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.2em;
}

/* ================================================================
   カード登録フォーム 固有スタイル
================================================================ */

.pm-form {
  margin-top: 0;
}

/* 2カラムレイアウト（有効期限 / CVV） */
.pm-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* カード番号入力（等幅フォント） */
.pm-input-number {
  font-family: 'Courier New', monospace;
  letter-spacing: 0.12em;
}

/* CVV 入力（短め） */
.pm-input-cvv {
  max-width: 120px;
}

/* 「保存されません」ラベル */
.pm-not-saved {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

/* 補足テキスト */
.pm-hint {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 3px;
}

/* レスポンシブ */
@media (max-width: 480px) {
  .pm-preview-wrap {
    height: 170px;
  }

  .pm-3d-number {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
  }

  .pm-2col {
    grid-template-columns: 1fr;
  }

  .pm-input-cvv {
    max-width: 100%;
  }
}

/* ================================================================
   注文確認ページ - 支払い方法セクション
================================================================ */

/* カードブランドバッジ */
.order-pm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.order-pm-brand {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #e5e7eb;
  color: #374151;
  min-width: 38px;
  text-align: center;
}
.order-pm-brand-sm {
  font-size: 0.68rem;
  padding: 1px 6px;
}
.order-pm-brand-visa        { background: #1a1f71; color: #fff; }
.order-pm-brand-mastercard  { background: #eb001b; color: #fff; }
.order-pm-brand-amex        { background: #007bc1; color: #fff; }
.order-pm-brand-jcb         { background: #003087; color: #fff; }
.order-pm-brand-discover    { background: #ff6600; color: #fff; }
.order-pm-brand-diners      { background: #004b87; color: #fff; }

.order-pm-number {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.order-pm-expiry {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.order-pm-holder {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* カード未登録メッセージ */
.order-pm-no-card {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

/* 注意書き */
.order-pm-notice {
  margin-bottom: 12px;
  font-size: 0.8rem;
}

/* 新規カード追加フォーム */
.order-pm-new-form {
  margin-top: 10px;
}

.order-pm-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* カード保存チェックボックスラベル */
.order-pm-save-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 400;
}

.order-pm-save-check {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* カード追加ボタン */
.order-pm-add-btn {
  margin-top: 4px;
}

/* モーダルエラーサマリー */
.order-modal-errors {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-modal-error-item {
  font-size: 0.82rem;
  color: #dc2626;
}

@media (max-width: 480px) {
  .order-pm-2col {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   フォロー中ページ
================================================================ */

.following-page-header {
  margin-bottom: 20px;
}

.following-page-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 8px 0 4px;
}

.following-page-count {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.following-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.following-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.following-item:hover {
  background: var(--color-bg-hover, #f3f4f6);
}

.following-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-primary-light, #d1fae5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.following-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.following-avatar-placeholder {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
}

.following-info {
  flex: 1;
  min-width: 0;
}

.following-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.following-subname {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.following-badge {
  font-size: 0.72rem;
  background: #d1fae5;
  color: #065f46;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.following-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ================================================================
   リアクション投稿（ユーザーレビュー）
================================================================ */

/* 注文履歴 - リアクション投稿エリア */
.order-hist-reaction-area {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #e5e7eb;
}

.rp-btn-review {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border: 1px solid #6ee7b7;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.rp-btn-review:hover {
  background: linear-gradient(135deg, #a7f3d0, #6ee7b7);
  transform: translateY(-1px);
}

.order-hist-reaction-note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

.order-hist-reaction-status {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.order-hist-reaction-label {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* リアクション投稿ステータスバッジ */
.rp-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.rp-badge-pending  { background: #fef3c7; color: #92400e; }
.rp-badge-public   { background: #d1fae5; color: #065f46; }
.rp-badge-private  { background: #f3f4f6; color: #6b7280; }
.rp-badge-rejected { background: #fee2e2; color: #991b1b; }

/* リアクション投稿作成ページ */
.rp-create-header {
  margin-bottom: 24px;
}

.rp-create-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.rp-create-product {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.rp-create-date {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.rp-create-desc {
  font-size: 0.83rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============ 売上確認ページ ============ */

.sales-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0 28px;
}

.sales-summary-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px 14px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.sales-summary-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.sales-summary-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
}

.sales-summary-unit {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-left: 2px;
}

.sales-section {
  margin-bottom: 32px;
}

.sales-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-primary-light);
}

.sales-monthly-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--color-border);
}

.sales-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--color-bg-card);
}

.sales-table th {
  padding: 10px 14px;
  background: var(--color-bg);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.sales-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  white-space: nowrap;
}

.sales-table tbody tr:last-child td {
  border-bottom: none;
}

.sales-table tbody tr:hover td {
  background: var(--color-primary-light);
}

.sales-row-current td {
  background: #ecfdf5 !important;
  font-weight: 600;
}

.text-right {
  text-align: right;
}

.sales-amount {
  font-weight: 700;
  color: var(--color-primary);
}

.sales-product-name {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

@media (max-width: 480px) {
  .sales-summary-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .sales-summary-value {
    font-size: 1.15rem;
  }
}

/* ============ モーダル ヘッダー行（閉じる + ・・・） ============ */

.modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 6px;
}

.modal-close-icon {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.modal-close-icon:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.modal-more-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.modal-more-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

/* ============ アクションシート（Instagram 風ボトムシート） ============ */

.action-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 env(safe-area-inset-bottom, 0);
}

.action-sheet {
  background: var(--color-bg-card);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 560px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

.action-sheet-heading {
  padding: 20px 20px 12px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.action-sheet-heading-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.action-sheet-heading-sub {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.action-sheet-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 24px;
  background: none;
  border: none;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--color-text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s;
  text-align: left;
}
.action-sheet-item:hover {
  background: var(--color-bg);
}
.action-sheet-item svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.action-sheet-item--danger {
  color: #ef4444;
  font-weight: 600;
}
.action-sheet-item--danger svg {
  opacity: 1;
}
.action-sheet-item--danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-sheet-item--cancel {
  color: var(--color-text-muted);
  font-weight: 600;
  justify-content: center;
}

.action-sheet-divider {
  height: 8px;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* アクションシート トランジション（モバイル：下からスライドアップ） */
.sheet-enter-active,
.sheet-leave-active {
  transition: opacity 0.2s ease;
}
.sheet-enter-active .action-sheet,
.sheet-leave-active .action-sheet {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.sheet-enter-from,
.sheet-leave-to {
  opacity: 0;
}
.sheet-enter-from .action-sheet,
.sheet-leave-to .action-sheet {
  transform: translateY(100%);
}

/* ============ PC用：ドロップダウン表示 ============ */
@media (min-width: 769px) {
  /* オーバーレイは透明（クリック外で閉じるために残す） */
  .action-sheet-overlay--pc {
    background: transparent;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0;
    /* ポインターイベントは維持（外側クリック検知） */
  }
  /* PC ドロップダウン本体は inline style で fixed 位置指定されるため
     ここでは形状だけ調整 */
  .action-sheet-overlay--pc .action-sheet {
    /* border-radius・width・padding は inline style で上書き済み */
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  }
  /* PC ではアクションシートの仕切りを細い1pxに */
  .action-sheet-overlay--pc .action-sheet-divider {
    height: 1px;
    border-top: none;
    border-bottom: none;
  }
  /* PC ではトランジションをフェードのみ（スライドなし） */
  .sheet-enter-active .action-sheet-overlay--pc .action-sheet,
  .sheet-leave-active .action-sheet-overlay--pc .action-sheet {
    transition: none;
  }
  .sheet-enter-from .action-sheet-overlay--pc .action-sheet,
  .sheet-leave-to   .action-sheet-overlay--pc .action-sheet {
    transform: none;
  }
}

/* ============ リアクション行の ・・・ ボタン ============ */

.rp-more-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  transition: background 0.12s, color 0.12s;
  margin-left: auto;
}
.rp-more-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}


