:root{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#162d2b;background:#f5f3ed;font-synthesis:none;--green:#234a41;--red:#b8483d;--blue:#386783}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}a{color:inherit;text-decoration:none}main,.topbar{width:min(100%,520px);margin:auto;padding:20px}.topbar{display:flex;align-items:center;justify-content:space-between;padding-top:max(20px,env(safe-area-inset-top));gap:12px}.brand{font-size:18px;font-weight:850;letter-spacing:1px}.brand span{display:inline-grid;place-items:center;background:var(--green);color:#fff;border-radius:12px;width:34px;height:34px;margin-right:8px}.small{font-size:12px;color:#6c7772;line-height:1.6}.eyebrow{font-size:11px;font-weight:750;letter-spacing:2px;color:#6c7772;margin:0 0 10px}h1{font-size:34px;letter-spacing:-1px;line-height:1.2;margin:0 0 14px}h2{font-size:20px;margin:0 0 12px}h3{font-size:15px;margin:0 0 10px}p{line-height:1.65;margin:8px 0}.hero{padding:18px 0 22px}.hero em{font-style:normal;color:#648c69}.card{background:#fff;border:1px solid #e3e6db;border-radius:22px;padding:20px;margin-bottom:14px;box-shadow:0 4px 16px #233b3205}.game{position:relative;overflow:hidden}.game .badge{font-size:12px;padding:5px 9px;border-radius:7px;background:#eef1e7;display:inline-block;margin-bottom:16px}.game h2{font-size:26px}.game .symbol{position:absolute;right:20px;top:24px;font-size:38px;color:#315b4d}.game.vegas .symbol{color:#b67f35}.game p{font-size:14px;color:#6a746f;margin-bottom:20px;padding-right:25px}.row{display:flex;gap:10px;align-items:center}.row>*{min-width:0}.row .grow{flex:1}.between{justify-content:space-between}.primary,.secondary,.quiet{min-height:44px;padding:10px 15px;border:0;border-radius:12px;font-weight:650}.primary{background:var(--green);color:white}.secondary{background:#edf0e7;color:var(--green)}.quiet{background:transparent;color:#66726d;font-size:12px;padding:8px}.full{width:100%}label{display:block;font-size:13px;font-weight:650;margin:16px 0 8px}input,select{background:#fafbf7;border:1px solid #d8dfd5;border-radius:12px;padding:13px;width:100%;min-height:48px;font-size:16px;color:#162d2b}input:focus,select:focus{outline:2px solid #94ae93;outline-offset:1px}.room-code{font-family:ui-monospace,monospace;font-weight:750;letter-spacing:3px;font-size:24px}.error{color:#a63e36;font-size:13px}.notice{border-left:3px solid #bba16c;padding:9px 12px;background:#f6efe0;color:#77613a;font-size:13px;border-radius:4px}.teams{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0}.team{padding:14px 10px;border-radius:16px;background:#f7eae6;border:1px solid #eed7d0}.team.blue{background:#eaf1f6;border-color:#d2e2ec}.team h3{color:var(--red)}.team.blue h3{color:var(--blue)}.member{font-size:13px;line-height:1.5;margin-bottom:10px;overflow-wrap:anywhere}.member small{display:block;color:#687772;font-size:11px}.team button{width:100%;margin-top:7px;font-size:12px;padding:8px;min-height:42px}.chips{display:flex;gap:6px;flex-wrap:wrap}.chip{font-size:12px;padding:5px 8px;border-radius:8px;background:#eef0e9}.status{font-size:12px;color:#66736c}.status.offline{color:#a1542a}.board-header{display:flex;justify-content:space-between;gap:8px;align-items:center}.score{display:flex;gap:8px}.score b{display:inline-block;padding:8px 10px;background:#f1dfd9;color:var(--red);border-radius:10px;font-size:16px}.score b.blue{background:#dfeaf1;color:var(--blue)}.board{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin:16px 0}.word{min-height:64px;padding:6px 2px;border-radius:10px;border:1px solid #d7d3bc;background:#f3edda;font-size:clamp(11px,3.5vw,16px);font-weight:650;color:#403f30;overflow-wrap:anywhere;position:relative;box-shadow:0 3px 0 #ddd7be;opacity:1!important}.word:disabled{cursor:default}.word.red{background:#d36355;color:#fff;border-color:#bd4d40;box-shadow:0 3px 0 #b7493b}.word.blue{background:#4b7d99;color:#fff;border-color:#37627e;box-shadow:0 3px 0 #37627e}.word.neutral{background:#cdc7b6;color:#4e5049;border-color:#bbb4a3;box-shadow:0 3px 0 #b1ab9b}.word.assassin{background:#293733;color:white;border-color:#1e2925;box-shadow:0 3px 0 #18201e}.word.revealed:after{content:'✓';position:absolute;bottom:2px;right:4px;font-size:10px;opacity:.7}.word:not(:disabled):active{transform:translateY(2px)}.legend{display:flex;flex-wrap:wrap;gap:12px;font-size:11px;color:#6a756f}.legend i{width:8px;height:8px;background:var(--red);display:inline-block;margin-right:4px;border-radius:2px}.legend .blue i{background:var(--blue)}.legend .neutral i{background:#bbb39f}.legend .assassin i{background:#293733}.clue{background:#e9eee5;padding:14px;border-radius:15px;margin:16px 0}.clue strong{font-size:24px}.dock{margin-top:18px;padding-bottom:max(16px,env(safe-area-inset-bottom))}.dock label{margin-top:0}.dock form .row{align-items:flex-end}.dock select{width:86px}.dock input{flex:1;width:100px}.dock button{margin-top:12px}details{margin:14px 0}summary{font-size:13px;color:#6b7770;cursor:pointer;padding:10px 0}details p{font-size:13px;color:#65736c}.activity p{font-size:12px;border-bottom:1px solid #edf0e7;padding-bottom:8px}.activity time{color:#969e91;margin-right:8px}.foot{font-size:11px;text-align:center;color:#8b9386;padding:20px 0 32px}.qr{display:grid;place-items:center}.qr svg{width:200px;height:200px}.backdrop{position:fixed;inset:0;background:#122c2466;display:flex;align-items:flex-end;justify-content:center;padding:12px;padding-bottom:max(12px,env(safe-area-inset-bottom));z-index:20}.sheet{width:min(100%,480px);background:#fff;border-radius:24px;padding:24px;box-shadow:0 -4px 35px #142b2433}.sheet .row button{flex:1}.sheet p{margin-bottom:22px}.muted{color:#758175}#party-toast{position:fixed;left:50%;transform:translateX(-50%);bottom:max(24px,env(safe-area-inset-bottom));width:max-content;max-width:90vw;background:#18352e;color:white;padding:12px 18px;border-radius:14px;z-index:40;opacity:0;pointer-events:none;font-size:13px;transition:opacity .2s}#party-toast.show{opacity:1}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(max-width:350px){main,.topbar{padding:14px}.card{padding:16px}.word{min-height:57px}.team{padding:12px 8px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
/* The hall stays compact; game screens retain their established controls. */
.topbar{padding-bottom:10px}.brand{font-size:17px;letter-spacing:0}.brand span{width:30px;height:30px;border-radius:10px}.hall-intro{padding:18px 0 20px}.hall-intro h1{font-size:28px;letter-spacing:-.7px;margin-bottom:8px}.hall-intro p{font-size:14px;color:#6c7772}.join-entry{margin:0 0 28px}.join-entry input{text-transform:uppercase;background:#fff}.join-entry button{flex:none}.catalog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}.catalog-heading h2{font-size:15px;margin:0}.catalog-heading select{width:auto;max-width:155px;font-size:13px;min-height:44px;padding:8px 10px;background:transparent;border:0}.catalog-game{display:flex;gap:14px;padding:22px 0;border-bottom:1px solid #dce1d5}.game-icon{width:48px;height:48px;flex:0 0 48px;background:#e8eddf;color:#345c48;border-radius:15px;font-size:27px;display:grid;place-items:center}.game-info{flex:1;min-width:0}.game-info h3{font-size:18px;line-height:1.5;margin:0 0 4px}.game-meta{font-size:11px;color:#657168;line-height:1.7;margin:0}.game-description{font-size:13px;color:#6b756d;margin:8px 0 12px}.game-info button{min-height:44px;padding:9px 20px;font-size:13px}.resume-section{padding:14px 0 0}.resume-section h2{font-size:13px;color:#66746b;margin:0 0 8px}.resume-row{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;text-align:left;padding:15px 16px;margin-bottom:8px;border:1px solid #d8e1d1;border-radius:14px;background:#eaf0e3;color:#234a41}.resume-row strong{font-size:14px}.resume-row small{display:block;font-size:11px;margin-top:5px;color:#657168}.resume-row>span:last-child{font-size:13px;white-space:nowrap}.invitation{padding-top:26px}.invitation h1{font-size:26px}.invitation>.room-code{padding:18px 0;font-size:32px}.back-hall{display:block;text-align:center;margin-top:20px}.login-card{margin-top:22px;box-shadow:none}.share-guide{background:#edf2e8;color:#234a41;border-radius:12px;padding:14px;font-size:14px}.sheet{max-height:85dvh;overflow:auto;overscroll-behavior:contain;box-shadow:none}.sheet details p{margin:12px 0}.sheet .qr{padding:10px}.sheet .qr svg{max-width:100%;height:auto}.foot{line-height:1.9;padding-top:30px}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #688366;outline-offset:3px}@media(max-width:350px){.hall-intro h1{font-size:25px}.game-icon{width:40px;height:40px;flex-basis:40px}.catalog-game{gap:11px}.game-info h3{font-size:17px}}

/* Stable platform host for contract-based game clients. */
.platform-game-host{max-width:680px;margin:auto}.platform-room-heading,.platform-room-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.platform-room-actions{justify-content:flex-end;flex-wrap:wrap}.platform-game-bar p{min-height:20px;font-size:13px;color:#5e6c5e}.platform-seats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px}.platform-seat{padding:14px;border:1px solid #ded6c3;border-radius:14px;display:flex;flex-direction:column;gap:8px;min-width:0}.platform-seat strong{overflow-wrap:anywhere}.platform-game-lobby{margin-bottom:18px}

.platform-game-host button,.platform-game-host select{font:inherit;min-height:44px;padding:10px 14px;border:1px solid #cbd2c4;border-radius:10px;background:#fffdf6;color:#263b32}.platform-game-host button:disabled{opacity:.5}.platform-game-host [data-platform-action=start]{background:#365e42;color:white;width:100%;font-weight:650}.platform-game-host>div:has(>button[aria-pressed]){margin:0 0 12px;text-align:right}.platform-switch{margin-top:20px;padding-top:16px;border-top:1px solid #ded6c3;display:flex;flex-wrap:wrap;align-items:center;gap:10px}.platform-switch select{max-width:100%;margin:6px 0}.platform-game-host .lutu-room-banner{margin-bottom:16px}

/* Contract clients own their title bar. No empty platform chrome in play. */
main[data-platform-root]{width:100%;padding:0;max-width:none}.platform-game-bar[hidden],.platform-game-lobby[hidden]{display:none}.platform-game-bar p{margin:0;padding:8px 12px;min-height:0}.platform-fallback{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px}.platform-fallback button{width:44px;padding:0;font-size:24px}.platform-game-lobby{margin:0 auto;max-width:560px;padding:16px 12px max(16px,env(safe-area-inset-bottom))}.platform-game-host .platform-seats{margin-top:12px}
.platform-game-host{width:100%;max-width:none;margin:0;--game-min-height:100vh;--game-min-height:100dvh}.platform-game-host[data-room-status=lobby]{--game-min-height:0px}
