/* Look: DESIGN.md ("Pályatábla és liftjegy"). Flat signs, hard 3px shadows, square corners, no gradients.
   The playfield is a portrait box that fills a phone; on wider screens it stays centred between dark bands. */
:root {
  color-scheme: dark;
  --night: #14213D; --night-deep: #0C1529; --snow: #F3F7FB; --glacier: #BFD9EA;
  --piste-red: #D62839; --piste-black: #11131A; --lamp: #FFB627; --faint: #8FA6C4;
  --box: #2A1B2E; --box-edge: #D9B98C;
  --sign: "VT323", "Courier New", monospace; --read: "Barlow", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--night-deep); }
body { color: var(--snow); font-family: var(--read); font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
#stage { position: fixed; inset: 0; margin: 0 auto; width: min(100vw, 56.25vh); width: min(100vw, 56.25dvh); overflow: hidden;
  background: var(--piste-black); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#game { position: absolute; left: 0; top: 0; image-rendering: pixelated; display: block; }
#labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.namesign { position: absolute; left: 0; top: 0; height: 18px; padding: 0 6px; overflow: hidden; white-space: nowrap; will-change: transform;
  font: 18px/20px var(--sign); background: var(--night); color: var(--snow); box-shadow: 2px 2px 0 var(--piste-black); }
.namesign.own { background: var(--lamp); color: var(--night); }
#ui { position: absolute; inset: 0; pointer-events: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
#ui > * { pointer-events: auto; }
#fade { position: absolute; inset: 0; background: #000; opacity: 1; pointer-events: none; transition: opacity .22s linear; }
@media (prefers-reduced-motion: reduce) { #fade { transition: none; } }
button { font: inherit; color: inherit; cursor: pointer; border-radius: 0; touch-action: manipulation; }
button:focus-visible, input:focus-visible, .dialog:focus-visible { outline: 3px solid var(--lamp); outline-offset: 2px; }
img, canvas { image-rendering: pixelated; }

.board { background: var(--night); border: 2px solid var(--snow); box-shadow: 3px 3px 0 var(--piste-black); }
.primary { min-height: 48px; width: 100%; padding: 8px 12px; font-family: var(--sign); font-size: 24px; background: var(--piste-red); color: var(--snow); border: 0; box-shadow: 3px 3px 0 var(--piste-black); }
.primary:disabled { opacity: .6; }

/* village HUD */
.hud { position: absolute; left: 8px; right: 8px; top: calc(8px + env(safe-area-inset-top)); display: flex; justify-content: space-between; gap: 8px; pointer-events: none !important; }
.hud .board { padding: 3px 8px; display: flex; gap: 5px; align-items: center; font-family: var(--sign); font-size: 20px; line-height: 1.15; }
.ticket { width: 32px; height: 20px; background: var(--snow); color: var(--night); font-family: var(--sign); font-size: 17px; display: grid; place-items: center; border-left: 3px dashed var(--night); }
.ticket.used { background: var(--faint); position: relative; }
.ticket.used::after { content: ""; position: absolute; right: 3px; top: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--night); }
.enter { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); min-height: 48px; padding: 8px 20px; white-space: nowrap;
  font-family: var(--sign); font-size: 24px; background: var(--lamp); color: var(--night); border: 2px solid var(--night); box-shadow: 3px 3px 0 var(--piste-black); }

#ui:has(.dialog) .enter, #ui:has(.dialog) .hud { display: none; } /* nothing else competes with a dialogue */

