/* One dossier frame, nine semantic uses. Existing bitmap scenes retain their pixels. */
.point-click-shell:has(#modal[open])>.pc-dock{display:none}
.point-click-shell.mobile-shell:has(#modal[open]){grid-template-rows:38px 0 minmax(0,1fr) 0}
.point-click-shell:has(#modal[open])>.game-workspace{grid-row:3}
.mobile-shell #modal[open]{border:4px double #94733e;background:#211b15;box-shadow:inset 0 0 0 2px #0d0b09;border-radius:0}
.mobile-shell #modal .window-titlebar{background:repeating-linear-gradient(0deg,#35251b 0 3px,#2c1e17 3px 6px);border-bottom:3px double #957744;color:#f2d89a;padding:5px 12px}
.mobile-shell #modal .window-kind{display:block;margin:0 0 2px;font:10px/1.2 monospace;letter-spacing:2px;color:#caa669}
.mobile-shell #modal .window-titlebar h2{font:18px/1.2 Georgia;border:0;background:none;box-shadow:none;position:static;padding:0;min-height:0}
.mobile-shell #modal .window-content{overflow:hidden;max-width:820px;width:100%;padding:8px 14px;color:#ebdbb7;font:15px/1.38 Georgia;min-height:0}
.mobile-shell #modal .window-content :is(.table-wrap,.response-list,.casino-table,.story-dialog,.story-prose,.roulette-bets){overflow:visible;max-height:none}
.mobile-shell #modal .modal-actions{background:#30251b;border-top:3px double #92713e;padding:6px 12px;gap:4px;max-width:820px}
.mobile-shell #modal button{border-radius:0;background:#392b1e;border:2px solid;border-color:#a1824f #110e0b #110e0b #a1824f;box-shadow:none;color:#f1dda9;min-height:44px}
.mobile-shell #modal button:hover,.mobile-shell #modal button:focus-visible{background:#5a4127;outline:2px solid #dbc087;outline-offset:-4px}
.mobile-shell #modal button:disabled{color:#857762;background:#27221a}
.mobile-shell #modal .modal-actions button{padding:6px 10px;font-size:14px}
.mobile-shell #modal .folio-turns{display:flex;gap:6px;align-items:center;grid-column:1/-1;width:100%}
.mobile-shell #modal .folio-turns span{flex:0 0 auto;font:12px monospace;white-space:nowrap}
.mobile-shell #modal .folio-turns button{font:12px Georgia;text-align:center;flex:1;min-width:0}
.mobile-shell #modal[data-dialog-kind=inspect] .window-content,.mobile-shell #modal[data-dialog-kind=information] .window-content{background:#c6b589;color:#271e15}
.mobile-shell #modal[data-dialog-kind=inspect] .window-content :is(p,h3,small,.hint),.mobile-shell #modal[data-dialog-kind=information] .window-content :is(p,h3,small,.hint){color:#362719}
.mobile-shell #modal[data-dialog-kind=warning] .window-titlebar{border-bottom-color:#b76642}
.mobile-shell #modal[data-dialog-kind=gambling] .window-content{background:#1a2920}
.mobile-shell #modal[data-dialog-kind=trade] .window-titlebar{border-bottom-color:#a98f59}
.mobile-shell #modal .window-content :is(.transport-art,.story-illustration,.story-scene,.encounter-art){max-height:26dvh;width:auto;max-width:100%;object-fit:contain;image-rendering:pixelated}
.mobile-shell #modal .cabinet-stage{width:min(100%,220px);margin:0 auto;max-height:29dvh}
.mobile-shell #modal .cabinet-stage .cabinet-art{width:100%;height:auto;max-height:27dvh;object-fit:contain}
.mobile-shell #modal .casino-table{padding:0;background:none;border:0;box-shadow:none}
.mobile-shell #modal .roulette-stage{padding:6px;grid-template-columns:minmax(0,1fr) minmax(100px,1fr)}
.mobile-shell #modal .roulette-scene{width:min(100%,27dvh,230px);aspect-ratio:1;margin:0 auto}
.mobile-shell #modal #roulette-wheel{width:100%;height:100%}
.mobile-shell #modal .felt-stage{width:min(100%,42dvh);margin:0 auto;container-type:inline-size}
.mobile-shell #modal .felt-stage .playing-card{width:14cqw;height:21cqw;font-size:3cqw}
.mobile-shell #modal .felt-stage .hand-label{font-size:3.5cqw}
.mobile-shell #modal .felt-stage .card-pip{font-size:6cqw}
.mobile-shell #modal .casino-stake{gap:5px;margin-top:5px}
.mobile-shell #modal .casino-stake p{font-size:12px;line-height:1.25}
.mobile-shell #modal .casino-stake label{font-size:13px}
.mobile-shell #modal .casino-stake input,.mobile-shell #modal .casino-stake select{min-height:36px;padding:4px}
.mobile-shell #modal details{margin:6px 0;font-size:13px}
.mobile-shell #modal .window-content [data-folio-text]{display:block}
.mobile-shell #modal .window-content [hidden],.mobile-shell #modal .modal-actions [hidden]{display:none!important}
@media(max-height:540px) and (orientation:landscape){.point-click-shell.mobile-shell:has(#modal[open]){grid-template-rows:0 0 minmax(0,1fr) 0}.mobile-shell #modal .window-titlebar{padding:3px 10px}.mobile-shell #modal .window-kind{display:none}.mobile-shell #modal .window-content{padding:5px 12px}.mobile-shell #modal .modal-actions{display:grid;grid-template-columns:1fr 1fr}.mobile-shell #modal .window-content :is(.transport-art,.story-illustration,.story-scene,.encounter-art){max-height:24dvh}.mobile-shell #modal .cabinet-stage{width:140px}}

.mobile-shell #modal .dice-table{width:min(100%,39dvh);container-type:inline-size}
.mobile-shell #modal .dice-table .ivory-die{width:13cqw;min-width:0}
.mobile-shell #modal .dice-point{font-size:clamp(8px,3cqw,12px);padding:2px 4px}
.mobile-shell #modal .encounter-scene{max-height:none;width:100%}
.mobile-shell #modal .encounter-portrait{height:min(120px,18dvh);width:auto;max-width:96px}.mobile-shell #modal.event-interrupt{overflow:hidden}.mobile-shell #modal .encounter-dialogue{margin:0;gap:6px;line-height:1.38}.mobile-shell #modal .encounter-dialogue h3{margin:4px 0}

/* Risk consent shares the existing dossier, with an original low-resolution scene. */
#modal .danger-scene{display:flex;justify-content:center;height:min(20dvh,120px);overflow:hidden;margin:0 0 8px}
#modal .danger-scene img{height:100%;max-width:100%;object-fit:contain;image-rendering:pixelated}
#modal .danger-text{border-left:3px solid #b76642;padding-left:10px}
@media(max-height:540px){#modal .danger-scene{height:64px}}
#modal .danger-cash{color:#f4dba0;border:2px solid #a16e3c;padding:8px 10px;font-size:1.1em}
#modal .danger-inventory{list-style:none;margin:4px 0 10px;padding:0}
#modal .danger-inventory li{display:flex;justify-content:space-between;gap:12px;border-bottom:1px dotted #8d744a;padding:5px 0;break-inside:avoid}
#modal .danger-inventory li span{min-width:0;overflow-wrap:anywhere}
#modal .danger-inventory li strong{white-space:nowrap;color:#f4dba0}

.police-lock-panel canvas{max-width:100%;height:auto;image-rendering:pixelated;border:3px ridge #997045}.police-lock-panel label{display:block;color:#c5ac71}.police-lock-panel input[type=range]{appearance:none;width:100%;height:16px;background:#171b22;border:3px inset #706658;border-radius:0;touch-action:pan-y}.police-lock-panel input[type=range]::-webkit-slider-thumb{appearance:none;width:22px;height:26px;background:#997045;border:3px outset #c5ac71;border-radius:0}.police-lock-panel input[type=range]::-moz-range-thumb{width:22px;height:26px;background:#997045;border:3px outset #c5ac71;border-radius:0}

/* Patient details follow the existing light information-paper palette. */
.mobile-shell #modal[data-dialog-kind=information] .window-content .ward-patient{background:#d8c79b;color:#362719}
.mobile-shell #modal[data-dialog-kind=information] .window-content .ward-patient time{color:#362719}
