.game { width: 100%; max-width: 560px; margin: 0 auto; padding: 2rem 16px 3rem; flex: 1; }
.game h1 { font-size: 2.1rem; margin-bottom: 1rem; }
.game h2 { font-size: 1.25rem; margin: 1.8rem 0 0.6rem; }
.game svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.game .primary { display: inline-flex; justify-content: center; align-items: center; background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 14px 22px; font: 700 16px var(--sans); cursor: pointer; text-decoration: none; }
.game .primary:hover, .game .primary:active { background: var(--accent-dark); }
.game .secondary { background: #fff; color: var(--ink); border: 1px solid var(--ink); border-radius: 10px; padding: 12px 16px; font: 700 14px var(--sans); cursor: pointer; }
.game .secondary:active { background: var(--accent-soft); }
.game .notice { font-size: 13px; color: var(--ink-3); margin: 0.4rem 0 0; }
.game .flash { margin-top: 1.5rem; }

.rules p { font-size: 16px; line-height: 1.5; color: var(--ink-2); margin: 0 0 0.8em; padding-left: 14px; border-left: 3px solid var(--accent-soft); }
.rules p:nth-child(2) { border-color: var(--accent); }
.start { margin-top: 2rem; display: grid; gap: 14px; }
.start .nick { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.start .nick input { width: 100%; padding: 12px; border: 1px solid var(--rule); border-radius: 10px; font: 16px var(--sans); background: #fff; }
.start .check { font-size: 14px; }
.start .check input { width: 20px; height: 20px; margin-top: 1px; }
.start .primary { width: 100%; padding: 16px; font-size: 17px; margin-top: 6px; }

.play { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.play .item, .play .scales { transition: opacity 0.18s ease; }
.play.busy .item, .play.busy .scales { opacity: 0.45; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.card.enter { animation: enter 0.22s ease; }
.bar { position: sticky; top: 64px; z-index: 5; background: var(--bg); padding: 10px 0 8px; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; font-size: 13px; color: var(--ink-3); }
.bar .total { font: 600 15px var(--sans); color: var(--accent); font-variant-numeric: tabular-nums; }
.bar .track { grid-column: 1 / -1; height: 3px; background: #e6ebe5; border-radius: 3px; overflow: hidden; }
.bar .track i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.3s; }
.item { margin-top: 12px; }
.ctx { margin: 0 0 8px; font-size: 13.5px; color: var(--ink-2); border-left: 2px solid var(--rule); padding-left: 10px; white-space: pre-wrap; }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 18px; font-size: 19px; line-height: 1.45; min-height: 96px; white-space: pre-wrap; overflow-wrap: anywhere; }

.scales { margin-top: 16px; display: grid; gap: 12px; }
.scale { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px 10px; }
.scale.advisory { background: #fbfcf8; border-style: dashed; }
.scale.advisory .scale-head output { color: var(--ink-2); }
.scale.near { border-color: var(--hold); }
.scale.over { border-color: var(--remove); background: #fff7f5; }
.scale-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 14.5px; }
.scale-head label { display: flex; align-items: center; gap: 8px; }
.scale-head svg { width: 20px; height: 20px; color: var(--accent); }
.scale-head output { font-variant-numeric: tabular-nums; font-size: 18px; color: var(--accent); min-width: 2ch; text-align: right; margin-left: auto; }
.scale.over .scale-head output { color: var(--remove); }
.scale-head .close { margin-left: 10px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--rule); background: #fff; color: var(--ink-3); font-size: 20px; line-height: 1; cursor: pointer; }
.scale-head .close:active { background: var(--remove-soft); color: var(--remove); }
.scale-hint { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.35; max-width: none; }
.scale-hint .question { display: block; font-size: 16px; color: var(--ink); margin-bottom: 2px; }
.slider { position: relative; margin: 8px 0 8px; height: 32px; }
.slider input { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; margin: 0; background: transparent; --v: 0%; }
.slider input::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--accent) var(--v), #e6ebe5 var(--v)); }
.slider input::-moz-range-track { height: 8px; border-radius: 8px; background: #e6ebe5; }
.slider input::-moz-range-progress { height: 8px; border-radius: 8px; background: var(--accent); }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); margin-top: -10px; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.slider input::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.scale.over .slider input::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--remove) var(--v), #e6ebe5 var(--v)); }
.scale.over .slider input::-webkit-slider-thumb, .scale.over .slider input::-moz-range-thumb { border-color: var(--remove); }
.slider .line { position: absolute; top: 4px; width: 2px; height: 24px; margin-left: -1px; background: var(--remove); opacity: 0.7; pointer-events: none; }
.slider .line::after { content: ""; position: absolute; left: -3px; bottom: -6px; width: 8px; height: 8px; background: var(--remove); transform: rotate(45deg); }
.quick { display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 6px; }
.quick button { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--rule); background: #fff; color: var(--ink); font-size: 13px; cursor: pointer; }
.quick button:active { background: var(--accent-soft); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 400px) { .tiles { grid-template-columns: repeat(5, 1fr); } }
.tile { aspect-ratio: 1; display: grid; place-items: center; align-content: center; gap: 6px; padding: 6px 4px; border: 1px dashed var(--rule); border-radius: 12px; background: #fff; color: var(--ink-2); cursor: pointer; font-size: 11px; line-height: 1.15; text-align: center; }
.tile svg { width: 28px; height: 28px; }
.tile:active { background: var(--accent-soft); border-color: var(--accent); }
.scales .hint { font-size: 12.5px; color: var(--ink-3); margin: 0; max-width: none; }

.reveal { margin-top: 16px; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 14px; }
.reveal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.reveal-head strong { font: 600 26px var(--serif); color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.legend { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.legend i.you { background: var(--accent); }
.legend i.machine { border: 2px dashed var(--ink); margin-left: 8px; }
.reveal ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.reveal li { display: grid; grid-template-columns: 72px 1fr auto 34px; align-items: center; gap: 10px; font-size: 13px; }
.reveal li.none { grid-template-columns: 1fr; color: var(--ink-3); }
.reveal li .name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reveal li .nums { font-variant-numeric: tabular-nums; color: var(--ink-3); white-space: nowrap; }
.reveal li b { text-align: right; font-variant-numeric: tabular-nums; color: var(--accent); }
.reveal li.hot b { color: var(--remove); }
.lane { position: relative; height: 22px; background: #e6ebe5; border-radius: 6px; }
.lane i { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; }
.lane .you { background: var(--accent); z-index: 2; }
.lane .machine { border: 2px dashed var(--ink); background: var(--paper); z-index: 3; left: 0; opacity: 0; transition: left 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s, opacity 0.2s 0.15s; }
.reveal.in .lane .machine { opacity: 1; }
.reveal:not(.in) .lane .machine { left: 0 !important; }
.lane .line { top: 2px; width: 2px; height: 18px; margin: 0 0 0 -1px; border-radius: 0; background: var(--remove); opacity: 0.7; }
li.hot .lane .you { background: var(--remove); }
.verdict-line { margin: 14px 0 0; font-size: 14px; font-weight: 600; max-width: none; }
.verdict-line.yes { color: var(--accent); }
.verdict-line.no { color: var(--hold); }
.play .actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: rgba(246, 247, 243, 0.96); backdrop-filter: blur(10px); border-top: 1px solid var(--rule); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.play .actions .primary { width: 100%; max-width: 528px; margin: 0 auto; display: flex; }
.play .status { position: fixed; left: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--ink-3); margin: 0; }

.result .score { display: flex; align-items: baseline; gap: 10px; margin: 0.4rem 0 1.2rem; }
.result .score strong { font: 600 64px/1 var(--serif); letter-spacing: -0.03em; color: var(--accent); font-variant-numeric: tabular-nums; }
.result .score span { font-size: 15px; color: var(--ink-2); }
.confidence { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-size: 13px; color: var(--ink-2); }
.confidence span { grid-column: 1 / -1; }
.confidence .meter { height: 10px; background: #e6ebe5; border-radius: 6px; overflow: hidden; }
.confidence .meter i { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.8s ease; }
.confidence b { font-variant-numeric: tabular-nums; }
.misses { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.misses li { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; }
.misses li.none { color: var(--ink-3); border-style: dashed; }
.misses blockquote { margin: 0 0 6px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.misses p { margin: 0; font-size: 13px; color: var(--remove); font-weight: 600; }
.result .none p { font-size: 15px; color: var(--ink-2); }
.share { margin-top: 2rem; background: var(--accent-soft); border-radius: 12px; padding: 14px; }
.share p { margin: 0 0 8px; font-weight: 600; font-size: 15px; }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; font: 14px var(--sans); background: #fff; color: var(--ink-2); }
.board ol { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.board li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 15px; counter-increment: rank; }
.board li::before { content: counter(rank) "."; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 2ch; }
.board li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li b { font-variant-numeric: tabular-nums; }
.board .primary { margin-top: 1.2rem; }
.signin { margin-top: 2.5rem; font-size: 13.5px; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) {
  .card.enter { animation: none; }
  .lane .machine, .confidence .meter i, .bar .track i, .play .item, .play .scales { transition: none; }
}
