/* /pricing/ — mobile-order 料金プラン (Phase 5 続: 2026-05-28) */
* { box-sizing: border-box; }
:root {
  color-scheme: light dark;
  --bg: #f7f7f9;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --featured: #d97706;
  --featured-bg: #fffbeb;
  --ok: #065f46;
  --ok-bg: #ecfdf5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1d1f;
    --surface: #2d2d2f;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --border: #3a3a3c;
    --ok-bg: #064e3b;
  }
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.logo { font-size: 1.25rem; font-weight: 700; text-decoration: none; color: var(--text); white-space: nowrap; }
nav { display: flex; gap: 1.25rem; align-items: center; }
nav a {
  text-decoration: none;
  color: var(--text); /* dark/light どちらでも十分なコントラストにする (muted → text) */
  font-size: 0.95rem;
  white-space: nowrap; /* 「料金」「FAQ」が折り返さないように */
  opacity: 0.75;
  transition: opacity 0.15s;
}
nav a:hover { color: var(--accent); opacity: 1; }
nav a.current { color: var(--accent); font-weight: 600; opacity: 1; }
nav a.cta-link {
  padding: 0.4rem 0.95rem;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  font-weight: 600;
}
nav a.cta-link:hover { background: var(--accent-dark); color: white; }

main { max-width: 1180px; margin: 0 auto; padding: 0 1rem; }

