:root{--bg:#102c27;--bg-deep:#0c211e;--surface:#173831;--surface2:#20443b;--line:#34544b;--text:#f4f2df;--muted:#a8beb1;--accent:#d7eea1;--ink:#18352c;--tile:#f3e6c9;--tile-edge:#c5ad7f;--danger:#ffb6a6;--dw:#a76b62;--tw:#873f42;--dl:#4e7d84;--tl:#32616e;--radius:18px;--shadow:0 14px 40px #04181330}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,"Segoe UI",system-ui,-apple-system,sans-serif;font-size:15px;line-height:1.5;background-image:radial-gradient(ellipse at 85% 8%,#2b514433,transparent 46%);min-height:100vh}button,input,select{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:4px}a{color:inherit}button,input,select{-webkit-appearance:none}button{border:0}input,select{border:1px solid var(--line);background:var(--bg-deep);border-radius:10px;padding:12px 14px;color:var(--text);width:100%;min-height:48px}select{appearance:auto}input::placeholder{color:#79978a}[hidden]{display:none!important}.plain{padding:0;background:none;border:0}.muted{color:var(--muted)}.app{max-width:1256px;margin:0 auto;padding:0 42px}.topbar{display:flex;justify-content:space-between;align-items:center;padding:28px 0;border-bottom:1px solid var(--line);gap:16px}.brand{display:flex;align-items:center;gap:13px;text-align:left;letter-spacing:2px;font-size:19px;font-weight:750;white-space:nowrap}.brand-caption{display:block;font-size:8px;letter-spacing:1.45px;color:var(--muted);margin-top:3px;font-weight:500}.brand-tile{display:inline-flex;position:relative;justify-content:center;align-items:center;background:var(--accent);color:var(--ink);font-family:Georgia,serif;font-size:33px;line-height:1;width:45px;height:46px;border-radius:10px;box-shadow:0 3px 0 #89aa61;transform:rotate(-5deg);letter-spacing:0}.brand-tile sub{position:absolute;right:5px;bottom:5px;font-size:10px;font-family:system-ui}.top-actions{display:flex;align-items:center;gap:10px}.edition{font-size:9px;letter-spacing:1.5px;font-weight:700;margin-right:18px;display:flex;align-items:center;gap:9px}.polish-flag{width:17px;height:12px;display:inline-block;border-radius:2px;background:linear-gradient(#eee 50%,#ce6769 50%)}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;background:transparent;border:1px solid var(--line);border-radius:10px;color:var(--muted);flex-shrink:0;font-size:23px}.icon-button:hover{background:var(--surface2);color:var(--text)}svg.icon,span[data-icon] svg{display:block;width:20px;height:20px;stroke:currentColor;stroke-width:1.65;fill:none;stroke-linecap:round;stroke-linejoin:round}.button{display:inline-flex;justify-content:center;align-items:center;gap:9px;padding:12px 18px;border:1px solid transparent;border-radius:11px;font-size:13px;font-weight:650;min-height:46px;transition:background .15s,transform .15s}.button:hover:not(:disabled){transform:translateY(-1px)}.button.accent{background:var(--accent);color:var(--ink);box-shadow:0 3px 0 #9cb46d}.button.ghost{background:transparent;border-color:var(--line)}.button.ghost:hover:not(:disabled){background:var(--surface2)}.button.small{min-height:38px;padding:8px 12px;font-size:12px}.button.danger{background:#563d39;color:#ffcab5}.button.wide{width:100%}.text-button{padding:0;background:transparent;display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);text-decoration:none}.text-button:hover{color:var(--accent)}.text-button svg{width:16px!important;height:16px!important}.eyebrow{font-size:9px;letter-spacing:1.7px;font-weight:750}.portal-link{color:var(--muted);text-decoration:none;display:inline-flex;gap:10px}.portal-link span{color:#658e7a}.home-intro{display:grid;grid-template-columns:1.05fr 1fr;align-items:center;padding:62px 0 53px;min-height:400px;overflow:hidden}.home h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(42px,4.7vw,66px);line-height:1.06;font-weight:400;letter-spacing:-2px;margin:25px 0 22px}.home h1 em{color:var(--accent);font-weight:400}.lead{color:var(--muted);line-height:1.8;font-size:14px}.home-facts{display:flex;align-items:center;gap:20px;font-size:10px;margin-top:24px;color:var(--muted)}.home-facts span{display:flex;align-items:center;gap:6px}.home-facts span+span:before{content:'·';margin-right:10px;color:#587d6d}.home-facts i,.turn-label i{height:6px;width:6px;background:var(--accent);display:inline-block;border-radius:50%}.hero-art{height:290px;position:relative;display:flex;justify-content:center;align-items:center;isolation:isolate}.orbit{position:absolute;border:1px solid #74978725;border-radius:50%;width:320px;height:320px;z-index:-1}.orbit-two{width:420px;height:420px}.hero-tiles{display:flex;gap:10px;transform:rotate(-9deg) translate(-10px,-3px);z-index:2}.hero-tile{width:68px;height:76px;background:linear-gradient(140deg,#fff3d8,#e6d1a5);color:#204536;border:1px solid #f8edcf;box-shadow:2px 6px 0 #a28a61,6px 16px 20px #06151148;border-radius:9px;font-family:Georgia,serif;font-size:48px;line-height:70px;text-align:center;position:relative}.hero-tile:nth-child(2){transform:translateY(-12px) rotate(-4deg)}.hero-tile:nth-child(4){transform:translateY(5px) rotate(4deg)}.hero-tile sub{position:absolute;right:7px;bottom:5px;font-family:system-ui;font-size:11px;line-height:1}.hero-tray{position:absolute;top:171px;width:415px;height:17px;background:#597a52;box-shadow:0 5px 0 #254932;transform:rotate(-9deg);border-radius:5px;z-index:1}.art-badge{position:absolute;top:17px;left:47px;font-size:8px;letter-spacing:1.8px;transform:rotate(-9deg);background:var(--surface2);border:1px solid var(--line);padding:8px 12px;border-radius:6px;display:flex;gap:10px}.art-badge span{color:var(--accent)}.floating-score{position:absolute;right:10px;bottom:0;background:#f1ebd7;color:var(--ink);padding:16px 23px;border-radius:11px;box-shadow:var(--shadow);transform:rotate(5deg);z-index:3}.floating-score>span{display:block;font-size:8px;letter-spacing:.7px}.floating-score>span:last-child{font-size:10px;letter-spacing:0;color:#62705b}.floating-score strong{font-size:37px;line-height:1.5}.floating-score small{font-size:14px;font-weight:400}.art-star{position:absolute;color:var(--accent)}.star-one{font-size:44px;top:8px;right:28px;transform:rotate(12deg)}.star-two{font-size:30px;bottom:36px;left:38px}.art-label{position:absolute;left:80px;bottom:15px;font-size:8px;letter-spacing:1.6px;color:#829d8f;transform:rotate(-9deg)}.section-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 18px}.section-heading h2{font-weight:550;font-size:20px;margin:0;letter-spacing:-.4px}.section-heading>span{font-size:10px;color:var(--muted)}.mode-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px}.mode-card{text-align:left;padding:22px 22px 0;border:1px solid var(--line);border-radius:var(--radius);background:linear-gradient(145deg,#1b3b33,#17352f);color:var(--text);transition:transform .18s,border-color .18s;min-height:248px;display:flex;flex-direction:column;position:relative;overflow:hidden}.mode-card:hover{transform:translateY(-5px);border-color:var(--accent)}.mode-card.primary-card{background:var(--accent);color:var(--ink);border-color:var(--accent)}.card-number{font-size:8px;font-weight:750;letter-spacing:1.1px;opacity:.62}.mode-icon{display:flex;align-items:center;justify-content:center;width:43px;height:43px;border:1px solid #6a887650;border-radius:12px;margin-top:21px}.mode-icon svg{width:25px!important;height:25px!important}.primary-card .mode-icon{border-color:#37513c38}.mode-card h3{font-size:18px;letter-spacing:-.5px;margin:17px 0 8px;font-weight:600}.mode-card p{font-size:11px;line-height:1.8;margin:0 0 23px;color:var(--muted)}.primary-card p{color:#4b6243}.card-footer{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #68807438;padding:14px 0;font-size:9px;margin-top:auto}.card-footer b{font-size:20px;font-weight:400}.daily-card .mode-icon{color:var(--accent)}.home-bottom{margin:32px 0 44px;display:flex;align-items:center;gap:28px}.home-bottom>div{display:flex;align-items:center;gap:14px;margin-right:auto}.home-bottom p{font-size:10px;color:var(--muted);margin:0;line-height:1.8}.home-bottom p strong{font-weight:500;color:var(--text);font-size:11px}.tiny-tile{height:40px;width:38px;border:1px solid #658369;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;font-family:Georgia,serif;font-size:25px;position:relative;color:var(--accent)}.tiny-tile sub{font-size:8px;position:absolute;bottom:3px;right:4px}.footer{display:flex;align-items:center;gap:24px;justify-content:space-between;border-top:1px solid var(--line);padding:22px 0;color:#91a99b;font-size:8px;letter-spacing:1.1px}.footer a{text-decoration:none}.footer-link{color:#91a99b;font-size:9px;letter-spacing:.2px;margin-left:auto}.footer-dot{margin:0 7px;color:#527564}.resume-panel{display:flex;align-items:center;gap:15px;border:1px solid #637a51;background:#284536;padding:14px 20px;border-radius:12px;margin:0 0 25px}.resume-panel p{margin:0;font-size:12px;flex:1}.resume-panel small{color:var(--muted)}
.game{padding:28px 0 40px}.game-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.back-button{font-size:10px;margin-bottom:8px}.game-title-row{display:flex;align-items:center;gap:12px}.game-title-row h1{font-size:25px;font-weight:550;letter-spacing:-.7px;margin:0}.pill{padding:3px 8px;border:1px solid var(--line);border-radius:5px;font-size:8px;letter-spacing:.6px;color:var(--muted);white-space:nowrap}.game-heading-right{display:flex;align-items:center;gap:15px}.connection{font-size:10px;color:var(--accent)}.connection.offline{color:var(--danger)}.game-layout{display:grid;grid-template-columns:minmax(0,760px) minmax(240px,300px);gap:30px;align-items:start;justify-content:center}.play-area{min-width:0;max-width:760px}.board-meta{display:flex;align-items:center;gap:14px;margin-bottom:12px;font-size:10px;color:var(--muted)}.turn-label{color:var(--accent);font-weight:600;display:flex;gap:7px;align-items:center;margin-right:auto}.zoom-button{border:1px solid var(--line);background:transparent;color:var(--muted);border-radius:6px;font-size:15px;padding:0 7px;height:24px}.board-shell{background:var(--bg-deep);border:1px solid #4b6d58;border-radius:13px;padding:9px;box-shadow:0 8px 0 #08231b,0 18px 40px #051a1426;overflow:auto;overscroll-behavior-x:contain;scrollbar-color:#577652 var(--bg-deep)}.board-zoom{width:100%}.board-shell.zoomed .board-zoom{min-width:780px}.board-frame{display:grid;grid-template-columns:17px minmax(0,1fr);grid-template-rows:17px minmax(0,1fr);gap:3px}.board-corner{font-size:9px;text-align:center;color:#6c8a72}.coord-top{display:grid;grid-template-columns:repeat(15,1fr)}.coord-top span,.coord-left span{font-size:8px;color:#92a68f;display:flex;align-items:center;justify-content:center}.coord-left{display:grid;grid-template-rows:repeat(15,1fr)}.board{display:grid;grid-template-columns:repeat(15,minmax(0,1fr));aspect-ratio:1;gap:3px}.board-cell{aspect-ratio:1;min-width:0;padding:0;border-radius:3px;background:#345047;display:flex;align-items:center;justify-content:center;position:relative;color:#a8baad;border:1px solid #426153;transition:filter .1s;touch-action:manipulation;line-height:1}.board-cell:hover{filter:brightness(1.2)}.board-cell.dw{background:var(--dw);border-color:#af7d70;color:#ffded5}.board-cell.tw{background:var(--tw);border-color:#9d5757;color:#f2c9c4}.board-cell.dl{background:var(--dl);border-color:#628f95;color:#d2eceb}.board-cell.tl{background:var(--tl);border-color:#487683;color:#b9dce6}.board-cell .premium-label{font-size:clamp(5px,.74vw,9px);line-height:1.15;font-weight:650;text-align:center;pointer-events:none}.board-cell .center-star{font-size:22px;line-height:1}.board-cell.has-tile{background:linear-gradient(135deg,#f8edce,#e9d7af);color:#223f2f;border:1px solid #fff0c9;box-shadow:0 2px 0 #a19068}.board-cell .tile-letter{font-size:clamp(10px,1.7vw,24px);font-weight:650;line-height:1;pointer-events:none}.board-cell .tile-value{position:absolute;right:3px;bottom:2px;font-size:clamp(5px,.59vw,8px);font-weight:500;pointer-events:none}.board-cell.blank .tile-letter{color:#55774e}.board-cell.blank:after{content:'';position:absolute;left:3px;bottom:2px;border-bottom:1px solid #55774e;width:5px}.board-cell.pending{background:#daf1a6;border-color:#e8f7bc;box-shadow:0 2px 0 #8baa63}.board-cell.last-move:not(.pending):before{content:'';position:absolute;left:3px;top:3px;width:3px;height:3px;border-radius:50%;background:#ba6e44}.board-cell.cursor{outline:2px solid #fffbe2;outline-offset:-2px;z-index:1}.board-cell.cursor:not(.has-tile):after{content:attr(data-arrow);font-size:14px;color:#f5f8d3;position:absolute;bottom:0;right:1px}.board-cell.drop-target{outline:3px solid var(--accent);outline-offset:-3px}.board-legend{display:flex;justify-content:center;gap:18px;margin:18px 0 15px;color:var(--muted);font-size:8px}.board-legend>span{display:flex;align-items:center;gap:5px}.swatch{height:7px;width:7px;border-radius:2px;display:inline-block}.swatch.dw{background:#c08b80}.swatch.tw{background:#9d5355}.swatch.dl{background:#79a2a7}.swatch.tl{background:#43778a}.rack-panel{border:1px solid var(--line);background:#183a30;border-radius:14px;padding:15px 20px 12px}.rack-caption{display:flex;justify-content:space-between;font-size:8px;font-weight:650;letter-spacing:1.5px;color:var(--muted);margin-bottom:12px}.rack-caption>span:last-child{font-weight:400;letter-spacing:0}.rack{display:flex;align-items:center;justify-content:center;gap:9px;min-height:58px}.rack-tile{width:min(10.2vw,58px);height:min(11.2vw,62px);min-width:33px;min-height:38px;border-radius:7px;border:1px solid #fff0d1;background:linear-gradient(135deg,#f9eccd,#e9d6ad);color:#204132;box-shadow:0 4px 0 #ab986a;position:relative;font-size:clamp(23px,2.6vw,32px);font-weight:650;display:flex;align-items:center;justify-content:center;transition:transform .15s;touch-action:none;user-select:none}.rack-tile:hover{transform:translateY(-3px)}.rack-tile.selected{transform:translateY(-7px);background:#d9f29f;outline:2px solid var(--accent);outline-offset:3px;box-shadow:0 4px 0 #8eae5b}.rack-tile.in-use{opacity:.2;box-shadow:none;transform:none;pointer-events:none}.rack-tile.blank{color:#648352}.rack-tile sub{position:absolute;right:6px;bottom:5px;font-size:10px;font-weight:400;line-height:1}.rack-tile.hidden-tile{background:#30503f;border-color:#40634c;box-shadow:0 4px 0 #102a20;color:#618466;font-size:22px}.rack-tools{display:flex;justify-content:center;gap:25px;margin-top:16px}.rack-tools .text-button{font-size:10px}.rack-tools .text-button:last-child{color:var(--accent)}#hint-count{border:1px solid #7c9265;border-radius:5px;padding:0 4px;font-size:8px}.move-panel{margin-top:14px}.move-preview{min-height:49px;font-size:11px;padding:8px 0;display:flex;align-items:center;gap:9px;flex-wrap:wrap}.move-preview strong{font-size:22px;color:var(--accent);margin-left:auto}.move-preview .error{color:var(--danger)}.preview-word{border:1px solid #446450;border-radius:6px;padding:3px 7px;font-size:10px}.move-actions{display:flex;gap:10px}.move-actions .button{min-height:47px}.move-actions .accent{margin-left:auto;min-width:45%;justify-content:space-between}.keyboard-help{font-size:9px;text-align:center;color:#809a88;margin:17px 0 0}.side-card{border:1px solid var(--line);border-radius:14px;padding:20px;margin-bottom:16px;background:#17372f}.side-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:6px}.side-heading h2{font-size:12px;margin:0;font-weight:600}.side-heading>span{font-size:9px;color:var(--muted)}.player-score{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid #3b574844;position:relative}.player-score:last-child{border-bottom:0}.avatar{height:34px;width:34px;border-radius:50%;background:#31523e;color:var(--accent);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;flex-shrink:0;border:1px solid #577246}.avatar.p1{background:#3c4d61;border-color:#516980;color:#c3dbe6}.avatar.p2{background:#614737;border-color:#78583e;color:#f2d5a4}.avatar.p3{background:#51405d;border-color:#6b5476;color:#e3c5f3}.player-meta{flex:1;min-width:0}.player-meta b{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}.player-meta small{font-size:9px;color:var(--muted)}.player-score>strong{font-size:24px;font-weight:500}.player-score.current .avatar{outline:2px solid var(--accent);outline-offset:3px}.player-score.current>strong{color:var(--accent)}.match-extra{font-size:10px;color:var(--muted);padding-top:12px}.match-extra:empty{display:none}.coach-card{background:linear-gradient(140deg,#304832,#223d2d);border-color:#506342}.coach-card .eyebrow{color:var(--accent);font-size:8px}.coach-card p{font-family:Georgia,serif;font-size:19px;line-height:1.45;font-weight:400;margin:12px 0 20px}.coach-card .text-button{font-size:10px;color:var(--accent)}.history{max-height:310px;overflow:auto;scrollbar-width:thin;scrollbar-color:#4b664e transparent}.empty-history{font-size:11px;color:var(--muted);text-align:center;line-height:1.8;padding:20px 0}.history-row{display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:8px;align-items:start;padding:12px 0;border-bottom:1px solid #37523e65}.history-number{font-size:9px;color:#8ba08f;margin-top:2px}.history-word{font-size:11px;font-weight:600;word-break:break-word}.history-player{font-size:9px;color:var(--muted)}.history-score{color:var(--accent);font-size:12px}.history-row:last-child{border:0}.history-bonus{font-size:8px;color:#eccf90}.lobby{max-width:620px;padding:45px 0 70px;margin:auto}.lobby h1{font-family:Georgia,serif;font-weight:400;font-size:38px;margin:16px 0}.room-code{display:flex;align-items:center;justify-content:center;gap:12px;margin:24px 0;padding:25px;border:1px dashed #769164;border-radius:16px;background:#223e2f;font-size:34px;font-weight:650;letter-spacing:7px;color:var(--accent)}.room-code small{font-size:10px;letter-spacing:0;font-weight:400;color:var(--muted)}.lobby-slots{margin:25px 0}.lobby-slot{display:flex;gap:13px;align-items:center;padding:15px 0;border-bottom:1px solid var(--line);font-size:13px}.lobby-slot small{font-size:10px;color:var(--muted);margin-left:auto}.lobby-slot.empty{color:#809589}.lobby-actions{display:flex;gap:12px;flex-wrap:wrap}.lobby-actions .accent{flex:1}.lobby-note{font-size:11px;color:var(--muted);margin-top:18px}
.modal{background:#17382e;border:1px solid #5a7558;border-radius:22px;color:var(--text);padding:32px;width:min(640px,calc(100% - 26px));max-height:90dvh;box-shadow:0 25px 100px #0008;overflow:auto}.modal::backdrop{background:#061c18ce;backdrop-filter:blur(6px)}.modal-close{position:absolute;right:14px;top:14px;border:0;font-size:28px;color:var(--muted);background:#102a22;z-index:1}.modal h2{font-family:Georgia,serif;font-size:31px;font-weight:400;line-height:1.2;margin:9px 32px 12px 0}.modal h3{font-size:14px;margin:24px 0 8px}.modal p{font-size:12px;line-height:1.8;color:var(--muted);margin:10px 0 18px}.modal label{display:block;font-size:11px;color:var(--muted);margin:17px 0 8px}.modal .form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.modal .button.wide{margin-top:24px}.mode-options{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}.option-button{background:#17332a;border:1px solid var(--line);border-radius:10px;padding:13px 5px;font-size:12px;text-align:center}.option-button.active{border-color:var(--accent);color:var(--accent);background:#2b482f}.option-button small{display:block;font-size:9px;color:var(--muted);margin-top:4px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px;flex-wrap:wrap}.inline-error{color:var(--danger)!important;margin:14px 0!important;font-size:12px!important}.room-input{text-transform:uppercase;letter-spacing:6px;font-size:23px;font-weight:650;text-align:center}.tabs{display:flex;gap:8px;margin:22px 0}.tabs button{flex:1;background:var(--bg-deep);padding:10px;border:1px solid var(--line);border-radius:8px;color:var(--muted);font-size:11px}.tabs button.active{background:#355039;color:var(--accent);border-color:#6b8454}.blank-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:8px;margin:22px 0}.blank-grid button{background:var(--tile);color:var(--ink);border-radius:6px;padding:9px 0;font-size:19px;font-weight:650;box-shadow:0 3px 0 var(--tile-edge)}.exchange-rack{display:flex;gap:12px;justify-content:center;padding:24px 0;flex-wrap:wrap}.exchange-rack .rack-tile{width:48px;height:54px}.rules-list{margin:20px 0;padding-left:23px;font-size:12px;color:var(--muted);line-height:1.8}.rules-list li{padding-bottom:12px;padding-left:4px}.rules-list strong{color:var(--text)}.rules-detail{font-size:10px!important;padding:14px;background:var(--bg-deep);border-radius:9px}.letter-table{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;font-size:10px}.letter-table span{padding:7px;border-radius:5px;background:#244334;text-align:center;color:var(--muted)}.letter-table b{color:var(--text);margin-right:4px}.chips{display:flex;gap:5px;flex-wrap:wrap}.chips button{padding:4px 8px;border:1px solid var(--line);border-radius:6px;background:transparent;font-size:10px}.dictionary-form{display:flex;gap:8px;margin:22px 0}.dictionary-form input{min-width:0}.dict-result{padding:18px;border-radius:12px;background:var(--bg-deep);font-size:13px;margin:15px 0}.dict-result.good{border-left:3px solid var(--accent)}.dict-result.bad{border-left:3px solid #cc826e}.dict-result strong{display:block;font-size:22px;letter-spacing:1px;margin-bottom:8px}.dict-result small{display:block;font-size:10px;color:var(--muted);margin-top:8px}.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:24px 0}.stat-box{padding:19px 8px;background:var(--bg-deep);border-radius:11px;text-align:center}.stat-box strong{display:block;font-size:29px;color:var(--accent);font-weight:500}.stat-box span{font-size:9px;color:var(--muted)}.badges{display:grid;grid-template-columns:1fr 1fr;gap:10px}.badge{padding:12px;border:1px solid var(--line);border-radius:10px;opacity:.45;font-size:10px;color:var(--muted)}.badge.earned{opacity:1;border-color:#758955;background:#2b462f}.badge b{display:block;font-size:11px;color:var(--text);margin-bottom:4px}.switch-row{display:flex;align-items:center;justify-content:space-between;padding:16px 0;border-bottom:1px solid var(--line);font-size:12px;gap:15px}.switch-row small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.switch-row input{appearance:auto;-webkit-appearance:auto;width:20px;height:20px;min-height:0;accent-color:var(--accent)}.privacy-curtain{text-align:center;padding:22px 4px}.privacy-curtain .avatar{margin:0 auto 22px;width:65px;height:65px;font-size:26px}.privacy-curtain h2{margin-right:0}.curtain-close-hidden .modal-close{display:none}.winner-heading{text-align:center}.winner-heading .trophy{font-size:48px}.winner-heading h2{margin-right:0}.result-row{display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}.result-row .result-meta{flex:1;font-size:12px}.result-row small{display:block;font-size:10px;color:var(--muted)}.result-row>strong{font-size:27px;color:var(--accent)}.result-tag{font-size:9px;border:1px solid #6c8251;color:var(--accent);padding:2px 6px;border-radius:5px}.toast{position:fixed;left:50%;bottom:25px;transform:translateX(-50%);padding:14px 21px;border:1px solid #78945c;background:#e1ebc5;color:#213a29;border-radius:11px;box-shadow:0 8px 35px #0004;font-size:12px;max-width:min(550px,90vw);z-index:1000;text-align:center}.drag-ghost{position:fixed;pointer-events:none;z-index:1100;width:50px;height:55px;border-radius:7px;background:var(--tile);box-shadow:0 5px 0 var(--tile-edge),0 12px 30px #0005;color:var(--ink);font-size:29px;font-weight:650;display:flex;align-items:center;justify-content:center;transform:translate(-50%,-80%)}.skip-link{position:absolute;left:-9999px;top:10px;z-index:2000;background:var(--accent);color:var(--ink);padding:12px}.skip-link:focus{left:10px}.noscript{position:fixed;inset:30% 10%;padding:25px;background:var(--tile);color:var(--ink);z-index:3000}.spinner{width:14px;height:14px;border:2px solid #729263;border-top-color:var(--accent);border-radius:50%;animation:spin 1s linear infinite;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}@keyframes newtile{0%{transform:scale(.84)}65%{transform:scale(1.1)}100%{transform:scale(1)}}.new-tile{animation:newtile .22s ease-out}.high-contrast{--bg:#061710;--bg-deep:#020e09;--surface:#173828;--surface2:#204a32;--muted:#d4e8d8;--line:#86a57a;--accent:#efffa5;--text:#fffdf0}.high-contrast .board-cell:not(.has-tile){border-color:#c5d5c1}.high-contrast .premium-label{color:white;font-weight:800}.reduced-motion *{animation:none!important;transition:none!important;scroll-behavior:auto!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(min-width:1400px){.app{max-width:1340px}.home-intro{padding-top:70px;padding-bottom:65px}.mode-card{min-height:265px}.game-layout{grid-template-columns:minmax(0,730px) 300px}}
@media(max-width:1000px){.app{padding:0 25px}.home-intro{padding:48px 0}.hero-tile{width:54px;height:64px;font-size:39px;line-height:60px}.hero-tiles{gap:8px}.hero-tray{width:334px;top:169px}.floating-score{right:0;padding:12px 16px}.hero-art{height:270px}.art-badge{left:26px;top:30px;font-size:6px}.art-label{left:50px;bottom:2px;font-size:6px}.mode-grid{gap:10px}.mode-card{padding:18px 17px 0}.mode-card h3{font-size:16px}.mode-card p{font-size:10px}.card-number{font-size:6.7px;letter-spacing:.9px}.card-footer{font-size:8px}.game-layout{grid-template-columns:minmax(0,1fr) 245px;gap:20px}.side-card{padding:15px}.board{gap:2px}.board-cell .tile-letter{font-size:clamp(10px,1.7vw,21px)}.rack-tools{gap:14px}.rack-tile{height:54px;font-size:28px}.rack{gap:7px}.rack-panel{padding:14px}.board-legend{gap:12px}.edition{margin-right:3px}.move-actions .button{padding:10px 14px}.move-actions .accent{min-width:40%}}
@media(max-width:760px){.app{padding:0 18px}.topbar{padding:20px 0}.brand{font-size:16px;letter-spacing:1.5px;gap:10px}.brand-tile{width:37px;height:39px;font-size:28px}.brand-caption{font-size:6px;letter-spacing:1.3px}.top-actions{gap:6px}.edition{display:none}.top-actions .icon-button{width:32px;height:34px}.top-actions .button{padding:6px 8px;min-height:34px}.top-actions .button .icon{display:none}.home-intro{grid-template-columns:1fr 0.85fr;min-height:325px;padding:35px 0}.home h1{font-size:44px;letter-spacing:-1.5px;margin:22px 0 18px}.lead{font-size:12px}.hero-art{transform:scale(.77);transform-origin:center;min-width:300px;margin-left:-30px}.home-facts{gap:9px;font-size:8px;margin-top:16px}.home-facts span+span:before{margin-right:3px}.portal-link{font-size:7px;gap:6px;letter-spacing:1px}.mode-grid{grid-template-columns:1fr 1fr;gap:14px}.mode-card{min-height:230px;padding:18px 20px 0}.mode-card h3{font-size:18px}.mode-card p{font-size:11px;margin-bottom:17px}.card-number{font-size:8px}.card-footer{font-size:9px}.mode-icon{margin-top:18px}.home-bottom{flex-wrap:wrap;gap:20px}.home-bottom>div{flex-basis:100%}.footer{flex-wrap:wrap;gap:10px;padding:20px 0;font-size:7px}.footer>span{flex-basis:100%}.footer-link{margin:0 auto 0 0}.game-layout{grid-template-columns:1fr;gap:20px}.play-area{max-width:650px;margin:auto;width:100%}.game-sidebar{display:grid;grid-template-columns:1fr 1fr;gap:14px;max-width:650px;width:100%;margin:auto}.scores-card{grid-column:1/-1}.scores{display:flex;gap:20px;flex-wrap:wrap}.player-score{flex:1;min-width:40%;border-bottom:0;padding:7px 0}.side-heading{margin-bottom:12px}.game-sidebar .side-card{margin:0}.scores-card .side-heading{margin-bottom:10px}.coach-card{align-self:start}.history{max-height:230px}.game{padding-top:20px}.game-title-row h1{font-size:23px}.game-heading{margin-bottom:17px}.board-cell .tile-letter{font-size:clamp(12px,4vw,24px)}.board-cell .tile-value{font-size:clamp(5px,1.5vw,9px)}.board-cell .premium-label{font-size:clamp(5px,1.55vw,9px)}.board-cell .center-star{font-size:18px}.rack-tile{width:min(10.5vw,60px);height:min(12vw,64px);font-size:32px}.rack{gap:10px}.rack-tools{gap:28px}.board-legend{font-size:8px;gap:18px}.move-preview{font-size:12px}.move-actions .accent{min-width:46%}.move-actions .button{font-size:12px}.keyboard-help{font-size:8px}.modal{padding:26px}.modal h2{font-size:29px}.game-title-row{gap:8px}.game-title-row .pill{font-size:7px}.connection{max-width:80px;text-align:right;font-size:9px}.hero-art .floating-score{right:-8px}}
@media(max-width:470px){.app{padding:0 14px}.topbar{padding:16px 0}.brand-caption{display:none}.brand{font-size:15px;letter-spacing:1px;gap:9px}.brand-tile{width:34px;height:35px;font-size:25px;border-radius:8px}.top-actions .icon-button{width:29px;height:32px}.top-actions .button{font-size:10px;padding:6px 8px}.top-actions svg{width:17px!important;height:17px!important}.home-intro{grid-template-columns:1fr;position:relative;padding:32px 0 30px;min-height:0;overflow:visible}.home h1{font-size:49px;margin:21px 0}.intro-copy{z-index:1}.hero-art{position:absolute;right:-48px;top:133px;transform:scale(.45);transform-origin:top right;opacity:.55;width:350px;pointer-events:none}.hero-art .orbit,.hero-art .art-badge,.hero-art .floating-score,.hero-art .art-label,.hero-art .star-two{display:none}.lead{font-size:11px;max-width:235px}.home-facts{margin-top:24px;font-size:8px;gap:13px}.section-heading h2{font-size:18px}.section-heading>span{font-size:9px}.mode-grid{gap:11px}.mode-card{padding:16px 15px 0;min-height:217px;border-radius:13px}.mode-icon{width:36px;height:36px;margin-top:15px;border-radius:9px}.mode-icon svg{width:22px!important;height:22px!important}.card-number{font-size:6.5px;letter-spacing:.9px}.mode-card h3{font-size:16px;margin-top:16px}.mode-card p{font-size:9px;line-height:1.8;margin-bottom:16px}.card-footer{font-size:7.4px;gap:3px;padding:12px 0;white-space:nowrap}.card-footer b{font-size:16px}.home-bottom{margin:27px 0 30px;gap:19px}.home-bottom .text-button{font-size:11px}.home-bottom p{font-size:9px}.home-bottom p strong{font-size:10px}.board-shell{padding:6px;border-radius:10px}.board-frame{grid-template-columns:11px minmax(0,1fr);grid-template-rows:12px minmax(0,1fr);gap:2px}.coord-top span,.coord-left span{font-size:6px}.board{gap:2px}.board-cell{border-radius:2px;border-width:.5px}.board-cell .tile-letter{font-size:clamp(11px,3.7vw,17px);font-weight:650}.board-cell .tile-value{font-size:5px;right:1px;bottom:1px}.board-cell .premium-label{font-size:5px}.board-cell .center-star{font-size:12px}.board-cell.last-move:not(.pending):before{height:2px;width:2px;left:2px;top:2px}.board-cell.blank:after{width:3px;left:1px;bottom:1px}.board-cell.cursor:not(.has-tile):after{font-size:9px}.board-legend{gap:11px;font-size:7px;margin:15px 0 12px}.swatch{height:6px;width:6px}.board-meta{font-size:9px;gap:8px;margin-bottom:9px}.game-title-row h1{font-size:21px}.game-title-row{flex-wrap:wrap;gap:5px}.game-heading{margin-bottom:17px}.rack-panel{padding:12px 10px;border-radius:12px}.rack{gap:7px;min-height:45px}.rack-tile{font-size:26px;min-width:28px;border-radius:5px;height:47px}.rack-tile sub{font-size:8px;right:4px;bottom:4px}.rack-caption{font-size:7px;letter-spacing:1px;margin-bottom:10px}.rack-caption>span:last-child{font-size:7px}.rack-tools{gap:20px;margin-top:15px}.rack-tools .text-button{font-size:9px;gap:4px}.rack-tools svg{width:13px!important;height:13px!important}.move-preview{font-size:10px;min-height:46px}.move-preview strong{font-size:19px}.move-actions{gap:7px}.move-actions .button{padding:10px 12px;font-size:11px;min-height:43px}.move-actions .button svg{width:15px!important;height:15px!important}.move-actions .accent{min-width:43%;padding:10px 14px}.keyboard-help{font-size:7px;margin-top:13px}.game-sidebar{gap:10px}.side-card{padding:15px}.side-heading h2{font-size:11px}.coach-card p{font-size:17px}.coach-card .eyebrow{font-size:7px}.coach-card .text-button{font-size:8px}.history-word{font-size:10px}.history-player,.history-number{font-size:8px}.history-row{gap:5px;grid-template-columns:13px minmax(0,1fr) auto}.history-score{font-size:10px}.player-score>strong{font-size:22px}.scores{gap:13px}.player-meta b{font-size:10px}.avatar{width:30px;height:30px;font-size:10px}.modal{padding:24px 20px;border-radius:17px}.modal h2{font-size:28px}.modal p{font-size:11px}.mode-options{gap:6px}.option-button{font-size:11px}.option-button small{font-size:8px}.modal .form-row{grid-template-columns:1fr;gap:0}.blank-grid{gap:7px}.blank-grid button{font-size:16px;padding:9px 0}.letter-table{grid-template-columns:repeat(4,1fr)}.stats-grid{gap:7px}.stat-box strong{font-size:25px}.stat-box span{font-size:8px}.lobby{padding-top:30px}.room-code{font-size:28px;letter-spacing:5px;padding:21px}.resume-panel{padding:13px;gap:9px}.resume-panel p{font-size:10px}.resume-panel .button{font-size:10px;padding:6px 10px}.game-heading-right{gap:8px}.hero-tray{width:340px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Słowogród 1.1 — the illustrated town and its six neighbourhoods. */
:root {
  --tile: #f5e9cd;
  --tile-edge: #b39764;
  --muted: #b0c4b5;
  --gold: #e4c684;
  --board-gold: #bda377;
}
main, .home, .intro-copy, .play-area, .game-sidebar, .game-title-row { min-width: 0; }
button, a, input, select { touch-action: manipulation; }
.icon-button { width: 42px; height: 42px; }
.top-actions .button { min-height: 42px; }
.version-label { margin-left: 7px; padding: 2px 5px; border: 1px solid #456653; border-radius: 4px; color: #b9cd9d; }

/* The town is a real illustration, framed as an invitation to play. */
.home-intro { grid-template-columns: 1fr 1.12fr; gap: 34px; padding: 50px 0 38px; overflow: visible; }
.home h1 { font-size: clamp(43px, 4.7vw, 66px); }
.hero-art-v11 { min-width: 0; width: 100%; height: 345px; margin: 0; transform: none; overflow: visible; }
.hero-town-frame { position: absolute; inset: 0 0 21px 0; overflow: hidden; border-radius: 92px 22px 22px 22px; border: 1px solid #66846980; background: #284e3d; box-shadow: 0 10px 0 #0c241c, 0 18px 30px #061b1738; }
.hero-town-frame::after { content: ''; position: absolute; inset: 8px; border: 1px solid #e6e9ba30; border-radius: 82px 16px 16px 16px; pointer-events: none; }
.hero-town { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 55% 52%; }
.hero-town-shade { position: absolute; inset: 0; background: linear-gradient(180deg, #092d1f52 0%, transparent 42%, #0b2a20b8 100%); }
.hero-art-v11 .art-badge { top: 18px; left: auto; right: 18px; max-width: calc(100% - 50px); font-size: 7px; letter-spacing: 1.2px; padding: 7px 10px; transform: none; background: #173c2ee6; border-color: #b1c29850; z-index: 2; }
.hero-art-v11 .hero-tiles { position: absolute; bottom: 29px; left: 20px; transform: rotate(-7deg); gap: 7px; }
.hero-art-v11 .hero-tile { width: 49px; height: 56px; line-height: 50px; font-size: 36px; border-radius: 7px; background: linear-gradient(155deg, #fff8e1, #f0dfb8 66%, #d8bf8e); box-shadow: 1px 5px 0 #a38a5d, 4px 10px 15px #071e1940; }
.hero-art-v11 .hero-tile sub { font-size: 8px; right: 5px; bottom: 5px; }
.hero-art-v11 .hero-tile:nth-child(2) { transform: translateY(-6px) rotate(-4deg); }
.hero-art-v11 .hero-tile:nth-child(4) { transform: translateY(3px) rotate(3deg); }
.hero-art-v11 .floating-score { right: 7px; bottom: 0; transform: rotate(3deg); padding: 12px 16px; border: 1px solid #fff8df; border-radius: 12px; }
.hero-art-v11 .floating-score strong { font-family: Georgia, serif; font-size: 36px; line-height: 1.35; }
.hero-art-v11 .floating-score small { font-family: Inter, "Segoe UI", system-ui, sans-serif; font-size: 12px; }
.hero-art-v11 .floating-score > span { font-size: 7px; }
.hero-art-v11 .floating-score > span:last-child { font-size: 9px; }
.hero-art-v11 .star-one { font-size: 25px; top: 15px; left: 14px; right: auto; z-index: 1; }
.hero-art-v11 .star-two { font-size: 28px; bottom: 107px; left: auto; right: 16px; z-index: 1; }

.campaign-door { width: 100%; display: flex; align-items: center; gap: 23px; text-align: left; padding: 18px 24px 18px 16px; margin: 8px 0 35px; border: 1px solid #859c67; border-radius: 19px; background: radial-gradient(ellipse at 12% 45%, #62754a66, transparent 47%), linear-gradient(110deg, #304f38, #1c3b2e); box-shadow: 0 4px 0 #0d271d; transition: border-color .18s, transform .18s; }
.campaign-door:hover { transform: translateY(-2px); border-color: #c3d99a; }
.campaign-door-art { flex: 0 0 88px; width: 88px; height: 88px; border-radius: 17px; background: #18392c80; box-shadow: inset 0 0 0 1px #ccda9933; }
.campaign-door-art svg { display: block; width: 100%; height: 100%; }
.campaign-door-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 5px; }
.campaign-door-kicker { color: #d9e8b5; font-size: 9px; font-weight: 700; letter-spacing: 1.6px; }
.campaign-door-copy strong { font-family: Georgia, serif; font-weight: 400; font-size: 29px; line-height: 1.2; color: #f4edce; }
.campaign-door-copy > span:last-child { color: #c0d0b7; font-size: 11px; line-height: 1.6; }
.campaign-door-progress { display: flex; align-items: center; gap: 20px; font-size: 10px; color: #d7e8b4; }
.campaign-door-progress > span { max-width: 140px; text-align: right; }
.campaign-door-progress b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #d8e7ac; color: #23462e; font-size: 24px; font-weight: 400; flex-shrink: 0; }
.mode-card { box-shadow: 0 4px 0 #0c261d; }
.mode-icon { background: linear-gradient(150deg, #3f614433, #78905716); box-shadow: inset 0 1px 0 #c1d4a51a; }
.primary-card .mode-icon { background: #edf6d92c; }
.mode-card p { font-size: 11px; }
.card-footer { white-space: normal; gap: 7px; }
.card-footer b { flex-shrink: 0; }

/* The route is a gallery of six illustrated, independently playable districts. */
.campaign { padding: 35px 0 48px; }
.campaign-heading { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 45px; align-items: center; margin: 0 0 21px; }
.campaign-heading .text-button { display: flex; margin: 0 0 23px; min-height: 32px; }
.campaign-heading .eyebrow { display: block; color: #c6d6a5; font-size: 9px; }
.campaign-heading h1 { font: 400 clamp(33px, 4vw, 48px)/1.13 Georgia, serif; letter-spacing: -1.2px; margin: 14px 0 15px; }
.campaign-heading p { max-width: 615px; margin: 0; font-size: 13px; color: var(--muted); line-height: 1.8; }
.campaign-summary { border: 1px solid #78915c; background: linear-gradient(145deg, #344d32, #1b382b); border-radius: 18px; padding: 22px 24px; display: flex; flex-direction: column; box-shadow: 0 4px 0 #0c251c; }
.campaign-summary strong { color: #e9d99d; font-size: 39px; font-weight: 550; letter-spacing: -1.5px; }
.campaign-summary strong small { color: #d2ce9b; font-size: 15px; font-weight: 400; letter-spacing: 0; }
.campaign-summary > span { color: #c4d2b8; font-size: 10px; margin-top: 1px; }
.campaign-summary .button { margin-top: 17px; }
.campaign-progress-track { height: 5px; border-radius: 9px; overflow: hidden; background: #10291d; margin-top: 15px; }
.campaign-progress-track i { display: block; height: 100%; border-radius: inherit; background: #e5cc8a; transition: width .3s; }
.campaign-free-note { padding: 13px 17px; border-left: 2px solid #7b9861; background: #17392b; border-radius: 0 9px 9px 0; color: #baceb5; font-size: 11px; line-height: 1.7; margin: 26px 0 29px; }
.campaign-chapters { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.chapter-card { --chapter-color: #a9c68b; min-width: 0; border: 1px solid #42614c; border-radius: 20px; background: #17372e; overflow: hidden; box-shadow: 0 5px 0 #0c251c; }
.chapter-card[data-chapter="2"] { --chapter-color: #9ac4ce; }
.chapter-card[data-chapter="3"] { --chapter-color: #e5c27b; }
.chapter-card[data-chapter="4"] { --chapter-color: #dba580; }
.chapter-card[data-chapter="5"] { --chapter-color: #ced58a; }
.chapter-card[data-chapter="6"] { --chapter-color: #a5bcdc; }
.chapter-header { display: flex; gap: 8px; align-items: center; min-height: 170px; padding: 8px 20px 0 0; border-bottom: 1px solid #52714a50; background: linear-gradient(160deg, #3d5d424a, #19362b00); }
.chapter-art { width: 47%; min-width: 0; flex-shrink: 0; align-self: stretch; display: flex; align-items: center; justify-content: center; }
.chapter-illustration { display: block; width: 100%; height: auto; overflow: visible; }
.chapter-info { flex: 1; min-width: 0; padding: 15px 0; }
.chapter-info .eyebrow { color: var(--chapter-color); font-size: 8px; letter-spacing: 1.5px; }
.chapter-info h2 { font: 400 25px/1.15 Georgia, serif; color: #f5edcf; margin: 9px 0; letter-spacing: -.3px; }
.chapter-info p { color: #b5c6ad; font-size: 10px; line-height: 1.7; margin: 0; }
.level-grid { padding: 15px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.level-card { position: relative; min-width: 0; min-height: 167px; display: flex; align-items: flex-start; flex-direction: column; background: #112d24; padding: 12px 10px 9px; border: 1px solid #3d5d49; border-radius: 10px; text-align: left; transition: background .15s, border-color .15s, transform .15s; }
.level-card:hover { background: #254333; border-color: var(--chapter-color); transform: translateY(-2px); }
.level-number { font-size: 13px; font-weight: 600; line-height: 1; width: 28px; height: 28px; border: 1px solid #5f7752; border-radius: 7px; display: grid; place-items: center; background: #2b4430; color: var(--chapter-color); box-shadow: 0 2px 0 #081f17; }
.level-title { font-size: 10px; font-weight: 650; line-height: 1.4; margin-top: 11px; color: #eef0d9; overflow-wrap: anywhere; }
.level-goal { color: #b7c9ac; font-size: 9px; line-height: 1.5; margin: 6px 0; }
.level-stars { display: inline-flex; gap: 3px; font-size: 16px; line-height: 1.2; color: #56704e; letter-spacing: 1px; }
.level-stars .earned, .level-stars .filled, .level-stars .on, .level-stars span.active { color: #ebca77; text-shadow: 0 1px 0 #7d612f; }
.level-card > .level-stars { margin-top: auto; padding-top: 4px; }
.level-status { font-size: 8px; line-height: 1.4; color: #a7bea3; padding-top: 9px; margin-top: 8px; border-top: 1px solid #43604970; width: 100%; }
.level-card.is-current { border-color: #c3d58b; background: linear-gradient(160deg, #374e30, #223b29); }
.level-card.is-current .level-number { color: #183c26; background: #d3e3a3; border-color: #e2edbd; }
.level-card.is-current .level-status { color: #deedb6; }
.level-card.completed, .level-card.is-completed { border-color: #779660; }
.level-card.is-completed .level-number::after { content: '✓'; position: absolute; top: 9px; right: 9px; font-size: 11px; color: #d2e5ab; }
.level-card.locked { opacity: .64; }

/* A game board made of inlaid green wood, with ivory letter tiles. */
.board-meta { min-height: 40px; font-size: 11px; }
.zoom-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 69px; height: 42px; margin-left: 0; padding: 0 10px; border-radius: 9px; border-color: #8caa6b; background: #274731; color: #e3efc0; font-size: 20px; flex-shrink: 0; }
.zoom-button::after { content: 'Zoom'; font-size: 10px; font-weight: 600; }
.zoom-button:hover { background: #3b5735; }
.board-shell { border-color: #8d825f; padding: 11px; border-radius: 15px; background: repeating-linear-gradient(2deg, #264a38 0, #264a38 3px, #244633 4px, #244633 7px); box-shadow: inset 0 0 0 3px #143526, inset 0 0 0 4px #8b86615e, 0 7px 0 #081f15, 0 12px 25px #071b153b; }
.board-zoom { container-type: inline-size; container-name: boardfield; }
.board-frame { gap: 3px; }
.coord-top, .coord-left { color: #c1c695; }
.coord-top span, .coord-left span { font-weight: 550; }
.board-corner { color: #d8c898; }
.board { gap: 3px; padding: 2px; border-radius: 4px; background: #0d2a1f; border: 1px solid #5a7552; }
.board-cell { border: 1px solid #54745c; border-radius: 4px; background: linear-gradient(150deg, #365a46, #2c4a3b); box-shadow: inset 0 1px 0 #9fbf8e12; color: #e7efcf; }
.board-cell.dw { background: linear-gradient(145deg, #a77564, #8c5b52); border-color: #c7977e; color: #fff2db; }
.board-cell.tw { background: linear-gradient(145deg, #914e53, #72383f); border-color: #b07573; color: #ffebe0; }
.board-cell.dl { background: linear-gradient(145deg, #628a8d, #467275); border-color: #94b4ae; color: #edf8e9; }
.board-cell.tl { background: linear-gradient(145deg, #3d6b7d, #2c5266); border-color: #6d93a5; color: #e1f5ff; }
.board-cell .premium-label { display: none; color: inherit; font-size: 8px; line-height: 1.2; letter-spacing: .2px; }
.board-cell:not(.has-tile):not([data-cell="112"])::before { font-size: clamp(7px, 1.8cqw, 12px); font-weight: 750; line-height: 1; color: inherit; pointer-events: none; }
.board-cell.dw:not(.has-tile):not([data-cell="112"])::before { content: '2S'; }
.board-cell.tw:not(.has-tile):not([data-cell="112"])::before { content: '3S'; }
.board-cell.dl:not(.has-tile):not([data-cell="112"])::before { content: '2L'; }
.board-cell.tl:not(.has-tile):not([data-cell="112"])::before { content: '3L'; }
.board-cell .center-star { color: #fff0b4; font-size: clamp(12px, 3cqw, 24px); text-shadow: 0 1px 0 #624b27; }
.board-cell.has-tile { background: linear-gradient(150deg, #fff6dc 0, #f1e0b8 62%, #dcc18c 100%); border: 1px solid #fff1c9; color: #203a2c; border-radius: 4px; box-shadow: inset 0 1px 0 #fffaf0, 0 2px 0 #9a8052; }
.board-cell .tile-letter { font: 700 clamp(11px, 3.12cqw, 25px)/1.05 "Segoe UI", system-ui, sans-serif; padding-bottom: 2px; text-shadow: 0 1px 0 #ffffff80; }
.board-cell .tile-value { font-size: clamp(5px, 1.06cqw, 8px); font-weight: 650; right: 2px; bottom: 2px; line-height: 1; color: #41513a; }
.board-cell.blank .tile-letter { color: #824720; }
.board-cell.blank::after { content: ''; position: absolute; left: 2px; bottom: 2px; width: 4px; height: 4px; border: 1px solid #9b6030; border-radius: 50%; }
.board-cell.pending { background: linear-gradient(150deg, #f1f7ca, #ccdf94); color: #213d20; border-color: #f4ffd0; box-shadow: inset 0 0 0 1px #8cab55, 0 2px 0 #77944d; }
.board-cell.last-move:not(.pending)::before { width: 3px; height: 3px; left: 2px; top: 2px; background: #b96939; box-shadow: 0 0 0 1px #ffe0a4; }
.board-cell.cursor, .board-cell.drop-target { outline: 2px solid #fff8cb; outline-offset: -2px; z-index: 2; }
.board-cell:focus-visible { outline: 3px solid #fff4b4; outline-offset: 1px; z-index: 3; }
.board-cell.cursor:not(.has-tile)::after { text-shadow: 0 1px 2px #001e12; color: #fff9d6; }
.board-cell.premium-target { box-shadow: inset 0 0 0 2px #fff1a6, 0 0 0 1px #e4bb58; }
.board-legend { flex-wrap: wrap; gap: 8px 20px; font-size: 9px; color: #bed1b9; margin: 16px 0; }
.board-legend > span { white-space: nowrap; }
.board-legend b { color: #f0edcf; font-size: 9px; font-weight: 700; margin-right: 1px; }
.swatch { width: 8px; height: 8px; border: 1px solid #ffffff50; border-radius: 2px; }
.rack-panel { background: linear-gradient(180deg, #284b34, #203f2c); border-color: #607a50; box-shadow: inset 0 -5px 0 #102c1f, inset 0 -7px 0 #4b6741; padding: 16px 20px 13px; }
.rack { padding-bottom: 6px; }
.rack-tile { background: linear-gradient(145deg, #fff6dd, #f1e1bd 65%, #dec796); color: #203d2b; font-weight: 700; border: 1px solid #fff0c7; box-shadow: inset 0 1px 0 #fffaf0, 0 4px 0 #a48958, 0 6px 5px #0b241a30; text-shadow: 0 1px 0 #ffffff90; }
.rack-tile sub { font-weight: 650; color: #45513b; }
.rack-tile.selected { background: linear-gradient(145deg, #eff8c5, #cfdf9a); outline: 3px solid #e7f3b7; outline-offset: 3px; box-shadow: inset 0 0 0 1px #75924b, 0 4px 0 #79944a; }
.rack-tile.blank { color: #855025; background: linear-gradient(145deg, #fff3d4, #e6cf9f); }
.rack-tile.blank::before { content: ''; position: absolute; inset: 5px; border: 1px dashed #a98b5670; border-radius: 3px; pointer-events: none; }
.rack-tile.hidden-tile { background: linear-gradient(135deg, #426148, #294a36); box-shadow: 0 4px 0 #163623; text-shadow: none; }
.rack-tools .text-button { min-height: 35px; padding: 5px 0; }
.move-preview .error { color: #ffd3a9; padding: 8px 11px; border-left: 2px solid #edab79; background: #49362a; border-radius: 0 6px 6px 0; width: 100%; }
.move-preview { min-height: 54px; }
.move-actions .button { min-height: 48px; }
.avatar { width: 39px; height: 39px; background: #284b35; border-color: #6c8856; overflow: hidden; }
.player-emblem { display: block; width: 100%; height: 100%; flex-shrink: 0; }
.player-meta b { font-size: 12px; }
.player-meta small { font-size: 10px; }
.history-word { line-height: 1.6; }

/* Mission details stay legible beside the board and above the score on a phone. */
.campaign-mission { border-color: #a0a36b; background: linear-gradient(145deg, #354b30, #1c392a); }
.mission-title { display: flex; align-items: center; gap: 10px; margin: -7px -4px 3px; }
.mission-mini { width: 73px; min-width: 73px; display: block; }
.mission-title h2 { margin: 6px 0 0; font: 400 21px/1.15 Georgia, serif; }
.mission-title .eyebrow { color: #d9dfac; font-size: 8px; letter-spacing: 1px; }
.mission-goals, .level-goals { list-style: none; padding: 0; margin: 14px 0 17px; }
.mission-goal, .level-goals li { position: relative; padding: 6px 0 6px 21px; color: #e5ead1; font-size: 11px; line-height: 1.6; }
.mission-goal::before, .level-goals li::before { content: '✦'; position: absolute; left: 0; color: #dfd594; font-size: 12px; }
.mission-progress { padding: 10px 12px; border: 1px solid #7c8e5c66; background: #152d2077; border-radius: 8px; color: #c3d1b4; font-size: 10px; line-height: 1.65; }
.mission-progress.ready { background: #d7e7a9; border-color: #e6f2c4; color: #244129; font-weight: 650; }
.level-thresholds { display: flex; justify-content: space-between; gap: 10px; padding: 15px 0 3px; color: #e1c47d; font-size: 11px; }
.level-thresholds span { text-align: center; flex: 1; }
.level-thresholds b { display: block; color: #ccd5bc; font-size: 10px; font-weight: 500; margin-top: 3px; }
.assisted-note { font-size: 9px; line-height: 1.7; color: #d3cb9a; margin: 12px 0 0; }
.level-intro-art { width: 230px; max-width: 70%; margin: -9px auto 5px; }
.level-goals { padding: 12px 16px; border: 1px solid #5b754e; background: #26422d; border-radius: 11px; }
.level-goals li { font-size: 12px; }
.level-result { position: relative; text-align: center; }
.level-result-art { width: 260px; max-width: 80%; margin: -12px auto 0; }
.level-result h2 { margin-right: 0; }
.level-result .level-stars { font-size: 34px; gap: 7px; justify-content: center; margin: 9px 0 5px; }
.level-result-score { display: flex; flex-direction: column; color: #c6d3b2; font-size: 11px; margin: 9px 0; }
.level-result-score strong { font-size: 44px; line-height: 1.15; font-weight: 550; color: #e5efb8; letter-spacing: -1px; }
.level-result .dialog-actions { justify-content: center; }
.level-result .rules-detail { text-align: left; }
.level-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.level-badges > * { padding: 7px 10px; font-size: 10px; border: 1px solid #6b8a55; background: #2d4c32; border-radius: 18px; color: #e0e9be; }
.celebration-particles { position: absolute; left: 50%; top: 44%; width: 0; height: 0; z-index: 4; pointer-events: none; }
.celebration-particles i { position: absolute; left: -3px; top: -3px; width: 7px; height: 10px; border-radius: 2px; animation: town-confetti .85s ease-out both; animation-delay: var(--delay, 0ms); }
@keyframes town-confetti { from { opacity: 0; transform: rotate(var(--angle)) translateY(0) rotate(0); } 15% { opacity: 1; } to { opacity: 0; transform: rotate(var(--angle)) translateY(calc(-1 * var(--distance))) rotate(160deg); } }
@container boardfield (min-width: 600px) {
  .board-cell:not(.has-tile):not([data-cell="112"])::before { display: none; }
  .board-cell .premium-label { display: block; font-size: clamp(7px, 1.25cqw, 9px); }
}

@media (max-width: 1100px) {
  .home-intro { gap: 23px; }
  .hero-art-v11 { height: 315px; }
  .hero-art-v11 .hero-tile { width: 39px; height: 46px; font-size: 29px; line-height: 41px; }
  .hero-art-v11 .hero-tiles { left: 13px; gap: 5px; bottom: 32px; }
  .hero-art-v11 .floating-score { padding: 10px 12px; }
  .hero-art-v11 .floating-score strong { font-size: 32px; }
  .campaign-chapters { gap: 18px; }
  .chapter-header { padding-right: 16px; min-height: 152px; }
  .chapter-info h2 { font-size: 23px; }
  .level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 13px; gap: 10px; }
  .level-card { min-height: 147px; padding: 12px; }
  .level-title { font-size: 11px; }
  .level-goal { font-size: 10px; }
  .level-status { font-size: 9px; }
  .board { gap: 2px; }
  .board-shell { padding: 9px; }
  .campaign-door { gap: 18px; }
  .campaign-door-progress { gap: 13px; }
}
@media (max-width: 800px) {
  .campaign-door-progress > span { display: none; }
  .hero-art-v11 .hero-tiles { bottom: 52px; }
  .hero-art-v11 .floating-score { bottom: 0; right: 1px; }
  .hero-art-v11 .art-badge { font-size: 6px; }
  .campaign-heading { grid-template-columns: minmax(0, 1fr) 205px; gap: 25px; }
  .campaign-summary { padding: 19px; }
  .campaign-heading h1 { font-size: 37px; }
  .campaign-heading p { font-size: 12px; }
  .chapter-info h2 { font-size: 22px; }
  .chapter-header { align-items: flex-start; flex-direction: column; gap: 0; padding: 0 18px 17px; }
  .chapter-art { width: 100%; height: 165px; margin-top: -8px; }
  .chapter-art .chapter-illustration { width: auto; max-width: 100%; max-height: 180px; }
  .chapter-info { padding: 0; }
  .chapter-info p { min-height: 35px; }
}
@media (max-width: 760px) {
  .top-actions .icon-button { width: 38px; height: 40px; }
  .top-actions .button { min-height: 40px; }
  .home-intro { grid-template-columns: 1fr 1fr; }
  .hero-art-v11 { position: relative; top: auto; right: auto; min-width: 0; width: 100%; margin: 0; transform: none; opacity: 1; }
  .hero-art-v11 .hero-tile { width: 33px; height: 39px; font-size: 25px; line-height: 35px; }
  .hero-art-v11 .hero-tiles { bottom: 69px; gap: 5px; }
  .hero-art-v11 .floating-score { padding: 9px 12px; }
  .hero-art-v11 .floating-score strong { font-size: 27px; }
  .hero-art-v11 .floating-score > span:last-child { font-size: 8px; }
  .hero-art-v11 .art-badge { font-size: 6px; letter-spacing: .6px; right: 12px; }
  .hero-town-frame { border-top-left-radius: 66px; }
  .hero-town-frame::after { border-top-left-radius: 59px; }
  .home h1 { font-size: 43px; }
  .board-cell .tile-letter { font-size: clamp(11px, 3.12cqw, 25px); }
  .board-cell .tile-value { font-size: clamp(5px, 1.06cqw, 8px); }
  .board-cell .center-star { font-size: clamp(12px, 3cqw, 24px); }
  .campaign-mission { grid-column: 1 / -1; }
  .mission-title { margin-top: -10px; }
  .mission-mini { width: 90px; min-width: 90px; }
  .mission-title h2 { font-size: 24px; }
  .mission-goals { display: flex; gap: 8px 22px; flex-wrap: wrap; margin-top: 6px; }
  .mission-goal { font-size: 12px; }
  .mission-progress { font-size: 11px; }
  .mission-title .eyebrow { font-size: 9px; }
  .campaign-mission .level-thresholds { max-width: 350px; }
  .rack-tools { gap: 24px; }
  .rack-tools .text-button { font-size: 10px; }
}
@media (max-width: 600px) {
  .home-intro { grid-template-columns: 1fr; gap: 25px; padding: 28px 0 22px; }
  .home h1 { font-size: clamp(44px, 10vw, 58px); margin: 18px 0; }
  .lead { font-size: 12px; max-width: none; }
  .home-facts { font-size: 9px; gap: 15px; margin-top: 18px; }
  .home-facts span + span::before { margin-right: 2px; }
  .hero-art-v11 { position: relative; height: 263px; width: 100%; margin: 0; transform: none; opacity: 1; }
  .hero-town-frame { inset: 0 0 18px; border-radius: 62px 18px 18px; }
  .hero-town-frame::after { border-radius: 55px 12px 12px; }
  .hero-town { object-position: 50% 55%; }
  .hero-art-v11 .art-badge { display: flex; top: 13px; right: 13px; font-size: 6px; max-width: calc(100% - 55px); }
  .hero-art-v11 .hero-tiles { bottom: 26px; left: 17px; gap: 6px; }
  .hero-art-v11 .hero-tile { width: 43px; height: 49px; line-height: 44px; font-size: 32px; }
  .hero-art-v11 .floating-score { display: block; right: 7px; bottom: 0; padding: 10px 12px; }
  .hero-art-v11 .floating-score strong { font-size: 31px; }
  .hero-art-v11 .floating-score small { font-size: 10px; }
  .hero-art-v11 .star-two { display: block; bottom: 103px; }
  .campaign-door { padding: 14px 13px 14px 11px; gap: 13px; border-radius: 15px; margin-bottom: 28px; }
  .campaign-door-art { flex-basis: 65px; width: 65px; height: 75px; border-radius: 12px; }
  .campaign-door-copy { gap: 5px; }
  .campaign-door-kicker { font-size: 7px; letter-spacing: 1px; }
  .campaign-door-copy strong { font-size: 24px; }
  .campaign-door-copy > span:last-child { font-size: 10px; }
  .campaign-door-progress { align-self: flex-start; padding-top: 4px; }
  .campaign-door-progress b { width: 27px; height: 27px; font-size: 19px; }
  .campaign { padding-top: 22px; }
  .campaign-heading { grid-template-columns: 1fr; gap: 22px; }
  .campaign-heading .text-button { margin-bottom: 18px; }
  .campaign-heading h1 { font-size: 38px; }
  .campaign-heading .eyebrow { font-size: 8px; letter-spacing: 1.1px; }
  .campaign-summary { display: grid; grid-template-columns: 1fr auto; gap: 2px 18px; padding: 16px 20px; align-items: center; }
  .campaign-summary strong { grid-column: 1; font-size: 33px; }
  .campaign-summary > span { grid-column: 1; font-size: 9px; }
  .campaign-summary .button { grid-column: 2; grid-row: 1 / 3; margin: 0; font-size: 11px; }
  .campaign-progress-track { grid-column: 1 / -1; margin-top: 13px; }
  .campaign-free-note { margin: 22px 0; font-size: 10px; }
  .campaign-chapters { grid-template-columns: 1fr; gap: 20px; }
  .chapter-header { flex-direction: row; align-items: center; min-height: 155px; padding: 5px 17px 0 0; gap: 7px; }
  .chapter-art { width: 46%; min-width: 0; height: auto; margin: 0; }
  .chapter-art .chapter-illustration { width: 100%; max-height: none; }
  .chapter-info { padding: 10px 0; }
  .chapter-info h2 { font-size: 26px; }
  .chapter-info p { min-height: 0; font-size: 10px; }
  .level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 13px; gap: 10px; }
  .level-card { min-height: 150px; }
  .level-title { font-size: 12px; }
  .level-goal { font-size: 10px; }
  .level-status { font-size: 9px; }
  .level-number { width: 31px; height: 31px; font-size: 14px; }
  .level-stars { font-size: 17px; }
}
@media (max-width: 470px) {
  .app { padding: 0 13px; }
  .topbar { gap: 8px; padding: 14px 0; }
  .brand { gap: 8px; font-size: 14px; letter-spacing: .7px; }
  .brand-tile { width: 32px; height: 35px; font-size: 25px; }
  .top-actions { gap: 5px; }
  .top-actions .icon-button { width: 36px; height: 40px; border-radius: 8px; }
  .top-actions .button { min-height: 40px; font-size: 10px; padding: 6px 8px; }
  .portal-link { font-size: 7px; letter-spacing: .8px; }
  .hero-art-v11 .hero-tile { width: 33px; height: 40px; line-height: 36px; font-size: 25px; border-radius: 6px; }
  .hero-art-v11 .hero-tiles { gap: 5px; left: 14px; bottom: 35px; }
  .hero-art-v11 .hero-tile sub { font-size: 7px; right: 4px; bottom: 4px; }
  .hero-art-v11 .floating-score { right: 4px; padding: 9px 10px; }
  .hero-art-v11 .floating-score strong { font-size: 29px; }
  .hero-art-v11 .floating-score > span { font-size: 6px; }
  .hero-art-v11 .floating-score > span:last-child { font-size: 7px; }
  .hero-art-v11 .floating-score small { font-size: 9px; }
  .hero-art-v11 .art-badge { font-size: 6px; letter-spacing: .6px; }
  .campaign-door { gap: 10px; }
  .campaign-door-art { flex-basis: 51px; width: 51px; height: 66px; }
  .campaign-door-copy strong { font-size: 22px; }
  .campaign-door-copy > span:last-child { font-size: 9px; }
  .campaign-door-progress { display: none; }
  .mode-card { padding: 16px 13px 0; }
  .mode-card p { font-size: 10px; }
  .mode-card h3 { font-size: 16px; line-height: 1.2; }
  .card-footer { font-size: 8px; line-height: 1.5; white-space: normal; }
  .card-number { letter-spacing: .7px; font-size: 7px; }
  .board-shell { padding: 7px; border-radius: 11px; }
  .board-frame { grid-template-columns: 12px minmax(0, 1fr); grid-template-rows: 13px minmax(0, 1fr); gap: 2px; }
  .coord-top span, .coord-left span { font-size: 7px; }
  .board { gap: 2px; padding: 1px; }
  .board-cell, .board-cell.has-tile { border-radius: 2px; border-width: .5px; }
  .board-cell .tile-letter { font-size: clamp(10px, 3.12cqw, 25px); padding-bottom: 1px; }
  .board-cell .tile-value { font-size: clamp(5px, 1.06cqw, 8px); right: 1px; bottom: 1px; }
  .board-cell.blank::after { width: 3px; height: 3px; left: 1px; bottom: 1px; }
  .board-cell.last-move:not(.pending)::before { width: 2px; height: 2px; left: 1px; top: 1px; box-shadow: none; }
  .board-cell.cursor:not(.has-tile)::after { font-size: 9px; }
  .board-meta { font-size: 9px; gap: 9px; }
  .zoom-button { min-width: 63px; height: 42px; padding: 0 8px; margin-left: 0; }
  .zoom-button::after { font-size: 9px; }
  .board-legend { gap: 7px 13px; font-size: 8px; margin: 14px 0; justify-content: center; }
  .board-legend b { font-size: 8px; }
  .swatch { width: 7px; height: 7px; }
  .rack-panel { padding: 13px 10px 10px; }
  .rack { gap: 6px; }
  .rack-tile { min-width: 28px; width: min(10.2vw, 58px); height: 46px; font-size: 25px; }
  .rack-tile sub { font-size: 8px; }
  .rack-caption { font-size: 8px; letter-spacing: .6px; }
  .rack-caption > span:last-child { font-size: 8px; }
  .rack-tools { gap: 10px; justify-content: space-between; margin-top: 10px; }
  .rack-tools .text-button { font-size: 9px; gap: 4px; min-height: 38px; }
  .rack-tools svg { width: 13px !important; height: 13px !important; }
  .move-actions { gap: 7px; }
  .move-actions .button { min-height: 48px; padding: 10px; font-size: 11px; }
  .move-actions .accent { min-width: 41%; padding: 10px 12px; }
  .move-preview { min-height: 52px; }
  .move-preview .error { font-size: 11px; line-height: 1.6; }
  .keyboard-help { font-size: 9px; line-height: 1.7; }
  .game-sidebar { grid-template-columns: 1fr; }
  .game-sidebar .side-card { grid-column: 1; }
  .history { max-height: 220px; }
  .history-word { font-size: 11px; }
  .history-player, .history-number { font-size: 9px; }
  .coach-card p { font-size: 19px; margin: 11px 0 14px; }
  .coach-card .text-button { font-size: 10px; min-height: 32px; }
  .avatar { width: 36px; height: 36px; }
  .player-meta b { font-size: 11px; }
  .player-meta small { font-size: 9px; }
  .mission-title h2 { font-size: 23px; }
  .mission-goals { gap: 1px; display: block; }
  .mission-goal { font-size: 11px; }
  .modal { padding: 25px 19px; max-height: 91dvh; }
  .modal p { font-size: 12px; }
  .blank-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  .blank-grid button { min-height: 44px; font-size: 20px; }
  .option-button { min-height: 48px; }
  .level-result .dialog-actions .button { flex: 1 1 auto; }
  .level-thresholds { font-size: 12px; }
  .level-intro-art { width: 210px; }
  .level-result-art { width: 230px; }
  .level-goals { padding: 10px 13px; }
  .level-goals li { font-size: 11px; }
  .campaign-summary { padding: 15px 17px; gap: 2px 10px; }
  .campaign-summary .button { font-size: 10px; padding: 8px 10px; }
  .campaign-heading h1 { font-size: 35px; }
  .chapter-info h2 { font-size: 24px; }
  .chapter-info .eyebrow { font-size: 7px; letter-spacing: 1px; }
}
@media (max-width: 355px) {
  .app { padding: 0 11px; }
  .brand { font-size: 12px; letter-spacing: .4px; gap: 6px; }
  .brand-tile { width: 29px; height: 33px; font-size: 23px; }
  .top-actions { gap: 4px; }
  .top-actions .icon-button { width: 33px; }
  .top-actions .button { font-size: 9px; padding: 6px 7px; }
  .home h1 { font-size: 44px; }
  .hero-art-v11 { height: 238px; }
  .hero-art-v11 .hero-tiles { bottom: 67px; left: 13px; }
  .hero-art-v11 .floating-score { padding: 8px 12px; }
  .hero-art-v11 .art-badge { max-width: calc(100% - 43px); gap: 5px; font-size: 5.6px; }
  .mode-card { padding: 14px 10px 0; }
  .mode-card h3 { font-size: 15px; }
  .card-number { font-size: 6px; letter-spacing: .5px; }
  .campaign-door-copy strong { font-size: 21px; }
  .campaign-door-kicker { font-size: 6px; }
  .board-legend { gap: 7px 10px; }
  .board-meta { gap: 6px; font-size: 8px; }
  .board-cell .tile-letter { font-size: 10px; }
  .rack-tile { height: 43px; font-size: 23px; }
  .rack-tools .text-button { font-size: 8px; }
  .rack-tools { gap: 6px; }
  .move-actions .button { font-size: 10px; padding: 10px 8px; }
  .move-actions .accent { min-width: 41%; padding: 10px 9px; }
  .chapter-info h2 { font-size: 22px; }
  .chapter-info p { font-size: 9px; }
  .campaign-heading h1 { font-size: 32px; }
  .campaign-heading .eyebrow { font-size: 7px; }
  .campaign-summary > span { font-size: 8px; }
  .campaign-summary strong { font-size: 30px; }
  .campaign-summary strong small { font-size: 13px; }
  .campaign-summary .button { font-size: 9px; }
}
/* A zoomed board retains full-size type even on the smallest screen. */
.zoom-button { height: 44px; }
.board-shell.zoomed .board-cell .tile-letter { font-size: 25px; }
.board-shell.zoomed .board-cell .tile-value { font-size: 8px; right: 3px; bottom: 3px; }
.board-shell.zoomed .board-cell .premium-label { display: block; font-size: 9px; }
.board-shell.zoomed .board-cell:not(.has-tile):not([data-cell="112"])::before { display: none; }
.board-shell.zoomed .board-cell .center-star { font-size: 25px; }
.board-shell.zoomed .board-cell.blank::after { width: 5px; height: 5px; left: 3px; bottom: 3px; }
.board-shell.zoomed .coord-top span, .board-shell.zoomed .coord-left span { font-size: 9px; }
.board-shell.zoomed .board-frame { grid-template-columns: 17px minmax(0, 1fr); grid-template-rows: 17px minmax(0, 1fr); }
.high-contrast .board-cell:not(.has-tile) { border-color: #e6edba; }
.high-contrast .board-cell:not(.has-tile)::before { color: white; }
.high-contrast .level-card { border-color: #91b67a; }
.high-contrast .level-title, .high-contrast .level-goal, .high-contrast .level-status, .high-contrast .mission-goal, .high-contrast .mission-progress { color: #f1f4d6; }
.high-contrast .mission-progress.ready { color: #15351f; }
.high-contrast .board-shell { border-color: #e5d68f; }
.high-contrast .rack-tile.selected { outline-color: #fffbb8; outline-width: 4px; }
.high-contrast .chapter-info p, .high-contrast .campaign-heading p, .high-contrast .campaign-free-note { color: #e2efcf; }
@media (prefers-reduced-motion: reduce) {
  .celebration-particles { display: none !important; }
}
.reduced-motion .celebration-particles { display: none !important; }

/* 1.2 — Illustrated results, legible achievements and robust board states. */
.result-illustration { display: block; width: min(100%, 310px); height: auto; margin: -13px auto 3px; overflow: visible; }
.winner-heading .trophy:has(.result-illustration) { font-size: inherit; line-height: 1; }
.winner-heading .eyebrow { color: #dcca97; }
.winner-heading h2 { font-size: clamp(27px, 4.7vw, 36px); overflow-wrap: anywhere; }
.winner-heading p { max-width: 440px; margin-left: auto; margin-right: auto; }
.result-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 5px; padding: 16px 0; }
.result-row > .avatar { grid-column: 1; grid-row: 1 / 3; align-self: center; }
.result-row > .result-meta { grid-column: 2; grid-row: 1 / 3; min-width: 0; align-self: center; }
.result-meta b { display: block; overflow-wrap: anywhere; font-size: 13px; }
.result-row small { line-height: 1.5; overflow-wrap: anywhere; }
.result-row > strong { grid-column: 3; grid-row: 1; justify-self: end; line-height: 1.15; font-variant-numeric: tabular-nums; }
.result-row > .result-tag { grid-column: 3; grid-row: 2; justify-self: end; font-size: 8px; border-color: #a89b60; color: #f1db9f; background: #3e4c2c; }
.result-row:last-of-type { border-bottom-color: #55734e; }
.privacy-art { width: min(100%, 310px); margin: -15px auto 12px; }
.privacy-illustration { display: block; width: 100%; height: auto; }
.privacy-curtain .avatar { box-shadow: 0 0 0 7px #36533a77; }
.privacy-curtain h2 { overflow-wrap: anywhere; }
.privacy-curtain p { max-width: 390px; margin-left: auto; margin-right: auto; }
.badges { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.badge { opacity: 1; display: flex; align-items: center; gap: 11px; min-width: 0; padding: 13px 12px; background: #142f27; border: 1px solid #456653; color: #bdcfc1; line-height: 1.65; }
.badge.earned { border-color: #8c9c63; background: linear-gradient(140deg, #314a32, #213e2c); }
.badge-art { width: 54px; min-width: 54px; display: block; line-height: 0; }
.achievement-emblem { display: block; width: 100%; height: auto; overflow: visible; }
.badge-copy { min-width: 0; overflow-wrap: anywhere; }
.badge b { font-size: 12px; line-height: 1.45; color: #eff1d9; }
.badge-status { display: block; margin-top: 6px; font-size: 9px; letter-spacing: .3px; color: #a5beab; }
.badge.earned .badge-status { color: #e1d59b; }
.stats-grid .stat-box { border: 1px solid #3e5e49; box-shadow: inset 0 1px 0 #b3ce9b10; }
.stat-box strong { font-variant-numeric: tabular-nums; }
.board-shell { border-color: #ad9a6b; box-shadow: inset 0 0 0 3px #153e2a, inset 0 0 0 4px #baa36b7d, 0 7px 0 #081f15, 0 12px 25px #071b153b; }
.board-cell.dw:not(.has-tile) { background: linear-gradient(145deg, #8f5e50, #784a44); }
.board-cell.tw:not(.has-tile) { background: linear-gradient(145deg, #84454c, #67313a); }
.board-cell.dl:not(.has-tile) { background: linear-gradient(145deg, #416d72, #31575d); }
.board-cell.has-tile { box-shadow: inset 0 1px 0 #fffaf0, inset 0 -1px 0 #e7cd96, 0 2px 0 #96774b; }
.board-cell.pending { border-color: #e8f4ba; box-shadow: inset 0 0 0 1px #779647, 0 2px 0 #77944d; }
.board-cell.has-tile.last-move:not(.pending) { border-color: #d49848; }
.board-cell.has-tile.last-move:not(.pending)::before { width: 4px; height: 4px; background: #93491d; box-shadow: none; }
.board-cell.has-tile.blank::after { width: 4px; height: 4px; border-color: #844314; background: #fff4d5; }
.board-cell.has-tile .tile-value { color: #344730; font-weight: 750; }
.board-cell:focus-visible { outline-color: #fff7b8; outline-width: 3px; outline-offset: -1px; box-shadow: inset 0 0 0 1px #163e28; }
.board-cell.has-tile:focus-visible { outline-color: #426b2d; outline-offset: -2px; }
.rack-panel { background: linear-gradient(180deg, #294e36, #213e2c); border-color: #788657; box-shadow: inset 0 -5px 0 #102c1f, inset 0 -7px 0 #6d7448; }
.rack-tile:not(.in-use):focus-visible { outline: 3px solid #f1dc91; outline-offset: 4px; }
.rack-tile.in-use { opacity: .24; border-style: dashed; box-shadow: none; }
.rack-tile.hidden-tile { opacity: 1; color: #c2d8a6; background: repeating-linear-gradient(45deg, #36543e 0, #36543e 7px, #3a5c43 8px, #3a5c43 10px); border-color: #819d6c; }
.board-legend .swatch.dw { background: #8f5e50; }
.board-legend .swatch.tw { background: #84454c; }
.board-legend .swatch.dl { background: #416d72; }
.board-legend .swatch.tl { background: #3d6b7d; }
.move-preview .preview-word { color: #eef1d7; background: #1e3d2b; }
.move-preview .preview-word .muted { color: #c5d6ba; }
.move-preview > strong { font-variant-numeric: tabular-nums; }
.high-contrast .board-cell.dw:not(.has-tile) { background: #72463d; border-color: #e9bfa5; color: #ffffff; }
.high-contrast .board-cell.tw:not(.has-tile) { background: #692f39; border-color: #ffb2bb; color: #ffffff; }
.high-contrast .board-cell.dl:not(.has-tile) { background: #315d64; border-color: #bce3de; color: #ffffff; }
.high-contrast .board-cell.tl:not(.has-tile) { background: #244655; border-color: #b2dbe9; color: #ffffff; }
.high-contrast .board-cell.has-tile { background: #fff2ca; color: #142e20; border-color: #e7d694; text-shadow: none; }
.high-contrast .board-cell.pending { background: #d7f29b; border-color: #a0c263; }
.high-contrast .board-cell.has-tile .tile-letter { color: #142e20; text-shadow: none; }
.high-contrast .board-cell.has-tile.blank .tile-letter { color: #703912; }
.high-contrast .board-cell.has-tile .tile-value { color: #142e20; text-shadow: none; }
.high-contrast .board-cell.has-tile.last-move:not(.pending) { border-color: #8d431e; box-shadow: inset 0 0 0 1px #8d431e; }
.high-contrast .board-cell.has-tile.last-move:not(.pending)::before { background: #71320f; }
.high-contrast .board-cell.has-tile.blank::after { border-color: #703912; background: #fff9e6; }
.high-contrast .board-cell:focus-visible { outline: 3px solid #fff8c1; outline-offset: -1px; }
.high-contrast .board-cell.has-tile:focus-visible { outline-color: #244d21; outline-offset: -2px; }
.high-contrast .badge { border-color: #86a77a; color: #e4f0dc; background: #112c21; }
.high-contrast .badge.earned { background: #304c2d; border-color: #e2d494; }
.high-contrast .badge b, .high-contrast .badge-status { color: #f7f3d5; }
.high-contrast .board-legend .swatch.dw { background: #72463d; border-color: #e9bfa5; }
.high-contrast .board-legend .swatch.tw { background: #692f39; border-color: #ffb2bb; }
.high-contrast .board-legend .swatch.dl { background: #315d64; border-color: #bce3de; }
.high-contrast .board-legend .swatch.tl { background: #244655; border-color: #b2dbe9; }
.high-contrast .result-row small { color: #dcead7; }
@media (max-width: 600px) {
  .badges { grid-template-columns: minmax(0, 1fr); }
  .badge { gap: 14px; padding: 12px 14px; font-size: 11px; }
  .badge-art { width: 49px; min-width: 49px; }
  .badge b { font-size: 13px; }
  .result-row { grid-template-columns: 36px minmax(0, 1fr) auto; column-gap: 9px; }
  .result-row > strong { font-size: 25px; }
  .result-meta b { font-size: 12px; }
  .result-row small { font-size: 9px; }
  .result-tag { max-width: 90px; white-space: normal; text-align: right; overflow-wrap: anywhere; }
  .result-illustration { width: min(100%, 265px); margin-top: -5px; }
  .privacy-art { width: min(100%, 275px); }
}
@media (max-width: 470px) {
  .board-cell.has-tile.last-move:not(.pending)::before { width: 2px; height: 2px; left: 1px; top: 1px; }
  .board-cell.has-tile.blank::after { width: 3px; height: 3px; left: 1px; bottom: 1px; }
}
.board-shell.zoomed .board-cell.has-tile.last-move:not(.pending)::before { width: 4px; height: 4px; left: 3px; top: 3px; }
.board-shell.zoomed .board-cell.has-tile.blank::after { width: 5px; height: 5px; left: 3px; bottom: 3px; }

/* 1.3 — Illustrated game tables and layouts that keep controls reachable. */
.mode-card { min-width: 0; }
.mode-art { display: block; width: 100%; height: 108px; margin: 6px auto -4px; pointer-events: none; }
.mode-illustration { display: block; width: 100%; height: 100%; max-width: 260px; margin: 0 auto; }
.mode-card:has(.mode-art) h3 { margin-top: 9px; }
.mode-card:has(.mode-art) p { margin-bottom: 17px; }
.mode-card:has(.mode-art) .card-number { opacity: 1; color: #b8cbb9; line-height: 1.6; }
.mode-card.primary-card:has(.mode-art) .card-number { color: #415c37; }
.mode-card:has(.mode-art) .card-footer { gap: 10px; line-height: 1.6; }
.mode-card:has(.mode-art) .card-footer b { flex: 0 0 auto; }
.empty-history { padding: 3px 5px 15px; }
.history-illustration { display: block; width: min(100%, 145px); height: auto; margin: 0 auto 9px; pointer-events: none; }

/* A room and an offline game may both have a resume button. Let the buttons
   flow to the next line instead of relying on their combined min-content width. */
.resume-panel { flex-wrap: wrap; }
.resume-panel p { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.resume-panel .button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

/* Names can contain twenty unbroken characters. Their columns must be allowed
   to shrink, while the seat emblem, host label and board controls keep room. */
.lobby-slot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; }
.lobby-slot > strong { min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.lobby-slot > small { text-align: right; margin-left: 0; }
.lobby-slot.empty { grid-template-columns: auto minmax(0, 1fr); }
.history-player { overflow-wrap: anywhere; }
.board-meta { flex-wrap: wrap; }
.turn-label { flex: 1 1 110px; min-width: 0; overflow-wrap: anywhere; }
.turn-label i { flex: 0 0 6px; }
#bag-label { margin-left: auto; }
.rack-caption { gap: 10px; flex-wrap: wrap; }
#rack-owner { min-width: 0; overflow-wrap: anywhere; }
.game-heading { gap: 12px; flex-wrap: wrap; }
.game-heading > div:first-child { flex: 1 1 190px; min-width: 0; }
.game-title-row { flex-wrap: wrap; }
.game-title-row h1 { overflow-wrap: anywhere; }
.game-heading-right { margin-left: auto; }
.dict-result strong { overflow-wrap: anywhere; }

/* Long valid words and combined crosswords must not widen the move toolbar. */
.move-preview { min-width: 0; }
.preview-word { max-width: 100%; overflow-wrap: anywhere; }
.move-actions { flex-wrap: wrap; }
.move-actions > .button { flex: 0 1 auto; max-width: 100%; }
.move-actions > .accent { flex: 1 1 160px; }
.rack-tools { flex-wrap: wrap; }

/* Keyboard scrolling should remain available when the board is zoomed. */
.board-shell:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.history:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 1000px) {
  .mode-art { height: 94px; }
}
@media (max-width: 760px) {
  .mode-art { height: 112px; }
}
@media (max-width: 470px) {
  .mode-art { height: 86px; margin-top: 4px; }
  .mode-card:has(.mode-art) h3 { margin-top: 7px; }
  .mode-card:has(.mode-art) p { margin-bottom: 13px; }
  .mode-card:has(.mode-art) .card-number { font-size: 8px; letter-spacing: .3px; }
  .mode-card:has(.mode-art) .card-footer { gap: 5px; }
  .lobby-slot { gap: 9px; }
  .lobby-slot > small { max-width: 68px; overflow-wrap: anywhere; }
  .room-code { gap: 10px; padding: 18px 12px; font-size: 25px; letter-spacing: 4px; }
  .resume-panel .button { flex: 1 1 auto; }
  .move-actions > .accent { flex-basis: 130px; }
  .history-illustration { width: min(100%, 130px); }
}
@media (max-width: 355px) {
  .mode-art { height: 78px; }
  .mode-card:has(.mode-art) .card-number { font-size: 7px; }
  .mode-card:has(.mode-art) .card-footer { font-size: 8px; }
  .board-meta { gap: 7px; }
}
.high-contrast .mode-card:has(.mode-art) .card-number { color: #e2efd1; }
.high-contrast .mode-card.primary-card:has(.mode-art) .card-number { color: #294b24; }
