/* ポーカー練習アプリ: スマホ縦画面・片手操作が前提。ダークテーマ（卓の雰囲気）。 */

:root {
  --bg: #0e1a15;
  --panel: #17261f;
  --panel-2: #20342b;
  --line: #2f4a3d;
  --text: #eef4f0;
  --muted: #9db3a8;
  --felt-1: #1d6b4c;
  --felt-2: #0f4130;
  --accent: #f5c451;
  --primary: #2f9e68;
  --primary-ink: #04150d;
  --danger: #e5484d;
  --raise: #d98a1f;
  --win: #5fd38d;
  --lose: #ff8a8f;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: system-ui, -apple-system, 'Hiragino Sans', 'Yu Gothic UI', 'Noto Sans JP', 'Meiryo', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: 0.4; cursor: not-allowed; }
h1, h2, p { margin: 0; }

#app { height: 100%; }
.screen { height: 100dvh; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; position: relative; }

/* ---------- ボタン ---------- */
.btn {
  min-height: 52px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel-2); font-weight: 700; font-size: 1rem;
}
.btn:active:not(:disabled) { transform: translateY(1px); filter: brightness(1.15); }
.btn.primary { background: var(--primary); border-color: transparent; color: var(--primary-ink); }
.btn.fold { background: #3a2527; border-color: #5b3a3d; color: #ffc9cb; }
.btn.raise { background: var(--raise); border-color: transparent; color: #1c1100; }
.btn.danger { background: var(--danger); border-color: transparent; color: #fff; }
.btn.big { min-height: 58px; font-size: 1.1rem; }
.btn.wide { width: 100%; }
.btn.grow { flex: 1.6; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 10px; border: 0; background: transparent;
  font-size: 1.5rem; color: var(--text);
}

/* ---------- ホーム ---------- */
.home { justify-content: space-between; padding: 12vh 24px calc(24px + var(--safe-bottom)); }
.brand { text-align: center; }
.brand .suits { font-size: 1.6rem; letter-spacing: 0.3em; color: var(--accent); margin-bottom: 14px; }
.brand h1 { font-size: 2.1rem; letter-spacing: 0.04em; }
.brand p { color: var(--muted); margin-top: 6px; }
.menu { display: flex; flex-direction: column; gap: 12px; }
.coming { color: var(--muted); font-size: 0.8rem; text-align: center; margin-top: 8px; }

/* ---------- フォーム画面 ---------- */
.page-head { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 6px; }
.page-head h1 { font-size: 1.2rem; }
.form-body { flex: 1; padding: 8px 20px; overflow: auto; display: flex; flex-direction: column; gap: 26px; }
.form-foot { padding: 12px 20px calc(20px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 10px; }
.field > label { display: block; font-weight: 700; margin-bottom: 10px; }
.hint { color: var(--muted); font-size: 0.85rem; margin-top: 8px; }
.static-value { padding: 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.segmented { display: flex; gap: 8px; }
.seg {
  flex: 1; min-height: 52px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); font-weight: 700;
}
.seg.on { background: var(--primary); color: var(--primary-ink); border-color: transparent; }

/* ---------- テーブル画面 ---------- */
.table-screen { overflow: hidden; }

.hud {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'main btn' 'sub btn';
  align-items: center; padding: 6px 4px 4px 14px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.hud-main { grid-area: main; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.hud-main strong { color: var(--accent); margin-right: 2px; }
.hud-sub { grid-area: sub; color: var(--muted); font-size: 0.78rem; }
.hud-sub .sep { margin: 0 3px; opacity: 0.6; }
.hud .icon-btn { grid-area: btn; }

.felt-area { position: relative; flex: 1; min-height: 0; }
.felt {
  position: absolute; inset: 6% 3% 4% 3%; border-radius: 50% / 46%;
  background: radial-gradient(ellipse at 50% 40%, var(--felt-1), var(--felt-2) 75%);
  border: 6px solid #3a2a1c; box-shadow: inset 0 0 30px #0008, 0 4px 14px #0008;
}
.pot {
  position: absolute; left: 50%; top: 33%; transform: translateX(-50%);
  color: var(--accent); font-weight: 700; font-size: 0.95rem; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.board { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; gap: 4px; }

/* カード */
.card {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  background: #fff; color: #111; border-radius: 6px; font-weight: 800; line-height: 1;
  box-shadow: 0 1px 3px #0009; flex: none;
}
.card .s { line-height: 1; }
.suit-h { color: #d62828; }
.suit-d { color: #1c5fd6; }
.suit-c { color: #1b8a38; }
.sz-lg { width: 54px; height: 76px; } .sz-lg .r { font-size: 26px; } .sz-lg .s { font-size: 30px; }
.sz-md { width: 42px; height: 58px; } .sz-md .r { font-size: 20px; } .sz-md .s { font-size: 23px; }
.sz-xs { width: 28px; height: 38px; border-radius: 4px; } .sz-xs .r { font-size: 14px; } .sz-xs .s { font-size: 16px; }
.card.back {
  background: repeating-linear-gradient(45deg, #2b4da8 0 4px, #1f3a86 4px 8px);
  border: 2px solid #e8eefc;
}
.card.slot { background: #0003; box-shadow: none; border: 1px dashed #ffffff33; }

/* 席 */
.seat {
  position: absolute; width: 84px; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.seat-cards { display: flex; gap: 2px; height: 38px; margin-bottom: -10px; z-index: 0; }
.seat-box {
  position: relative; z-index: 1; width: 100%; padding: 3px 4px 4px; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
.seat-name { font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.seat-stack { font-size: 0.82rem; font-variant-numeric: tabular-nums; color: var(--accent); }
.pos { margin-left: 4px; font-size: 0.62rem; color: var(--muted); font-weight: 600; }
.seat.turn .seat-box { border-color: var(--accent); box-shadow: 0 0 0 2px #f5c45188; }
.seat.folded { opacity: 0.45; }
.dealer {
  position: absolute; top: 18px; right: -4px; z-index: 2; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; color: #111; font-size: 0.7rem; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 1px 3px #000a;
}
.dealer.inline { position: static; display: inline-grid; margin-left: 6px; vertical-align: middle; }
.tag {
  position: absolute; z-index: 3; left: 50%; bottom: -13px; transform: translateX(-50%);
  padding: 1px 7px; border-radius: 999px; font-size: 0.68rem; font-weight: 800; white-space: nowrap;
  background: #111c; color: var(--text); border: 1px solid var(--line);
}
.tag.allin { background: var(--danger); border-color: transparent; color: #fff; bottom: auto; top: -8px; }
.tag.think { background: var(--accent); color: #231a00; border-color: transparent; }
.tag.static { position: static; display: inline-block; transform: none; margin-top: 3px; }
.tag.fold { background: #3a2527; color: #ffc9cb; }
.bet {
  position: absolute; transform: translate(-50%, -50%); padding: 2px 8px; border-radius: 999px;
  background: #0009; border: 1px solid #ffffff44; font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums;
}

/* 自分の枠 */
.hero-strip {
  display: flex; align-items: center; gap: 12px; padding: 8px 14px;
  background: var(--panel); border-top: 1px solid var(--line);
}
.hero-cards { display: flex; gap: 6px; min-width: 114px; }
.hero-name { font-weight: 800; }
.hero-stack { font-size: 1.25rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.hero-stack small { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.hero-bet { font-size: 0.85rem; color: var(--text); }

/* ログ */
.log { padding: 4px 14px; min-height: 58px; background: #0b1410; font-size: 0.78rem; color: var(--muted); }
.log-street { color: var(--accent); }
.log-line:last-child { color: var(--text); }

/* 操作パネル */
.actions { padding: 10px 12px calc(12px + var(--safe-bottom)); background: var(--panel); min-height: 132px; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; min-height: 62px; }
.wait-msg { text-align: center; color: var(--muted); padding: 22px 0; }
.raise-panel { display: flex; flex-direction: column; gap: 8px; }
.amount-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.amount { font-size: 1.7rem; font-weight: 800; min-width: 170px; text-align: center; font-variant-numeric: tabular-nums; }
.amount small { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.step-btn { width: 52px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); font-size: 1.4rem; font-weight: 800; }
.slider { width: 100%; height: 34px; accent-color: var(--accent); margin: 0; }
.shortcuts { display: flex; gap: 6px; }
.chip-btn {
  flex: 1; min-height: 44px; padding: 0 2px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); font-weight: 700; font-size: 0.85rem;
}
.chip-btn.on { background: var(--accent); color: #231a00; border-color: transparent; }
.chip-btn.danger { border-color: #7a2c30; color: #ffc9cb; }
.chip-btn.danger.on { background: var(--danger); color: #fff; }

/* 結果シート・ダイアログ */
.overlay { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.overlay > * { pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: #000a; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 78%; overflow: auto;
  padding: 16px 14px calc(14px + var(--safe-bottom)); background: #101d17;
  border-top: 2px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px #000a;
}
.sheet h2 { font-size: 1.25rem; margin-bottom: 10px; }
.sheet h2.win { color: var(--win); }
.sheet h2.lose { color: var(--lose); }
.sheet.dialog p { color: var(--muted); margin-bottom: 14px; }
.btn-col { display: flex; flex-direction: column; gap: 10px; }
.res-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.res-row {
  display: grid; grid-template-columns: 4.2em 62px 1fr auto; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: 8px; font-size: 0.85rem;
}
.res-row .res-cards { display: flex; gap: 3px; }
.res-row.won { background: #1f3b2d; }
.res-row.folded { opacity: 0.55; }
.res-name { font-weight: 700; white-space: nowrap; }
.res-note { color: var(--muted); font-size: 0.78rem; }
.res-net { font-weight: 800; font-variant-numeric: tabular-nums; }
.res-net.plus { color: var(--win); }
.res-net.minus { color: var(--lose); }
.res-elim { color: var(--muted); font-size: 0.82rem; margin-bottom: 10px; }
.res-elim.bust { color: var(--lose); font-weight: 700; }

/* 最終順位 */
.final { padding-top: 7vh; }
.final-head { text-align: center; padding: 0 20px 18px; }
.final-title { font-size: 2.4rem; font-weight: 800; }
.final-title.paid { color: var(--accent); }
.final-sub { color: var(--muted); margin-top: 6px; }
.ranking { list-style: none; margin: 0; padding: 0 20px; flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.rank-row.me { border-color: var(--accent); background: #2a2a14; }
.rank-row.undecided { opacity: 0.6; }
.rank-place { width: 2.6em; font-weight: 800; font-variant-numeric: tabular-nums; }
.rank-name { flex: 1; font-weight: 700; }
.rank-paid { font-size: 0.75rem; color: var(--accent); font-weight: 800; }

/* 横幅が広い画面（PCでの確認用）では中央にスマホ幅で表示 */
@media (min-width: 520px) {
  body { background: #070e0b; }
  .screen { box-shadow: 0 0 0 1px var(--line); background: var(--bg); }
}

/* 縦が短い端末では、卓の部品を少し小さくする */
@media (max-height: 700px) {
  .sz-lg { width: 46px; height: 64px; } .sz-lg .r { font-size: 22px; } .sz-lg .s { font-size: 25px; }
  .actions { min-height: 118px; padding-top: 8px; }
  .btn-row .btn { min-height: 54px; }
  .log { min-height: 50px; }
}

@media (prefers-reduced-motion: no-preference) {
  .seat.turn .seat-box { transition: box-shadow 0.15s; }
}

/* ---------- フェーズ3: 対戦相手の指定・レンジ表ファイル ---------- */
.field-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.field-head label { margin-bottom: 0; }
.link-btn { border: 0; background: transparent; color: var(--accent); font-weight: 700; padding: 8px 4px; min-height: 40px; }
.seat-list { display: flex; flex-direction: column; gap: 8px; }
.seat-row { display: grid; grid-template-columns: 3.6em 1fr 1fr; gap: 8px; align-items: center; }
.seat-label { font-weight: 700; }
.select {
  width: 100%; min-height: 48px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font: inherit; font-size: 0.95rem;
}
.notice { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); margin: 10px 0; font-size: 0.9rem; }
.notice.ok { border-color: #2f7a52; background: #14301f; }
.notice.err { border-color: #7a2c30; background: #2f1719; }
.notice.warn { border-color: #7a6a2c; background: #2e2813; }
.notice .small { color: var(--muted); font-size: 0.8rem; margin-top: 4px; }
.notice .link-btn { margin-top: 4px; padding-left: 0; }
.file-btn { display: flex; align-items: center; justify-content: center; margin: 10px 0; }
.file-input { display: none; }
.help { margin-top: 10px; font-size: 0.85rem; color: var(--muted); }
.help summary { cursor: pointer; padding: 10px 0; color: var(--text); font-weight: 700; }
.help pre { background: #0b1410; border: 1px solid var(--line); border-radius: 10px; padding: 10px; overflow: auto; font-size: 0.78rem; color: var(--text); }
.help code { background: #0b1410; padding: 1px 5px; border-radius: 4px; color: var(--text); }
.help p { margin: 8px 0; }
.rank-name small { display: block; color: var(--muted); font-weight: 400; font-size: 0.75rem; margin-top: 1px; }
.field > .file-btn { display: flex; align-items: center; justify-content: center; margin: 10px 0; font-weight: 700; }

/* ---------- 起動前の表示（アプリが起動すると置き換わる）---------- */
.boot { max-width: 480px; margin: 0 auto; padding: 18vh 24px 24px; }
.boot h1 { font-size: 1.8rem; margin-bottom: 12px; }
.boot-help { color: var(--muted); margin: 14px 0; }
.boot-howto { margin-top: 24px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 0.92rem; }
.boot-howto h2 { font-size: 1rem; margin-bottom: 8px; }
.boot-howto ol { padding-left: 1.3em; margin: 8px 0 0; }
.boot-howto li { margin: 6px 0; }
.boot code { background: #0b1410; padding: 1px 6px; border-radius: 4px; }
.textarea {
  width: 100%; min-height: 64px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font: inherit; font-size: 0.95rem; resize: vertical;
}
.text-input { width: 100%; min-height: 48px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.pos-field { margin-bottom: 12px; }
.pos-field > span { display: block; font-weight: 700; margin-bottom: 4px; }
.btn-stack { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }

/* ---------- フェーズ4: 判断メモ・書き出し・続きから ---------- */
.tag-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.tag-chip {
  min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel-2); font-weight: 700; font-size: 0.9rem;
}
.tag-chip.on { background: var(--accent); color: #231a00; border-color: transparent; }
.memo-action { color: var(--muted); margin-bottom: 4px; }
.memo-btns { margin-top: 12px; }
.log-warn { color: #ffb86b; }
.hand-memo { margin: 8px 0 10px; }
.hand-memo .btn { margin-top: 8px; min-height: 44px; }
.btn-sub { display: block; font-size: 0.75rem; font-weight: 600; opacity: 0.85; margin-top: 2px; }
.resume-slot { display: contents; }
.modal-root { position: fixed; inset: 0; z-index: 50; }
.modal-root .sheet { max-width: 480px; margin: 0 auto; }
.export-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; max-height: 40vh; overflow: auto; }
.export-row { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-size: 0.9rem; }
.export-row input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.period .btn-row { justify-content: flex-end; }
.date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.date-row label { font-size: 0.85rem; color: var(--muted); }
.field > .btn.danger { margin-top: 6px; width: 100%; }

/* ---------- フェーズ5: 振り返り（答え合わせ・履歴・リプレイ・統計）---------- */
.sub-label { display: block; font-weight: 700; margin: 16px 0 10px; }
.numbers-line { text-align: center; font-size: 0.78rem; color: var(--accent); padding-bottom: 8px; }
.res-sub { display: block; font-size: 0.66rem; color: var(--muted); font-weight: 400; }
.res-row { grid-template-columns: 5.4em 62px 1fr auto; }

/* 答え合わせ */
.review-box { margin: 4px 0 10px; }
.review-box h3 { font-size: 0.95rem; margin: 8px 0 6px; color: var(--accent); }
.dec { padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 0.85rem; }
.dec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.dec-street { color: var(--muted); font-size: 0.75rem; }
.dec-judge { font-weight: 700; margin: 2px 0; }
.dec-judge.match { color: var(--win); }
.dec-judge.opposite { color: #ffb86b; }
.dec-judge.close, .dec-judge.na { color: var(--text); }
.dec-verdict { font-weight: 600; }
.dec-numbers { color: var(--muted); font-size: 0.78rem; margin-top: 4px; line-height: 1.5; }
.dec-push { margin-top: 4px; font-size: 0.8rem; }
.dec-push.match { color: var(--win); }
.dec-push.mismatch { color: #ffb86b; }
.dec-push.mixed { color: var(--muted); }
.dec-memo { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); font-size: 0.8rem; }

/* 履歴 */
.review-tabs { padding: 0 20px 6px; }
.review-body { gap: 12px; padding-top: 4px; }
.select-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; -webkit-overflow-scrolling: touch; }
.chip-filter { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-weight: 700; font-size: 0.85rem; }
.chip-filter.on { background: var(--accent); color: #231a00; border-color: transparent; }
.count-line { margin: 0; }
.hand-list { display: flex; flex-direction: column; gap: 8px; }
.hand-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; text-align: left; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.hr-cards { display: flex; gap: 3px; flex: none; }
.hr-main { flex: 1; min-width: 0; }
.hr-title { font-weight: 700; }
.hr-title small { margin-left: 8px; color: var(--muted); font-weight: 400; font-size: 0.72rem; }
.hr-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.badge { padding: 1px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); font-size: 0.7rem; font-weight: 700; }
.badge.warn { background: #4a3413; color: #ffcf8a; }
.hr-result { flex: none; font-weight: 800; font-variant-numeric: tabular-nums; }
.plus { color: var(--win); }
.minus { color: var(--lose); }
.tour-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px; text-align: left; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.tr-main { flex: 1; min-width: 0; }
.tr-title { font-weight: 800; }
.tr-sub { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }
.tr-finish { flex: none; font-weight: 800; }
.tr-finish.paid { color: var(--accent); }
.stat-list { display: flex; flex-direction: column; gap: 10px; }
.stat-card { padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.stat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stat-title { font-weight: 700; }
.stat-value { font-size: 1.6rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.stat-desc { margin: 8px 0 10px; font-size: 0.82rem; color: var(--muted); }
.stat-card .btn { min-height: 44px; width: 100%; }

/* リプレイ */
.replay .felt-area { min-height: 220px; }
.seat-prof { font-size: 0.6rem; color: var(--muted); white-space: nowrap; }
.tag.net { top: -8px; bottom: auto; }
.tag.net.plus { background: #14301f; color: var(--win); }
.tag.net.minus { background: #2f1719; color: var(--lose); }
.hero-net { font-weight: 800; font-size: 0.9rem; }
.replay-info { flex: none; max-height: 30vh; overflow: auto; padding: 8px 14px; background: #0b1410; font-size: 0.85rem; }
.rp-title { font-weight: 800; }
.rp-street { margin-left: 8px; color: var(--muted); font-weight: 400; }
.rp-sub { color: var(--muted); margin-top: 2px; }
.rp-edit { min-height: 40px; width: 100%; margin: 4px 0 6px; font-size: 0.85rem; }
.rp-controls { flex: none; padding: 8px 12px calc(10px + var(--safe-bottom)); background: var(--panel); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.rp-row { display: grid; grid-template-columns: 52px 1fr auto 1fr 52px; gap: 8px; align-items: center; }
.rp-btn { min-height: 52px; padding: 0 6px; }
.rp-count { min-width: 4.5em; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); }
.rp-toggle { min-height: 44px; font-size: 0.9rem; }
.replay-info .hand-memo { margin-top: 8px; }
.review-body > * { flex-shrink: 0; }
.filter-chips { flex: none; min-height: 44px; }
.sz-sm { width: 34px; height: 48px; border-radius: 5px; } .sz-sm .r { font-size: 16px; } .sz-sm .s { font-size: 18px; }
.board:has(.sz-sm) { gap: 3px; }

/* ---------- フェーズ6: アプリとして使う ---------- */
.update-slot:empty { display: none; }
.notice.update { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-color: #7a6a2c; background: #2e2813; margin: 4px 0 0; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 0.85rem; flex: none; }
.app-extra { display: flex; flex-direction: column; gap: 8px; }
.app-extra:empty { display: none; }
/* 長押しで文字や画像が選択されたり、メニューが出たりしないようにする（卓の画面） */
.table-screen, .table-screen * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.table-screen textarea, .table-screen input { -webkit-user-select: text; user-select: text; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
.segmented .seg { text-wrap: balance; line-height: 1.25; padding-left: 6px; padding-right: 6px; }