/* dialogue */
.dialog { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 12px; background: rgba(12, 21, 41, .55); cursor: pointer; }
.dialog.solo { justify-content: flex-end; gap: 10px; }
.speech { position: relative; margin-top: 78px; transition: opacity .15s; }
.speech.quiet { opacity: .45; }
.bust { position: absolute; bottom: 0; width: 150px; height: 150px; pointer-events: none; }
.left .bust { left: -10px; } .right .bust { right: -10px; }
.bubble { background: var(--box); border: 3px solid var(--box-edge); min-height: 96px; padding: 8px 10px; font-family: var(--sign); font-size: 21px; line-height: 1.08; color: var(--snow); }
.left .bubble { padding-left: 140px; } .right .bubble { padding-right: 140px; }
.right.plain .bubble { padding-right: 10px; }
.nameplate { display: inline-block; background: var(--box-edge); color: var(--box); padding: 0 8px; margin-bottom: 4px; font-size: 20px; }
.answers { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.answer { min-height: 44px; font-family: var(--sign); font-size: 22px; text-align: left; padding: 7px 10px; background: var(--box); color: var(--snow); border: 3px solid var(--box-edge); }
.answer:hover, .answer:focus-visible { background: var(--lamp); color: var(--night); }
.dialog .hint, .liftride .hint { align-self: center; font-family: var(--sign); font-size: 19px; color: var(--night); background: var(--lamp); padding: 0 8px; pointer-events: none; }

/* wardrobe */
.wardrobe { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--night); padding-bottom: env(safe-area-inset-bottom); }
.room { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #2a1c14 url(art/pixellab/oltozo-hatter-01/oltozo-256x320.png) center bottom / cover; image-rendering: pixelated; }
.room canvas { position: absolute; left: 50%; bottom: -3%; height: 92%; aspect-ratio: 1; transform: translateX(-46%); }
.room .gear { position: absolute; left: 5%; bottom: 8%; height: 62%; }
.room .gear.locked { filter: brightness(.35) saturate(.3); }
.room .note { position: absolute; left: 8px; right: 8px; top: calc(8px + env(safe-area-inset-top)); padding: 4px 8px; font-family: var(--sign); font-size: 20px; line-height: 1.1; border-color: var(--lamp); }
.picker { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; border-top: 2px solid var(--night-deep); background: var(--snow); color: var(--night); }
.picker span { text-align: center; line-height: 1.1; }
.picker small { display: block; font-family: var(--sign); font-size: 16px; color: #3d5273; }
.picker b { font-weight: 600; font-size: 16px; }
.arrow { height: 44px; font-family: var(--sign); font-size: 28px; background: var(--night); color: var(--snow); border: 0; }
.wardrobe .primary { box-shadow: none; }
.designs { flex: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; padding: 6px; max-height: 26vh; overflow-y: auto; touch-action: pan-y; background: var(--night-deep); border-top: 2px solid var(--night-deep); }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; min-height: 96px; padding: 3px; background: var(--night); color: var(--snow); border: 2px solid transparent; }
.tile img, .tile .swatch { height: 64px; width: auto; max-width: 100%; object-fit: contain; image-rendering: pixelated; }
.tile .swatch { width: 14px; display: block; border: 1px solid var(--piste-black); }
.tile small { font-size: 11px; line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
.tile[aria-selected="true"] { border-color: var(--lamp); background: #24345c; }
.tile.locked img, .tile.locked .swatch { filter: brightness(.5) saturate(.4); }
.tile.locked small { color: var(--faint); }

/* login: the form is a lift ticket */
.login { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 24px 20px; }
.login h1 { margin: 0; font-family: var(--sign); font-weight: 400; font-size: 64px; line-height: .9; color: var(--snow); text-shadow: 4px 4px 0 var(--piste-black); }
.liftticket { position: relative; background: var(--snow); color: var(--night); padding: 20px 18px 18px 26px; border-left: 8px dashed var(--night-deep); box-shadow: 5px 5px 0 var(--piste-black); }
.liftticket .hole { position: absolute; right: 14px; top: 14px; width: 18px; height: 18px; border-radius: 50%; background: var(--night-deep); }
.liftticket label, .liftticket .ask { display: block; margin: 0 0 6px; font-weight: 600; max-width: 26ch; }
.liftticket .who { margin: 0 0 4px; font-family: var(--sign); font-size: 34px; line-height: 1; }
.liftticket input { width: 100%; height: 52px; margin-bottom: 14px; padding: 0 12px; font-family: var(--sign); font-size: 30px; letter-spacing: .06em; color: var(--night); background: #fff; border: 2px solid var(--night); border-radius: 0; }
.names { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 46vh; overflow-y: auto; touch-action: pan-y; margin-bottom: 12px; padding: 2px; }
.name { min-height: 44px; font-family: var(--sign); font-size: 24px; background: var(--night); color: var(--snow); border: 0; }
.back { margin-top: 12px; min-height: 44px; padding: 0 4px; background: none; border: 0; font-weight: 600; text-decoration: underline; color: var(--night); }
.error { margin: 12px 0 0; padding: 6px 10px; background: var(--night); color: var(--snow); border-left: 6px solid var(--piste-red); }

/* hutte interior */
.hutte { position: absolute; inset: 0; pointer-events: none !important; }
.hutte > * { pointer-events: auto; }
.person { position: absolute; background: none; border: 0; padding: 0; display: flex; justify-content: center; align-items: flex-start; }
.tag { font-family: var(--sign); font-size: 19px; line-height: 1.1; padding: 0 6px; background: var(--night); color: var(--snow); box-shadow: 2px 2px 0 var(--piste-black); transform: translateY(-110%); white-space: nowrap; }
.person:hover .tag, .person:focus-visible .tag { background: var(--lamp); color: var(--night); }

/* ---------- the run: lift, HUD, run end, piste board, km (DESIGN.md: boards, discs, lift tickets; piste colours only for levels) */
:root { --piste-blue: #1F6FD0; --yeti: #7A4FB5; }
.disc { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--snow); background: var(--piste-black); flex: none; }
.easy .disc { background: var(--piste-blue); } .normal .disc { background: var(--piste-red); } .hard .disc { background: var(--piste-black); }
:is(.liftpick, .runend, .kmpanel, .boardpanel) .row { display: flex; gap: 8px; }
:is(.liftpick, .runend, .kmpanel, .boardpanel) .small { margin: 0; font-size: 14px; line-height: 1.35; color: var(--glacier); }
:is(.liftpick, .runend, .kmpanel, .boardpanel) .small.strong { color: var(--snow); font-weight: 600; }
:is(.liftpick, .runend, .kmpanel, .boardpanel) .second { min-height: 48px; width: 100%; padding: 8px 12px; font-family: var(--sign); font-size: 24px; background: var(--night); color: var(--snow); border: 2px solid var(--snow); box-shadow: 3px 3px 0 var(--piste-black); }
:is(.liftpick, .runend, .kmpanel, .boardpanel) .second.plain { border-color: transparent; box-shadow: none; background: none; text-decoration: underline; min-height: 44px; font-size: 21px; }
:is(.liftpick, .runend, .kmpanel, .boardpanel) .pick { flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 4px; font-family: var(--sign); font-size: 24px; line-height: 1;
  background: var(--night-deep); color: var(--snow); border: 2px solid var(--faint); }
:is(.liftpick, .runend, .kmpanel, .boardpanel) .pick .disc { width: 30px; height: 30px; border-width: 3px; }
:is(.liftpick, .runend, .kmpanel, .boardpanel) .pick.wide { min-height: 48px; }
:is(.liftpick, .runend, .kmpanel, .boardpanel) .pick[aria-pressed="true"] { background: var(--lamp); color: var(--night); border-color: var(--snow); box-shadow: 3px 3px 0 var(--piste-black); }
:is(.liftpick, .runend, .kmpanel, .boardpanel) .pick[aria-pressed="true"]::after { content: "\2713"; position: absolute; right: 5px; top: 1px; font-size: 20px; }
:is(.liftpick, .runend, .kmpanel, .boardpanel) .pick { position: relative; }
:is(.liftpick, .runend, .kmpanel, .boardpanel) .pick[aria-disabled="true"] { opacity: .55; }

.liftpick { position: absolute; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; padding: 12px;
  background: var(--night); border: 2px solid var(--snow); box-shadow: 3px 3px 0 var(--piste-black); }
.liftpick h2, .runend h2, .boardpanel h2 { margin: 0; font-family: var(--sign); font-weight: 400; font-size: 32px; line-height: 1; }
.liftpick .error { margin: 0; }
.liftride { position: absolute; inset: 0; pointer-events: none !important; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; padding: calc(8px + env(safe-area-inset-top)) 8px calc(20px + env(safe-area-inset-bottom)); }
.liftride .board { max-width: 62%; padding: 4px 8px; font-family: var(--sign); font-size: 21px; line-height: 1.1; }
.liftride .hint { align-self: center; }

.runhud { position: absolute; inset: 0; pointer-events: none !important; font-family: var(--sign); }
#ui:has(.dialog) .runhud { display: none; }
.runhud .top { position: absolute; left: 8px; right: 8px; top: calc(8px + env(safe-area-inset-top)); display: flex; justify-content: space-between; align-items: flex-start; }
.runhud .board { padding: 4px 8px; line-height: 1; }
.runhud .left { display: flex; flex-direction: column; gap: 4px; font-size: 24px; }
.runhud .right { text-align: right; min-width: 104px; }
.lives { display: flex; gap: 4px; }
.life { width: 18px; height: 16px; background: var(--piste-red); clip-path: polygon(0 20%, 20% 0, 50% 22%, 80% 0, 100% 20%, 100% 55%, 50% 100%, 0 55%); }
.life.lost { background: var(--faint); opacity: .5; }
.relicdist { color: var(--lamp); font-size: 21px; }
.score { font-size: 40px; }
.combo { font-size: 22px; color: var(--lamp); }
.runhud .bar { position: absolute; left: 8px; right: 8px; top: calc(86px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 8px; padding: 4px 8px; font-size: 20px; }
.meter { display: flex; gap: 3px; }
.meter i { width: 16px; height: 10px; border: 2px solid var(--faint); opacity: .45; }
.meter i.on { border-color: var(--snow); opacity: 1; height: 16px; }
.tier { min-width: 52px; }
.flow { flex: 1; height: 10px; background: var(--night-deep); border: 2px solid var(--faint); }
.flow i { display: block; height: 100%; width: 0; background: var(--glacier); }
.flow.full { border-color: var(--snow); } .flow.full i { background: var(--snow); }
.toast { position: absolute; left: 50%; top: calc(126px + env(safe-area-inset-top)); white-space: nowrap; transform: translateX(-50%); max-width: 92%; padding: 2px 10px; text-align: center; font-size: 26px; line-height: 1.1; background: var(--snow); color: var(--night); box-shadow: 3px 3px 0 var(--piste-black); }
.toast.bad { background: var(--piste-black); color: var(--snow); border-left: 6px solid var(--piste-red); }
.runhud .note { position: absolute; left: 8px; right: 8px; bottom: calc(64px + env(safe-area-inset-bottom)); padding: 6px 10px; font-size: 22px; line-height: 1.1; border-color: var(--lamp); }
.count { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-size: 150px; line-height: 1; color: var(--snow); text-shadow: 6px 6px 0 var(--piste-black); }
.runhint { position: absolute; left: 8px; right: 8px; top: 62%; padding: 8px 10px; font-size: 24px; line-height: 1.1; text-align: center; }

.runend { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom)); overflow-y: auto; }
.sheet { flex: none; padding: 12px; display: flex; flex-direction: column; gap: 4px; margin-bottom: auto; }
.bigscore { font-family: var(--sign); font-size: 84px; line-height: .9; color: var(--snow); }
.runend .rank { margin: 0 0 6px; padding: 2px 8px; align-self: flex-start; font-family: var(--sign); font-size: 26px; line-height: 1.1; background: var(--lamp); color: var(--night); }
.runend .stat { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--night-deep); }
.runend .stat b { font-family: var(--sign); font-weight: 400; font-size: 26px; line-height: 1.15; }
.relicline { margin: 6px 0 0; padding: 4px 8px; border-left: 6px solid var(--lamp); background: var(--night-deep); font-weight: 600; }
.runend .ask p { margin: 6px 0; font-weight: 600; }
.runend .primary:disabled { display: none; } /* no ticket left: only the way back remains */

.boardpanel { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom)); background: var(--night); }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tab { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 2px 4px; font-family: var(--sign); font-size: 20px; line-height: 1; background: var(--night-deep); color: var(--snow); border: 2px solid var(--faint); }
.tab[aria-pressed="true"] { background: var(--snow); color: var(--night); border-color: var(--snow); }
.tab[aria-pressed="true"] .disc { border-color: var(--night); }
.rows { flex: 1; min-height: 0; overflow-y: auto; touch-action: pan-y; display: flex; flex-direction: column; gap: 3px; }
.lrow { display: grid; grid-template-columns: 34px 30px 1fr auto; align-items: center; gap: 6px; min-height: 40px; padding: 2px 8px; background: var(--snow); color: var(--night); }
.lrow.me { background: var(--lamp); }
.lrow .lb-rank, .lrow b { font-family: var(--sign); font-weight: 400; font-size: 26px; }
.lrow .who { font-weight: 600; line-height: 1.15; }
.lrow em { font-style: normal; margin-left: 6px; padding: 0 6px; background: var(--night); color: var(--lamp); font-family: var(--sign); font-size: 18px; }
.lrow small { display: block; font-weight: 400; font-size: 14px; }
.boardpanel .head { width: 26px; height: 26px; background: var(--glacier); }
.boardpanel .state { margin: 24px 8px; font-size: 18px; max-width: 30ch; }
.tarp { flex: 1; display: grid; place-items: center; padding: 20px; color: var(--snow); font-family: var(--sign); font-size: 28px; line-height: 1.1; text-align: center;
  background: repeating-linear-gradient(115deg, #3d4a3a 0 26px, #354232 26px 52px); border: 4px solid #232c21; box-shadow: inset 0 -12px 0 #2a3428; }
.kmpanel { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 24px 20px; background: rgba(12, 21, 41, .8); }
.kmpanel .small.strong { color: var(--night); margin-bottom: 12px; }

/* behind the village doors (scenes/place.js): every offer is a ticket, the price is its tear-off stub */
.place { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--night); }
.place-head { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: end; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: var(--night-deep); border-bottom: 2px solid var(--snow); }
.place-head .house { width: 64px; height: 64px; object-fit: contain; object-position: bottom; }
.place-head h1 { margin: 0; font-family: var(--sign); font-weight: 400; font-size: 30px; line-height: .9; text-shadow: 3px 3px 0 var(--piste-black); }
.flake { display: inline-block; width: 18px; height: 18px; margin-right: 5px; vertical-align: -2px; background: currentColor;
  --flake: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Cpath d='M4 0h1v9h-1zM0 4h9v1h-9zM1 1h1v1h-1zM2 2h1v1h-1zM6 2h1v1h-1zM7 1h1v1h-1zM2 6h1v1h-1zM1 7h1v1h-1zM6 6h1v1h-1zM7 7h1v1h-1zM3 0h3v1h-3zM3 8h3v1h-3zM0 3h1v3h-1zM8 3h1v3h-1z'/%3E%3C/svg%3E");
  -webkit-mask: var(--flake) center / contain no-repeat; mask: var(--flake) center / contain no-repeat; }
.purse { align-self: center; padding: 4px 10px 4px 12px; white-space: nowrap; font-family: var(--sign); font-size: 28px; line-height: 1; background: var(--snow); color: var(--night); border-left: 3px dashed var(--night); box-shadow: 3px 3px 0 var(--piste-black); }
.place .status { margin: 10px 12px 0; padding: 6px 10px; background: var(--night-deep); border-left: 6px solid var(--lamp); }
.place .status.bad { border-left-color: var(--piste-red); }
.offers { flex: 1; min-height: 0; overflow-y: auto; touch-action: pan-y; display: flex; flex-direction: column; gap: 8px; padding: 12px 15px 14px 12px; }
.offers h2 { margin: 8px 0 0; font-family: var(--sign); font-weight: 400; font-size: 24px; line-height: 1; color: var(--glacier); }
.offers .note { margin: 0; padding: 8px 10px; background: var(--snow); color: var(--night); box-shadow: 3px 3px 0 var(--piste-black); }
.offer { flex: none; display: flex; align-items: stretch; width: 100%; min-height: 60px; padding: 0; text-align: left; background: var(--snow); color: var(--night); border: 0; box-shadow: 3px 3px 0 var(--piste-black); }
.offer:disabled { opacity: .6; }
.offer .what { flex: 1; align-self: center; padding: 8px 10px; }
.offer b { display: block; font-weight: 600; font-size: 17px; line-height: 1.2; }
.offer small { display: block; font-size: 14px; line-height: 1.3; color: #3d5273; }
.offer small.now { font-weight: 600; color: var(--night); }
.offer .stub { flex: none; display: flex; align-items: center; justify-content: center; min-width: 88px; padding: 0 10px; font-family: var(--sign); font-size: 28px; line-height: 1; background: var(--piste-red); color: var(--snow); border-left: 3px dashed var(--night); }
.offer.short .stub { background: var(--faint); color: var(--night); }
.offer.owned .stub { background: var(--lamp); color: var(--night); font-size: 22px; }
.offer.off .stub { background: var(--night-deep); color: var(--snow); font-size: 22px; }
.offer.locked { background: #24345c; color: var(--faint); box-shadow: none; }
.offer.locked small { color: var(--faint); }
.offer.locked .stub { background: var(--piste-black); color: var(--faint); font-size: 22px; border-left-color: var(--faint); }
.offer.locked .icon { filter: brightness(.35) saturate(.3); }
.offer.menu { min-height: 64px; border-left: 8px solid var(--lamp); }
.offer .icon { image-rendering: pixelated; flex: none; align-self: center; width: 40px; height: 56px; margin-left: 8px; object-fit: contain; }
.offer .icon.relic { height: 40px; background: var(--night); box-shadow: inset 0 0 0 3px var(--lamp), inset 0 0 0 9px var(--night), inset 0 0 0 40px var(--glacier); }
.leave { flex: none; min-height: 48px; margin: 0 15px calc(12px + env(safe-area-inset-bottom)) 12px; font-family: var(--sign); font-size: 24px; color: var(--snow); }

/* village HUD, second row: the purse and the day's boss */
.hud { flex-wrap: wrap; }
.hud .purse { font-size: 22px; padding: 3px 8px 3px 10px; }
.hud .purse .flake { width: 14px; height: 14px; vertical-align: -1px; }
.hud .boss { flex: 1; min-width: 0; display: block; padding: 2px 8px 5px; }
.hud .boss i { display: block; height: 6px; margin-top: 2px; background: var(--piste-black); }
.hud .boss i b { display: block; height: 100%; background: var(--piste-red); }
.hud .row { flex-basis: 100%; display: flex; gap: 8px; align-items: flex-start; }
.hutte .bar { position: absolute; right: 12px; top: calc(12px + env(safe-area-inset-top)); min-height: 48px; padding: 8px 20px; font-family: var(--sign); font-size: 24px; background: var(--lamp); color: var(--night); border: 2px solid var(--night); box-shadow: 3px 3px 0 var(--piste-black); }
body[data-blur] #game { filter: blur(2px); }

/* inbox effects (ui/inbox.js): behind the dialogue's box, in front of the village */
.inboxfx { position: absolute; inset: 0; overflow: hidden; pointer-events: none !important; }
.inboxfx img { position: absolute; image-rendering: pixelated; }
.inboxfx.vanish img { animation: inbox-slap .25s ease-out both; }
@keyframes inbox-slap { from { opacity: 0; filter: brightness(2); } to { opacity: 1; } }

/* Admin preview (?preview=): a bar over the game, taps pass through it */
.previewbar { position: fixed; z-index: 9999; left: 0; right: 0; top: 0; padding: 3px 8px; text-align: center; font: 600 13px/1.3 Barlow, system-ui, sans-serif; letter-spacing: .08em;
  background: #FFB627; color: #11131A; pointer-events: none; }

/* dev: time-travel view (?day=N&hour=H) and its panel (?dev=1) */
.hud .board.devbar { position: absolute; left: 50%; top: 96px; transform: translateX(-50%); white-space: nowrap; background: var(--piste-red); font-size: 17px; }
.devpanel { position: absolute; left: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); font-family: var(--sign); font-size: 18px; color: var(--snow); }
.devpanel > button { padding: 4px 10px; background: var(--night); border: 2px solid var(--snow); box-shadow: 3px 3px 0 var(--piste-black); }
.devpanel .box { margin-top: 6px; padding: 8px; background: var(--night); border: 2px solid var(--snow); box-shadow: 3px 3px 0 var(--piste-black); display: grid; gap: 6px; max-width: 330px; }
.devpanel .box div { display: flex; flex-wrap: wrap; gap: 4px; }
.devpanel .box button { min-width: 40px; min-height: 36px; padding: 2px 6px; background: var(--night); color: var(--snow); border: 2px solid var(--glacier); font-size: 17px; }
.devpanel .box button[aria-pressed="true"] { background: var(--lamp); color: var(--night); border-color: var(--lamp); }
.devpanel p { margin: 0; font-size: 15px; color: var(--glacier); }
.hutte .note { position: absolute; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); margin: 0; padding: 8px 10px; font-family: var(--sign); font-size: 20px; line-height: 1.2; text-align: center; }
