/* 馬券手帳の公開ページ (Firebase Hosting: baken-techo.web.app)。
   色・角丸はアプリのテーマ (lib/core/theme/colors.dart、B 案: 黒とミント) にそろえる。
   アプリと同じく黒の地だけ (ライト版は作らない)。フォントは端末のものを使い、Web フォントは読み込まない。 */
:root {
  --bg: #0b0d0c;
  --surface: #151817;
  --surface-muted: #1c201e;
  --surface-raised: #232826;
  --divider: #262b29;
  --text: #f5f7f6;
  --text-strong: #ffffff;
  --text-muted: #c9d1cd;
  --text-secondary: #a3ada8;
  --accent: #3ddc97;
  --accent-light: #7be9b8;
  --on-accent: #0b0d0c;
  --warning: #ffb547;
  --radius-card: 22px;
  --radius-card-small: 18px;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-light); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
strong { color: var(--text-strong); }

.wrap { width: min(1040px, calc(100% - 32px)); margin: 0 auto; }

/* ヘッダー */
header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(11, 13, 12, .86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
}
header nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; color: var(--text-strong); text-decoration: none; letter-spacing: .02em; }
.brand:hover { color: var(--text-strong); }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.links { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; }
.links a { color: var(--text-muted); font-weight: 500; text-decoration: none; }
.links a:hover, .links a[aria-current="page"] { color: var(--accent); }

/* 見出しと本文 */
h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.3; margin: 0 0 14px; color: var(--text-strong); letter-spacing: .01em; }
h2 { font-size: 22px; line-height: 1.45; margin: 48px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--divider); color: var(--text-strong); }
h3 { font-size: 17px; line-height: 1.55; margin: 28px 0 8px; color: var(--text-strong); }
p { margin: 0 0 16px; }
ul, ol { padding-left: 1.4em; margin: 0 0 16px; }
li { margin-bottom: 6px; }
li::marker { color: var(--text-secondary); }

/* 文章の多いページ (プライバシー・規約・サポート・お問い合わせ) は読みやすい幅に絞る */
main.doc { width: min(760px, calc(100% - 32px)); padding: 44px 0 64px; }
.updated { color: var(--text-secondary); font-size: 14px; margin-bottom: 28px; }

.toc { background: var(--surface); border-radius: var(--radius-card-small); padding: 18px 22px; margin: 0 0 36px; }
.toc p { font-weight: 800; margin: 0 0 6px; color: var(--text-strong); }
.toc ol { margin: 0; }
.toc li { margin-bottom: 2px; }
.toc a { color: var(--text-muted); font-weight: 500; text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

.table-scroll { overflow-x: auto; margin: 0 0 18px; border-radius: 14px; border: 1px solid var(--divider); }
table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; line-height: 1.75; background: var(--surface); }
th, td { border-bottom: 1px solid var(--divider); border-right: 1px solid var(--divider); padding: 11px 14px; text-align: left; vertical-align: top; }
th:last-child, td:last-child { border-right: 0; }
tr:last-child td { border-bottom: 0; }
th { background: var(--surface-muted); font-weight: 700; color: var(--text-strong); }

.card { background: var(--surface); border-radius: var(--radius-card); padding: 20px 22px; margin: 0 0 14px; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* 依存症などの注意 */
.notice { background: rgba(255, 181, 71, .07); border: 1px solid rgba(255, 181, 71, .32); border-radius: var(--radius-card-small); padding: 18px 22px; margin: 36px 0 0; }
.notice h2 { border: 0; margin: 0 0 8px; padding: 0; font-size: 17px; color: var(--warning); }
.notice p:last-child, .notice ul { margin-bottom: 0; }

dl.faq dt { font-weight: 700; margin-top: 22px; color: var(--text-strong); }
dl.faq dd { margin: 4px 0 0; }

/* ボタン */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  text-decoration: none;
}
.button:hover { background: var(--accent-light); color: var(--on-accent); }
.button.sub { background: var(--surface-muted); color: var(--text); font-weight: 600; }
.button.sub:hover { background: var(--surface-raised); color: var(--text-strong); }

/* 画面のスクリーンショット。端末の枠は描かず、角丸と細い縁・影で端末らしく見せる */
.shot { margin: 0; position: relative; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 34px;
  border: 1px solid #2e3431;
  background: var(--bg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 6px var(--surface);
}

/* トップ: 最初の画面 (hero) */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: 64px;
  padding: 64px 0 48px;
}
.hero .app { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.hero .app img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 8px 28px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06); }
.hero .app h1 { margin: 0; }
.hero .app p { margin: 0; color: var(--text-secondary); font-size: 14px; }
.lead { font-size: 18px; line-height: 1.9; color: var(--text-muted); max-width: 32em; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; }
/* パソコンで見た人がスマホで読み取れるよう、App Store を開く QR を出す (スマホ幅では隠す) */
.qr { display: flex; align-items: center; gap: 16px; width: fit-content; margin: 24px 0 0; padding: 12px 20px 12px 12px; background: var(--surface); border-radius: var(--radius-card-small); }
.qr img { display: block; width: 135px; height: 135px; border-radius: 10px; }
.qr p { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.hero .shot { isolation: isolate; }
/* 画面の後ろにミントの淡い光を置く */
.hero .shot::before {
  content: "";
  position: absolute;
  inset: 10% -22% 6%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(61, 220, 151, .18), rgba(61, 220, 151, 0));
}

/* トップ: できること */
.home-body { padding: 8px 0 64px; }
.home-body > h2:first-child { margin-top: 16px; }
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: center;
  gap: 64px;
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 40px 72px;
  margin: 0 0 16px;
}
.feature.reverse { grid-template-columns: 230px minmax(0, 1fr); }
.feature.reverse .shot { order: -1; }
.feature > div { max-width: 30em; }
.feature h3 { font-size: 24px; margin: 0 0 14px; }
.feature p { color: var(--text-muted); font-size: 17px; margin: 0 0 12px; }
.feature p:last-child { margin-bottom: 0; }
.feature .shot img { border-radius: 30px; box-shadow: 0 18px 44px rgba(0, 0, 0, .5), 0 0 0 5px var(--surface-muted); }

footer { border-top: 1px solid var(--divider); padding: 28px 0 36px; color: var(--text-secondary); font-size: 13px; }
footer .links { margin-bottom: 10px; }

@media (max-width: 880px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-top: 40px; }
  .hero .shot { width: min(300px, 76vw); justify-self: center; }
  .hero .shot::before { inset: 8% -10% 4%; }
  .feature, .feature.reverse { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 28px 24px 36px; }
  .feature.reverse .shot { order: 0; }
  .feature .shot { width: min(250px, 68vw); justify-self: center; }
}

@media (max-width: 640px) {
  header nav { flex-direction: column; align-items: flex-start; justify-content: center; padding: 10px 0; gap: 4px; }
  header { position: static; }
  .hero { padding-top: 32px; }
  .qr { display: none; }
  .feature h3 { font-size: 20px; }
  .shot img { border-radius: 28px; }
}
