/* One viewport-based table layout across desktop, tablet and phone browsers. */
:root{color-scheme:dark;--navy:#0b1737;--blue:#244e92;--sky:#8bdcff;--ink:#132750;--text:#f1f6ff;--muted:#b7cce9;--gold:#ffd17a;--line:#6fa6ed55}
*{box-sizing:border-box}html{height:100%;overflow:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}body{margin:0;height:var(--game-height,100dvh);width:var(--game-width,100%);min-height:0;overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr);font:16px system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--text);background:radial-gradient(ellipse at 50% -10%,#345aab,#162c60 45%,#0c1838)}
[hidden]{display:none!important}button,input,select{font:inherit;-webkit-appearance:none;appearance:none;border-radius:11px;border:1px solid transparent;max-width:100%;min-height:44px;padding:8px 12px;touch-action:manipulation}button{cursor:pointer;font-weight:800;color:#15264b;background:linear-gradient(#ffe5a9,#f4c566);border:1px solid #fff1c4;box-shadow:0 3px 0 #80613d,0 4px 8px #05102c44}button:disabled{opacity:.45;cursor:default;box-shadow:none}button:not(:disabled):active{translate:0 2px;box-shadow:0 1px 0 #80613d}input,select{background:#172f5b;color:var(--text);border-color:#8eb8ee88}select{padding-right:18px;background-image:linear-gradient(45deg,transparent 50%,#bce9ff 50%),linear-gradient(135deg,#bce9ff 50%,transparent 50%);background-size:4px 4px;background-repeat:no-repeat;background-position:calc(100% - 10px) 50%,calc(100% - 6px) 50%}input:focus-visible,select:focus-visible,button:focus-visible,a:focus-visible{outline:3px solid #b9eaff;outline-offset:2px}a{color:#c3eaff}header{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:56px;padding:6px max(12px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left));padding-top:max(6px,env(safe-area-inset-top));border-bottom:1px solid #89baf155;background:#0f2148ee;box-shadow:0 4px 12px #050d2444}.game-brand{display:flex;align-items:center;gap:12px;min-width:0}.game-brand h1{margin:0;font-size:24px;line-height:1;letter-spacing:.08em;color:#fff1cd;text-shadow:0 3px 0 #07152d}.game-brand>span{font-size:10px;letter-spacing:.08em;color:var(--muted);white-space:nowrap}.header-actions{display:flex;align-items:center;gap:8px}.header-actions a{display:flex;align-items:center;min-height:40px;font-size:13px}.header-actions button{font-size:13px;min-height:40px}#settings-open{min-width:40px}
main{margin:0 auto;width:100%;max-width:1440px;height:100%;min-height:0;padding:8px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:44px minmax(0,1fr) 32px 76px 44px 32px;gap:6px;overflow:hidden}.bar{display:flex;align-items:center;gap:8px;margin:0;min-width:0}.game-toolbar{grid-row:1;flex-wrap:nowrap}.game-toolbar label{display:flex;align-items:center;gap:6px;font-size:12px;white-space:nowrap}.game-toolbar select{font-size:13px;min-height:40px}.game-toolbar button{min-height:40px;font-size:13px}.game-toolbar #clock{display:inline-grid;place-items:center;min-width:40px;height:40px;border:2px solid #89c7f088;border-radius:50%;background:#12305a;font-size:13px;font-weight:800;font-variant-numeric:tabular-nums;color:#d7f5ff}.game-toolbar #sound{min-width:40px}#next{background:linear-gradient(#bbf0ff,#7bc8f5);border-color:#c4efff;box-shadow:0 3px 0 #295b8e;color:#102c52}
.table{position:relative;grid-row:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:78px minmax(0,1fr);gap:8px;height:100%;min-height:0;padding:8px;border:5px solid #28465e;border-radius:22px;background:linear-gradient(135deg,#28485f,#183447 55%,#304d60);box-shadow:inset 0 0 0 1px #b2c6ce55,inset 0 2px 2px #ecf5ff20,inset 0 -5px 10px #06152666,0 4px 0 #071937,0 9px 18px #06112d44;overflow:hidden;isolation:isolate}.table:before{content:none}.table:after{content:'';position:absolute;inset:0;box-shadow:inset 0 2px 0 #d7efff55;border-radius:16px;pointer-events:none;z-index:0}.board{grid-column:1/-1;grid-row:2;position:relative;width:100%;height:100%;min-width:0;min-height:0;padding:5px;border:1px solid #789dba40;border-radius:14px;background:radial-gradient(ellipse at 50% 35%,#ffffff06,transparent 65%),repeating-linear-gradient(0deg,#ffffff02 0 1px,transparent 1px 4px),repeating-linear-gradient(90deg,#00000003 0 1px,transparent 1px 4px),#214e73;box-shadow:inset 0 0 0 5px #0b233519,inset 0 0 40px #061c334d;overflow:hidden;z-index:3}.domino-layout{display:block;width:100%;height:100%;min-height:0;overflow:hidden}.bone-art{transform-box:fill-box;transform-origin:center}.first-spinner .bone-art>rect{stroke:#4174b6;stroke-width:1.8}.opening-message{position:absolute;inset:43% 8% auto;text-align:center;font-size:clamp(11px,2vw,17px);color:#d9ebff}
.seat,.seat.active,.seat.active.top,.seat.active.bottom{position:relative;grid-row:1;inset:auto;transform:none;display:grid;grid-template-columns:54px minmax(0,1fr);grid-template-rows:repeat(3,minmax(0,1fr));align-items:center;column-gap:6px;width:100%;max-width:280px;height:100%;min-width:0;min-height:0;justify-self:center;padding:6px 8px;background:linear-gradient(150deg,#2d5189,#1b3768);border:2px solid #91bce94d;border-radius:15px;box-shadow:0 3px 0 #0b2450;color:var(--text);z-index:2;overflow:hidden;text-align:left}.seat.left{grid-column:1}.seat.top{grid-column:2}.seat.right{grid-column:3}.seat.bottom{grid-column:4}.seat.active{border-color:#ffda87;background:linear-gradient(145deg,#3d65a0,#294b80);box-shadow:0 0 0 1px #17366d,0 3px 0 #0b2450}.seat .face{grid-column:1;grid-row:1/4;display:flex;align-items:center;justify-content:center;height:54px;min-width:0}.seat b,.seat div:not(.face),.seat small{grid-column:2;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.seat b{grid-row:1;font-size:13px;line-height:16px}.seat div:not(.face){grid-row:2;font-size:11px;line-height:14px}.seat small{grid-row:3;font-size:9px;line-height:12px;color:#c3d9f6}.seat[data-computer="false"] b:before{content:'● ';color:#9ce3ff;font-size:8px}.mascot{position:relative;display:block;flex:none;width:52px;height:52px;transform-origin:50% 85%;filter:drop-shadow(0 3px 1px #0b204b88);animation:toon-idle 3.2s ease-in-out infinite;animation-delay:var(--seat-delay,0s)}.mascot:before{content:'';position:absolute;inset:10% 6% 4%;border-radius:42%;background:radial-gradient(ellipse,#99d9ff30,transparent 70%);z-index:-1}.mascot svg{width:100%;height:100%;display:block}.portrait-mascot{border-radius:50%;background-size:300% 200%;background-position:0 var(--row);background-repeat:no-repeat}.seat.active .mascot{animation:toon-ready 1.8s ease-in-out infinite}.seat.react .mascot{animation:toon-play .8s ease-in-out}.seat.celebrate .mascot{animation:toon-cheer .6s ease-in-out 2}.seat.active .portrait-mascot{background-position:50% var(--row)}.seat.celebrate .portrait-mascot{background-position:100% var(--row)}.table-quip{position:absolute;right:3px;top:1px;max-width:calc(100% - 6px);font-size:9px;line-height:12px;font-weight:900;padding:1px 5px;border-radius:8px;background:#e8f5ff;color:#183768;border:1px solid #a7cdff;opacity:0;pointer-events:none;z-index:3}.seat.react .table-quip,.seat.celebrate .table-quip{animation:comic-bubble 1.4s ease-in-out}
.notice{grid-row:3;min-height:0;padding:1px 4px;margin:0;display:flex;align-items:center;justify-content:center;text-align:center;font-size:12px;line-height:15px;font-weight:700;color:#e2edff;overflow:hidden}.hand{grid-row:4;display:flex;align-items:center;justify-content:center;gap:6px;height:100%;min-height:0;padding:4px 6px;border:1px solid #89b5e877;border-radius:14px;background:linear-gradient(#274777,#182f59);box-shadow:inset 0 2px 0 #9bc2f02b;overflow:hidden}.hand .tile{display:block;flex:none;width:46px!important;max-width:calc(100% / 7);min-width:0!important;height:66px!important;min-height:44px!important;margin:0!important;padding:3px!important;border:0!important;border-radius:7px;background:transparent!important;box-shadow:none;outline:2px solid transparent;outline-offset:-1px}.hand .tile svg{display:block;width:100%;height:100%;pointer-events:none}.hand .tile:disabled{opacity:.64}.hand .tile:not(:disabled){outline-color:#98d6ff;filter:drop-shadow(0 0 3px #addfff44)}.hand .tile.selected{outline:3px solid #ffe0a1;background:#5c83b333!important}.hand .tile:not(:disabled):active{translate:0 0;scale:.96}.game-choices{grid-row:5;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;gap:5px;min-height:0}.game-choices button{font-size:12px;padding:4px;min-height:40px;max-height:100%;background:linear-gradient(#ccedff,#95c9f5);border-color:#d7f3ff;box-shadow:0 2px 0 #274c79;color:#153566}.game-footer{grid-row:6;min-height:0;gap:8px;flex-wrap:nowrap}.game-footer button{min-height:30px;height:30px;padding:2px 12px;font-size:12px;box-shadow:none;background:#2c4d80;border-color:#7aa4d077;color:#deedff}.game-footer #stock{font-size:11px;line-height:13px;color:var(--muted)}.waiting-board{position:absolute;inset:5% 6%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:7px}.waiting-board h2,.waiting-board p{margin:0;font-size:clamp(12px,2vw,20px)}.waiting-icon{font-size:44px;color:#c5e6ff}.waiting-board button{font-size:13px;min-height:40px}
/* Settings scroll independently, while the game itself stays on one screen. */
#settings-dialog{width:min(780px,calc(100% - 20px));max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overflow-y:auto;padding:18px;border:2px solid #a3cef1;border-radius:20px;background:linear-gradient(145deg,#223f72,#15294e);color:var(--text);box-shadow:0 16px 60px #030b2266}#settings-dialog::backdrop{background:#05122bd6}.settings-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.settings-heading h2{font-size:23px;line-height:1.2;margin:3px 0 0}.eyebrow{display:block;font-size:10px;letter-spacing:.1em;color:#a4ddff;font-weight:900}.panel{padding:14px;border:1px solid #9ac5f044;border-radius:15px;background:#16315b99}.profile-panel,.friends-panel{margin-top:14px}.panel h3{margin:0 0 10px;font-size:17px}.panel p{font-size:13px;line-height:1.5;color:var(--muted)}.panel label{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px}.panel input{width:100%;max-width:210px;font-size:16px}.avatar-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap;margin:12px 0 8px}.avatar-heading strong{font-size:13px}.avatar-heading span{font-size:10px;color:var(--muted)}#avatars{display:grid;grid-template-columns:repeat(auto-fit,minmax(66px,1fr));gap:8px;margin-bottom:14px}#avatars button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;min-width:0;width:100%;height:82px;padding:3px;background:linear-gradient(#31568e,#214071);color:var(--text);border:1px solid #87b6eb66;box-shadow:0 2px 0 #0b244c}#avatars button[aria-pressed="true"]{outline:2px solid #ffdf96;outline-offset:0;background:#3e65a0}#avatars .mascot{width:48px;height:48px;animation:none}#avatars small{font-size:10px}.join-row{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-top:14px}.join-row label{flex-direction:column;align-items:start;gap:5px}#room-code{text-transform:uppercase;letter-spacing:.1em;max-width:200px}.room-code{display:flex;align-items:center;gap:12px;margin:14px 0}.room-code small{font-size:10px;letter-spacing:.1em;color:var(--muted)}.room-code strong{font-size:24px;letter-spacing:.1em}.invite-actions{display:flex;gap:8px;flex-wrap:wrap}.quiet-button{background:#284a7c;color:#edf6ff;border-color:#8bb6e766;box-shadow:none}#invite-link{width:100%;margin-top:12px;font-size:12px;background:#132b52;border-color:#82b6e766}#connection{font-size:12px;color:#a8dbff}#dialog-error{font-size:13px;color:#ffe2a0;line-height:1.5;margin-top:10px}#saved-tables{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.fine{font-size:12px;line-height:1.5;color:var(--muted)}details{margin-top:14px}summary{font-weight:800;cursor:pointer}#game-toast{position:fixed;left:50%;bottom:max(6px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:1600;max-width:92%;padding:8px 14px;border:1px solid #a6d9ff;border-radius:12px;background:#102c55;color:var(--text);font-size:12px;box-shadow:0 4px 18px #0005}
/* Original cartoon gloves, mixing, gathering, and dealing face-down bones. */
.wash-stage{position:absolute;inset:0;overflow:hidden}.wash-bones{position:absolute;inset:0 0 35px}.wash-bone{position:absolute;display:block;left:var(--x);top:var(--y);width:16px;height:30px;border-radius:4px;border:1px solid #283b60;background:linear-gradient(140deg,#fffae3,#e3d9b9);box-shadow:0 2px 0 #09214b66;animation:toon-wash 3.2s ease-in-out both}.wash-bone:after{content:'';position:absolute;inset:4px;border:1px solid #7d91ad66;border-radius:2px}.washing-hand{position:absolute;left:14%;top:24%;width:clamp(40px,8vw,78px);height:auto;filter:drop-shadow(0 4px 0 #09214b44);animation:glove-sweep 2.2s ease-in-out both}.washing-hand svg{display:block;width:100%;height:auto}.wash-right{left:auto;right:14%;top:35%;scale:-1 1;animation-delay:.1s}.wash-caption{position:absolute;bottom:4px;left:0;right:0;text-align:center;display:grid;gap:2px}.wash-caption strong{font-size:clamp(10px,1.8vw,18px);font-weight:1000;letter-spacing:.1em;color:#e6f5ff;text-shadow:0 2px 0 #0c2852}.wash-caption span{font-size:10px;color:#b5d5f4}.victory-ribbon{position:fixed;left:50%;top:8%;translate:-50% 0;z-index:1500;pointer-events:none;padding:10px 28px;white-space:nowrap;border:3px solid #20365e;border-radius:16px;background:linear-gradient(#fff3b8,#ffc86c);color:#153364;font-size:clamp(20px,5vw,34px);font-weight:1000;letter-spacing:.04em;box-shadow:0 5px 0 #10264b77;animation:comic-win 1.8s ease-in-out both}.cutthroat-confetti{position:fixed;left:var(--left);top:12%;z-index:1450;pointer-events:none;width:8px;height:8px;border-radius:2px;animation:star-fall 1.6s ease-out both}.bone-pop{animation:toon-bone .6s cubic-bezier(.2,.8,.3,1) both}
@keyframes toon-idle{0%,100%{transform:translateY(0) rotate(-2deg) scale(1,1)}40%{transform:translateY(-2px) rotate(2deg) scale(.99,1.03)}65%{transform:translateY(0) rotate(0) scale(1.02,.98)}}@keyframes toon-ready{0%,100%{transform:rotate(-3deg)}45%{transform:translateY(-2px) rotate(3deg) scale(1.04,.98)}}@keyframes toon-play{0%,100%{transform:none}20%{transform:rotate(-9deg) scale(.94,1.05)}50%{transform:rotate(8deg) scale(1.06,.9)}75%{transform:rotate(-3deg) scale(.99,1.02)}}@keyframes toon-cheer{0%,100%{transform:none}35%{transform:translateY(-4px) rotate(7deg) scale(.97,1.05)}65%{transform:rotate(-5deg) scale(1.04,.94)}}@keyframes comic-bubble{10%,75%{opacity:1;transform:scale(1)}0%,100%{opacity:0;transform:scale(.8)}}@keyframes toon-bone{0%{transform:scale(.5,.7);opacity:.4}35%{transform:scale(1,.88);opacity:1}65%{transform:scale(.94,1)}100%{transform:scale(1)}}@keyframes toon-wash{0%{transform:translate(-50%,-50%) rotate(var(--r))}23%{transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) rotate(calc(var(--r) + 95deg))}47%{left:var(--x);top:var(--y);transform:translate(calc(-50% - var(--dx)),calc(-50% - var(--dy))) rotate(calc(var(--r) - 75deg))}68%{left:50%;top:45%;transform:translate(-50%,-50%) rotate(calc(var(--r) + 20deg));opacity:1}90%,100%{left:var(--deal-x);top:var(--deal-y);transform:translate(-50%,-50%) rotate(0);opacity:0}}@keyframes glove-sweep{0%{translate:0 0;rotate:-12deg}25%{translate:28px 12px;rotate:8deg}50%{translate:5px -6px;rotate:-9deg}75%{translate:34px 16px;rotate:8deg}100%{translate:-4px 0;rotate:-8deg;opacity:0}}@keyframes comic-win{0%,100%{scale:.75;opacity:0;rotate:-5deg}15%,75%{scale:1;opacity:1;rotate:0deg}}@keyframes star-fall{to{transform:translateY(var(--fall)) rotate(var(--spin));opacity:0}}
/* Phones retain the same four-player rail; no avatar sits over the board. */
@media(max-width:700px){header{min-height:46px;padding:3px max(7px,env(safe-area-inset-right)) 3px max(7px,env(safe-area-inset-left));padding-top:max(3px,env(safe-area-inset-top))}.game-brand h1{font-size:18px}.game-brand>span{display:none}.header-actions{gap:5px}.header-actions a{font-size:11px;min-height:36px}.header-actions button{min-height:36px;font-size:12px;padding:5px 8px}#settings-open{min-width:34px}main{grid-template-rows:40px minmax(0,1fr) 28px 62px 40px 30px;gap:4px;padding:5px max(5px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left))}.game-toolbar{gap:5px;justify-content:space-between}.game-toolbar button,.game-toolbar select{font-size:12px;min-height:38px;padding:5px 7px}.game-toolbar label{font-size:11px;gap:3px}.game-toolbar #clock{height:36px;min-width:36px;font-size:12px}.game-toolbar #sound{min-width:34px}.table{grid-template-rows:74px minmax(0,1fr);padding:5px;gap:6px;border-width:4px;border-radius:15px}.seat,.seat.active,.seat.active.top,.seat.active.bottom{display:flex;flex-direction:column;justify-content:center;gap:0;padding:3px 2px;text-align:center;border-width:1px;border-radius:10px;max-width:none}.seat .face{height:34px;min-height:34px;flex:none}.mascot{width:34px;height:34px}.seat b{font-size:10px;line-height:12px;width:100%}.seat div:not(.face){font-size:9px;line-height:11px;width:100%}.seat small{font-size:7px;line-height:10px;width:100%}.board{padding:3px;border-radius:10px}.notice{font-size:11px;line-height:13px}.hand{padding:2px;gap:0;border-radius:10px;justify-content:space-evenly}.hand .tile{width:calc(100% / 7)!important;max-width:46px;height:56px!important;min-height:44px!important;padding:2px!important}.game-choices{gap:4px}.game-choices button{font-size:11px;min-height:36px;padding:3px}.game-footer{gap:6px}.game-footer #stock{font-size:10px;line-height:12px}.game-footer button{padding:2px 10px}.table-quip{font-size:8px;line-height:10px}#settings-dialog{padding:12px;border-radius:16px}.panel{padding:12px}.settings-heading h2{font-size:20px}.wash-bone{width:13px;height:24px}.wash-bones{bottom:30px}.wash-caption strong{font-size:10px}.wash-caption span{font-size:9px}.waiting-icon{font-size:30px}}
@media(max-width:380px){.game-toolbar label{font-size:0}.game-toolbar{gap:3px}.game-toolbar #clock{min-width:34px;width:34px;font-size:11px}.game-toolbar #next{padding-inline:4px}.seat small{font-size:6px}.game-brand h1{font-size:17px}}
@media(orientation:landscape) and (max-height:760px){header{min-height:36px;padding-block:2px}.game-brand h1{font-size:18px}.game-brand>span{display:none}.header-actions button,.header-actions a{min-height:32px}main{max-width:none;grid-template-columns:minmax(0,1fr) clamp(170px,26vw,230px);grid-template-rows:38px 26px minmax(0,1fr) 40px 30px;gap:4px;padding:4px max(4px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left))}.game-toolbar{grid-column:1/-1;grid-row:1;justify-content:start;gap:10px}.game-toolbar button,.game-toolbar select{min-height:34px;height:34px;font-size:12px;padding:4px 8px}.game-toolbar #clock{height:32px;min-width:32px}.table{grid-column:1;grid-row:2/-1;grid-template-rows:56px minmax(0,1fr);padding:4px;gap:4px;border-width:4px;border-radius:14px}.seat,.seat.active,.seat.active.top,.seat.active.bottom{display:grid;grid-template-columns:28px minmax(0,1fr);grid-template-rows:repeat(3,minmax(0,1fr));column-gap:2px;max-width:none;padding:3px 2px;text-align:left;border-width:1px;border-radius:8px}.seat .face{grid-column:1;grid-row:1/4;height:28px;min-height:28px}.mascot{width:28px;height:28px}.seat b{font-size:9px;line-height:11px}.seat div:not(.face){font-size:8px;line-height:10px}.seat small{font-size:6px;line-height:9px}.board{padding:3px}.notice{grid-column:2;grid-row:2;font-size:10px;line-height:12px}.hand{grid-column:2;grid-row:3;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:0;padding:1px;justify-items:center;align-items:center}.hand .tile{width:44px!important;max-width:100%;height:100%!important;max-height:58px;min-height:0!important;padding:2px!important}.game-choices{grid-column:2;grid-row:4}.game-choices button{font-size:10px;line-height:12px;min-height:36px}.game-footer{grid-column:2;grid-row:5;gap:4px}.game-footer #stock{font-size:9px;line-height:10px}.game-footer button{padding:2px 8px}.wash-bones{inset:0 0 26px}.wash-bone{width:11px;height:21px}.washing-hand{width:40px}.wash-caption strong{font-size:9px}.wash-caption span{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}.wash-bone{transform:translate(-50%,-50%) rotate(var(--r))}.cutthroat-confetti{display:none}}

.mascot-gesture{transform-origin:74px 76px}.seat.active .mascot-gesture{animation:mascot-wave 1.8s ease-in-out infinite}.seat.react .mascot-gesture{animation:mascot-wave .5s ease-in-out 2}@keyframes mascot-wave{0%,100%{transform:rotate(-7deg)}45%{transform:rotate(15deg)}}
@media(prefers-reduced-motion:reduce){.mascot-gesture{animation:none!important}}

.place-target{cursor:pointer;touch-action:manipulation}.place-target circle{fill:#163f75;stroke:#7af2ff;stroke-width:2;stroke-dasharray:5 3}.place-target text{fill:white;font:bold 25px sans-serif;pointer-events:none}.place-target:hover circle,.place-target:focus circle{fill:#286797;stroke:white;stroke-width:3}.place-target:focus{outline:none}.opening-place{min-height:48px;padding:12px 20px;background:#164c80;color:white;border:2px dashed #7af2ff;border-radius:14px;touch-action:manipulation}

.hand-result{background:#112e55;color:#f6f8ff;padding:18px;border:1px solid #5884b0;border-radius:18px;margin:12px auto;max-width:900px}.hand-result[hidden]{display:none}.hand-result h2{font-size:1.2rem;margin:0 0 10px}.revealed-player{padding:12px 0;border-top:1px solid #46638a}.revealed-bones{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.revealed-bone{display:block;width:32px;animation:reveal-bone .45s ease-out}.revealed-bone svg{display:block;width:100%}@keyframes reveal-bone{from{transform:rotateY(90deg);opacity:0}to{transform:rotateY(0);opacity:1}}@media(prefers-reduced-motion:reduce){.revealed-bone{animation:none}}

.knock-impact{position:fixed;z-index:150;left:50%;top:42%;transform:translate(-50%,-50%);display:flex;align-items:center;flex-direction:column;gap:5px;padding:16px 26px;max-width:calc(100vw - 32px);width:max-content;box-sizing:border-box;background:#16375fef;border:3px solid #ffcb66;border-radius:26px;color:white;text-align:center;pointer-events:none;box-shadow:0 0 0 8px #ffcb6630,0 18px 65px #0008;animation:knock-boom .5s ease-out}.knock-impact strong{font-size:clamp(30px,6vw,52px);font-weight:950;color:#ffce70;text-shadow:3px 3px #7a401e}.knock-impact>span:last-child{font-size:clamp(14px,3vw,18px);overflow-wrap:anywhere;max-width:100%}.knock-fist{font-size:54px;line-height:1.2;animation:fist-tap .38s ease-in-out 2}.seat.knocking{box-shadow:0 0 0 4px #ffc861,0 0 30px #ffc861aa!important;animation:knock-seat .3s ease-in-out 2}.knock-locked{border-color:#ff937d}@keyframes knock-boom{0%{transform:translate(-50%,-50%) scale(.55);opacity:0}45%{transform:translate(-50%,-50%) scale(1.09);opacity:1}75%{transform:translate(-50%,-50%) scale(.97)}100%{transform:translate(-50%,-50%) scale(1)}}@keyframes fist-tap{0%,100%{transform:translateY(-8px) rotate(-12deg)}55%{transform:translateY(7px) rotate(6deg)}}@keyframes knock-seat{30%{transform:translateX(-3px)}70%{transform:translateX(3px)}}@media(prefers-reduced-motion:reduce){.knock-impact,.knock-fist,.seat.knocking{animation:none}}

.wash-stage{animation:wash-reveal .01s steps(1) var(--wash-delay,0ms) both}.wash-bone,.wash-left{animation-delay:var(--wash-delay,0ms)}.wash-right{animation-delay:calc(var(--wash-delay,0ms) + .1s)}@keyframes wash-reveal{from{visibility:hidden}to{visibility:visible}}.dishes-pop{border-color:#9cdeef;padding:18px 28px;gap:8px}.dishes-pop strong{font-size:clamp(23px,5vw,40px);color:#f9dd9d}.dishes-avatar{display:flex;justify-content:center;align-items:center;width:78px;height:78px}.dishes-avatar .mascot{width:76px;height:76px;animation:toon-cheer .6s ease-in-out 2}.dishes-winner{outline:3px solid #b7e8f6;outline-offset:2px}@media(prefers-reduced-motion:reduce){.wash-stage{animation:wash-reveal .01s steps(1) var(--wash-delay,0ms) both!important}.dishes-avatar .mascot{animation:none}}

/* Keep every hand readable, including bones that cannot currently be played. */
.hand .tile:disabled{opacity:1}.hand .tile:not(:disabled){outline-color:#b9ecff;filter:drop-shadow(0 0 4px #c7f1ff80)}.game-toolbar #music{font-size:12px;white-space:nowrap;min-width:52px;padding-inline:7px;background:linear-gradient(#c9e8ef,#91c7da);color:#133550;border-color:#d5f3ff}.game-toolbar #music[aria-pressed="false"]{background:#1a3558;color:#c0d3e5;border-color:#6582a1;box-shadow:none}@media(max-width:380px){.game-toolbar{gap:3px}.game-toolbar #music{min-width:44px;font-size:11px;padding-inline:4px}.game-toolbar label{gap:2px}.game-toolbar #sound{min-width:30px;padding-inline:4px}.game-toolbar button{padding-inline:5px}}

/* Follow the visible viewport through rotation and Safari/Chrome browser bars. */
html{overscroll-behavior:none}body{position:relative}main{min-width:0}.game-toolbar{overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-x:contain;padding-bottom:2px}.game-toolbar::-webkit-scrollbar{display:none}.game-toolbar>*{flex-shrink:0}.table,.board,.hand{min-width:0}.table-reflow .board{animation:table-settle .24s ease-out}@keyframes table-settle{from{opacity:.82}to{opacity:1}}
@media(pointer:coarse){main{max-width:none}}
@media(orientation:landscape) and (max-height:760px){.game-footer{flex-wrap:wrap;align-content:center}.game-footer #stock{flex:1;min-width:0}.game-toolbar{padding-bottom:2px}.table{grid-template-rows:clamp(42px,14vh,56px) minmax(0,1fr)}.hand{grid-template-rows:repeat(2,minmax(0,1fr));overflow:hidden}.hand .tile{width:min(44px,100%)!important;min-height:0!important}.notice{overflow:auto}.hand-result{max-height:calc(var(--game-height,100dvh) - 72px)}}
@media(orientation:landscape) and (max-height:350px){header{min-height:30px}.header-actions a,.header-actions button{min-height:28px}.game-brand h1{font-size:16px}main{grid-template-rows:34px 24px minmax(0,1fr) 36px 28px}.game-toolbar button,.game-toolbar select{min-height:30px;height:30px}.game-toolbar #clock{height:28px;min-width:28px}.seat small{display:none}.seat,.seat.active,.seat.active.top,.seat.active.bottom{grid-template-rows:repeat(2,minmax(0,1fr))}.seat .face{grid-row:1/3}.game-choices button{min-height:32px}.game-footer button{height:26px;min-height:26px}}
.hand-result{position:fixed;z-index:100;left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));top:112px;max-height:calc(var(--game-height,100dvh) - 128px);overflow:auto;overscroll-behavior:contain;box-shadow:0 18px 70px #0009;border-color:#8bb5d9}
@media(prefers-reduced-motion:reduce){.table-reflow .board{animation:none}}

/* A distinct playing surface and an unmistakable, text-labelled active seat. */
.board{border:2px solid #7db0cf99;box-shadow:inset 0 0 0 3px #091c3344,inset 0 0 40px #061c333d,0 0 0 1px #091c3355;background-color:#285b7e}.hand{border:2px solid #91bed7b3;background:linear-gradient(155deg,#365c89,#203d65);box-shadow:inset 0 2px 0 #d7edff30,0 3px 10px #06152c66}.hand.your-turn{border-color:#ffe2a0;background:linear-gradient(145deg,#466c99,#2e527f);box-shadow:inset 0 0 0 1px #ffe9b566,0 0 16px #ffd17755}.board.your-turn{border-color:#b4ddef;box-shadow:inset 0 0 0 3px #091c3333,inset 0 0 35px #9fddff0d,0 0 10px #b4ddef26}.seat.active,.seat.active.top,.seat.active.bottom{border-color:#ffe2a0;background:linear-gradient(145deg,#5c76a2,#365b89);box-shadow:inset 0 0 0 1px #fff0bd77,0 0 0 2px #ffe2a044,0 0 20px #ffd17a77;isolation:isolate}.seat.active .face{filter:drop-shadow(0 0 5px #ffe2a099)}.turn-badge{position:absolute;right:5px;top:4px;z-index:5;padding:2px 5px;border-radius:5px;background:#ffe2a0;color:#142949;font-size:8px;line-height:10px;font-weight:950;letter-spacing:.04em;white-space:nowrap}.seat.active b{padding-right:64px}.seat.active .table-quip{display:none}.game-toolbar #clock.your-turn{background:#ffe2a0;border-color:#fff2cd;color:#132c4c;box-shadow:0 0 12px #ffd17a77}.hand.your-turn .tile:not(:disabled){outline-color:#ffe9b3}.hand.your-turn .tile.selected{outline-color:#fff7de;filter:drop-shadow(0 0 6px #ffe9b388)}
@media(max-width:700px){.turn-badge{top:1px;right:1px;padding:1px 3px;font-size:6px;line-height:8px}.seat.active b{padding-right:0}.seat.active .face{margin-top:5px}}
@media(orientation:landscape) and (max-height:760px){.turn-badge{top:1px;right:1px;font-size:6px;line-height:8px;padding:1px 3px}.seat.active b{padding-right:0}.seat.active .face{margin-top:0}.seat.active b{align-self:end}.seat.active .turn-badge{max-width:calc(100% - 4px)}}

/* Scoring feedback uses actual credited points; the hand never intercepts play. */
.score-slap{position:fixed;z-index:155;pointer-events:none;width:170px;transform:translate(-50%,-50%);text-align:center;isolation:isolate}.score-number{position:absolute;left:50%;bottom:34px;transform:translateX(-50%);font-size:clamp(30px,6vw,54px);line-height:1.1;font-weight:1000;white-space:nowrap;color:#ffe4a0;-webkit-text-stroke:1px #473216;text-shadow:0 3px 0 #5f3b17,0 0 18px #ffd17a80;animation:score-rise 2.1s ease-out both}.score-caption{position:absolute;left:50%;top:-25px;transform:translateX(-50%);min-width:150px;max-width:200px;padding:4px 8px;border:1px solid #ffe2a0;border-radius:8px;background:#102d51f5;color:#fff3cf;font-size:10px;line-height:14px;font-weight:850;animation:score-caption 2.1s ease-out both}.slap-hand{position:absolute;width:78px;left:50%;top:50%;transform-origin:50% 80%;filter:drop-shadow(0 5px 2px #071a4066);animation:slap-down .75s cubic-bezier(.3,.8,.3,1) both;z-index:-1}.slap-hand svg{display:block;width:100%}.slap-ring{position:absolute;left:50%;top:50%;width:55px;height:30px;border:4px solid #ffe2a0;border-radius:50%;animation:slap-impact .6s .15s ease-out both;z-index:-2}.scoring-bone{animation:bone-slam .6s ease-out both}@keyframes slap-down{0%{transform:translate(30px,-140px) rotate(25deg);opacity:0}20%{opacity:1}38%{transform:translate(-50%,-70%) rotate(-20deg)}52%{transform:translate(-50%,-45%) rotate(-14deg)}72%{transform:translate(-40%,-80%) rotate(-5deg);opacity:1}100%{transform:translate(35px,-150px) rotate(20deg);opacity:0}}@keyframes slap-impact{from{transform:translate(-50%,-50%) scale(.2);opacity:1}to{transform:translate(-50%,-50%) scale(2.8);opacity:0}}@keyframes bone-slam{0%{transform:scale(1.3) translateY(-15px)}35%{transform:scale(1.08,.88)}60%{transform:scale(.98,1.04)}100%{transform:none}}@keyframes score-rise{0%{opacity:0;translate:0 12px;scale:.65}18%,70%{opacity:1;translate:0 -8px;scale:1}100%{opacity:0;translate:0 -36px;scale:1}}@keyframes score-caption{0%,10%{opacity:0}20%,80%{opacity:1}100%{opacity:0}}.score-still .score-number,.score-still .score-caption{animation:none}@media(prefers-reduced-motion:reduce){.score-number,.score-caption,.scoring-bone{animation:none!important}}

.score-number.score-entry{font-size:clamp(18px,4vw,26px);-webkit-text-stroke:.4px #473216}

header a.game-brand{color:inherit;text-decoration:none;touch-action:manipulation}header a.game-brand:focus-visible{outline:3px solid #edc979;outline-offset:4px}

/* Readable bones on phones; the playing surface pans, the page stays put. */
.board{overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom;scrollbar-width:thin;scrollbar-color:#8cb5d9 #163853;}
.board-canvas{display:grid;place-items:center;min-width:100%;min-height:100%;}
.board .domino-layout{display:block;max-width:none;flex:none;overflow:visible;}
.game-footer #stock{flex:1;min-width:0;}
.game-footer #board-fit{flex:none;min-height:36px;height:36px;padding:3px 10px;border-color:#a1d4f2;color:#f4f9ff;}
main{grid-template-rows:44px minmax(0,1fr) 36px 112px 44px 40px;}
.hand{gap:8px;overflow:visible;padding:5px;}
.hand .tile{width:60px!important;max-width:calc((100% - 48px)/7);height:100px!important;min-height:44px!important;padding:1px!important;}
@media(max-width:700px) and (orientation:portrait){
 main{grid-template-rows:40px minmax(0,1fr) 38px 108px 44px 40px;gap:4px;}
 .table{grid-template-rows:64px minmax(0,1fr);padding:3px;gap:4px;border-width:3px;}
 .seat .face{height:28px;min-height:28px;}.mascot{width:28px;height:28px;}
 .hand{gap:3px;padding:3px;justify-content:space-evenly;overflow:hidden;}
 .hand .tile{width:calc((100% - 18px)/7)!important;max-width:62px;height:98px!important;padding:0!important;}
 .notice{font-size:12px;line-height:16px;}
 .game-choices button{min-height:44px;font-size:12px;}
 .game-footer #stock{font-size:9px;line-height:12px;}
 .game-footer button{min-height:36px;height:36px;}
}
@media(min-width:701px) and (orientation:portrait){
 main{grid-template-rows:44px minmax(0,1fr) 38px 136px 48px 40px;}
 .hand .tile{width:72px!important;height:124px!important;max-width:calc((100% - 48px)/7);}
}
@media(orientation:landscape) and (max-height:760px){
 main{grid-template-columns:minmax(0,1fr) clamp(220px,32vw,320px);grid-template-rows:38px 34px minmax(0,1fr) 44px 40px;}
 .hand{gap:3px;padding:3px;overflow:hidden;}
 .hand .tile{width:100%!important;max-width:60px;height:100%!important;max-height:110px;min-height:44px!important;padding:0!important;}
 .game-footer{flex-wrap:nowrap;}.game-footer #stock{font-size:9px;line-height:11px;}
 .game-footer button{min-height:36px;height:36px;padding-inline:6px;font-size:11px;}
 .game-choices button{min-height:44px;font-size:11px;}
}
@media(orientation:landscape) and (max-height:350px){
 main{grid-template-rows:34px 26px minmax(0,1fr) 36px 36px;grid-template-columns:minmax(0,1fr) 220px;}
 .hand .tile{min-height:36px!important;}.game-choices button{min-height:36px;}
}
@media(orientation:portrait) and (max-height:650px){
 main{grid-template-rows:38px minmax(0,1fr) 32px 90px 44px 38px;}
 .hand .tile{height:82px!important;}.table{grid-template-rows:54px minmax(0,1fr);}
 .seat small{display:none;}
}

/* The Cutthroat crew: bold, original portraits with room for faces on mobile. */
.crew-mascot{width:64px;height:64px;filter:drop-shadow(0 3px 2px #07132880);}
.crew-mascot:before{content:none;}.crew-mascot svg{overflow:visible;}
.seat .face:has(.crew-mascot){height:64px;}
.seat,.seat.active,.seat.active.top,.seat.active.bottom{grid-template-columns:64px minmax(0,1fr);}
#avatars{grid-template-columns:repeat(auto-fit,minmax(86px,1fr));gap:10px;}
#avatars button{height:114px;border-radius:12px;background:linear-gradient(155deg,#34475e,#172b45);}
#avatars .crew-mascot{width:78px;height:78px;animation:none;}
#avatars small{font-size:12px;line-height:18px;font-weight:800;}
@media(max-width:700px) and (orientation:portrait){
 .table{grid-template-rows:82px minmax(0,1fr);}
 .seat .face:has(.crew-mascot){height:44px;min-height:44px;}
 .crew-mascot{width:44px;height:44px;}
 .seat b{font-size:10px;line-height:13px;}.seat small{font-size:7px;}
 .seat.active .face{margin-top:4px;}
}
@media(orientation:landscape) and (max-height:760px){
 .seat,.seat.active,.seat.active.top,.seat.active.bottom{grid-template-columns:36px minmax(0,1fr);}
 .seat .face:has(.crew-mascot){height:36px;min-height:36px;}.crew-mascot{width:36px;height:36px;}
}
@media(orientation:portrait) and (max-height:650px){
 .table{grid-template-rows:66px minmax(0,1fr);}
 .seat .face:has(.crew-mascot){height:38px;min-height:38px;}.crew-mascot{width:38px;height:38px;}
}

/* Midnight club: dimensional portraits, dark felt, brass details, quiet neon. */
:root{--text:#f3efe7;--muted:#aab9c9;--gold:#dfb475;--line:#b7cbd332;}
body{background:radial-gradient(ellipse at 18% 0,#233e5199,transparent 55%),radial-gradient(ellipse at 90% 65%,#44312c55,transparent 55%),repeating-linear-gradient(90deg,#ffffff02 0 1px,transparent 1px 80px),linear-gradient(140deg,#070e18,#152538 60%,#090f19);}
body:before{content:'';position:fixed;inset:0;pointer-events:none;z-index:-1;background:linear-gradient(115deg,transparent 20%,#70d3ee08 40%,transparent 56%);}
header{background:linear-gradient(100deg,#0a1522ed,#182737ed);border-bottom:1px solid #bca07955;box-shadow:0 8px 30px #0005;}
.game-brand h1{font-weight:950;color:#ead1a5;letter-spacing:.12em;text-shadow:0 2px 2px #000;}
button{background:linear-gradient(#f0d4a2,#cba16a);border-color:#e2bf88;box-shadow:0 3px 0 #715135,0 4px 12px #0004;color:#18212a;}
.table{background:linear-gradient(150deg,#4b4540,#242a30 40%,#51483e);border-color:#303a44;border-radius:22px;box-shadow:inset 0 0 0 1px #bfa37580,inset 0 3px 5px #e3cdab30,0 8px 25px #0007;grid-template-rows:106px minmax(0,1fr);}
.table-mark{position:absolute;right:25px;bottom:18px;z-index:0;color:#b6bfbe30;font-size:26px;font-weight:950;letter-spacing:.22em;pointer-events:none;}.table-mark span{display:block;font-size:8px;text-align:right;letter-spacing:.32em;}
.board{background:radial-gradient(ellipse at 50% 30%,#69848a20,transparent 72%),repeating-linear-gradient(12deg,#ffffff03 0 1px,transparent 1px 3px),repeating-linear-gradient(102deg,#00000006 0 1px,transparent 1px 3px),#143f50;border:1px solid #8db5bd8a;box-shadow:inset 0 0 0 4px #07141c44,inset 0 0 55px #03101770;}
.board.your-turn{border-color:#bfcdca;box-shadow:inset 0 0 0 3px #091b2433,inset 0 0 45px #bbd8c408,0 0 10px #b4ddef20;}
.seat,.seat.active,.seat.active.top,.seat.active.bottom{background:linear-gradient(140deg,#233646,#102130);border-color:#688a9a66;border-radius:12px;grid-template-columns:90px minmax(0,1fr);box-shadow:0 4px 10px #0004;padding:5px;}
.seat.active,.seat.active.top,.seat.active.bottom{background:linear-gradient(140deg,#3e463f,#243442);border-color:#debd86;box-shadow:inset 0 0 0 1px #e6c89644,0 0 22px #e3b87033;}
.cinematic-portrait{display:block;width:90px;height:90px;flex:none;border-radius:9px;background-image:url('/domino/assets/cutthroat-crew-cinematic-v1.png');background-size:400% 200%;background-position:var(--crew-x) var(--crew-y);background-repeat:no-repeat;filter:none;transform-origin:50% 90%;animation:crew-breathe 5s ease-in-out infinite;overflow:hidden;box-shadow:inset 0 -12px 15px #0a172944;}
.seat .face:has(.cinematic-portrait){height:90px;min-height:90px;overflow:visible;}
.portrait-light{position:absolute;inset:0;border-radius:inherit;background:linear-gradient(125deg,#c9ebf305,transparent 50%,#d8ad7020);pointer-events:none;}
.seat.active .cinematic-portrait{animation:crew-focus 3s ease-in-out infinite;}
.seat.react .cinematic-portrait{animation:crew-nod .8s ease-in-out;}
.seat.celebrate .cinematic-portrait{animation:crew-win 1.2s ease-in-out 2;}
.seat.speaking{border-color:#7be4c2!important;box-shadow:0 0 0 2px #7be4c244,0 0 20px #6bdfb533!important;}
.hand{background:linear-gradient(155deg,#344353,#172a3d);border-color:#7a98a9;}.hand.your-turn{background:linear-gradient(145deg,#46515b,#25394d);border-color:#d5b988;box-shadow:inset 0 0 0 1px #ffe9b522,0 0 18px #d6ab6b22;}
.game-choices button{background:linear-gradient(#c5d4d7,#8ca9b6);border-color:#bacfd3;}.game-footer button{background:#20384a;border-color:#6d8a9b;color:#ecf2ef;}
#avatars{grid-template-columns:repeat(auto-fit,minmax(126px,1fr));gap:12px;}
#avatars button{height:164px;padding:5px;background:linear-gradient(150deg,#263b4a,#102130);border-color:#6b859755;}
#avatars .cinematic-portrait{width:124px;height:124px;animation:none;border-radius:7px;}
#avatars small{font-size:13px;letter-spacing:.03em;}
#settings-dialog,#voice-dialog{background:radial-gradient(ellipse at 0 0,#314653,#101f30);border-color:#7d96a6;color:var(--text);}
#voice-dialog{width:min(540px,calc(100% - 20px));max-height:calc(100dvh - 24px);overflow:auto;padding:22px;border-radius:20px;box-shadow:0 18px 90px #000a;}
#voice-dialog::backdrop{background:#030b17d9;backdrop-filter:blur(5px);}
#voice-status{padding:12px;border:1px solid #738c9b77;background:#0b1926;border-radius:10px;font-size:13px;color:#d5e4e4;}
.voice-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px;}.voice-controls button{min-height:44px;font-size:13px;}
.voice-guests{display:grid;gap:8px;margin:18px 0;}.voice-guest{display:flex;justify-content:space-between;gap:10px;padding:12px;background:#122938;border:1px solid #4d6b7c;border-radius:9px;font-size:13px;}.voice-guest span{color:#bacbd0;font-size:12px;}.voice-guest.speaking{border-color:#7be4c2;}.voice-open.audio-live{background:linear-gradient(#b5ecdc,#74bfa9);border-color:#b5eddd;}
@keyframes crew-breathe{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-1px) scale(1.025)}}
@keyframes crew-focus{0%,100%{transform:scale(1.025) rotate(-.5deg)}50%{transform:translateY(-2px) scale(1.05) rotate(.5deg)}}
@keyframes crew-nod{0%,100%{transform:translateY(0) rotate(0)}35%{transform:translateY(3px) rotate(2deg) scale(1.02)}70%{transform:translateY(-2px) rotate(-1deg)}}
@keyframes crew-win{0%,100%{transform:scale(1)}35%{transform:translateY(-4px) rotate(-3deg) scale(1.06)}70%{transform:translateY(-2px) rotate(2deg) scale(1.03)}}
@media(max-width:700px) and (orientation:portrait){
 .table{grid-template-rows:118px minmax(0,1fr);}.seat,.seat.active,.seat.active.top,.seat.active.bottom{padding:3px 2px;}
 .cinematic-portrait{width:76px;height:76px;}.seat .face:has(.cinematic-portrait){height:76px;min-height:76px;}
 .seat b{font-size:11px;line-height:14px;}.seat div:not(.face){font-size:9px;line-height:12px;}.seat small{font-size:6px;line-height:9px;}
 .game-brand h1{font-size:16px;letter-spacing:.05em;}.header-actions{gap:4px;}.header-actions button{font-size:11px;padding-inline:6px;}.header-actions a{font-size:10px;}
 .table-mark{font-size:18px;right:18px;bottom:14px;}
}
@media(orientation:landscape) and (max-height:760px){
 .table{grid-template-rows:76px minmax(0,1fr);}.seat,.seat.active,.seat.active.top,.seat.active.bottom{grid-template-columns:54px minmax(0,1fr);column-gap:3px;}
 .cinematic-portrait{width:54px;height:64px;background-size:400% 200%;}.seat .face:has(.cinematic-portrait){height:64px;min-height:64px;}
 .seat b{font-size:10px;}.seat small{font-size:6px;}.table-mark{font-size:18px;}
}
@media(orientation:portrait) and (max-height:650px){
 .table{grid-template-rows:96px minmax(0,1fr);}.cinematic-portrait{width:60px;height:60px;}.seat .face:has(.cinematic-portrait){height:60px;min-height:60px;}.seat small{display:none;}
}
@media(orientation:landscape) and (max-height:350px){.table{grid-template-rows:58px minmax(0,1fr);}.cinematic-portrait{width:42px;height:46px;}.seat .face:has(.cinematic-portrait){height:46px;min-height:46px;}.seat,.seat.active,.seat.active.top,.seat.active.bottom{grid-template-columns:42px minmax(0,1fr);}}
@media(max-width:360px){.cinematic-portrait{width:65px;height:76px;}.header-actions a{display:none;}}
@media(prefers-reduced-motion:reduce){.cinematic-portrait,.seat.active .cinematic-portrait,.seat.react .cinematic-portrait,.seat.celebrate .cinematic-portrait{animation:none!important;}}
/* Original lounge environment sits behind the interactive table, never over it. */
body{background:linear-gradient(180deg,#07101b70,#07121ec9 58%,#06101be8),url('/domino/assets/midnight-lounge-v1.png') center/cover no-repeat fixed;}
header{backdrop-filter:blur(12px);}
@media(max-width:700px){body{background-position:center top;}}
/* Keep names readable beside the larger portraits and the turn indicator. */
.seat.active b{padding-right:0;align-self:end;}
@media(min-width:701px) and (max-width:1100px) and (orientation:portrait){
 .table{grid-template-rows:134px minmax(0,1fr);}
 .seat,.seat.active,.seat.active.top,.seat.active.bottom{display:flex;flex-direction:column;justify-content:center;text-align:center;gap:0;}
 .seat .face:has(.cinematic-portrait){height:88px;min-height:88px;}.cinematic-portrait{width:88px;height:88px;}
 .seat b,.seat div:not(.face),.seat small{width:100%;}.seat b{font-size:12px;line-height:15px;}.seat div:not(.face){line-height:14px;}.seat small{font-size:8px;line-height:11px;}
 .turn-badge{top:2px;right:2px;font-size:7px;line-height:9px;}
}

/* Persistent match scores are separate from the last hand's leftover pips. */
.hand-result{background:linear-gradient(145deg,#1d3445,#0e2030);border-color:#a3a78b;}
.match-standings{margin-bottom:18px;}.match-winner{display:flex;align-items:center;gap:18px;padding:12px;border:1px solid #d9bb7a;border-radius:14px;background:radial-gradient(ellipse at 25% 0,#d4a35725,transparent),#182b39;}
.match-winner-portrait .cinematic-portrait{width:96px;height:96px;animation:none;}.match-winner h2{font-size:clamp(23px,5vw,34px);color:#ffe0a2;line-height:1.15;margin:7px 0;overflow-wrap:anywhere;}.match-winner p{font-size:14px;margin:5px 0;color:#e0e7e6;}.match-winner p strong{font-size:24px;color:#fff1ca;}
.match-scoreboard{margin-top:18px;border:1px solid #637e8c;border-radius:12px;overflow:hidden;background:#0f2432;}.scoreboard-head{display:flex;justify-content:space-between;padding:10px 14px;background:#284353;color:#c2d2d8;font-size:11px;text-transform:uppercase;letter-spacing:.06em;}.scoreboard-row{position:relative;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px;border-top:1px solid #4d687849;}.scoreboard-row>div:first-child{display:flex;gap:12px;align-items:center;min-width:0;}.scoreboard-row strong{display:block;overflow-wrap:anywhere;font-size:15px;}.scoreboard-row strong small{font-size:11px;color:#b3c9d0;}.scoreboard-label{display:block;font-size:10px;color:#a8bdc7;letter-spacing:.03em;margin-top:2px;}.scoreboard-position{flex:none;width:22px;font-size:19px;color:#a3beca;text-align:center;}.match-champion{background:#d8b67810;}.match-champion .scoreboard-label,.match-champion .scoreboard-position{color:#f3d69a;}.scoreboard-total{white-space:nowrap;flex:none;}.scoreboard-total b{font-size:25px;font-variant-numeric:tabular-nums;color:#f5eee0;}.scoreboard-total span{font-size:12px;color:#a8c0ca;}.scoreboard-progress{position:absolute;left:0;bottom:0;width:100%;height:3px;background:#2d4653;}.scoreboard-progress i{display:block;height:100%;background:#7fb6c5;}.match-champion .scoreboard-progress i{background:#e5c78f;}.match-actions{display:flex;justify-content:center;margin:16px 0;}.match-actions button{min-height:46px;min-width:160px;}.match-actions p{color:#c6d6dd;text-align:center;font-size:13px;}
@media(max-width:600px){.hand-result{top:64px;max-height:calc(var(--game-height,100dvh) - 80px);padding:13px;}.match-winner{gap:10px;padding:10px;}.match-winner-portrait .cinematic-portrait{width:72px;height:80px;}.match-winner .eyebrow{font-size:8px;}.match-winner p{font-size:12px;}.scoreboard-row{padding:12px;}.scoreboard-row strong{font-size:14px;}.scoreboard-row>div:first-child{gap:7px;}}
@media(orientation:landscape) and (max-height:500px){.hand-result{top:10px;max-height:calc(var(--game-height,100dvh) - 20px);}.match-winner-portrait .cinematic-portrait{width:64px;height:64px;}.match-winner{padding:8px;}.match-winner h2{font-size:24px;}.scoreboard-row{padding-block:9px;}}

/* Table-first layout: every row earns its space; the whole train stays in view. */
main{max-width:none;grid-template-columns:minmax(0,1fr);grid-template-rows:38px minmax(0,1fr) 30px 98px auto 32px;gap:4px;padding:5px max(5px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left));}
.table{grid-column:1;grid-row:2;grid-template-rows:78px minmax(0,1fr);padding:4px;gap:4px;border-width:3px;border-radius:15px;background:linear-gradient(130deg,#49463f,#202b31 60%,#434139);box-shadow:inset 0 0 0 1px #b9ac7b66,0 5px 20px #0008;}
.board{grid-row:2;grid-column:1/-1;overflow:hidden;padding:2px;border-radius:10px;touch-action:manipulation;scrollbar-width:none;background:radial-gradient(ellipse at 50% 30%,#b7c8ae10,transparent 70%),repeating-linear-gradient(0deg,#ffffff02 0 1px,transparent 1px 3px),#153e48;box-shadow:inset 0 0 0 2px #05191f55,inset 0 0 38px #020c143d;}
.board-canvas{min-width:0;min-height:0;display:grid;place-items:center;overflow:hidden;}
.board .domino-layout{max-width:100%;max-height:100%;overflow:hidden;}
.seat,.seat.active,.seat.active.top,.seat.active.bottom{grid-template-columns:62px minmax(0,1fr);padding:3px 5px;max-width:none;border-radius:9px;background:linear-gradient(145deg,#182a35e8,#11232cdd);}
.cinematic-portrait{width:62px;height:66px;}.seat .face:has(.cinematic-portrait){height:66px;min-height:66px;}
.seat b{font-size:12px;line-height:15px;}.seat div:not(.face){font-size:10px;line-height:12px;}.seat small{font-size:7px;line-height:10px;}
.seat.active .face{margin-top:0;}.turn-badge{font-size:6px;line-height:8px;top:1px;right:2px;padding:1px 3px;}
.notice{grid-column:1;grid-row:3;font-size:12px;line-height:14px;}
.hand{grid-column:1;grid-row:4;display:flex;gap:5px;padding:3px;justify-content:center;overflow:hidden;}
.hand .tile{width:56px!important;max-width:calc((100% - 30px)/7);height:90px!important;min-height:44px!important;padding:0!important;}
.game-choices{grid-column:1;grid-row:5;grid-template-columns:repeat(4,minmax(0,1fr));min-height:0;gap:4px;}
.game-choices:empty{display:none;}.game-choices:not(:empty){min-height:44px;}
.game-choices button{min-height:44px;max-height:none;font-size:12px;}
.game-footer{grid-column:1;grid-row:6;flex-wrap:nowrap;}.game-footer button{height:30px;min-height:30px;}.game-footer #stock{font-size:10px;line-height:12px;}
.table-mark{display:none;}
@media(max-width:700px) and (orientation:portrait){
 main{grid-template-rows:36px minmax(0,1fr) 30px 88px auto 32px;gap:3px;padding:3px max(3px,env(safe-area-inset-right)) max(3px,env(safe-area-inset-bottom)) max(3px,env(safe-area-inset-left));}
 .table{grid-template-rows:72px minmax(0,1fr);gap:3px;padding:3px;border-width:2px;}
 .seat,.seat.active,.seat.active.top,.seat.active.bottom{display:flex;flex-direction:column;justify-content:center;text-align:center;padding:2px 1px;gap:0;}
 .cinematic-portrait{width:48px;height:46px;}.seat .face:has(.cinematic-portrait){height:46px;min-height:46px;}
 .seat b{font-size:10px;line-height:12px;width:100%;}.seat div:not(.face){font-size:9px;line-height:11px;width:100%;}.seat small{display:none;}.turn-badge{font-size:5px;line-height:7px;}
 .hand{gap:2px;padding:2px;justify-content:space-evenly;}.hand .tile{width:calc((100% - 12px)/7)!important;max-width:58px;height:80px!important;}
 .notice{font-size:11px;line-height:13px;}.game-toolbar button,.game-toolbar select{min-height:32px;height:32px;font-size:11px;padding:4px 6px;}.game-toolbar #clock{height:30px;min-width:30px;}
}
@media(min-width:701px) and (orientation:portrait){
 main{grid-template-rows:38px minmax(0,1fr) 30px 108px auto 32px;}
 .table{grid-template-rows:80px minmax(0,1fr);}
 .seat,.seat.active,.seat.active.top,.seat.active.bottom{display:grid;grid-template-columns:66px minmax(0,1fr);grid-template-rows:repeat(3,minmax(0,1fr));text-align:left;padding:4px;}
 .cinematic-portrait{width:66px;height:70px;}.seat .face:has(.cinematic-portrait){height:70px;min-height:70px;}
 .seat b,.seat div:not(.face),.seat small{width:auto;}.seat small{display:block;font-size:7px;}.hand .tile{width:60px!important;height:100px!important;}
}
@media(orientation:landscape) and (max-height:760px){
 main{grid-template-columns:minmax(0,1fr) clamp(180px,24vw,230px);grid-template-rows:34px 28px minmax(0,1fr) auto 30px;gap:3px;padding:3px max(3px,env(safe-area-inset-right)) max(3px,env(safe-area-inset-bottom)) max(3px,env(safe-area-inset-left));}
 .game-toolbar{grid-column:1/-1;grid-row:1;}.table{grid-column:1;grid-row:2/-1;grid-template-rows:58px minmax(0,1fr);padding:3px;gap:3px;}
 .seat,.seat.active,.seat.active.top,.seat.active.bottom{display:grid;grid-template-columns:36px minmax(0,1fr);grid-template-rows:repeat(3,minmax(0,1fr));column-gap:2px;padding:2px;text-align:left;}
 .cinematic-portrait{width:36px;height:46px;}.seat .face:has(.cinematic-portrait){height:46px;min-height:46px;}.seat b{font-size:9px;line-height:11px;}.seat div:not(.face){font-size:8px;line-height:10px;}.seat small{display:block;font-size:6px;line-height:8px;}
 .notice{grid-column:2;grid-row:2;font-size:10px;line-height:12px;}.hand{grid-column:2;grid-row:3;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:2px;justify-items:center;align-items:center;padding:2px;}
 .hand .tile{width:100%!important;max-width:55px;height:100%!important;max-height:100px;min-height:44px!important;}
 .game-choices{grid-column:2;grid-row:4;grid-template-columns:repeat(2,minmax(0,1fr));}.game-choices:not(:empty){min-height:38px;}.game-choices button{min-height:36px;font-size:10px;padding:3px;}
 .game-footer{grid-column:2;grid-row:5;gap:3px;}.game-footer #stock{font-size:8px;line-height:10px;}.game-footer button{font-size:10px;padding-inline:5px;}
}
@media(orientation:portrait) and (max-height:650px){
 main{grid-template-rows:34px minmax(0,1fr) 28px 78px auto 30px;}.table{grid-template-rows:62px minmax(0,1fr);}.cinematic-portrait{width:40px;height:38px;}.seat .face:has(.cinematic-portrait){height:38px;min-height:38px;}.hand .tile{height:72px!important;}
}
/* Gritty basement room frames the play area without stealing table space. */
body{background:linear-gradient(180deg,#08121b55,#07131cb3 65%,#06121dd4),url('/domino/assets/basement-room-v1.png') center/cover no-repeat fixed;}
header{background:linear-gradient(110deg,#101b25e6,#243039df);border-color:#c6a46a55;}
body{background:linear-gradient(180deg,#08121b38,#07131c73 65%,#06121d8c),url('/domino/assets/basement-room-v1.png') center/cover no-repeat fixed;}
.table{background:linear-gradient(130deg,#26313688,#17272e66);border-color:#45504f;}

/* A table inside the room, rather than a screen-sized panel over the scene. */
:root{--room-scene:url('/domino/assets/basement-room-v1.png');}
body{background-image:linear-gradient(180deg,#06111b15,#06111b20 52%,#06111b55),var(--room-scene);background-size:cover;background-position:center;background-repeat:no-repeat;background-attachment:fixed;}
body:before{display:none;}
header{background:linear-gradient(180deg,#07111c90,#07111c45);border-bottom:1px solid #d8b57538;box-shadow:none;backdrop-filter:none;}
.game-brand h1{color:#ffe4b3;text-shadow:0 2px 4px #000,0 0 16px #e5b16a40;}
.game-toolbar{background:#07111b45;border:1px solid #e3c18c30;border-radius:12px;padding:2px 6px;backdrop-filter:blur(3px);}
.table{max-width:1240px;width:100%;justify-self:center;background:transparent;border:0;border-radius:0;box-shadow:none;padding:0 10px;gap:5px;overflow:visible;isolation:isolate;}
.table:before{content:'';position:absolute;left:5%;right:5%;top:85px;bottom:-13px;z-index:0;border-radius:50px;background:#02060899;filter:blur(9px);pointer-events:none;}
.table:after{content:none;}
.seat,.seat.active,.seat.active.top,.seat.active.bottom{background:transparent;border:0;box-shadow:none;border-radius:0;overflow:visible;}
.seat b,.seat div:not(.face),.seat small{text-shadow:0 2px 4px #000,0 1px 8px #000;}
.seat div:not(.face){background:#0711199c;border-radius:8px;padding:1px 4px;width:max-content;max-width:100%;}
.seat.active .face{filter:drop-shadow(0 0 7px #f8cc7a88);}
.cinematic-portrait{box-shadow:none;mask-image:linear-gradient(to bottom,#000 80%,transparent);-webkit-mask-image:linear-gradient(to bottom,#000 80%,transparent);}
#avatars .cinematic-portrait,.match-winner-portrait .cinematic-portrait{mask-image:none;-webkit-mask-image:none;}
.board,.board.your-turn{width:100%;justify-self:center;position:relative;border:9px solid #4c3021;border-radius:42px 42px 32px 32px;padding:12px;transform:perspective(1400px) rotateX(2deg);transform-origin:center bottom;background:radial-gradient(ellipse at 45% 18%,#61766155,transparent 65%),repeating-linear-gradient(8deg,#ffffff03 0 1px,transparent 1px 3px),repeating-linear-gradient(98deg,#00000004 0 1px,transparent 1px 3px),#193b37;box-shadow:0 2px 0 1px #c69c5a,0 6px 0 2px #24160f,0 11px 0 1px #170f0c,0 24px 25px #0009,inset 0 0 0 2px #c6a96577,inset 0 0 0 5px #081d1c,inset 0 0 55px #06161390;}
.board:after{content:'';position:absolute;inset:4px;border:1px solid #a7a77a55;border-radius:26px;box-shadow:inset 0 1px 3px #d7cf9f20;pointer-events:none;z-index:0;}
.board .board-canvas,.board .opening-message,.board .opening-place,.board .waiting-board,.board .wash-stage{z-index:1;position:relative;}
.board .opening-message{position:absolute;}.board .waiting-board,.board .wash-stage{position:absolute;}
.board.your-turn{border-color:#63462a;box-shadow:0 2px 0 1px #e9c789,0 6px 0 2px #2d1a0d,0 11px 0 1px #170f0c,0 24px 25px #0009,0 0 20px #ddb26e30,inset 0 0 0 2px #d2b37788,inset 0 0 0 5px #081d1c,inset 0 0 55px #06161390;}
.notice{color:#fff2d5;text-shadow:0 2px 5px #000,0 1px 10px #000;font-weight:800;}
.hand,.hand.your-turn{background:linear-gradient(180deg,#111b2466,#0b141c99);border:1px solid #d4b67a55;border-radius:18px;box-shadow:inset 0 1px 0 #ead3a633,0 8px 16px #0005;backdrop-filter:blur(3px);}
.game-footer #stock{color:#f2e6cd;text-shadow:0 1px 5px #000;}
@media(max-width:700px) and (orientation:portrait){
 :root{--room-scene:url('/domino/assets/basement-room-mobile-v1.png');}
 main{padding-inline:max(6px,env(safe-area-inset-left));}
 .table{padding-inline:2px;gap:4px;}.table:before{top:70px;left:2%;right:2%;}
 .board,.board.your-turn{border-width:7px;border-radius:32px 32px 25px 25px;padding:8px;}
 .board:after{inset:3px;border-radius:20px;}
 .seat div:not(.face){align-self:center;width:max-content;}
 .hand,.hand.your-turn{border-radius:15px;}
}
@media(min-width:701px) and (orientation:portrait){:root{--room-scene:url('/domino/assets/basement-room-mobile-v1.png');}.table{padding-inline:12px;}}
@media(orientation:landscape) and (max-height:760px){
 .table{padding:0 7px;gap:4px;}.table:before{top:57px;}
 .board,.board.your-turn{border-width:6px;border-radius:30px;padding:7px;box-shadow:0 2px 0 1px #b49260,0 5px 0 1px #24160f,0 15px 20px #0008,inset 0 0 0 2px #c6a96566,inset 0 0 0 4px #081d1c,inset 0 0 38px #06161388;}
 .board:after{border-radius:19px;inset:3px;}.hand,.hand.your-turn{backdrop-filter:blur(2px);}
}

/* Seat the crew around a freestanding tabletop, leaving the room visible. */
.table{display:block;padding:0;max-width:1240px;}
.table:before{top:78px;bottom:52px;left:9%;right:9%;border-radius:50%;}
.table .board{position:absolute;inset:76px 58px 66px;width:auto;height:auto;margin:0;}
.table .seat,.table .seat.active,.table .seat.active.top,.table .seat.active.bottom{position:absolute;inset:auto;transform:none;display:grid;grid-template-columns:58px minmax(0,1fr);grid-template-rows:repeat(3,minmax(0,1fr));width:155px;height:68px;padding:0;column-gap:5px;text-align:left;justify-self:auto;}
.table .seat.top,.table .seat.active.top{left:50%;top:0;transform:translateX(-50%);}
.table .seat.bottom,.table .seat.active.bottom{left:50%;bottom:0;transform:translateX(-50%);}
.table .seat.left,.table .seat.right{top:48%;transform:translateY(-50%);width:62px;height:108px;display:flex;flex-direction:column;justify-content:center;gap:0;text-align:center;}
.table .seat.left{left:0;}.table .seat.right{right:0;}
.table .seat .face:has(.cinematic-portrait){height:62px;min-height:62px;}.table .cinematic-portrait{width:58px;height:62px;}
.table .seat.left b,.table .seat.right b{width:100%;font-size:10px;line-height:13px;}
.table .seat.left div:not(.face),.table .seat.right div:not(.face){width:100%;white-space:normal;font-size:9px;line-height:12px;overflow:visible;}
.table .seat.left small,.table .seat.right small{display:none;}
.table .seat .turn-badge{top:0;right:0;}
.table .seat.active b{align-self:center;padding-top:5px;}
.table .seat.top small,.table .seat.bottom small{font-size:7px;}
@media(max-width:700px) and (orientation:portrait){
 .table .board{inset:70px 43px 60px;border-width:7px;padding:7px;}
 .table .seat,.table .seat.active,.table .seat.active.top,.table .seat.active.bottom{width:134px;height:60px;grid-template-columns:52px minmax(0,1fr);column-gap:4px;}
 .table .seat.left,.table .seat.right{width:49px;height:96px;display:flex;}
 .table .cinematic-portrait{width:50px;height:54px;}.table .seat .face:has(.cinematic-portrait){height:54px;min-height:54px;}
 .table .seat b{font-size:11px;line-height:13px;}.table .seat div:not(.face){font-size:9px;line-height:12px;width:max-content;max-width:100%;}
 .table .seat.left b,.table .seat.right b{font-size:9px;line-height:12px;}.table .seat.left div:not(.face),.table .seat.right div:not(.face){font-size:8px;line-height:10px;width:100%;}
 .table .seat.top small,.table .seat.bottom small{display:none;}.table .seat .turn-badge{font-size:5px;line-height:7px;}
 .table:before{top:76px;bottom:48px;left:9%;right:9%;}
}
@media(min-width:701px) and (orientation:portrait){
 .table .board{inset:80px 76px 70px;}.table .seat.left,.table .seat.right{width:78px;height:120px;}
 .table .seat .face:has(.cinematic-portrait){height:68px;min-height:68px;}.table .cinematic-portrait{width:66px;height:68px;}
}
@media(orientation:landscape) and (max-height:760px){
 .table .board{inset:51px 55px 44px;padding:7px;}
 .table .seat,.table .seat.active,.table .seat.active.top,.table .seat.active.bottom{width:130px;height:45px;grid-template-columns:40px minmax(0,1fr);column-gap:4px;}
 .table .seat.left,.table .seat.right{display:flex;width:54px;height:82px;}
 .table .cinematic-portrait{width:40px;height:44px;}.table .seat .face:has(.cinematic-portrait){height:44px;min-height:44px;}
 .table .seat b{font-size:10px;line-height:12px;}.table .seat div:not(.face){font-size:8px;line-height:10px;}.table .seat small{display:none;}
 .table .seat.left b,.table .seat.right b{font-size:9px;line-height:11px;}.table .seat.left div:not(.face),.table .seat.right div:not(.face){font-size:8px;line-height:10px;}
 .table:before{top:54px;bottom:36px;}
}
@media(orientation:portrait) and (max-height:650px){.table .board{top:60px;bottom:52px;}.table .seat,.table .seat.active,.table .seat.active.top,.table .seat.active.bottom{height:52px;}.table .seat.left,.table .seat.right{height:84px;}.table .cinematic-portrait{height:46px;}.table .seat .face:has(.cinematic-portrait){height:46px;min-height:46px;}}
/* Faces and names sit in front of the table rim and its floor shadow. */
.table .seat{z-index:5;}
/* Explicit stage dimensions prevent absolute grid items from shrinking to content. */
.table .board{width:calc(100% - 116px);height:calc(100% - 142px);justify-self:stretch;align-self:stretch;}
.hand,.hand.your-turn{backdrop-filter:none;}
@media(max-width:700px) and (orientation:portrait){.table .board{width:calc(100% - 86px);height:calc(100% - 130px);}}
@media(min-width:701px) and (orientation:portrait){.table .board{width:calc(100% - 152px);height:calc(100% - 150px);}}
@media(orientation:landscape) and (max-height:760px){
 .table .board{width:calc(100% - 110px);height:calc(100% - 95px);}
 .hand,.hand.your-turn{height:176px;max-height:100%;align-self:center;backdrop-filter:none;background:#101b246b;}
 .hand:not(:has(.tile:nth-child(5))){height:96px;grid-template-rows:minmax(0,1fr);}
}
@media(orientation:portrait) and (max-height:650px){.table .board{height:calc(100% - 112px);}}
/* Readability wins over shrinking an entire late hand into a miniature line. */
.table .board{overflow:auto;touch-action:pan-x pan-y pinch-zoom;overscroll-behavior:contain;scrollbar-width:thin;}
.board-canvas{overflow:visible;}.board .domino-layout{max-width:none;max-height:none;overflow:visible;}
/* Complete compact train, no scrolling. Give the playing surface the full width. */
.table .board{inset:74px 0 0;width:100%;height:calc(100% - 74px);overflow:hidden;touch-action:manipulation;border-width:5px;padding:6px;transform:none;}
.board-canvas{overflow:hidden;}.board .domino-layout{max-width:100%;max-height:100%;overflow:hidden;}
.table .seat,.table .seat.active,.table .seat.active.top,.table .seat.active.bottom,.table .seat.left,.table .seat.right{top:0;bottom:auto;left:auto;right:auto;transform:none;width:25%;height:70px;display:flex;flex-direction:column;justify-content:center;text-align:center;gap:0;}
.table .seat.left{left:0;}.table .seat.top,.table .seat.active.top{left:25%;}.table .seat.right{left:50%;}.table .seat.bottom,.table .seat.active.bottom{left:75%;}
.table .seat .face:has(.cinematic-portrait){height:44px;min-height:44px;}.table .cinematic-portrait{width:44px;height:44px;}.table .seat b{width:100%;font-size:10px;line-height:12px;padding:0;}.table .seat div:not(.face){width:max-content;font-size:8px;line-height:10px;white-space:nowrap;}.table .seat small{display:none;}
@media(orientation:landscape) and (max-height:760px){.table .board{top:58px;height:calc(100% - 58px);}.table .seat,.table .seat.active,.table .seat.active.top,.table .seat.active.bottom,.table .seat.left,.table .seat.right{height:54px;display:grid;grid-template-columns:34px minmax(0,1fr);text-align:left;}.table .cinematic-portrait{width:34px;height:42px;}.table .seat .face:has(.cinematic-portrait){height:42px;min-height:42px;}.table .seat b{font-size:9px;}}
.table .seat.top,.table .seat.active.top,.table .seat.bottom,.table .seat.active.bottom,.table .seat.left,.table .seat.right{transform:none;}

/* Cool room hues and separate portrait lighting preserve the cinematic crew. */
body{background-image:linear-gradient(145deg,#123b59b8,#1d475e8c 48%,#102737b3),var(--room-scene);}
.table .seat,.table .seat.active,.table .seat.active.top,.table .seat.active.bottom{background:linear-gradient(145deg,#567a8ee8,#233c50ed);border:1px solid #acc8d180;border-radius:10px;box-shadow:0 2px 8px #0005;}
.table .seat.active{background:linear-gradient(145deg,#688ca0,#304f60);border-color:#ffe1a3;box-shadow:inset 0 0 0 1px #ffe1a3,0 0 12px #ffe1a344;}
.table .cinematic-portrait,#avatars .cinematic-portrait{filter:brightness(1.22) contrast(1.04);}
.table .seat b{color:#fff6df;text-shadow:0 1px 3px #000;}.table .seat div:not(.face){background:#102436e8;color:#fff;}
/* Tablet and desktop stage: room visible, table and camera stay still. */
:root{--room-scene:url('/domino/assets/basement-room-v1.png');}
body{background-image:linear-gradient(110deg,#0b203b50,#08162315 55%,#07314745),var(--room-scene);}
main{max-width:1440px;grid-template-columns:minmax(0,1fr);grid-template-rows:44px minmax(0,1fr) 30px 96px 0px 32px;gap:6px;padding:8px 24px 12px;}
.table{display:grid;grid-template-columns:136px minmax(0,1fr) 136px;grid-template-rows:96px minmax(0,1fr);gap:8px 16px;max-width:1160px;width:100%;height:100%;padding:0;background:none;border:0;box-shadow:none;overflow:hidden;}
.table:before,.table:after{display:none;}
.table .board,.table .board.your-turn{position:relative;inset:auto;grid-column:2;grid-row:2;width:100%;height:100%;max-width:760px;justify-self:center;align-self:stretch;margin:0;padding:6px;border:8px solid #573c2a;border-radius:36px;transform:none;overflow:hidden;touch-action:manipulation;background:radial-gradient(ellipse at 45% 25%,#40625c66,transparent 70%),#163c38;box-shadow:0 2px 0 #c2a36a,inset 0 0 0 2px #b5a47488,inset 0 0 35px #081a1966;}
.table .seat,.table .seat.active,.table .seat.top,.table .seat.active.top,.table .seat.bottom,.table .seat.active.bottom,.table .seat.left,.table .seat.right{position:relative;inset:auto;transform:none;width:136px;height:176px;display:flex;flex-direction:column;gap:2px;justify-content:center;text-align:center;align-self:center;justify-self:center;padding:5px;background:linear-gradient(155deg,#244352d9,#0d1c2ce6);border:1px solid #7d9ca16b;border-radius:13px;box-shadow:0 4px 14px #0004;}
.table .seat.top,.table .seat.active.top{grid-column:2;grid-row:1;display:grid;grid-template-columns:84px 150px;grid-template-rows:24px 23px 18px;width:252px;height:92px;gap:0 8px;text-align:left;}
.table .seat.top .face{grid-row:1/4;grid-column:1;}
.table .seat.left{grid-column:1;grid-row:2;}.table .seat.right{grid-column:3;grid-row:2;}.table .seat.bottom,.table .seat.active.bottom{grid-column:3;grid-row:1;width:136px;height:92px;display:grid;grid-template-columns:62px 62px;grid-template-rows:30px 34px;gap:0;text-align:left;}
.table .seat.bottom .face{grid-row:1/3;}.table .seat.bottom small{display:none;}
.table .cinematic-portrait{width:112px;height:118px;filter:brightness(1.16);animation:crew-breathe 5s ease-in-out infinite;}
.table .seat .face:has(.cinematic-portrait){height:118px;min-height:118px;}
.table .seat.top .cinematic-portrait{width:84px;height:80px;}.table .seat.top .face:has(.cinematic-portrait){height:80px;min-height:80px;}
.table .seat.bottom .cinematic-portrait{width:62px;height:70px;}.table .seat.bottom .face:has(.cinematic-portrait){height:70px;min-height:70px;}
.table .seat b{font-size:16px;line-height:21px;color:#fff0cc;width:auto;padding:0;}.table .seat div:not(.face){font-size:12px;line-height:18px;white-space:normal;width:auto;background:transparent;color:#f1f6ff;padding:0;}.table .seat small{display:block;font-size:8px;line-height:12px;color:#c4d6d8;}.table .seat.bottom b{font-size:13px;}.table .seat.bottom div:not(.face){font-size:10px;line-height:13px;}
.table .seat.active{border-color:#f8cf7d;box-shadow:inset 0 0 0 1px #f8cf7d,0 0 15px #e7b55b33;}
.table .seat .turn-badge{top:0;right:0;font-size:7px;}
.board-canvas{display:flex;align-items:center;justify-content:center;overflow:hidden;}.board .domino-layout{max-width:100%;max-height:100%;overflow:hidden;}.board .bone-art{animation:none!important;transition:none!important;}.table-reflow .board{animation:none;}
.hand,.hand.your-turn{height:96px;max-height:96px;max-width:740px;width:100%;justify-self:center;display:flex;flex-wrap:nowrap;justify-content:center;align-items:center;gap:12px;padding:7px 12px;background:#0a1b2cba;border:1px solid #bba06d80;border-radius:15px;}
.hand .tile,.hand .tile:only-child{height:80px!important;width:44px!important;max-width:44px;flex:0 0 44px;margin:0;}.hand .tile svg{height:100%;width:100%;}.game-choices:empty{display:none;}.game-footer{justify-content:center;}.game-toolbar{justify-content:center;overflow:hidden;}
@media(min-width:701px) and (orientation:portrait){main{grid-template-rows:44px minmax(0,1fr) 30px 96px 0px 32px;padding-inline:14px;}.table{grid-template-columns:112px minmax(0,1fr) 112px;gap:10px;}.table .seat.left,.table .seat.right{width:112px;height:170px;}.table .seat.left .cinematic-portrait,.table .seat.right .cinematic-portrait{width:100px;height:112px;}.table .seat.left b,.table .seat.right b{font-size:14px;}.table .board{max-height:650px;align-self:center;}}
@media(max-height:780px) and (min-width:701px){main{grid-template-rows:40px minmax(0,1fr) 26px 82px 0px 30px;gap:4px;}.table{grid-template-rows:80px minmax(0,1fr);}.table .seat.top,.table .seat.active.top,.table .seat.bottom,.table .seat.active.bottom{height:76px;}.table .seat.top .cinematic-portrait{height:66px;}.table .seat.top .face:has(.cinematic-portrait){height:66px;min-height:66px;}.hand,.hand.your-turn{height:82px;}.hand .tile{height:68px!important;width:38px!important;flex-basis:38px;}}
@media(max-width:700px){main{padding:6px;}.table{grid-template-columns:72px minmax(0,1fr) 72px;gap:5px;grid-template-rows:82px minmax(0,1fr);}.table .seat.left,.table .seat.right{width:72px;height:130px;}.table .seat.left .cinematic-portrait,.table .seat.right .cinematic-portrait{width:66px;height:76px;}.table .seat .face:has(.cinematic-portrait){height:76px;min-height:76px;}.table .seat b{font-size:11px;}.table .seat div:not(.face){font-size:9px;line-height:12px;}.table .seat.top,.table .seat.active.top{width:150px;height:78px;grid-template-columns:58px 80px;}.table .seat.top .cinematic-portrait{width:58px;height:68px;}.table .seat.bottom,.table .seat.active.bottom{width:72px;height:78px;display:flex;}.table .seat.bottom .face{display:none;}.table .seat small{display:none;}.table .board{border-width:5px;border-radius:22px;}.hand,.hand.your-turn{gap:5px;}.game-toolbar{justify-content:space-between;}}
/* End choices overlay reserved table space instead of resizing the stage. */
main{position:relative;}.game-choices{position:absolute;z-index:8;left:50%;bottom:142px;transform:translateX(-50%);width:max-content;max-width:90%;min-height:40px;padding:4px 8px;background:#0c2234ed;border-radius:10px;}.game-choices:empty{display:none;}

/* Keep the same seat assignments in portrait and landscape tablet layouts. */
.table .seat.left{grid-column:1;grid-row:2;}.table .seat.top,.table .seat.active.top{grid-column:2;grid-row:1;}.table .seat.right{grid-column:3;grid-row:2;}.table .seat.bottom,.table .seat.active.bottom{grid-column:3;grid-row:1;}
.table .seat,.table .seat.active{transition:none;}

/* Your hand is your seat: keep the corner clear and make turns unmistakable. */
.table .seat.bottom,.table .seat.active.bottom{display:none!important;}
.hand,.hand.your-turn{position:relative;overflow:visible;}
.hand:before{content:attr(data-turn-label);position:absolute;left:14px;top:50%;transform:translateY(-50%);max-width:145px;font-size:20px;line-height:24px;font-weight:950;letter-spacing:.05em;color:#adc0cf;pointer-events:none;}
.hand.your-turn:before{content:'YOUR TURN';color:#fff4b0;text-shadow:0 0 12px #ffe36780;}
.hand.your-turn{border:3px solid #ffe575;box-shadow:0 0 0 3px #ffdc4c33,0 0 25px #ffdc4c55,inset 0 0 25px #ffdd4420;}
.hand.your-turn .tile:not(:disabled){background:#f8e9a126!important;outline:3px solid #ffe16b!important;filter:drop-shadow(0 0 7px #ffe16bbb);}
.hand.your-turn .tile.selected{outline:4px solid #8cffe6!important;background:#9dffe836!important;filter:drop-shadow(0 0 9px #83ffe5);}
.table .board.your-turn{border-color:#a98b40;box-shadow:0 2px 0 #ffe08a,inset 0 0 0 3px #e8cb6b99,inset 0 0 35px #e2cb5d14;}
#your-score{flex:none;white-space:nowrap;font-size:23px;line-height:28px;color:#ffe59d;font-variant-numeric:tabular-nums;letter-spacing:.02em;}
.table .seat div.player-totals{display:flex;flex-wrap:wrap;gap:1px 7px;justify-content:center;align-items:baseline;}.table .seat.top div.player-totals{justify-content:flex-start;}
.table .seat .player-points{font-size:24px;line-height:27px;font-weight:900;color:#ffe7a6;font-variant-numeric:tabular-nums;}.table .seat .player-totals span{font-size:11px;}
.score-number{font-size:clamp(54px,7vw,88px)!important;}.score-caption{font-size:16px!important;font-weight:850;}
@media(max-width:800px){.hand:before{font-size:16px;left:7px;max-width:100px;}.hand:has(.tile:nth-child(6)):before{top:-15px;left:50%;transform:translate(-50%,-50%);max-width:none;width:max-content;background:#102c3e;padding:2px 10px;border-radius:6px;}#your-score{font-size:19px;}.table .seat .player-points{font-size:20px;}}

/* Unframed players sit at the felt edge; opening tiles use a readable camera. */
.table .seat,.table .seat.active,.table .seat.top,.table .seat.active.top,.table .seat.left,.table .seat.right{background:none;border-color:transparent;box-shadow:none;}
.table .seat.active b,.table .seat.active .player-points{color:#ffeb99;text-shadow:0 0 12px #ffc84d77;}
.table .seat .face{background:none;}.table .cinematic-portrait{border-radius:0;mask-image:linear-gradient(#000 78%,transparent);-webkit-mask-image:linear-gradient(#000 78%,transparent);}
.table .seat b,.table .seat .player-totals{text-shadow:0 2px 4px #000,0 0 12px #000;}
.table{grid-template-columns:116px minmax(0,1fr) 116px;column-gap:8px;}
.table .seat.left,.table .seat.right{width:116px;}
@media(min-width:701px) and (orientation:portrait){.table{grid-template-columns:88px minmax(0,1fr) 88px;column-gap:6px;}.table .seat.left,.table .seat.right{width:88px;}.table .seat.left .cinematic-portrait,.table .seat.right .cinematic-portrait{width:94px;height:112px;}.table .board{max-height:none;align-self:stretch;}}
@media(max-width:700px){.table{grid-template-columns:66px minmax(0,1fr) 66px;column-gap:4px;}.table .seat.left,.table .seat.right{width:66px;}}

.table .seat.left,.table .seat.right{height:206px;}.table .seat b{flex:none;min-height:22px;}.table .seat .player-totals{flex:none;min-height:32px;}.table .seat.top .player-totals{min-height:0;}

/* Realistic hands and short, readable character captions. */
.realistic-hand{display:block;width:100%;height:auto;pointer-events:none;user-select:none;}
.washing-hand{width:clamp(100px,15vw,160px);filter:drop-shadow(0 6px 6px #0008);}.wash-left{rotate:20deg;}.wash-right{rotate:-20deg;}
.slap-hand .realistic-hand{width:100%;height:100%;object-fit:contain;}
.table-talk{position:fixed;z-index:1600;left:50%;top:18%;transform:translateX(-50%);display:flex;flex-direction:column;gap:5px;max-width:min(460px,88vw);padding:13px 22px;border:1px solid #ecd198;border-radius:15px;background:#102635f2;color:#fff2cb;box-shadow:0 8px 30px #0008;text-align:center;pointer-events:none;}.table-talk strong{font-size:12px;color:#afcbd6;text-transform:uppercase;letter-spacing:.08em;}.table-talk span{font-size:22px;font-weight:850;line-height:1.25;}
@media(max-width:700px){.table-talk span{font-size:18px;}.washing-hand{width:110px;}}

.knock-fist{display:block;width:106px;height:106px;font-size:0;filter:drop-shadow(0 5px 6px #0008);}.knock-fist img{display:block;width:100%;height:100%;object-fit:contain;}audio{max-width:100%;}
