/* うちの子スコア（仮）— 日差しの下でも見えるように、白地・濃い文字・太い枠・大きいボタンにする */
[hidden] { display: none !important; }

:root {
  --bg: #ffffff;
  --surface: #f2f4f7;
  --surface-2: #e4e8ee;
  --text: #0d1117;
  --sub: #3f4a57;
  --line: #b9c2cd;
  --line-strong: #5b6673;
  --accent: #0b57d0;
  --accent-ink: #ffffff;
  --accent-soft: #e2ecfd;
  --kid: #e8620c;
  --kid-soft: #ffeedf;
  --kid-ink: #8a3204;
  --ball: #12773a;
  --strike: #f0b400;
  --out: #c62828;
  --foul: #45505d;
  --hit: #0b57d0;
  --walk: #12773a;
  --outr: #45505d;
  --oth: #6d3fd6;
  --danger: #c62828;
  --radius: 12px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
button:disabled { cursor: default; opacity: 0.45; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.noscript { padding: 16px; }
.app { max-width: 540px; margin: 0 auto; min-height: 100vh; }
.hint { color: var(--sub); font-size: 14px; margin: 6px 0; }
.err { color: var(--danger); font-weight: 700; margin: 4px 0; min-height: 1em; }
.msg { font-weight: 700; margin: 8px 0 0; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 50px; padding: 8px 14px;
  border: 2px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--text); font-weight: 700; font-size: 16px;
  text-align: center; line-height: 1.3; text-decoration: none;
}
.btn:active { transform: translateY(1px); background: var(--surface); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:active { background: #0a4ab0; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-ghost { color: var(--danger); border-color: var(--danger); }
.btn.ghost { border-style: dashed; color: var(--sub); }
.btn.wide { width: 100%; margin-top: 10px; }
.btn.huge { width: 100%; min-height: 64px; font-size: 19px; margin: 14px 0; }
.btn.big { min-height: 64px; font-size: 19px; }
.btn.sm { min-height: 40px; padding: 4px 12px; font-size: 15px; }
.btn.sq { width: 50px; padding: 0; font-size: 22px; }
.btn.on { border-color: var(--accent); background: var(--accent-soft); color: #08398a; }
.btn.kid { border-color: var(--kid); }
.link { background: none; border: 0; padding: 8px 4px; color: var(--accent); font-weight: 700; font-size: 15px; min-height: 40px; }
.link.strong { color: var(--danger); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }

/* ---------- 共通の画面 ---------- */
.page { padding: 0 16px 24px; }
.page.has-tabs { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.page-head { display: flex; align-items: center; gap: 10px; padding: 12px 0 6px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 0; flex: 1 1 100%; }
.brand { font-size: 13px; font-weight: 700; color: var(--accent); }
.back { padding-left: 0; }
.sec { font-size: 18px; margin: 22px 0 8px; }
.card { border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 12px 0; background: #fff; }
.card h2 { font-size: 18px; margin: 0 0 8px; }
.lead { margin: 4px 0 12px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; max-width: 540px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: #fff; border-top: 2px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab { display: flex; align-items: center; justify-content: center; min-height: 60px; font-weight: 700; color: var(--sub); text-decoration: none; font-size: 16px; }
.tab.on { color: var(--accent); box-shadow: inset 0 4px 0 var(--accent); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.chip { min-height: 42px; padding: 4px 16px; border-radius: 999px; border: 2px solid var(--line-strong); background: #fff; font-weight: 700; }
.chip.on { background: var(--kid); border-color: var(--kid); color: #fff; }
.chips-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.chips-row .chips { margin: 0; }
.chip.add { border-style: dashed; border-color: var(--accent); color: var(--accent); }
.chip.sm { min-height: 38px; padding: 2px 12px; font-size: 14px; }
.chip.on-year { background: var(--accent); border-color: var(--accent); color: #fff; }

/* フォーム */
.form { display: block; }
.field { display: block; margin: 14px 0; }
.fl { display: block; font-weight: 700; margin-bottom: 6px; }
input[type="text"], input[type="date"], select, textarea {
  width: 100%; min-height: 50px; padding: 10px 12px;
  border: 2px solid var(--line-strong); border-radius: 10px; background: #fff; font-size: 17px;
}
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; }
.check input { width: 24px; height: 24px; accent-color: var(--accent); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; border: 2px solid var(--accent); border-radius: 10px; overflow: hidden; }
.seg button { min-height: 46px; border: 0; background: #fff; color: #08398a; font-weight: 700; font-size: 15px; padding: 4px 2px; line-height: 1.25; }
.seg button + button { border-left: 2px solid var(--accent); }
.seg button.on { background: var(--accent); color: #fff; }
.stepper { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.stepper span { flex: 1; font-weight: 700; }
.stepper b { min-width: 44px; text-align: center; font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.more-opts { margin: 14px 0; border: 2px solid var(--line); border-radius: 10px; padding: 4px 12px; }
.more-opts summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--accent); cursor: pointer; }

/* 試合の一覧 */
.game-list { list-style: none; margin: 0; padding: 0; }
.game-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: center;
  padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; min-height: 56px;
}
.gr-date { font-weight: 700; font-variant-numeric: tabular-nums; }
.gr-vs { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gr-kid { grid-column: 1 / -1; color: var(--sub); font-size: 14px; }
.wl { font-weight: 800; padding: 2px 10px; border-radius: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wl.win { background: #d9f2e1; color: #0b5a2b; }
.wl.lose { background: #fde2e2; color: #8f1d1d; }
.wl.draw { background: var(--surface-2); color: var(--text); }
.more { display: block; margin: 12px 0; font-weight: 700; color: var(--accent); min-height: 44px; }
.live-card { border-color: var(--kid); background: var(--kid-soft); }
.lc-title { margin: 0; font-weight: 800; color: var(--kid-ink); font-size: 14px; }
.lc-main { margin: 2px 0; font-weight: 800; font-size: 19px; }
.lc-sub { margin: 0; font-variant-numeric: tabular-nums; }
.nudge { border-color: var(--strike); background: #fff8e1; }
.ios-nudge { border-color: var(--accent); background: var(--accent-soft); }
.sample-bar { border-color: var(--oth); background: #f3eeff; }
.sample-bar p { margin: 0; font-weight: 700; }
.guide-sec { margin: 0 0 14px; }
.guide-sec h3 { font-size: 16px; margin: 0 0 4px; color: #08398a; }
.guide-sec p { margin: 0; }
.ios-nudge h2 { font-size: 17px; }
.ios-nudge p { margin: 0 0 6px; }
.steps { margin: 6px 0 8px; padding-left: 1.4em; font-weight: 700; }
.steps li { margin: 4px 0; }
.nudge p { margin: 0 0 4px; }

/* 設定 */
.set-list { list-style: none; margin: 0; padding: 0; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); min-height: 52px; }
.set-row small { color: var(--sub); }
.team-box { margin-top: 12px; }
.team-box h3 { font-size: 16px; margin: 6px 0; }
.add-row { display: grid; grid-template-columns: 1fr 90px auto; gap: 8px; margin-top: 10px; align-items: center; }
.plain { margin: 0; padding-left: 1.2em; }
.plain li { margin: 6px 0; }
.file-btn { cursor: pointer; }
.version { color: var(--sub); font-size: 13px; text-align: center; margin-top: 20px; }

/* 下から出る選択の画面 */
.sheet {
  border: 0; padding: 0; margin: auto 0 0; width: 100%; max-width: 100%;
  max-height: 88vh; border-radius: 16px 16px 0 0; background: #fff; color: var(--text);
}
@media (min-width: 560px) { .sheet { max-width: 540px; margin: auto auto 0; } }
.sheet::backdrop { background: rgba(10, 15, 25, 0.45); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px 6px; position: sticky; top: 0; background: #fff; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 18px; margin: 0; }
.sheet-close { background: none; border: 0; color: var(--accent); font-weight: 700; min-height: 44px; padding: 0 4px; }
.sheet-body { padding: 12px 16px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; }
.confirm p { margin: 0 0 8px; }
.num-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.num-grid .btn { min-height: 52px; font-size: 15px; padding: 4px; }
.pos-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.runner-acts { display: grid; gap: 8px; }
.runner-acts .btn { min-height: 54px; }
.lu-row { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; margin: 8px 0; font-weight: 700; }
.lu-row.kid b { color: var(--kid-ink); }
.lu-row.three { grid-template-columns: 48px 1fr auto; }
.add-row.one { grid-template-columns: 1fr auto; }
.sub-h { font-size: 16px; margin: 18px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.fld-choice { margin-top: 12px; }
.fld-choice .hint { margin: 4px 0 0; font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 30;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #111827; color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 15px;
  max-width: calc(100vw - 32px); width: max-content; transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- スコアボード ---------- */
.board-wrap { overflow-x: auto; margin: 6px 0; }
.board { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.board th, .board td { border: 1px solid var(--line); text-align: center; padding: 0; height: 36px; }
.board thead th { font-size: 13px; color: var(--sub); height: 26px; background: var(--surface); }
.board thead th.cur-col { color: var(--accent); font-weight: 800; }
.board th.team { width: 72px; text-align: left; padding: 0 6px; font-size: 14px; }
/* チーム名は2行まで出す（頭が同じ名前でも見分けられるように） */
.board th.team span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 12px; line-height: 1.2; word-break: break-all; }
.board tr.ours th.team { color: var(--kid-ink); }
.board td { font-size: 19px; font-weight: 700; }
.board td button { width: 100%; height: 100%; border: 0; background: none; font-weight: 700; font-size: 19px; padding: 0; }
.board td.cur { background: var(--accent); color: #fff; }
.board td.cur button { color: #fff; }
.board td.total, .board th.total { width: 42px; font-weight: 800; background: var(--surface); }
.board td.total { font-size: 21px; }

/* ---------- 試合中 ---------- */
.live { padding: 0 12px; }
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 44px; }
.live-head .vs { flex: 1; text-align: center; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-head .vs-btn { min-width: 0; min-height: 40px; border: 0; background: none; padding: 0 4px; text-decoration: underline dotted; text-underline-offset: 4px; }
.live .seg button { min-height: 44px; font-size: 15px; }
.inning-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; }
.inning b { display: block; font-size: 28px; line-height: 1.1; }
.inning span { font-size: 14px; color: var(--sub); font-weight: 700; }
.btn.run { flex: 0 0 56%; min-height: 60px; flex-direction: column; gap: 0; background: var(--accent); border-color: var(--accent); color: #fff; font-size: 18px; }
.btn.run small { font-size: 12px; font-weight: 700; opacity: 0.9; }

.count-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; background: var(--surface); border-radius: 10px; }
.bso { display: grid; gap: 3px; }
.dots { display: flex; align-items: center; gap: 6px; }
.dots .dl { width: 16px; font-weight: 800; font-size: 15px; }
.dots i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); background: #fff; }
.dots.b i.on { background: var(--ball); border-color: var(--ball); }
.dots.s i.on { background: var(--strike); border-color: #9a7400; }
.dots.o i.on { background: var(--out); border-color: var(--out); }
.pitch { text-align: right; display: grid; grid-template-columns: auto auto auto; align-items: baseline; justify-content: end; column-gap: 4px; }
.pitch span { font-size: 14px; font-weight: 700; color: var(--sub); }
.pitch b { font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.pitch small { grid-column: 1 / -1; font-size: 12px; color: var(--kid-ink); font-weight: 700; }
.pitch.kid span:first-child { color: var(--kid-ink); }

.kid-pitch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 2px solid var(--kid); background: var(--kid-soft); border-radius: 10px; }
.kp-num span { font-weight: 700; color: var(--kid-ink); font-size: 14px; }
.kp-num b { font-size: 32px; margin: 0 4px; font-variant-numeric: tabular-nums; }
.kp-num small { display: block; font-size: 12px; font-weight: 700; color: var(--kid-ink); }
.btn.pitch-btn { min-height: 60px; flex: 0 0 50%; background: var(--kid); border-color: var(--kid); color: #fff; font-size: 19px; }

.limit { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 0; padding: 4px 4px 4px 10px; border-radius: 8px; font-weight: 800; font-size: 14px; color: var(--sub); background: var(--surface); }
.limit-edit { flex: none; min-height: 32px; padding: 2px 12px; border: 1.5px solid currentColor; border-radius: 6px; background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.limit.warn { background: #fff3c4; color: #6b4e00; border: 2px solid var(--strike); }
.limit.over { background: var(--out); color: #fff; }
.count-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
.cb { min-height: 66px; border: 0; border-radius: 10px; font-weight: 800; font-size: 15px; letter-spacing: -0.03em; color: #fff; padding: 0; line-height: 1.2; white-space: nowrap; }
.cb:active { filter: brightness(0.88); }
.cb.ball { background: var(--ball); }
.cb.strike { background: var(--strike); color: #1d1500; }
.cb.foul { background: var(--foul); }
.cb.out { background: var(--out); }

.notice { border: 2px solid var(--accent); background: var(--accent-soft); border-radius: 10px; padding: 10px; margin: 8px 0; }
.notice p { margin: 0; font-weight: 800; }

.batter {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; margin: 8px 0;
  padding: 6px 12px; border: 2px solid var(--line-strong); border-radius: 10px; background: #fff; text-align: left;
}
.batter .bn { font-size: 21px; font-weight: 800; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batter small { color: var(--sub); font-weight: 700; font-size: 13px; }
.batter.bench { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
.batter.bench .bn { flex: none; }
.batter .fix { font-size: 13px; font-weight: 700; color: var(--accent); border: 1.5px solid var(--accent); border-radius: 6px; padding: 2px 8px; }
.batter.kid { border-color: var(--kid); background: var(--kid-soft); box-shadow: inset 6px 0 0 var(--kid); }
.batter.kid .bn { color: var(--kid-ink); }

.scorer { margin: 4px 0 8px; }
.dir-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.dir { min-height: 46px; border: 2px solid var(--line-strong); border-radius: 8px; background: #fff; font-weight: 800; font-size: 18px; padding: 0; }
.dir:active { background: var(--accent-soft); }
.dir-buf { grid-column: span 3; display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 13px; font-weight: 700; color: var(--sub); padding-left: 4px; }
.dir-buf span { font-variant-numeric: tabular-nums; }
.fieldrow { display: flex; align-items: center; gap: 12px; margin: 8px 0 0; }
.btn.next { flex: 1; min-height: 56px; }
.field-hint { flex: 1; margin: 0; font-size: 13px; }
.diamond { position: relative; width: 170px; height: 132px; flex: 0 0 170px; }
.diamond .lines { position: absolute; left: 50%; top: 50%; width: 82px; height: 82px; border: 3px solid var(--line); transform: translate(-50%, -50%) rotate(45deg); }
.base {
  position: absolute; width: 58px; height: 42px; border-radius: 8px; border: 2px solid var(--line-strong);
  background: #fff; font-weight: 800; font-size: 14px; padding: 0; color: var(--sub);
}
.base.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.base.on.kid { background: var(--kid); border-color: var(--kid); }
.base.b2 { left: 56px; top: 0; }
.base.b3 { left: 0; top: 45px; }
.base.b1 { right: 0; top: 45px; }
.diamond .home { position: absolute; left: 75px; bottom: 0; width: 20px; height: 20px; background: var(--line-strong); clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%); }

.results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
.rb { min-height: 54px; border: 2.5px solid; border-radius: 10px; background: #fff; font-weight: 800; font-size: 16px; padding: 2px; line-height: 1.2; }
.rb:active { filter: brightness(0.9); background: var(--surface); }
.rb.hit { border-color: var(--hit); color: #08398a; }
.rb.walk { border-color: var(--walk); color: #0b5a2b; }
.rb.outr { border-color: var(--outr); color: var(--text); }
.rb.oth { border-color: var(--oth); color: #4a1fa8; }

.extras { margin: 10px 0 0; padding-top: 6px; border-top: 2px dashed var(--line); }
.x-label { margin: 0 0 6px; font-size: 14px; }
.x-label b { color: var(--kid-ink); }
.xgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.xb { min-height: 48px; border: 2px solid var(--line-strong); border-radius: 10px; background: #fff; font-weight: 700; font-size: 15px; padding: 2px 4px; line-height: 1.2; }
.xb:active { background: var(--surface); }

.undo-bar {
  position: sticky; bottom: 0; z-index: 4;
  display: grid; grid-template-columns: 100px 1fr; gap: 10px; align-items: center;
  margin: 12px -12px 0; padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: #fff; border-top: 2px solid var(--line-strong);
}
.btn.undo { min-height: 64px; background: #111827; border-color: #111827; color: #fff; font-size: 17px; }
.recent { list-style: none; margin: 0; padding: 0; font-size: 13px; line-height: 1.4; min-width: 0; }
.recent li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--sub); }
.recent li.new { color: var(--text); font-weight: 800; font-size: 14px; }
.recent li.empty { white-space: normal; }

/* ---------- 試合後 ---------- */
.result-head { font-weight: 800; font-size: 17px; margin: 0 0 4px; }
.kid-card { border-color: var(--kid); }
.kid-card h2 { color: var(--kid-ink); }
.pa-list { list-style: none; margin: 0; padding: 0; }
.pa-list li { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pa-list .when { font-weight: 800; min-width: 3em; font-variant-numeric: tabular-nums; }
.kid-nums { font-weight: 700; margin: 10px 0 0; }
.line-text { min-height: 200px; background: var(--surface); font-size: 15px; }
.ai-out { white-space: pre-wrap; margin: 10px 0 0; font-weight: 600; }
.ai-out:empty { display: none; }
.end-actions { margin: 20px 0; }

.book { margin-top: 14px; }
.book h3 { font-size: 16px; margin: 4px 0; }
.book-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.book-table { border-collapse: collapse; font-size: 13px; min-width: 100%; font-variant-numeric: tabular-nums; }
.book-table th, .book-table td { border: 1px solid var(--line); padding: 3px 4px; text-align: center; min-width: 44px; vertical-align: top; }
.book-table thead th { background: var(--surface); }
.book-table th.slot { min-width: 30px; background: var(--surface); }
.book-table .nm { min-width: 64px; text-align: left; font-weight: 700; white-space: nowrap; }
.book-table tr.kid th, .book-table tr.kid td { background: var(--kid-soft); }
.book-table tr.runs td, .book-table tr.runs th { font-weight: 800; background: var(--surface); }
.pa { font-weight: 700; white-space: nowrap; }
.pa + .pa { border-top: 1px dotted var(--line); }
.pa.scored span::after { content: "●"; color: var(--danger); margin-left: 2px; font-size: 11px; }
.pa small { display: block; font-size: 10px; color: var(--sub); font-weight: 700; }

/* ---------- 通算 ---------- */
.record-line { font-weight: 800; font-size: 18px; margin: 4px 0 8px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tile { border: 2px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; display: grid; }
.tile .tl { font-size: 13px; font-weight: 700; color: var(--sub); }
.tile b { font-size: 28px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tile small { font-size: 12px; color: var(--sub); }
.stat-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-variant-numeric: tabular-nums; }
.stat-table th, .stat-table td { border-bottom: 1px solid var(--line); padding: 8px 4px; }
.stat-table th { text-align: left; font-weight: 700; }
.stat-table td { text-align: right; font-weight: 800; font-size: 18px; }
.table-scroll { overflow-x: auto; }
.month-table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.month-table th, .month-table td { border-bottom: 1px solid var(--line); padding: 8px 4px; text-align: right; white-space: nowrap; }
.month-table th:first-child { text-align: left; }
.month-table thead th { color: var(--sub); font-size: 13px; }
.tour-table tbody th { white-space: normal; text-align: left; min-width: 7em; }
.tour-table .tn { display: block; font-weight: 800; }
.tour-table small { display: block; font-size: 12px; color: var(--sub); font-weight: 600; }
.tour-table tr.plain .tn { color: var(--sub); }
.chart { margin: 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #e3e7ec; stroke-width: 1; }
.chart .axis { fill: var(--sub); font-size: 11px; font-family: var(--font); }
.chart .ln { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .end { font-size: 12px; font-weight: 800; font-family: var(--font); }
.chart .s-avg .ln { stroke: var(--accent); }
.chart .s-avg .pt { fill: var(--accent); }
.chart .s-avg .end { fill: #08398a; }
.chart .s-obp .ln { stroke: var(--kid); }
.chart .s-obp .pt { fill: var(--kid); }
.chart .s-obp .end { fill: var(--kid-ink); }
