:root{--room: #241c17;--ink: #f3ece0;--muted: #b9ab97;--wood: #6b4628;--wood-dark: #4a2f1a;--felt: #1f6b4f;--felt-dark: #17543e;--ivory: #fbf7ea;--gold: #f2c14e;--paper: #fdfaf2;--paper-ink: #2a241d;--seat0: #8a3b46;--seat1: #2f5d8a;--seat2: #7a6a2c;--seat3: #5a3f7d}*{box-sizing:border-box}html,body,button,.tile{touch-action:manipulation}body{margin:0;background:radial-gradient(circle at 40% 30%,#33271f,var(--room));color:var(--ink);font-family:system-ui,-apple-system,Segoe UI,sans-serif;font-size:15px}button{font:inherit;font-weight:600;padding:8px 14px;border-radius:8px;border:0;background:var(--gold);color:#2a1f08;cursor:pointer}button:hover:not(:disabled){filter:brightness(1.08)}button:disabled{opacity:.45;cursor:default}button.quiet{background:#4b3d33;color:var(--ink)}button.win{background:#e4572e;color:#fff}.muted{color:var(--muted)}.app{display:grid;grid-template-columns:minmax(0,1fr) 420px;gap:16px;padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));min-height:100vh;align-items:start}.play{container-type:inline-size;display:flex;flex-direction:column;gap:10px;min-width:0}.bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.controls h1{font-size:19px;margin:0;letter-spacing:.03em}.headrow{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.headrow h2{margin:0}.headrow .pill{padding:3px 10px;font-size:12px}.controls .bar{gap:6px}.controls .bar+.bar{margin-top:6px}.controls button,.controls a.button{padding:5px 10px;font-size:13px}.panel .pill{background:#e9e0cd}.pill{background:#3a2e26;padding:6px 12px;border-radius:999px;font-size:13px}.toggle{cursor:pointer}.arena{position:relative;display:grid;grid-template-columns:minmax(0,1fr);justify-items:center}.table{width:min(100%,calc(100vh - 218px));align-self:center;min-width:300px;aspect-ratio:1;position:relative;container-type:size;border-radius:14px;background:radial-gradient(rgba(255,255,255,.05) 1px,transparent 1.2px) 0 0 / 4px 4px,radial-gradient(rgba(0,0,0,.08) 1px,transparent 1.2px) 2px 2px / 4px 4px,radial-gradient(circle at 50% 45%,#27805f,var(--felt-dark));border:12px solid;border-color:#84593a #5f3d22 #4a2f1a #6f4a2b;box-shadow:inset 0 0 0 2px #00000073,inset 0 0 70px #0006,0 0 0 2px #2e1c0f,0 16px 36px #0000008c}.table>*{--tw: 3cqw}.felt{position:absolute;top:17.5cqw;right:17.5cqw;bottom:17.5cqw;left:17.5cqw;--tw: 4.2cqw}.center-art{position:absolute;top:8%;right:8%;bottom:8%;left:8%;width:84%;height:84%;object-fit:contain;opacity:.55;pointer-events:none;-webkit-user-select:none;user-select:none}.tile.discard{position:absolute;transition:transform .25s ease-out,left .5s ease-out,top .5s ease-out;animation:toss .45s cubic-bezier(.2,.8,.3,1);filter:drop-shadow(0 .5cqw .5cqw rgba(0,0,0,.35))}.from-0{--fx: 0cqw;--fy: 42cqw}.from-1{--fx: 42cqw;--fy: 0cqw}.from-2{--fx: 0cqw;--fy: -42cqw}.from-3{--fx: -42cqw;--fy: 0cqw}@keyframes toss{0%{translate:var(--fx) var(--fy);opacity:.2}}.discard.last{z-index:5;outline:.5cqw solid var(--gold);box-shadow:0 0 2.5cqw var(--gold);scale:1.35}.side{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;pointer-events:none}.side-1{transform:rotate(-90deg)}.side-2{transform:rotate(180deg)}.side-3{transform:rotate(90deg)}.station{width:62cqw;display:flex;flex-direction:column;align-items:center;gap:1cqw;padding-bottom:.8cqw;pointer-events:auto}.wall{display:flex;gap:.1cqw}.wall.out{transform-origin:100% 50%;transform:translateY(-1.6cqw) rotate(22deg)}.side-1 .wall.out{transform:translateY(-1.6cqw) rotate(12deg)}.stack.n2{translate:0 -.45cqw;box-shadow:0 .2cqw #1f5a4e,0 .4cqw #e6dcbc,0 .6cqw #2a7566,0 .8cqw #e6dcbc,0 1.1cqw .5cqw #0006}.wallbadge{position:absolute;right:calc(100% + .4cqw);top:50%;translate:0 -50%;z-index:4;display:grid;place-items:center;min-width:2.8cqw;height:2.8cqw;padding:0 .5cqw;border-radius:1.4cqw;background:var(--gold);color:#2a1f08;font-size:clamp(8px,1.55cqw,15px);font-weight:800;box-shadow:0 .2cqw .5cqw #00000080}.wallbadge.above{right:auto;left:50%;top:auto;bottom:calc(100% + .7cqw);translate:-50% 0}.side-0 .wallbadge{rotate:-22deg}.side-1 .wallbadge{rotate:68deg}.side-2 .wallbadge{rotate:158deg}.side-3 .wallbadge{rotate:-112deg}.stack.n0{visibility:hidden}.mat{width:100%;border-radius:1.2cqw;padding:.7cqw;display:flex;flex-direction:column;align-items:center;gap:.6cqw;border:.25cqw solid rgba(0,0,0,.25);outline:1px dashed rgba(255,255,255,.4);outline-offset:-.7cqw;background-image:linear-gradient(160deg,#ffffff1f,#0000002e);transition:box-shadow .2s}.mat-0{background:var(--seat0)}.mat-1{background:var(--seat1)}.mat-2{background:var(--seat2)}.mat-3{background:var(--seat3)}.mat.active{box-shadow:0 0 0 .4cqw var(--gold),0 0 3cqw #f2c14e99}.ledge{--tw: 4cqw;display:flex;gap:1.2cqw;min-height:calc(var(--tw) * 1.34)}.ledge .tile{font-weight:900}.group{display:flex;gap:.1cqw}.rack{display:flex;gap:.1cqw;padding:.5cqw 1cqw;border-radius:.8cqw;background:linear-gradient(#ffffff40,#00000059);border-bottom:.5cqw solid rgba(0,0,0,.4);min-height:calc(var(--tw) * 1.34 + 1.5cqw)}.ledge .tile.small{font-size:calc(var(--tw) * .92)}.ledge .tile.small .face{margin-top:.14em}.ledge .tile.small .sym{position:absolute;top:4%;left:7%;font-size:.36em;line-height:1}.ledge .tile.bam .sym{font-size:0;width:calc(var(--tw) * .11);height:calc(var(--tw) * .32);border-radius:calc(var(--tw) * .05);background:currentColor}.tile{position:relative;width:var(--tw);height:calc(var(--tw) * 1.34);flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:calc(var(--tw) * .15);background:linear-gradient(155deg,#fffef8 20%,#f3ecd6);border:1px solid #d8cfb2;box-shadow:inset 0 calc(var(--tw) * .04) 0 #ffffffe6,0 calc(var(--tw) * .07) 0 #ddd3b3,0 calc(var(--tw) * .13) 0 #2f8271,0 calc(var(--tw) * .18) calc(var(--tw) * .12) #00000059;font-size:calc(var(--tw) * .56);font-weight:800;line-height:1;-webkit-user-select:none;user-select:none}.tile .idx{position:absolute;z-index:1;top:.04em;left:.12em;font-size:.78em;font-weight:900;text-shadow:0 0 .1em #fffdf4,0 0 .1em #fffdf4,0 0 .18em #fffdf4,0 0 .25em #fffdf4}.tile .art{font-size:1.05em;font-weight:700}.tile .crak-char{margin-top:.5em}.tile .soap{width:1em;height:1.3em;border:.13em solid currentColor;border-radius:.1em;outline:.05em solid currentColor;outline-offset:-.28em}.tile .word{font-size:.3em;font-weight:700;margin-top:.35em;text-transform:uppercase;letter-spacing:.04em}.pips{display:grid;grid-template-columns:repeat(3,auto);gap:.1em .13em;margin-top:.62em;justify-content:center;align-content:center}.pips.p1{grid-template-columns:auto}.pips.p2,.pips.p4{grid-template-columns:repeat(2,auto);gap:.2em .3em}.pips i{display:block}.dots i{width:.32em;height:.32em;border-radius:50%;background:radial-gradient(circle,#fff 0 16%,currentColor 20% 52%,#fff 56% 62%,currentColor 66%)}.sticks i{width:.15em;height:.38em;border-radius:.07em;background:linear-gradient(currentColor 0 42%,#fff 42% 58%,currentColor 58%)}.pips.p1 i{scale:2.2}.pips.p2 i{scale:1.4}.tile.small{flex-direction:row;font-size:calc(var(--tw) * .62)}.tile.small .sym{font-size:.5em}.tile.back{background:linear-gradient(155deg,#45a892,#2a7566);border-color:#1f5a4e;box-shadow:inset 0 calc(var(--tw) * .04) 0 #ffffff40,0 calc(var(--tw) * .07) 0 #1f5a4e,0 calc(var(--tw) * .13) 0 #e6dcbc,0 calc(var(--tw) * .18) calc(var(--tw) * .1) #00000059}.tile.clickable{cursor:pointer;transition:transform .12s;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}@media(hover:hover){.tile.clickable:hover{transform:translateY(-4px)}}.tile.selected,.tile.selected:hover{transform:translateY(-14px);outline:3px solid var(--gold)}.tray .tile{touch-action:none;cursor:grab}.tile.dragging,.tile.dragging:hover{transform:translateY(-10px) scale(1.06);box-shadow:0 10px 18px #00000073;cursor:grabbing;z-index:3}.tile.fresh{margin-left:calc(var(--tw) * .3);border-color:var(--gold)}.bam{color:#1c7a3c}.crak{color:#b3261e}.dot{color:#1d4ea0}.wind{color:#222}.flower{color:#b0468f}.joker{color:#7a3db8}.cam{display:flex;flex-direction:column;align-items:center;gap:6px;width:var(--cw)}.cam-bottom,.cam-right{flex-direction:column-reverse}.screen{width:var(--cw);aspect-ratio:4 / 3;border-radius:10px;overflow:hidden;position:relative;border:3px solid #3a2e26;display:grid;place-items:center;flex:none}.cam.active .screen{border-color:var(--gold);box-shadow:0 0 14px #f2c14e8c}.screen video{width:100%;height:100%;object-fit:cover}.screen video.mirror{transform:scaleX(-1)}.camctl{position:absolute;top:3%;left:3%;right:3%;display:flex;gap:3%;justify-content:flex-end}.camctl button{white-space:nowrap}button.camera.talk{flex:1;min-width:0;overflow:hidden;touch-action:none;-webkit-user-select:none;user-select:none}button.camera.talk.on{background:#e4572e}.cam:has(.talk.on) .screen{border-color:#e4572e}.avatar{display:flex;flex-direction:column;align-items:center;color:#ffffffe6}.avatar span{font-size:calc(var(--cw) * .27);font-weight:800;line-height:1}.avatar small{font-size:10px;opacity:.75;text-transform:uppercase;letter-spacing:.08em}button.camera{font-size:11px;padding:5px 8px;background:#00000073;color:#fff}.nameplate{position:absolute;left:0;right:0;bottom:0;padding:2px 6px;font-size:11px;background:#0000008c;text-align:center}.bubble{min-height:30px;max-width:var(--cw);padding:6px 10px;border-radius:12px;background:var(--paper);color:var(--paper-ink);font-size:13px;font-weight:700;text-align:center;visibility:hidden}.bubble.show{visibility:visible;animation:pop .25s ease-out}@keyframes pop{0%{transform:scale(.7);opacity:0}}.table .cam{--cw: 15.6cqw;position:absolute;z-index:3;gap:.5cqw}.table .cam-bottom{left:1.4cqw;bottom:1.4cqw}.table .cam-right{right:1.4cqw;bottom:1.4cqw}.table .cam-top{right:1.4cqw;top:1.4cqw}.table .cam-left{left:1.4cqw;top:1.4cqw}.table .screen{border-width:.3cqw;border-radius:1cqw}.table .nameplate{font-size:clamp(7px,1.25cqw,13px);padding:.2cqw .5cqw}.table .avatar small{font-size:clamp(6px,1cqw,11px)}.table button.camera{font-size:clamp(7px,1.15cqw,12px);padding:.5cqw .8cqw}.table .bubble{min-height:0;padding:.5cqw 1cqw;border-radius:1.2cqw;font-size:clamp(8px,1.4cqw,14px)}.you{display:flex;gap:14px;align-items:flex-end;justify-content:center}.traywrap{min-width:0;display:flex;flex-direction:column;gap:8px;align-items:center}.status{font-size:15px;font-weight:600;min-height:20px;text-align:center}.error{color:#ff9d8a}.tray{--tw: clamp(24px, calc((100cqw - 190px) / 14.4), 62px);display:flex;gap:2px;padding:18px 16px 10px;border-radius:10px;background-image:linear-gradient(rgba(255,255,255,.22),transparent 30%,rgba(0,0,0,.22));border-top:2px solid rgba(255,255,255,.35);border-bottom:10px solid rgba(0,0,0,.4);box-shadow:inset 0 -6px 8px #00000040,0 10px 20px #00000080;min-height:calc(var(--tw) * 1.34 + 36px)}.actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;min-height:36px;align-items:center}.feltnote{position:absolute;left:1%;right:1%;bottom:1cqw;z-index:6;display:flex;flex-direction:column;align-items:center;gap:.8cqw;pointer-events:none;text-align:center}.feltnote.beside-wall{right:42%}.feltstatus,.passinfo{background:#140e0ac7;border-radius:1.4cqw;padding:.8cqw 1.6cqw}.feltstatus{font-size:clamp(11px,2.1cqw,19px);font-weight:600}.passinfo{--tw: 3.4cqw;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.5cqw 2.4cqw;font-size:clamp(10px,1.8cqw,16px)}.passpart{display:flex;align-items:center;gap:1cqw;white-space:nowrap}.passtiles{display:inline-flex;align-items:center;gap:2px}.passtiles em{margin-left:4px;color:var(--muted)}.tile.received:not(.selected){outline:3px solid #6fc3ff}.trayrow{display:flex;align-items:center;gap:10px;max-width:100%}.sorts{display:flex;flex-direction:column;gap:6px}.sorts button{padding:6px 10px;font-size:12px;white-space:nowrap}@container (max-width: 560px){.trayrow{flex-direction:column-reverse}.sorts{flex-direction:row;flex-wrap:wrap;justify-content:center;gap:5px}.sorts button{padding:7px 6px;font-size:11.5px}.tray{--tw: min(calc((100cqw - 50px) / 7.4), 62px);flex-wrap:wrap;justify-content:center;row-gap:10px;padding:14px 12px 8px}}.result{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:86%;max-height:96%;overflow:auto;z-index:10;display:flex;flex-direction:column;align-items:center;gap:1.4cqw;text-align:center;background:#140e0ae6;border:2px solid var(--gold);border-radius:14px;padding:2.4cqw;font-size:clamp(12px,2.6cqw,19px);line-height:1.25}.result h2{margin:0;font-size:clamp(15px,3.8cqw,28px);text-wrap:balance}.result p{margin:0;text-wrap:balance}.scores{display:grid;grid-template-columns:auto auto;gap:.6cqw 4cqw;justify-content:center;color:var(--muted);white-space:nowrap}.panel{display:flex;flex-direction:column;gap:12px;max-height:calc(100vh - 24px);position:sticky;top:12px}.panel section{background:var(--paper);color:var(--paper-ink);border-radius:12px;padding:12px 14px}.panel h2{margin:0 0 6px;font-size:14px;text-transform:uppercase;letter-spacing:.08em}.panel .muted{color:#7a6f60}.chat .lines{height:110px;overflow-y:auto;font-size:13px}.chat p{margin:0 0 3px}.chat .system{color:#7a6f60;font-style:italic}.who-0{color:var(--seat0)}.who-1{color:var(--seat1)}.who-2{color:var(--seat2)}.who-3{color:var(--seat3)}.card{overflow-y:auto;min-height:0;flex:1}.legend{font-size:11px;margin:0}.card h3{margin:7px 0 2px;font-size:12px;border-bottom:1px solid #ddd3bf}.hand{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 8px;padding:1px 6px;border-radius:6px;font-size:11px;color:#7a6f60}.hand .value{margin-left:auto}.hand .away+.value{margin-left:0}.hand.close{background:#fff1c9}.tokens{display:flex;gap:7px;flex-wrap:wrap;font-family:ui-monospace,SF Mono,Menlo,monospace;font-weight:700;font-size:13px}.sa{color:#1d4ea0}.sb{color:#b3261e}.sc{color:#1c7a3c}.sn{color:var(--paper-ink)}.away{margin-left:auto;font-weight:700;color:#9a5b00}@media(max-width:1100px){.app{grid-template-columns:1fr}.panel{position:static;max-height:none}.card{max-height:300px}}@media(max-width:700px){.table{width:100%}}.cardbtn{display:none;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}@media(max-width:1100px){.cardbtn{display:inline-block}.panel>.card{display:none}}.cardsheet{position:fixed;top:0;left:0;width:100%;height:100vh;height:100dvh;z-index:50;display:flex;flex-direction:column;gap:8px;padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left));background:var(--room)}.cardsheet,.cardsheet *{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.sheetbar{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:32px;font-size:13px;font-weight:600}.sheetbar em{color:var(--muted);white-space:nowrap}.sheetfoot{position:absolute;left:18px;right:18px;bottom:calc(env(safe-area-inset-bottom,0px) + 104px);display:flex;justify-content:space-between;pointer-events:none}.sheetfoot button{pointer-events:auto;padding:13px 28px;border-radius:999px;font-size:16px;box-shadow:0 0 0 3px #140e0a8c,0 8px 20px #0000008c}.cardsheet .sheettiles{--tw: min(calc((100vw - 44px) / 14.6), 40px);gap:8px;justify-content:center;flex:none;flex-wrap:wrap;min-height:0}.cardsheet .sheettiles .group{gap:1px}.cardsheet .card{flex:1;min-height:0;max-height:none;overflow-y:auto;background:var(--paper);color:var(--paper-ink);border-radius:12px;padding:10px 12px 180px}.cardsheet .card h2{margin:0 0 4px;font-size:14px;text-transform:uppercase;letter-spacing:.08em}.cardsheet .card .muted{color:#7a6f60}.chat .typed{background:#f1ead9;border-radius:6px;padding:2px 6px}.say{display:flex;gap:6px;margin-top:8px}.say input{flex:1;min-width:0}.say button{padding:6px 10px}input{font:inherit;padding:8px 10px;border-radius:8px;border:1px solid #cbbfa8;background:#fff;color:var(--paper-ink)}.lobby{min-height:100vh;min-height:100dvh;display:grid;place-items:center;align-content:center;gap:16px;padding:16px}a.button{display:inline-block;font-weight:600;padding:8px 14px;border-radius:8px;background:var(--gold);color:#2a1f08;text-align:center;text-decoration:none}a.button.quiet{background:#e9e0cd;color:var(--paper-ink)}a.button:hover{filter:brightness(1.05)}.sitefoot{font-size:13px;color:var(--muted);text-align:center}.sitefoot a{color:inherit}.sitefoot a:hover{color:var(--ink)}.controls .sitefoot{color:#7a6f60;margin-top:10px}.controls .sitefoot a:hover{color:var(--paper-ink)}.legal{display:flex;flex-direction:column;align-items:center;gap:16px;padding:24px 16px}.legal .sheet{width:min(100%,760px);gap:10px;line-height:1.5}.legal .sheet h2{margin-top:12px}.legal .sheet a{color:#2f5d8a}.legal ul{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:4px}.legal .caps{text-transform:uppercase;font-size:13px}.sheet{width:min(100%,520px);background:var(--paper);color:var(--paper-ink);border-radius:16px;padding:28px;display:flex;flex-direction:column;gap:14px;box-shadow:0 16px 40px #00000080}.sheet.home>.mascot{height:150px;align-self:center;margin-bottom:-4px}.sheet.home>h1,.sheet.home>h1+.muted{text-align:center}.sheet h1{margin:0;font-size:30px}.sheet h2{margin:0 0 4px;font-size:16px}.sheet p{margin:0}.sheet .muted{color:#7a6f60}.sheet label{display:flex;flex-direction:column;gap:4px;font-weight:600}.sheet button.quiet{background:#e9e0cd;color:var(--paper-ink)}.choices{display:grid;grid-template-columns:1fr 1fr;gap:14px}.choices>div{border:1px solid #ddd3bf;border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:8px;align-items:flex-start}.code{width:6em;text-transform:uppercase;letter-spacing:.3em;font-weight:700}.notice{background:#fde3dc;color:#8a2413;padding:8px 12px;border-radius:8px}.invite{display:flex;gap:8px}.invite input{flex:1;min-width:0}.seats{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.seats li{display:flex;gap:12px;padding:8px 12px;border-radius:8px;background:#f1ead9}.seats li.open{color:#7a6f60;background:transparent;border:1px dashed #cbbfa8}.seats b{width:3.5em}@media(max-width:480px){.choices{grid-template-columns:1fr}}.legal .sheet h3{margin:8px 0 0;font-size:15px}.legal .sheet h2{scroll-margin-top:12px}.legal ol{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:4px}.legal .toc{display:flex;flex-wrap:wrap;gap:6px 8px}.legal .toc a{background:#efe7d6;border-radius:999px;padding:4px 12px;text-decoration:none;font-size:14px}.tilerow{--tw: clamp(26px, 8.4vw, 40px);display:flex;flex-wrap:wrap;gap:8px 14px;padding:2px 0 8px}.tilerow .group{display:flex;gap:2px}table.rules{border-collapse:collapse;width:100%}table.rules th,table.rules td{text-align:left;vertical-align:middle;padding:8px 10px 8px 0;border-top:1px solid #e4dac6}table.rules th{white-space:nowrap;padding-right:16px}table.rules .tilerow{--tw: clamp(20px, 6vw, 30px);padding:0}
