/* 舊版（自由輸入）專用樣式；共用 token 與元件在 /static/shared/tokens.css */
:root {
  --bar-h: 136px;
  --toast-offset: calc(var(--bar-h) + 12px);
}

main { padding: 6px 16px calc(var(--bar-h) + env(safe-area-inset-bottom) + 16px); max-width: 720px; margin: 0 auto; }

/* ── 舞台 ─────────────────────────────── */
#stage { display: block; width: 100%; height: min(50vh, 400px); touch-action: none; }
.stage-caption { position: absolute; left: 16px; top: 14px; right: 16px; pointer-events: none; }
.seg-title { font-weight: 800; font-size: 17px; }
.seg-command { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.stage-controls { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; align-items: center; }

/* ── 段落列 ───────────────────────────── */
.turn-strip { display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 6px; scrollbar-width: none; }
.turn-strip::-webkit-scrollbar { display: none; }
.turn-chip { flex: none; display: flex; align-items: center; gap: 6px; border: 0; background: var(--surface-1); box-shadow: var(--shadow); border-radius: 999px; padding: 7px 14px; font-size: 13px; max-width: 180px; }
.turn-chip span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.turn-chip[aria-current="true"] { background: var(--pink); color: #fff; }
.turn-chip .n { opacity: 0.7; font-variant-numeric: tabular-nums; }

/* ── 判定卡 ───────────────────────────── */
.result .reply { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.result .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--pink-soft); display: grid; place-items: center; flex: none; font-size: 20px; }
.result .bubble { background: var(--lavender-soft); padding: 9px 14px; border-radius: 6px 18px 18px 18px; font-size: 14px; font-weight: 600; }
.result .caption { font-size: 12px; color: var(--text-muted); margin-top: 5px; padding-left: 4px; }
.result .fallback { font-size: 12px; color: #a26a00; background: var(--sunny-soft); border-radius: 10px; padding: 6px 10px; margin: -2px 0 12px; }
.targets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.target { display: grid; grid-template-columns: auto 1fr auto; gap: 3px 10px; align-items: center; padding: 12px; border-radius: 16px; background: var(--surface-2); cursor: pointer; }
.target .badge { grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff; }
.target.hit .badge { background: var(--good); }
.target.partial .badge { background: var(--warning); color: #0b0b0b; }
.target.miss .badge { background: var(--critical); }
.target .what { font-weight: 700; font-size: 14px; }
.target .pts { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--pink); }
.target.miss .pts { color: var(--text-muted); }
.target .detail { grid-column: 2 / 4; font-size: 12px; color: var(--text-secondary); }
.target .why { grid-column: 2 / 4; font-size: 12px; color: var(--text-muted); }
.result-total { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 14px; color: var(--text-secondary); }
.result-total strong { color: var(--pink); font-size: 20px; }

/* ── 指令列 ───────────────────────────── */
.command-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  padding: 10px 12px calc(env(safe-area-inset-bottom) + 12px);
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(12px);
  border-radius: 26px 26px 0 0; box-shadow: 0 -6px 24px rgba(232, 128, 168, 0.12);
}
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; max-width: 720px; margin: 0 auto; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 0; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--text-secondary); background: var(--surface-2); }
.chips button:nth-child(3n + 2) { background: var(--lavender-soft); }
.chips button:nth-child(3n) { background: var(--sunny-soft); }
.cmd-row { display: flex; gap: 8px; max-width: 720px; margin: 0 auto; height: 48px; }
.cmd-row .icon-btn { height: 48px; width: 48px; font-size: 20px; box-shadow: none; background: var(--surface-2); }
#cmdInput { flex: 1; min-width: 0; border-radius: 999px; border: 2px solid var(--border); background: #fff; color: var(--text-primary); padding: 0 18px; font-size: 16px; }
#cmdInput::placeholder { color: var(--text-muted); }
#cmdInput:focus { outline: none; border-color: var(--pink); }
