/* The illustrated room remains whole; the lower table extends for touch controls. */
.icon-library{position:absolute;width:0;height:0;overflow:hidden}.ui-icon{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.ui-icon use{pointer-events:none}.tools button,.small-button,.finish-button{display:inline-flex;align-items:center;justify-content:center;gap:8px}.tools .ui-icon{width:18px;height:18px}#motion{font-size:13px}#motion:after{display:none}.roll-button .ui-icon{width:27px;height:27px}.table-stage{position:relative;aspect-ratio:1.58;min-height:380px;border-radius:24px;overflow:hidden;background:#d99147;box-shadow:0 7px 0 #a86338,0 14px 22px #6e442523;isolation:isolate}.table-stage:before{content:'';position:absolute;inset:0;background-image:url(assets/living-room-v1.webp);background-size:100% auto;background-position:center bottom;background-repeat:no-repeat;z-index:-1}.table-stage .friends-scene{position:absolute;inset:0;height:auto;border-radius:24px;background:transparent;overflow:visible}.table-stage .friends-scene:after{display:none}.table-stage .scene-image{position:absolute;left:0;top:0;width:100%;height:auto;object-fit:contain;object-position:50% 50%;border-radius:24px 24px 0 0}.table-stage video{position:absolute;left:0;top:0;width:100%;height:auto;aspect-ratio:16/9;object-fit:contain;border-radius:24px 24px 0 0}.table-stage .round{position:absolute;left:15px;top:15px;background:#fffdf8ef;font-size:12px;box-shadow:0 2px 8px #56355915}.candle-glow{position:absolute;border-radius:50%;width:15%;aspect-ratio:1;background:radial-gradient(ellipse,#ffe59955,transparent 70%);pointer-events:none;mix-blend-mode:screen;animation:candle-light 1.7s ease-in-out infinite alternate}.glow-left{left:-1%;top:40%}.glow-right{right:-2%;top:40%;animation-delay:-.9s}@keyframes candle-light{0%{opacity:.5;transform:scale(.9)}27%{opacity:.9;transform:scale(1.1)}55%{opacity:.65;transform:scale(1)}100%{opacity:1;transform:scale(1.15)}}.table-stage .dice-tray{position:absolute;left:11%;right:11%;top:56%;bottom:4%;padding:0;background:transparent;border:0;border-radius:0;overflow:visible;text-align:center}.table-stage .dice-tray:before{display:none}.rolling-zone{min-height:92px;position:relative;padding:5px 8px;border-radius:18px;border:2px solid transparent;transition:background .2s,border-color .2s}.dice-zones .dice{margin:0;min-height:96px;gap:17px;align-items:center}.dice-zones .die-wrap{gap:8px;min-width:0}.dice-zones .dice .die{width:64px;height:64px;max-width:none;max-height:none;min-width:44px;min-height:44px;border:0;display:block;position:relative;padding:0;background:transparent;box-shadow:none;border-radius:10px;perspective:600px;overflow:visible;touch-action:none;transform:none;--cube-size:64px;--die-color:#563559;user-select:none;-webkit-user-select:none}.dice-zones .die:not(:disabled):hover{transform:translateY(-3px)}.dice-zones .die:disabled{opacity:1}.dice-cube{display:block;position:absolute;inset:0;transform-style:preserve-3d;transform:rotateX(-58deg) rotateY(18deg);pointer-events:none;will-change:transform}.cube-face{position:absolute;inset:0;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:4px;padding:11px;border-radius:10px;background:#fffbf3;border:1px solid #dbc4b1;backface-visibility:hidden;box-shadow:inset 1px 1px 7px #d2b49b66}.face-front{transform:translateZ(calc(var(--cube-size)/2));background:linear-gradient(145deg,#fffdfb,#f8eee0)}.face-back{transform:rotateY(180deg) translateZ(calc(var(--cube-size)/2))}.face-right{transform:rotateY(90deg) translateZ(calc(var(--cube-size)/2));background:#eadbc8}.face-left{transform:rotateY(-90deg) translateZ(calc(var(--cube-size)/2));background:#e6d2bc}.face-top{transform:rotateX(90deg) translateZ(calc(var(--cube-size)/2));background:#fffdfb}.face-bottom{transform:rotateX(-90deg) translateZ(calc(var(--cube-size)/2));background:#d9c5ad}.dice-zones .die.kept{--die-color:#80551c;transform:none;background:transparent;box-shadow:none}.die.kept .cube-face{background:#ffe8a7;border-color:#cf9b44;box-shadow:inset 1px 1px 8px #deb64f55}.die.kept .face-top{background:#fff2c9}.die.kept .face-right{background:#e9bf61}.die-shadow{position:absolute;left:2%;right:2%;bottom:-7px;height:14px;background:#60421f;border-radius:50%;filter:blur(5px);opacity:.3;pointer-events:none}.dice-zones .die-label{font-size:13px;font-weight:900;line-height:20px;height:20px;min-width:24px;padding:0 5px;background:#fff5deb8;color:#523124;border-radius:10px;position:relative;z-index:1}.dice-zones .die.empty .die-label{font-size:12px}.dice-zones .die.empty .cube-face .pip{opacity:.2}.dice-zones.rolling .roll-this .die,.dice-zones.rolling .roll-this .dice-cube{animation:none!important}.dice-zones.rolling .roll-this .die-label{opacity:0}.keep-zone{position:relative;min-height:104px;padding:10px 12px 8px;background:#fff3c6cc;border:2px dashed #ac792d;border-radius:19px;box-shadow:inset 0 2px 5px #8050221a;transition:background .15s,border .15s;touch-action:pan-y}.keep-heading{display:flex;align-items:center;justify-content:center;gap:6px;font-size:12px;color:#6a4519;line-height:1.3}.keep-heading .ui-icon{width:16px;height:16px}.keep-heading>span{font-size:12px;margin-left:auto;background:#f4d488;padding:3px 8px;border-radius:10px}.kept-dice{display:flex;gap:16px;justify-content:center;align-items:center;min-height:0;padding-top:0}.keep-zone.has-dice .kept-dice{min-height:75px;padding-top:13px}.kept-dice .die{width:48px;height:48px;--cube-size:48px}.kept-dice .cube-face{padding:8px;gap:3px;border-radius:8px}.kept-dice .die-label{font-size:12px;height:17px;line-height:17px}.keep-zone.has-dice{min-height:117px}.keep-zone p{display:flex;justify-content:center;align-items:center;gap:7px;font-size:12px;color:#6a4519;margin:10px 0 0}.keep-zone p .ui-icon{width:17px;height:17px}.keep-zone.drop-ready{background:#fff3b6f5;border-style:solid;border-color:#966014;box-shadow:0 0 0 4px #ffd87566}.rolling-zone.drop-ready{background:#ffe9ad88;border-color:#945e25}.empty-dice-hint{font-size:13px;color:#523124;background:#fff5de;border-radius:12px;padding:12px;font-weight:800;margin:0;position:absolute;inset:18px 8px;display:grid;place-items:center}.drag-ghost{position:fixed!important;z-index:1000;pointer-events:none!important;opacity:1!important;cursor:grabbing!important;perspective:600px!important;transform:scale(1.12)!important}.drag-ghost .dice-cube{transform:rotateX(-58deg) rotateY(18deg) rotateZ(-8deg)!important}.is-dragged{opacity:.2!important}.table-controls{background:#f5eafa;border:1px solid #e4d6eb;border-radius:20px;padding:20px;margin-top:21px;text-align:center}.table-controls #instruction{font-size:14px;min-height:22px;text-align:center;margin:9px 0 16px}.table-controls .tray-heading{gap:12px}.table-controls .tray-heading h2{font-size:20px}.table-controls .roll-dots{margin:17px 0 6px}.table-controls .tray-note{margin-top:9px;font-size:12px}.table-controls .turn-actions{margin-top:8px}.table-controls .finish-button{display:inline-flex;gap:7px;align-items:center;font-size:13px;line-height:1.3;background:#fffdf8}.character-speech{display:flex;align-items:baseline;gap:9px;padding:14px 17px;background:#fff3d8;border-radius:16px;margin-top:16px}.character-speech .speech-name{font-size:12px;white-space:nowrap;color:#8b5722}.character-speech p{font-weight:900;font-size:15px;color:#653f22}.turn-news{margin-top:10px}.dice-zones .die.best-omitted{opacity:.4!important}
@media(min-width:1300px){.table-stage{min-height:470px}.dice-zones .dice .die{width:72px;height:72px}.dice-zones .dice{min-height:118px;gap:22px}.kept-dice .die{width:52px;height:52px}.keep-zone.has-dice{min-height:122px}}
@media(min-width:801px) and (max-width:1050px){.table-stage{min-height:365px;aspect-ratio:auto}.table-stage .dice-tray{left:5%;right:5%;top:49%;bottom:3%}.dice-zones .dice .die{width:48px;height:48px}.dice-zones .dice{gap:10px;min-height:82px}.cube-face{gap:3px;padding:8px}.kept-dice{gap:12px}.kept-dice .die{width:44px;height:44px}.keep-zone{min-height:90px}.keep-zone.has-dice{min-height:110px}.dice-zones.six .dice{gap:8px}.dice-zones.six .die{width:44px;height:44px}.table-controls{padding:17px}}
@media(max-width:800px){.table-stage{min-height:420px;aspect-ratio:1.5}.table-stage .dice-tray{left:11%;right:11%;top:55%;bottom:3%}.dice-zones .dice .die{width:62px;height:62px}.dice-zones .dice{gap:16px;min-height:100px}.kept-dice .die{width:48px;height:48px}#motion .button-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}#motion{font-size:12px;width:40px}.dice-zones.six .dice{gap:12px}}
@media(max-width:600px){.table-stage{min-height:365px;aspect-ratio:auto}.table-stage .dice-tray{top:43%;left:7%;right:7%;bottom:4%}.dice-zones .dice .die{width:52px;height:52px}.dice-zones.six .die{width:46px;height:46px}.dice-zones .dice{gap:13px;min-height:94px}.dice-zones.six .dice{gap:9px}.kept-dice{gap:13px}.kept-dice .die,.dice-zones.six .kept-dice .die{width:44px;height:44px}.keep-zone{padding:8px 10px;min-height:89px}.keep-zone.has-dice{min-height:112px}.table-stage .round{top:9px;left:9px;font-size:12px;padding:4px 9px}.cube-face{padding:9px;gap:3px}.kept-dice .cube-face{padding:7px;gap:3px}.character-speech{flex-wrap:wrap;gap:3px;padding:12px 14px}.character-speech p{font-size:14px}.table-controls #instruction{font-size:13px}.table-controls .tray-heading h2{font-size:18px}.table-controls .tray-heading>span{font-size:12px}.table-controls .finish-button{font-size:12px;padding:10px 12px}.table-controls{padding:17px 13px}.tools{gap:5px}.tools .ui-icon{width:17px;height:17px}#help{gap:5px}#sound{gap:5px}#new-game{gap:5px}#new-game .ui-icon{width:17px;height:17px}}
@media(max-width:400px){.table-stage{min-height:344px}.table-stage .dice-tray{top:39%;left:4%;right:4%}.dice-zones .dice{gap:10px;min-height:90px}.dice-zones .dice .die{width:46px;height:46px}.dice-zones.six .die{width:44px;height:44px}.dice-zones.six .dice{gap:6px}.keep-zone p{font-size:12px;line-height:1.35}.kept-dice{gap:10px}.dice-zones.six .kept-dice{gap:6px}.cube-face{padding:8px;gap:3px}.keep-zone{min-height:91px}.table-stage .round{font-size:12px}.table-controls .turn-actions{gap:10px}.table-controls .roll-button{padding:12px 20px}.table-controls .finish-button{font-size:12px}#help .button-label{font-size:12px}.tools button{padding:8px}}
@media(max-width:360px){.table-stage{min-height:440px}.table-stage .dice-tray{top:30%;left:3%;right:3%}.dice-zones .dice{display:flex;gap:7px;min-height:95px}.dice-zones.six .dice{display:flex;flex-wrap:wrap;max-width:190px;margin:auto;gap:12px;min-height:145px}.dice-zones .dice .die{width:44px;height:44px}.dice-zones.six .die{width:44px;height:44px}.dice-zones.six .kept-dice{flex-wrap:wrap;max-width:190px;margin:auto;gap:12px}.keep-zone.has-dice{min-height:110px}.keep-zone.has-dice .kept-dice{padding-top:13px}.table-controls .turn-actions{flex-direction:column}.table-controls .roll-button{width:100%}.table-controls .finish-button{width:100%}.tools .button-label{font-size:12px}}
@media(max-width:360px){.table-stage:has(.dice-zones.six){min-height:490px}.table-stage:has(.dice-zones.six) .dice-tray{top:28%}}

/* Let the two dice areas grow together, so saved dice never disappear below the table. */
.table-stage{min-height:0;aspect-ratio:auto;padding-top:33%;padding-bottom:18px}
.table-stage .dice-tray{position:relative;inset:auto;margin:0 11%}
@media(min-width:801px) and (max-width:1050px){.table-stage .dice-tray{margin:0 5%}}
@media(max-width:600px){.table-stage .dice-tray{margin:0 7%}}
@media(max-width:400px){.table-stage .dice-tray{margin:0 4%}}
@media(max-width:360px){.table-stage,.table-stage:has(.dice-zones.six){min-height:0}.table-stage .dice-tray,.table-stage:has(.dice-zones.six) .dice-tray{top:auto;margin:0 3%}}
#help .button-label{display:inline;background:transparent;color:inherit;width:auto;height:auto;margin:0;border-radius:0}
@media(max-width:500px){#help .button-label{display:inline}.tools button,.title-row>.small-button{min-height:44px}.turn-tag{font-size:12px;height:auto;line-height:1.25}}

.table-stage:before{background-size:100% 700%}
.amor-portrait img{left:calc(50% - 127px);top:calc(50% - 106px)}
.player:not(.active) .turn-tag{display:none}

.tools button{min-width:44px}
@media(max-width:360px){.dice-zones .dice,.dice-zones.six .dice{display:flex;flex-wrap:wrap;max-width:190px;margin:auto;gap:12px;min-height:145px}.kept-dice{flex-wrap:wrap;max-width:190px;margin:auto;gap:12px}#sound .button-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}#sound{width:44px}}

/* The game menu sits on the same warm wooden frame as the illustrated table. */
.masthead .back{margin-left:auto}
.table-controls{margin:0;padding:16px 20px 14px;border:0;border-radius:24px 24px 0 0;background:#de9c53 url(assets/living-room-v1.webp) center bottom/100% 700%;color:#523124;text-align:center}
.scene-menu{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:0 0 15px;padding-bottom:14px;border-bottom:1px solid #73402144}
.scene-menu button,.scene-menu #help,.scene-menu #new-game{flex:1 1 auto;min-height:44px;padding:10px 12px;border:1px solid #91603960;background:#fff6e3;color:#523124;border-radius:16px;box-shadow:0 3px 7px #58351e24;font-size:13px;font-weight:900;gap:7px}
.scene-menu button:hover{background:#ffe8ad;transform:translateY(-1px)}
.scene-menu button:active{transform:translateY(1px)}
.scene-menu button[aria-pressed="true"]{background:#ffe1a0;border-color:#875423}
.scene-menu .ui-icon{width:20px;height:20px}
.scene-menu #motion,.scene-menu #sound{width:auto}
.scene-menu .button-label,.scene-menu #motion .button-label,.scene-menu #sound .button-label{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:nowrap;font-size:13px}
.scene-menu #help .button-label{font-size:13px}
.table-controls .tray-heading h2{font-size:20px;color:#523124}
.table-controls .tray-heading>span{color:#523124;background:#fff6e3;padding:6px 11px}
.table-controls #instruction{color:#523124;margin:8px 0 12px;min-height:22px;font-weight:800}
.table-controls .turn-actions{margin:0;min-height:54px}
.table-controls .finish-button,.table-controls .watch-controls button#pace{min-height:44px;padding:11px 15px;background:#fff6e3;color:#523124;border:1px solid #91603960;border-radius:16px;font-size:13px;font-weight:900}
.table-controls .watch-controls{margin:0}
.table-controls .roll-dots{margin:12px 0 7px}
.table-controls .roll-dots i{background:#fff6e3}
.table-controls .roll-dots i.used{background:#873555}
.table-controls .tray-note{margin:0;color:#523124;font-weight:800}
.table-stage{border-radius:0 0 24px 24px;box-shadow:0 6px 12px #73442230}
.table-stage .friends-scene,.table-stage .scene-image,.table-stage video{border-radius:0}
@media(max-width:600px){.table-controls{padding:14px 12px}.scene-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.scene-menu button,.scene-menu #help,.scene-menu #new-game{padding:10px 6px;gap:5px}.scene-menu .ui-icon{width:18px;height:18px}.scene-menu .button-label,.scene-menu #motion .button-label,.scene-menu #sound .button-label,.scene-menu #help .button-label{font-size:12px}.table-controls .tray-heading h2{font-size:18px}.table-controls .turn-actions{gap:10px}.table-controls .roll-button{min-width:156px}.table-controls .finish-button{padding:11px 12px}.table-controls #instruction{font-size:13px;min-height:36px}.table-controls .tray-note{line-height:1.4}}
@media(max-width:360px){.table-controls .turn-actions{flex-direction:column}.table-controls .watch-controls,.table-controls .watch-controls button#pace{width:100%}}
