:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --bg: #0a101d;
  --surface: #101725;
  --surface-raised: #172232;
  --line: #273344;
  --text: #f1f0ed;
  --muted: #a4adbd;
  --subtle: #718097;
  --gold: #e7bb69;
  --player-one: #b78526;
  --player-two: #0a8da6;
  --player-three: #9365d0;
  --player-four: #bc5264;
  --success: #9bd5b5;
  --error: #f4aaa5;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100dvh; }
button, input, select, textarea { font: inherit; }
input, select, textarea { color: var(--text); background: #101927; border: 1px solid #3c4d65; border-radius: 7px; padding: 10px 12px; min-width: 0; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: #8090a7; }
select { cursor: pointer; }
textarea { resize: vertical; width: 100%; line-height: 1.8; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.local-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #9bd5b5; margin-right: 8px; }
.nav-active { color: var(--gold); }
.home-actions { display: flex; align-items: center; gap: 22px; }
button { color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
button, a { touch-action: manipulation; }
button:focus-visible, summary:focus-visible { outline: 2px solid #f2d397; outline-offset: 5px; }
h1:focus { outline: none; }
button svg { flex-shrink: 0; }
button { border: none; }
[hidden] { display: none !important; }
::selection { background: #70572b; color: white; }
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 73% 22%, #26304270 0, transparent 42%), radial-gradient(ellipse at 9% 93%, #16314940 0, transparent 40%); }
.ambient::after { content: ""; position: absolute; inset: 0; opacity: .22; background-image: radial-gradient(#b5bbca .6px, transparent .7px); background-size: 61px 73px; mask-image: linear-gradient(transparent, #000 30%, transparent); }
#app { min-height: 100dvh; display: flex; flex-direction: column; }
.site-header { width: calc(100% - 96px); max-width: 1456px; min-height: 92px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #28334485; gap: 24px; }
.brand { background: transparent; display: flex; align-items: center; gap: 12px; text-align: left; padding: 0; }
.brand > svg { color: var(--gold); }
.brand > span { font-size: 18px; font-weight: 650; letter-spacing: 3px; }
.brand small { display: block; font-size: 8px; font-weight: 500; letter-spacing: 3.7px; color: var(--muted); margin-top: 5px; }
.header-tag { color: var(--subtle); font-size: 12px; letter-spacing: 2px; margin-left: 65px; }
.header-actions { display: flex; align-items: center; gap: 15px; }
.text-button { background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 5px; font-size: 13px; }
.text-button:hover { color: var(--text); }
.icon-button { background: #ffffff04; border: 1px solid #ffffff0f; color: #b9c1ce; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; font-size: 27px; }
.icon-button:hover { background: #ffffff0c; border-color: #ffffff25; color: white; }
.button { min-height: 47px; border-radius: 7px; padding: 12px 25px; display: inline-flex; justify-content: center; align-items: center; gap: 18px; font-size: 14px; font-weight: 650; transition: transform .15s, background .15s, box-shadow .15s; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button-gold { color: #302314; background: linear-gradient(110deg, #efd49a, #d9a950); border: 1px solid #f7d992; box-shadow: 0 5px 24px #cda35714, inset 0 1px #fff5; }
.button-gold:hover:not(:disabled) { box-shadow: 0 5px 28px #cda35735; }
.button-gold:disabled { color: #9e9483; border-color: #75644830; box-shadow: none; background: #4a4234; opacity: .7; }
.button-secondary { background: #172131; border: 1px solid #364357; color: #d6dce6; }
.button-secondary:hover { background: #202e42; }
.button-large { min-height: 58px; padding: 17px 31px; font-size: 16px; min-width: 221px; }
.eyebrow { color: var(--gold); font-size: 10px; letter-spacing: 3px; font-weight: 600; }
.tiny-star { font-size: 14px; padding-right: 7px; }
.home-page { width: calc(100% - 144px); max-width: 1360px; margin: auto; display: grid; grid-template-columns: 1fr 1.08fr; align-items: center; gap: 20px 40px; flex: 1; padding: 36px 0 22px; }
.home-copy { padding: 20px 0 20px 22px; z-index: 1; }
.home-copy h1 { font-family: "STSong", "Songti SC", "SimSun", serif; font-weight: 700; font-size: clamp(64px, 6.3vw, 96px); letter-spacing: 8px; margin: 23px 0 21px; white-space: nowrap; }
.home-copy h1 > span { background: linear-gradient(150deg, #ffecc5, #d5a451 65%, #ad7839); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-copy h1 small { font-family: "Microsoft YaHei", sans-serif; display: block; color: #d0d4dc; font-size: 19px; letter-spacing: 5px; font-weight: 400; margin-top: 21px; }
.home-description { line-height: 2; font-size: 14px; color: var(--muted); margin: 0 0 32px; letter-spacing: .5px; }
.home-facts { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 25px; color: #8996ab; font-size: 11px; }
.home-facts span { display: flex; align-items: center; gap: 7px; }
.home-facts i { width: 1px; height: 11px; background: #344056; }
.hero-showcase { position: relative; height: 505px; isolation: isolate; }
.orbit { position: absolute; border: 1px solid #aa865823; border-radius: 50%; top: 5%; left: 5%; width: 90%; height: 90%; transform: rotate(-22deg) scale(.82); }
.orbit-one::after { content: ""; position: absolute; width: 7px; height: 7px; background: #e8c077; border-radius: 50%; left: 8%; top: 20%; box-shadow: 0 0 20px #e8c077; }
.orbit-two { width: 90%; left: 3%; top: 15%; transform: rotate(28deg) scale(.78, .62); border-style: dashed; opacity: .45; }
.orbit-star { position: absolute; color: #bda476; font-size: 26px; }
.star-one { right: 3%; top: 24px; }
.star-two { left: -1%; bottom: 92px; font-size: 22px; }
.showcase-card { position: absolute; width: 235px; height: 352px; border-radius: 95px 95px 10px 10px; overflow: hidden; box-shadow: 0 25px 50px #0005; border: 1px solid #6e809268; background: #172334; top: 80px; }
.showcase-card .hero-art { width: 100%; height: 100%; object-fit: cover; }
.showcase-card::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 35px #03071055; border-radius: inherit; pointer-events: none; }
.showcase-card > div { position: absolute; inset: auto 0 0; padding: 58px 15px 24px; background: linear-gradient(transparent, #09121ceb 55%); text-align: center; }
.showcase-card small { font-size: 9px; color: #c3cfdf; letter-spacing: 4px; }
.showcase-card strong { display: block; font-family: "STSong", "Songti SC", serif; font-size: 33px; letter-spacing: 9px; margin: 7px 0; }
.showcase-card > div > span { color: #aeb8c7; font-size: 9px; letter-spacing: 2px; }
.showcase-left { left: 0; transform: rotate(-13deg) scale(.87); filter: brightness(.78); top: 76px; }
.showcase-right { right: -5px; transform: rotate(13deg) scale(.87); filter: brightness(.8); top: 76px; }
.showcase-center { left: calc(50% - 118px); z-index: 2; top: 37px; height: 405px; border-color: #c5a46b; box-shadow: 0 30px 90px #0008, 0 0 70px #8aaeca12; }
.showcase-center .hero-art { height: 335px; margin-top: 15px; }
.featured-label { position: absolute; top: 25px; left: 0; right: 0; width: max-content; max-width: calc(100% - 24px); margin: 0 auto; padding: 5px 8px; border-radius: 4px; background: #0b1323d9; text-align: center; font-size: 7px; letter-spacing: 2.1px; color: #f1e5cb; }
.showcase-caption { position: absolute; bottom: 7px; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 16px; color: #8995a9; font-size: 10px; letter-spacing: 2px; }
.showcase-caption > span { height: 1px; width: 30px; background: #47526a; }
.how-it-works { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #2b354387; border-radius: 10px; margin-top: 6px; background: #111a2555; }
.how-it-works > button { padding: 23px 30px; display: flex; align-items: center; gap: 22px; position: relative; background: none; text-align: left; }
.how-it-works > button:hover { background: #ffffff04; }
.how-it-works > button > svg { margin-left: auto; color: #77879e; }
.how-it-works > button + button::before { content: ""; width: 1px; height: 30px; background: #2d3748; position: absolute; left: 0; }
.step-number { font-family: Georgia, serif; color: #b59563; font-size: 27px; opacity: .75; }
.how-it-works p { margin: 0; }
.how-it-works strong { font-size: 13px; font-weight: 500; letter-spacing: 1px; }
.how-it-works small { display: block; color: #7e8ba0; font-size: 11px; margin-top: 7px; }
.site-footer { width: calc(100% - 144px); max-width: 1360px; display: flex; justify-content: space-between; margin: 5px auto 23px; font-size: 10px; color: #68778d; letter-spacing: 1px; }
.setup-page, .results-page { width: calc(100% - 112px); max-width: 1420px; margin: 0 auto; padding: 31px 0 28px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; }
.page-heading h1 { font-size: 34px; font-weight: 550; letter-spacing: 3px; margin: 12px 0 9px; }
.page-heading h1 span { color: var(--gold); }
.page-heading p, .result-heading p { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 0; }
.back-link { align-self: center; }
.lesson-settings { display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(160px,.7fr) minmax(120px,.55fr) minmax(290px,1.4fr); gap: 22px; background: #111c2b; border: 1px solid #2d3b50; border-radius: 10px; margin: 25px 0 22px; padding: 20px; }
.setting-block { display: flex; flex-direction: column; gap: 10px; }
.setting-block > label, .field-label { color: #b6c0ce; font-size: 11px; letter-spacing: .5px; }
.setting-inline { display: flex; align-items: stretch; gap: 6px; }
.setting-inline select { flex: 1; width: 0; }
.setting-inline .icon-button { height: 42px; }
.setting-block select { font-size: 12px; min-height: 42px; }
.segmented { display: flex; border: 1px solid #3a4a62; border-radius: 7px; background: #0d1523; padding: 3px; gap: 3px; }
.segmented button { border-radius: 4px; padding: 8px 12px; font-size: 12px; color: #aab7ca; background: none; flex: 1; white-space: nowrap; }
.segmented button.active { color: #f0ddae; background: #3c3429; box-shadow: inset 0 0 0 1px #8a704855; }
.mode-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.mode-buttons button { text-align: left; background: #131f30; border: 1px solid #35465d; border-radius: 7px; padding: 9px 11px; }
.mode-buttons strong { display: block; font-size: 12px; font-weight: 550; }
.mode-buttons small { display: block; font-size: 9px; color: #a3b1c6; margin-top: 5px; line-height: 1.5; }
.mode-buttons button.active { border-color: #b28c48; background: #a17a2312; }
.mode-buttons button.active strong { color: #efce8f; }
.selection-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.selection-toolbar > span { display: flex; align-items: center; gap: 9px; }
.selection-toolbar strong { font-size: 14px; font-weight: 550; }
.selection-toolbar small { font-size: 10px; color: #8c9cb3; margin-left: 6px; }
.selection-toolbar > span > svg { color: #d1ac6c; }
.player-name-input { width: 145px; font-size: 14px; font-weight: 550; padding: 4px 5px; margin-left: -5px; background: none; border-color: transparent; }
.player-name-input:hover, .player-name-input:focus { border-color: #52637d; }
.touch-notice { color: #92a2b8; font-size: 10px; line-height: 1.7; margin-top: 18px; text-align: center; }
.player-3 { --player: var(--player-four); }
.player-0 { --player: var(--player-one); }
.player-1 { --player: var(--player-two); }
.player-2 { --player: var(--player-three); }
.player-selection { display: grid; grid-template-columns: repeat(var(--players, 3), minmax(0, 1fr)); gap: 20px; }
.selection-panel { background: linear-gradient(145deg, #17213190, #10172590); border: 1px solid #2a3547; border-radius: 11px; padding: 17px; position: relative; }
.selection-panel::before { content: ""; position: absolute; left: 20px; right: 20px; top: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--player), transparent); }
.selection-heading { display: flex; align-items: center; gap: 11px; margin: 0 1px 17px; }
.player-number { width: 35px; height: 35px; display: grid; place-items: center; background: color-mix(in srgb, var(--player) 15%, transparent); border: 1px solid color-mix(in srgb, var(--player) 45%, transparent); border-radius: 8px; font-size: 13px; color: #e2e6ec; }
.selection-heading h2 { font-size: 13px; font-weight: 550; margin: 0; letter-spacing: 1px; }
.selected-hero-name { font-size: 10px; color: #7f8fa6; margin: 4px 0 0; }
.ready-label { margin-left: auto; color: #8490a3; font-size: 9px; border: 1px solid #324057; border-radius: 4px; padding: 4px 7px; }
.ready-label.is-ready { color: #d5e2d8; border-color: #547c6770; background: #5b9e7520; }
.hero-art { display: block; object-fit: cover; }
.hero-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hero-choice { aspect-ratio: .94; position: relative; border-radius: 7px; border: 1px solid #334056; background: #172337; padding: 0; overflow: hidden; transition: border-color .15s, transform .15s; }
.hero-choice:hover:not(:disabled):not(.selected) { border-color: #9ba8ba; transform: translateY(-2px); }
.hero-choice.is-taken { cursor: not-allowed; }
.hero-choice.is-taken .hero-art { filter: grayscale(1) brightness(.42); }
.hero-taken { position: absolute; inset: 12px 5px auto; padding: 5px; border-radius: 4px; color: #edf1f7; background: #0b1323ed; font-size: 11px; text-align: center; }
.hero-choice.selected { border: 2px solid var(--player); box-shadow: 0 0 18px color-mix(in srgb, var(--player) 22%, transparent); }
.hero-choice .hero-art { width: 100%; height: 100%; display: block; object-fit: cover; }
.hero-choice-caption { position: absolute; bottom: 0; left: 0; right: 0; text-align: left; padding: 22px 9px 9px; background: linear-gradient(transparent, #09111cf5 65%); }
.hero-choice-caption strong { display: block; font-size: 13px; font-weight: 500; letter-spacing: 2px; }
.hero-choice-caption small { display: block; color: #9ba9bb; font-size: 8px; margin-top: 3px; }
.hero-check { display: none; position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%; background: var(--player); align-items: center; justify-content: center; color: white; }
.hero-choice.selected .hero-check { display: flex; }
.start-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; padding: 0 2px; }
.start-bar p { display: flex; align-items: center; gap: 10px; color: #9ba8ba; font-size: 11px; }
.start-bar p svg { color: #a99572; }
.start-button { min-width: 252px; }
body[data-view="game"] #app { height: 100dvh; min-height: 610px; }
body[data-view="game"] .site-header { min-height: 78px; flex: 0 0 78px; }
.match-clock { position: relative; display: flex; align-items: center; gap: 10px; padding-bottom: 8px; }
.live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.clock-label { color: #a9b2c3; font-size: 11px; }
.match-clock > strong { font-size: 30px; font-weight: 600; margin-left: 12px; }
.clock-unit { color: #a1aabd; font-size: 10px; }
#time-progress { appearance: none; width: 100%; height: 3px; position: absolute; bottom: 0; left: 0; border: none; border-radius: 4px; overflow: hidden; background: #554629; }
#time-progress::-webkit-progress-bar { background: #554629; }
#time-progress::-webkit-progress-value { background: var(--gold); border-radius: 4px; transition: width .1s linear; }
#time-progress::-moz-progress-bar { background: var(--gold); }
.time-low strong { color: var(--error); }
.time-low #time-progress::-webkit-progress-value { background: var(--error); }
.game-page { width: calc(100% - 80px); max-width: 1490px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 0 0 15px; }
.arena-intro { display: flex; justify-content: space-between; align-items: center; min-height: 62px; gap: 10px; color: #929fb3; font-size: 11px; }
.arena-intro > span:first-child { color: #c1c9d6; display: flex; gap: 12px; align-items: center; }
.arena-intro i { display: block; width: 3px; height: 3px; border-radius: 50%; background: #65748b; }
.arena-intro p { color: #718098; font-size: 11px; }
.arena-badge { border: 1px solid #2e3b4e; border-radius: 5px; padding: 5px 8px; }
.arena-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--players, 3), minmax(0, 1fr)); gap: 21px; }
.arena-panel { background: linear-gradient(160deg, color-mix(in srgb, var(--player) 5%, #111a28), #101725); border: 1px solid #2a3649; border-top: 2px solid var(--player); border-radius: 10px; padding: 17px; display: flex; flex-direction: column; min-height: 0; }
.arena-player { display: flex; align-items: center; gap: 10px; }
.avatar { width: 43px; height: 43px; border-radius: 9px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--player) 70%, transparent); flex-shrink: 0; background: #1b2638; }
.avatar .hero-art { width: 100%; height: 100%; }
.arena-player h2 { font-size: 14px; font-weight: 550; margin: 0; }
.arena-player h2 span { font-size: 8px; font-weight: 400; border: 1px solid #455068; border-radius: 3px; color: #8e9cb2; margin-left: 8px; padding: 1px 3px; }
.arena-player p { color: #7f90a7; font-size: 9px; margin: 5px 0 0; }
.score-box { margin-left: auto; text-align: right; padding-right: 1px; }
.score-box strong { display: block; font-size: 26px; font-weight: 500; line-height: 1; }
.score-box small { font-size: 8px; color: #8d9bb0; letter-spacing: 2px; }
.pair-progress { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 17px 0 13px; font-size: 9px; color: #98a7ba; }
.progress-pips { display: flex; gap: 4px; }
.progress-pips i { width: 15px; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--player) 20%, #1a2332); }
.progress-pips i.filled { background: var(--player); }
.word-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr)); gap: 10px; flex: 1; min-height: 0; }
.word-card { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 17px 8px 7px; min-height: 0; border-radius: 7px; background: linear-gradient(150deg, #26364b, #1c293d); border: 1px solid #465674; box-shadow: inset 0 1px #8ca6cb0d, 0 3px 6px #0001; touch-action: none; user-select: none; -webkit-user-select: none; transition: background .12s, border-color .12s; }
.word-card:hover:not(:disabled) { border-color: #859ab7; background: linear-gradient(145deg, #30435d, #24334b); }
.word-card strong { display: block; font-size: clamp(13px, 1.45vw, 23px); font-weight: 550; overflow-wrap: anywhere; line-height: 1.25; }
.word-card strong[lang="zh-CN"] { font-size: clamp(14px, 1.45vw, 24px); letter-spacing: 1px; }
.word-meta { position: absolute; inset: 6px 8px auto; display: flex; justify-content: space-between; align-items: center; font-size: 6px; color: #93a6bd; letter-spacing: 1px; height: 9px; }
.matched-check { display: none; }
.word-card.is-selected { border: 2px solid var(--player); background: color-mix(in srgb, var(--player) 22%, #192639); box-shadow: 0 0 12px color-mix(in srgb, var(--player) 24%, transparent); }
.word-card.is-matched { border-color: #2b384b; background: #162031; box-shadow: none; color: #8391a6; cursor: default; }
.word-card.is-matched .word-meta { color: #8391a6; }
.word-card.is-matched .matched-check { display: inline-flex; }
.word-card.is-matched strong { opacity: .65; }
.word-card.is-wrong { border-color: var(--error); animation: wrong-shake .22s linear; }
.player-feedback { flex: 0 0 13px; font-size: 9px; text-align: center; color: #9facbf; margin: 13px 0 0; min-height: 13px; }
.arena-footer { display: flex; justify-content: space-between; color: #748299; font-size: 9px; margin-top: 14px; padding: 0 3px; }
.countdown-overlay { position: fixed; inset: 78px 0 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #070d17d1; backdrop-filter: blur(9px); color: #d4d8e2; font-size: 13px; letter-spacing: 3px; }
.countdown-eyebrow { color: var(--gold); font-size: 11px; letter-spacing: 6px; }
.countdown-overlay strong { font-size: 144px; font-family: Georgia, serif; font-weight: 400; color: #edcf94; text-shadow: 0 0 90px #c69d4050; line-height: 1.3; }
.countdown-overlay > div { margin-top: 28px; border-top: 1px solid #6d5b3e; padding-top: 20px; font-size: 10px; color: #8b98ac; }
.results-page { max-width: 1090px; padding-top: 27px; }
.result-heading { text-align: center; }
.trophy { width: 58px; height: 58px; display: flex; margin: 0 auto 14px; justify-content: center; align-items: center; border: 1px solid #ac8b5050; background: radial-gradient(#d7a95820, #d7a95800); border-radius: 50%; color: var(--gold); }
.result-heading h1 { font-size: 29px; font-weight: 500; letter-spacing: 2px; margin: 11px 0; }
.results-grid { display: grid; grid-template-columns: repeat(var(--players, 3), minmax(0, 1fr)); gap: 20px; margin: 25px auto; max-width: 895px; }
.result-card { position: relative; text-align: center; border: 1px solid #334057; background: #111b2a; border-radius: 11px; overflow: hidden; padding-bottom: 17px; }
.result-card.winner { border-color: #b88e44; box-shadow: 0 0 30px #d1a8520c; }
.result-rank { display: flex; justify-content: space-between; align-items: center; gap: 5px; position: absolute; top: 13px; left: 14px; right: 14px; z-index: 1; font-size: 9px; color: #f1e5cb; background: #0b1323d9; padding: 5px 7px; border-radius: 5px; }
.result-rank > span:first-child { font-size: 13px; letter-spacing: 1px; }
.result-rank svg { margin-left: auto; }
.result-portrait { height: 174px; overflow: hidden; mask-image: linear-gradient(#000 75%, transparent); }
.result-portrait .hero-art { width: 100%; height: 100%; }
.result-player h2 { font-size: 16px; letter-spacing: 2px; font-weight: 500; margin: 4px 0 5px; }
.result-player span { color: #92a1b7; font-size: 9px; }
.result-score { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 14px; }
.result-score strong { font-size: 37px; font-weight: 500; }
.result-score span { color: #a3afc2; font-size: 10px; }
.result-card > p { color: #a9b6c9; font-size: 11px; margin: 14px 0 0; }
.result-card > p strong { color: #efd3a0; font-weight: 500; }
.result-details { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0 12px; margin: 15px 0 0; gap: 5px; }
.result-details dt { font-size: 10px; color: #9dacc2; }
.result-details dd { font-size: 12px; color: #e6ebf4; margin: 6px 0 0; }
.results-footnote { text-align: center; color: #92a1b7; font-size: 11px; line-height: 1.8; margin: 20px auto; max-width: 760px; }
.review-section { margin: 30px auto 0; padding: 24px; border: 1px solid #2b3a51; background: #101927; border-radius: 11px; }
.review-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.review-toolbar h2 { font-size: 19px; font-weight: 550; margin: 10px 0 0; }
.review-toolbar .button { min-height: 38px; font-size: 11px; padding: 9px 12px; }
.review-filters { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin: 20px 0; }
.review-filters .segmented button { font-size: 11px; }
.checkbox-label { color: #b8c3d4; font-size: 11px; display: flex; gap: 7px; align-items: center; }
.checkbox-label input { accent-color: #d4ac68; width: 15px; height: 15px; }
.review-table { border-collapse: collapse; width: 100%; text-align: left; font-size: 12px; }
.review-table th { font-size: 10px; font-weight: 400; color: #a7b4c8; padding: 12px; border-bottom: 1px solid #3c4a61; }
.review-table td { padding: 14px 12px; color: #cad3e1; border-bottom: 1px solid #28354b; overflow-wrap: anywhere; }
.review-table td:first-child { color: #eff3fa; font-weight: 550; }
.review-error { color: #f4aaa5; }
.history-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-top: 24px; }
.history-filter label { display: flex; flex: 1 1 140px; max-width: 180px; min-width: 0; flex-direction: column; gap: 8px; color: var(--muted); font-size: 12px; }
.history-filter input, .history-filter select { width: 100%; }
.history-filter .button { min-height: 41px; }
.history-presets { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.history-presets .segmented { flex-wrap: wrap; max-width: 100%; }
.history-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 22px; }
#hero-usage .review-table-wrap, .history-match .review-table-wrap { overflow-x: auto; }
.hero-stats-table { min-width: 550px; }
.history-hero { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.history-hero .hero-art { width: 34px; height: 34px; border-radius: 6px; }
.history-match { border-top: 1px solid #2b3a51; margin-top: 12px; padding: 14px 0; }
.history-match summary { cursor: pointer; font-size: 12px; line-height: 2; }
.history-match summary span { display: inline-block; margin-left: 18px; color: #aab8cb; }
.history-match .review-table { min-width: 420px; }
.empty-state { text-align: center; color: #a8b6cb; font-size: 12px; padding: 20px 10px; line-height: 1.8; }
.result-actions { display: flex; justify-content: center; gap: 14px; }
.result-actions .button { min-width: 180px; }
.pause-overlay { position: fixed; inset: 78px 0 0; z-index: 6; background: #07101ce8; backdrop-filter: blur(12px); display: grid; place-items: center; }
.pause-card { text-align: center; max-width: 470px; padding: 25px; }
.pause-symbol { display: flex; justify-content: center; color: #e4c184; margin-bottom: 25px; }
.pause-card h2 { font-size: 34px; font-weight: 500; margin: 17px 0; }
.pause-card > p { color: #afbdd0; font-size: 13px; line-height: 1.8; }
.pause-card > .button { margin: 14px 0 20px; min-width: 190px; }
.pause-card > div { display: flex; justify-content: center; gap: 25px; }
.help-steps { padding-left: 24px; font-size: 13px; }
.help-steps li { padding-left: 7px; margin: 20px 0; }
.help-steps strong { color: #e8d4ac; font-weight: 550; }
.help-steps p, .help-note { color: #aab9cf; font-size: 12px; line-height: 1.8; margin: 6px 0; }
.help-note { padding: 15px; border: 1px solid #394b65; border-radius: 6px; }
#confirm-dialog h2 { font-size: 24px; font-weight: 550; }
.paste-options { display: flex; gap: 13px; align-items: center; font-size: 12px; color: #acbad0; margin-top: 16px; }
.paste-options select { flex: 1; font-size: 12px; }
.loading-state { margin: auto; width: min(90%, 600px); text-align: center; padding: 70px 20px; line-height: 1.9; color: #a7b5c8; }
.loading-state h1 { font-size: 28px; color: var(--text); }
.loading-sigil { font-size: 70px; color: var(--gold); }
dialog { background: #131d2d; color: var(--text); width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); border: 1px solid #435069; padding: 28px; border-radius: 13px; box-shadow: 0 25px 120px #0008; }
dialog::backdrop { background: #030710c9; backdrop-filter: blur(6px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.dialog-head h2 { margin: 11px 0 10px; font-weight: 500; font-size: 25px; }
.muted { color: #9cabc0; line-height: 1.8; font-size: 12px; }
.library-page { width: calc(100% - 96px); max-width: 1400px; margin: 0 auto; padding: 31px 0; }
.library-layout { display: grid; grid-template-columns: 256px minmax(0, 1fr); gap: 25px; margin-top: 27px; align-items: start; }
.library-sidebar { background: #101a28; border: 1px solid #2e3c52; border-radius: 10px; padding: 16px; }
.library-sidebar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.library-sidebar-head h2 { font-size: 15px; font-weight: 500; margin: 0; }
.library-sidebar-head h2 span { color: #95a8c0; font-size: 11px; margin-left: 8px; }
.search-input { width: 100%; font-size: 11px; }
.library-list { display: flex; flex-direction: column; gap: 7px; margin: 14px 0; max-height: 440px; overflow: auto; }
.library-item { display: flex; align-items: center; gap: 11px; padding: 12px 9px; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 6px; }
.library-item > svg { color: #97a8bf; flex-shrink: 0; }
.library-item strong { display: block; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.library-item small { display: block; font-size: 9px; color: #a0afc5; margin-top: 5px; }
.library-item.active { border-color: #967644; background: #9a763517; }
.library-item.active > svg { color: #e5c58d; }
.library-item i { margin-left: auto; font-size: 9px; font-style: normal; color: #dac49f; white-space: nowrap; }
.library-backup { border-top: 1px solid #29394f; padding-top: 12px; }
.library-backup .text-button { justify-content: flex-start; font-size: 11px; }
.library-backup > p { color: #94a4bb; font-size: 10px; line-height: 1.9; margin: 10px 0 0; }
.library-editor { background: #111a29; border: 1px solid #2c3c54; border-radius: 10px; overflow: hidden; padding: 24px; }
.editor-topline { display: flex; justify-content: space-between; gap: 15px; color: #9cabbe; font-size: 10px; margin-bottom: 19px; }
.editor-badge { border: 1px solid #3b5068; border-radius: 4px; padding: 4px 8px; color: #c5d0df; }
#draft-status { padding: 5px 0; }
.editor-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.editor-fields label { display: flex; flex-direction: column; gap: 9px; font-size: 11px; color: #b0c0d5; }
.editor-fields input { font-size: 12px; }
.word-editor-toolbar { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin: 24px 0 13px; }
.word-editor-toolbar h2 { font-size: 14px; font-weight: 500; margin: 0; }
.word-editor-toolbar h2 span { font-size: 10px; color: #95a6bf; margin-left: 9px; }
.word-editor-toolbar > div { display: flex; gap: 13px; }
.word-editor-toolbar .text-button { font-size: 11px; }
.editor-table-wrap { max-height: 460px; overflow: auto; border: 1px solid #2d3d56; border-radius: 8px; }
.editor-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.editor-table thead { position: sticky; top: 0; background: #1b293c; z-index: 1; }
.editor-table th { color: #aabbd0; font-size: 10px; font-weight: 400; text-align: left; padding: 12px 9px; }
.editor-table th:first-child { width: 42px; }
.editor-table th:last-child { width: 42px; }
.editor-table td { border-top: 1px solid #24334a; padding: 5px 6px; font-size: 10px; color: #8b9eb7; }
.editor-table td:first-child { text-align: center; }
.editor-table input { width: 100%; background: transparent; border: 1px solid transparent; border-radius: 4px; font-size: 13px; padding: 9px 5px; }
.editor-table input:hover { border-color: #415771; }
.delete-word { display: grid; place-items: center; width: 27px; height: 32px; background: transparent; color: #8e9eb5; border-radius: 4px; }
.delete-word:hover { color: #f2b5b0; background: #bb54541b; }
.editor-footer { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-top: 20px; }
.editor-footer > span { font-size: 10px; color: #95a7be; }
.editor-footer > div { display: flex; gap: 10px; align-items: center; }
.editor-footer .button { font-size: 11px; padding: 10px 14px; min-height: 40px; gap: 7px; }
.danger-text { color: #e9a5a3; font-size: 11px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.dialog-note { color: #77879e; font-size: 10px; margin-top: 18px; line-height: 1.8; }
.form-error { font-size: 12px; color: var(--error); line-height: 1.8; }
.notice { position: fixed; bottom: 27px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px); z-index: 20; padding: 14px 22px; background: #263549; color: #e5ebf5; border: 1px solid #63758e; border-radius: 9px; box-shadow: 0 10px 50px #0005; font-size: 12px; text-align: center; }
@keyframes wrong-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
body[data-players="2"] .hero-choice { aspect-ratio: 1.7; }
body[data-players="4"] .selection-panel { padding: 12px; }
body[data-players="4"] .selection-heading { gap: 7px; }
body[data-players="4"] .player-name-input { width: 115px; }
body[data-players="4"] .ready-label { font-size: 8px; padding: 3px 5px; }
body[data-players="4"] .hero-taken { top: 4px; padding: 3px; font-size: 9px; }
body[data-players="4"] .arena-player { flex-wrap: wrap; gap: 7px; }
body[data-players="4"] .arena-panel { padding: 12px; }
body[data-players="4"] .arena-player h2 { font-size: 12px; }
body[data-players="4"] .arena-player p { font-size: 8px; }
body[data-players="4"] .arena-player h2 span { display: none; }
body[data-players="4"] .word-card strong { font-size: clamp(13px, 1.4vw, 21px); }
body[data-players="4"] .score-box strong { font-size: 23px; }
body[data-players="4"] .avatar { width: 35px; height: 35px; }
body[data-players="4"] .progress-pips i { width: 10px; }
@media (min-width: 1800px) { .hero-choice { aspect-ratio: .82; } .home-copy h1 { font-size: 104px; } .hero-showcase { transform: scale(1.08); } }
@media (max-height: 800px) and (min-width: 1000px) {
  .site-header { min-height: 78px; }
  .setup-page { padding-top: 19px; }
  .page-heading h1 { font-size: 28px; margin: 8px 0; }
  .lesson-settings { margin: 16px 0; padding: 14px; }
  .selection-toolbar { margin-bottom: 8px; }
  .hero-choice { aspect-ratio: 1.15; }
  body[data-players="2"] .hero-choice { aspect-ratio: 2; }
  .selection-panel { padding: 13px; }
  .selection-heading { margin-bottom: 12px; }
  .start-bar { margin-top: 15px; }
  .home-page { padding-top: 15px; }
  .hero-showcase { height: 440px; transform: scale(.9); transform-origin: center center; }
  .how-it-works > button { padding: 17px 23px; }
}
@media (max-width: 1150px) {
  .site-header { width: calc(100% - 48px); }
  .home-page { width: calc(100% - 72px); gap: 18px; }
  .home-copy { padding-left: 0; }
  .home-copy h1 { font-size: 68px; letter-spacing: 4px; }
  .home-copy h1 small { font-size: 15px; letter-spacing: 3px; }
  .showcase-card { width: 200px; height: 320px; }
  .showcase-center { left: calc(50% - 100px); height: 365px; }
  .showcase-center .hero-art { height: 310px; }
  .showcase-left { left: -16px; } .showcase-right { right: -16px; }
  .hero-showcase { height: 460px; }
  .site-footer { width: calc(100% - 72px); }
  .setup-page, .results-page { width: calc(100% - 48px); }
  .lesson-settings { grid-template-columns: 1.2fr .8fr .6fr; gap: 15px; }
  .mode-setting { grid-column: 1 / -1; }
  .mode-buttons small { display: inline; margin-left: 15px; }
  .mode-buttons strong { display: inline; }
  .library-page { width: calc(100% - 48px); }
  .library-layout { grid-template-columns: 215px minmax(0, 1fr); gap: 16px; }
  .library-editor { padding: 17px; }
  .editor-footer { align-items: flex-start; flex-direction: column; }
  .player-name-input { width: 115px; }
  .player-selection { gap: 12px; }
  .selection-panel { padding: 12px; }
  .hero-grid { gap: 7px; }
  .hero-choice-caption { padding: 20px 6px 7px; }
  .hero-choice-caption strong { font-size: 11px; }
  .hero-choice-caption small { font-size: 7px; }
  .game-page { width: calc(100% - 36px); }
  .arena-grid { gap: 12px; }
  .arena-panel { padding: 12px; }
  .word-grid { gap: 7px; }
  .word-card strong { font-size: 16px; }
  .word-card strong[lang="zh-CN"] { font-size: 17px; }
  .arena-intro p { display: none; }
  .arena-player p { font-size: 8px; }
  .arena-player h2 span { display: none; }
}
@media (max-width: 760px) {
  .site-header { width: calc(100% - 32px); min-height: 75px; gap: 10px; }
  .brand { gap: 8px; }
  .brand > span { font-size: 15px; letter-spacing: 2px; }
  .brand small { font-size: 6px; letter-spacing: 3px; }
  .brand > svg { width: 25px; }
  .header-tag { display: none; }
  .header-actions { gap: 8px; }
  .icon-button { width: 32px; height: 32px; border-radius: 7px; }
  .header-actions .text-button { font-size: 11px; gap: 4px; }
  .header-actions [data-action="history"] span, .header-actions [data-action="library"] span { display: none; }
  .home-page { grid-template-columns: 1fr; width: calc(100% - 40px); text-align: center; padding-top: 35px; }
  .home-copy { padding: 8px 0 0; }
  .home-copy h1 { font-size: 66px; margin-top: 19px; }
  .home-copy h1 small { font-size: 16px; }
  .home-description { font-size: 12px; margin-bottom: 25px; }
  .home-facts { justify-content: center; gap: 12px; }
  .hero-showcase { height: 370px; width: min(420px, 100%); margin: 0 auto; transform: scale(.86); transform-origin: center top; margin-bottom: -48px; }
  .showcase-center { top: 22px; height: 330px; }
  .showcase-center .hero-art { height: 290px; }
  .showcase-card { width: 190px; }
  .showcase-left { top: 60px; left: -8px; height: 287px; }
  .showcase-right { top: 60px; right: -8px; height: 287px; }
  .showcase-caption { bottom: -30px; }
  .orbit { top: 0; }
  .how-it-works { grid-template-columns: 1fr; text-align: left; margin-top: 22px; }
  .how-it-works > button { padding: 16px 25px; }
  .how-it-works > button + button::before { width: auto; height: 1px; left: 25px; right: 25px; top: 0; }
  .site-footer { width: calc(100% - 40px); font-size: 8px; margin-top: 10px; gap: 10px; }
  .setup-page, .results-page { width: calc(100% - 32px); padding-top: 24px; }
  .page-heading { gap: 10px; align-items: flex-start; flex-wrap: wrap; }
  .page-heading > div { width: 100%; }
  .page-heading h1 { font-size: 26px; letter-spacing: 1px; }
  .page-heading .back-link { font-size: 10px; white-space: nowrap; }
  .page-heading p { font-size: 11px; }
  .eyebrow { font-size: 8px; letter-spacing: 2px; }
  .home-actions { flex-direction: column; gap: 10px; }
  .lesson-settings { grid-template-columns: 1fr 1fr; margin-top: 21px; padding: 15px; }
  .setting-block:first-child { grid-column: 1 / -1; }
  .mode-buttons strong { display: block; }
  .mode-buttons small { display: block; margin: 5px 0 0; }
  .selection-toolbar small { display: none; }
  .library-page { width: calc(100% - 28px); padding-top: 24px; }
  .library-page .page-heading { flex-wrap: wrap; }
  .library-page .page-heading h1 { font-size: 24px; }
  .library-page .page-heading > .button { padding: 10px 14px; min-height: 38px; font-size: 11px; }
  .library-layout { grid-template-columns: 1fr; gap: 17px; margin-top: 18px; }
  .library-list { max-height: 170px; }
  .library-sidebar { padding: 15px; }
  .library-editor { padding: 14px; }
  .editor-fields { grid-template-columns: 1fr; }
  .editor-topline { flex-wrap: wrap; }
  .word-editor-toolbar { flex-wrap: wrap; }
  .editor-table th:first-child { width: 28px; }
  .editor-table th:last-child { width: 31px; }
  .editor-table td { padding: 4px 3px; }
  .editor-table input { padding: 10px 3px; font-size: 12px; }
  .editor-footer > div { flex-wrap: wrap; }
  .editor-footer > span { font-size: 9px; }
  .editor-footer .button { font-size: 10px; padding: 10px; }
  .player-name-input { width: 145px; }
  .review-section { padding: 16px; }
  .review-toolbar { flex-wrap: wrap; }
  .review-toolbar h2 { font-size: 17px; }
  .review-filters { align-items: flex-start; flex-direction: column; }
  .review-filters .segmented { flex-wrap: wrap; max-width: 100%; }
  .review-table { font-size: 10px; table-layout: fixed; }
  .review-table th, .review-table td { padding: 11px 4px; font-size: 10px; }
  .review-table th:nth-child(3), .review-table th:nth-child(4) { width: 55px; }
  .pause-overlay { inset: 72px 0 0; }
  .pause-card h2 { font-size: 28px; }
  .pause-card > p { font-size: 12px; }
  .results-footnote { font-size: 10px; }
  .result-details { grid-template-columns: 1fr; gap: 9px; }
  .result-details dd { margin-top: 2px; }
  .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-actions { flex-wrap: wrap; }
  .paste-options { flex-wrap: wrap; }
  .paste-options select { width: 100%; }
  .help-steps { padding-left: 15px; }
  .player-selection { grid-template-columns: 1fr; }
  .selection-panel { padding: 15px; }
  .hero-grid { gap: 10px; }
  .hero-choice, body[data-players="2"] .hero-choice { aspect-ratio: .78; }
  .hero-choice-caption strong { font-size: 15px; }
  .hero-choice-caption small { font-size: 9px; }
  .start-bar { position: sticky; bottom: 0; background: #0b121eef; padding: 14px 0; margin-top: 8px; backdrop-filter: blur(10px); z-index: 3; }
  .start-bar p { display: none; }
  .start-button { width: 100%; }
  body[data-view="game"] #app { height: auto; min-height: 100dvh; }
  body[data-view="game"] .site-header { position: sticky; top: 0; z-index: 4; background: #0a101df5; width: 100%; padding: 0 13px; flex-basis: 72px; min-height: 72px; gap: 8px; }
  body[data-view="game"] .brand > span { font-size: 11px; letter-spacing: 1px; }
  body[data-view="game"] .brand > svg { display: none; }
  body[data-view="game"] .brand small { font-size: 5px; letter-spacing: 1px; }
  body[data-view="game"] .header-actions { gap: 5px; }
  body[data-view="game"] .header-actions .icon-button { width: 27px; height: 30px; border: 0; background: transparent; }
  body[data-view="game"] .header-actions .text-button { font-size: 9px; }
  .match-clock { gap: 4px; padding-bottom: 5px; }
  .clock-label { display: none; }
  .match-clock > strong { font-size: 27px; margin-left: 4px; }
  .game-page { width: calc(100% - 24px); }
  .arena-intro { min-height: 55px; font-size: 9px; }
  .arena-badge { font-size: 8px; }
  .arena-grid { grid-template-columns: 1fr; gap: 15px; }
  .arena-panel { min-height: 575px; padding: 15px; }
  .word-card { min-height: 58px; }
  .word-card strong, .word-card strong[lang="zh-CN"] { font-size: 19px; }
  .arena-footer { font-size: 8px; gap: 12px; line-height: 1.8; }
  .countdown-overlay { inset: 72px 0 0; }
  .countdown-overlay strong { font-size: 120px; }
  .results-grid { gap: 8px; }
  .result-heading h1 { font-size: 22px; letter-spacing: 0; }
  .result-heading p { font-size: 10px; }
  .result-card { padding-bottom: 14px; }
  .result-rank { left: 7px; right: 7px; top: 10px; }
  .result-rank span:not(:first-child), .result-rank svg { display: none; }
  .result-rank > span:first-child { font-size: 10px; }
  .result-portrait { height: 116px; }
  .result-portrait .hero-art { width: 150%; max-width: none; margin-left: -25%; transform: translateY(-4px); }
  .result-player h2 { font-size: 13px; letter-spacing: 0; }
  .result-player span { font-size: 7px; }
  .result-score { gap: 3px; }
  .result-score strong { font-size: 30px; }
  .result-score span { font-size: 8px; }
  .result-card > p { font-size: 8px; }
  .result-actions { gap: 10px; }
  .result-actions .button { min-width: 0; flex: 1; font-size: 12px; padding: 12px; }
  dialog { padding: 22px; }
  .dialog-actions .button { flex: 1; padding: 12px 8px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .word-card.is-selected { outline: 3px solid Highlight; } .word-card.is-matched { border-style: dashed; } .hero-choice.selected { outline: 3px solid Highlight; } .player-number { border: 2px solid ButtonText; } }
