/* はこにわプロ野球の紹介・ヘルプ・プライバシーポリシー。見た目はアプリ(public/hakkyu-nenkan/style.css)に合わせる:
   生成りの紙の地、白い角丸のカード、押すと沈む丸いボタンの影、コーラル1色と黄色のマーカー。ダークモードはない。
   ページの顔は、ヒーローの貯金の推移の図(lp/chart.mjs)。ほかは静かにまとめる。
   日本語は文節の切れ目(<wbr>。lp/phrases.mjsが入れる)だけで折り返す: word-break: keep-allで語を割らず、
   それでも1行に収まらない長さのものだけをoverflow-wrap: anywhereで割る。 */
:root {
  --paper: #fffaf0;
  --card: #fff;
  --paper2: #f6eedd;
  --rule: #f0e6d2;
  --rule2: #e2d5ba;
  --ink: #1d2433;
  --ink2: #4b5563;
  --ink3: #6b7280;
  --navy: #24304d;
  --shu: #c93a17;
  --pop: #ff5a36;
  --pop-btn: #d63c18;
  --pop-deep: #a92e10;
  --sun: #ffc93c;
  --marker: #ffe27a;
  --press: #ead9b8;
  --round: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --num: "Outfit", "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  --gutter: 20px;
  --max: 1080px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--round); font-weight: 500; font-size: 16px; line-height: 1.9;
  word-break: keep-all; overflow-wrap: anywhere; line-break: strict;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
p { margin: 0 0 1em; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--pop); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--shu); }
:focus-visible { outline: 3px solid var(--pop-btn); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -64px; z-index: 10; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.num { font-family: var(--num); font-feature-settings: "tnum" 1; font-variant-numeric: tabular-nums; }
.nb { white-space: nowrap; }
/* 札・ボタンの文字は折り返さない(overflow-wrap: anywhereだと、flexの子が文字の幅より細く縮んでしまう) */
.nav-link, .tag, .chips li, .advance li, .doc .toc a, .flow .mark, .legend .mark { white-space: nowrap; }
.nav-link { flex: none; }

/* ----------上のバー---------- */
.top { max-width: var(--max); margin: 0 auto; padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gutter) 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.brand { position: relative; display: inline-flex; align-items: center; gap: 10px; margin-right: auto; font-weight: 900; font-size: 15px; text-decoration: none; }
.brand svg { width: 32px; height: 32px; border-radius: 9px; flex: none; }
/* 狭い幅では、名前の字を見えなくして(読み上げには残す)、マークだけにする: 上のバーが2段にならない */
@media (max-width: 480px) {
  .brand-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.nav-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--paper2); font-weight: 800; font-size: 13px; text-decoration: none; }
.nav-link:hover { background: var(--rule); color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--sun); box-shadow: 0 2px 0 #e0a91c; }

/* ----------ヒーロー: 貯金の推移の図が顔---------- */
.hero { max-width: var(--max); margin: 0 auto; padding: 10px var(--gutter) 56px; }
.race svg { display: block; width: 100%; height: auto; overflow: visible; }
.race-wide { display: none !important; }
@media (min-width: 760px) {
  .race-narrow { display: none !important; }
  .race-wide { display: block !important; }
}
.race .gl { stroke: rgba(29, 36, 51, .09); stroke-width: 1; }
.race .gz { stroke: rgba(29, 36, 51, .42); stroke-width: 1.4; }
.race .ax { fill: var(--ink3); font-family: var(--num); font-weight: 600; }
.race .ln { fill: none; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1000; }
.race .halo { stroke: rgba(29, 36, 51, .3); }
.race .lead { fill: none; }
.race .city { fill: var(--ink); }
.race .end { transform-box: fill-box; transform-origin: center; }
/* 線は左から描かれていき(どの球団も同じ速さ)、そのあと線の先に球団のマークが弾んで付く。
   動きを減らす設定では、最初から描いた状態。 */
@media (prefers-reduced-motion: no-preference) {
  .race .ln { animation: race-draw 2.8s cubic-bezier(.4, .1, .25, 1) .3s both; }
  .race .lead, .race .city { animation: race-fade .5s ease-out both; }
  .race .end { animation: race-pop .55s cubic-bezier(.3, 1.6, .5, 1) both; }
  .race .d0 { animation-delay: 3.05s; } .race .d1 { animation-delay: 3.12s; } .race .d2 { animation-delay: 3.19s; }
  .race .d3 { animation-delay: 3.26s; } .race .d4 { animation-delay: 3.33s; } .race .d5 { animation-delay: 3.4s; }
  .race .lead { animation-delay: 3s; }
}
@keyframes race-draw { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
@keyframes race-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes race-pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }

