:root {
  --ink: #111827; --muted: #657184; --paper: #fff; --wash: #f2f6f8;
  --line: #d9e2e8; --blue: #1556d8; --green: #087a62; --gold: #c18a2e;
  --red: #c83346; --navy: #101b2d; --night: #08111f; --shadow: 0 18px 48px rgba(12,28,52,.1);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--wash); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px clamp(18px,4vw,58px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; white-space: nowrap; }
.mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 7px; background: var(--navy); color: #fff; font-weight: 950; }
.mode-tabs { display: flex; gap: 3px; padding: 3px; border-radius: 8px; background: #edf2f5; }
.tab { border: 0; border-radius: 6px; padding: 8px 14px; background: transparent; color: var(--muted); font-weight: 850; }
.tab.active { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.toolbar, .solo-controls, .inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
select, .icon-btn { border: 1px solid var(--line); border-radius: 7px; padding: 9px 10px; background: #fff; }
.icon-btn { width: 40px; min-height: 40px; color: var(--navy); font-size: 22px; font-weight: 950; }
main { min-height: calc(100vh - 130px); padding: clamp(22px,4vw,54px) clamp(18px,5vw,76px); }
.intro { display: grid; grid-template-columns: minmax(0,1fr) minmax(290px,420px); gap: 24px; align-items: end; padding-bottom: 28px; }
.eyebrow, .kicker { color: var(--green); font-size: 12px; font-weight: 950; letter-spacing: 1.8px; }
h1 { margin: 8px 0 0; font-size: clamp(39px,5.4vw,72px); line-height: 1.03; letter-spacing: 0; }
h1 em { color: var(--green); font-family: Georgia, serif; font-weight: 500; }
h2 { margin: 3px 0 0; font-size: clamp(28px,4vw,42px); letter-spacing: 0; }
h3 { margin: 0; font-size: 21px; letter-spacing: 0; }
.intro-side p, .arena-head p { margin: 12px 0 0; color: var(--muted); line-height: 1.7; }
.voice-badge { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #c9e6db; border-radius: 999px; padding: 7px 10px; background: #effaf6; color: var(--green); font-size: 13px; font-weight: 850; }
.voice-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(8,122,98,.14); }
.section-bar, .arena-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; padding: 17px 0; border-top: 1px solid var(--line); }
.trainer { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(290px,.75fr); gap: 16px; }
.panel { border: 1px solid var(--line); border-radius: 8px; padding: 20px; background: var(--paper); box-shadow: 0 7px 24px rgba(17,29,49,.05); }
.word-panel { min-height: 465px; }
.word-meta, .panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 800; }
.tag { display: inline-flex; border-radius: 999px; padding: 6px 10px; background: #e9f7f3; color: var(--green); }
.speaker { width: 100%; min-height: 118px; display: grid; place-items: center; gap: 2px; margin: 18px 0; border: 0; border-radius: 8px; background: var(--navy); color: #fff; transition: transform .15s, background .15s; }
.speaker:hover, .contest-speaker:hover { background: #182c4b; transform: translateY(-2px); }
.speaker-icon { color: #8bd9c7; font-size: 49px; line-height: 1; font-weight: 950; letter-spacing: -5px; }
.speaker-caption { color: #cbd6e7; font-size: 13px; font-weight: 800; }
.definition { min-height: 31px; color: var(--ink); font-size: 17px; line-height: 1.6; }
.hint { min-height: 27px; color: #9a670e; font-weight: 800; }
.answer-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 13px; background: #fff; outline: 0; }
input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,86,216,.1); }
.btn { border: 0; border-radius: 7px; padding: 11px 14px; font-weight: 900; }
.primary { background: var(--blue); color: #fff; }
.quiet { border: 1px solid var(--line); background: #fff; color: var(--navy); }
.inline-actions { margin-top: 13px; }
.feedback { min-height: 28px; font-weight: 900; }
.feedback.ok { color: var(--green); } .feedback.no { color: var(--red); }
.solo-aside { display: grid; gap: 16px; align-content: start; }
.score-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.score-grid div { min-height: 98px; display: grid; place-items: center; align-content: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.score-grid strong { font-size: 28px; } .score-grid span { color: var(--muted); font-size: 12px; font-weight: 800; }
.miss-list { display: grid; gap: 7px; margin-top: 13px; }
.miss { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #fbfdff; }
.miss span { color: var(--muted); font-size: 12px; }
.miss button { border: 0; border-radius: 6px; padding: 7px 9px; background: #edf3fa; color: var(--blue); font-weight: 900; }
.mastery { margin-top: 16px; }
.progress-grid { display: grid; grid-template-columns: repeat(10,minmax(0,1fr)); gap: 7px; margin-top: 13px; }
.tile { min-height: 63px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.tile.ok { border-color: #bde1d5; background: #f0fbf7; } .tile.no { border-color: #edc5ca; background: #fff5f6; }
.tile strong, .tile span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.gold { color: var(--gold); }
#contestView { margin: 0 calc(-1 * clamp(18px,5vw,76px)); padding: 25px clamp(18px,5vw,76px) 54px; background: var(--night); color: #f4f8ff; }
.arena-head { border-color: rgba(255,255,255,.13); }
.arena-status { text-align: right; } .arena-status span { display: block; color: #91a3bc; font-weight: 800; } .arena-status strong { display: block; margin-top: 5px; color: var(--gold); font-size: 23px; }
.round-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin: 12px 0 18px; }
.round-card { padding: 12px; border: 1px solid rgba(255,255,255,.13); border-radius: 7px; color: #8fa0b7; }
.round-card.active { border-color: var(--gold); background: rgba(193,138,46,.11); color: #fff; }
.round-card b { display: block; color: var(--gold); font-size: 12px; } .round-card span { display: block; margin-top: 4px; font-size: 13px; }
.contest-setup { display: grid; grid-template-columns: minmax(0,1fr) minmax(360px,.8fr); gap: 15px; }
.contest-setup .panel, .result-panel { background: #111d30; border-color: rgba(255,255,255,.13); color: #fff; box-shadow: none; }
.contest-setup textarea { margin-top: 14px; min-height: 260px; resize: vertical; border-color: #304058; background: #0c1728; color: #e9f1ff; line-height: 1.55; }
.rule-list { display: grid; gap: 8px; margin: 17px 0; }
.rule-list div { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 8px; padding: 11px; border: 1px solid rgba(255,255,255,.1); border-radius: 7px; }
.rule-list b { color: var(--gold); font-size: 20px; } .rule-list span { color: #b4c2d4; } .rule-list strong { font-size: 13px; }
.launch { background: var(--gold); color: #fff; }
.live-grid { display: grid; grid-template-columns: minmax(0,1.28fr) minmax(330px,.72fr); gap: 14px; }
.stage { min-height: 570px; display: grid; place-items: center; align-content: center; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 22px; background: radial-gradient(circle at 50% 30%,#182c48,#0b1627 63%); box-shadow: 0 20px 55px rgba(0,0,0,.28); }
.stage-top { width: 100%; display: flex; justify-content: space-between; color: #aebed0; font-weight: 800; }
.live-dot { color: #ff6672; font-size: 12px; font-weight: 950; letter-spacing: 2px; }
.player-name { margin-top: 19px; color: #fff; font-size: clamp(38px,5vw,68px); font-weight: 950; text-align: center; }
.timer { margin-top: 4px; color: #fff; font-size: clamp(68px,9vw,126px); font-weight: 950; font-variant-numeric: tabular-nums; line-height: 1; }
.timer.warning { color: #ffbd5a; } .timer.danger { color: #ff6474; }
.timer-track { width: min(100%,580px); height: 5px; margin: 14px 0 23px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.16); }
.timer-track i { display: block; width: 100%; height: 100%; background: var(--gold); transition: width .25s linear; }
.contest-speaker { width: min(100%,400px); min-height: 108px; display: grid; place-items: center; gap: 4px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; background: #11243f; color: #fff; transition: .15s; }
.contest-speaker span { color: #8bd9c7; font-size: 45px; font-weight: 950; letter-spacing: -5px; }
.contest-speaker small { color: #afbed2; font-weight: 800; }
.contest-speaker:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.host-controls { display: grid; grid-template-columns: repeat(2,minmax(0,180px)); gap: 9px; margin-top: 22px; }
.judge { min-height: 56px; border: 0; border-radius: 7px; color: #fff; font-size: 18px; font-weight: 950; }
.correct { background: var(--green); } .wrong { background: var(--red); }
.end-turn { margin-top: 14px; border: 0; background: transparent; color: #b4c2d4; font-weight: 800; text-decoration: underline; }
.leaderboard { border: 1px solid rgba(255,255,255,.13); border-radius: 8px; padding: 16px; background: #101d30; }
.rank { display: grid; grid-template-columns: 35px 1fr auto; gap: 8px; align-items: center; padding: 10px 3px; border-bottom: 1px solid rgba(255,255,255,.09); }
.rank b { color: var(--gold); } .rank span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rank strong { color: #8bd9c7; }
.rank.out strong { color: #77879a; }
.result-panel { margin-top: 15px; text-align: center; }
.result-panel p { color: #b4c2d4; }.result-board { max-width: 720px; display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin: 19px auto; }
.result-name { padding: 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; background: rgba(255,255,255,.04); }
.podium-wrap { padding: 38px 0; text-align: center; }.podium { display: flex; justify-content: center; align-items: end; gap: 10px; min-height: 290px; margin: 24px auto; }
.podium-place { width: min(29vw,220px); display: grid; place-items: center; align-content: end; padding: 18px 10px; border-radius: 8px 8px 0 0; background: #142641; }
.podium-place.first { min-height: 260px; background: #72501d; order: 2; }.podium-place.second { min-height: 205px; order: 1; }.podium-place.third { min-height: 165px; order: 3; }
.podium-place b { color: var(--gold); font-size: 31px; }.podium-place strong { margin-top: 8px; color: #fff; font-size: 20px; }
.footer { display: flex; justify-content: space-between; gap: 14px; padding: 24px clamp(18px,5vw,76px); background: var(--navy); color: #cad6e7; }.footer a { color: #fff; }
@media (max-width: 980px) {
  .topbar { flex-wrap: wrap; }.intro,.trainer,.contest-setup,.live-grid { grid-template-columns: 1fr; }.progress-grid { grid-template-columns: repeat(5,1fr); }
}
@media (max-width: 600px) {
  .intro { grid-template-columns: 1fr; }.topbar,.footer { align-items: flex-start; }.mode-tabs { order: 3; width: 100%; }.tab { flex: 1; }
  .round-strip { grid-template-columns: repeat(2,1fr); }.answer-row { grid-template-columns: 1fr; }.score-grid { gap: 5px; }.score-grid div { min-height: 82px; }
  .progress-grid { grid-template-columns: repeat(2,1fr); }.result-board { grid-template-columns: repeat(2,1fr); }.rule-list div { grid-template-columns: 30px 1fr; }.rule-list strong { grid-column: 2; }
}
