@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;700;900&display=swap');
@import url('../shared/catalog-theme.css');

:root {
  --ink: #f5f6f7; --muted: #98a1ae; --faint: #687180; --bg: #0a0c10;
  --panel: #10141b; --panel-2: #151a22; --line: rgba(255,255,255,.1); --line-strong: rgba(255,255,255,.2);
  --p1: #72d8c2; --p1-dim: rgba(114,216,194,.14); --p2: #ff987a; --p2-dim: rgba(255,152,122,.14);
  --gold: #f5c875; --shadow: 0 20px 70px rgba(0,0,0,.28);
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 50% -20%, #23313b 0, #0e1218 28%, var(--bg) 62%); font-family: Manrope, 'Noto Sans JP', sans-serif; min-height: 100vh; }
button { font: inherit; }
[hidden] { display: none !important; }
.screen { min-height: 100vh; }
.app-shell, .home-main, .tutorial-main { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.topbar, .player-heading, .battlefield-heading, .log-heading, .footer-note, .status-strip { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar { padding-top: 30px; margin-bottom: 28px; }
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--p1); color: var(--p1); font: 500 19px 'DM Mono', monospace; transform: rotate(45deg); }
.brand-mark + div, .compact-brand h1 { transform: none; }
.brand-lockup h1 { margin: 2px 0 0; font-size: clamp(20px, 3vw, 29px); letter-spacing: -.04em; font-weight: 800; }
.brand-lockup h1 span, .compact-brand h1 span { color: var(--muted); font: 500 11px 'DM Mono', monospace; letter-spacing: .13em; margin-left: 8px; }
.eyebrow, .status-label, .picker-label { margin: 0; color: var(--muted); font: 500 10px 'DM Mono', monospace; letter-spacing: .16em; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.mode-badge, .definition-chip { padding: 7px 10px; border: 1px solid rgba(114,216,194,.35); color: var(--p1); background: var(--p1-dim); font: 500 10px 'DM Mono', monospace; letter-spacing: .06em; }
.mode-button, .mode-choice { cursor: pointer; transition: .2s ease; }
.mode-button:hover { border-color: var(--p1); background: rgba(114,216,194,.23); }
.ghost-button, .primary-button { color: var(--ink); background: transparent; border: 1px solid var(--line-strong); padding: 9px 13px; cursor: pointer; transition: .2s ease; }
.ghost-button:hover { border-color: var(--ink); background: rgba(255,255,255,.06); }
.ghost-button.danger:hover { color: var(--p2); border-color: var(--p2); }
.primary-button { background: var(--p1); border-color: var(--p1); color: #0c1717; font-weight: 800; }
.primary-button:hover { background: #a2f0dc; }
.large-button { padding: 13px 17px; font-size: 13px; }

/* Home */
.home-screen { background: radial-gradient(circle at 76% 32%, rgba(114,216,194,.09), transparent 28%), radial-gradient(circle at 22% 76%, rgba(255,152,122,.07), transparent 25%); }
.home-topbar { margin-bottom: 70px; }
.home-top-note { color: var(--muted); font: 500 10px 'DM Mono', monospace; letter-spacing: .08em; }
.live-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; background: var(--p1); border-radius: 50%; box-shadow: 0 0 14px var(--p1); }
.home-hero { min-height: 480px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, .9fr); align-items: center; gap: 48px; }
.hero-kicker { color: var(--p1); margin-bottom: 18px; }
.hero-copy h2 { max-width: 640px; margin: 0; font-size: clamp(38px, 6vw, 72px); line-height: 1.08; letter-spacing: -.08em; font-weight: 800; }
.hero-copy h2 em { color: var(--p1); font-style: normal; }
.hero-lead { max-width: 520px; color: var(--muted); font-size: 15px; line-height: 1.8; margin: 24px 0 25px; }
.home-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.home-actions .primary-button span { padding-left: 18px; font-size: 19px; vertical-align: -1px; }
.mode-select { display: flex; align-items: center; gap: 7px; margin-top: 26px; }
.mode-select-label { color: var(--faint); font: 500 10px 'DM Mono', monospace; margin-right: 4px; }
.mode-choice { padding: 7px 9px; color: var(--muted); border: 1px solid var(--line); background: transparent; font-size: 10px; }
.mode-choice small { display: block; color: var(--faint); font-size: 8px; margin-top: 3px; }
.mode-choice:hover, .mode-choice.selected { border-color: var(--p1); color: var(--p1); background: var(--p1-dim); }
.hero-visual { min-height: 420px; position: relative; display: grid; place-items: center; }
.visual-orbit { position: absolute; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; transform: rotate(-23deg); }
.orbit-one { width: 350px; height: 170px; } .orbit-two { width: 270px; height: 390px; transform: rotate(62deg); border-color: rgba(114,216,194,.18); }
.visual-center { width: 102px; height: 102px; display: grid; place-items: center; align-content: center; border: 1px solid var(--p1); background: rgba(14,26,28,.9); border-radius: 50%; box-shadow: 0 0 50px rgba(114,216,194,.12); z-index: 2; }
.visual-center span { color: var(--p1); font: 500 34px 'DM Mono', monospace; } .visual-center small { color: var(--muted); font: 500 8px 'DM Mono', monospace; letter-spacing: .18em; }
.visual-card { position: absolute; z-index: 3; width: 116px; height: 162px; display: flex; flex-direction: column; justify-content: space-between; padding: 15px; border: 1px solid var(--line-strong); background: linear-gradient(145deg, #1b232a, #11161d); box-shadow: 14px 18px 34px rgba(0,0,0,.28); font: 500 28px 'DM Mono', monospace; }
.visual-card span { color: var(--gold); } .visual-card b { font-size: 12px; font-weight: 500; align-self: end; color: var(--muted); }
.visual-card-back { width: 105px; height: 145px; justify-content: center; align-items: center; color: rgba(114,216,194,.6); border-color: rgba(114,216,194,.3); transform: rotate(-16deg) translate(-5px, 4px); background: #111d20; }
.visual-card-left { transform: rotate(-10deg) translate(-112px, -4px); } .visual-card-right { transform: rotate(12deg) translate(113px, 3px); border-color: rgba(255,152,122,.35); } .visual-card-right span { color: var(--p2); }
.home-lower { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; padding-bottom: 20px; }
.home-panel { border: 1px solid var(--line); background: rgba(16,20,27,.77); padding: 20px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 16px; }
.panel-heading > span { color: var(--faint); font: 500 9px 'DM Mono', monospace; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; } .how-grid article { position: relative; } .how-number { color: var(--gold); font: 500 11px 'DM Mono', monospace; } .how-grid h3 { margin: 9px 0 6px; font-size: 13px; } .how-grid p, .conditions-panel > p { color: var(--muted); margin: 0; font-size: 10px; line-height: 1.65; }
.condition-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; } .condition-tags span { color: var(--p1); border: 1px solid rgba(114,216,194,.28); background: var(--p1-dim); padding: 7px 9px; font: 500 10px 'DM Mono', monospace; }
.footer-note { padding: 18px 2px 24px; color: var(--faint); font: 10px 'DM Mono', monospace; letter-spacing: .04em; }

/* Tutorial */
.tutorial-screen { background: radial-gradient(circle at 72% 52%, rgba(114,216,194,.08), transparent 34%); }
.tutorial-topbar { padding-top: 24px; margin-bottom: 60px; }
.back-link { padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; } .back-link:hover { color: var(--ink); }
.compact-brand { gap: 12px; } .compact-brand .brand-mark { width: 30px; height: 30px; font-size: 14px; } .compact-brand h1 { margin: 0; font-size: 17px; }
.tutorial-counter { color: var(--gold); font: 500 12px 'DM Mono', monospace; }
.tutorial-main { min-height: 670px; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 70px; align-items: center; }
.tutorial-sidebar h2 { margin: 13px 0 30px; font-size: 30px; letter-spacing: -.06em; line-height: 1.2; }
.tutorial-nav { display: grid; gap: 7px; } .tutorial-nav button { display: grid; grid-template-columns: 30px 1fr; gap: 7px; text-align: left; color: var(--muted); background: transparent; border: 0; padding: 7px 0; cursor: pointer; font-size: 11px; } .tutorial-nav button span { color: var(--faint); font: 500 10px 'DM Mono', monospace; } .tutorial-nav button.selected { color: var(--ink); } .tutorial-nav button.selected span { color: var(--p1); }
.tutorial-sidebar-note { color: var(--faint); font-size: 10px; line-height: 1.7; margin-top: 35px; }
.tutorial-stage { min-height: 520px; display: flex; flex-direction: column; justify-content: center; padding: 30px; border: 1px solid var(--line); background: rgba(16,20,27,.72); }
.tutorial-visual { min-height: 230px; display: grid; place-items: center; margin-bottom: 20px; background: radial-gradient(circle, rgba(114,216,194,.1), transparent 64%); }
.tutorial-copy h2 { font-size: 28px; margin: 7px 0 9px; letter-spacing: -.05em; } .tutorial-copy .tutorial-subtitle { color: var(--p1); font: 500 10px 'DM Mono', monospace; letter-spacing: .12em; } .tutorial-copy p { max-width: 620px; color: var(--muted); font-size: 13px; line-height: 1.8; margin: 0; } .tutorial-copy strong { color: var(--ink); }
.tutorial-actions { display: flex; align-items: center; gap: 15px; margin-top: 30px; } .tutorial-progress { height: 3px; flex: 1; background: rgba(255,255,255,.09); } .tutorial-progress span { display: block; height: 100%; width: 20%; background: var(--p1); transition: width .2s; }
.tutorial-board { width: min(520px, 100%); display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; } .tutorial-lane { min-height: 122px; padding: 10px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.04); } .tutorial-lane h4 { margin: 0 0 25px; font-size: 11px; } .tutorial-lane div { color: var(--gold); text-align: center; font: 500 19px 'DM Mono', monospace; }
.tutorial-cards { display: flex; justify-content: center; gap: 10px; } .tutorial-card-mini { width: 100px; min-height: 132px; padding: 12px; border: 1px solid var(--line-strong); background: linear-gradient(145deg, #1a2029, #11161e); } .tutorial-card-mini.accent { border-color: var(--p1); transform: translateY(-9px); } .tutorial-card-mini .mini-symbol { color: var(--gold); font-size: 22px; } .tutorial-card-mini b { display: block; margin-top: 16px; font-size: 11px; } .tutorial-card-mini small { display: block; color: var(--muted); font-size: 9px; line-height: 1.4; margin-top: 4px; }
.tutorial-choice-demo { display: flex; align-items: center; justify-content: center; gap: 20px; } .tutorial-choice-demo .arrow { color: var(--gold); font-size: 24px; } .tutorial-choice-demo .demo-lane { padding: 25px 35px; border: 1px solid var(--p1); color: var(--p1); background: var(--p1-dim); font-size: 13px; }
.tutorial-detail-demo { width: min(520px, 100%); display: grid; grid-template-columns: 88px 1fr; gap: 15px; padding: 15px; border: 1px solid rgba(245,200,117,.32); background: rgba(245,200,117,.05); } .tutorial-detail-demo .detail-symbol { width: 70px; height: 90px; font-size: 27px; } .tutorial-detail-demo h3 { margin: 0 0 5px; font-size: 14px; } .tutorial-detail-demo p { font-size: 10px; line-height: 1.6; }
.tutorial-sequence { display: flex; align-items: center; justify-content: center; gap: 9px; } .sequence-step { padding: 11px 12px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 10px; } .sequence-step.active { color: var(--p1); border-color: var(--p1); background: var(--p1-dim); } .sequence-arrow { color: var(--faint); }

/* Game */
.status-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; margin-bottom: 16px; } .status-item { min-width: 120px; display: flex; align-items: baseline; gap: 10px; } .status-item.align-right { justify-content: flex-end; } .status-item strong { font: 500 14px 'DM Mono', monospace; } .turn-meter { height: 4px; flex: 1; background: rgba(255,255,255,.08); position: relative; overflow: hidden; } .turn-meter-fill { position: absolute; height: 100%; width: 12.5%; left: 0; background: linear-gradient(90deg, var(--p1), var(--gold)); transition: width .35s ease; } .p1-text { color: var(--p1); } .p2-text { color: var(--p2); } .muted { color: var(--faint); }
.step-guide { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 15px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid rgba(114,216,194,.26); background: linear-gradient(90deg, rgba(114,216,194,.1), rgba(16,20,27,.68)); } .step-guide-mark { width: 38px; height: 38px; display: grid; place-items: center; color: var(--p1); border: 1px solid var(--p1); font: 500 12px 'DM Mono', monospace; } .step-guide-copy h3 { margin: 3px 0 3px; font-size: 15px; } .step-guide-copy p:last-child { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; } .guide-steps { display: flex; gap: 13px; margin: 0; padding: 0; list-style: none; counter-reset: guide; } .guide-steps li { color: var(--faint); font: 500 9px 'DM Mono', monospace; } .guide-steps li::before { content: counter(guide); counter-increment: guide; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 4px; border: 1px solid var(--line-strong); border-radius: 50%; } .guide-steps li.current { color: var(--p1); } .guide-steps li.current::before { border-color: var(--p1); background: var(--p1-dim); } .guide-steps li.done { color: var(--muted); } .guide-steps li.done::before { content: '✓'; color: var(--p1); }
.player-zone, .battlefield, .log-panel { border: 1px solid var(--line); background: rgba(16,20,27,.83); box-shadow: var(--shadow); } .player-zone { padding: 18px 20px 20px; } .opponent-zone { border-bottom: 0; } .active-zone { border-top: 2px solid var(--p1); background: linear-gradient(180deg, rgba(114,216,194,.06), rgba(16,20,27,.9) 50%); } .player-heading h2, .battlefield-heading h2, .modal h2 { margin: 3px 0 0; letter-spacing: -.04em; font-weight: 800; } .player-heading h2 { font-size: 19px; } .turn-state { color: var(--muted); font-size: 12px; } .turn-state.active { color: var(--p1); } .public-info-note { color: var(--faint); font: 500 9px 'DM Mono', monospace; margin: 14px 0 9px; } .selection-note { min-height: 19px; color: var(--muted); font-size: 12px; margin: 14px 0 10px; }
.hand-row { display: grid; grid-template-columns: repeat(10, minmax(72px, 1fr)); gap: 8px; min-height: 108px; } .card { min-height: 106px; position: relative; padding: 10px 9px; border: 1px solid var(--line-strong); background: linear-gradient(145deg, #1a2029, #11161e); color: var(--ink); text-align: left; cursor: default; overflow: hidden; transition: transform .18s ease, border-color .18s ease, background .18s ease, opacity .18s ease; } button.card { cursor: pointer; } button.card:hover { transform: translateY(-4px); border-color: var(--p1); background: linear-gradient(145deg, #21312e, #141d20); } .card.selected { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 8px 24px rgba(245,200,117,.12); } .card-index { position: absolute; top: 7px; right: 8px; color: var(--faint); font: 10px 'DM Mono', monospace; } .card-symbol { width: 29px; height: 29px; display: grid; place-items: center; margin-bottom: 8px; border: 1px solid rgba(255,255,255,.22); color: var(--gold); font-size: 14px; } .card-name { display: block; font-weight: 800; font-size: 12px; line-height: 1.25; } .card-power { display: block; color: var(--gold); font: 500 11px 'DM Mono', monospace; margin-top: 7px; } .card-effect { display: block; color: var(--muted); font-size: 9px; line-height: 1.4; margin-top: 3px; } .card-help { position: absolute; right: 7px; bottom: 7px; color: var(--faint); font: 500 9px 'DM Mono', monospace; } .opponent-hand .card { min-height: 94px; } .opponent-hand .card-symbol { margin-bottom: 6px; } .opponent-hand .card-effect { font-size: 8px; }
.battlefield { padding: 22px 20px 24px; background: radial-gradient(circle at 50% 0, rgba(255,255,255,.04), transparent 55%), #0f1319; } .battlefield-heading { align-items: end; margin-bottom: 18px; } .battlefield-heading h2 { font-size: 21px; } .battle-hint { color: var(--muted); margin: 0; font-size: 11px; } .lanes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; } .lane { min-height: 245px; padding: 13px; border: 1px solid var(--line); background: rgba(255,255,255,.025); position: relative; overflow: hidden; } .lane::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: var(--faint); opacity: .5; } .lane.won-p1::before { background: var(--p1); opacity: 1; } .lane.won-p2::before { background: var(--p2); opacity: 1; } .lane-header { display: flex; align-items: start; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 11px; } .lane-header h3 { margin: 0; font-size: 15px; } .lane-number { color: var(--faint); font: 10px 'DM Mono', monospace; } .lane-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 12px; font: 500 18px 'DM Mono', monospace; } .lane-score .score-p1 { color: var(--p1); text-align: right; } .lane-score .score-p2 { color: var(--p2); } .lane-score .versus { color: var(--faint); font-size: 10px; } .lane-winner { min-height: 15px; text-align: center; color: var(--muted); font-size: 10px; margin-bottom: 8px; } .lane.won-p1 .lane-winner { color: var(--p1); } .lane.won-p2 .lane-winner { color: var(--p2); } .lane-cards { display: grid; gap: 5px; } .played-card { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 8px; border-left: 2px solid var(--faint); background: rgba(255,255,255,.045); font-size: 10px; } .played-card.p1 { border-left-color: var(--p1); } .played-card.p2 { border-left-color: var(--p2); } .played-card-main { display: flex; align-items: center; gap: 7px; min-width: 0; } .played-card-symbol { color: var(--gold); font-size: 12px; } .played-card-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .played-card-power { font: 500 10px 'DM Mono', monospace; color: var(--muted); white-space: nowrap; } .lane-empty { display: grid; place-items: center; min-height: 100px; border: 1px dashed rgba(255,255,255,.08); color: var(--faint); font-size: 10px; }
.lane-picker { margin-top: 13px; padding: 12px; border: 1px solid rgba(245,200,117,.25); background: rgba(245,200,117,.06); display: flex; align-items: center; justify-content: space-between; gap: 16px; } .picker-label { color: var(--gold); } .picker-buttons { display: flex; gap: 8px; flex: 1; } .lane-button { flex: 1; padding: 9px 7px; border: 1px solid rgba(245,200,117,.38); background: transparent; color: var(--ink); cursor: pointer; font-size: 11px; transition: .2s ease; } .lane-button:hover { background: var(--gold); color: #17130c; }
.log-panel { margin-top: 16px; padding: 14px 20px; } .log-heading { margin-bottom: 9px; } .log-heading .eyebrow { color: var(--faint); } .log-list { display: flex; flex-wrap: wrap; gap: 7px; } .log-item { color: var(--muted); font-size: 11px; padding: 5px 8px; background: rgba(255,255,255,.04); } .log-item.latest { color: var(--ink); border-left: 2px solid var(--gold); }

/* Modals */
.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(4,6,9,.82); backdrop-filter: blur(9px); overflow: auto; } .modal { width: min(760px, 100%); max-height: calc(100vh - 44px); overflow: auto; position: relative; padding: 32px; border: 1px solid var(--line-strong); background: #11161d; box-shadow: 0 30px 120px rgba(0,0,0,.5); } .modal h2 { font-size: 30px; } .modal-lead { max-width: 620px; color: var(--muted); line-height: 1.7; font-size: 13px; } .modal-close { position: absolute; top: 14px; right: 17px; border: 0; background: transparent; color: var(--muted); font-size: 25px; cursor: pointer; } .modal-close:hover { color: var(--ink); } .rules-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 25px 0; } .rules-grid article { padding: 15px; border: 1px solid var(--line); background: rgba(255,255,255,.025); } .rules-grid h3, .definition-box h3, .card-list-title { margin: 8px 0 5px; font-size: 13px; } .rules-grid p { color: var(--muted); margin: 0; font-size: 11px; line-height: 1.65; } .rule-number { color: var(--gold); font: 500 11px 'DM Mono', monospace; }
.definition-box { padding: 16px; border: 1px solid rgba(114,216,194,.25); background: rgba(114,216,194,.05); margin-bottom: 22px; } .definition-box h3 { color: var(--p1); margin-top: 0; } .definition-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; } .definition-list div { display: flex; flex-direction: column; gap: 2px; } .definition-list b { color: var(--ink); font-size: 11px; } .definition-list span { color: var(--muted); font-size: 10px; line-height: 1.45; } .card-list-title { color: var(--muted); text-transform: uppercase; font: 500 10px 'DM Mono', monospace; letter-spacing: .14em; } .card-reference { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; } .reference-item { display: flex; align-items: center; gap: 9px; padding: 8px; background: rgba(255,255,255,.035); } .reference-item .card-symbol { flex: 0 0 27px; width: 27px; height: 27px; margin: 0; } .reference-name { font-size: 10px; font-weight: 700; } .reference-text { color: var(--muted); font-size: 9px; }
.card-detail-modal { width: min(500px, 100%); } .detail-card-head { display: flex; align-items: center; gap: 16px; margin: 25px 0 20px; } .detail-symbol { width: 78px; height: 96px; display: grid; place-items: center; color: var(--gold); border: 1px solid var(--gold); background: rgba(245,200,117,.08); font: 500 28px 'DM Mono', monospace; } .detail-card-head h2 { margin: 0; font-size: 27px; } .detail-card-head p { color: var(--gold); font: 500 12px 'DM Mono', monospace; margin: 7px 0 0; } .detail-effect-box, .detail-tip-box { padding: 14px; margin-top: 10px; border: 1px solid var(--line); } .detail-effect-box { background: rgba(255,255,255,.04); } .detail-tip-box { border-color: rgba(114,216,194,.25); background: var(--p1-dim); } .detail-label { color: var(--gold); font: 500 10px 'DM Mono', monospace; letter-spacing: .12em; } .detail-tip-box .detail-label { color: var(--p1); } .detail-effect-box p, .detail-tip-box p { color: var(--ink); font-size: 13px; line-height: 1.7; margin: 7px 0 0; } .detail-footnote { color: var(--faint); font: 500 9px 'DM Mono', monospace; margin: 20px 0 0; }
.result-backdrop { z-index: 30; } .result-modal { width: min(480px, 100%); text-align: center; padding: 42px 32px 32px; } .result-symbol { color: var(--gold); font-size: 34px; margin: 10px 0; } .result-modal h2 { font-size: 34px; } .result-modal p { color: var(--muted); font-size: 13px; line-height: 1.7; } .result-score { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin: 25px 0; padding: 15px; border: 1px solid var(--line); font: 500 20px 'DM Mono', monospace; } .result-score span:nth-child(1) { color: var(--p1); } .result-score span:nth-child(3) { color: var(--p2); } .result-actions { display: flex; justify-content: center; gap: 9px; }

@media (max-width: 900px) { .home-hero { grid-template-columns: 1fr; gap: 5px; } .hero-visual { min-height: 300px; transform: scale(.82); } .home-topbar { margin-bottom: 25px; } .tutorial-main { grid-template-columns: 210px minmax(0, 1fr); gap: 25px; } }
@media (max-width: 760px) {
  .app-shell, .home-main, .tutorial-main { width: min(100% - 24px, 560px); } .topbar { align-items: flex-start; flex-direction: column; gap: 16px; } .home-topbar, .tutorial-topbar { flex-direction: row; align-items: center; } .home-top-note { display: none; } .top-actions { justify-content: flex-start; } .home-hero { min-height: auto; padding: 35px 0 45px; } .hero-copy h2 { font-size: 44px; } .hero-lead { font-size: 13px; } .mode-select { align-items: stretch; flex-wrap: wrap; } .home-lower { grid-template-columns: 1fr; } .how-grid { grid-template-columns: 1fr; gap: 14px; } .hero-visual { min-height: 245px; margin-top: 0; transform: scale(.65); }
  .tutorial-topbar { padding-top: 18px; margin-bottom: 22px; } .tutorial-topbar .compact-brand { display: none; } .tutorial-main { grid-template-columns: 1fr; gap: 15px; min-height: auto; padding-bottom: 25px; } .tutorial-sidebar h2 { font-size: 24px; margin: 10px 0 12px; } .tutorial-sidebar-note { display: none; } .tutorial-nav { grid-template-columns: repeat(5, 1fr); gap: 2px; } .tutorial-nav button { display: block; text-align: center; padding: 6px 2px; font-size: 0; } .tutorial-nav button span { display: grid; place-items: center; width: 24px; height: 24px; margin: 0 auto; border: 1px solid var(--line-strong); border-radius: 50%; } .tutorial-nav button.selected span { border-color: var(--p1); } .tutorial-stage { min-height: 500px; padding: 16px; } .tutorial-visual { min-height: 180px; } .tutorial-copy h2 { font-size: 24px; } .tutorial-actions { margin-top: 22px; } .tutorial-counter { align-self: flex-end; }
  .status-strip { gap: 8px; } .status-item { min-width: 0; flex-direction: column; gap: 4px; } .status-item.align-right { align-items: flex-end; } .turn-meter { min-width: 70px; } .home-button { display: none; } .opponent-zone, .active-zone, .battlefield, .log-panel { padding-left: 12px; padding-right: 12px; } .step-guide { grid-template-columns: 38px 1fr; } .guide-steps { grid-column: 1 / -1; justify-content: space-between; } .guide-steps li { font-size: 0; } .guide-steps li::before { margin-right: 0; } .hand-row { grid-template-columns: repeat(5, minmax(70px, 1fr)); } .opponent-hand { min-height: 198px; } .lanes { grid-template-columns: 1fr; } .lane { min-height: 190px; } .lane-empty { min-height: 55px; } .battlefield-heading { align-items: flex-start; flex-direction: column; gap: 7px; } .lane-picker { align-items: stretch; flex-direction: column; gap: 9px; } .picker-buttons { width: 100%; } .footer-note { align-items: flex-start; flex-direction: column; gap: 5px; } .rules-grid, .definition-list, .card-reference { grid-template-columns: 1fr; } .modal { padding: 26px 18px; } .tutorial-cards { transform: scale(.86); } .tutorial-choice-demo { gap: 8px; } .tutorial-choice-demo .demo-lane { padding: 20px 13px; }
}

/* Tabletop direction: warm wood, paper cards and physical-board affordances. */
:root {
  --ink: #35281f; --muted: #796651; --faint: #aa9374; --bg: #b78d5b;
  --panel: #f1e4cc; --panel-2: #e8d4b2; --line: rgba(82,53,29,.19); --line-strong: rgba(82,53,29,.38);
  --p1: #286b5c; --p1-dim: rgba(40,107,92,.13); --p2: #9b4736; --p2-dim: rgba(155,71,54,.13);
  --gold: #9c6b2d; --shadow: 0 18px 35px rgba(68,42,19,.2);
}
body {
  background-color: var(--bg);
  background-image: linear-gradient(96deg, rgba(255,255,255,.07), transparent 25%, rgba(75,42,17,.08) 52%, transparent 78%), repeating-linear-gradient(5deg, rgba(92,54,22,.09) 0 2px, transparent 2px 20px), repeating-linear-gradient(89deg, transparent 0 90px, rgba(255,247,220,.09) 92px 94px, transparent 95px 180px);
  color: var(--ink);
}
.screen { color: var(--ink); }
.home-screen, .tutorial-screen { background: radial-gradient(circle at 74% 28%, rgba(247,233,202,.35), transparent 30%), transparent; }
.app-shell { padding-bottom: 24px; }
.topbar { padding-top: 24px; }
.brand-lockup h1 { color: var(--ink); }
.brand-lockup h1 span, .compact-brand h1 span { color: var(--muted); }
.eyebrow, .status-label, .picker-label { color: var(--muted); }
.brand-mark { border-color: var(--p1); color: var(--p1); background: rgba(241,228,204,.24); }
.home-top-note { color: var(--muted); }
.ghost-button, .primary-button { color: var(--ink); border-color: var(--line-strong); }
.ghost-button:hover { border-color: var(--ink); background: rgba(255,248,226,.45); }
.ghost-button.danger:hover { color: var(--p2); border-color: var(--p2); }
.primary-button { background: var(--p1); border-color: var(--p1); color: #f8f1df; box-shadow: 0 5px 0 rgba(28,74,63,.14); }
.primary-button:hover { background: #347f6e; }
.mode-badge, .definition-chip { color: var(--p1); border-color: rgba(40,107,92,.35); background: var(--p1-dim); }
.mode-button:hover { border-color: var(--p1); background: rgba(40,107,92,.22); }
.mode-select-label { color: var(--muted); }
.mode-choice { color: var(--muted); border-color: var(--line); background: rgba(241,228,204,.2); }
.mode-choice small { color: var(--faint); }
.mode-choice:hover, .mode-choice.selected { border-color: var(--p1); color: var(--p1); background: var(--p1-dim); }
.difficulty-select { display: flex; align-items: center; gap: 7px; margin-top: 10px; }
.difficulty-choice { padding: 7px 10px; color: var(--muted); border: 1px solid var(--line); background: rgba(241,228,204,.2); cursor: pointer; font-size: 10px; transition: .2s ease; }
.difficulty-choice b, .difficulty-choice small { display: block; }
.difficulty-choice small { color: var(--faint); font-size: 8px; margin-top: 3px; }
.difficulty-choice:hover, .difficulty-choice.selected { border-color: var(--gold); color: var(--gold); background: rgba(156,107,45,.1); }
.first-player-select { display: flex; align-items: stretch; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.first-player-select .mode-select-label { align-self: center; font-size: 12px; }
.first-player-choice, .result-difficulty-choice { padding: 7px 10px; color: var(--muted); border: 1px solid var(--line); background: rgba(241,228,204,.2); cursor: pointer; font-size: 12px; transition: .2s ease; }
.first-player-choice b, .first-player-choice small, .result-difficulty-choice b, .result-difficulty-choice small { display: block; }
.first-player-choice small, .result-difficulty-choice small { color: var(--faint); font-size: 12px; margin-top: 3px; }
.first-player-choice:hover, .first-player-choice.selected, .result-difficulty-choice:hover, .result-difficulty-choice.selected { border-color: var(--gold); color: var(--gold); background: rgba(156,107,45,.1); }
.home-panel, .tutorial-stage, .step-guide, .modal { background: rgba(241,228,204,.94); border-color: var(--line-strong); }
.home-panel { border-radius: 12px; box-shadow: var(--shadow); }
.home-panel p, .hero-lead, .tutorial-copy p, .tutorial-sidebar-note { color: var(--muted); }
.hero-copy h2 { color: var(--ink); }
.hero-copy h2 em { color: var(--p1); }
.hero-kicker { color: var(--p1); }
.hero-visual { filter: sepia(.12); }
.visual-orbit { border-color: rgba(82,53,29,.22); }
.orbit-two { border-color: rgba(40,107,92,.25); }
.visual-center { border-color: var(--p1); background: rgba(228,209,173,.9); box-shadow: 0 0 45px rgba(40,107,92,.15); }
.visual-center span { color: var(--p1); }
.visual-center small { color: var(--muted); }
.visual-card { border-color: var(--line-strong); border-radius: 7px; background: linear-gradient(145deg, #f7ecd8, #e2c99d); box-shadow: 14px 18px 25px rgba(68,42,19,.28); color: var(--ink); }
.visual-card span { color: var(--gold); }
.visual-card b { color: var(--muted); }
.visual-card-back { background: #d8bd8c; border-color: rgba(40,107,92,.35); color: rgba(40,107,92,.7); }
.visual-card-right { border-color: rgba(155,71,54,.38); }
.visual-card-right span { color: var(--p2); }
.tutorial-nav button { color: var(--muted); }
.tutorial-nav button.selected { color: var(--ink); }
.tutorial-nav button.selected span { color: var(--p1); }
.tutorial-nav button span { color: var(--faint); }
.tutorial-stage { border-radius: 12px; box-shadow: var(--shadow); }
.tutorial-visual { background: radial-gradient(circle, rgba(40,107,92,.11), transparent 64%); }
.tutorial-board, .tutorial-card-mini, .tutorial-detail-demo { color: var(--ink); }
.tutorial-lane { border-color: var(--line-strong); background: rgba(229,207,169,.65); border-radius: 7px; }
.tutorial-lane div { color: var(--gold); }
.tutorial-card-mini { border-color: var(--line-strong); border-radius: 7px; background: linear-gradient(145deg, #f7ecd8, #e2c99d); box-shadow: 7px 9px 15px rgba(68,42,19,.16); }
.tutorial-card-mini.accent { border-color: var(--p1); }
.tutorial-card-mini .mini-symbol { color: var(--gold); }
.tutorial-choice-demo .demo-lane { border-color: var(--p1); color: var(--p1); background: var(--p1-dim); border-radius: 7px; }
.tutorial-detail-demo { border-color: rgba(156,107,45,.4); background: rgba(245,226,188,.58); border-radius: 8px; }
.tutorial-detail-demo .detail-symbol { color: var(--p2); border-color: var(--p2); background: var(--p2-dim); }
.tutorial-sequence .sequence-step { border-color: var(--line-strong); color: var(--muted); border-radius: 5px; }
.tutorial-sequence .sequence-step.active { color: var(--p1); border-color: var(--p1); background: var(--p1-dim); }
.tutorial-progress { background: rgba(82,53,29,.14); }
.tutorial-progress span { background: var(--p1); }
.status-strip { border-color: var(--line); }
.turn-meter { background: rgba(82,53,29,.13); }
.turn-meter-fill { background: linear-gradient(90deg, var(--p1), var(--gold)); }
.step-guide { border-radius: 10px; box-shadow: var(--shadow); }
.step-guide-mark { color: var(--p1); border-color: var(--p1); background: rgba(40,107,92,.06); }
.step-guide-copy p:last-child { color: var(--muted); }
.guide-steps li { color: var(--faint); }
.guide-steps li::before { border-color: var(--line-strong); }
.guide-steps li.current { color: var(--p1); }
.guide-steps li.current::before { border-color: var(--p1); background: var(--p1-dim); }
.guide-steps li.done { color: var(--muted); }
.player-zone, .battlefield, .log-panel { border-color: var(--line-strong); box-shadow: var(--shadow); }
.player-zone { background: rgba(241,228,204,.95); }
.opponent-zone { border-radius: 12px 12px 0 0; }
.active-zone { border-top-color: var(--p1); border-radius: 0 0 12px 12px; background: rgba(241,228,204,.98); }
.turn-state, .public-info-note, .selection-note { color: var(--muted); }
.turn-state.active { color: var(--p1); }
.card { border-color: var(--line-strong); border-radius: 7px; background: linear-gradient(145deg, #f7ecd8, #e2c99d); color: var(--ink); box-shadow: 0 5px 10px rgba(68,42,19,.13); }
button.card:hover { border-color: var(--p1); background: linear-gradient(145deg, #fff4df, #e8d1a8); }
.card.selected { border-color: var(--gold); box-shadow: 0 8px 16px rgba(156,107,45,.22); }
.card-index { color: var(--faint); }
.card-symbol { border-color: rgba(82,53,29,.25); color: var(--gold); }
.card-power { color: var(--gold); }
.card-effect { color: var(--muted); }
.card-help { color: var(--faint); }
.interaction-hint { color: var(--muted); font: 500 9px 'DM Mono', monospace; margin: 0 0 11px; }
.interaction-hint span { color: var(--p1); }
.card.dragging { opacity: .45; transform: rotate(2deg); }
.battlefield { border-radius: 0; background: linear-gradient(135deg, #ad8150, #c09764 52%, #a87847); }
.battlefield-heading h2, .battle-hint { color: #f8edd6; }
.battlefield-heading .eyebrow { color: #e9d5af; }
.lane { border-color: rgba(82,53,29,.32); border-radius: 8px; background: rgba(244,225,188,.73); box-shadow: inset 0 0 0 1px rgba(255,243,214,.27); }
.lane::before { background: var(--gold); opacity: .55; }
.lane.won-p1::before { background: var(--p1); }
.lane.won-p2::before { background: var(--p2); }
.lane-header { border-color: var(--line); }
.lane-number, .lane-winner, .lane-score .versus { color: var(--muted); }
.lane.won-p1 .lane-winner { color: var(--p1); }
.lane.won-p2 .lane-winner { color: var(--p2); }
.lane-score .score-p1 { color: var(--p1); }
.lane-score .score-p2 { color: var(--p2); }
.lane-empty { border-color: rgba(82,53,29,.18); color: var(--faint); }
.lane.drag-over { border-color: var(--p1); background: rgba(221,244,231,.86); box-shadow: inset 0 0 0 2px rgba(40,107,92,.28), 0 0 0 4px rgba(40,107,92,.12); transform: translateY(-3px); }
.played-card { border-left-color: var(--faint); background: rgba(255,248,228,.5); }
.played-card.p1 { border-left-color: var(--p1); }
.played-card.p2 { border-left-color: var(--p2); }
.played-card-symbol { color: var(--gold); }
.played-card-power { color: var(--muted); }
.lane-picker { border-color: rgba(156,107,45,.36); background: rgba(245,226,188,.68); border-radius: 7px; }
.picker-label { color: var(--gold); }
.lane-button { border-color: rgba(156,107,45,.48); color: var(--ink); background: rgba(255,248,228,.35); border-radius: 5px; }
.lane-button:hover { background: var(--gold); color: #fff6e4; }
.log-panel { border-radius: 10px; background: rgba(241,228,204,.88); }
.log-heading .eyebrow { color: var(--muted); }
.log-item { color: var(--muted); background: rgba(220,197,157,.34); border-radius: 4px; }
.log-item.latest { color: var(--ink); border-left-color: var(--gold); }
.footer-note { color: var(--muted); }
.modal-backdrop { background: rgba(55,34,16,.58); }
.modal { border-radius: 12px; box-shadow: 0 30px 70px rgba(68,42,19,.32); }
.modal-close { color: var(--muted); }
.modal-close:hover { color: var(--ink); }
.rules-grid article { border-color: var(--line); background: rgba(220,197,157,.25); border-radius: 7px; }
.rules-grid p, .definition-list span { color: var(--muted); }
.definition-box { border-color: rgba(40,107,92,.28); background: var(--p1-dim); border-radius: 8px; }
.definition-box h3 { color: var(--p1); }
.reference-item { background: rgba(220,197,157,.25); border-radius: 5px; }
.detail-symbol { border-color: var(--gold); background: rgba(156,107,45,.08); }
.detail-effect-box { border-color: var(--line); background: rgba(220,197,157,.25); border-radius: 7px; }
.detail-tip-box { border-color: rgba(40,107,92,.28); background: var(--p1-dim); border-radius: 7px; }
.detail-label { color: var(--gold); }
.detail-tip-box .detail-label { color: var(--p1); }
.detail-effect-box p, .detail-tip-box p { color: var(--ink); }
.result-score { border-color: var(--line); }
.result-score span:nth-child(1) { color: var(--p1); }
.result-score span:nth-child(3) { color: var(--p2); }

@media (max-width: 760px) {
  .difficulty-select { flex-wrap: wrap; }
  .difficulty-select .mode-select-label { width: 100%; }
  .interaction-hint { line-height: 1.7; }
  .lane.drag-over { transform: none; }
}

/* Tactical details and responsive card-tray layout. */
.card-role { display: inline-block; color: var(--p1); border: 1px solid rgba(40,107,92,.3); background: var(--p1-dim); padding: 2px 4px; margin-bottom: 4px; font: 500 8px 'DM Mono', monospace; letter-spacing: .04em; }
.card-saboteur .card-role { color: var(--p2); border-color: rgba(155,71,54,.3); background: var(--p2-dim); }
.card-ram .card-role, .card-lancer .card-role { color: var(--gold); border-color: rgba(156,107,45,.35); background: rgba(156,107,45,.1); }
.card-symbol { border-radius: 4px; }
.lane-header h3 { display: flex; align-items: center; gap: 6px; }
.lane-glyph { color: var(--gold); font: 500 12px 'DM Mono', monospace; }
.lane-terrain { color: var(--muted); margin: 5px 0 0; font: 500 8px 'DM Mono', monospace; letter-spacing: .03em; }
.terrain-0 { background: linear-gradient(145deg, rgba(218,235,208,.78), rgba(244,225,188,.7)); }
.terrain-1 { background: linear-gradient(145deg, rgba(247,228,184,.85), rgba(231,196,140,.72)); }
.terrain-2 { background: linear-gradient(145deg, rgba(206,226,227,.73), rgba(244,225,188,.7)); }
.battlefield::after { content: 'TACTICAL MAP  ·  THREE FRONTS'; display: block; color: rgba(255,246,224,.58); text-align: right; margin-top: 12px; font: 500 8px 'DM Mono', monospace; letter-spacing: .16em; }
.battlefield-heading { position: relative; }
.battlefield-heading::after { content: 'N'; color: rgba(255,246,224,.6); display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid rgba(255,246,224,.35); border-radius: 50%; font: 500 9px 'DM Mono', monospace; }
.opponent-zone, .active-zone { position: relative; }
.opponent-zone::before, .active-zone::before { position: absolute; top: 17px; width: 32px; height: 22px; display: grid; place-items: center; border: 1px solid currentColor; font: 500 9px 'DM Mono', monospace; }
.opponent-zone::before { content: 'P2'; right: 20px; color: var(--p2); }
.active-zone::before { content: 'P1'; left: 20px; color: var(--p1); }
.drag-over .lane-terrain { color: var(--p1); }
.game-screen { overflow-x: hidden; }

@media (max-width: 980px) {
  .hand-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  .game-screen .app-shell { width: 100%; padding-left: 8px; padding-right: 8px; padding-bottom: 255px; }
  .game-screen .topbar { position: sticky; top: 0; z-index: 14; align-items: stretch; padding: 10px 0 8px; margin-bottom: 8px; background: rgba(238,220,184,.96); }
  .game-screen .topbar .brand-lockup { padding-left: 5px; }
  .game-screen .topbar .brand-lockup h1 { font-size: 18px; }
  .game-screen .topbar .brand-lockup h1 span { display: none; }
  .game-screen .top-actions { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
  .game-screen .top-actions .ghost-button, .game-screen .top-actions .mode-button { min-height: 44px; padding: 7px 4px; font-size: 10px; }
  .game-screen .home-button { display: none; }
  .game-screen .status-strip { margin-bottom: 10px; padding: 10px 0; }
  .game-screen .step-guide { margin-bottom: 10px; padding: 11px; }
  .step-guide-mark { width: 34px; height: 34px; }
  .step-guide-copy h3 { font-size: 13px; }
  .step-guide-copy p:last-child { font-size: 10px; }
  .opponent-zone::before { top: 13px; right: 12px; }
  .active-zone::before { top: 13px; left: 12px; }
  .game-screen .player-zone { padding: 14px 11px; }
  .game-screen .player-heading { padding-right: 42px; }
  .public-info-note { margin: 9px 0 7px; font-size: 8px; }
  .game-screen .hand-row { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 5px; }
  .game-screen .opponent-hand .card { min-height: 68px; padding: 7px 5px; }
  .game-screen .opponent-hand .card-symbol { width: 22px; height: 22px; margin-bottom: 4px; font-size: 11px; }
  .game-screen .opponent-hand .card-role, .game-screen .opponent-hand .card-effect, .game-screen .opponent-hand .card-help { display: none; }
  .game-screen .opponent-hand .card-name { font-size: 9px; }
  .game-screen .opponent-hand .card-power { font-size: 9px; margin-top: 4px; }
  .game-screen .battlefield { padding: 15px 10px 13px; }
  .game-screen .battlefield-heading { margin-bottom: 11px; }
  .game-screen .battlefield-heading h2 { font-size: 18px; }
  .game-screen .battlefield-heading::after { width: 22px; height: 22px; }
  .game-screen .lanes { gap: 8px; }
  .game-screen .lane { min-height: 175px; padding: 10px; }
  .game-screen .lane-header { padding-bottom: 7px; margin-bottom: 8px; }
  .game-screen .lane-header h3 { font-size: 13px; }
  .game-screen .lane-terrain { font-size: 7px; }
  .game-screen .lane-score { margin-bottom: 8px; font-size: 17px; }
  .game-screen .lane-winner { font-size: 9px; }
  .game-screen .played-card { padding: 6px; font-size: 9px; }
  .game-screen .played-card-power { font-size: 9px; }
  .game-screen .active-zone { position: fixed; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 12; max-height: min(40vh, 300px); overflow-y: auto; padding: 11px; border: 1px solid var(--line-strong); border-top: 2px solid var(--p1); border-radius: 10px; box-shadow: 0 -10px 30px rgba(68,42,19,.25); }
  .game-screen .active-zone .selection-note { margin: 5px 0 6px; font-size: 10px; }
  .game-screen .interaction-hint { margin-bottom: 6px; font-size: 8px; }
  .game-screen .active-hand .card { min-height: 80px; padding: 6px 5px; }
  .game-screen .active-hand .card-symbol { width: 23px; height: 23px; margin-bottom: 4px; font-size: 11px; }
  .game-screen .active-hand .card-index { top: 4px; right: 5px; font-size: 8px; }
  .game-screen .active-hand .card-role { font-size: 7px; padding: 1px 3px; margin-bottom: 2px; }
  .game-screen .active-hand .card-name { font-size: 9px; }
  .game-screen .active-hand .card-power { font-size: 8px; margin-top: 3px; }
  .game-screen .active-hand .card-effect { font-size: 7px; line-height: 1.25; margin-top: 2px; }
  .game-screen .active-hand .card-help { right: 4px; bottom: 4px; font-size: 6px; }
  .game-screen .lane-picker { margin-top: 7px; padding: 7px; gap: 5px; }
  .game-screen .picker-label { font-size: 8px; }
  .game-screen .lane-button { min-height: 42px; padding: 7px 3px; font-size: 9px; }
  .game-screen .log-panel { margin-top: 8px; }
  .game-screen .footer-note { padding-bottom: 12px; }
  .modal-backdrop { z-index: 50; }
  .result-backdrop { z-index: 60; }
}

@media (pointer: coarse) {
  button.card, .lane-button, .ghost-button, .primary-button, .mode-button, .mode-choice, .difficulty-choice { touch-action: manipulation; }
  .lane-button, .ghost-button, .primary-button, .mode-button, .mode-choice, .difficulty-choice { min-height: 44px; }
}

/* Playability pass: the hand is a control tray, not a tiny poster. */
.game-screen .status-strip { position: sticky; top: 0; z-index: 9; background: rgba(16, 24, 39, .96); }
.game-screen .step-guide { position: sticky; top: 74px; z-index: 8; }
.game-screen .step-guide-copy p:last-child { max-width: 58em; }
.game-screen .card { position: relative; cursor: pointer; }
.game-screen .card-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin-top: 7px;
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  color: var(--p1);
  background: var(--p1-dim);
  cursor: pointer;
  pointer-events: auto;
}
.game-screen .card-help:hover, .game-screen .card-help:focus-visible { border-color: var(--p1); background: var(--p1-dim); }
.game-screen .card.selected { transform: translateY(-5px); border-width: 2px; }
.game-screen .card.selected::before { content: '選択中'; position: absolute; top: 6px; left: 7px; padding: 2px 5px; color: var(--bg); background: var(--p1); font-size: 10px; font-weight: 700; }
.game-screen .lane.last-play-lane { animation: lanePulse .8s ease-out; }
.game-screen .last-play { border-color: var(--p1) !important; }
@keyframes lanePulse { 0% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--p1) 35%, transparent); } 100% { box-shadow: none; } }
.game-screen .battlefield-heading .battle-hint { max-width: 28em; }
.game-screen .lane-score { font-size: 22px; }
.game-screen .lane-score .score-p1, .game-screen .lane-score .score-p2 { font-weight: 700; }
.game-screen .lane-winner { font-weight: 700; }

@media (max-width: 760px) {
  .game-screen .status-strip { top: 0; }
  .game-screen .step-guide { top: 70px; }
  .game-screen .guide-steps li { font-size: 10px; }
  .game-screen .opponent-zone { margin-top: 12px; }
  .game-screen .active-zone { bottom: max(8px, env(safe-area-inset-bottom)); max-height: min(46vh, 350px); background: rgba(16, 24, 39, .99); box-shadow: 0 -14px 32px rgba(0, 0, 0, .42); }
  .game-screen .active-hand { gap: 5px; }
  .game-screen .active-hand .card { min-height: 96px; }
  .game-screen .active-hand .card-help { min-height: 28px; font-size: 10px; }
  .game-screen .active-hand .card.selected { transform: translateY(-3px); }
  .game-screen .active-hand .card.selected::before { top: 3px; left: 4px; font-size: 10px; }
  .game-screen .card-effect { max-height: 28px; overflow: hidden; }
  .game-screen .lane-picker { background: rgba(23, 36, 58, .98); }
}

/* On a phone the hand is a horizontal control tray. A single readable card
 * is more useful than ten compressed columns, and every card remains a
 * one-thumb tap target. */
@media (max-width: 760px) {
  .game-screen .app-shell { padding-bottom: 360px; }
  .game-screen .active-zone { max-height: min(46vh, 350px); }
  .game-screen .active-zone { display: flex; flex-direction: column; }
  .game-screen .active-zone .selection-note { order: 1; }
  .game-screen .active-zone .interaction-hint { order: 2; }
  .game-screen .active-zone .lane-picker { order: 3; }
  .game-screen .active-zone .active-hand { order: 4; }
  .game-screen .active-hand {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 2px 8px;
    scrollbar-color: var(--p1) var(--line);
  }
  .game-screen .active-hand .card {
    flex: 0 0 132px !important;
    width: 132px !important;
    min-width: 132px !important;
    min-height: 142px !important;
    scroll-snap-align: start;
  }
  .game-screen .active-hand .card-effect {
    max-height: 44px;
    overflow: hidden;
  }
  .game-screen .active-hand .card-help {
    position: static;
    width: 100%;
    min-height: 28px;
    margin-top: 7px;
    font-size: 10px !important;
  }
  .game-screen .interaction-hint::after {
    content: '　手札は横にスワイプできます';
    color: var(--p1);
  }
}

.reference-item { cursor: pointer; }
.reference-item:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.reference-help { flex: 0 0 auto; margin-left: auto; color: var(--p1); font: 500 10px 'DM Mono', monospace; white-space: nowrap; }

.result-rematch { margin: 18px 0 14px; padding: 13px; border: 1px solid var(--line); background: var(--p1-dim); text-align: left; }
.result-rematch-label { margin: 0 0 8px; color: var(--muted); font: 500 12px 'DM Mono', monospace; }
.result-rematch-choices { display: flex; gap: 7px; }
.result-rematch-choices .result-difficulty-choice { flex: 1; min-width: 0; }
.result-rematch-button { width: 100%; margin-top: 9px; min-height: 40px; }
@media (max-width: 760px) {
  .first-player-select .mode-select-label, .result-rematch-label { font-size: 10px; }
  .first-player-choice, .result-difficulty-choice { font-size: 10px; }
  .first-player-choice small, .result-difficulty-choice small { font-size: 10px; }
}