.race-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--ink3); }
.hero-main { margin-top: 36px; display: grid; gap: 22px; }
.logo { margin: 0; width: min(100%, 340px); }
.logo svg { display: block; width: 100%; height: auto; }
.hero-text .lead-p { font-size: 16.5px; margin-bottom: .7em; }
.hero-text .small { font-size: 13.5px; color: var(--ink2); }
.soon { display: inline-block; margin: 6px 0 0; padding: 11px 20px 12px; border-radius: 16px; background: var(--navy); color: var(--paper); box-shadow: 0 3px 0 #141b2e; line-height: 1.5; }
.soon b { display: block; font-size: 16px; font-weight: 900; }
.soon span { display: block; font-size: 12.5px; opacity: .82; }
@media (min-width: 900px) {
  .hero { padding-bottom: 80px; }
  .hero-main { grid-template-columns: 340px 1fr; gap: 56px; align-items: center; margin-top: 44px; }
  .hero-text .lead-p { font-size: 17px; }
}

/* ----------画面写真: 横に動かす並び---------- */
.shots .sec-lead { margin: 0; color: var(--ink2); font-size: 15px; }
.strip {
  display: flex; gap: 22px; overflow-x: auto; margin-top: 18px; padding-block: 10px 30px;
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  scroll-padding-inline: var(--gutter); scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--rule2) transparent;
}
.strip:focus-visible { outline-offset: -4px; }
.strip figure { flex: 0 0 auto; width: min(232px, 62vw); margin: 0; scroll-snap-align: start; }
.phone { background: var(--ink); padding: 7px; border-radius: 38px; box-shadow: 0 14px 24px -14px rgba(29, 36, 51, .55); }
.phone img { display: block; width: 100%; height: auto; border-radius: 31px; background: var(--paper); }
.strip figcaption { margin-top: 14px; font-size: 13px; line-height: 1.75; color: var(--ink2); }
.strip figcaption b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 14px; font-weight: 900; }

