:root{color-scheme:dark;--bg:#18261f;--panel:#22342a;--ink:#f2eedf;--muted:#a8b5a7;--line:#425446;--orange:#ef995d;--paper:#eee7ce;--good:#b8dba7;--bad:#ffae97}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 15% 25%,#2b3f30 0,transparent 65%),var(--bg);font-family:"Segoe UI","Microsoft YaHei",sans-serif;color:var(--ink);min-height:100vh}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.42}button,a,input{outline-offset:5px}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--orange)}a{color:inherit;text-decoration:none}.masthead{max-width:1280px;margin:auto;padding:30px 48px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #42544680}.brand{display:flex;align-items:center;gap:12px;font-weight:700;letter-spacing:2px}.brand-mark{font-family:Georgia,serif;font-size:31px;line-height:44px;background:var(--paper);color:var(--bg);width:47px;text-align:center;transform:rotate(-7deg)}.brand small{display:block;font-size:9px;letter-spacing:3px;color:var(--muted);margin-top:4px}.edition{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:14px}.edition i{display:block;background:var(--orange);width:6px;height:6px;border-radius:50%}main{max-width:1280px;margin:auto;padding:44px 48px 36px;min-height:calc(100vh - 180px)}.landing{display:grid;grid-template-columns:1.25fr 1fr;gap:100px;align-items:center;padding:25px 0 30px}.eyebrow,.panel-number{font-size:10px;letter-spacing:2px;color:var(--muted);font-weight:600}h1,h2,h3,p{margin-top:0}h1{font-size:52px;line-height:1.3;letter-spacing:-2px;margin:24px 0 26px;font-weight:750}h1 em{color:var(--orange);font-style:normal;display:inline-block;transform:translateX(14px)}.lead{font-size:16px;line-height:1.9;color:#cad2c3}.sample-rack{display:flex;gap:9px;margin-top:34px;transform:rotate(-2deg);width:max-content}.tile{position:relative;display:inline-flex;align-items:center;justify-content:center;background:var(--paper);color:#28342a;border:0;border-bottom:4px solid #bfb698;border-radius:4px;min-width:48px;height:58px;font-family:Georgia,serif;font-size:28px;font-weight:bold;transition:transform .14s,background .14s}.tile small{position:absolute;right:6px;bottom:5px;font-family:"Segoe UI",sans-serif;font-size:10px;font-weight:500}.tile.small{min-width:43px;width:43px;height:50px;font-size:24px;opacity:1;cursor:default}.sample-rack .tile:nth-child(2){transform:translateY(-5px)}.tile.picked{transform:translateY(-6px);background:var(--orange);border-color:#bf774a}.caption{font-size:11px;color:var(--muted);margin-top:19px}.caption span{font-family:Georgia,serif;color:var(--ink);font-weight:bold;letter-spacing:2px;margin-right:15px}.intro-stats{display:flex;gap:28px;margin-top:44px;padding-top:22px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}.intro-stats b{font-family:Georgia,serif;font-size:24px;color:var(--ink);margin-right:3px}.intro-stats small{display:block;font-size:10px;margin-top:6px}.entry-panel{background:#22332ac9;border:1px solid var(--line);padding:30px 34px;position:relative}.entry-panel:before{content:"";position:absolute;left:-1px;top:-1px;width:65px;height:3px;background:var(--orange)}.entry-panel h2{font-size:27px;margin:16px 0 24px}.field{font-size:12px;color:var(--muted);display:block;margin-bottom:16px}input:not([type=checkbox]){display:block;width:100%;background:#15251d;border:1px solid #53614e;color:var(--ink);padding:13px 14px;border-radius:3px;font-size:14px}.field input{margin-top:8px}input::placeholder{color:#7d8d7d}.primary,.secondary{border:0;border-radius:3px;display:flex;justify-content:space-between;align-items:center;padding:14px 18px;font-weight:650;width:100%;gap:12px}.primary{color:#202c22;background:var(--orange)}.primary:hover:not(:disabled){background:#f9b176}.secondary{color:var(--ink);border:1px solid #63705c;background:transparent}.secondary:hover:not(:disabled){background:#344637}.large{font-size:16px;padding:16px 18px}.micro{font-size:11px;line-height:1.8;color:var(--muted);margin:10px 0}.divider{display:flex;align-items:center;gap:12px;margin:24px 0;color:var(--muted);font-size:11px}.divider:before,.divider:after{content:"";height:1px;flex:1;background:var(--line)}.join-row{display:grid;grid-template-columns:1fr 74px;gap:10px;margin-top:12px}.join-row input{letter-spacing:3px}.check{display:flex;gap:9px;align-items:center;font-size:12px;color:#c0cbb8;margin:17px 0;line-height:1.5}.check input{accent-color:var(--orange);width:15px;height:15px;margin:0}.subtle{font-size:10px;color:var(--muted)}.text-link{border:0;background:none;color:var(--orange);font-size:12px;padding:5px 0;text-align:left;line-height:1.5}.muted{color:var(--muted)}footer{display:flex;justify-content:space-between;max-width:1280px;margin:auto;padding:22px 48px 26px;border-top:1px solid #42544670;color:#91a08f;font-size:10px;letter-spacing:1px}.waiting{max-width:700px;margin:40px auto;text-align:center}.waiting h1{font-size:36px;letter-spacing:0}.waiting p{line-height:1.9;color:var(--muted)}.waiting .primary,.waiting .secondary{max-width:300px;margin:20px auto;justify-content:center}.room-code{font-size:64px;font-family:Georgia,serif;letter-spacing:10px;color:var(--orange);margin:30px 0}.error-copy{color:var(--bad)!important}.toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:var(--paper);color:#243328;padding:13px 22px;z-index:100;border-radius:4px;max-width:min(600px,90vw);font-size:13px}.toast[hidden]{display:none}.board-top{display:flex;align-items:center;gap:20px}.board-top .text-link{margin-left:auto;color:var(--muted)}.mode-tag{font-size:11px;color:var(--muted);padding-left:20px;border-left:1px solid var(--line)}.players{display:grid;grid-template-columns:1fr 1fr;gap:70px;margin:27px 0 30px}.player{display:flex;gap:16px;align-items:center}.avatar{width:49px;height:49px;display:flex;align-items:center;justify-content:center;border:1px solid #75866c;color:var(--paper);font-size:14px;font-weight:700}.opponent .avatar{color:var(--orange);border-color:#ae7f54;font-family:Georgia,serif}.player-main{flex:1}.player-title{font-size:14px;font-weight:600;display:flex;justify-content:space-between;gap:12px}.player-title span{font-size:10px;color:var(--muted);font-weight:400}.hp-rail{height:5px;background:#3e4d3c;margin:10px 0 7px}.hp-rail i{display:block;height:100%;background:#bcd1a0;transition:width .4s}.opponent .hp-rail i{background:var(--orange)}.player-meta{font-size:10px;color:var(--muted)}.player-meta b{color:var(--ink);font-size:13px}.player-meta span{float:right;color:#d0c99f}.phase-line{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:15px 0;font-size:14px}.clock-wrap{color:var(--muted);font-size:11px}.clock-wrap b{color:var(--orange);font-family:Georgia,serif;font-size:20px;margin:0 6px}.table-content{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:55px;margin-top:32px}.rack-header{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--muted);margin-bottom:16px}.rack{display:grid;grid-template-columns:repeat(10,1fr);gap:7px;margin-bottom:22px}.rack .tile{min-width:0;width:100%;height:57px;font-size:26px}.word-entry{display:flex;gap:8px}.word-entry input{text-transform:uppercase;letter-spacing:3px;font-family:Georgia,serif;font-size:22px;padding:12px}.compact{width:53px;justify-content:center;flex-shrink:0;font-size:19px}.word-preview{margin-top:14px;border-left:2px solid #a3b596;padding:12px 16px;background:#213329;font-size:13px;min-height:79px}.word-preview p{margin:9px 0;font-family:Georgia,serif;font-size:16px;line-height:1.6}.word-preview.empty{color:var(--muted);line-height:1.8}.word-preview.invalid{border-color:var(--orange);color:var(--orange);min-height:50px}.word-label{font-weight:700;color:var(--paper);letter-spacing:2px}.word-label small{font-size:10px;color:var(--muted);margin-left:12px;letter-spacing:0}.helper-row{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:9px}.hint-copy{font-size:12px;line-height:1.8;color:var(--orange);min-height:14px}.decision{border-left:1px solid var(--line);padding-left:28px}.decision h2{font-size:23px;margin:15px 0 23px;line-height:1.5}.decision p{font-size:13px;line-height:1.9;color:var(--muted)}.decision .primary{margin-top:18px}.decision .secondary{margin-top:12px}.risk-option{width:100%;text-align:left;display:flex;justify-content:space-between;align-items:center;background:#1a2b21;border:1px solid #50624d;color:var(--ink);padding:13px 16px;margin:10px 0;border-radius:3px}.risk-option.selected{border-color:#d1d8bd;background:#2c4030}.risk-option.risky.selected{border-color:var(--orange);background:#473a27}.risk-option small{display:block;color:var(--muted);font-size:10px;margin-top:6px}.risk-option strong{font:29px Georgia,serif;color:var(--paper)}.risk-option i{font-size:10px;color:var(--orange);font-style:normal;margin-left:8px}.tool{width:100%;border:1px dashed #7e8c6b;display:flex;flex-direction:column;align-items:flex-start;gap:5px;background:transparent;color:var(--ink);padding:12px 15px;border-radius:3px;margin-top:19px}.tool small{font-size:10px;color:var(--muted)}.tool.selected{background:#3a4430;border-style:solid;border-color:var(--orange)}.peer-status{margin-top:16px;font-size:10px;color:var(--muted)}.return-box{padding-top:18px;border-top:1px solid var(--line);margin-top:24px;font-size:12px;color:var(--muted)}.return-box>span{display:block;margin-bottom:10px}.review-word{color:var(--orange);background:#24372b;border:1px solid #7c8a60;padding:8px 12px;margin-right:7px;border-radius:2px;font:14px Georgia,serif}.review-word.selected{background:#5a472d;border-color:var(--orange)}.question-word{font:52px Georgia,serif;letter-spacing:3px;margin:18px 0}.question-word small{display:inline-block;font:11px "Microsoft YaHei",sans-serif;color:var(--muted);letter-spacing:0;margin-left:16px}.sentence{font:19px/1.7 Georgia,serif;color:var(--paper);margin:18px 0}.question-label{font-size:12px;color:var(--muted);margin:22px 0 14px}.answers{display:grid;grid-template-columns:1fr 1fr;gap:12px}.answer-option{display:flex;gap:15px;align-items:center;background:#22372a;border:1px solid #6a7b5e;color:var(--ink);text-align:left;padding:19px 16px;border-radius:3px;font-size:14px;min-height:65px}.answer-option span{font:17px Georgia,serif;color:#a1b197;border-right:1px solid var(--line);padding-right:13px}.answer-option:hover:not(:disabled){border-color:var(--orange);background:#354632}.answer-option.eliminated{opacity:.15;text-decoration:line-through}.big-number{font:62px Georgia,serif!important;color:var(--orange)!important;line-height:1.2!important;margin:0 0 21px}.big-number small{font:11px "Microsoft YaHei",sans-serif;display:block;color:var(--muted);margin-top:8px}.energy-note{font-size:11px;color:#d0c99f}.empty-stage{grid-column:1/-1;text-align:center;padding:35px 0 60px}.empty-stage h2{margin-top:23px}.empty-stage p{color:var(--muted);font-size:13px}.spinner{display:inline-block;border:2px solid var(--line);border-top-color:var(--orange);width:27px;height:27px;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.feedback{border-left:2px solid var(--orange);padding:15px 22px;background:#22362a}.feedback-word{font:32px Georgia,serif;letter-spacing:2px}.feedback-word span{font:14px "Microsoft YaHei",sans-serif;margin-left:16px;letter-spacing:0;color:var(--orange)}.feedback h3{font-size:17px;margin:20px 0 10px}.feedback p:not(.sentence){font-size:13px;line-height:1.9}.correct{color:var(--good)}.incorrect{color:var(--bad)}.round-tally{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:23px;font-size:11px;color:var(--muted)}.round-tally span:last-child{grid-column:1/-1}.round-tally b{font:22px Georgia,serif;color:var(--paper);margin-left:7px}.result-title{font-size:30px;margin:15px 0 23px}.match-history{font-size:11px;color:var(--muted);margin-top:22px;line-height:2.3}.match-history summary{cursor:pointer;color:var(--orange)}.match-history div{border-bottom:1px solid #42544660}.match-history div span{float:right}.review-screen{max-width:740px;margin:20px auto}.review-screen h1{font-size:33px;letter-spacing:0}.review-question{border-top:1px solid var(--line);padding:28px 0}.review-question h2{font:36px Georgia,serif;color:var(--orange)}.review-question .primary{max-width:230px;margin-top:15px}.review-question .secondary{max-width:230px;margin-top:18px}.review-feedback{margin-top:22px;line-height:1.8}.review-question input{max-width:400px;font:25px Georgia,serif;letter-spacing:3px;text-transform:uppercase}
@media(min-width:1400px){.landing{padding-top:55px}.table-content{gap:75px}}
@media(max-width:1000px){.masthead,main,footer{padding-left:26px;padding-right:26px}.landing{gap:35px;grid-template-columns:1fr 1fr}h1{font-size:40px}.entry-panel{padding:27px}.table-content{grid-template-columns:minmax(0,1fr) 255px;gap:25px}.decision{padding-left:20px}.rack{grid-template-columns:repeat(5,1fr)}.tile{min-width:42px}.players{gap:30px}.intro-stats{gap:17px}}
@media(max-width:680px){.masthead{padding-top:20px;padding-bottom:20px}.edition{font-size:10px;gap:8px}main{padding-top:23px}.landing{display:block;padding:0}.intro{margin-bottom:35px}h1{font-size:37px}.lead{font-size:14px}.intro-stats{margin-top:25px}.entry-panel{padding:25px}.sample-rack{margin-top:24px}.table-content{grid-template-columns:1fr;gap:24px}.decision{border-left:0;border-top:1px solid var(--line);padding:22px 0 0}.players{gap:20px}.avatar{display:none}.player-title{font-size:12px;flex-wrap:wrap;gap:4px}.player-title span{font-size:9px}.board-top{gap:10px}.mode-tag{font-size:9px;padding-left:10px}.phase-line{font-size:12px}.rack{grid-template-columns:repeat(10,1fr);gap:4px}.rack .tile{height:41px;font-size:18px}.tile small{font-size:8px;bottom:4px;right:4px}.helper-row{align-items:flex-start}.helper-row .micro{font-size:9px}.answers{gap:8px}.answer-option{padding:16px 12px;font-size:12px}.question-word{font-size:40px}.sentence{font-size:17px}.room-code{font-size:43px;letter-spacing:7px}.waiting h1{font-size:28px}footer{gap:15px;font-size:9px}.review-screen h1{font-size:25px}.risk-option{padding:13px 18px}}
@media(max-height:800px) and (min-width:681px){body:has(.board) .masthead{padding-top:20px;padding-bottom:20px}main:has(.board){padding-top:20px;padding-bottom:20px}.board .players{margin:18px 0}.board .phase-line{padding:11px 0}.board .table-content{margin-top:18px}.board .decision h2{font-size:20px;margin:10px 0 12px}.board .risk-option{padding:10px 14px;margin:8px 0}.board .tool{margin-top:12px;padding:9px 13px}.board .decision .micro{font-size:10px;margin:7px 0}.board .decision .primary{padding:12px 15px;margin-top:10px}.board .peer-status{margin-top:8px}.board .question-word{font-size:44px;margin:13px 0}.board .sentence{margin:13px 0}.board .question-label{margin:16px 0 10px}.board .answer-option{padding:15px;min-height:58px}.board .feedback{padding:12px 18px}.board .feedback h3{margin:13px 0 8px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
.scrabble-layout{grid-template-columns:minmax(0,1.35fr) minmax(320px,1fr);gap:32px;align-items:start}
.shared-table{min-width:0}.crossword{display:grid;grid-template-columns:repeat(15,minmax(0,1fr));gap:2px;padding:6px;background:#10251a;border:1px solid #5c735b;aspect-ratio:1;max-width:580px;margin:auto}
.cell{position:relative;min-width:0;min-height:0;padding:0;border:0;background:#2c4735;color:#8ba38a;border-radius:1px;font-size:clamp(6px,.7vw,10px);aspect-ratio:1;display:flex;align-items:center;justify-content:center}
.cell:disabled{opacity:1;cursor:default}.cell.premium.DL{background:#42655d;color:#d1e9dd}.cell.premium.TL{background:#304e60;color:#b7d8e1}.cell.premium.DW{background:#724e45;color:#eed6c6}.cell.premium.TW{background:#9d5a36;color:#ffe3ba}
.cell.placed,.cell.ghost{background:var(--paper);color:#203529;font-family:Georgia,serif;font-size:clamp(12px,1.4vw,22px);font-weight:bold;border-bottom:2px solid #b3ad8b}
.cell.placed.owner-1{border-top:2px solid var(--orange)}.cell.ghost{background:#dbac6b;border:1px dashed #fff0b8}.cell.ghost.invalid{background:#ce8770}.cell.origin{outline:2px solid #ffe8a0;outline-offset:-2px;z-index:1}.cell small{position:absolute;font:7px 'Segoe UI',sans-serif;bottom:1px;right:2px}
.board-key{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;font-size:10px;color:var(--muted);margin:12px 0}.shared-table>.micro{max-width:560px;margin:12px auto}.shared-table .rack-header{margin-bottom:8px;gap:10px}
.turn-panel .rack{grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;margin-bottom:14px}.turn-panel .rack .tile{width:100%;min-width:0;max-width:64px;height:49px;font-size:24px}.turn-panel .decision{border-left:0;border-top:1px solid var(--line);padding:12px 0 0;margin-top:14px}.turn-panel .risk-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.turn-panel .risk-option{padding:10px 12px;margin:0}.turn-panel .risk-option strong{font-size:25px}.turn-panel .tool{margin-top:12px;padding:10px 12px}.turn-panel .primary{margin-top:12px}.turn-panel .word-entry input{font-size:18px;letter-spacing:2px}.placement-controls{display:flex;align-items:center;gap:10px;margin:10px 0;font-size:10px;color:var(--muted);flex-wrap:wrap}.placement-controls .secondary{width:auto;padding:7px 10px;font-size:11px}.placement-controls .text-link{font-size:10px}.turn-panel .word-preview{min-height:0;padding:10px 12px;margin-top:9px}.turn-panel .placement-summary{font:12px/1.6 'Microsoft YaHei',sans-serif;margin:5px 0}.turn-panel .check{margin:10px 0;font-size:11px}.turn-panel .hint-copy{font-size:11px}.turn-actions{display:flex;justify-content:space-between;gap:12px;margin-top:8px}.turn-actions .text-link{font-size:11px}.turn-panel .answers{grid-template-columns:1fr;gap:9px}.turn-panel .answer-option{font-size:12px;min-height:50px;padding:12px;line-height:1.6}.turn-panel .question-word{font-size:32px;letter-spacing:1px;overflow-wrap:anywhere}.turn-panel .sentence{font-size:16px}.turn-panel .feedback{padding:12px 16px}.turn-panel .feedback-word{font-size:30px}.revealed-meaning{font-size:13px;color:var(--orange);line-height:1.7;margin-top:8px}.turn-panel .round-tally{margin-top:14px}.turn-panel .next-action{margin-top:16px}.turn-panel .next-action .secondary{margin-top:10px}.watch{padding-top:18px}.watch h2{font-size:25px;line-height:1.6;margin:18px 0}.watch p{font-size:13px;line-height:1.9;color:var(--muted)}
@media(max-width:1000px){.scrabble-layout{grid-template-columns:minmax(0,1fr) minmax(290px,1fr);gap:22px}.cell.placed,.cell.ghost{font-size:16px}.cell{font-size:7px}.cell small{font-size:6px}}
@media(max-width:680px){main:has(.board),.masthead:has(+main .board){padding-left:16px;padding-right:16px}.scrabble-layout{grid-template-columns:1fr;gap:20px}.crossword{gap:1px;padding:4px}.cell.placed,.cell.ghost{font-size:14px}.cell{font-size:7px}.cell small{font-size:5px;right:1px}.shared-table .rack-header{font-size:11px}.shared-table .rack-header .micro{font-size:9px;margin:0}.board-key{gap:9px;font-size:9px}.players{gap:12px;margin:18px 0}.player-meta span{float:none;display:block;margin-top:5px}.phase-line{gap:12px}.turn-panel .rack .tile{height:46px}.turn-panel .answers{grid-template-columns:1fr}.turn-panel .decision{padding-top:12px}.turn-panel .micro{font-size:10px}.board-top .mode-tag{max-width:120px}.turn-panel .rack{gap:6px}}
@media(min-width:681px){.shared-table{position:sticky;top:16px}}
@media(max-height:800px) and (min-width:681px){body:has(.board) .masthead{padding-top:12px;padding-bottom:12px}.board .players{margin:12px 0}.board .table-content{margin-top:12px}.crossword{max-width:min(100%,calc(100vh - 350px))}.cell.placed,.cell.ghost{font-size:15px}.cell{font-size:7px}.cell small{font-size:5px}.shared-table .rack-header .micro{font-size:9px}.board-key{font-size:9px;gap:8px}.shared-table>.micro{font-size:10px}}
.hand-area{margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid var(--line)}.hand-area .rack{margin-bottom:0}.hand-area .rack-header{margin-bottom:9px}.hand-area .rack-header .micro{margin:0}.hand-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:4px}.hand-footer .micro{margin:4px 0}.hand-footer .text-link{font-size:11px}.quick-actions{display:flex;gap:9px;margin-bottom:12px}.quick-actions .secondary{width:auto;flex:1;font-size:11px;line-height:1.5;justify-content:center;padding:9px 8px;background:#304533;border-color:#7e9475}.quick-actions .secondary:hover:not(:disabled){border-color:var(--orange)}.tile.facedown{background:repeating-linear-gradient(45deg,#36543e,#36543e 4px,#2e4936 4px,#2e4936 8px);color:#c4d5b4;border:1px solid #698360;border-bottom:3px solid #162d1f;opacity:1;cursor:default}.tile.facedown span{font-family:Georgia,serif;font-size:22px;color:#d4debc}.hand-area .tile.small{font-size:24px}.hand-area .tile small{font-size:9px;bottom:3px;right:3px}.hand-area .tile{animation:card-in .2s ease-out}@keyframes card-in{from{transform:translateY(5px);opacity:.6}to{transform:translateY(0);opacity:1}}
@media(max-width:680px){.scrabble-layout{display:flex;flex-direction:column}.scrabble-layout .turn-panel{order:0;width:100%}.scrabble-layout .shared-table{order:1;width:100%}.quick-actions .secondary{font-size:12px;padding:11px 9px}.hand-area .rack .tile{height:49px}}
@media(prefers-reduced-motion:reduce){.hand-area .tile{animation:none}}
/* The match occupies the viewport; additional rules open in a dialog. */
body:has(.board){height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column}
body:has(.board) .masthead{width:100%;height:42px;flex:0 0 42px;padding:6px 20px}
body:has(.board) .brand-mark{width:28px;line-height:28px;font-size:22px}body:has(.board) .brand{font-size:12px;gap:9px}body:has(.board) .brand small{font-size:7px;margin-top:1px}
body:has(.board) main{width:100%;min-height:0;flex:1;margin:0 auto;padding:8px 20px;overflow:hidden}body:has(.board)>footer{display:none}
.board{height:100%;min-height:0;display:grid;grid-template-rows:20px 48px 30px minmax(0,1fr);gap:6px}
.board .board-top{gap:12px}.board #game-help{margin-left:auto}.board .board-top #leave-game{margin-left:0}.board .players{margin:0;gap:30px}.board .avatar{height:32px;width:32px}.board .player{gap:10px}.board .player-title{font-size:12px}.board .hp-rail{margin:5px 0;height:4px}.board .player-meta{font-size:10px}
.board .phase-line{padding:5px 0;font-size:12px}.board .clock-wrap b{font-size:17px}.board .table-content{min-height:0;margin:0;gap:20px;align-items:start;overflow:hidden;grid-template-columns:minmax(0,1.2fr) minmax(330px,1fr)}
.board .shared-table{position:static;height:100%;min-height:0}.board .crossword{max-width:none;width:min(100%,calc(100dvh - 194px));height:auto;margin:0 auto}.board .shared-table .rack-header{height:22px;margin:0 0 4px}.board .board-key{margin:6px 0;font-size:9px;gap:9px}.board .shared-table>.micro{display:none}
.board .turn-panel{height:100%;min-height:0;display:flex;flex-direction:column;gap:7px}.board .hand-area{flex:none;margin:0;padding:0 0 5px}.board .hand-area .rack-header{height:18px;margin:0 0 4px}.board .quick-actions{margin:0 0 6px;gap:7px}.board .quick-actions .secondary{min-height:30px;padding:5px 8px;font-size:11px}.board .hand-area .rack{margin:0;gap:6px}.board .hand-area .rack .tile{height:38px;font-size:23px;max-width:none}.board .hand-footer{margin:0;height:20px}.board .hand-footer .micro{font-size:9px;margin:0}.board .hand-footer .text-link{font-size:10px;padding:2px 0}
.board .workbench{min-height:0;display:flex;flex-direction:column;gap:4px}.board .word-entry input{height:35px;padding:5px 9px;font-size:17px}.board .compact{height:35px;padding:5px;width:40px}.board .placement-controls{margin:0;gap:7px;font-size:9px}.board .placement-controls .secondary{padding:4px 8px;font-size:10px}.board .word-preview{margin:0;padding:6px 9px;min-height:0;font-size:11px;line-height:1.5}.board .word-preview p{font-size:11px;margin:2px 0}.board .word-preview .micro{font-size:9px;margin:0}.board .helper-row{margin:0;min-height:20px}.board .helper-row .micro{display:none}.board .hint-copy{min-height:0;font-size:11px;line-height:1.5}.board .check{margin:2px 0;font-size:11px}.board .return-box{padding:5px 0;margin:2px 0;font-size:10px}.board .return-box>span{margin:0 0 3px}.board .review-word{padding:4px 8px;font-size:12px}
.board .decision{flex:none;margin:0;padding:6px 0 0}.board .decision>.micro{display:none}.board .risk-option{min-height:40px;margin:0;padding:6px 10px}.board .risk-option small{margin-top:2px;font-size:9px}.board .risk-option strong{font-size:23px}.board .tool{min-height:31px;padding:6px 10px;margin-top:6px;flex-direction:row;align-items:center;gap:10px;font-size:12px}.board .tool small{font-size:9px}.board .decision .primary{height:36px;margin-top:6px;padding:6px 12px;font-size:12px}
.board .question-word{font-size:25px;margin:3px 0 7px}.board .sentence{font-size:15px;margin:6px 0;line-height:1.5}.board .question-label{margin:6px 0;font-size:11px}.board .question-area .micro{margin:4px 0}.board .answers{gap:6px}.board .answer-option{min-height:39px;padding:7px 10px;line-height:1.5;font-size:13px}.board .energy-note{margin:7px 0}.board .question-area #skip-answer{padding:2px 0}
.board .feedback-area{min-height:0}.board .feedback{padding:8px 12px}.board .feedback-word{font-size:25px}.board .revealed-meaning{font-size:12px;margin:4px 0;line-height:1.4}.board .feedback h3{font-size:14px;margin:6px 0}.board .feedback p:not(.sentence){font-size:11px;line-height:1.5;margin:4px 0}.board .round-tally{margin:7px 0;gap:5px}.board .round-tally b{font-size:18px}.board .next-action{margin:7px 0}.board .next-action .primary,.board .next-action .secondary{padding:7px 12px;margin-top:6px;min-height:34px;font-size:12px}.board .next-action>.micro{margin:4px 0;font-size:10px}.board .result-title{font-size:23px;margin:3px 0 6px}.board .match-history{display:none}.board .watch{padding:6px 0}.board .watch h2{font-size:22px;margin:8px 0}.board .watch p{font-size:12px}
.view-tabs{display:none}#game-info{color:var(--ink);background:var(--panel);border:1px solid #7e9475;padding:22px;max-width:560px;width:calc(100vw - 32px);max-height:80dvh;overflow:auto}#game-info::backdrop{background:#081b13ba}#game-info p{font-size:13px;line-height:1.8}#game-info h2{font-size:23px}
.tutorial-entry{margin-bottom:12px;font-size:13px}.tutorial-entry.secondary{border-color:var(--orange);color:var(--orange)}.tutorial-board #tut-exit{margin-left:auto}.tutorial-board .tutorial-note{border-left:3px solid var(--orange);padding:8px 12px;background:#253b2d}.tutorial-note h2{font-size:19px;line-height:1.4;margin:0 0 6px}.tutorial-note p{font-size:12px;line-height:1.8;margin:0;color:var(--paper)}.tutorial-controls{display:flex;flex-direction:column;gap:9px}.tutorial-controls .primary,.tutorial-controls .secondary{margin-top:0}.tutorial-controls .question-word{margin:0}.tutorial-controls .question-label{margin:0}.tutorial-controls .word-preview{margin:0}.tutorial-controls .risk-row{display:grid;grid-template-columns:1fr 1fr;gap:9px}.tutorial-controls .feedback{margin:0}.tutorial-error{color:var(--orange);font-size:12px;line-height:1.5;margin:0}.tutorial-target{outline:2px solid var(--orange);outline-offset:-2px;box-shadow:inset 0 0 0 3px #f6a25450}.tutorial-board .tutorial-controls .risk-option{min-height:49px}.tutorial-board .turn-panel{gap:9px}.tutorial-board .tutorial-controls .primary{min-height:38px;height:auto;padding:9px 12px}.tutorial-board .tutorial-controls .secondary{min-height:35px}.tutorial-board .tutorial-controls .answer-option{min-height:38px}
@media(max-height:700px){.tutorial-note h2{font-size:17px;margin-bottom:4px}.tutorial-note p{line-height:1.6}.tutorial-controls{gap:6px}.tutorial-board .turn-panel{gap:7px}.tutorial-board .answers{gap:5px}.tutorial-board .tutorial-controls .risk-option{min-height:44px}}
@media(max-width:680px){
  body:has(.board) .masthead{height:34px;flex-basis:34px;padding:4px 12px}body:has(.board) .edition{display:none}body:has(.board) main{padding:6px 12px}
  .board{grid-template-rows:20px 49px 29px 30px minmax(0,1fr);gap:5px}.board .players{gap:14px}.board .player-title{font-size:11px}.board .player-title span{display:none}.board .player-meta span{display:block;margin:0;float:none}.board .mode-tag{max-width:none;font-size:9px}.board .view-tabs{display:flex;gap:7px}.view-tabs button{flex:1;background:transparent;color:var(--muted);border:1px solid var(--line);font-size:12px}.view-tabs button.selected{border-color:var(--orange);color:var(--orange);background:#2e4331}
  .board .scrabble-layout{display:block;overflow:hidden}.board .shared-table{width:100%;height:100%}.board .crossword{width:min(100%,calc(100dvh - 231px));margin:auto}.board .turn-panel{width:100%;gap:7px}.board .hand-area .rack .tile{height:43px;font-size:23px}.board .hand-area .rack-header{font-size:12px}.board .quick-actions .secondary{min-height:36px;font-size:12px}.board .word-entry input{height:39px;font-size:18px}.board .compact{height:39px}.board .decision .primary{height:40px}.board .answer-option{min-height:43px;font-size:13px}
  body[data-mobile-panel=action] .board .shared-table{display:none}body[data-mobile-panel=board] .board .turn-panel{display:none}
  .tutorial-board .player-meta{font-size:9px;white-space:nowrap}.tutorial-board .player-meta span{display:inline;margin:0 0 0 5px;float:none}
}
.tutorial-info{color:var(--paper);background:var(--panel);border:1px solid #7e9475;padding:20px;max-width:560px;width:calc(100vw - 32px);max-height:80dvh;overflow:auto}.tutorial-info::backdrop{background:#081b13ba}.tutorial-info h2{font-size:23px;margin:0 0 12px}.tutorial-info p{font-size:13px;line-height:1.8}
.mode-tabs,.join-role{display:flex;gap:8px;margin:12px 0 20px}.mode-tabs button,.join-role button{flex:1;border:1px solid var(--line);background:transparent;color:var(--muted);padding:10px 8px;font:13px 'Microsoft YaHei',sans-serif}.mode-tabs .selected,.join-role .selected{border-color:var(--orange);color:var(--orange);background:#304533}.rank-card{border-left:4px solid var(--orange);padding:14px 18px;background:#273e2e;position:relative;margin:18px 0}.rank-card h3{font:30px Georgia,'Microsoft YaHei',serif;margin:12px 0 8px}.rank-card>strong{font:22px Georgia,serif;letter-spacing:1px}.rank-card .hp-rail{margin:14px 0 6px}.rank-card.tier-1{border-color:#bbcbdb}.rank-card.tier-2{border-color:#e0bb65}.rank-card.tier-3{border-color:#8acece}.rank-card.tier-4{border-color:#85c791}.rank-card.tier-5{border-color:#96bcef}.rank-card.tier-6{border-color:#e49bce}.entry-panel #rank-queue,.entry-panel #practice{margin-top:10px}.entry-panel #rank-rules{margin-right:20px}.rank-board{list-style:none;padding:0;margin:14px 0;max-height:260px;overflow:auto}.rank-board li{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding:9px 0;font-size:12px}.rank-board b{white-space:nowrap}.room-settings{font-size:12px;line-height:1.8;margin:10px 0}.room-settings summary{cursor:pointer;color:var(--orange)}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}.settings-grid input{display:block;padding:7px 10px;min-height:34px;margin-top:4px}.settings-grid label{color:var(--muted);font-size:11px}.room-row{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding:12px 0;font-size:12px}.room-row small{display:block;color:var(--muted);font-size:10px;line-height:1.7;margin-top:4px}.room-row b{overflow-wrap:anywhere}.spectator-board #leave-watch{margin-left:auto}.spectator-board .tutorial-note{border-left:3px solid var(--orange);padding:12px;background:#253b2d}.spectator-board .turn-panel{padding-top:22px}.spectator-board .players .player-meta span{display:inline;float:none}.board .clock-wrap{max-width:48%;text-align:right;font-size:11px;overflow-wrap:anywhere}
.account-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:12px;margin-bottom:14px;border-bottom:1px solid var(--line);font-size:12px;overflow-wrap:anywhere}.account-bar .text-link{font-size:11px;flex-shrink:0}#account-error{color:var(--orange);min-height:20px}#account-login{margin-top:16px}
@media(max-width:680px){.auth-entry .intro{display:none}.landing.auth-entry{padding-top:8px;gap:0}.auth-entry .entry-panel{padding:26px 22px}}
.board .player-title .player-rank{color:var(--orange);font-size:9px;border:1px solid var(--line);padding:1px 4px;white-space:nowrap}
@media(max-width:680px){.mode-tabs{margin-bottom:16px}.spectator-board .player-meta{font-size:9px}.spectator-board .turn-panel{padding-top:8px}.spectator-board .mode-tag{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.board .player-title .player-rank{display:inline}}

#account-control{max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}body:has(.board) #account-control{font-size:10px;line-height:1.2;margin:0;padding:2px 4px}

/* 大厅保持一屏；长房间列表与设置在面板内展开。 */
body:has(.landing){height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column}
body:has(.landing) .masthead{width:100%;flex:0 0 52px;padding:8px 24px;margin:0 auto}
body:has(.landing) main{width:100%;flex:1;min-height:0;margin:0 auto;padding:16px 24px;overflow:hidden}
body:has(.landing) footer{width:100%;flex:0 0 30px;margin:0 auto;padding:8px 24px}
.landing{height:100%;min-height:0;gap:40px;padding:0;align-items:center}
.landing .intro{min-width:0;margin:0}.landing h1{font-size:clamp(28px,3.5vw,48px);margin:14px 0 18px}.landing .sample-rack{margin-top:20px}.landing .intro-stats{margin-top:24px}
.landing .entry-panel{max-height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;padding:18px 22px;overscroll-behavior:contain;scrollbar-width:thin}
.landing .entry-panel h2{font-size:23px;margin:10px 0 12px}.landing .account-bar{margin-bottom:8px;padding-bottom:6px}.landing .mode-tabs{margin:8px 0 12px}.landing .rank-card{margin:10px 0;padding:10px 14px}.landing .rank-card h3{font-size:25px;margin:8px 0}.landing .rank-card .hp-rail{margin:8px 0 4px}.landing .primary,.landing .secondary{padding:10px 12px;font-size:13px}.landing .micro{margin:6px 0;line-height:1.6}.landing .field{margin-bottom:10px}.landing .field input{padding:9px 12px}.landing .check{margin:10px 0}.landing .divider{margin:14px 0}.landing .tutorial-entry{margin-bottom:8px}
@media(max-width:680px){body:has(.landing) .masthead{flex-basis:46px;padding:6px 16px}body:has(.landing) main{padding:10px 12px}body:has(.landing) footer{display:none}.landing{display:flex;flex-direction:column;gap:0;align-items:stretch}.landing .intro{display:none}.landing .entry-panel{width:100%;padding:16px;flex:1}.landing .panel-number{font-size:9px}.landing .entry-panel h2{font-size:21px}.landing .rank-card{margin:8px 0}.landing .rank-card h3{font-size:24px}}

[data-custom-section=create] .custom-join,[data-custom-section=join] .custom-create{display:none}.landing #rank-full-login{display:none}.custom-switch{margin-top:0!important}.custom-switch button{font-size:11px;padding:7px 6px}

.landing:not(.auth-entry) .panel-number,.landing:not(.auth-entry) .entry-panel>div:not(.account-bar)>h2{display:none}
.custom-create{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 12px}.custom-create .field{margin:0}.custom-create .room-settings,.custom-create>.primary,.custom-create>.secondary{grid-column:1/-1}.custom-create .check{margin:4px 0}.custom-create .room-settings{margin:3px 0}
body:has(.landing) .brand-mark{width:32px;line-height:30px;font-size:24px}.landing .tutorial-entry{padding:8px 12px}

body:has(.arena-loading){height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column}body:has(.arena-loading) .masthead{width:100%;flex:0 0 52px;margin:0 auto;padding:8px 24px}body:has(.arena-loading) main{width:100%;flex:1;min-height:0;margin:0 auto;padding:16px 24px;display:grid;place-items:center;overflow:hidden}body:has(.arena-loading) footer{width:100%;flex:0 0 30px;margin:0 auto;padding:8px 24px}
.arena-loading{width:min(760px,100%);position:relative;padding:20px 34px 18px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.loading-folio{display:flex;justify-content:space-between;font:10px 'Segoe UI',sans-serif;letter-spacing:3px;color:var(--muted)}.loading-folio span{letter-spacing:1px;color:var(--orange)}.loading-art{height:178px;position:relative;margin:14px 0 4px;display:flex;align-items:center}.loading-cross{position:absolute;inset:0 30px 0 0;opacity:.48;background:repeating-linear-gradient(0deg,transparent 0 35px,#60786350 35px 36px),repeating-linear-gradient(90deg,transparent 0 35px,#60786350 35px 36px);mask-image:linear-gradient(90deg,#000,transparent)}.loading-cross:after{content:'DW';position:absolute;top:36px;left:108px;width:35px;height:35px;background:#ac6b4850;display:grid;place-items:center;font:9px sans-serif;color:var(--orange)}.loading-rack{display:flex;gap:10px;position:relative;transform:rotate(-3deg)}.loading-tile{display:grid;place-items:center;position:relative;width:64px;height:74px;background:var(--paper);color:var(--bg);font:bold 42px Georgia,serif;border-bottom:5px solid #bfb698;border-radius:3px;transform:rotate(var(--tilt));animation:tile-ready 2.8s ease-in-out infinite;animation-delay:calc(var(--tile)*.14s)}.loading-tile small{position:absolute;bottom:6px;right:7px;font:10px sans-serif}.loading-stamp{position:absolute;right:-8px;bottom:13px;font:12px 'Microsoft YaHei',sans-serif;line-height:1.8;color:var(--orange);border:1px solid #b17b50;padding:8px 14px;transform:rotate(8deg)}.loading-caption h2{font-size:32px;line-height:1.3;margin:8px 0 16px;letter-spacing:1px}.loading-caption h2 br{display:none}.loading-caption h2 em{font-style:normal;color:var(--orange);margin-left:12px}.loading-meta{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin:10px 0}.loading-meta>span{font:12px Georgia,'Microsoft YaHei',serif;letter-spacing:1px;color:var(--muted)}.loading-rail{height:16px;position:relative;border:1px solid #698169;background:repeating-linear-gradient(90deg,#24382b 0 23px,#60765c50 23px 24px);overflow:hidden;--progress:0%}.loading-rail i{position:absolute;inset:0 auto 0 0;width:var(--progress);background:var(--orange);transition:width .2s linear}.loading-rail>span{display:none}.loading-rail.indeterminate>span{display:block;position:absolute;left:var(--progress);top:3px;width:22%;height:8px;background:linear-gradient(90deg,transparent,#eee7ce,transparent);animation:loading-sweep 1.8s ease-in-out infinite}.loading-steps{list-style:none;display:flex;justify-content:space-between;gap:8px;margin:14px 0 8px;padding:0;color:#708c75;font-size:10px}.loading-steps li{display:flex;gap:5px;align-items:center}.loading-steps b{font:10px Georgia,serif}.loading-steps .done{color:var(--ink)}.loading-steps .active{color:var(--orange)}.arena-loading #loading-detail{min-height:20px;margin:8px 0 0}.loading-failed .loading-rail>span{display:none}.loading-failed .loading-tile{animation:none}.loading-failed #loading-retry{max-width:220px;margin-top:12px}
@keyframes tile-ready{0%,65%,100%{transform:translateY(0) rotate(var(--tilt))}32%{transform:translateY(-9px) rotate(var(--tilt))}}@keyframes loading-sweep{from{transform:translateX(-40%);opacity:.3}50%{opacity:1}to{transform:translateX(330%);opacity:.2}}
@media(max-width:680px){body:has(.arena-loading) .masthead{padding:6px 16px;flex-basis:46px}body:has(.arena-loading) .brand-mark{width:32px;line-height:30px;font-size:24px}body:has(.arena-loading) main{padding:12px}body:has(.arena-loading) footer{display:none}.arena-loading{padding:18px 12px;width:100%}.loading-art{height:154px;margin:8px 0}.loading-rack{gap:5px}.loading-tile{width:calc((100vw - 88px)/7);max-width:58px;height:56px;font-size:29px;border-bottom-width:3px}.loading-stamp{right:0;bottom:0;font-size:10px;padding:5px 9px}.loading-caption h2{font-size:27px}.loading-caption h2 br{display:block}.loading-caption h2 em{margin-left:20px}.loading-steps{gap:4px;font-size:9px}.loading-steps li{display:block}.loading-steps b{display:block;margin-bottom:5px}.loading-folio{letter-spacing:2px}.loading-cross{inset:0}}
@media(max-height:500px){.loading-art{height:100px}.arena-loading{padding:10px 14px}.loading-caption h2{font-size:24px;margin:4px 0 8px}.loading-caption h2 br{display:none}.loading-caption h2 em{margin-left:8px}.loading-stamp{bottom:0}.loading-steps{margin:8px 0}}
@media(prefers-reduced-motion:reduce){.loading-tile,.loading-rail.indeterminate>span{animation:none}.loading-rail i{transition:none}}
/* Loading feedback remains visible while modules and the word index arrive. */
.arena-loading .loading-live{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 0 16px}.loading-status{display:inline-flex;align-items:center;gap:10px;color:var(--orange);font-size:19px;letter-spacing:1px}.loading-status i{width:10px;height:10px;background:var(--orange);border-radius:50%;animation:loading-beat 1.6s ease-in-out infinite}.loading-live #loading-elapsed{font-size:13px;font-variant-numeric:tabular-nums;color:var(--ink)}.arena-loading .loading-meta{font-size:18px;margin:10px 0}.arena-loading .loading-meta>span{font:600 14px 'Segoe UI','Microsoft YaHei',sans-serif;letter-spacing:0;color:var(--ink)}.arena-loading .loading-rail{height:24px;border-color:#91a58a}.arena-loading .loading-rail i{width:100%;transform:scaleX(var(--progress-scale,0));transform-origin:left;transition:transform .25s ease-out;background:repeating-linear-gradient(120deg,#ef995d 0 14px,#f8af79 14px 28px)}.arena-loading .loading-rail>span{display:none}.arena-loading .loading-rail.is-running>span{display:block;position:absolute;inset:0 auto 0 0;width:25%;height:100%;background:linear-gradient(90deg,transparent,#fff1cdad,transparent);animation:loading-pass 1.8s linear infinite}.arena-loading .loading-steps{font-size:12px;color:#a7b8a1;margin:12px 0 16px}.arena-loading .loading-steps b{font-size:12px}.arena-loading .loading-steps .done b{color:var(--good)}.arena-loading #loading-detail{font-size:14px;line-height:1.6;min-height:22px;margin:8px 0}.loading-support{padding:10px 12px;border-left:3px solid var(--orange);background:#344b3770;min-height:48px}.loading-support p{margin:0;line-height:1.65;font-size:13px;color:var(--ink)}.loading-support #loading-transfer{font-size:12px;color:#cedbbf;font-variant-numeric:tabular-nums}.arena-loading #loading-retry{max-width:240px;margin-top:12px}.arena-loading #loading-retry[hidden],.arena-loading #loading-error-details[hidden]{display:none}.arena-loading #loading-error-details{font-size:12px;margin-top:12px}.arena-loading #loading-error-details p{overflow-wrap:anywhere;max-height:5em;overflow:auto;color:var(--muted);margin:8px 0}.arena-loading.loading-failed .loading-status{color:var(--bad)}.arena-loading.loading-failed .loading-status i{background:var(--bad);animation:none}.arena-loading.loading-ready .loading-status{color:var(--good)}.arena-loading.loading-ready .loading-status i{background:var(--good);animation:none}
@keyframes loading-beat{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.72)}}@keyframes loading-pass{from{transform:translateX(-100%)}to{transform:translateX(500%)}}
@media(max-width:680px){.arena-loading .loading-art{height:115px}.arena-loading .loading-caption h2{font-size:24px;margin-bottom:12px}.arena-loading .loading-caption h2 em{margin-left:0}.arena-loading .loading-live{margin:10px 0 14px}.loading-status{font-size:17px}.loading-live #loading-elapsed{font-size:12px}.arena-loading .loading-meta{font-size:17px}.arena-loading .loading-meta>span{font-size:12px}.arena-loading .loading-steps{font-size:10px;gap:4px}.arena-loading .loading-steps li{flex:1}.arena-loading .loading-steps b{font-size:11px}.arena-loading #loading-detail,.loading-support p{font-size:12px}.loading-support{padding:8px 10px}.arena-loading{padding-top:14px;padding-bottom:14px}}
/* A single loading focus, with secondary diagnostics kept beneath the bar. */
body:has(.arena-loading){height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column}body:has(.arena-loading) .masthead{width:100%;flex:0 0 auto;padding-top:18px;padding-bottom:18px}body:has(.arena-loading) #account-control{visibility:hidden}body:has(.arena-loading) footer{display:none}body:has(.arena-loading) #app{flex:1;display:grid;place-items:center;min-height:0;max-width:none;width:100%;margin:0;padding:28px 24px;overflow:auto}.arena-loading{width:min(760px,100%);max-height:640px;height:100%;display:flex;flex-direction:column;justify-content:center;isolation:isolate;padding:24px 0;border:0}.loading-watermark{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none;color:var(--paper);opacity:.025;font:700 clamp(180px,28vw,440px) Georgia,serif}.loading-watermark span{position:absolute;left:2vw;top:0;transform:rotate(-14deg)}.loading-watermark span+span{left:auto;top:auto;bottom:-.2em;right:-.03em;transform:rotate(12deg)}.loading-focus{text-align:center;margin-bottom:38px}.loading-emblem{position:relative;display:grid;place-items:center;width:44px;height:50px;margin:0 auto 28px;background:var(--paper);color:var(--bg);border-bottom:4px solid #bfb698;border-radius:3px;font:700 31px Georgia,serif;animation:letter-drift 4.4s ease-in-out infinite;--tilt:-5deg}.loading-emblem small{position:absolute;right:4px;bottom:2px;font:9px sans-serif}.arena-loading .loading-status{display:flex;justify-content:center;align-items:center;gap:18px;color:var(--ink);font-size:clamp(40px,4.8vw,64px);font-weight:750;line-height:1.2;letter-spacing:0;margin:0 0 18px}.arena-loading .loading-status i{width:12px;height:12px;flex:0 0 12px}.arena-loading #loading-stage{font-size:18px;line-height:1.5;color:var(--orange);margin:0}.loading-console{width:min(640px,100%);margin:0 auto}.arena-loading .loading-meta{font-size:13px;margin:0 0 10px}.arena-loading .loading-meta>span{font-size:13px;font-weight:500;color:var(--muted)}.arena-loading .loading-meta #loading-count{color:var(--ink);font-weight:650}.arena-loading .loading-rail{height:20px;border-color:#657a64}.loading-progress-copy{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:12px 0 0;min-height:42px}.arena-loading #loading-detail{font-size:13px;line-height:1.7;color:var(--muted);margin:0;min-height:0}.arena-loading #loading-transfer{font-size:12px;line-height:1.8;white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--muted);margin:0}.arena-loading .loading-support{min-height:38px;padding:0;background:none;border:0}.arena-loading .loading-support p{font-size:13px;color:var(--muted);line-height:1.8}.arena-loading #loading-retry{max-width:240px;margin:12px auto 0;justify-content:center}.arena-loading #loading-error-details{text-align:center}.arena-loading #loading-error-details p{text-align:left}.arena-loading.loading-failed .loading-status{font-size:clamp(30px,4vw,52px);color:var(--bad)}.arena-loading.loading-ready .loading-status{color:var(--good)}
.arena-loading .loading-rail{height:28px}.loading-rail #loading-percent{position:absolute;z-index:2;inset:0;display:flex;align-items:center;justify-content:center;font:700 17px/1 'Segoe UI','Microsoft YaHei',sans-serif;font-variant-numeric:tabular-nums;color:#fff8e3;text-shadow:0 1px 3px #102218,1px 0 2px #102218,-1px 0 2px #102218;pointer-events:none}
@media(max-width:680px){body:has(.arena-loading) .masthead{padding:10px 16px;flex-basis:54px}body:has(.arena-loading) #app{padding:20px 24px}.arena-loading{padding:12px 0;max-height:560px}.loading-focus{margin-bottom:30px}.loading-emblem{width:36px;height:42px;font-size:27px;margin-bottom:24px}.arena-loading .loading-status{font-size:clamp(29px,8.3vw,36px);gap:10px;margin-bottom:14px}.arena-loading .loading-status i{width:8px;height:8px;flex-basis:8px}.arena-loading.loading-failed .loading-status{font-size:clamp(22px,6.6vw,32px)}.arena-loading #loading-stage{font-size:16px}.arena-loading .loading-meta>span{font-size:12px}.loading-progress-copy{display:block;min-height:58px;margin-top:12px}.arena-loading #loading-detail{font-size:12px}.arena-loading #loading-transfer{font-size:11px;margin-top:4px}.arena-loading .loading-support{min-height:52px}.arena-loading .loading-support p{font-size:12px}.arena-loading #loading-retry{margin-top:8px}.loading-watermark{opacity:.02}}
@media(prefers-reduced-motion:reduce){.loading-emblem{animation:none}}
/* 字母持续缓浮；开场与大厅进场使用独立动画，避免影响操作牌。 */
.loading-tile{animation:letter-drift 4.4s ease-in-out infinite;animation-delay:calc(var(--tile)*-.48s)}
@keyframes letter-drift{0%,100%{transform:translateY(5px) rotate(var(--tilt,0deg))}50%{transform:translateY(-10px) rotate(var(--tilt,0deg))}}
@keyframes lobby-arrive{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
.landing>.intro,.landing>.entry-panel{animation:lobby-arrive .7s ease-out both}.landing>.entry-panel{animation-delay:.12s}
.landing .sample-rack .tile{animation:letter-drift 5s ease-in-out infinite;--tilt:-3deg}
.landing .sample-rack .tile:nth-child(2n){animation-delay:-1.4s;--tilt:3deg}.landing .sample-rack .tile:nth-child(3n){animation-delay:-2.7s;--tilt:-1deg}
.loading-failed .loading-tile{animation:none}
@media(prefers-reduced-motion:reduce){.loading-tile,.landing>.intro,.landing>.entry-panel,.landing .sample-rack .tile{animation:none}}
.rack{grid-template-columns:repeat(9,minmax(0,1fr))!important}.rack .tile{min-width:0}.notebook{height:100%;display:flex;flex-direction:column;gap:12px}.notebook h1{margin:8px 0}.notebook-list{min-height:0;overflow:auto}.notebook-list article{display:flex;align-items:center;gap:16px;padding:16px 0;border-bottom:1px solid var(--line)}.notebook-list article>div{flex:1}.notebook-list p{margin:5px 0}.notebook-list small{color:var(--muted)}body:has(.notebook){height:100dvh;overflow:hidden;display:flex;flex-direction:column}body:has(.notebook) main{flex:1;min-height:0;width:100%;padding:16px 24px;overflow:hidden}select{background:var(--bg);color:var(--paper);border:1px solid var(--line);padding:9px;width:100%}.custom-create label:has(#bot-difficulty){grid-column:1/-1}.tutorial-controls{min-height:0}.tutorial-note p{line-height:1.65}@media(max-width:680px){.rack{gap:4px!important}.rack .tile{font-size:22px!important}.rack .tile small{font-size:8px}.notebook-list article{gap:6px;flex-wrap:wrap}.notebook-list article>div{flex-basis:100%}.custom-create .field:has(#bot-difficulty){margin:0}}

.public-rack-label{font-size:10px;color:var(--muted);margin-top:7px}.public-rack{display:flex;gap:4px;margin-top:5px;min-width:0}.public-tile{position:relative;display:flex;align-items:center;justify-content:center;flex:0 1 28px;min-width:0;height:31px;background:var(--paper);color:#28342a;border-radius:2px;border-bottom:2px solid #bfb698;font-family:Georgia,serif}.public-tile b{font-size:18px}.public-tile small{position:absolute;right:2px;bottom:1px;font:7px 'Segoe UI',sans-serif}.player-main{min-width:0;flex:1}@media(max-width:600px){.public-rack{gap:2px}.public-tile{height:26px;flex-basis:20px}.public-tile b{font-size:14px}.public-rack-label{font-size:9px}}
.board{grid-template-rows:20px 48px 30px minmax(0,1fr)}@media(max-width:600px){.board{grid-template-rows:20px 49px 29px 30px minmax(0,1fr)}}
.board .players{align-items:start}.board .player{align-items:start}

.opponent-hand{padding:8px 10px;margin-bottom:12px;border:1px solid var(--line);background:#15251d80;border-radius:3px}.opponent-hand .public-rack{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:4px}.opponent-hand .public-tile{height:32px}.opponent-hand .public-tile b{font-size:20px}.opponent-hand .rack-header{margin-bottom:5px}@media(max-width:600px){.opponent-hand{padding:6px 8px;margin-bottom:10px}.opponent-hand .public-tile{height:28px}.opponent-hand .public-tile b{font-size:18px}}

.board .shared-table{display:flex;flex-direction:column;align-items:stretch;gap:5px}.board .shared-table>.opponent-hand{margin:0}.board .shared-table>.hand-area{margin-top:5px}.board .crossword{width:min(100%,calc(100dvh - 390px));flex-shrink:0}.board .shared-table .hand-area .rack .tile{height:40px;font-size:24px}.board .shared-table .hand-footer{margin:4px 0}.board .shared-table .quick-actions{margin:3px 0}.board .shared-table .quick-actions .secondary{padding:7px 10px}.board .shared-table .board-key{display:none}@media(max-width:680px){.board .crossword{width:min(100%,calc(100dvh - 395px))}.board .shared-table>.rack-header{height:16px;font-size:10px}.board .shared-table .opponent-hand{padding:3px 8px}.board .shared-table .opponent-hand .rack-header{height:14px;font-size:10px}.board .shared-table .hand-area .rack .tile{height:35px;font-size:22px}.board .shared-table .hand-area .quick-actions .secondary{min-height:29px;padding:5px 8px}.board .shared-table .hand-footer{font-size:9px}.board .shared-table .hand-area>.rack-header{height:16px;font-size:10px}}

.language-control{margin-left:15px}.language-control select{width:auto;padding:4px 6px;font-size:12px}.masthead #account-control{margin-left:auto}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.final-comparison{padding:9px 12px;background:#15251d;border-left:3px solid var(--orange);font-size:12px}.final-comparison p{margin:4px 0}.feedback-area{min-height:0;overflow:auto}.answer-option{overflow-wrap:anywhere}.answer-option span{flex-shrink:0}

@media(min-width:681px){.board .crossword{width:min(100%,calc(100dvh - 445px))}.board .shared-table>*{flex-shrink:0}.board .shared-table>.opponent-hand{width:min(100%,calc(100dvh - 445px));align-self:center}.board .shared-table>.hand-area{width:min(100%,calc(100dvh - 445px));align-self:center}.board .shared-table .hand-footer .micro{font-size:9px}.board .shared-table .quick-actions .secondary{font-size:10px;padding:6px}}.board .phase-line strong{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.board .phase-line .clock-wrap{flex-shrink:0;white-space:nowrap}.board .word-entry{flex-shrink:0}.board .shared-table .tile small{font-size:8px}@media(max-width:680px){.board .players{align-items:start}.board .clock-wrap{font-size:10px}.board .phase-line strong{font-size:11px}.masthead .brand small{letter-spacing:2px}}

.board .table-hands{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:start;flex-shrink:0}.board .table-hands>.opponent-hand,.board .table-hands>.hand-area{width:100%;margin:0;padding:8px;border:1px solid var(--line);border-radius:3px;background:#15251d80;min-width:0}.board .table-hands .public-tile,.board .table-hands .hand-area .rack .tile{height:40px}.board .table-hands .public-tile b{font-size:24px}.board .table-hands .public-tile small{font-size:8px;right:3px;bottom:3px}.board .table-hands .public-rack{gap:4px;margin:0}.board .table-hands .hand-area .rack{gap:4px}.board .table-hands .rack-header{height:auto;min-height:18px}.board .table-hands .hand-area{display:flex;flex-direction:column}.board .table-hands .hand-area .rack{order:1}.board .table-hands .hand-area>.rack-header{order:0}.board .table-hands .quick-actions{order:2}.board .table-hands .hand-footer{order:3}.board .table-hands .public-rack-label{display:none}.board .crossword{width:min(100%,calc(100dvh - 405px))}@media(max-width:680px){.board .table-hands{grid-template-columns:minmax(0,1fr);gap:5px}.board .table-hands>.opponent-hand,.board .table-hands>.hand-area{padding:4px 8px}.board .table-hands .public-tile,.board .table-hands .hand-area .rack .tile{height:31px}.board .table-hands .public-tile b{font-size:22px}.board .crossword{width:min(100%,calc(100dvh - 440px))}.board .table-hands .hand-footer{margin:2px 0}.board .table-hands .quick-actions .secondary{min-height:24px;padding:3px 5px}.board .table-hands .rack-header{min-height:14px;font-size:10px}}
.board .table-hands>.opponent-hand,.board .table-hands>.hand-area{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:18px 40px auto auto;gap:5px}.board .table-hands .rack-header{height:18px!important;min-height:18px;margin:0!important;padding:0}.board .table-hands .public-rack,.board .table-hands .hand-area .rack{margin:0!important}.board .table-hands .quick-actions{margin:0}@media(max-width:680px){.board .table-hands>.opponent-hand,.board .table-hands>.hand-area{grid-template-rows:14px 31px auto auto;gap:3px}.board .table-hands .rack-header{height:14px!important;min-height:14px}}

.answer-comparison{display:grid;grid-template-columns:1fr;gap:10px;margin:12px 0}.answer-comparison section{padding:12px 14px;border:1px solid;border-radius:3px}.answer-selected.wrong{border-color:#d87b65;background:#38261f}.answer-selected.matched{border-color:#a3be80;background:#24372a}.answer-correct{border-color:#acc989;background:#233a2b}.answer-caption{display:block;font-size:12px;font-weight:700;letter-spacing:.3px}.answer-selected.wrong .answer-caption{color:#ffb299}.answer-correct .answer-caption,.answer-selected.matched .answer-caption{color:#d0ecac}.answer-comparison p{margin:7px 0 0;line-height:1.6;color:var(--paper);font-size:15px;overflow-wrap:anywhere}.word-preview.invalid p{margin:6px 0 0;font-size:12px}

.board{grid-template-rows:20px 82px 30px minmax(0,1fr)}.player-metrics{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:6px}.player-metrics>div{position:relative;padding:5px 8px;background:#15251d99;border-left:2px solid var(--line);min-width:0}.player-metrics>div>span{display:block;font-size:9px;letter-spacing:1px;color:var(--muted)}.player-metrics b{font:700 26px Georgia,serif;color:var(--paper);display:inline-block;line-height:1.2}.player-metrics small{font-size:10px;color:var(--muted)}.player-metrics .hp-rail{height:3px;margin:3px 0 0}.player-metrics .score-stat{border-color:#b8c998}.player-metrics .hp-stat{border-color:var(--orange)}.board .player-title>[data-name]{font-size:12px;display:inline}.word-total{display:flex;align-items:baseline;gap:10px;margin:6px 0;color:#d4e7b8}.word-total strong{font:700 32px Georgia,serif}.word-total span{font-size:12px}.round-tally .score-summary{grid-column:1/-1;display:flex;gap:12px;align-items:baseline;color:#d4e7b8;padding-top:9px;border-top:1px solid var(--line)}.round-tally .score-summary b{font-size:32px}.board .premium>span{font-weight:700;font-size:11px}.board .premium-scope{font:6px 'Segoe UI',sans-serif!important;bottom:2px!important;left:0;right:0!important;text-align:center}.flying-word{position:fixed;left:0;top:0;z-index:1000;pointer-events:none;padding:8px 14px;border:1px solid #bfb698;background:var(--paper);color:#15251d;box-shadow:0 4px 0 #857b60;font:700 24px Georgia,serif;letter-spacing:3px;will-change:transform,opacity}.resolution-burst{position:fixed;z-index:1001;pointer-events:none;font:700 22px Georgia,serif;text-shadow:0 2px 4px #000}.resolution-burst.damage{color:#ffae7f}.resolution-burst.score{color:#d4f0a3}.board .crossword{width:min(100%,calc(100dvh - 435px))}@media(max-width:680px){.board{grid-template-rows:20px 69px 29px 30px minmax(0,1fr)}.player-metrics{gap:5px;margin-top:3px}.player-metrics>div{padding:3px 5px}.player-metrics b{font-size:20px}.player-metrics small{font-size:8px}.player-metrics>div>span{font-size:8px;letter-spacing:0}.board .crossword{width:min(100%,calc(100dvh - 460px))}.board .premium>span{font-size:8px}.board .premium-scope{font-size:4px!important}.word-total strong{font-size:28px}}

.board .cell.premium>span{transform:translateY(-3px)}.board .premium-scope{font-size:5px!important;bottom:0!important}.formed-scores{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.formed-scores span{padding:5px 8px;background:#15251d;border:1px solid var(--line);font-size:12px}.formed-scores b{color:#d4e7b8}.player-metrics b{font-variant-numeric:tabular-nums}.player-name{font-size:12px;font-weight:700}@media(max-width:680px){.board .cell.premium>span{transform:translateY(-2px)}.board .premium-scope{font-size:3.5px!important}.player-name{font-size:11px}}

/* Restore the roomy board-left, controls-right layout. */
.board .table-content{grid-template-columns:minmax(0,1.15fr) minmax(380px,1fr)}.board .shared-table{container-type:inline-size}.board .shared-table .crossword{width:min(100%,calc(100dvh - 235px));margin:0 auto}.board .turn-panel{overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:4px}.board .turn-panel>*{flex-shrink:0}.board .turn-panel .table-hands{display:flex;flex-direction:column;gap:10px;width:100%}.board .turn-panel .table-hands>div,.board .turn-panel .table-hands>aside{width:100%}.board .turn-panel .table-hands .rack-header{min-height:18px;height:18px!important;font-size:12px}.board .turn-panel .table-hands .hand-area{grid-template-rows:18px 48px auto auto;padding:10px}.board .turn-panel .table-hands .opponent-hand{grid-template-rows:18px 38px;gap:5px;padding:10px}.board .turn-panel .table-hands .hand-area .rack .tile{height:48px;font-size:28px}.board .turn-panel .table-hands .public-tile{height:38px}.board .turn-panel .table-hands .public-tile b{font-size:24px}.board .turn-panel .table-hands .tile small,.board .turn-panel .table-hands .public-tile small{font-size:9px;bottom:3px;right:3px}.board .turn-panel .table-hands .hand-footer{font-size:11px}.board .turn-panel .quick-actions .secondary{font-size:12px;padding:8px}.board .turn-panel .word-entry{margin-top:5px}.board .cell.premium>span{font-size:clamp(10px,2.5cqw,22px);transform:translateY(-.22em)}.board .premium-scope{font-size:clamp(7px,1.3cqw,12px)!important;bottom:2px!important}.board .cell.placed>span,.board .cell.ghost>span{font-size:clamp(15px,3.4cqw,30px)}@media(max-width:680px){.board .shared-table .crossword{width:min(100%,calc(100dvh - 260px))}.board .turn-panel .table-hands .hand-area{grid-template-rows:18px 43px auto auto;padding:7px}.board .turn-panel .table-hands .hand-area .rack .tile{height:43px;font-size:25px}.board .turn-panel .table-hands .opponent-hand{padding:7px;grid-template-rows:18px 34px}.board .turn-panel .table-hands .public-tile{height:34px}.board .turn-panel .table-hands{gap:7px}.board .cell.premium>span{font-size:clamp(10px,2.8cqw,18px)}.board .premium-scope{font-size:clamp(6px,1.7cqw,10px)!important}}

.crossword{position:relative;isolation:isolate}.crossword::after{content:'';position:absolute;left:50%;top:50%;width:16%;aspect-ratio:1;transform:translate(-50%,-50%) rotate(-8deg);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3Cpattern id='grain' width='4' height='4' patternUnits='userSpaceOnUse'%3E%3Cpath d='M0 1h4M1 0v4' stroke='%23d6bd77' stroke-width='.65'/%3E%3C/pattern%3E%3C/defs%3E%3Cpath d='M50 5 61 36 94 38 68 59 77 92 50 73 23 92 32 59 6 38 39 36Z' fill='url(%23grain)' stroke='%23ebd28d' stroke-width='2'/%3E%3Cpath d='M50 12 58 40 86 42 64 59 71 82 50 67 29 82 36 59 14 42 42 40Z' fill='none' stroke='%23e5ce8f' stroke-width='.8'/%3E%3C/svg%3E");background-size:contain;opacity:.45;pointer-events:none;z-index:1;transition:opacity .7s ease}.crossword.board-started::after{opacity:.075}.crossword .cell>span,.crossword .cell>small{position:relative;z-index:2}.crossword .cell>small{position:absolute}.board .turn-panel .decision{position:sticky;bottom:0;background:var(--bg);z-index:3;padding-bottom:5px}@media(prefers-reduced-motion:reduce){.crossword::after{transition:none}}

body:not(:has(.landing)) .changelog-entry{display:none}
.changelog-entry{flex-shrink:0;font-size:11px;line-height:1.25;padding:3px 0}
.changelog-dialog{width:min(680px,calc(100vw - 32px));max-height:calc(100dvh - 48px);padding:0;border:1px solid var(--line);border-top:3px solid var(--orange);border-radius:3px;background:var(--bg);color:var(--ink);overflow:auto;overscroll-behavior:contain}
.changelog-dialog::backdrop{background:#0a120ec9}
.changelog-heading{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 26px 17px;border-bottom:1px solid var(--line);background:var(--bg)}
.changelog-heading h2{font-size:26px;margin:7px 0 0}.changelog-heading .text-link{flex-shrink:0}
.changelog-releases{padding:0 26px}.release-note{padding:22px 0;border-bottom:1px solid var(--line)}.release-note:last-child{border-bottom:0}
.release-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.release-meta h3{font:700 25px Georgia,serif;color:var(--orange);margin:0}.release-meta time{font-size:12px;color:var(--muted);margin-left:auto}.release-current{border:1px solid #718364;padding:3px 7px;font-size:10px;color:var(--good)}
.release-note h4{font-size:16px;margin:12px 0 8px}.release-note ul{margin:0;padding-left:20px;font-size:14px;line-height:1.8;color:#cad2c3}.release-note li+li{margin-top:5px}
@media(max-width:680px){body:has(.landing) footer{display:flex;gap:10px}body:has(.landing) footer>span:nth-child(2){display:none}body:has(.landing) footer>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.changelog-heading{padding:16px 18px}.changelog-heading .eyebrow{font-size:8px;letter-spacing:1px}.changelog-releases{padding:0 18px}.release-meta{gap:8px}.release-meta h3{font-size:23px}.release-meta time{font-size:11px}.release-note{padding:18px 0}.release-note ul{font-size:13px}}
/* Dedicated ranking and room browser keep the main menu compact. */
body.directory-page,body:has(.room-browser){height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column}
body.directory-page .masthead,body:has(.room-browser) .masthead{width:100%;flex:0 0 52px;padding:8px 24px;margin:0 auto}
body.directory-page main,body:has(.room-browser) main{width:100%;flex:1;min-height:0;overflow:hidden;padding:14px 24px;margin:0 auto}
body.directory-page>footer,body:has(.room-browser)>footer{display:none}
.leaderboard-page,.room-browser{height:100%;min-height:0;display:flex;flex-direction:column;gap:12px}
.directory-top{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:24px}.directory-top .eyebrow{font-size:9px}
.leaderboard-hero,.browser-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;border-bottom:1px solid var(--line);padding-bottom:16px}
.leaderboard-hero h1,.browser-heading h1{font-size:40px;letter-spacing:-1px;margin:8px 0}.leaderboard-hero p,.browser-heading p{font-size:13px;color:var(--muted);line-height:1.6;margin:0}
#own-standing{min-width:250px;padding:12px 18px;border-left:3px solid var(--orange);background:#24392c}
#own-standing>span{font-size:11px;color:var(--muted)}#own-standing strong{display:block;font:700 34px Georgia,serif;color:var(--orange);margin:4px 0}#own-standing p{font-size:12px}
.directory-toolbar{display:flex;align-items:end;gap:14px;flex-shrink:0}.directory-toolbar label{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:12px;color:var(--muted)}.directory-search{flex:1}
.directory-toolbar input:not([type=checkbox]),.directory-toolbar select{height:41px;margin:0;padding:8px 11px;font-size:14px;background:#15251d;color:var(--ink);border:1px solid #53614e;border-radius:3px;min-width:0}
.directory-toolbar .secondary,.browser-heading .secondary,.directory-pagination .secondary{width:auto;justify-content:center;min-height:40px;padding:8px 18px}
#rank-status,#room-browser-status{font-size:12px;line-height:1.5;min-height:18px;margin:0;color:var(--muted);flex-shrink:0}
.leaderboard-table-wrap{flex:1;min-height:0;overflow:auto;border:1px solid var(--line)}.leaderboard-table{width:100%;border-collapse:collapse;font-size:14px;text-align:left;table-layout:fixed}
.leaderboard-table th{position:sticky;top:0;background:#2b4132;z-index:1;font-size:11px;letter-spacing:1px;color:var(--muted);padding:13px 18px}.leaderboard-table td{padding:16px 18px;border-bottom:1px solid #42544680;overflow-wrap:anywhere}
.leaderboard-table th:first-child{width:12%}.leaderboard-table th:nth-child(2){width:30%}.leaderboard-table th:nth-child(3){width:22%}.leaderboard-table .rank-position{font:700 23px Georgia,serif;color:var(--muted)}.leaderboard-table .rank-rating{font:700 23px Georgia,serif;color:var(--paper)}.rank-rating small{font:11px 'Segoe UI',sans-serif;color:var(--muted)}
.leaderboard-table tr.podium .rank-position{color:var(--orange)}.leaderboard-table tr:hover{background:#273d2d}.directory-pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px;padding-bottom:2px}
.browser-heading .secondary{flex-shrink:0}.browser-body{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1.75fr) minmax(280px,1fr);gap:20px}
.room-list-wrap{overflow:auto;border:1px solid var(--line);min-height:0}.room-list-head,.room-list-row{display:grid;grid-template-columns:minmax(0,1fr) 95px 55px 55px;gap:12px;align-items:center;padding:13px 16px}
.room-list-head{position:sticky;top:0;background:#2b4132;font-size:11px;color:var(--muted);z-index:1}.room-list-row{width:100%;border:0;border-bottom:1px solid #42544680;border-left:3px solid transparent;background:#1d2e24;color:var(--ink);text-align:left;min-height:72px;font-size:13px}
.room-list-row.selected{background:#304a36;border-left-color:var(--orange)}.room-list-row:hover{background:#2b4132}.room-list-row b{display:block;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.room-list-row small{display:block;font-size:11px;color:var(--muted);margin-top:7px}.room-status{font-size:11px}.room-status.is-waiting{color:var(--good)}.room-status.is-playing{color:var(--orange)}
.room-detail{display:flex;flex-direction:column;overflow:auto;min-height:0;border:1px solid var(--line);padding:20px;background:#213428}.room-detail h2{font-size:24px;overflow-wrap:anywhere;margin:12px 0}.room-detail-main>p{font-size:12px;color:var(--muted);line-height:1.8}.room-detail dl{font-size:12px;line-height:1.6}.room-detail dt{color:var(--muted);margin-top:12px}.room-detail dd{margin:4px 0 0;overflow-wrap:anywhere}.room-join-actions{margin-top:auto;padding-top:15px}.room-join-actions button+button{margin-top:9px}.room-join-actions .micro{margin-bottom:0}.directory-empty{padding:22px;color:var(--muted);font-size:13px;line-height:1.7}.directory-empty h2{color:var(--paper);font-size:22px}
@media(max-width:680px){body.directory-page .masthead,body:has(.room-browser) .masthead{padding:6px 12px;flex-basis:46px}body.directory-page main,body:has(.room-browser) main{padding:10px 12px}.directory-top .eyebrow{font-size:7px;letter-spacing:1px}.leaderboard-page,.room-browser{gap:9px}.leaderboard-hero{gap:14px;align-items:stretch;padding-bottom:10px}.leaderboard-hero h1,.browser-heading h1{font-size:27px}.leaderboard-hero>div:first-child>p{display:none}#own-standing{min-width:0;max-width:53%;padding:8px 10px}#own-standing strong{font-size:25px}#own-standing p{font-size:10px}.directory-toolbar{gap:8px}.directory-toolbar label{font-size:10px;gap:5px}.directory-toolbar input:not([type=checkbox]),.directory-toolbar select{font-size:12px;height:36px;padding:6px;max-width:100%}.directory-toolbar .secondary,.directory-pagination .secondary,.browser-heading .secondary{font-size:11px;min-height:36px;padding:6px 10px}.leaderboard-table th,.leaderboard-table td{padding:12px 7px}.leaderboard-table{font-size:12px}.leaderboard-table .rank-extra{display:none}.leaderboard-table th:first-child{width:15%}.leaderboard-table th:nth-child(2){width:33%}.leaderboard-table th:nth-child(3){width:28%}.leaderboard-table .rank-position,.leaderboard-table .rank-rating{font-size:17px}.browser-heading{gap:12px;padding-bottom:8px}.browser-heading h1{font-size:23px}.browser-heading p{font-size:11px}.room-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.room-filters .directory-search{grid-column:1/-1}.browser-body{grid-template-columns:1fr;grid-template-rows:minmax(120px,1fr) minmax(130px,1fr);gap:9px}.room-list-head,.room-list-row{grid-template-columns:minmax(0,1fr) 66px 38px;gap:8px;padding:9px}.room-list-row{min-height:59px}.room-list-row b{font-size:13px}.room-extra{display:none}.room-detail{padding:12px}.room-detail h2{font-size:18px;margin:6px 0}.room-detail-main>p{margin-bottom:5px}.room-detail dl{display:none}.room-join-actions{padding-top:8px}.room-join-actions .primary,.room-join-actions .secondary{padding:9px 12px;font-size:12px}.room-join-actions .micro{font-size:10px;margin-top:4px}.directory-empty{padding:12px}}
.leaderboard-table tr.own-row{background:#304a36}.room-detail{overflow:hidden}.room-detail-main{flex:1;min-height:0;overflow:auto}.room-join-actions{flex-shrink:0}
@media(max-width:680px){body.directory-page .brand,body:has(.room-browser) .brand{gap:8px;font-size:12px;letter-spacing:1px}body.directory-page .brand-mark,body:has(.room-browser) .brand-mark{width:32px;line-height:32px;font-size:24px;flex-shrink:0}body.directory-page .brand>span:last-child,body:has(.room-browser) .brand>span:last-child{white-space:nowrap}body.directory-page .brand small,body:has(.room-browser) .brand small{font-size:7px;letter-spacing:1px}.room-join-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.room-join-actions button+button{margin:0}.room-join-actions .micro{grid-column:1/-1;margin:0;line-height:1.4}}

body:has(.custom-room-lobby){height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column}body:has(.custom-room-lobby) .masthead{width:100%;flex:0 0 52px;padding:8px 24px;margin:0 auto}body:has(.custom-room-lobby) main{width:100%;flex:1;min-height:0;overflow:hidden;padding:14px 24px;margin:0 auto}body:has(.custom-room-lobby)>footer{display:none}.custom-room-lobby{height:100%;min-height:0;display:flex;flex-direction:column;gap:16px}.custom-room-lobby h1{font-size:32px;margin:6px 0;letter-spacing:0}.room-lobby-content{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);gap:24px;flex:1;min-height:0}.room-lobby-content>div:first-child{display:flex;flex-direction:column;gap:16px;min-height:0}.room-seats{display:grid;grid-template-columns:1fr 1fr;gap:14px}.room-seat{padding:22px;border:1px solid var(--line);border-top:3px solid var(--orange);background:#22372a;overflow-wrap:anywhere}.room-seat h2{font-size:21px;margin:12px 0}.room-seat p{font-size:12px;color:var(--muted);margin:0}.observer-seats{flex:1;min-height:80px;overflow:auto;border:1px solid var(--line);padding:18px}.observer-seats h2{font-size:16px}.observer-seats>div{display:flex;justify-content:space-between;align-items:center;padding:7px 0;border-top:1px solid var(--line);font-size:13px}.observer-seats>p{font-size:12px;color:var(--muted)}.room-lobby-actions{margin-top:auto}.room-lobby-settings{overflow:auto;padding:20px;border:1px solid var(--line);background:#203327}.room-lobby-settings h2{font-size:19px}.room-lobby-settings p{font-size:12px;line-height:1.8;color:var(--muted)}.room-lobby-settings summary{margin-bottom:15px;color:var(--orange);font-size:13px;cursor:pointer}.room-lobby-settings select{width:100%;padding:9px;background:var(--bg);color:var(--ink);border:1px solid var(--line)}.room-lobby-settings .settings-grid input{width:100%}.room-lobby-settings .field{margin:12px 0}.room-lobby-settings .check{font-size:12px}
@media(max-width:680px){body:has(.custom-room-lobby) .masthead{padding:6px 12px;flex-basis:46px}body:has(.custom-room-lobby) main{padding:10px 12px}.custom-room-lobby{gap:10px}.custom-room-lobby h1{font-size:23px}.custom-room-lobby .browser-heading{align-items:center}.room-lobby-content{grid-template-columns:1fr;grid-template-rows:minmax(210px,1.4fr) minmax(100px,1fr);gap:10px}.room-lobby-content>div:first-child{gap:10px}.room-seat{padding:12px}.room-seat h2{font-size:16px}.room-seats{gap:8px}.observer-seats{padding:10px;min-height:65px}.observer-seats h2{font-size:13px;margin-bottom:6px}.room-lobby-settings{padding:12px}.room-lobby-settings h2{font-size:16px}.room-lobby-actions .primary{padding:11px}.custom-room-lobby .brand-mark{width:32px;line-height:32px;font-size:24px}}
/* Explicit exchange selection is separate from spelling. */
.board .turn-panel .table-hands>.hand-area{display:flex;flex-direction:column;gap:6px}.board .turn-panel .table-hands .hand-area>.rack-header{order:0}.board .turn-panel .table-hands .hand-area>.rack{order:1}.board .turn-panel .table-hands .hand-area>.quick-actions{order:2}.board .turn-panel .table-hands .hand-area>.exchange-controls{order:3}.board .turn-panel .table-hands .hand-area>.hand-footer{order:4}
.exchange-controls{padding:10px 0;display:flex;flex-wrap:wrap;gap:10px;align-items:center;border-top:1px solid var(--line)}
.exchange-controls p{flex-basis:100%;margin:0;font-size:14px}.exchange-controls .primary{padding:10px 14px;font-size:15px}.exchange-mode .rack{outline:2px solid var(--orange);outline-offset:4px}.history-turn{padding:10px 0;border-bottom:1px solid var(--line)}.history-turn summary{cursor:pointer;font-weight:700}.history-turn .answer-comparison{margin:10px 0}#game-info{max-height:85dvh;overflow:auto}.private-draft{padding:10px 0}.private-draft h3{margin:4px 0}.private-draft p{margin:4px 0}
