*{box-sizing:border-box}body{margin:0;background:#f4f1e8;color:#202139;font:16px/1.5 "Trebuchet MS",Arial,sans-serif}button,input{font:inherit}button{cursor:pointer;color:inherit;border:1px solid #96959b;border-radius:7px;padding:.55rem .95rem;background:transparent;font-weight:700}button:hover{filter:brightness(.93);background-color:#e6e2d9}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #9360d7;outline-offset:3px}header,main{max-width:1000px;margin:auto;padding:0 24px}header{display:flex;align-items:center;justify-content:space-between;height:84px}.brand{font:bold 30px Georgia;text-decoration:none;color:inherit;letter-spacing:-1.5px;display:flex;align-items:center;gap:10px}.brand i{width:29px;height:14px;transform:rotate(-38deg);border:2px solid #24223a;border-radius:9px;background:linear-gradient(90deg,#a183dd 50%,#faf4e3 50%)}.window{border:2px solid #24223a;border-radius:13px;overflow:hidden;background:#252541;box-shadow:0 4px 0 #252541}.strip,.route,footer,.tag,.title small,.stamp{font:700 13px/1.4 ui-monospace,"Courier New",monospace;letter-spacing:.06em}.strip,.route,footer,.top{display:flex;align-items:center;justify-content:space-between;gap:12px}.strip{padding:11px 18px;color:#dfd7ee;background:#252541}.scene{position:relative}.scene canvas{display:block;width:100%;height:auto;image-rendering:pixelated}.title{position:absolute;top:8%;left:5%;color:#fff2ce;text-shadow:3px 3px #332849}.title small{font-size:clamp(9px,1.4vw,13px)}h1{font:bold italic clamp(46px,8vw,96px)/.9 Georgia;margin:6px 0;letter-spacing:-.07em}h1 span{color:#ffd172}.route{color:#f6edda;padding:13px 18px;font-size:13px}.track{height:4px;background:#595675;flex:1;position:relative}.track i{display:block;height:100%;background:#ffce76;transition:width .4s}.route b{color:#ffcf78}#panel{padding:28px 4px 26px}h2,h3{font-family:Georgia,serif;line-height:1.12;letter-spacing:-.035em}h2{font-size:clamp(31px,5vw,48px);margin:10px 0}h3{font-size:25px;margin:10px 0}p{margin:.65em 0 1em;max-width:65ch}.tag,.stamp{color:#665477}.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}.primary{background:#302b49;color:#fff7e9;border-color:#302b49;padding:.75rem 1.4rem}.primary:hover{background:#493d63}.home{display:grid;grid-template-columns:1.5fr 1fr;gap:36px}.dispatch{border-left:1px dashed #9e98a9;padding-left:30px}.dispatch ul{list-style:none;margin:12px 0;padding:0}.dispatch li{display:flex;justify-content:space-between;border-bottom:1px solid #d6d1c7;padding:5px 0}.dispatch li b{font-family:monospace}.top{margin-bottom:12px}.timer{background:#e8def4;padding:4px 12px;border-radius:20px;font:bold 17px monospace}.urgent{background:#ffdab4}form{display:flex;gap:8px;margin:18px 0}input{min-width:0;flex:1;border:1.5px solid #5d586e;background:#fffdf7;color:#24223a;border-radius:7px;padding:12px}.quiet{border:0;text-decoration:underline;padding:4px}.message{color:#80421c;min-height:1.5em}.log{padding:0;list-style:none}.log li{border-bottom:1px dashed #bfb8bd;padding:10px 0;display:flex;gap:14px;justify-content:space-between}.log li b{white-space:nowrap}.log small{display:block;color:#655e70}footer{padding:16px 0;border-top:1px solid #bbb7b3;color:#666174;font-size:12px}dialog{width:min(480px,90vw);border:2px solid #302b49;border-radius:12px;background:#f8f4ea;padding:24px;color:#25233c}dialog::backdrop{background:#18162bb3}a{color:#604781}.pill{display:inline-block;border-radius:18px;background:#e5dbf1;padding:4px 10px;font-weight:bold}textarea{width:100%;height:90px}@media(max-width:620px){header,main{padding:0 14px}header{height:66px}.home{grid-template-columns:1fr;gap:22px}.dispatch{padding:15px 0 0;border-left:0;border-top:1px dashed #aaa}.scene canvas{height:185px;object-fit:cover}.strip,.route{font-size:11px;padding:10px}.title{top:12%}.title h1{font-size:59px}.title small{font-size:10px}.primary{padding:.7rem 1rem}}
.arrival{border-left:3px solid #9780b6;padding:8px 14px;background:#ebe4f0}

.pill.tier-1{background:#cfe8de}.pill.tier-2{background:#c8def3}.pill.tier-3{background:#dec8fa;box-shadow:0 0 0 2px #8b65a7}.pill.tier-4{background:#ffe298;color:#4a3011;box-shadow:0 0 0 2px #aa772f,0 3px 10px #bd873d55}.pill.tier-4::before{content:'★ ';color:#845318}
@media(prefers-reduced-motion:no-preference){.pill.tier-3,.pill.tier-4{animation:stamp-in .48s ease-out}.pill.tier-4{animation-duration:.65s}@keyframes stamp-in{0%{transform:scale(.72) rotate(-8deg)}55%{transform:scale(1.11) rotate(2deg)}100%{transform:none}}}

button.brand{padding:0;border:0;background:transparent;}

.log .review-stop{display:block}.review-stop h3{font-size:1.25rem}.review-stop details{margin:.65rem 0}.review-stop summary{cursor:pointer;color:#604781;font-weight:bold}.review-stop h4{margin:1em 0 .25em}.review-stop details p{margin:.25em 0;line-height:1.65}

.shelf-head{display:flex;justify-content:space-between;padding:10px 4% 0;color:#eee0c0;font:700 13px monospace}.shelf{display:grid;grid-template-columns:repeat(7,1fr);padding:5px 5% 0;background:linear-gradient(0deg,#876648 0 6px,transparent 6px)}.slot{display:grid;place-items:end center;height:52px;padding-bottom:6px}.bottle,.vacant{width:28px;height:34px;border-radius:6px 6px 3px 3px;position:relative;display:grid;place-items:center}.bottle{background:linear-gradient(90deg,#915023,#d99548 25%,#aa632f 78%,#733a23);border:2px solid #7a452b}.bottle:before{content:'';position:absolute;top:-8px;width:18px;height:7px;background:repeating-linear-gradient(90deg,#e5d3ae 0 3px,#bda887 3px 5px);border-radius:2px}.bottle b{width:100%;text-align:center;background:#fff4df;color:#473341;font:700 14px Georgia}.bottle-1 b{background:#b5e4cd}.bottle-2 b{background:#a6d7fa}.bottle-3 b{background:#dbb9fb}.bottle-4 b{background:linear-gradient(110deg,#d49b29,#fff0ae,#e6ac3a)}.vacant{border:1px dashed #82768a;color:#bcafbf}

.levels{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:10px;margin:16px 0}.levels button{text-align:left;padding:14px}.levels strong,.levels span{display:block}.levels span{font-size:.85em;font-weight:400;margin-top:5px;line-height:1.4}

@media (max-width:620px), (max-height:500px) and (pointer:coarse) {
 main:has(#panel.playing, #panel.at-stop) {display:flex;flex-direction:column}
 #panel.playing, #panel.at-stop {order:-1;padding:10px 0 12px;scroll-margin-top:6px}
 #panel.playing h2, #panel.at-stop h2 {font-size:clamp(24px,6vw,32px);overflow-wrap:anywhere}
 #panel.playing .top, #panel.at-stop .top {margin-bottom:6px}
 #panel.playing form {margin:10px 0 6px}
 #panel.playing input {font-size:16px}
 #panel.playing .message:empty {display:none}
 #panel.playing button, #panel.at-stop button {min-height:44px}
 #panel.at-stop {display:flex;flex-direction:column;align-items:flex-start}
 #panel.at-stop .top {align-self:stretch}
 #panel.at-stop .actions {margin:10px 0 4px}
 #panel.at-stop p {order:1;margin:.45em 0}
 main:has(#panel.playing, #panel.at-stop) .strip {display:none}
 main:has(#panel.playing, #panel.at-stop) .scene canvas {width:100%;height:56px;object-fit:cover;object-position:center bottom}
 main:has(#panel.playing, #panel.at-stop) footer {margin-top:16px}
}

/* Keep the printed-docket styling, with room to read the answers on small screens. */
:root {--ink:#22233b;--rule:#d7d0c3;--paper:#fffdf7;--muted:#605b70}
header{height:74px}.brand{letter-spacing:-.055em}.home{align-items:start}
.dispatch{background:#ebe6da;border:1px solid var(--rule);border-radius:10px;padding:16px 20px}
#panel p{line-height:1.55}.levels button{background:var(--paper);border-color:var(--rule)}
.levels button:hover,.levels button:focus-visible{border-color:#76618d;background:#f2edf7}
.review-stop small,.book-ref{color:var(--muted)}.log .review-stop{padding:16px 0;border-color:var(--rule)}
.receipt-pick{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.receipt-pick button{font-size:.9rem}.receipt-pick span{overflow-wrap:anywhere}
dialog{max-height:90vh;max-height:90dvh;overscroll-behavior:contain}
dialog:has(#book-search){width:min(580px,94vw);padding:20px}
dialog[open]:has(#book-search){display:flex;flex-direction:column}
dialog:has(#book-search) #dialogbody{min-height:0;display:flex;flex-direction:column}
.book-prompt{margin:4px 0 10px}.your-pick{margin:0 0 10px;color:#4a3b59;overflow-wrap:anywhere}
#book-search{width:100%;flex:none;background:var(--paper);font-size:16px}
#book-groups{overflow-y:auto;overscroll-behavior:contain;margin:10px 0;min-height:48px}
.rarity-group{border-bottom:1px solid var(--rule)}
.rarity-group summary{display:flex;align-items:center;gap:10px;min-height:52px;cursor:pointer;font-weight:bold;list-style:none}
.rarity-group summary::-webkit-details-marker{display:none}
.rarity-group summary small{display:block;font-size:.8rem;font-weight:normal;color:var(--muted)}
.rarity-group summary b{margin-left:auto;font:600 .85rem monospace}
.rarity-group summary:after{content:'+';width:1.1rem;text-align:center}
.rarity-group[open] summary:after{content:'−'}
.swatch{width:16px;height:22px;border-radius:4px;border:1px solid #746d68;background:#fffaf1}
.swatch-1{background:#b5e4cd}.swatch-2{background:#a6d7fa}.swatch-3{background:#dbb9fb}.swatch-4{background:linear-gradient(120deg,#c99336,#fff1b4,#e8ba60)}
.answer-chips{display:flex;flex-wrap:wrap;gap:6px;padding:2px 0 14px}
.answer-chip{background:var(--paper);border:1px solid var(--rule);border-radius:7px;padding:5px 9px;font-size:.94rem;overflow-wrap:anywhere;max-width:100%}
.answer-chip b{color:#564072}.book-ref{align-self:flex-start;font-size:.85rem}
dialog:has(#book-search) #close{align-self:flex-end;min-height:44px;margin-top:8px}
@media(max-width:620px){header{height:60px}.dispatch{padding:12px 15px}dialog:has(#book-search){padding:14px}.receipt-pick button{min-height:44px}}

.room-form{display:grid;gap:14px;max-width:34rem}.room-form label{display:grid;gap:4px;font-weight:600}.room-form select{font:inherit;padding:10px}.room-form fieldset,.room-settings{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:10px}.room-form fieldset{border:1px solid var(--rule);border-radius:8px}.room-code{font-family:monospace;letter-spacing:.12em}.party-roster{list-style:none;padding:0;max-width:34rem}.party-roster li{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid var(--rule);padding:7px 0}.party-roster b{overflow-wrap:anywhere}.party-panel button:disabled{opacity:.55}
@media(max-width:620px),(max-height:500px) and (pointer:coarse){main:has(.party-panel){display:flex;flex-direction:column}#panel.party-panel{order:-1;padding-top:10px}main:has(.party-panel) .window{display:none}.room-form input{font-size:16px}}