.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}
.hero h1 { margin: 0 0 0.75rem; font-size: 2rem; }
.hero-sub { margin: 0; color: var(--muted); font-size: 1.05rem; }

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
}
.plan--featured {
  border: 2px solid var(--featured);
  background: var(--featured-bg);
  /* ダークモード時もベージュ背景に黒文字で固定 (グローバル --text に依存しない) */
  color: #1d1d1f;
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.15);
  transform: translateY(-8px);
}
/* ダークモードでも featured カード内は明示的に黒系で固定 */
.plan--featured .plan__name,
.plan--featured .plan__price-amount,
.plan--featured .plan__features li {
  color: #1d1d1f;
}
.plan--featured .plan__price-unit,
.plan--featured .plan__period,
.plan--featured .plan__note {
  color: #6b7280;
}
.plan--featured .plan__features li strong {
  color: #b45309; /* featured-dark で強調 */
}
.plan__badge {
  position: absolute;
  top: -10px;
  right: 1rem;
  padding: 0.25rem 0.8rem;
  background: var(--accent);
  color: white !important; /* ダークモードで text 変数に乗っ取られない */
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.plan__badge--featured { background: var(--featured); color: white !important; }
.plan__name { margin: 0 0 0.5rem; font-size: 1.15rem; font-weight: 600; }
.plan__price { display: flex; align-items: baseline; gap: 0.25rem; margin-bottom: 0.25rem; }
.plan__price-amount { font-size: 2rem; font-weight: 700; color: var(--text); }
.plan__price-unit { font-size: 0.9rem; color: var(--muted); }
.plan__period { margin: 0 0 1rem; color: var(--muted); font-size: 0.85rem; }
.plan__features { list-style: none; padding: 0; margin: 0 0 1.5rem; flex: 1; }
.plan__features li { margin: 0.45rem 0; font-size: 0.9rem; }
.plan__cta {
  display: block;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.plan__cta:hover { background: var(--accent); color: white; }
.plan__cta--primary { background: var(--featured); color: white; border-color: var(--featured); }
.plan__cta--primary:hover { background: #b45309; }
.plan__note { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.8rem; text-align: center; }

/* 機能比較表 */
.compare, .vs, .roi, .cta-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  margin-bottom: 2rem;
}
.compare h2, .vs h2, .roi h2, .cta-section h2 {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: 1.4rem;
}
.compare-wrap, .vs-wrap { overflow-x: auto; }
.compare-table, .vs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
.compare-table th, .compare-table td,
.vs-table th, .vs-table td {
  padding: 0.75rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.compare-table th:first-child, .compare-table td:first-child,
.vs-table th:first-child, .vs-table td:first-child {
  text-align: left;
  font-weight: 500;
}
.featured-col {
  background: var(--featured-bg);
  color: #1d1d1f; /* ダーク背景で featured-bg ベージュ + 白文字を防ぐ */
  font-weight: 600;
}
.vs-table .ours {
  background: var(--ok-bg);
  color: var(--ok);
  font-weight: 600;
}
.vs-note { margin-top: 1rem; text-align: center; }

/* 損益試算 */
.roi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.roi-card {
  padding: 1.25rem;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.roi-card--after {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: #a7f3d0;
}
.roi-card__before, .roi-card__after {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.roi-card ul { margin: 0; padding-left: 1.25rem; font-size: 0.9rem; }
.roi-card li { margin: 0.3rem 0; }
.roi-summary {
  text-align: center;
  font-size: 1.05rem;
  margin: 0;
  padding: 1rem;
  background: var(--featured-bg);
  border-radius: 8px;
  color: #b45309; /* featured dark で固定 (--featured-bg はライト色固定なので) */
}
/* ダークモード時 ok-bg / ok の色設定が見にくいので調整 */
@media (prefers-color-scheme: dark) {
  .vs-table .ours { color: #6ee7b7; background: rgba(110, 231, 183, 0.15); }
  .roi-card--after { color: #6ee7b7; background: rgba(110, 231, 183, 0.12); border-color: rgba(110, 231, 183, 0.3); }
}

/* CTA */
.cta-section { text-align: center; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: white; border: none; }
.cta-section h2 { color: white; }
.cta-section p { color: rgba(255,255,255,0.95); margin-bottom: 1.5rem; }
.big-cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: white;
  color: var(--accent);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
}
.big-cta:hover { background: var(--featured-bg); transform: translateY(-2px); }

footer {
  text-align: center;
  padding: 1.5rem 1rem 2rem;
}
footer p { margin: 0.25rem 0; }
.muted { color: var(--muted); }
.muted a { color: var(--muted); }
.small { font-size: 0.8rem; }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.6rem; }
  .plan--featured { transform: none; }
  .compare, .vs, .roi, .cta-section { padding: 1.5rem; }
  /* ナビが横並びに収まらないときは縮小 + gap 減 */
  header { padding: 0.75rem 1rem; gap: 0.5rem; }
  nav { gap: 0.85rem; }
  nav a { font-size: 0.85rem; }
  nav a.cta-link { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
  .logo { font-size: 1rem; }
}
/* 超狭い (iPhone SE 等 < 380px) */
@media (max-width: 380px) {
  nav { gap: 0.5rem; }
  nav a { font-size: 0.8rem; }
}

/* 印刷 / PDF 保存ボタン (画面表示時) */
.hero-tools {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}
.print-btn, .print-link {
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid var(--accent);
  background: var(--surface);
  color: var(--accent);
}
.print-btn:hover, .print-link:hover { background: var(--accent); color: white; }

/* 印刷モード — ナビ / CTA / footer を消し、料金表とプラン比較だけ残す */
@media print {
  body { background: white; color: black; }
  header, footer, .cta-section, .no-print { display: none !important; }
  .hero { padding: 1rem 0; }
  .hero h1 { font-size: 1.5rem; }
  .compare, .vs, .roi, .plans, .plan, .plan--featured {
    box-shadow: none;
    background: white;
    color: black;
    transform: none;
    page-break-inside: avoid;
  }
  .plan, .plan--featured { border: 1px solid #999; }
  .plan--featured { color: #1d1d1f; background: #fffbeb; }
  .plan__badge { display: none; } /* 印刷時は不要 */
  .compare-table, .vs-table { font-size: 0.85rem; }
  .featured-col { background: #fffbeb; }
  .vs-table .ours { background: #ecfdf5; color: #065f46; }
  .roi-card--after { background: #ecfdf5; color: #065f46; }
  @page { size: A4 portrait; margin: 14mm; }
}