/* ----------節---------- */
.sec { border-top: 1.5px solid var(--rule2); padding: 56px 0 8px; }
.sec-grid { display: grid; gap: 22px; }
.sec h2 { margin: 0 0 12px; font-size: clamp(23px, 6.2vw, 30px); font-weight: 900; line-height: 1.55; font-feature-settings: "palt" 1; }
.sec h2 span { background: linear-gradient(transparent 58%, var(--marker) 58%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 .12em; margin-left: -.12em; }
.sec-head .sec-lead { margin: 0; color: var(--ink2); font-size: 15px; line-height: 1.85; }
.sec-body > :last-child { margin-bottom: 0; }
.sec-body p { max-width: 41em; }
.sec-body h3 { margin: 28px 0 8px; font-size: 16px; font-weight: 900; line-height: 1.6; }
@media (min-width: 900px) {
  .sec { padding-top: 80px; padding-bottom: 16px; }
  .sec-grid { grid-template-columns: 290px 1fr; gap: 0 64px; }
  .sec-head { position: sticky; top: 28px; align-self: start; }
  .sec h2 { font-size: 28px; }
}
.sec:last-of-type { padding-bottom: 72px; }

.card { background: var(--card); border-radius: 18px; padding: 16px 18px; box-shadow: 0 2px 0 var(--rule); }

/* 順番のある並び(オフの段階、時代): 左の線に沿って進む。丸いラベルはアプリの段階の札と同じ */
.track { list-style: none; margin: 0 0 1.2em; padding: 0; }
.track li { position: relative; padding: 0 0 20px 30px; }
.track li:last-child { padding-bottom: 0; }
.track li::before { content: ""; position: absolute; left: 6px; top: 22px; bottom: -2px; width: 3px; border-radius: 2px; background: var(--rule2); }
.track li:last-child::before { display: none; }
.track li::after { content: ""; position: absolute; left: 0; top: 7px; width: 15px; height: 15px; border-radius: 50%; background: var(--card); border: 4px solid var(--pop); }
.tag { display: inline-block; padding: 1px 14px; border-radius: 999px; background: var(--paper2); font-weight: 900; font-size: 14px; line-height: 1.8; }
.track .when { margin-left: 8px; font-family: var(--num); font-weight: 600; font-size: 13px; color: var(--ink3); }
.track p { margin: 5px 0 0; font-size: 15px; line-height: 1.85; }

/* 進める幅のボタン(アプリの絵。押せない) */
.advance { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; pointer-events: none; }
.advance li { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; min-height: 44px; border-radius: 999px; background: var(--card); font-weight: 900; font-size: 14px; box-shadow: 0 3px 0 var(--press); }
.advance li.on { background: var(--pop-btn); color: #fff; box-shadow: 0 3px 0 var(--pop-deep); }
.advance svg { width: 14px; height: 14px; fill: currentColor; }

/* 1打席の計算 */
.atbat { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 0 0 1.4em; }
.atbat h3, .atbat .ab-h { margin: 0 0 8px; font-size: 13px; font-weight: 800; color: var(--ink3); line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 0 12px; border-radius: 999px; background: var(--paper2); font-weight: 800; font-size: 13.5px; line-height: 1.9; }
.ab-arrow { grid-column: 1 / -1; margin: -4px 0; font-family: var(--num); font-weight: 600; color: var(--ink3); line-height: 1; }
.ab-out { grid-column: 1 / -1; }
.ab-out .chips li { background: var(--marker); }

/* 見出し語と説明の組(球史、首脳陣、値段、AI) */
.terms { display: grid; gap: 16px 24px; margin: 0 0 1.2em; }
.terms > div { display: grid; gap: 2px 18px; }
.terms dt { font-weight: 900; font-size: 15.5px; line-height: 1.7; }
.terms dd { margin: 0; font-size: 15px; line-height: 1.85; color: var(--ink2); }
@media (min-width: 560px) { .terms > div { grid-template-columns: 8.2em 1fr; } }
.after-card { margin-top: 1.4em; }
.roles { display: grid; gap: 18px; }
.role + .role { padding-top: 18px; border-top: 1px solid var(--rule); }
.role-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.roles .tag { background: var(--navy); color: var(--paper); }
.roles .chips li { font-size: 12.5px; line-height: 1.8; padding: 0 10px; }
.role p { margin: 0; font-size: 15px; line-height: 1.85; color: var(--ink2); }

/* ----------ヘルプ・プライバシーポリシー---------- */
.doc { max-width: 780px; margin: 0 auto; padding: 36px var(--gutter) 72px; }
.doc h1 { margin: 0; font-size: clamp(25px, 7.6vw, 42px); font-weight: 900; line-height: 1.45; font-feature-settings: "palt" 1; }
.doc h1 span { background: linear-gradient(transparent 58%, var(--marker) 58%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 .12em; margin-left: -.12em; }
.doc .meta { margin: 10px 0 0; font-size: 13.5px; color: var(--ink3); }
.doc .intro { margin: 22px 0 0; color: var(--ink2); }
.doc h2 { margin: 56px 0 6px; font-size: 22px; font-weight: 900; line-height: 1.5; }
.doc h2 span { background: linear-gradient(transparent 62%, var(--marker) 62%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 .12em; margin-left: -.12em; }
.doc h3 { margin: 0 0 6px; font-size: 16.5px; font-weight: 900; line-height: 1.65; }
.doc ul, .doc ol { margin: 0 0 1em; padding-left: 1.4em; }
.doc li { margin: 4px 0; }
.doc li::marker { color: var(--pop); }
.doc .qa { border-top: 1px solid var(--rule2); padding: 18px 0 6px; }
.doc .qa > :last-child { margin-bottom: 0; }
.doc .qa p:last-child { margin-bottom: 12px; }
.doc .toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.doc .toc li { margin: 0; }
.doc .toc a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--paper2); font-weight: 800; font-size: 13.5px; text-decoration: none; }
.doc .toc a:hover { background: var(--rule); color: var(--ink); }
.doc .contact { margin-top: 28px; }
.doc .contact h2 { margin: 0 0 4px; font-size: 17px; }
.doc .contact h2 span { background: none; padding: 0; margin: 0; }
.doc .contact p { margin: 0 0 .5em; font-size: 15px; }
.doc .contact p:last-child { margin-bottom: 0; }
.path { padding: 1px 8px; border-radius: 8px; background: var(--paper2); font-size: 13px; font-weight: 800; }

/* ゲームごとに端末の外へ出るもの(プライバシーポリシー) */
.flow { margin: 18px 0 8px; border-top: 2px solid var(--ink); }
.flow-row { display: grid; gap: 6px 22px; padding: 16px 0; border-bottom: 1px solid var(--rule2); }
.flow-row:last-child { border-bottom: 2px solid var(--ink); }
.flow-what { margin: 0; padding: 0; list-style: none; }
.flow-what li { margin: 0 0 8px; padding: 0; }
.flow-what li:last-child { margin-bottom: 0; }
.flow-name { margin: 0; font-weight: 900; line-height: 1.6; }
.flow .mark { display: inline-block; margin-right: 8px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 900; line-height: 20px; vertical-align: 1px; white-space: nowrap; }
.mark.pass { background: var(--marker); }
.mark.ext { background: var(--navy); color: var(--paper); }
.mark.none { background: var(--paper2); color: var(--ink2); }
.legend { margin: 12px 0 0; font-size: 13.5px; line-height: 1.9; color: var(--ink2); }
.legend .mark { margin-right: 4px; display: inline-block; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 900; line-height: 20px; }
@media (min-width: 640px) { .flow-row { grid-template-columns: 9rem 1fr; } }

/* ----------足---------- */
.foot { border-top: 1.5px solid var(--rule2); padding: 32px 0 calc(40px + env(safe-area-inset-bottom, 0px)); font-size: 13.5px; color: var(--ink2); line-height: 1.8; }
.foot ul { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 14px; padding: 0; list-style: none; }
.foot p { margin: 0 0 4px; }
.foot .copy { font-family: var(--num); font-weight: 500; color: var(--ink3); font-size: 12.5px; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
