*{box-sizing:border-box}
:root{--session-background:#142c30;--session-border:#426365;--session-accent:#edce93;--session-text:#f4eee1}
html,body{margin:0;min-height:100%;width:100%}body{background:#10282b;color:#f4eee1;font:16px/1.4 Ubuntu,system-ui,sans-serif}
button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,select:focus-visible{outline:3px solid #fff2be;outline-offset:4px}
#session-topbar{flex-wrap:wrap}#session-topbar .games-session-seats{flex:1 1 420px}
#shell{max-width:1680px;margin:auto;padding:12px 24px;min-width:0}#notice:not([hidden]){padding:8px;color:#ffdbab}
#game[hidden],#room-controls[hidden],#solo-toolbar[hidden],#lobby[hidden]{display:none}
#game{min-height:640px;height:calc(100dvh - var(--ld-header-height,60px) - 24px)}
.ld-table{display:grid;grid-template-rows:196px minmax(204px,1fr) 212px;gap:14px;height:100%;min-width:0}
.player-rail{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:12px;align-items:start}
.seats-2{grid-template-columns:repeat(2,minmax(0,1fr))}.seats-3{grid-template-columns:repeat(3,minmax(0,1fr))}.seats-4{grid-template-columns:repeat(4,minmax(0,1fr))}.seats-5{grid-template-columns:repeat(5,minmax(0,1fr))}.seats-6{grid-template-columns:repeat(6,minmax(0,1fr))}.seats-7{grid-template-columns:repeat(7,minmax(0,1fr))}
.ui-section.seat{padding:8px 3px;border-top:3px solid #537678;min-width:0;text-align:center}
.seat .ui-section-body{display:grid;grid-template-rows:22px 18px 108px 24px;justify-items:center;gap:1px}
.seat-name{font-weight:750;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.seat-role{font-size:11px;text-transform:uppercase;letter-spacing:.1em;color:#bfd2cf;min-height:16px}.dice-count{font-variant-numeric:tabular-nums;font-size:14px;color:#e6d3ae}
.seat.acting{border-color:#edce93}.seat.acting .seat-role{color:#ffdfa5}.seat.eliminated{opacity:.55}
.cup-stage{display:flex;align-items:center;justify-content:center;height:108px;width:100%;position:relative;isolation:isolate}
.cup-stage .dice-cup{width:76px;height:80px;border-radius:20% 20% 10% 10%;border:3px solid #b5865e;background:linear-gradient(90deg,#472c26,#936245 38%,#643d2c 90%);box-shadow:inset 6px 0 #fff1,0 9px 12px #0007;transform:rotate(180deg)}
.cup-stage .dice-cup::before{height:12px;top:-5px;left:-4px;right:-4px;border-width:2px;background:#6f4632}
.seat:nth-child(3n+2) .dice-cup{filter:hue-rotate(65deg)}.seat:nth-child(3n) .dice-cup{filter:hue-rotate(-30deg)}
.cup-stage.revealed{display:flex;flex-wrap:wrap;align-content:center;gap:5px;max-width:178px}
.cup-stage .d6-face{--die-size:29px;border-width:1px;border-bottom-width:3px;box-shadow:0 2px 0 #746454;padding:3px}
.d6-face.is-match{background:#f7d985;border-color:#edb459;outline:2px solid #f4d48e;outline-offset:2px}
.ui-section.table-center{background:radial-gradient(ellipse at 50% 40%,#245054,#163639 75%);border-radius:50% / 22%;padding:12px 20px;min-width:0;box-shadow:inset 0 0 0 1px #456a65;text-align:center}
.table-center>.ui-section-body{height:100%;display:grid;grid-template-rows:22px 22px minmax(68px,1fr) 24px 25px 46px;align-items:center;justify-items:center;gap:3px}
.round-label{color:#b9d2cd;font-size:13px;letter-spacing:.05em}.bid-context{color:#edce93;font-size:14px}
.current-bid{font-size:clamp(36px,4.8vw,68px);font-weight:850;line-height:1;display:flex;align-items:center;justify-content:center;gap:18px;font-variant-numeric:tabular-nums}
.current-bid .d6-face{--die-size:62px;border-width:2px;border-bottom-width:4px;box-shadow:0 3px 0 #7a6c5d}.turn-status{font-weight:750;font-size:16px}.challenge-result{font-size:14px;color:#ffe0a0;font-variant-numeric:tabular-nums;min-height:22px}
.center-actions{display:flex;gap:14px;justify-content:center;min-height:46px}.center-actions button{min-width:180px}
button.challenge-action,button.next-action,button.cancel-draft{border:1px solid #be9973;border-radius:5px;background:#f2d5a1;color:#251c16;min-height:44px;padding:8px 18px;font-weight:750}
button.challenge-action{background:#e8b3a2;border-color:#d5927b}.center-actions button:disabled{visibility:hidden}
.player-dock{display:grid;grid-template-columns:minmax(330px,1fr) minmax(400px,1.2fr);gap:30px;align-items:start;border-top:1px solid #456a65;padding-top:12px;min-width:0}
.private-tray>.ui-section-body{display:grid;grid-template-rows:28px 94px;align-items:center;gap:8px}
.tray-heading{font-size:14px;color:#c6d7d0;letter-spacing:.04em}.my-dice{display:flex;gap:12px;align-items:center;min-height:94px;justify-content:center}
.my-dice .d6-face{--die-size:64px}.private-tray{min-width:0}.hidden-dice{color:#b9d2cd;font-size:14px}
.bid-station>.ui-section-body{display:grid;grid-template-rows:48px 82px 32px;gap:12px}.bid-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.quantity-control{display:flex;align-items:center;gap:10px;font-size:14px;color:#c6d7d0}.quantity-control select{height:44px;width:78px;background:#23454a;border:1px solid #76908b;border-radius:4px;color:#fff4d9;padding:6px;font-weight:750}
.draft-label{font-size:14px;color:#f4d48e;min-width:80px}.cancel-draft{font-size:13px!important;padding:6px 10px!important;min-width:74px}
.bid-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.bid-tile{min-width:0;min-height:76px;position:relative;border:2px solid #b9a27d;background:#e6d3af;border-radius:7px;padding:8px 4px;display:flex;align-items:center;justify-content:center;box-shadow:0 4px #79664e}
.bid-tile[hidden]{display:none}.bid-tile .d6-face{--die-size:43px;padding:4px;border-width:1px;border-bottom-width:3px;box-shadow:0 2px 0 #7a6c5d}
.bid-tile:disabled{opacity:.35;cursor:default;box-shadow:none}.bid-tile.is-selected{outline:3px solid #fff2be;outline-offset:3px;background:#ffe0a1}.bid-tile:not(:disabled):hover{background:#ffe9be}
.bid-help{font-size:12px;color:#b9d2cd;letter-spacing:.04em}
dialog{background:#18373a;color:#f4eee1;border:1px solid #9d9979;border-radius:9px;padding:24px;max-width:min(700px,calc(100vw - 40px));max-height:85vh;overflow:auto}dialog::backdrop{background:#000b}.rules-content{display:grid;gap:10px}.rules-content p{margin:0}.rules-content h2{font-size:23px;margin:0}.rules-content h3{font-size:17px;color:#edce93;margin:10px 0 0}.rules-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:8px}.rules-content button,dialog button{border:1px solid #be9973;background:#f2d5a1;color:#251c16;padding:8px 14px;border-radius:4px}
@media(max-width:1150px){#shell{padding:10px 14px}.player-rail{gap:7px}.seat-name{font-size:13px}.player-dock{gap:20px;grid-template-columns:minmax(310px,1fr) minmax(380px,1.2fr)}.my-dice{gap:8px}.my-dice .d6-face{--die-size:56px}.cup-stage .d6-face{--die-size:25px}.bid-grid{gap:6px}.bid-tile .d6-face{--die-size:39px}}
@media(max-height:800px){.ld-table{grid-template-rows:184px minmax(204px,1fr) 184px;gap:10px}#game{min-height:598px}.player-dock{padding-top:8px}.bid-station>.ui-section-body{gap:8px;grid-template-rows:44px 72px 24px}.bid-tile{min-height:68px}.seat .ui-section-body{grid-template-rows:20px 16px 100px 22px}}
@keyframes bid-arrive{from{opacity:.6;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes cup-reveal{from{opacity:.1;transform:translateY(12px)}to{opacity:1;transform:none}}
.is-new-bid{animation:bid-arrive .25s ease-out}.cup-stage.is-revealing{animation:cup-reveal .45s both;animation-delay:var(--reveal-delay,0ms)}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
.table-center{position:relative}.bid-history{position:absolute;left:20px;top:16px;z-index:5;text-align:left;font-size:13px}.bid-history summary{cursor:pointer;padding:7px 12px;background:#18373a;border:1px solid #76908b;border-radius:4px}.bid-history ol{position:absolute;top:28px;left:0;list-style:none;margin:12px 0 0;padding:12px;background:#10282b;border:1px solid #76908b;border-radius:5px;max-height:220px;overflow:auto;width:240px;box-shadow:0 10px 20px #0008}.bid-history li{padding:4px 0;overflow-wrap:anywhere}
.cup-stage .d6-face.is-lost{position:relative;opacity:.55;transform:translateY(7px)}.cup-stage .d6-face.is-lost::after{content:"";position:absolute;inset:-3px;border:2px dashed #edb3a0;border-radius:5px}
.cancel-draft:disabled,.quantity-control select:disabled{opacity:.45;cursor:default}
