@font-face{font-family:Nunito;src:url('/assets/nunito-latin.woff2') format('woff2');font-weight:400 900;font-style:normal;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Nunito;src:url('/assets/nunito-latin-ext.woff2') format('woff2');font-weight:400 900;font-style:normal;font-display:swap;unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+20AB-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
:root{font-family:Nunito,ui-rounded,system-ui,sans-serif;font-synthesis:none;--bg:#f1eefb;--surface:#fffefd;--ink:#373050;--muted:#857d9c;--line:#e9e3f2;--violet:#8c68d8;--violet-dark:#6d4bba;--lilac:#e9e1f9;--shadow:#7658a214;--board:#eae4f5;color:var(--ink);background:var(--bg);text-rendering:optimizeLegibility;--grid-color:#ac99c432}
*{box-sizing:border-box}body{margin:0;isolation:isolate}button,input{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit;border:0;background:none;transition:transform .18s,box-shadow .18s,background .18s,opacity .18s}button:disabled{cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,canvas:focus-visible,summary:focus-visible{outline:3px solid #ba9aee;outline-offset:4px}button:active:not(:disabled){transform:translateY(2px)}button .icon{pointer-events:none}.icon{width:22px;height:22px;flex-shrink:0;vertical-align:middle}.hidden{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.ambient{position:fixed;z-index:-1;pointer-events:none;border-radius:50%;filter:blur(90px);opacity:.38}.ambient-one{width:550px;height:500px;top:70px;left:-130px;background:#d8d5fb}.ambient-two{width:460px;height:430px;bottom:-230px;right:-140px;background:#f9d8dc}
.app-header{height:92px;max-width:1460px;margin:auto;padding:0 5vw;display:flex;align-items:center;gap:28px;position:relative;z-index:5}.brand{display:inline-flex;align-items:center;gap:11px;white-space:nowrap;font-size:37px;font-weight:900;letter-spacing:-1.8px;line-height:1;padding:0}.brand>b,.brand span>b{color:var(--violet);font-weight:900}.brand-icon{width:39px;height:41px;display:grid;grid-template-columns:1fr 1fr;gap:4px;transform:rotate(-12deg)}.brand-icon i{border-radius:5px;box-shadow:inset 0 2px 0 #fff9,0 3px 0 #00000012}.brand-icon i:nth-child(1){background:#ffad9b}.brand-icon i:nth-child(2){background:#b69ce8}.brand-icon i:nth-child(3){background:#ffd478}.brand-icon i:nth-child(4){background:#79cbb6}.header-tag{font-size:12px;color:#a196b8;border-left:1px solid #dcd4e9;padding-left:24px}.header-actions{margin-left:auto;display:flex;align-items:center;gap:10px}.icon-button{width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:14px;flex-shrink:0;background:#ffffff99;color:#817395;border:1px solid #e8e0f1;box-shadow:0 2px 0 #ddd4eb50}.icon-button:hover{background:var(--surface);color:var(--violet)}.soft-button{min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:10px 15px;border:1px solid var(--line);background:#ffffff90;border-radius:14px;color:#7a6d92;font-size:12px;font-weight:800}.soft-button:hover{background:var(--surface)}.soft-button .icon{width:19px;height:19px}.connection{display:flex;align-items:center;gap:7px;color:#74a88f;font-size:10px;font-weight:800;margin-right:8px}.connection i,.live-dot{width:7px;height:7px;border-radius:50%;background:#7abc9b;box-shadow:0 0 0 4px #7abc9b15}.connection.offline{color:#c2934a}.connection.offline i{background:#c2934a}.reconnect-banner{position:fixed;top:8px;left:50%;transform:translateX(-50%);max-width:90vw;background:#fff0d1;border:1px solid #eed5a5;color:#93662b;font-size:12px;padding:12px 20px;border-radius:14px;z-index:30;box-shadow:0 7px 20px #6f4e1912}
.eyebrow{display:flex;align-items:center;gap:10px;font-size:10px;letter-spacing:2px;color:#a08ab9;font-weight:900}.home-screen{max-width:1340px;margin:auto;padding:35px 5vw 0;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(355px,.9fr);gap:0 55px}.home-story{position:relative;min-width:0;padding-top:8px}.home-story h1{font-weight:900;font-size:clamp(48px,5.1vw,75px);letter-spacing:-3.5px;line-height:1.08;margin:23px 0 19px}.home-story h1>span{color:#9272d1}.home-story>p{font-size:15px;line-height:1.8;color:#9a8bab;margin:0 0 23px}.home-facts{display:flex;align-items:center;gap:19px;color:#a295b6;font-size:10px;font-weight:800}.home-facts>span{display:flex;align-items:center;gap:6px;white-space:nowrap}.home-facts .icon{width:16px;height:16px;color:#ac9dc4}.hero-stage{position:relative;margin:-10px -35px -28px -35px;max-width:650px;isolation:isolate}.hero-stage img{display:block;width:100%;height:auto;mix-blend-mode:multiply;mask-image:radial-gradient(ellipse at 50% 50%,#000 45%,transparent 72%)}.hero-chip{position:absolute;right:25px;top:28%;display:flex;align-items:center;gap:10px;border:1px solid #ffffffd9;background:#fffdf5ed;padding:12px 17px 12px 12px;border-radius:17px;box-shadow:0 8px 20px #8870b41a;transform:rotate(7deg);font-size:12px;color:#a18eb3;font-weight:800;animation:bob 5s ease-in-out infinite}.hero-chip b{display:block;color:#9974d6;font-size:20px;font-weight:900}.chip-star{display:grid;place-items:center;background:#fff0c8;color:#e9b241;border-radius:12px;width:41px;height:43px}.chip-star .icon{width:27px;height:27px;fill:#f6ce69}.hero-sticker{position:absolute;bottom:22%;left:10%;padding:9px 17px;border-radius:100px;background:#ac8ee0;color:#fff;font-size:13px;font-weight:900;transform:rotate(-10deg);box-shadow:0 3px 0 #8d6dbd;animation:bob 5s ease-in-out infinite reverse}.hero-sticker span{margin-left:10px}.play-card{align-self:center;justify-self:end;position:relative;width:100%;max-width:435px;background:var(--surface);border:2px solid #fff;border-radius:29px;padding:29px 30px 22px;box-shadow:0 12px 0 #e3dced66,0 25px 60px #7b5a9c12;margin-top:8px;z-index:1}.card-heading{display:flex;align-items:center;gap:13px}.card-mini-icon{display:grid;place-items:center;width:45px;height:47px;border-radius:14px;background:#f2ecfd;color:#a083d0;transform:rotate(-8deg)}.card-mini-icon .icon{width:27px;height:27px;stroke-width:1.7}.overline{font-size:8px;letter-spacing:1.3px;color:#b3a6c1;font-weight:900}.card-heading h2{margin:4px 0 0;font-weight:900;font-size:26px;letter-spacing:-.8px;line-height:1.12}.card-intro{font-size:11px;color:#a69bb5;line-height:1.7;margin:16px 0 22px}label{display:block;font-size:11px;font-weight:900;color:#8e7f9f;margin:0 0 8px}.input-wrap{display:flex;align-items:center;position:relative}.input-wrap>span{position:absolute;left:14px;display:flex;color:#b8abc8}.input-wrap .icon{width:18px;height:18px}.input-wrap input{padding-left:42px}input:not([type=checkbox]){width:100%;min-width:0;height:49px;padding:12px 14px;border:1.5px solid #e8e1f0;border-radius:13px;background:#f9f6fc;color:#5e4a75;font-size:13px;font-weight:700;transition:border-color .2s,background .2s}input::placeholder{color:#bdafcb;font-size:12px;font-weight:650}input:not([type=checkbox]):focus{background:#fff;border-color:#bb9ce4}.mode-switch{display:grid;grid-template-columns:1fr 1fr;gap:5px;background:#f1ecf8;border:1px solid #eae3f3;border-radius:13px;padding:4px;margin:20px 0 21px}.mode-switch button{display:flex;align-items:center;justify-content:center;gap:7px;border-radius:9px;min-height:39px;font-size:11px;font-weight:850;color:#ad9bbc}.mode-switch button .icon{width:17px;height:17px}.mode-switch button[aria-selected=true]{background:#fff;color:#9b7acb;box-shadow:0 3px 7px #8f73b012}
.button{min-height:49px;display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:12px 19px;border-radius:14px;font-size:13px;font-weight:900;letter-spacing:.1px;position:relative;line-height:1.35;white-space:nowrap}.button .icon{width:20px;height:20px}.full{width:100%}.button-end{margin-left:auto;display:flex}.button-sun{color:#886529;background:linear-gradient(180deg,#ffe39a,#ffd16d);border:1px solid #ffdd8b;border-top:2px solid #fff0bd;box-shadow:0 5px 0 #e9b852,0 7px 14px #ecc26018}.button-sun:hover:not(:disabled){background:linear-gradient(#ffe9b3,#ffda85);transform:translateY(-2px);box-shadow:0 7px 0 #e9b852,0 12px 20px #ecc26022}.button-sun:active:not(:disabled){transform:translateY(4px);box-shadow:0 1px 0 #e9b852}.button-sun:disabled{background:#f2e5c7;border-color:#f2e6c8;color:#cbbd9e;box-shadow:0 4px 0 #e4d9bf}.button-purple{background:linear-gradient(180deg,#b394e2,#9b7acb);color:#fff;border:1px solid #a98bd8;border-top:2px solid #c6acec;box-shadow:0 4px 0 #8864bb,0 7px 15px #9d80c415}.button-purple:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 6px 0 #8864bb,0 9px 18px #9d80c425}.button-purple:active:not(:disabled){transform:translateY(3px);box-shadow:0 1px 0 #8864bb}.button-soft{background:#f0eaf7;border:1px solid #e6dced;color:#a08bad}.button:disabled{opacity:.75}.divider{display:flex;align-items:center;gap:13px;margin:24px 0 18px;font-size:10px;color:#b1a3bf;font-weight:700}.divider:before,.divider:after{content:'';height:1px;background:#eee7f4;flex:1}.join-row{display:flex;gap:9px}.join-row input{letter-spacing:3px;text-align:center;text-transform:uppercase;font-size:15px;font-weight:850}.join-row .button{min-width:94px;font-size:12px}.join-row .icon{width:18px;height:18px}.mini-note{display:flex;align-items:center;justify-content:center;gap:6px;font-size:9px;color:#b5a8c3;margin:17px 0 0}.mini-note .icon{width:13px;height:13px}.resume-button{display:flex;align-items:center;gap:8px;width:100%;margin-top:17px;padding:13px 0 0;border-top:1px dashed #e6ddf0;font-size:10px;color:#a286c3;font-weight:850}.resume-button .icon{width:16px;height:16px}.card-footnote{display:flex;align-items:center;justify-content:center;gap:6px;color:#bcaec9;font-size:9px;margin-top:23px}.tiny-symbol{width:5px;height:5px;transform:rotate(45deg);background:#bea9d6}.solo-description{text-align:center;min-height:153px;padding:0 0 16px}.bot-portrait{display:grid;place-items:center;width:54px;height:54px;border-radius:19px;margin:0 auto;background:#e8e0f7;color:#ac8dd5;box-shadow:0 4px 0 #d7caeb}.bot-portrait .icon{width:33px;height:33px}.solo-description h3{font-size:17px;margin:12px 0 5px;font-weight:900}.solo-description p{font-size:11px;line-height:1.7;color:#b2a3c1;margin:0}footer{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid #e3dced;padding:23px 0;color:#b0a1be;font-size:10px;font-weight:650;position:relative;z-index:1}.footer-brand span{margin:0 9px;color:#c0abdb}
.lobby-screen{max-width:1100px;margin:25px auto 50px;padding:0 5vw;display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:center}.lobby-heading h1{font-size:58px;line-height:1.07;letter-spacing:-2.7px;font-weight:900;margin:24px 0}.lobby-heading h1 span{color:#aa86d9}.lobby-heading>p{font-size:14px;line-height:1.8;color:#a595b7}.lobby-art{display:flex;align-items:center;gap:13px;perspective:700px;margin-top:55px;height:100px;transform:rotate(-10deg)}.lobby-art .tile:nth-child(2){transform:translateY(-24px) rotate(10deg)}.lobby-art .tile:nth-child(3){transform:translateY(5px) rotate(8deg)}.lobby-art .tile:nth-child(4){transform:translateY(-17px) rotate(-8deg)}.lobby-card{background:var(--surface);border:2px solid white;border-radius:27px;padding:26px;box-shadow:0 10px 0 #e4dced66,0 25px 60px #755a9712}.lobby-card-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}.pill{display:inline-flex;align-items:center;gap:6px;border:1px solid #e7ddf3;border-radius:100px;background:#f7f1ff;color:#b095d0;padding:6px 10px;font-size:9px;font-weight:850}.pill .icon{width:12px;height:12px}.lobby-card-top>span:last-child{font-size:10px;color:#b5a6c3;font-weight:800}.room-code{display:flex;align-items:center;justify-content:space-between;gap:15px;width:100%;font-size:34px;letter-spacing:6px;font-weight:900;color:#a183cc;background:#f6f0fd;border:1.5px dashed #d9c7ee;border-radius:15px;padding:14px 20px;margin-bottom:16px}.room-code>.icon,.room-code>span:last-child{color:#c1a9df;display:flex}.room-code.copied{background:#ecf6ed;border-color:#abd5b2}.lobby-divider{display:flex;gap:15px;align-items:center;margin:28px 0 15px;font-size:8px;font-weight:900;letter-spacing:1.6px;color:#bbaac9}.lobby-divider i{height:1px;background:#eee7f5;flex:1}.lobby-seats{display:grid;gap:9px}.seat{display:flex;align-items:center;gap:11px;border:1px solid #eee6f5;border-radius:14px;padding:10px;background:#fdfafe;min-height:58px}.seat-name{font-size:12px;font-weight:850;flex:1;overflow-wrap:anywhere;min-width:0}.seat-detail{font-size:9px;font-weight:800;color:#bfa8d2;white-space:nowrap}.avatar{width:39px;height:40px;display:grid;place-items:center;flex-shrink:0;color:#c4afe9;filter:drop-shadow(0 2px 0 #a88ace22)}.avatar svg{width:100%;height:100%}.avatar-1{color:#f2b5a9}.avatar-2{color:#9ed6c8}.avatar-3{color:#f3d190}.avatar>.icon{width:32px;height:32px;background:#d5c4ef;border-radius:10px;padding:5px;color:#7964a0}.empty-seat{background:transparent;border:1px dashed #e8def2;color:#c9bcd5;min-height:52px}.empty-avatar{display:grid;place-items:center;width:33px;height:33px;border-radius:50%;border:1px dashed #ddcdea;font-size:18px}.empty-name{font-size:11px;color:#c1b1d1;font-weight:700}.lobby-hint{font-size:10px;line-height:1.7;color:#b7a4c7;text-align:center;margin:18px 0}.text-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:42px;font-size:11px;font-weight:850;color:#a089b7;border-radius:10px;padding:8px 10px}.text-button .icon{width:16px;height:16px}.text-button:hover:not(:disabled){background:#e6dbf44d}.text-button:disabled{color:#c9bed3}.lobby-card>.text-button{display:flex;margin:12px auto -5px}
body[data-view=game] .app-header{height:67px;max-width:none;padding:0 28px;border-bottom:1px solid #e5dcf1;background:#f9f6fd99}body[data-view=game] .brand{font-size:29px}body[data-view=game] .brand-icon{width:29px;height:31px;gap:3px}body[data-view=game] .brand-icon i{border-radius:4px}body[data-view=game] .header-tag{display:none}body[data-view=game] .app-header .soft-button{background:transparent;border:0}body[data-view=game] .header-actions{gap:6px}body[data-view=game] .app-header .icon-button{background:transparent;border-color:transparent;box-shadow:none}
.game-screen{position:relative;height:calc(100dvh - 67px);min-height:590px;max-width:1800px;margin:auto;display:flex;flex-direction:column;padding:0 27px;background:radial-gradient(ellipse at 50% 42%,#f8f4fc55,transparent 70%)}.game-topline{display:flex;align-items:center;gap:13px;min-height:58px}.game-topline>.icon-button{width:36px;height:36px;border-radius:12px;background:transparent;border:0;box-shadow:none}.game-topline>.icon-button .icon{width:18px;height:18px}.game-mode{font-size:8px;letter-spacing:1.6px;color:#b4a1c7;font-weight:900}.invite-chip{display:flex;align-items:center;gap:7px;font-size:10px;font-weight:850;letter-spacing:1px;color:#ab93c6;background:#ffffff88;border:1px solid #e5d9f0;border-radius:100px;padding:7px 12px;min-height:34px}.invite-chip .icon{width:13px;height:13px}.invite-chip.copied{background:#e7f2e9}.game-top-spacer{flex:1}#historyButton{font-size:10px;padding:8px 11px;background:transparent;border-color:transparent;min-height:36px}#historyButton .icon{width:17px;height:17px}.player-strip{display:flex;align-items:stretch;justify-content:center;gap:14px;padding:0 0 17px;min-height:83px}.player-card{position:relative;display:flex;align-items:center;gap:10px;border:1.5px solid #fff8;border-radius:17px;padding:10px 15px 10px 10px;min-width:180px;max-width:240px;background:#ffffff70;box-shadow:0 4px 0 #ddd3eb33;color:#7e689b;flex:1}.player-card.active{background:var(--surface);border-color:#bfa2e2;box-shadow:0 4px 0 #d6c4ec,0 10px 20px #9e7bc012}.player-card.is-you .player-name:after{content:'SEN';font-size:6px;border-radius:3px;color:#b7a0cd;background:#f0e8fa;padding:2px 4px;margin-left:6px;vertical-align:2px;letter-spacing:.7px}.player-name{font-size:12px;font-weight:900;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.player-sub{display:block;font-size:9px;font-weight:700;color:#b5a2c9;margin-top:3px;letter-spacing:.1px}.player-score{font-size:27px;line-height:1;font-weight:900;letter-spacing:-1px;color:#a087bc;font-variant-numeric:tabular-nums}.player-card.active .player-score{color:#9975c7}.active-player-dot{position:absolute;width:8px;height:8px;left:50%;bottom:-5px;transform:translateX(-50%) rotate(45deg);background:#d7c5eb;border-radius:1px}.board-area{display:flex;flex-direction:column;flex:1;min-height:180px;margin:0 0 18px;position:relative;border:1px solid #e3d8f0;border-radius:25px;background:#eae3f388;box-shadow:inset 0 2px 0 #fff7,0 6px 0 #dfd4eb33;overflow:hidden}.board-status{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:17px 22px 5px;position:relative;z-index:2;flex-shrink:0}.board-status>div{display:flex;align-items:center;gap:15px;flex-wrap:wrap}.turn-pill{display:inline-flex;align-items:center;gap:7px;color:#a184c5;font-size:13px;font-weight:900;white-space:nowrap}.turn-pill:before{content:'';width:7px;height:7px;border-radius:50%;background:#ac8bd3;box-shadow:0 0 0 4px #ac8bd311}.turn-pill.waiting{color:#bba8cc}.turn-pill.waiting:before{background:#c8b9d7;box-shadow:none}#turnText{font-size:10px;font-weight:700;color:#b7a2c8;line-height:1.5}.bag-pill{display:flex;align-items:center;gap:5px;color:#b1a0c1;font-size:10px;white-space:nowrap;background:#f8f3fc80;padding:7px 11px;border-radius:100px}.bag-pill .icon{width:15px;height:15px;color:#b9a6cb}.bag-pill b{font-size:12px;font-weight:900}.canvas-wrap{position:relative;flex:1;min-height:160px;background:radial-gradient(ellipse at center,#f9f6fc66,transparent 75%)}#board{display:block;width:100%;height:100%;touch-action:none;cursor:grab;--grid-color:#ac99c432}#board:active{cursor:grabbing}.empty-hint{position:absolute;top:calc(50% + 63px);left:50%;transform:translateX(-50%);width:85%;display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center;pointer-events:none;color:#b39bc6}.empty-hint b{font-size:13px;font-weight:900}.empty-hint>span:last-child{font-size:10px;color:#c3afd2;font-weight:700}.empty-spark{display:none}.board-tools{position:absolute;bottom:16px;right:18px;display:flex;align-items:center;gap:3px;border:1px solid #fff9;background:#faf7fdcc;border-radius:14px;padding:4px;box-shadow:0 5px 12px #a48db412;backdrop-filter:blur(10px)}.board-tools .icon-button{background:transparent;border:0;box-shadow:none;width:34px;height:34px;border-radius:9px}.board-tools .icon{width:17px;height:17px}.board-tools i{height:18px;width:1px;background:#e5d9ef;margin:0 4px}.board-tools button[aria-pressed=true]{background:#e9def7;color:#a080c7}.board-caption{position:absolute;left:21px;bottom:26px;font-size:8px;font-weight:700;color:#c1adcf;pointer-events:none}.score-burst{position:absolute;top:25%;left:50%;transform:translateX(-50%);font-size:28px;font-weight:1000;letter-spacing:-1px;color:#a782d1;text-shadow:0 3px #ffffff;opacity:0;pointer-events:none;white-space:nowrap}.score-burst.pop{animation:score-pop 1.5s ease-out both}
.hand-panel{position:relative;display:flex;justify-content:center;align-items:center;gap:35px;padding:17px 38px 15px;background:var(--surface);border:2px solid #ffffff;border-radius:25px 25px 0 0;box-shadow:0 -5px 28px #a68ab00a;flex-shrink:0;min-height:178px;max-width:1020px;width:100%;margin:0 auto}.hand-main{min-width:0;flex:1;max-width:550px}.rack-label{display:flex;justify-content:space-between;gap:10px;align-items:center;color:#b6a1c6;font-size:8px;font-weight:900;letter-spacing:1.4px;padding:0 7px}.rack-label b{display:inline-block;background:#f1e9f9;border-radius:4px;font-size:8px;padding:2px 5px;margin-left:4px;color:#b8a0d1}#selectionHint{font-size:9px;letter-spacing:0;color:#b4a0c4;font-weight:700;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.rack{position:relative;display:flex;align-items:center;justify-content:center;gap:11px;padding:15px 7px 15px;min-height:94px;perspective:850px}.rack:after{content:'';height:9px;background:linear-gradient(#e7e0ef,#d9d0e6);position:absolute;bottom:6px;left:0;right:0;z-index:0;border-radius:5px;box-shadow:0 4px 5px #b4a4c51a}.tile{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:65px;height:65px;padding:0;border-radius:14px;border:1px solid #ffffff;background:linear-gradient(140deg,#fffefd,#eeebf1);box-shadow:0 6px 0 #cec6d8,0 8px 0 #bfb3ce,0 11px 12px #80629a20;z-index:1;transform:rotateX(8deg);transition:transform .18s cubic-bezier(.2,.8,.3,1),box-shadow .18s,opacity .18s;touch-action:manipulation}.tile-face{position:absolute;inset:12px;display:flex;align-items:center;justify-content:center;filter:drop-shadow(0 2px 0 #00000012)}.tile svg{width:100%;height:100%;overflow:visible}.tile:before{content:'';position:absolute;inset:3px;border:1px solid #ffffff66;border-radius:11px;pointer-events:none}.tile:hover:not(:disabled){transform:translateY(-7px) rotateX(0);box-shadow:0 7px 0 #cec6d8,0 9px 0 #bfb3ce,0 18px 17px #80629a20}.tile.selected{transform:translateY(-11px) rotateX(0);border-color:#bc9cdd;box-shadow:0 0 0 3px #c9acec,0 7px 0 #cec6d8,0 9px 0 #bfb3ce,0 18px 17px #80629a20;background:linear-gradient(140deg,#fff9e7,#fff4d6)}.tile.selected:after,.tile.exchange-selected:after{content:'✓';position:absolute;right:-6px;top:-8px;display:grid;place-items:center;border-radius:50%;background:#b393db;color:white;width:19px;height:19px;border:2px solid white;font-size:10px;font-weight:900;box-shadow:0 2px 3px #8b6da52a}.tile.exchange-selected{transform:translateY(-7px);background:#fff4dd;box-shadow:0 0 0 3px #ebc173,0 7px 0 #cec6d8,0 9px 0 #bfb3ce}.tile.exchange-selected:after{background:#e5b65d}.tile.used{opacity:.2;transform:translateY(3px) scale(.93);box-shadow:0 3px 0 #cec6d8;pointer-events:none}.tile:disabled:not(.used){cursor:default;opacity:.8}.tile-number{position:absolute;right:6px;bottom:4px;font-size:7px;font-weight:900;color:#c8bed3;line-height:1}.hand-actions{width:220px;min-width:220px;align-self:center}.preview-score{font-size:10px;text-align:center;color:#b7a3c9;font-weight:800;margin:0 0 9px;min-height:15px}.preview-score.has-score{color:#a281cc;font-size:14px;font-weight:1000}.hand-actions .button{min-height:46px;font-size:12px}.minor-actions{display:flex;justify-content:space-around;align-items:center;gap:3px;margin:9px -10px -6px}.minor-actions .text-button{padding:4px 7px;min-height:30px;font-size:9px;color:#b9a6ca}.minor-actions .text-button .icon{width:13px;height:13px}.minor-actions .text-button:disabled{color:#d7ccdf}.move-error{position:absolute;bottom:2px;left:15px;right:15px;font-size:9px;color:#c88d84;text-align:center;pointer-events:none}.history-panel{position:absolute;right:29px;top:57px;bottom:19px;width:285px;border:1px solid #fff;background:#fffdfaf2;backdrop-filter:blur(12px);border-radius:22px;padding:18px;box-shadow:0 20px 50px #6c4e8d20;overflow:auto;z-index:10}.drawer-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.drawer-heading h2{font-size:23px;font-weight:1000;line-height:1.15;letter-spacing:-.6px;margin:0}.drawer-heading h2 span{color:#bda1db}.history-panel .drawer-heading h2{font-size:17px}.history-panel .icon-button{width:34px;height:34px;background:transparent;box-shadow:none;border:0}.history-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 4px;border-bottom:1px solid #f0e7f5;color:#9c85b2;font-size:12px;font-weight:850}.history-row small{display:block;font-size:9px;font-weight:700;color:#bfaad0;margin-top:4px}.history-row strong{font-size:15px;color:#ad90cb;background:#f2eaf9;padding:5px 7px;border-radius:8px}.history-empty{font-size:12px;color:#b6a0c9;line-height:1.7}
.toast{position:fixed;bottom:25px;left:50%;max-width:min(90vw,470px);background:#8f72b8f5;color:#fff;padding:14px 21px;border:1px solid #c1a4e0;border-radius:15px;font-size:12px;font-weight:750;line-height:1.6;text-align:center;z-index:80;box-shadow:0 8px 0 #8668ac25,0 15px 30px #8466a22a;opacity:0;transform:translate(-50%,25px) scale(.95);transition:.22s;pointer-events:none}.toast.show{opacity:1;transform:translate(-50%,0) scale(1)}.toast[data-kind=error]{background:#bf8c85;border-color:#e9beb4}#confetti{position:fixed;inset:0;width:100%;height:100%;z-index:100;pointer-events:none}
dialog{color:var(--ink);font-family:inherit;max-width:520px;width:calc(100% - 32px);max-height:88dvh;overflow:auto;padding:32px;background:var(--surface);border:3px solid white;border-radius:28px;box-shadow:0 10px 0 #b6a1cc33,0 30px 100px #5b3c7e33}dialog::backdrop{background:#62498266;backdrop-filter:blur(9px)}dialog[open]{animation:dialog-in .25s ease-out}.dialog-close{position:absolute;right:15px;top:15px;width:36px;height:36px;box-shadow:none;background:#f4ecfb;border-color:transparent}.dialog-close .icon{width:18px;height:18px}.modal-art{display:grid;place-items:center;background:#f4eaff;color:#bea0de;border-radius:21px;width:55px;height:55px;transform:rotate(-7deg);margin-bottom:21px;box-shadow:0 4px 0 #e8d9f4}.modal-art .icon{width:32px;height:32px;stroke-width:1.5}dialog .eyebrow{font-size:8px;letter-spacing:1.5px}dialog h2{font-size:30px;font-weight:1000;letter-spacing:-1px;line-height:1.14;margin:13px 0 23px}dialog h2 span{color:#b095d0}.rule-step{display:flex;gap:13px;margin:19px 0}.rule-step>b{display:grid;place-items:center;border-radius:10px;background:#eee5fa;color:#b395d5;width:27px;height:29px;font-size:12px;flex-shrink:0;box-shadow:0 3px 0 #e4d7f1}.rule-step h3{margin:2px 0 6px;font-size:14px;color:#a18ab6;font-weight:900}.rule-step p,dialog details p,dialog>p{font-size:11px;color:#b5a1c6;line-height:1.85;margin:0}.rule-example{display:flex;gap:6px;margin:14px 0 5px}.rule-example .tile{width:40px;height:40px;border-radius:8px;pointer-events:none;box-shadow:0 4px 0 #d7ccdf}.rule-example .tile-face{inset:8px}details{border-top:1px solid #eee5f5;border-bottom:1px solid #eee5f5;padding:14px 0;margin:18px 0}summary{font-size:11px;color:#b295c8;font-weight:850;cursor:pointer}details p{padding-top:12px}.rules-done{margin:5px 0 4px}.settings-dialog{max-width:460px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid #f0e7f6;padding:20px 0;margin:0;color:#ac94c1}.setting-row b{font-size:12px;font-weight:900;display:block}.setting-row small{display:block;font-size:10px;color:#c4aed5;font-weight:650;margin-top:4px}.setting-row input[type=checkbox]{appearance:none;-webkit-appearance:none;width:43px;height:25px;border-radius:100px;background:#e9e1f0;border:1px solid #e2d7ed;position:relative;flex-shrink:0;cursor:pointer;transition:.2s}.setting-row input[type=checkbox]:before{content:'';position:absolute;top:3px;left:3px;width:17px;height:17px;background:#fff;border-radius:50%;box-shadow:0 2px 4px #a28ab52a;transition:.2s}.setting-row input:checked{background:#b699da;border-color:#b699da}.setting-row input:checked:before{left:21px}.theme-options{display:flex;gap:6px}.theme-options button{width:38px;height:38px;border-radius:11px;border:1px solid #e9def3;background:#faf7fc;color:#b39ac7}.theme-options .icon{width:19px;height:19px}.theme-options button[aria-pressed=true]{background:#eee3fb;border-color:#c5a8e0}.settings-note{font-size:10px!important;text-align:center;margin:0;color:#c6b3d4!important}.finish-dialog{text-align:center}.finish-dialog>.eyebrow{justify-content:center}.winner-medal{width:90px;height:90px;margin:4px auto 25px;display:grid;place-items:center;border-radius:28px;background:linear-gradient(#ffedb1,#ffdb87);color:#d5a149;box-shadow:0 6px 0 #f0cc76;transform:rotate(-7deg)}.winner-medal .icon{width:49px;height:49px;stroke-width:1.6}.finish-dialog h2{margin-bottom:10px}.finish-dialog>p{font-size:12px}#finalScores{margin:25px 0}.final-score{display:flex;align-items:center;justify-content:space-between;gap:15px;background:#faf7fd;border:1px solid #eee4f6;border-radius:13px;padding:13px 15px;margin:8px 0;font-size:12px;color:#b69cc9;font-weight:850}.final-score.first{border-color:#e9cb8f;background:#fff9e7;color:#c9a35b}.finish-dialog>.text-button{margin-top:13px}.leave-dialog{max-width:420px}.leave-dialog>p{font-size:12px}.dialog-actions{display:flex;gap:10px;margin-top:24px}.dialog-actions .button{flex:1;font-size:11px}.copy-dialog input{margin:10px 0 20px}
body[data-theme=night]{--bg:#252036;--surface:#373047;--ink:#eee8fa;--muted:#aca0be;--line:#51445f;--board:#2c263c;--grid-color:#ba9ed92e;background:var(--bg)}body[data-theme=night] .play-card,body[data-theme=night] .lobby-card,body[data-theme=night] dialog{border-color:#51445e}body[data-theme=night] .card-mini-icon,body[data-theme=night] .mode-switch,body[data-theme=night] .solo-description .bot-portrait{background:#49395d}body[data-theme=night] input:not([type=checkbox]),body[data-theme=night] .room-code{background:#2d263b;border-color:#5c4772;color:#d9c6ec}body[data-theme=night] input:not([type=checkbox]):focus{background:#392d49}body[data-theme=night] .mode-switch button[aria-selected=true]{background:#5c4677;color:#e7d4fb}body[data-theme=night] .player-card,body[data-theme=night] .seat,body[data-theme=night] .soft-button,body[data-theme=night] .icon-button{background:#39304799;border-color:#51435e}body[data-theme=night] .player-card.active{background:#49385b;border-color:#9f7cc6;box-shadow:0 4px 0 #493259}body[data-theme=night] .board-area{background:#2b253a;border-color:#473951}body[data-theme=night] #board{--grid-color:#ba9ed92e}body[data-theme=night] .board-tools{background:#3a2c4be6;border-color:#624a76}body[data-theme=night] .board-tools button[aria-pressed=true]{background:#674782;color:#e5ccfc}body[data-theme=night] .hand-panel{border-color:#51415d}body[data-theme=night] .hand-panel .tile{background:linear-gradient(140deg,#fffefd,#eeebf1)}body[data-theme=night] .game-screen{background:none}body[data-theme=night][data-view=game] .app-header{background:#2b2338;border-color:#493653}body[data-theme=night] .history-panel{background:#392d49f5;border-color:#604772}body[data-theme=night] .hero-stage img{mix-blend-mode:normal;opacity:.8}body[data-theme=night] .hero-chip{background:#554263;border-color:#765b86;color:#d2bce4}body[data-theme=night] .hero-chip b{color:#edcbff}body[data-theme=night] .ambient{opacity:.1}body[data-theme=night] .rack:after{background:linear-gradient(#6a5578,#54425f)}body[data-theme=night] .theme-options button{background:#41314f;border-color:#674d7c}
.screen-enter{animation:screen-enter .3s ease-out}@keyframes screen-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@keyframes dialog-in{from{opacity:0;transform:translateY(12px) scale(.97)}to{opacity:1;transform:none}}@keyframes score-pop{0%{opacity:0;transform:translate(-50%,20px) scale(.7)}15%{opacity:1;transform:translate(-50%,0) scale(1.08)}28%,60%{opacity:1;transform:translate(-50%,-5px) scale(1)}100%{opacity:0;transform:translate(-50%,-35px) scale(.95)}}@keyframes bob{0%,100%{translate:0 0}50%{translate:0 -8px}}
@media(min-width:1500px){.home-screen{padding-top:55px;gap:0 85px}.hero-stage{margin-top:0;margin-bottom:-35px}.play-card{padding:33px 34px 25px}.game-screen{padding:0 45px}.hand-panel{max-width:1100px;padding-top:20px;padding-bottom:20px}.hand-main{max-width:580px}.rack{gap:14px}.tile{width:72px;height:72px}.rack{min-height:105px}.hand-actions{width:250px;min-width:250px}.player-strip{padding-top:5px;padding-bottom:21px;min-height:95px}.board-area{margin-bottom:23px}.board-status{padding-top:21px}.turn-pill{font-size:14px}}
@media(max-width:1100px){.app-header{padding:0 4vw;height:82px}.home-screen{padding:28px 4vw 0;gap:0 30px;grid-template-columns:minmax(0,1.1fr) minmax(330px,.9fr)}.home-story h1{font-size:56px;letter-spacing:-2.7px}.home-story>p{font-size:13px}.home-facts{gap:12px;font-size:9px}.home-facts .icon{width:14px;height:14px}.hero-stage{margin-top:8px;margin-left:-25px;margin-right:-25px}.hero-chip{right:3px;top:19%;padding:10px;font-size:10px}.hero-chip b{font-size:17px}.hero-sticker{bottom:18%;left:5%;font-size:11px}.play-card{padding:25px 24px 21px;border-radius:25px}.card-heading h2{font-size:23px}.overline{font-size:7px}.card-heading{gap:11px}.card-mini-icon{width:41px;height:43px}.game-screen{padding:0 18px}.hand-panel{padding:17px 25px 15px;gap:24px;max-width:900px}.rack{gap:10px}.tile{width:58px;height:58px}.tile-face{inset:10px}.hand-actions{width:200px;min-width:200px}.player-card{min-width:150px;max-width:220px;padding-right:12px}.player-strip{gap:10px}.lobby-screen{gap:30px}.lobby-heading h1{font-size:49px}.lobby-art{gap:10px}.lobby-art .tile{width:60px;height:60px}}
@media(max-width:800px){.app-header{height:75px;padding:0 22px;gap:14px}.brand{font-size:32px}.brand-icon{width:34px;height:36px}.header-tag{display:none}.header-actions{gap:5px}.header-actions>.soft-button{font-size:0;padding:10px;width:42px;height:42px;min-height:42px;background:#ffffff80}.header-actions>.soft-button .icon{width:20px;height:20px}.header-actions>.soft-button>span{display:none}.header-actions>.icon-button{width:41px;height:42px;border-radius:13px}.home-screen{max-width:560px;padding:23px 24px 0;grid-template-columns:1fr;gap:14px}.home-story{text-align:center;padding:5px 0 0}.home-story .eyebrow{justify-content:center;font-size:8px;letter-spacing:1.6px}.home-story h1{font-size:51px;letter-spacing:-2.5px;margin:20px 0 17px}.home-story>p{font-size:13px;line-height:1.8;margin-bottom:18px}.wide-only{display:none}.home-facts{justify-content:center;gap:16px;font-size:8px}.home-facts .icon{width:14px;height:14px}.hero-stage{margin:-5px 0 -24px;max-height:280px;overflow:visible}.hero-stage img{width:90%;margin:auto;max-height:310px;object-fit:cover}.hero-chip{right:-4px;top:30%;padding:9px 11px 9px 9px;font-size:9px;border-radius:14px}.hero-chip b{font-size:16px}.chip-star{width:32px;height:34px;border-radius:10px}.chip-star .icon{width:21px;height:21px}.hero-sticker{bottom:20%;left:2%;font-size:10px}.play-card{margin:10px 0 18px;max-width:none;padding:27px 26px 23px;border-radius:27px;text-align:left}.card-heading h2{font-size:26px}.overline{font-size:7px;letter-spacing:1px}.card-intro{font-size:11px;margin-bottom:22px}.card-footnote{margin-top:23px}footer{font-size:8px;padding:20px 0 25px;flex-direction:column;gap:7px;text-align:center}.lobby-screen{grid-template-columns:1fr;max-width:490px;padding:0 23px;margin:24px auto 35px;gap:25px}.lobby-heading{text-align:center}.lobby-heading .eyebrow{justify-content:center}.lobby-heading h1{font-size:40px;letter-spacing:-1.7px;margin:15px 0 10px}.lobby-heading h1 br{display:none}.lobby-heading h1 span{display:block}.lobby-heading>p{font-size:12px;line-height:1.7;margin:0}.lobby-heading .lobby-art{display:none}.lobby-card{padding:23px;border-radius:25px}.lobby-card-top{margin-bottom:22px}.room-code{font-size:30px}.seat-name{font-size:12px}.empty-seat{min-height:49px}
body[data-view=game] .app-header{height:60px;padding:0 15px}body[data-view=game] .brand{font-size:27px}body[data-view=game] .header-actions{gap:1px}body[data-view=game] .header-actions>.icon-button{width:36px;height:38px}body[data-view=game] .app-header .help-trigger{width:35px;height:38px;min-height:38px;padding:6px}.connection{display:none!important}.game-screen{height:calc(100dvh - 60px);min-height:620px;padding:0 10px}.game-topline{min-height:45px;gap:6px}.game-mode{font-size:7px;letter-spacing:.9px}.game-topline>.icon-button{width:33px;height:33px}.invite-chip{padding:5px 8px;font-size:8px;min-height:29px;gap:5px}.invite-chip>.icon{width:11px;height:11px}.invite-chip>span:last-child{display:none}#historyButton{padding:7px 8px;width:34px;height:34px;min-height:34px}#historyButton>span{display:none}#historyButton>.icon{width:18px;height:18px}.player-strip{gap:7px;padding:0 0 14px;min-height:76px}.player-card{min-width:0;max-width:200px;padding:9px 11px 9px 8px;gap:7px;flex:1;border-radius:14px}.player-card .avatar{width:31px;height:33px}.player-name{font-size:11px}.player-card.is-you .player-name:after{display:none}.player-sub{font-size:8px}.player-score{font-size:23px}.player-strip:has(.player-card:nth-child(3)){display:grid;grid-template-columns:1fr 1fr;min-height:130px;gap:6px 10px}.player-strip:has(.player-card:nth-child(3)) .player-card{max-width:none;padding:7px 10px}.player-strip:has(.player-card:nth-child(3)) .avatar{width:26px;height:27px}.player-strip:has(.player-card:nth-child(3)) .player-score{font-size:20px}.board-area{border-radius:20px;min-height:180px;margin-bottom:12px}.board-status{padding:13px 14px 3px;gap:8px;align-items:start}.board-status>div{gap:4px;display:flex;flex-direction:column;align-items:start}.turn-pill{font-size:11px}.turn-pill:before{width:6px;height:6px}#turnText{font-size:8px;max-width:250px;line-height:1.4}.bag-pill{font-size:8px;padding:6px 8px;gap:4px}.bag-pill b{font-size:10px}.bag-pill>.icon{width:12px;height:12px}.canvas-wrap{min-height:160px}.board-tools{right:10px;bottom:12px;gap:0;padding:3px;border-radius:12px}.board-tools .icon-button{width:34px;height:34px}.board-tools .icon{width:16px;height:16px}.board-tools #fullScreen{display:none}.board-tools i{margin:0 2px}.board-caption{display:none}.empty-hint{top:calc(50% + 55px);gap:5px}.empty-hint b{font-size:10px}.empty-hint>span:last-child{font-size:8px}.hand-panel{flex-direction:column;padding:13px 16px 11px;gap:0;border-radius:21px 21px 0 0;min-height:222px;max-width:480px;box-shadow:0 -4px 20px #a68ab00a}.hand-main{width:100%;max-width:430px;flex:initial}.rack-label{font-size:7px;letter-spacing:1px;padding:0 2px}#selectionHint{font-size:8px}.rack{gap:8px;padding:16px 3px 17px;min-height:84px}.tile{width:min(56px,calc((100vw - 108px)/6));height:auto;aspect-ratio:1;border-radius:11px;box-shadow:0 5px 0 #cec6d8,0 7px 0 #bfb3ce,0 10px 9px #80629a20}.tile-face{inset:8px}.tile:before{border-radius:9px}.tile-number{display:none}.tile.selected{transform:translateY(-7px)}.tile.selected:after,.tile.exchange-selected:after{width:17px;height:17px;font-size:9px;top:-6px;right:-5px}.hand-actions{width:100%;min-width:0;position:relative}.preview-score{font-size:9px;margin:0;position:absolute;right:0;top:-110px;pointer-events:none;opacity:0}.preview-score.has-score{position:relative;top:0;opacity:1;font-size:12px;margin:0 0 6px}.hand-actions .button{min-height:44px;font-size:12px;border-radius:12px}.minor-actions{justify-content:center;gap:20px;margin:7px 0 -2px}.minor-actions .text-button{font-size:10px;min-height:32px;padding:5px 7px}.minor-actions .text-button>.icon{width:14px;height:14px}.move-error{bottom:2px;font-size:8px}.history-panel{right:10px;top:46px;bottom:10px;width:min(300px,calc(100vw - 20px));border-radius:19px}.score-burst{font-size:23px;top:22%}.toast{bottom:20px;font-size:11px;padding:12px 17px;min-width:230px}.reconnect-banner{font-size:10px;padding:10px 14px}dialog{padding:27px;max-height:90dvh;border-radius:25px}dialog h2{font-size:29px}.rules-dialog h2{font-size:29px}.rule-example{gap:5px}.rule-example .tile{width:35px;height:35px;border-radius:7px}.rule-example .tile-face{inset:7px}.rule-step p{font-size:11px}.rule-step h3{font-size:13px}.dialog-actions{gap:8px}.dialog-actions .button{padding:12px 10px;font-size:10px}.settings-dialog .drawer-heading h2{font-size:25px}}
@media(max-width:370px){.app-header{padding:0 17px}.home-screen{padding-left:20px;padding-right:20px}.home-story h1{font-size:43px;letter-spacing:-2px}.home-facts{gap:10px;font-size:7px}.home-facts .icon{width:12px;height:12px}.play-card{padding:24px 21px}.card-heading h2{font-size:23px}.hero-stage{max-height:250px}.hero-stage img{max-height:280px}.hero-chip{right:-6px;font-size:8px}.hero-chip b{font-size:14px}.hero-sticker{font-size:9px}.game-mode{display:none}.game-topline{gap:7px}.player-card{padding-left:5px;padding-right:8px;gap:5px}.player-card .avatar{width:27px;height:29px}.player-name{font-size:10px}.player-score{font-size:21px}.hand-panel{padding-left:13px;padding-right:13px}.rack{gap:7px}.minor-actions{gap:12px}.lobby-card{padding:20px}.room-code{font-size:27px;letter-spacing:4px}.setting-row small{font-size:9px}}
@media(max-height:760px) and (min-width:801px){.app-header{height:76px}.home-screen{padding-top:15px}.home-story h1{font-size:56px;margin:20px 0 15px}.home-story>p{font-size:13px;margin-bottom:16px}.hero-stage{max-height:290px;overflow:visible;margin-top:-8px;margin-bottom:-35px}.hero-stage img{height:320px;object-fit:cover}.hero-chip{top:23%}.hero-sticker{bottom:12%}.home-facts{font-size:9px}.play-card{padding:24px 27px 20px}.card-intro{margin:12px 0 18px}.mode-switch{margin:17px 0 18px}footer{padding-top:18px;padding-bottom:18px}.game-screen{min-height:570px}.player-strip{min-height:72px;padding-bottom:13px}.player-card{padding-top:8px;padding-bottom:8px}.game-topline{min-height:46px}.board-area{margin-bottom:14px}.hand-panel{min-height:160px;padding-top:12px;padding-bottom:10px}.tile{width:58px;height:58px}.rack{min-height:88px;padding-top:14px}.board-status{padding-top:13px}.board-tools{bottom:12px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}body[data-motion=reduced] *,body[data-motion=reduced] *:before,body[data-motion=reduced] *:after{animation:none!important;transition:none!important}
/* Readable type and stronger interaction hierarchy. */
:root{--readable:#756482;--strong:#59436f}
.input-wrap input:not([type=checkbox]){padding-left:42px}
.header-tag,.home-story>p,.home-facts,.card-intro,.mini-note,.card-footnote,footer,.lobby-heading>p,.lobby-hint,.seat-detail,.empty-name,.player-sub,#turnText,.bag-pill,.rack-label,#selectionHint,.preview-score,.board-caption,.rule-step p,dialog details p,dialog>p,.setting-row small,.settings-note,.history-empty,.history-row small{color:var(--readable)}
.home-story h1>span{color:#8e60c5}.eyebrow,.overline,.game-mode{color:#8a729d}
.home-story>p{font-size:16px}.home-facts{font-size:11px}.card-intro{font-size:13px}.card-heading h2{font-size:28px}.card-footnote,.mini-note{font-size:10px}
label{color:var(--strong);font-size:12px}.input-wrap input,input:not([type=checkbox]){font-size:15px;color:#59436f}input::placeholder{color:#9b88ab;font-size:13px}
.button{font-size:14px}.button-sun{color:#72501b;background:linear-gradient(#ffdd85,#ffcb58);border-top-color:#ffeeb6;box-shadow:0 5px 0 #dba53e,0 8px 15px #e9bd591b}.button-sun:hover:not(:disabled){box-shadow:0 7px 0 #dba53e,0 12px 20px #ecc26022}.button-purple{background:linear-gradient(#9567cf,#8252bb);border-color:#9163c7;border-top-color:#b38bdc;box-shadow:0 4px 0 #6c409e;color:#fff}.button-purple:hover:not(:disabled){box-shadow:0 6px 0 #6c409e,0 9px 18px #9d80c425}
.mode-switch button{color:#8b759b;font-size:12px}.mode-switch button[aria-selected=true]{color:#8861b0}.overline{font-size:9px}.text-button,.icon-button,.soft-button{color:#8b6fa3}.mini-note .icon{color:#8b779c}
.solo-description p{font-size:12px;color:var(--readable)}.solo-description h3{color:var(--strong)}
.seat-name,.player-name{color:var(--strong)}.player-name{font-size:14px}.player-sub{font-size:11px}.player-score{color:#9272b3}.player-card.active .player-score{color:#8756bb}
.turn-pill{color:#8657b5;font-size:14px}.turn-pill.waiting{color:#8e799f}#turnText{font-size:12px}.bag-pill{font-size:11px}.bag-pill b{font-size:13px}
.rack-label{font-size:10px}#selectionHint{font-size:11px}.preview-score{font-size:11px}.preview-score.has-score{color:#8954ba;font-size:17px}.hand-actions .button{font-size:14px}.minor-actions .text-button{min-height:40px;font-size:11px;color:#8d729f}.minor-actions .text-button:disabled{color:#bfb0c8}
.empty-hint{color:#88679f}.empty-hint>span:last-child{color:#9c87ac}.tile:disabled:not(.used){opacity:.92}
.rule-step h3,.history-row,.setting-row b{color:var(--strong)}.rule-step p,dialog details p{font-size:13px}.rule-step h3{font-size:15px}.setting-row small{font-size:11px}.setting-row b{font-size:13px}.settings-note{color:var(--readable)!important}.final-score{color:var(--strong)}
body[data-theme=night]{--readable:#c0afd1;--strong:#e7d6f4}body[data-theme=night] .eyebrow,body[data-theme=night] .overline,body[data-theme=night] .game-mode{color:#bba3cf}body[data-theme=night] .turn-pill{color:#c7a0f0}body[data-theme=night] .text-button,body[data-theme=night] .icon-button,body[data-theme=night] .soft-button{color:#c3a6dc}body[data-theme=night] .mode-switch button{color:#baa1ce}
@media(max-width:800px){.home-story>p{font-size:14px}.home-facts{font-size:9px}.card-intro{font-size:12px}.card-heading h2{font-size:27px}.player-name{font-size:12px}.player-sub{font-size:9px}.turn-pill{font-size:12px}#turnText{font-size:10px}.rack-label{font-size:8px}#selectionHint{font-size:9px}.hand-actions .button{font-size:13px}.minor-actions .text-button{font-size:11px;min-height:36px}.minor-actions{gap:17px}.preview-score.has-score{font-size:14px}.empty-hint b{font-size:11px}.empty-hint>span:last-child{font-size:9px}.board-tools .icon-button{width:44px;height:44px}.board-tools{right:10px;bottom:10px}.board-status{padding-top:12px}.home-facts>span:last-child{display:none}.rule-step p,dialog details p{font-size:12px}.game-topline>.icon-button{height:44px;width:38px}#historyButton{height:44px;width:38px}.game-topline{min-height:49px}.invite-chip{min-height:38px}.setting-row input[type=checkbox]{min-width:44px;min-height:28px}.setting-row input:checked:before{left:22px}.setting-row input[type=checkbox]:before{top:4px}}

/* Primary touch controls keep a 44px activation target. */
.mode-switch button{min-height:44px}.theme-options button{width:44px;height:44px}.dialog-close{width:44px;height:44px}
@media(max-width:800px){body[data-view=game] .header-actions>.icon-button,body[data-view=game] .app-header .help-trigger{width:44px;height:44px;min-height:44px}.game-topline>.icon-button,#historyButton{width:44px;height:44px}.minor-actions .text-button{min-height:44px}.hand-panel{min-height:235px}}
@media(max-width:370px){.hand-panel{padding-left:6px;padding-right:6px}.rack{gap:4px;padding-left:0;padding-right:0}.rack .tile{width:44px;height:44px;aspect-ratio:auto}.rack-label{padding-left:6px;padding-right:6px}.hand-actions{padding-left:6px;padding-right:6px}}


/* Flat, compact game layout. Keep the board and hand in one viewport. */
body[data-view=game] .ambient{display:none}
body[data-view=game] .app-header{height:58px}
.game-screen{height:calc(100dvh - 58px);min-height:480px;padding:0 16px 12px;background:none}
.game-topline{min-height:44px}.player-strip{min-height:58px;padding-bottom:10px;gap:10px}.player-card{padding:7px 12px;box-shadow:none;border-radius:12px;max-width:230px;min-width:0}.player-card.active{box-shadow:none;border-color:var(--violet)}.player-card .avatar{width:30px;height:30px}.player-sub{font-size:11px}.player-name{font-size:13px}.player-score{font-size:25px}.active-player-dot{display:none}
.board-area{margin-bottom:10px;border-radius:16px;box-shadow:none;background:var(--bg);min-height:120px}.canvas-wrap{min-height:80px}.board-status{padding:10px 14px 0}#turnText{font-size:12px;color:var(--muted)}.board-tools{right:10px;bottom:10px;box-shadow:none;backdrop-filter:none}.board-tools .icon-button{width:44px;height:44px}.board-caption{font-size:10px}
.hand-panel{max-width:none;width:100%;min-height:128px;border-radius:16px;padding:12px 22px;gap:24px;box-shadow:none;align-items:center}.hand-main{max-width:650px}.rack{min-height:76px;padding:9px 0;gap:10px}.rack:after{display:none}.tile,.tile:before{box-shadow:none!important;background:var(--surface);transform:none;border:1px solid var(--line)}.tile.selected{transform:translateY(-3px);outline:3px solid var(--violet);outline-offset:2px}.tile.selected:after{display:none}.tile{width:58px;height:58px}.tile-face{filter:none}.hand-actions{width:260px}.preview-score{font-size:12px}.minor-actions{gap:12px;justify-content:space-between}.minor-actions .text-button{min-height:44px;font-size:12px}.hand-actions .button{min-height:46px;box-shadow:none}.rack-label{font-size:10px}#selectionHint{font-size:11px}.move-error{position:static}
@media(max-width:800px){body[data-view=game] .app-header{height:52px;padding:0 12px}.game-screen{height:calc(100dvh - 52px);min-height:440px;padding:0 8px max(8px,env(safe-area-inset-bottom))}.game-topline{min-height:42px}.player-strip{min-height:54px;padding-bottom:8px;gap:6px}.player-card{padding:6px 8px}.player-card .avatar{width:25px;height:25px}.player-name{font-size:11px}.player-sub{font-size:9px}.player-score{font-size:22px}.player-strip:has(.player-card:nth-child(3)){display:flex;min-height:54px;gap:4px}.player-strip:has(.player-card:nth-child(3)) .avatar{display:none}.player-strip:has(.player-card:nth-child(3)) .player-card{padding:6px 5px;flex-direction:column;gap:3px}.player-strip:has(.player-card:nth-child(3)) .player-sub{display:none}.board-status{padding:9px 10px 0}#turnText{font-size:10px}.board-area{margin-bottom:8px;border-radius:12px}.board-tools{padding:0;bottom:6px;right:6px}.board-tools .icon-button{width:40px;height:40px}.hand-panel{min-height:178px;padding:9px 10px 5px;gap:0;max-width:none;border-radius:12px;flex-direction:column}.hand-main{width:100%;max-width:450px}.rack{min-height:65px;gap:7px;justify-content:center;padding:9px 0}.rack .tile{width:clamp(38px,12vw,54px);height:auto;aspect-ratio:1}.rack-label{font-size:9px}#selectionHint{font-size:10px}.hand-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;align-items:center}.preview-score{position:static;opacity:1;grid-column:1/-1;font-size:10px;margin:0;text-align:center}.preview-score.has-score{margin:0;font-size:12px}.minor-actions{margin:0;gap:0;justify-content:space-around}.minor-actions .text-button{font-size:11px;padding:4px}.hand-actions .button{font-size:12px}.empty-hint{top:65%}.empty-hint b{font-size:11px}.empty-hint>span:last-child{font-size:10px}}

.rack{perspective:none}.tile:hover:not(:disabled){transform:translateY(-2px)}.tile.selected:hover{transform:translateY(-3px)}
@media(max-width:1000px) and (max-height:500px) and (orientation:landscape){.game-screen{min-height:280px;position:relative;padding-right:260px}.game-topline{min-height:38px}.player-strip{min-height:45px}.hand-panel{position:absolute;right:8px;top:8px;bottom:8px;width:242px;min-height:0;justify-content:center;flex-direction:column;gap:12px}.rack{flex-wrap:wrap;max-width:200px;margin:auto}.rack .tile{width:48px}.hand-actions{display:flex;flex-direction:column}.hand-actions .button{width:100%}.minor-actions{width:100%}.board-area{margin-bottom:0}body[data-view=game] .app-header{height:46px}.game-screen{height:calc(100dvh - 46px)}}

@media(max-width:1000px) and (max-height:500px) and (orientation:landscape){.hand-actions{width:100%;min-width:0}.rack-label>span:first-child{white-space:nowrap}#selectionHint{max-width:60%;text-align:right}.board-status>div{display:flex;flex-direction:column;align-items:start;gap:3px}}
@media(max-width:800px) and (orientation:portrait){.hand-actions{grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:0;min-width:0}.hand-actions .button{min-width:0;padding:8px;font-size:11px;gap:6px}.minor-actions{min-width:0}.minor-actions .text-button{white-space:nowrap;gap:4px;padding:4px 2px;font-size:10px}.minor-actions .text-button .icon{width:13px;height:13px}.preview-score{min-width:0;max-width:100%}}

/* Compact hand, full-board view, optional solo coaching. */
.hand-panel{min-height:102px;padding:8px 18px;gap:18px;position:relative}.rack{min-height:58px;padding:6px 0;gap:8px}.rack .tile{width:44px;height:44px}.rack .tile-face{inset:8px}.rack-label{font-size:9px}.hand-actions .button{min-height:40px}.preview-score{margin-bottom:3px}.minor-actions{margin-top:3px}.minor-actions .text-button{min-height:36px}.coach{position:absolute;bottom:calc(100% + 8px);right:12px;max-width:min(520px,calc(100vw - 40px));background:var(--surface);border:1px solid var(--violet);border-radius:14px;box-shadow:0 6px 20px #46306016;display:flex;align-items:center;gap:12px;padding:12px;z-index:12;font-size:13px}.coach #coachText{flex:1}.coach .text-button{white-space:nowrap;font-weight:900;color:var(--violet-dark)}.coach .icon-button{width:36px;height:36px}.board-caption{pointer-events:none}
@media(max-width:800px) and (orientation:portrait){.hand-panel{min-height:138px;padding:6px 8px 4px}.rack{min-height:49px;padding:5px 0;gap:7px}.rack .tile{width:clamp(34px,10.6vw,43px);height:auto;aspect-ratio:1}.rack .tile-face{inset:6px}.hand-actions{gap:3px 8px;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr)}.hand-actions .button{min-height:40px}.minor-actions .text-button{min-height:40px;padding:3px 2px;font-size:10px}.minor-actions .text-button .icon{width:12px}.coach{right:0;max-width:100%;font-size:11px;gap:7px;padding:9px;flex-wrap:wrap}.coach #coachText{flex-basis:calc(100% - 45px)}.coach #closeCoach{position:absolute;right:5px;top:5px}.coach #coachText{padding-right:30px}}
@media(max-width:1000px) and (max-height:500px) and (orientation:landscape){.game-screen{padding-right:210px}.hand-panel{width:192px;padding:8px;gap:8px}.rack{max-width:170px;gap:7px}.rack .tile{width:42px;height:42px}.hand-actions .button{min-height:40px}.minor-actions{flex-wrap:wrap;gap:3px}.minor-actions .text-button{font-size:10px;padding:4px 2px}.coach{position:fixed;left:12px;right:210px;bottom:12px;max-width:none}}
@media(max-width:800px) and (orientation:portrait){.hand-panel{gap:0}.rack .tile{width:clamp(38px,11vw,43px)}}.move-error:empty{display:none}

/* Graphic-first controls and synchronized table features. */
body[data-view=game] .game-mode,body[data-view=game] #turnText,body[data-view=game] .board-caption,body[data-view=game] #selectionHint,body[data-view=game] .player-sub,body[data-view=game] .rack-label,body[data-view=game] .empty-hint b,body[data-view=game] .empty-hint>span:last-child{display:none}
body[data-view=game] .header-tag,body[data-view=game] .help-trigger>span{display:none}.turn-pill:before{display:none}.turn-pill .icon{width:20px;height:20px}.turn-pill{padding:3px}.player-card{position:relative}.player-card .avatar{width:26px;height:26px}.board-status{min-height:36px;padding-top:5px}.board-status>div{flex:1}.bag-pill>span:last-child{display:none}.hand-actions .button>span,.minor-actions .text-button>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.hand-actions{display:flex;align-items:center;justify-content:center;gap:12px;width:auto;min-width:0}.hand-actions .button{width:50px!important;min-width:50px;min-height:44px;padding:10px;position:relative}.hand-actions .button .icon{width:23px;height:23px}.minor-actions{display:flex;gap:6px;margin:0}.minor-actions .text-button{display:flex;align-items:center;justify-content:center;width:40px;height:44px;padding:8px;border-radius:12px;background:var(--bg);position:relative}.minor-actions .text-button .icon{width:20px;height:20px}.preview-score{font-size:14px;font-weight:900;min-width:0;margin:0}.preview-score:empty{display:none}.hand-panel{min-height:78px;padding:9px 18px;gap:18px}.hand-main{flex:0 1 auto}.rack{min-height:46px;padding:2px 0}.board-area::after{content:'';position:absolute;inset:1px;z-index:6;pointer-events:none;border-radius:inherit;border:2px solid #9e7ce0;box-shadow:inset 0 0 20px #a17de226;opacity:0}.board-area.is-your-turn::after{animation:turn-glow 2.8s ease-in-out infinite}.board-area.is-trial{border-style:dashed}@keyframes turn-glow{0%,100%{opacity:.25}50%{opacity:.8}}body[data-motion=reduced] .board-area.is-your-turn::after{animation:none;opacity:.6}
.timer-option{display:flex;align-items:center;gap:10px;margin:12px 0;font-size:12px;color:var(--muted)}.timer-option select{margin-left:auto;min-height:40px;border-radius:12px;border:1px solid var(--line);padding:6px 12px;background:var(--surface);color:var(--ink);font:inherit}.turn-clock{--remaining:1;min-width:40px;height:36px;display:grid;place-items:center;font-size:14px;font-weight:900;font-variant-numeric:tabular-nums;border:2px solid transparent;border-radius:50%;background:linear-gradient(var(--bg),var(--bg)) padding-box,conic-gradient(var(--violet) calc(var(--remaining)*1turn),var(--line) 0) border-box}.turn-clock.urgent{color:#bc2929}.chat-panel{position:absolute;right:18px;top:48px;bottom:100px;width:min(330px,calc(100% - 36px));background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 12px 35px #392b6129;padding:14px;display:flex;flex-direction:column;gap:10px;z-index:20}.chat-panel h2{font-size:18px}.chat-panel .drawer-heading .icon-button{width:36px;height:36px}.chat-messages{flex:1;min-height:40px;overflow:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:8px}.chat-message{padding:8px 10px;background:var(--bg);border-radius:12px;max-width:90%;align-self:start;word-break:break-word}.chat-message.own{align-self:end;background:var(--lilac)}.chat-message strong{font-size:10px}.chat-message p{margin:3px 0 0;font-size:13px;white-space:pre-wrap}.quick-messages{display:grid;grid-template-columns:1fr 1fr;gap:5px}.quick-message{padding:7px 5px;min-height:36px;background:var(--bg);border-radius:9px;font-size:10px;font-weight:800}.chat-panel form{display:flex;gap:6px}.chat-panel input{width:0;flex:1;min-height:44px;padding:8px 10px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink)}#chatButton{position:relative}#chatButton.has-unread:after{content:'';position:absolute;right:6px;top:6px;width:8px;height:8px;border-radius:50%;background:#e33d2e}.chat-panel .icon-button{flex-shrink:0}
@media(max-width:800px) and (orientation:portrait){.hand-panel{min-height:106px;padding:5px 8px;gap:4px}.hand-main{flex:none;width:100%}.rack{min-height:42px}.hand-actions{width:100%;display:flex;gap:10px}.hand-actions .button{min-height:40px;height:40px;min-width:44px;width:44px!important}.minor-actions .text-button{width:36px;height:40px;min-height:40px;padding:8px}.minor-actions .text-button .icon{width:18px;height:18px}.preview-score.has-score{font-size:13px;margin:0}.player-card .avatar{display:none}.turn-clock{min-width:34px;height:32px;font-size:12px}.chat-panel{right:8px;top:44px;bottom:112px;width:calc(100% - 16px)}.game-topline{gap:5px}#historyButton{width:36px}.game-topline>#chatButton{width:36px;height:36px}}
@media(max-width:1000px) and (max-height:500px) and (orientation:landscape){.hand-actions{flex-direction:row;flex-wrap:wrap;gap:7px}.hand-panel{min-height:0}.chat-panel{bottom:10px;top:10px;right:210px;width:320px;max-width:calc(100% - 220px)}.quick-messages{grid-template-columns:1fr 1fr}.quick-message{min-height:28px;padding:4px;font-size:9px}}

body[data-view=game] .minor-actions .text-button{font-size:0!important;gap:0}body[data-view=game] #historyButton>span{display:none}body[data-view=game] #historyButton{width:40px;height:40px;padding:8px}.minor-actions .text-button:focus-visible:after{content:attr(aria-label);position:absolute;bottom:calc(100% + 6px);font-size:11px;white-space:nowrap;background:var(--ink);color:var(--surface);padding:5px 7px;border-radius:6px}.hand-panel{align-self:stretch}

.game-screen.chat-open .board-area,.game-screen.chat-open .player-strip{margin-right:350px}.quick-message{display:flex;gap:4px;align-items:center;justify-content:center}
@media(max-width:800px) and (orientation:portrait){.game-screen.chat-open .board-area,.game-screen.chat-open .player-strip{margin-right:0}.game-screen.chat-open .board-area{order:1;min-height:100px}.game-screen.chat-open .chat-panel{position:relative;order:2;top:auto;right:auto;bottom:auto;width:100%;height:202px;min-height:202px;padding:8px;gap:5px;margin-bottom:6px}.game-screen.chat-open .hand-panel{order:3}.game-screen.chat-open .quick-messages{grid-template-columns:repeat(6,minmax(0,1fr));gap:3px}.game-screen.chat-open .quick-label{display:none}.game-screen.chat-open .quick-message{min-height:30px;padding:4px;font-size:16px}.game-screen.chat-open .chat-panel .drawer-heading h2{font-size:14px}.game-screen.chat-open .chat-panel .drawer-heading .icon-button{width:30px;height:30px}.game-screen.chat-open .chat-panel form input,.game-screen.chat-open .chat-panel form .icon-button{min-height:36px;height:36px}.chat-message p{font-size:11px}.chat-message strong{font-size:9px}.chat-messages{min-height:30px}}

.turn-pill[data-opening]:not([data-opening=""]):after{content:attr(data-opening);display:inline-grid;place-items:center;width:23px;height:23px;border-radius:7px;background:var(--surface);border:1px solid var(--line);font-size:12px;margin-left:6px;font-weight:900}

/* Neutral night surfaces; keep the six symbol colours on identical ivory tiles. */
body[data-theme=night]{color-scheme:dark;--bg:#111827;--surface:#1e293b;--ink:#edf2fa;--muted:#a9b8ce;--line:#3c4c64;--board:#162031;--grid-color:#7e94b32c;--readable:#b7c4d8;--strong:#edf2fa;--lilac:#35324f;--violet:#b6a0f6;--violet-dark:#d5c6ff;color:var(--ink);background:var(--bg)}
body[data-theme=night] .play-card,body[data-theme=night] .lobby-card,body[data-theme=night] dialog,body[data-theme=night] .hand-panel,body[data-theme=night] .chat-panel{background:var(--surface);border-color:var(--line)}
body[data-theme=night] .app-header,body[data-theme=night][data-view=game] .app-header{background:#111827;border-color:var(--line)}
body[data-theme=night] .board-area{background:var(--board);border-color:var(--line);box-shadow:none}body[data-theme=night] #board{--grid-color:#7e94b32c}
body[data-theme=night] .player-card,body[data-theme=night] .seat{background:#1c2739;border-color:#35465f;box-shadow:none}body[data-theme=night] .player-card.active{background:#29344b;border-color:#b6a0f6;box-shadow:none}
body[data-theme=night] .player-score,body[data-theme=night] .player-card.active .player-score{color:#d5c6ff}body[data-theme=night] .player-name,body[data-theme=night] .seat-name{color:var(--ink)}
body[data-theme=night] .icon-button,body[data-theme=night] .soft-button,body[data-theme=night] .minor-actions .text-button,body[data-theme=night] .invite-chip,body[data-theme=night] .bag-pill{color:#cfdbec;background:#263348;border-color:#43536c;box-shadow:none}body[data-theme=night] .icon-button:hover,body[data-theme=night] .soft-button:hover{background:#35445e;color:#f1ebff}
body[data-theme=night] .board-tools{background:#1e293bf2;border-color:#43536c;box-shadow:none}body[data-theme=night] .board-tools .icon-button{background:transparent;border-color:transparent}
body[data-theme=night] .hand-panel .tile,body[data-theme=night] .rule-example .tile,body[data-theme=night] .lobby-art .tile{background:#fffefd!important;border-color:#cbd3df;color:#252936}body[data-theme=night] .tile:before{background:transparent!important;border-color:transparent}body[data-theme=night] .tile.selected{background:#fff4d6!important;outline-color:#c7b4ff}
body[data-theme=night] .minor-actions .text-button:disabled,body[data-theme=night] .icon-button:disabled{color:#77879f;background:#202c3f}body[data-theme=night] .button:disabled{opacity:.4}body[data-theme=night] .button-sun{background:#ffd365;color:#3d2a08;border-color:#f6ce73;box-shadow:none}body[data-theme=night] .button-purple{background:#7353b8;border-color:#9575d9;color:#fff;box-shadow:none}
body[data-theme=night] .preview-score.has-score,body[data-theme=night] .turn-pill,body[data-theme=night] .empty-hint{color:#d5c6ff}body[data-theme=night] .turn-clock.urgent{color:#ffacac}body[data-theme=night] .turn-clock{background:linear-gradient(var(--board),var(--board)) padding-box,conic-gradient(var(--violet) calc(var(--remaining)*1turn),var(--line) 0) border-box}
body[data-theme=night] input:not([type=checkbox]),body[data-theme=night] .room-code,body[data-theme=night] .timer-option select{background:#121d2d;color:#edf2fa;border-color:#4b5d78}body[data-theme=night] input::placeholder{color:#9cabbe}body[data-theme=night] input:not([type=checkbox]):focus{background:#1a273c}
body[data-theme=night] .mode-switch,body[data-theme=night] .card-mini-icon,body[data-theme=night] .solo-description .bot-portrait{background:#29364c}body[data-theme=night] .mode-switch button{color:#bdcbe0}body[data-theme=night] .mode-switch button[aria-selected=true]{background:#4b3c70;color:#f3edff}
body[data-theme=night] .history-panel{background:#1e293bf5;border-color:var(--line)}body[data-theme=night] .history-row,body[data-theme=night] .chat-message{color:var(--ink);border-color:var(--line)}body[data-theme=night] .history-row strong{color:#e0d5ff;background:#35324f}body[data-theme=night] .chat-message{background:#26354a}body[data-theme=night] .chat-message.own{background:#3c3559}body[data-theme=night] .quick-message{background:#29364c;color:#dce5f4}
body[data-theme=night] .setting-row,body[data-theme=night] details{border-color:var(--line)}body[data-theme=night] .setting-row small,body[data-theme=night] .settings-note,body[data-theme=night] dialog p{color:var(--readable)}body[data-theme=night] .theme-options button{background:#263348;border-color:#4b5d78;color:#d2def0}body[data-theme=night] .theme-options button[aria-pressed=true]{background:#514274;border-color:#b6a0f6;color:#fff}body[data-theme=night] .setting-row input[type=checkbox]{background:#34445d;border-color:#536681}body[data-theme=night] .setting-row input:checked{background:#9b81df;border-color:#b6a0f6}
body[data-theme=night] .final-score{background:#26354a;border-color:var(--line);color:var(--ink)}body[data-theme=night] .final-score.first{background:#463c29;border-color:#9d8552;color:#ffdf92}body[data-theme=night] .hero-chip{background:#29364c;border-color:#53617a;color:#d4dff0}body[data-theme=night] .hero-chip b{color:#e0d4ff}
.timer-value{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;min-width:68px;min-height:40px;padding:6px 12px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);font-weight:850}
body[data-theme=night] .canvas-wrap{background:none}body[data-theme=night] .button-sun:disabled{opacity:1;background:#2b384e;border-color:#465670;color:#8293ac;box-shadow:none}
/* Free table navigation and a clear primary action at the lower right. */
#board{touch-action:none;cursor:grab;--grid-color:#9583b56b}body[data-theme=night] #board{--grid-color:#8fa8c66b}
.hand-panel{justify-content:space-between;min-height:88px}.hand-main{flex:1;max-width:650px}.hand-actions{margin-left:auto;gap:14px;flex-shrink:0}.minor-actions{order:1;gap:6px}.preview-score{order:2;position:static;opacity:1;color:var(--violet-dark)}
.minor-actions .text-button{width:44px;height:44px;border:1px solid var(--line);background:var(--surface);border-radius:13px;color:var(--violet-dark)}.minor-actions .text-button:hover:not(:disabled){background:var(--lilac);transform:translateY(-2px)}.minor-actions .text-button:disabled{opacity:.4}.minor-actions:has(#pass:not(.hidden)) #exchange{display:none}
#commit,body[data-theme=night] #commit{order:3;width:132px!important;min-width:132px;min-height:54px;height:54px;padding:12px 18px;border:1px solid #198352;border-top-color:#56bd8b;border-radius:16px;background:linear-gradient(180deg,#28a66e,#188653);color:#fff;font-size:16px;font-weight:900;box-shadow:0 3px 0 #11633e,0 5px 12px #18865320;opacity:1}
#commit>span{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:nowrap}#commit:hover:not(:disabled){background:linear-gradient(180deg,#30b87b,#1c955d);box-shadow:0 4px 0 #11633e,0 7px 15px #18865325;transform:translateY(-1px)}#commit:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 #11633e}
#commit:disabled,body[data-theme=night] #commit:disabled{background:#d5e8de;border-color:#bfd8ca;color:#688b78;box-shadow:none;opacity:1}body[data-theme=night] #commit:disabled{background:#243e36;border-color:#35574a;color:#85ac98}
.board-tools{padding:4px;border:1px solid var(--line);border-radius:16px;background:var(--surface);gap:2px}.board-tools .icon-button{border-radius:11px}.board-tools .icon-button:hover{background:var(--lilac)}
@media(max-width:800px) and (orientation:portrait){.hand-panel{min-height:114px;padding:6px 8px;gap:6px}.hand-main{flex:none}.hand-actions{margin:0;padding:0;gap:8px;justify-content:space-between}.minor-actions{gap:4px}.minor-actions .text-button{width:36px;height:44px;min-height:44px;border-radius:12px}#commit,body[data-theme=night] #commit{width:100px!important;min-width:100px;min-height:48px;height:48px;padding:10px;font-size:14px;border-radius:14px}.preview-score.has-score{font-size:13px}.hand-actions .button .icon{width:21px;height:21px}}
@media(max-width:1000px) and (max-height:500px) and (orientation:landscape){.hand-panel{min-height:0}.hand-main{flex:0 1 auto;width:100%}.hand-actions{margin:0;width:100%;gap:10px;justify-content:center}.minor-actions{width:auto}.preview-score{flex:1}#commit,body[data-theme=night] #commit{width:100%!important;min-width:0;height:50px;min-height:50px}}
/* Responsive table shell: one mobile toolbar, a slim score strip, and a full-height canvas. */
body[data-view=game]{overscroll-behavior:none}.game-screen{min-height:0}.board-area,.canvas-wrap{min-height:0}.hand-panel{border-width:1px}.player-card{border-width:1px}.settings-guide{display:flex;width:100%;justify-content:center;margin-top:16px;border:1px solid var(--line);color:var(--violet-dark)}
@media(max-width:800px) and (orientation:portrait){
 body[data-view=game] .app-header{height:0;padding:0;border:0;background:none!important;position:relative;z-index:30}
 body[data-view=game] .app-header .brand,body[data-view=game] .app-header .header-tag,body[data-view=game] .app-header .help-trigger,body[data-view=game] #soundButton,body[data-view=game] #connection{display:none}
 body[data-view=game] .header-actions{position:absolute;right:max(8px,env(safe-area-inset-right));top:calc(4px + env(safe-area-inset-top));gap:0}
 body[data-view=game] .app-header #settingsButton{width:44px;height:44px;border-radius:12px}
 .game-screen{height:100dvh;min-height:0;padding:env(safe-area-inset-top) max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));gap:6px}
 .game-topline{height:48px;min-height:48px;gap:4px;padding-right:48px}.game-topline>#leave,.game-topline>#chatButton,body[data-view=game] #historyButton{width:40px;height:44px;min-height:44px;padding:10px;flex-shrink:0}
 .invite-chip{min-width:0;min-height:36px;gap:5px;padding:6px 10px;font-size:10px}.invite-chip>span:last-child:not(#gameCodeText){display:none}.game-top-spacer{min-width:0}
 .player-strip,.player-strip:has(.player-card:nth-child(3)){min-height:40px;height:40px;padding:0;gap:5px;flex-shrink:0;display:flex}
 .player-card,.player-strip:has(.player-card:nth-child(3)) .player-card{max-width:none;min-width:0;padding:7px 10px;gap:6px;border-radius:11px;flex-direction:row;align-items:center}
 .player-name{font-size:12px;line-height:1.2}.player-card.is-you .player-name:after{display:none}.player-card.is-you .player-name:before{content:'';display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--violet);margin-right:5px;vertical-align:2px}.player-score{font-size:22px}.player-strip:has(.player-card:nth-child(3)) .player-name{font-size:10px}.player-strip:has(.player-card:nth-child(3)) .player-score{font-size:18px}.player-strip:has(.player-card:nth-child(3)) .player-card{padding:6px}
 .board-area{margin:0;border-radius:14px;flex:1;min-height:100px}.canvas-wrap{min-height:0}.board-status{position:absolute;inset:7px 8px auto;min-height:30px;padding:0;gap:7px;pointer-events:none}.board-status>div{flex:1}.turn-pill{padding:4px 6px;border-radius:9px;background:var(--surface)}.turn-pill .icon{width:17px;height:17px}.bag-pill{padding:6px 8px;background:var(--surface)}.turn-clock{min-width:32px;height:32px;font-size:11px}
 .board-tools{left:8px;right:auto;bottom:8px;padding:2px;border-radius:13px;gap:0}.board-tools .icon-button{width:38px;height:38px;min-height:38px}.board-tools #fullScreen,.board-tools i{display:none}
 .hand-panel{min-height:108px;padding:7px 8px 8px;gap:7px;border-radius:15px;flex-shrink:0}.rack{min-height:42px;padding:0;gap:7px;justify-content:center}.rack .tile{width:clamp(38px,10.8vw,46px);height:clamp(38px,10.8vw,46px);border-radius:10px}.rack .tile-face{inset:7px}.tile-number{display:none}.hand-actions{gap:8px}.minor-actions{gap:5px}.minor-actions .text-button{width:40px;height:44px}.minor-actions .text-button .icon{width:20px;height:20px}#commit,body[data-theme=night] #commit{min-height:46px;height:46px;width:108px!important;min-width:108px}.preview-score.has-score{font-size:12px}.move-error{font-size:11px;line-height:1.3}
 .coach{bottom:calc(100% + 6px);left:0;right:0;max-width:100%;font-size:12px}
 .game-screen.chat-open .board-area{min-height:100px}.game-screen.chat-open .chat-panel{height:180px;min-height:180px;margin:0;border-radius:14px}.history-panel{top:54px;right:6px;bottom:120px;width:calc(100% - 12px);max-width:350px;border-radius:16px}
 .home-screen{padding:12px 16px 0;gap:12px;max-width:490px}.home-story{padding:0}.home-story .eyebrow{font-size:8px}.home-story h1{font-size:34px;line-height:1.05;letter-spacing:-1.3px;margin:12px 0 8px}.home-story>p{font-size:12px;line-height:1.5;margin:0}.home-facts{margin-top:10px;font-size:9px;gap:16px}.hero-stage{display:none}.play-card{margin:2px 0 0;padding:20px;border-radius:22px}.card-heading h2{font-size:25px}.card-heading .overline{display:none}.card-mini-icon{width:38px;height:38px}.card-intro{margin:10px 0 16px}.mode-switch{margin:14px 0}.divider{margin:17px 0 12px}.mini-note{margin:12px 0 0}.card-footnote{display:none}.resume-button{margin-top:12px;padding-top:12px}footer{padding:14px 0 18px}footer>span:last-child{display:none}
 .lobby-screen{padding:0 16px;margin:12px auto 20px;gap:14px}.lobby-heading .eyebrow,.lobby-heading>p{display:none}.lobby-heading h1{font-size:28px;line-height:1.1;margin:0}.lobby-heading h1 span{display:inline}.lobby-card{padding:20px;border-radius:22px}.lobby-card-top{margin-bottom:14px}.lobby-divider{margin:18px 0 12px}.seat{min-height:48px;padding:7px 10px}.empty-seat{min-height:42px}.lobby-hint{margin:12px 0}
 input:not([type=checkbox]),select{font-size:16px!important}dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:22px;border-radius:22px}
}
@media(max-width:360px) and (orientation:portrait){.minor-actions .text-button{width:36px}.minor-actions{gap:3px}#commit,body[data-theme=night] #commit{width:96px!important;min-width:96px}.hand-panel{padding-left:6px;padding-right:6px}.preview-score.has-score{font-size:11px}.home-story h1{font-size:30px}.play-card{padding:17px}.game-topline{gap:2px}.invite-chip{padding:6px 8px;letter-spacing:.5px}}
@media(max-width:1000px) and (max-height:500px) and (orientation:landscape){body[data-view=game] .app-header{height:0;padding:0;border:0}.game-screen{height:100dvh;min-height:0;padding-top:4px;padding-bottom:6px}.app-header .header-actions{display:none}body[data-view=game] .app-header .brand{display:none}.game-topline{min-height:40px;height:40px}.player-strip{min-height:36px;padding-bottom:5px}.player-card{padding:4px 8px}.board-status{position:absolute;top:6px;left:8px;right:8px;padding:0;pointer-events:none}.board-area{min-height:0}.hand-panel{top:6px;bottom:6px;border-radius:15px}.hand-panel .rack .tile{width:44px;height:44px}.hand-actions{margin-top:8px}.board-tools{padding:2px;bottom:6px;right:6px}.board-tools .icon-button{width:38px;height:38px}}
@media(min-width:801px) and (min-height:501px){body[data-view=game] .app-header{height:50px}.game-screen{height:calc(100dvh - 50px);padding:0 12px 10px;gap:8px}.game-topline{min-height:42px;height:42px}.player-strip{min-height:44px;padding:0;gap:8px}.player-card{padding:6px 12px;border-radius:12px;max-width:220px}.board-area{margin:0;border-radius:16px}.board-status{position:absolute;inset:8px 12px auto;padding:0;pointer-events:none}.turn-pill{background:var(--surface);padding:5px 8px;border-radius:10px}.bag-pill{background:var(--surface)}.hand-panel{min-height:82px;border-radius:16px;padding:10px 16px}.hand-main{max-width:none}.game-screen.chat-open .board-area,.game-screen.chat-open .player-strip{margin-right:350px}.chat-panel{bottom:100px}}
@media(max-width:800px) and (orientation:portrait){body:not([data-view=game]) .app-header{height:58px;padding:0 16px}.home-story>p br{display:none}.solo-description{min-height:0;padding:0 0 14px;display:flex;align-items:center;gap:10px;text-align:left;flex-wrap:wrap}.solo-description .bot-portrait{width:40px;height:40px;margin:0}.solo-description h3{margin:0;font-size:16px}.solo-description p{width:100%;font-size:12px}.game-screen.chat-open .hand-panel{min-height:108px}}
@media(max-width:1000px) and (max-height:500px) and (orientation:landscape){body[data-view=game] .app-header .header-actions{display:flex;position:absolute;z-index:30;top:2px;right:214px}body[data-view=game] .app-header .help-trigger,body[data-view=game] #soundButton,body[data-view=game] #connection{display:none}body[data-view=game] .app-header #settingsButton{width:40px;height:40px}.game-topline{padding-right:42px}}
@media(max-width:1000px) and (max-height:500px) and (orientation:landscape){.hand-panel{position:absolute;right:8px;top:6px;bottom:6px;width:192px;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:14px;padding:10px}.hand-main{flex:none;width:100%}.hand-actions{margin:0;width:100%;flex-direction:row;flex-wrap:wrap;gap:10px}.minor-actions{width:auto}.preview-score{flex:1}.rack{padding:4px 0;min-height:0;max-width:160px}.board-area{margin:0}.game-screen{padding-left:8px}}
.hand-panel .tile:before{display:none}
body[data-theme=day]{--bg:#f3f4f9;--surface:#fff;--line:#dce0eb;--ink:#30394f;--muted:#6c7489;--board:#e9edf5}
body[data-theme=day] .board-area{background:#eef0f8;border-color:#d6d9e7}body[data-theme=day] .icon-button,body[data-theme=day] .invite-chip,body[data-theme=day] .bag-pill{color:#73618e}body[data-theme=day] .player-card{background:#e8eaf3;border-color:#dce0eb}body[data-theme=day] .player-card.active{background:#fff;border-color:var(--violet)}body[data-theme=day] .hand-panel .tile{background:#fffefd;border-color:#dce0e9}body[data-theme=day] .hand-panel .tile.selected{background:#fff4d6;border-color:#aa8ad4}body[data-theme=day] .player-name{color:var(--ink)}
/* Keep the hand to the left and give the primary action its own generous space. */
@media(min-width:801px) and (min-height:501px){.rack{justify-content:flex-start}.hand-main{max-width:none}#commit,body[data-theme=night] #commit{width:164px!important;min-width:164px;height:60px;min-height:60px;font-size:18px}}
@media(max-width:800px) and (orientation:portrait){
 .hand-panel{display:grid;grid-template-columns:minmax(0,1fr) 120px;align-items:center;gap:10px;min-height:124px;padding:9px 10px}
 .hand-main{width:100%;max-width:none}.rack{display:grid;grid-template-columns:repeat(3,44px);justify-content:start;gap:7px;min-height:0;margin:0;padding:0}.rack .tile{width:44px;height:44px}.rack .tile-face{inset:8px}
 .hand-actions{width:120px;min-width:0;display:flex;flex-direction:column;gap:7px;align-items:stretch;justify-content:center;margin:0;padding:0}
 #commit,body[data-theme=night] #commit{order:1;width:120px!important;min-width:0;height:66px;min-height:66px;padding:12px 8px;font-size:17px;border-radius:16px}.hand-actions #commit .icon{width:24px;height:24px}
 .minor-actions{order:3;width:100%;gap:4px;justify-content:space-between}.minor-actions .text-button{width:36px;height:36px;min-height:36px;padding:7px;border-radius:10px}.minor-actions .text-button .icon{width:19px;height:19px}
 .preview-score,.preview-score.has-score{order:2;position:absolute;right:143px;bottom:10px;margin:0;font-size:11px;line-height:1;pointer-events:none}
 .game-screen.chat-open .hand-panel{min-height:124px}.history-panel{bottom:138px}
}
@media(max-width:360px) and (orientation:portrait){.hand-panel{grid-template-columns:minmax(0,1fr) 112px;padding:9px 8px;gap:8px}.rack{grid-template-columns:repeat(3,42px);gap:6px}.rack .tile{width:42px;height:42px}.hand-actions{width:112px}#commit,body[data-theme=night] #commit{width:112px!important;min-width:0}.minor-actions{gap:2px}.minor-actions .text-button{width:35px}.preview-score,.preview-score.has-score{right:132px;bottom:9px;font-size:10px}}
@media(max-width:1000px) and (max-height:500px) and (orientation:landscape){#commit,body[data-theme=night] #commit{height:62px;min-height:62px;font-size:17px}}
@media(max-width:800px) and (orientation:portrait){.hand-main{padding-bottom:14px}}
@media(max-width:800px) and (orientation:portrait){.preview-score,.preview-score.has-score{top:auto;width:max-content;height:auto;white-space:nowrap}}
@media(max-width:800px) and (orientation:portrait){.hand-actions{position:static}}
/* Six tiles stay on one line; the primary action remains at the lower right. */
@media(max-width:800px) and (orientation:portrait){
 .hand-panel{display:flex;flex-direction:column;min-height:114px;padding:7px 8px 8px;gap:7px;align-items:stretch}
 .hand-main{width:100%;padding:0}.rack{display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:6px;min-height:44px;width:100%;margin:0;padding:0}.rack .tile{width:clamp(38px,10.8vw,46px);height:clamp(38px,10.8vw,46px);flex-shrink:0}.rack .tile-face{inset:7px}
 .hand-actions{position:static;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px;margin:0;padding:0}.minor-actions{order:1;width:auto;justify-content:flex-start;gap:4px}.minor-actions .text-button{width:38px;height:44px;min-height:44px}
 .preview-score,.preview-score.has-score{position:static;order:2;top:auto;right:auto;bottom:auto;width:auto;height:auto;white-space:nowrap;margin:0;font-size:12px}
 #commit,body[data-theme=night] #commit{order:3;margin-left:auto;width:132px!important;min-width:132px;height:54px;min-height:54px;font-size:17px;padding:10px 12px}
 .game-screen.chat-open .hand-panel{min-height:114px}.history-panel{bottom:128px}
}
@media(max-width:360px) and (orientation:portrait){.rack{gap:5px}.rack .tile{width:38px;height:38px}.minor-actions{gap:3px}.minor-actions .text-button{width:35px}#commit,body[data-theme=night] #commit{width:120px!important;min-width:120px}.hand-actions{gap:7px}.preview-score,.preview-score.has-score{font-size:11px}}
@media(max-width:1000px) and (max-height:500px) and (orientation:landscape){.game-screen{padding-right:8px;gap:5px}.hand-panel{position:relative;inset:auto;width:100%;min-height:70px;flex-direction:row;gap:10px;padding:8px 10px}.hand-main{width:auto;flex:1;padding:0;min-width:0}.rack{display:flex;flex-wrap:nowrap;justify-content:flex-start;width:100%;max-width:none;gap:5px;padding:0}.hand-panel .rack .tile{width:34px;height:34px}.rack .tile-face{inset:6px}.hand-actions{width:auto;flex-direction:row;flex-wrap:nowrap;gap:7px;margin:0}.minor-actions{order:1;gap:3px}.minor-actions .text-button{width:33px;height:40px;min-height:40px}.preview-score,.preview-score.has-score{order:2;flex:none;font-size:11px;white-space:nowrap}#commit,body[data-theme=night] #commit{order:3;width:112px!important;min-width:112px;height:50px;min-height:50px;font-size:16px}body[data-view=game] .app-header .header-actions{right:8px}.coach{right:8px}.chat-panel{right:8px;bottom:84px;max-width:calc(100% - 16px)}}
/* The play action spans the full hand height, beside a single line of six tiles. */
@media(max-width:800px) and (orientation:portrait){
 .hand-panel{display:grid;grid-template-columns:minmax(0,1fr) 74px;grid-template-rows:auto 40px;align-items:center;gap:8px;min-height:110px;padding:9px 8px}
 .hand-main{grid-column:1;grid-row:1;min-width:0;padding:0}.rack{width:100%;min-height:36px;gap:4px;justify-content:flex-start;flex-wrap:nowrap}.rack .tile{width:clamp(28px,calc((100vw - 132px)/6),46px);height:clamp(28px,calc((100vw - 132px)/6),46px);border-radius:9px}.rack .tile-face{inset:5px}
 .hand-actions{display:contents}.minor-actions{grid-column:1;grid-row:2;justify-self:start;align-self:center;width:auto;gap:4px}.minor-actions .text-button{width:36px;height:40px;min-height:40px}
 .preview-score,.preview-score.has-score{grid-column:1;grid-row:2;justify-self:end;align-self:center;margin:0;font-size:11px;white-space:nowrap}
 #commit,body[data-theme=night] #commit{grid-column:2;grid-row:1 / span 2;align-self:stretch;justify-self:stretch;order:initial;margin:0;width:100%!important;min-width:0;height:auto;min-height:88px;padding:0;border-radius:26px}
 #commit>span{display:none}.hand-actions #commit .icon{width:38px;height:38px;stroke-width:2.8}
 .game-screen.chat-open .hand-panel{min-height:110px}
}
@media(max-width:360px) and (orientation:portrait){.hand-panel{grid-template-columns:minmax(0,1fr) 66px;gap:7px;padding:9px 7px}.rack{gap:3px}.rack .tile{width:calc((100vw - 116px)/6);height:calc((100vw - 116px)/6)}.minor-actions .text-button{width:34px}.minor-actions{gap:3px}#commit,body[data-theme=night] #commit{width:100%!important;min-width:0;border-radius:24px}}
/* A compact, shared latest-move line above the table controls. */
.last-move{display:flex;align-items:center;gap:8px;width:100%;min-width:0;height:30px;min-height:30px;flex-shrink:0;padding:3px 10px;border-bottom:1px solid var(--line);color:var(--muted);font-size:12px;text-align:left;overflow:hidden;border-radius:0;order:-1}.last-move .icon{width:15px;height:15px;opacity:.7}.last-move-name{color:var(--ink);max-width:30%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.last-move-text{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.last-move-score{flex-shrink:0;color:var(--violet-dark);background:var(--lilac);border-radius:6px;padding:2px 7px;font-size:12px}.last-move:hover{background:var(--surface)}
@media(max-width:800px) and (orientation:portrait){.last-move{height:28px;min-height:28px;font-size:11px;padding:3px 6px;gap:6px}.last-move-score{font-size:11px}body[data-view=game]:has(.last-move:not(.hidden)) .header-actions{top:calc(38px + env(safe-area-inset-top))}.game-screen:has(.last-move:not(.hidden)) .history-panel{top:88px}}
@media(max-width:1000px) and (max-height:500px) and (orientation:landscape){.last-move{height:24px;min-height:24px;font-size:11px}body[data-view=game]:has(.last-move:not(.hidden)) .app-header .header-actions{top:31px}}
