:root {
  color-scheme:dark;
  --pine:#102d28;--deep:#081d1b;--green:#235644;--ink:#fff4d7;--quiet:#c1c6ac;
  --gold:#e8cb88;--metal:#aa8950;--edge:#c1a16a66;--red:#bf5545;
  --serif:"Songti SC","STSong","Noto Serif CJK SC","Times New Roman",serif;
  --sans:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",system-ui,sans-serif;
  --pad:clamp(16px,4.4cqw,80px);--stage-width:1440px;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{min-height:100%;background:var(--deep)}
body{margin:0;min-height:100vh;min-height:100svh;color:var(--ink);font:15px/1.5 var(--sans);isolation:isolate;-webkit-tap-highlight-color:transparent;overflow-x:clip}
button,input,dialog{font:inherit}
button{cursor:pointer;touch-action:manipulation;color:inherit;border:0;background:transparent}
button:disabled{opacity:.48;cursor:default;filter:saturate(.58)}
button,input,a,summary{outline-offset:4px}
:focus-visible{outline:2px solid #fff0b0}
button,a{user-select:none;-webkit-user-select:none}
h1,h2,h3,p,figure{margin:0}
a{color:var(--gold)}
i{font-style:normal}
button:enabled:active{transform:translateY(1px)}
.club-backdrop{position:fixed;z-index:-2;inset:0;pointer-events:none;background:
 linear-gradient(180deg,#101b1bc9 0%,#0c252135 22%,#0929213b 63%,#091b19e8 100%),
 linear-gradient(90deg,#09221fab 0%,#14352c4a 49%,#3a382223 80%,#12282180 100%),
 url('/assets/club-scene.webp') center 50%/cover no-repeat,
 radial-gradient(ellipse at 68% 30%,#678267,#254b3e 42%,#112a26 85%);background-color:#1b3f33}
.club-backdrop:before{content:"";position:absolute;inset:0;box-shadow:inset 0 0 16cqw #0717178c}
.club-backdrop:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#cead6f3d,transparent 12%,transparent 88%,#cead6f3d) top center/100% 2px no-repeat}
.command-head{position:relative;z-index:3;max-width:var(--stage-width);margin:auto;padding:max(12px,env(safe-area-inset-top)) var(--pad) 4px}
.head-inner{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:50px}
.brand,.utility{display:inline-flex;align-items:center;justify-content:center;gap:9px}
.brand{white-space:nowrap;padding:0;color:#f6e5be;font:700 23px var(--serif);letter-spacing:.14em;text-shadow:0 2px 4px #051b18}
.brand-seal,.mini-seal,.seal{display:inline-grid;place-items:center;flex:none;color:#fde4a2;background:linear-gradient(150deg,#2e5948,#18392f 55%,#392e22);box-shadow:inset 0 0 0 1px #edd59d,inset 0 0 0 4px #1d382e,inset 0 0 0 5px #c2a36b80,0 3px 10px #06120b6b;text-shadow:0 1px 2px #161c16;font-family:Georgia,serif}
.brand-seal{width:36px;height:40px;border-radius:50% 50% 43% 43%;font-size:25px;padding-left:3px}
.utility-tray{display:flex;gap:6px;align-items:center}
.utility{border-radius:22px;border:1px solid #b9a3736b;background:linear-gradient(#243b33d9,#102923d9);color:#efdfbd;min-height:36px;padding:4px 13px;box-shadow:inset 0 0 0 2px #0c272138,0 2px 6px #0d151558;font-size:13px;font-weight:600}
.utility:hover,.sm-btn:hover,.friend-button:hover,.room-tool:hover{border-color:#e0c68c;background-color:#355442}
.utility i{flex:none;display:inline-block;position:relative;color:var(--gold)}
.icon-book{width:16px;height:11px;border:1.5px solid;border-radius:2px}
.icon-book:after{content:"";position:absolute;top:0;left:46%;height:100%;border-left:1px solid}
.icon-note{font:20px/1 Georgia}
.icon-person{width:15px;height:15px;border:1px solid #dec78c;border-radius:50%;overflow:hidden}
.icon-person:before,.icon-person:after{content:"";position:absolute;left:50%;transform:translateX(-50%);background:#dec78c;border-radius:50%}
.icon-person:before{width:5px;height:5px;top:2px}
.icon-person:after{width:9px;height:7px;bottom:-3px}
#profile-name{max-width:9em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#app{width:min(100%,var(--stage-width));margin:auto;padding:0 var(--pad);outline:none}
.salon{max-width:1240px;margin:0 auto;padding-bottom:max(12px,env(safe-area-inset-bottom))}
.title-stage{position:relative;max-width:1190px;margin:0 auto;min-height:clamp(350px,56cqh,650px);display:grid;grid-template-columns:minmax(260px,.85fr) minmax(360px,1.3fr);grid-template-rows:1fr 1fr;column-gap:clamp(6px,3cqw,68px);align-content:center;align-items:center;padding:clamp(12px,2.5cqh,32px) clamp(2px,3cqw,40px)}
.entry-heading,.entry-actions{position:relative;z-index:2;grid-column:1;max-width:425px;width:100%;justify-self:center}
.entry-heading{grid-row:1;align-self:end;text-align:center;padding-bottom:clamp(13px,2.3cqh,27px);text-shadow:0 2px 5px #182d23}
.game-edition{display:flex;justify-content:center;align-items:center;gap:11px;font:600 14px var(--serif);letter-spacing:.2em;color:#f5e4b8}
.game-edition i,.stage-heading i{width:30px;height:1px;background:linear-gradient(90deg,transparent,#dec696)}
.game-edition i:last-child,.stage-heading i:last-child{transform:rotate(180deg)}
.entry-heading h1{position:relative;margin:.02em 0 -.04em;white-space:nowrap;font:900 clamp(72px,8.7cqw,135px)/1.24 var(--serif);letter-spacing:.07em;text-indent:.07em;color:#f7e4ae;text-shadow:0 2px #ad854b,0 4px #584629,0 5px 3px #352c1c,0 9px 24px #0c201aba}
.entry-actions{grid-row:2;align-self:start;max-width:348px}
.start-button,.friend-button,.btn,.sm-btn,.bot-add,.bot-remove{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--edge);border-radius:7px;font-weight:650;box-shadow:inset 0 0 0 2px #071d172b,0 3px 7px #071e1955}
.start-button,.btn.gold{border-color:#f6e3ae;color:#42351f;background:linear-gradient(165deg,#f4dfa6 0%,#daba77 54%,#b68f4e 100%);box-shadow:inset 0 0 0 2px #bc995b,inset 0 0 0 3px #f6e1ae8c,0 3px 0 #65502f,0 6px 13px #0b201b7d}
.start-button{display:flex;width:100%;min-height:68px;padding:10px 22px;justify-content:flex-start;text-align:left;gap:16px;isolation:isolate}
.start-button:after{content:"";position:absolute;z-index:-1;inset:4px;background:repeating-linear-gradient(-45deg,transparent 0 3px,#f9e4b312 3px 4px);border-radius:3px}
.start-button strong,.start-button small{display:block}
.start-button strong{font:800 25px/1.2 var(--serif);letter-spacing:.09em}
.start-button small{font-size:11px;font-weight:600;letter-spacing:.065em;color:#594723;margin-top:2px}
.play-mark{display:grid;place-items:center;width:34px;height:37px;background:#6e562c;border-radius:50% 50% 45% 45%;box-shadow:inset 0 0 0 2px #ebd29a,0 0 0 1px #836637}
.play-mark:after{content:"";width:0;height:0;border:7px solid transparent;border-left:10px solid #f9e9ba;transform:translateX(4px)}
.start-arrow{margin-left:auto;font:32px/1 Georgia;color:#73552b}
.start-button:hover,.btn.gold:hover{filter:brightness(1.07)}
.friend-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
.friend-button,.btn.primary,.bot-add{background:linear-gradient(#36644d,#214b3e 70%,#1b4034);color:#f3e4bd;border-color:#bba4768f}
.friend-button{min-height:43px;white-space:nowrap;letter-spacing:.025em}
.friend-button i{font:21px/1 Georgia;color:#ddc58d}
.cast-fan{grid-row:1 / 3;grid-column:2;position:relative;isolation:isolate;justify-self:center;width:min(100%,670px);aspect-ratio:1.62;pointer-events:none}
.cast-fan:before{content:"";position:absolute;inset:11% 2% -3%;z-index:-2;border-radius:50%;background:radial-gradient(ellipse at 50% 70%,#a8b68246,transparent 71%);box-shadow:0 29px 36px -34px #090e0bd9;transform:rotate(-5deg)}
.cast-card{position:absolute;top:10%;width:38%;height:85%;overflow:hidden;border:2px solid #ebd5a2;border-radius:5% / 4%;background:#284637;box-shadow:inset 0 0 0 3px #604f33,0 10px 22px #0b120fd4;transform-origin:50% 86%;isolation:isolate}
.cast-card:after,.wait-seat.filled:after{content:"";position:absolute;inset:5px;border:1px solid #ebd69fc4;pointer-events:none;border-radius:inherit;z-index:2}
.cast-card img,.seat-art{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 22%}
.cast-card.alisha{left:11%;top:14%;transform:rotate(-16deg)}
.cast-card.faelie{right:9%;top:13%;transform:rotate(15deg)}
.cast-card.tilty{left:32%;top:0%;height:88%;z-index:1;transform:rotate(-2deg)}
.corner-suit{position:absolute;top:7%;left:9%;font:24px/.9 Georgia;color:#fae5b4;text-shadow:0 1px 3px #28261b}
.cast-card figcaption{position:absolute;inset:auto 0 0;text-align:center;padding:20% 6px 7%;color:#fff2d1;background:linear-gradient(transparent,#102921eb 72%);text-shadow:0 1px 3px #10241d}
.cast-card figcaption>*{display:block}
.cast-card figcaption small{font:italic 13px/1.1 Georgia;color:#e2d7b6;letter-spacing:.05em}
.cast-card figcaption strong{font:700 clamp(13px,1.7cqw,24px)/1.3 var(--serif);letter-spacing:.14em}
.resume-room{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:12px;padding:8px 10px;background:#142f27e8;border:1px solid #a8925d8c;border-radius:6px;color:#eadbb8}
.resume-room>span{min-width:0;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:0 7px}
.resume-room strong,.room-item strong,.seat-label h3,.room-ident h1,.score-row strong,.turn-status strong{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.resume-room strong{font-size:13px}
.resume-room small{grid-column:2;color:var(--quiet);font-size:11px}
.room-shelf{position:relative;max-width:1180px;margin:auto;border-radius:10px;border:1px solid #b29a696e;overflow:hidden;background:linear-gradient(135deg,#102f29f2,#142e25e8);box-shadow:inset 0 0 0 4px #62745920,0 10px 28px #051a175c}
.shelf-head,.room-list,.rooms-empty{padding-inline:clamp(13px,2cqw,30px)}
.shelf-head{display:flex;align-items:center;gap:10px;padding-top:13px;padding-bottom:10px;border-bottom:1px solid #b09c704a}
.shelf-head h2{font:700 20px var(--serif);letter-spacing:.08em;color:#f2e2be}
.count{font:600 12px/19px Georgia;color:#d3bd85;border:1px solid #bd9f6b70;border-radius:10px;min-width:23px;text-align:center}
.shelf-refresh{margin-left:auto;display:flex;align-items:center;gap:5px;font-size:12px;color:#ded4af}
.shelf-refresh i{font-size:18px}
.room-list{max-height:150px;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:8px;padding-block:12px;scrollbar-color:#8c8c63 #17392e}
.room-item{padding:8px 10px;min-width:0;width:100%;display:flex;gap:10px;align-items:center;text-align:left;border:1px solid #a8996a69;background:#284c39aa;border-radius:5px}
.room-item:enabled:hover{border-color:var(--gold);background:#355540}
.room-item:disabled{opacity:.75}
.room-suit,.empty-suit{color:var(--gold);font:26px/1 Georgia;flex:none}
.room-item-text{min-width:0;display:flex;flex-direction:column}
.room-item-text strong,.rooms-empty strong{font-size:13px}
.room-item-text small,.rooms-empty small,.room-state{font-size:11px;color:#c7c8aa}
.room-state{margin-left:auto;white-space:nowrap}
.item-arrow{font:20px/1 Georgia;color:var(--gold);flex:none}
.rooms-empty{display:flex;gap:13px;align-items:center;min-height:67px;padding-block:8px}
.rooms-empty strong,.rooms-empty small{display:block}
.empty-suit{border:1px solid #b19b6354;border-radius:50%;width:33px;height:33px;display:grid;place-items:center;font-size:24px}
.salon-credits{display:flex;align-items:center;justify-content:space-between;margin:10px auto 0;max-width:1180px;color:#dbd6bf;font-size:11px;text-shadow:0 1px 3px #0b2119}
.salon-credits button{font-size:inherit;padding:4px}
.lamp{display:inline-block;width:7px;height:7px;border-radius:50%;background:#96d4a0;box-shadow:0 0 7px #99d79e65;margin-right:7px;vertical-align:.04em}
.lamp.unlit{background:#d5ae72;box-shadow:none}
.scene-surface{position:fixed;inset:0;z-index:-1;pointer-events:none}
.scene-surface canvas{position:absolute;inset:0;display:block;width:100%;height:100%;pointer-events:none}
.scene-surface:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#0a231e8c 0%,#102c241f 59%,#0d241741),linear-gradient(0deg,#0a211bb8,transparent 36%,transparent 78%,#091b1952)}
.fullscreen{min-width:36px;padding-inline:9px}
.icon-fullscreen{width:14px;height:14px;background:linear-gradient(currentColor,currentColor) left top/6px 1.5px,linear-gradient(currentColor,currentColor) left top/1.5px 6px,linear-gradient(currentColor,currentColor) right top/6px 1.5px,linear-gradient(currentColor,currentColor) right top/1.5px 6px,linear-gradient(currentColor,currentColor) left bottom/6px 1.5px,linear-gradient(currentColor,currentColor) left bottom/1.5px 6px,linear-gradient(currentColor,currentColor) right bottom/6px 1.5px,linear-gradient(currentColor,currentColor) right bottom/1.5px 6px;background-repeat:no-repeat}
.ready-screen,.match-screen{max-width:1160px;margin:auto}
.match-screen{max-width:1340px}
.room-head{position:relative;z-index:2;display:flex;justify-content:space-between;align-items:center;gap:10px;min-width:0;min-height:62px;padding:7px 0}
.room-ident,.room-head-tools{display:flex;align-items:center;gap:10px;min-width:0}
.room-ident{flex:1}
.room-ident>div{min-width:0}
.room-ident h1{font:700 clamp(18px,2.1cqw,26px)/1.3 var(--serif);letter-spacing:.045em;text-shadow:0 2px 6px #0a211ac9}
.room-ident small{display:block;font-size:11px;letter-spacing:.045em;color:#d0cfb7;white-space:nowrap}
.mini-seal{width:29px;height:31px;font-size:18px;border-radius:50%}
.sm-btn,.btn.ghost,.bot-remove{background:linear-gradient(#29493be8,#17382de8);color:#f2e5c6}
.sm-btn,.bot-remove,.bot-add{min-height:32px;padding:4px 12px;white-space:nowrap;font-size:12px}
.btn{min-height:42px;min-width:66px;padding:8px 20px;font-size:15px;letter-spacing:.025em}
.btn:enabled:hover{border-color:#f0d59e}
.revealed,.multiplier-log{color:#ead7a5;font-size:12px}
.revealed{position:relative}
.revealed summary,.multiplier-log summary{cursor:pointer;list-style:none}
.revealed summary{padding:5px 10px;border:1px solid var(--edge);border-radius:5px;background:#19372edb}
.revealed summary:after,.multiplier-log summary:after{content:"⌄";padding-left:7px}
.revealed[open] summary:after,.multiplier-log[open] summary:after{content:"⌃"}
.public-hand{position:absolute;right:0;z-index:8;width:max-content;max-width:min(82cqw,335px);display:flex;flex-wrap:wrap;gap:4px;top:calc(100% + 5px);padding:10px;background:#112d26f5;border:1px solid #b69b66;border-radius:6px;box-shadow:0 8px 18px #0c171b99}
.mini-card{display:inline-grid;place-items:center;min-width:24px;min-height:31px;padding:2px 4px;background:#f3e9cf;color:#282f28;border:1px solid #cab996;border-radius:3px;font-weight:700}
.mini-card.red{color:#9e3c34}
.connection-notice,.restore-screen{border:1px solid #deb17696;box-shadow:0 3px 10px #14231a44;background:#493d28f2;color:#ffe8bb}
.connection-notice{position:relative;z-index:2;display:flex;justify-content:space-between;gap:8px;align-items:center;padding:8px 12px;margin-bottom:6px;border-radius:6px;font-size:13px}
.connection-notice small{display:block;color:#e1d7ba;font-size:11px}
.connection-notice button{min-height:32px;font-size:12px;padding:4px 10px}
.restore-screen{width:min(100%,460px);margin:clamp(30px,12cqh,120px) auto;padding:clamp(19px,4cqw,40px);border-radius:12px;text-align:center;background:#18372de8}
.restore-screen h1,.results h2{font:700 clamp(27px,4cqw,44px)/1.3 var(--serif);color:#f5dfaa}
.restore-screen p{color:var(--quiet);margin:4px 0 18px}
.restore-screen .connection-notice{text-align:left}
.seal.large{width:47px;height:47px;border-radius:50%;font:33px/1 Georgia}
.ready-board{padding:clamp(16px,3cqh,32px) clamp(12px,4cqw,55px) clamp(14px,2.5cqh,30px);border:1px solid var(--edge);border-radius:14px;background:radial-gradient(ellipse at 50% 30%,#355b42c4,#19392de8 65%,#132d25f0);box-shadow:inset 0 0 0 4px #87936a2e,0 8px 20px #081e1769}
.stage-heading,.result-title{display:flex;align-items:center;justify-content:center;gap:16px;color:#ecd3a0}
.stage-heading h2{font:700 clamp(23px,3cqw,38px)/1.2 var(--serif);letter-spacing:.08em;text-align:center}
.wait-seats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(7px,2.6cqw,38px);max-width:820px;margin:clamp(13px,2.4cqh,28px) auto}
.wait-seat{position:relative;isolation:isolate;overflow:hidden;min-width:0;aspect-ratio:3/4;max-height:clamp(180px,40cqh,350px);border-radius:8px;background:#203d30;box-shadow:0 5px 13px #0b201b6b;border:1px solid #cbbb88ad}
.wait-seat .seat-art{position:absolute;z-index:-1;inset:0;object-position:center 22%}
.wait-seat.filled:after{inset:4px;border-color:#d7c39382}
.seat-label{position:absolute;inset:auto 0 0;z-index:3;min-width:0;text-align:center;padding:26% 4px 7%;background:linear-gradient(transparent,#112c24eb 44%,#102921 100%);color:#fff3d0}
.seat-label small,.seat-label p{font-size:clamp(9px,1.2cqw,12px);color:#ddcfaa}
.seat-label small{display:block;letter-spacing:.04em}
.seat-label h3{font:700 clamp(13px,2cqw,23px)/1.3 var(--serif)}
.seat-label em{font:10px/1 var(--sans);color:var(--gold);vertical-align:middle}
.seat-role{position:absolute;z-index:3;top:7px;left:7px;padding:1px 7px;background:#133229dd;border:1px solid #d5bf86a8;border-radius:3px;color:#f2ddac;font-size:10px}
.seat-status{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:4px;flex-wrap:wrap}
.tag{display:inline-block;font-size:10px;padding:1px 6px;border:1px solid #c2b1876e;border-radius:5px;color:#ded8b9;background:#142f25c7}
.gold-tag{color:#f0d694;border-color:#c1a16395}
.bot-remove{background:#283b2de8;padding:1px 5px;min-height:22px;font-size:10px}
.vacant{display:grid;place-items:center;background:repeating-linear-gradient(45deg,transparent 0 12px,#b1b18d0b 12px 13px),linear-gradient(150deg,#294a39,#18392d);border-style:dashed}
.empty-frame{display:grid;place-items:center;position:absolute;inset:11% 18% 35%;color:#c2bd8a70}
.empty-frame:before,.empty-frame:after{content:"";position:absolute;inset:15% 11%;border:1px solid #a7ab7d52;transform:rotate(45deg);border-radius:45% 5%}
.empty-frame:after{transform:rotate(-45deg)}
.empty-frame span{font:clamp(26px,4.3cqw,59px)/1 Georgia}
.vacant .seat-label{background:transparent;padding-top:0}
.bot-add{min-height:29px;padding:2px 10px;margin-top:7px;font-size:12px}
.ready-controls,.action-rail{display:flex;align-items:center;justify-content:space-between;gap:10px}
.ready-controls{max-width:820px;margin:0 auto;padding-top:clamp(8px,1.6cqh,17px);border-top:1px solid #c8ae7852}
.ready-meter,.turn-status{min-width:0}
.ready-meter strong,.ready-meter span,.turn-status strong,.turn-status small{display:block}
.ready-meter strong{color:#f4deb0;font:700 17px/1.4 var(--serif)}
.ready-meter strong small{font-size:13px}
.ready-meter span,.turn-status small{font-size:11px;color:var(--quiet)}
.ready-buttons,.actions{display:flex;align-items:center;justify-content:flex-end;gap:7px}
.results{margin:auto;max-width:820px}
.result-title{justify-content:flex-start;gap:14px}
.result-title small{color:#cacaab;font-size:12px}
.result-title h2{font-size:clamp(24px,3.2cqw,43px)}
.score-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:14px 0 8px}
.score-row{display:flex;align-items:center;gap:8px;padding:7px 9px;min-width:0;border-bottom:1px solid #b7a6745c;background:#152e257e}
.score-row img{width:34px;height:34px;object-fit:cover;object-position:center 17%;border-radius:50%;border:1px solid #c5ab76}
.score-row>span{min-width:0}
.score-row strong,.score-row small{display:block}
.score-row strong{font-size:13px}
.score-row small{font-size:10px;color:var(--quiet)}
.score-row b{margin-left:auto;font:700 22px/1.2 Georgia}
.score-row .positive{color:#f1cd7b}
.score-row .negative{color:#c7b89d}
.multiplier-log{font-size:12px}
.multiplier-log p{color:#c7c7a7;font-size:11px}
.finished-screen .wait-seats{margin-block:13px}
.finished-screen .wait-seat{max-height:190px;width:100%;aspect-ratio:1.55}
.finished-screen .seat-label{padding-top:11%;padding-bottom:3%}
.finished-screen .seat-art{object-position:50% 23%}
.canvas-stage{position:relative;width:100%;min-width:0;line-height:0;isolation:isolate;border-radius:12px;overflow:hidden;background:#163e34}
.canvas-stage canvas{display:block;width:100%;height:auto;touch-action:none}
.sr-hand{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.sr-hand:focus-within{position:relative;width:auto;height:auto;clip-path:none;white-space:normal;display:flex;gap:4px;flex-wrap:wrap;margin-top:5px;padding:6px;border:1px solid #d0b177;background:#132b22;border-radius:5px}
.accessible-card{border:1px solid #d8c69d;padding:4px;min-width:30px;border-radius:4px;color:#242b25;background:#f2e9d2}
.accessible-card[aria-pressed=true]{background:#eacd86}
.action-rail{min-height:62px;padding:7px clamp(8px,2.2cqw,26px);background:linear-gradient(90deg,#172e26f0,#253e2eeb,#172e26f0);border:1px solid #b9a5756b;border-radius:6px;margin-top:5px}
.turn-status{flex:1}
.turn-status strong{font:700 16px/1.35 var(--serif);color:var(--gold)}
#room-bar{max-width:var(--stage-width);margin:0 auto;padding:5px var(--pad) max(8px,env(safe-area-inset-bottom))}
.voice-bar{display:flex;align-items:center;gap:10px;max-width:1160px;margin:auto;min-height:39px}
body[data-screen=table] .voice-bar{max-width:1340px}
.voice-button,.room-tool{display:inline-flex;align-items:center;gap:7px;padding:5px 11px;min-height:31px;border-radius:18px;background:#153128e8;border:1px solid #b3a47773;color:#f0e2c2;font-size:12px;white-space:nowrap}
.voice-button{touch-action:none}
.voice-button.recording{background:#7a4433;border-color:#e0a68a}
.icon-mic{position:relative;display:inline-block;width:9px;height:12px;border:1.5px solid #dfc891;border-radius:6px}
.icon-mic:after{content:"";position:absolute;left:-3.5px;right:-3.5px;bottom:-3px;height:8px;border:1.5px solid #dfc891;border-top:0;border-radius:0 0 8px 8px}
.leave-tool{margin-left:auto}
.room-tool i{color:var(--gold);font-size:16px;line-height:1}
#voice-count{font:600 11px/16px Georgia;min-width:16px;text-align:center;border-radius:50%;border:1px solid #b7a3726e;color:var(--gold)}
#modal{padding:0;width:min(430px,calc(100cqw - 30px));max-height:calc(100cqh - 28px);overflow:auto;color:var(--ink);border:1px solid #dfc38b;border-radius:12px;background:linear-gradient(145deg,#325443,#193a30 54%,#122f28);box-shadow:inset 0 0 0 4px #a495652c,0 22px 65px #041512c7}
#modal::backdrop{background:#061913ab;backdrop-filter:blur(3px)}
.modal-content{position:relative;padding:clamp(20px,4cqw,32px)}
.modal-content h2{padding-right:30px;margin-bottom:18px;font:700 27px/1.3 var(--serif);letter-spacing:.05em;color:#f6dfae}
.close{position:absolute;right:13px;top:12px;display:grid;place-items:center;width:32px;height:32px;font:26px/1 Georgia;color:var(--gold);border:1px solid #c2a66c80;border-radius:50%;background:#172e25b3}
.field{display:block;margin:12px 0;font-size:13px;color:#e5d8b6}
.field input[type=text]{display:block;width:100%;padding:9px 10px;margin-top:5px;border:1px solid #b9a37696;border-radius:5px;background:#102a23;color:#fff2d1}
.field input::placeholder{color:#bcbc9e}
.field input[type=checkbox],.audio-line input{accent-color:#d5b77d}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:17px}
.form-error{color:#ffba9e;font-size:13px;margin-top:9px}
.form-error:empty{display:none}
.audio-line{display:grid;grid-template-columns:5em 1fr;align-items:center;gap:12px;margin:15px 0}
.audio-line input{width:100%}
.attribution,.subtle,.credit p,.rule-list{font-size:13px;color:#d6d4bb}
.credit p+p,.attribution{margin-top:11px}
.rule-list{padding-left:1.5em;line-height:1.65}
.rule-list li+li{margin-top:9px}
.voice-list{display:grid;gap:6px}
.voice-list button{display:flex;align-items:center;justify-content:space-between;border:1px solid var(--edge);border-radius:5px;background:#214435;padding:8px;color:var(--ink)}
.voice-list small{color:var(--quiet)}
#toast{position:fixed;z-index:8;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translate(-50%,8px);width:max-content;max-width:calc(100cqw - 25px);opacity:0;pointer-events:none;padding:9px 17px;border-radius:20px;background:#172d24f5;color:#ffedc7;border:1px solid #d0ad71;box-shadow:0 5px 16px #0a1a14af;font-size:13px;text-align:center;transition:opacity .15s,transform .15s}
#toast.show{opacity:1;transform:translate(-50%,0)}
.loading{text-align:center;margin:16cqh auto;font:22px var(--serif);color:var(--gold)}
@container game-stage (min-width:1900px){:root{--stage-width:1650px}.title-stage{max-width:1400px}.cast-fan{max-width:740px}.room-shelf,.salon-credits{max-width:1350px}.salon{max-width:1430px}}
@container game-stage (max-width:880px){
  .command-head,#app,#room-bar{--pad:clamp(12px,2.6cqw,24px)}
  .title-stage{grid-template-columns:minmax(200px,.88fr) minmax(280px,1.25fr);column-gap:0;padding-inline:8px}
  .start-button{min-height:59px}
  .ready-board{padding-inline:clamp(10px,3cqw,26px)}
  .wait-seats{gap:clamp(8px,2cqw,17px)}
  .score-row{gap:5px;padding-inline:5px}
}
@container game-stage (max-width:640px) and (orientation:portrait){
  .command-head,#app,#room-bar{--pad:max(12px,env(safe-area-inset-left))}
  .head-inner{min-height:40px}
  .command-head{padding-top:max(9px,env(safe-area-inset-top))}
  .brand{gap:6px;font-size:18px}
  .brand-seal{width:27px;height:32px;font-size:19px}
  .utility-tray{gap:4px}
  .utility{min-height:31px;padding:4px 8px;gap:5px;font-size:11px}
  .utility:not(.profile)>span{display:none}
  #profile-name{max-width:5.25em}
  .title-stage{display:flex;flex-direction:column;gap:0;min-height:0;padding:clamp(10px,2.5cqh,24px) 0 14px}
  .entry-heading{max-width:100%;align-self:center;padding:0;text-align:center}
  .entry-heading h1{font-size:clamp(47px,13cqw,71px);line-height:1.1}
  .game-edition{font-size:10px;gap:7px}
  .game-edition i{width:20px}
  .cast-fan{width:min(95%,435px);height:clamp(157px,27cqh,280px);aspect-ratio:auto;margin:8px auto 3px}
  .cast-card{width:35%;height:89%;top:8%}
  .cast-card.alisha{left:12%;top:9%}
  .cast-card.faelie{right:11%;top:8%}
  .cast-card.tilty{top:0;left:33%;height:94%}
  .cast-card figcaption strong{font-size:15px}
  .cast-card figcaption small{font-size:10px}
  .corner-suit{font-size:17px}
  .entry-actions{align-self:center;width:min(100%,380px);max-width:none}
  .start-button{min-height:51px;padding:6px 18px;gap:11px}
  .start-button strong{font-size:22px}
  .start-button small{font-size:10px}
  .play-mark{width:29px;height:32px}
  .friend-actions{margin-top:7px;gap:7px}
  .friend-button{min-height:36px;font-size:13px}
  .resume-room{margin-top:7px;padding:4px 8px}
  .shelf-head{padding-block:8px 7px}
  .shelf-head h2{font-size:17px}
  .rooms-empty{min-height:51px}
  .room-list{max-height:115px;padding-block:8px}
  .salon-credits{margin-top:4px}
  .room-head{min-height:52px}
  .room-ident,.room-head-tools{gap:6px}
  .room-ident small{font-size:10px}
  .room-ident h1{font-size:17px}
  .mini-seal{width:23px;height:26px;font-size:15px}
  .sm-btn{font-size:11px;padding:4px 8px;min-height:30px}
  .revealed{font-size:10px}
  .revealed summary{padding:5px}
  .ready-board{padding:14px 9px;border-radius:10px}
  .stage-heading h2{font-size:23px}
  .wait-seats{gap:5px;margin-block:13px}
  .wait-seat{max-height:250px;aspect-ratio:5/9}
  .seat-role{top:5px;left:5px;padding:0 3px;font-size:9px}
  .seat-label{padding:34% 3px 6%}
  .seat-label h3{font-size:14px}
  .seat-label small{font-size:9px}
  .seat-status{gap:2px}
  .tag{padding:1px 3px;font-size:9px}
  .bot-add{font-size:10px;letter-spacing:-.05em;min-height:26px;margin-top:5px;padding:2px 4px}
  .bot-remove{padding:1px 3px;min-height:18px;font-size:9px}
  .ready-controls{gap:6px}
  .ready-meter strong{font-size:15px}
  .ready-meter span{font-size:10px}
  .ready-buttons,.actions{gap:4px}
  .btn{font-size:13px;min-height:35px;min-width:47px;padding:5px 10px}
  .score-list{display:flex;flex-direction:column;gap:2px;margin:9px 0 5px}
  .score-row{padding:3px 7px;gap:6px}
  .score-row img{width:25px;height:25px}
  .score-row>span{flex:1;display:flex;align-items:center;gap:6px}
  .score-row strong{font-size:12px}
  .score-row small{font-size:9px;white-space:nowrap}
  .score-row b{font-size:19px}
  .result-title{gap:9px}
  .result-title .seal{width:34px;height:34px;font-size:23px}
  .finished-screen .wait-seat{height:110px;aspect-ratio:auto}
  .finished-screen .seat-art{object-position:50% 18%}
  .canvas-stage{border-radius:7px}
  .action-rail{min-height:50px;padding:5px 6px;gap:4px}
  .turn-status strong{font-size:13px}
  .turn-status small{font-size:10px}
  #room-bar{padding-top:4px}
  .voice-bar{gap:5px;min-height:33px}
  .voice-button,.room-tool{min-height:29px;font-size:11px;gap:5px;padding:3px 8px}
  .connection-notice{padding:5px 7px;margin:2px 0 4px}
  .connection-notice strong{font-size:12px}
  .connection-notice small{font-size:10px}
}
@container game-stage (max-width:355px) and (orientation:portrait){
  .profile span{display:none}
  .cast-fan{height:clamp(142px,24cqh,205px)}
  .bot-add{font-size:9px}
  .ready-controls{flex-wrap:wrap}
  .ready-buttons{margin-left:auto}
  .room-head-tools .invite{max-width:45px;white-space:normal;font-size:10px;line-height:1.15}
  .room-head-tools{gap:3px}
}
@container game-stage (orientation:landscape) and (max-height:620px){
  .command-head,#app,#room-bar{--pad:max(12px,env(safe-area-inset-left))}
  .command-head{padding-top:max(4px,env(safe-area-inset-top));padding-bottom:0}
  .head-inner{min-height:31px}
  .brand{font-size:16px;gap:6px}
  .brand-seal{width:24px;height:27px;font-size:16px}
  .utility-tray{gap:4px}
  .utility{min-height:26px;font-size:10px;padding:3px 7px}
  .utility:not(.profile)>span{display:none}
  .icon-note{font-size:15px}
  .title-stage{min-height:0;height:clamp(190px,59cqh,345px);grid-template-columns:minmax(190px,.85fr) minmax(205px,1.2fr);max-width:1000px;padding:4px 3cqw}
  .entry-actions{max-width:295px}
  .entry-heading{padding-bottom:6px}
  .entry-heading h1{font-size:clamp(45px,11cqh,75px);line-height:1.1}
  .game-edition{font-size:10px}
  .cast-fan{width:100%;height:100%;max-width:clamp(245px,80cqh,490px)}
  .cast-card{width:34%;height:82%}
  .cast-card.tilty{left:33%;top:4%;height:85%}
  .cast-card.alisha{left:13%;top:12%}
  .cast-card.faelie{right:13%;top:11%}
  .cast-card figcaption strong{font-size:15px}
  .cast-card figcaption small{font-size:10px}
  .start-button{min-height:38px;padding:4px 13px;gap:8px}
  .start-button strong{font-size:18px}
  .start-button small{font-size:9px}
  .play-mark{width:23px;height:25px}
  .friend-actions{gap:5px;margin-top:5px}
  .friend-button{min-height:28px;font-size:12px}
  .friend-button i{font-size:15px}
  .resume-room{padding:3px 6px;margin-top:4px}
  .resume-room strong,.resume-room small{font-size:10px}
  .shelf-head{padding-block:3px}
  .shelf-head h2{font-size:15px}
  .rooms-empty{min-height:33px;padding-block:3px}
  .rooms-empty small,.rooms-empty strong{display:inline;font-size:11px}
  .rooms-empty small{margin-left:7px}
  .empty-suit{width:22px;height:22px;font-size:16px}
  .room-list{max-height:58px;padding-block:4px}
  .salon-credits{margin-top:2px;font-size:9px}
  .salon-credits button{padding:2px}
  .salon{padding-bottom:2px}
  .room-head{min-height:37px;padding-block:3px}
  .room-ident{gap:7px}
  .room-ident h1{font-size:16px}
  .room-ident small{font-size:9px}
  .mini-seal{width:22px;height:24px;font-size:14px}
  .sm-btn{min-height:25px;font-size:10px;padding:3px 8px}
  .ready-board{padding:7px 16px}
  .stage-heading h2{font-size:18px}
  .wait-seats{max-width:680px;gap:12px;margin:6px auto}
  .wait-seat{max-height:none;height:clamp(97px,31cqh,174px);aspect-ratio:auto}
  .seat-art{object-position:50% 19%}
  .seat-label{padding:7% 4px 3%;background:linear-gradient(transparent,#0f2a23f2 53%)}
  .seat-label h3{font-size:15px}
  .seat-label small,.seat-label p{font-size:9px}
  .seat-role{top:5px;left:5px;font-size:9px}
  .seat-status{margin-top:1px}
  .bot-remove,.bot-add{min-height:19px;padding:1px 5px;font-size:10px}
  .ready-controls{max-width:680px;padding-top:5px}
  .ready-meter strong{font-size:13px}
  .ready-meter span{font-size:10px}
  .btn{min-height:30px;padding:3px 12px;min-width:48px;font-size:12px}
  .result-title .seal{width:26px;height:26px;font-size:18px}
  .result-title h2{font-size:20px}
  .result-title small{font-size:9px}
  .score-list{margin:4px 0 2px}
  .score-row{padding:2px 6px}
  .score-row img{width:22px;height:22px}
  .score-row strong,.score-row small{font-size:9px}
  .score-row b{font-size:16px}
  .multiplier-log{font-size:10px}
  .finished-screen .wait-seats{margin-block:4px}
  .finished-screen .wait-seat{height:clamp(60px,20cqh,130px)}
  .finished-screen .seat-label{padding-top:2%;padding-bottom:1%}
  .finished-screen .seat-label small{display:none}
  .action-rail{min-height:38px;padding:3px 7px;margin-top:3px}
  .turn-status strong{font-size:13px}
  .turn-status small{font-size:10px}
  #room-bar{padding-block:3px max(3px,env(safe-area-inset-bottom))}
  .voice-bar{min-height:25px;gap:6px}
  .voice-button,.room-tool{min-height:25px;font-size:10px;padding:2px 8px}
  .connection-notice{padding:3px 6px;margin:0 0 3px}
  .connection-notice strong,.connection-notice small{display:inline;font-size:10px}
  .connection-notice small{margin-left:6px}
  .connection-notice button{min-height:24px;font-size:10px}
}
@container game-stage (orientation:landscape) and (max-height:500px){
  body[data-screen=table] .command-head,body:has(.match-screen) .command-head{position:absolute;left:auto;right:0;top:1px;padding-left:0}
  body[data-screen=table] .command-head .brand,body:has(.match-screen) .command-head .brand{position:absolute;right:100%;margin-right:5px}
  body[data-screen=table] .command-head .brand>span:last-child,body:has(.match-screen) .command-head .brand>span:last-child{display:none}
  body[data-screen=table] .utility span,body:has(.match-screen) .utility span{display:none}
  .match-screen .room-head{padding-right:170px;min-height:37px}
  .revealed summary{font-size:10px;padding:3px 6px}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
/* The table renderer publishes the center of the controls in CSS pixels from
   the top of this same stage, including the extra lift of selected cards. */
.canvas-stage .action-rail{position:absolute;z-index:2;top:var(--action-y,64%);left:3%;right:3%;min-height:0;height:46px;transform:translateY(-50%);margin:0;padding:0;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:4px;background:none;border:0;border-radius:0;line-height:1.3;pointer-events:none}
.canvas-stage .turn-status{grid-column:1;max-width:100%;justify-self:start;padding:2px 10px;border-left:2px solid #d6bd7a;color:#fff3d6;background:linear-gradient(90deg,#09271fc4,#0f33220a)}
.canvas-stage .turn-status strong{font-size:14px}
.canvas-stage .actions{grid-column:2;justify-self:center;pointer-events:auto}
.canvas-stage .actions:empty{display:none}
.canvas-stage .actions .btn{height:40px;min-height:0;min-width:70px;padding:4px 17px;font-size:15px;box-shadow:inset 0 0 0 2px #a393612e,0 2px 0 #0b271dd6,0 3px 7px #0622197d}
.canvas-stage .actions .btn.gold{box-shadow:inset 0 0 0 2px #b3975f,0 2px 0 #6a502c,0 3px 7px #13281db0}
@container game-stage (min-width:900px) and (min-height:501px){
  body:has(.match-screen) .command-head{position:absolute;left:0;right:0;top:2px;margin:auto;pointer-events:none}
  body:has(.match-screen) .command-head button{pointer-events:auto}
  .match-screen .room-head{min-height:72px;padding-inline:clamp(140px,13cqw,216px) clamp(235px,22cqw,310px)}
}
@container game-stage (max-width:640px) and (orientation:portrait){
  .canvas-stage .action-rail{left:6px;right:6px;height:36px;grid-template-columns:minmax(59px,1fr) auto minmax(0,.15fr);gap:2px}
  .canvas-stage .actions{gap:3px}
  .canvas-stage .actions .btn{min-width:38px;height:30px;padding:3px 7px;font-size:11px}
  .canvas-stage .turn-status{padding:1px 4px}
  .canvas-stage .turn-status strong{font-size:11px}
  .canvas-stage .turn-status small{font-size:9px}
}
@container game-stage (orientation:landscape) and (max-height:620px){
  .canvas-stage .action-rail{height:30px}
  .canvas-stage .turn-status{padding:1px 6px}
  .canvas-stage .turn-status strong{font-size:11px}
  .canvas-stage .turn-status small{font-size:9px}
  .canvas-stage .actions .btn{min-width:46px;height:26px;padding:2px 9px;font-size:11px}
}
html,#app,.ready-screen,.match-screen,#room-bar,.salon,.title-stage,.ready-board,.ready-controls,.canvas-stage,.action-rail{min-width:0}
html{overflow-x:clip}
.match-screen{position:relative}
.match-screen>.connection-notice{position:absolute;z-index:4;left:50%;top:65px;transform:translateX(-50%);width:min(430px,calc(100% - 14px));box-shadow:0 5px 15px #09180db3}
@container game-stage (min-width:900px) and (min-height:501px){
  body:has(.match-screen) .utility:not(.profile)>span{display:none}
  body:has(.match-screen) #profile-name{max-width:6em}
  .match-screen .room-head{padding-right:240px}
  .match-screen>.connection-notice{top:76px}
}
@container game-stage (max-width:640px) and (orientation:portrait){.match-screen>.connection-notice{top:54px}}
@container game-stage (max-width:355px) and (orientation:portrait){
  .match-screen .room-head{min-height:44px}
  .match-screen>.connection-notice{top:46px}
}
@container game-stage (orientation:landscape) and (max-height:620px){.match-screen>.connection-notice{top:40px}}

.table-summary{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:normal}

/* One reference plane for desktop. A single transform scales painted and
   native controls together; empty space is shared equally on opposite sides. */
html,body{width:100%;height:100%;min-height:0;overflow:hidden;background:#081310}
#game-shell{position:absolute;left:50%;top:50%;width:1280px;height:720px;transform:translate(-50%,-50%) scale(var(--game-scale,1));transform-origin:center;container:game-stage / size;overflow:hidden;isolation:isolate;background:#112c25}
#game-shell .club-backdrop,#game-shell .scene-surface{position:absolute}
#game-shell .command-head,#game-shell #room-bar{width:100%}
html:not([data-mobile]) body[data-screen=table] #game-shell{display:grid;grid-template-rows:minmax(0,1fr) 46px}
html:not([data-mobile]) body[data-screen=table] .command-head{top:0;padding:5px 20px;max-width:none}
html:not([data-mobile]) body[data-screen=table] #app{height:100%;max-width:none;padding:0 16px}
html:not([data-mobile]) body[data-screen=table] .match-screen{width:100%;height:100%;max-width:none;display:grid;grid-template-rows:60px minmax(0,1fr)}
html:not([data-mobile]) body[data-screen=table] .room-head{min-height:0;padding:5px 240px 5px 170px}
html:not([data-mobile]) body[data-screen=table] #room-bar{margin:0;padding:4px 16px 5px}
html:not([data-mobile]) body[data-screen=table] .voice-bar{max-width:none;min-height:35px;height:100%}
html:not([data-mobile]) body[data-screen=table] .match-screen>.connection-notice{top:66px}
body[data-screen=table] .canvas-stage{height:100%;min-height:0}
body[data-screen=table] .canvas-stage canvas{position:absolute;inset:0;width:100%;height:100%}
body[data-screen=table] .sr-hand:focus-within{position:absolute;z-index:5;bottom:4px;left:7%;right:7%;margin:0}
#modal{position:fixed;left:50%;top:50%;right:auto;bottom:auto;width:430px;max-width:none;max-height:672px;margin:0;transform:translate(-50%,-50%) scale(var(--game-scale,1));transform-origin:center}
.modal-content{padding:30px}
html[data-mobile] #game-shell{position:relative;inset:auto;width:100%;height:100dvh;transform:none;overflow:auto;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
html[data-mobile] body[data-screen=table] #game-shell{display:flex;flex-direction:column;overflow:hidden}
html[data-mobile] body[data-screen=table] #app{min-height:0;flex:1;display:flex;margin:0;padding:0 9px;width:100%}
html[data-mobile] body[data-screen=table] .match-screen{min-height:0;display:flex;flex-direction:column;width:100%;margin:0}
html[data-mobile] body[data-screen=table] .canvas-stage{flex:1;height:auto}
html[data-mobile] body[data-screen=table] .room-head,html[data-mobile] body[data-screen=table] .command-head,html[data-mobile] body[data-screen=table] #room-bar{flex:none}
html[data-mobile] body[data-screen=table] #room-bar{padding:4px 9px 5px}
html[data-mobile] #modal{width:min(430px,calc(100vw - 22px));max-height:calc(100dvh - 20px)}
html[data-mobile] .modal-content{padding:18px}
@container game-stage (orientation:landscape) and (max-height:500px){
  html[data-mobile] body[data-screen=table] #game-shell .command-head{width:auto;right:0;left:auto;top:2px}
}
