:root {
  --ink: #2b211d; --cream: #fff4dc; --paper: #fffaf0; --orange: #f07a22; --orange-d: #c65d14; --blue: #3a8fd8;
  --bg: #1f2a26; --bg2: #2a3833; --good: #5fbf5a; --warn: #f2b134; --bad: #e0503f;
  --u: 1px; /* one world unit in CSS pixels, set from JS */
  font-family: Fredoka, "Trebuchet MS", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

#app { position: fixed; inset: 0; }
#stage { position: absolute; left: 0; top: 0; overflow: hidden; background: #1f2a26; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- in-game HUD (sized in world units so it scales with the locked camera) ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; font-size: calc(var(--u) * 15); }
#topbar { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--u) * 58); display: flex; align-items: center; justify-content: space-between;
  padding: 0 calc(var(--u) * 14); background: linear-gradient(#1f2a26f0, #1f2a26c0); border-bottom: calc(var(--u) * 3) solid var(--orange); color: var(--cream); }
.brand { display: flex; flex-direction: column; line-height: .9; font-size: calc(var(--u) * 18); }
.brand b { color: var(--cream); } .brand i { color: var(--orange); font-style: normal; font-weight: 700; }
.scores { display: flex; align-items: center; gap: calc(var(--u) * 22); }
.score { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.score span { font-size: calc(var(--u) * 11); letter-spacing: .08em; opacity: .8; text-transform: uppercase; }
.score b { font-size: calc(var(--u) * 26); }
.score.mine b { color: #ffd38a; display: inline-block; }
.score.mine b.pop { animation: cash-pop .5s ease-out; }
@keyframes cash-pop { 30% { transform: scale(1.25); color: #9ff09a; } }
.score small { font-size: calc(var(--u) * 11); opacity: .85; margin-top: calc(var(--u) * 2); white-space: nowrap; }
.t-story { font-size: calc(var(--u) * 11.5); font-style: italic; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: calc(var(--u) * 2); } .score.rival b { color: #9fd0ff; }
#clock { font-size: calc(var(--u) * 34); font-weight: 700; min-width: calc(var(--u) * 100); text-align: center; font-variant-numeric: tabular-nums; }
#clock.low { color: #ff8a7a; }
.buttons { display: flex; gap: calc(var(--u) * 8); pointer-events: auto; }
.ghost { width: calc(var(--u) * 40); height: calc(var(--u) * 40); border-radius: calc(var(--u) * 10); border: calc(var(--u) * 2) solid #ffffff40; background: #ffffff14; color: var(--cream); font-size: calc(var(--u) * 17); font-weight: 700; }
#btn-matt-joke[aria-pressed="true"]{background:#f07a22;border-color:#ffdb63}

#tickets { position: absolute; right: calc(var(--u) * 10); top: calc(var(--u) * 68); width: calc(var(--u) * 236); display: flex; flex-direction: column; gap: calc(var(--u) * 8); pointer-events: auto; }
.ticket { background: var(--paper); border: calc(var(--u) * 3) solid var(--ink); border-radius: calc(var(--u) * 12); padding: calc(var(--u) * 7) calc(var(--u) * 9); box-shadow: 0 calc(var(--u) * 4) 0 #0004; }
.ticket.truck { background: #fff5cf; }
.ticket.ready { background: #e3f5d8; }
.ticket.done { opacity: .75; }
.ticket.late { animation: shake .5s infinite; }
@keyframes shake { 50% { transform: translateX(calc(var(--u) * 2)); } }
.t-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.t-head b { font-size: calc(var(--u) * 16); }
.t-head span { font-size: calc(var(--u) * 12); opacity: .75; }
.t-status { font-size: calc(var(--u) * 12); margin: calc(var(--u) * 2) 0 calc(var(--u) * 4); }
.t-destination{font-size:calc(var(--u)*11);font-weight:700;color:#285d53;background:#e0eee6;border-radius:5px;padding:3px 5px;margin:3px 0;line-height:1.25}.t-handoff{font-size:calc(var(--u)*10);color:#71501e;background:#fff0bd;padding:3px 5px;border-radius:4px;margin-top:4px}#team-balance{padding:10px 0}#team-balance p{font-size:13px;margin:0 0 8px}
.bar { height: calc(var(--u) * 6); border-radius: 99px; background: #0001; overflow: hidden; border: calc(var(--u) * 1.5) solid var(--ink); }
.bar i { display: block; height: 100%; background: var(--good); }
.lines { display: flex; flex-wrap: wrap; gap: calc(var(--u) * 4); margin-top: calc(var(--u) * 5); }
.line { display: flex; align-items: center; gap: calc(var(--u) * 2); background: #fff; border: calc(var(--u) * 2) solid #2b211d40; border-radius: calc(var(--u) * 8); padding: calc(var(--u) * 1) calc(var(--u) * 6) calc(var(--u) * 1) calc(var(--u) * 1); font-weight: 700; font-size: calc(var(--u) * 13); }
.line img { width: calc(var(--u) * 28); height: calc(var(--u) * 28); }
.line.ok { background: #cfeec4; border-color: var(--good); }
.line.carried { background: #fff3c9; border-color: var(--claim, #f6c544); }
.line .hand { font-size: calc(var(--u) * 11); margin-left: calc(var(--u) * 3); color: #9a6b12; }
.line .special { font-size: calc(var(--u) * 10); margin-left: calc(var(--u) * 4); padding: 0 calc(var(--u) * 3); border-radius: calc(var(--u) * 4); background: #ffcf4c; color: #2b211d; }
.ticket .name { display: none; }
.ticket.expanded .name { display: inline; font-weight: 500; font-size: calc(var(--u) * 12); }

#toasts { position: absolute; z-index: 6; left: 50%; top: calc(var(--u) * 70); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 6); pointer-events: none; font-size: calc(var(--u) * 16); }
.toast { background: var(--paper); border: calc(var(--u) * 3) solid var(--ink); border-radius: 99px; padding: calc(var(--u) * 5) calc(var(--u) * 16); font-weight: 700; animation: pop .25s ease-out; box-shadow: 0 calc(var(--u) * 3) 0 #0004; white-space: nowrap; }
.toast.bad { background: #ffe0d8; } .toast.good { background: #dff5d3; } .toast.info { background: #fff5cf; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }

#countdown { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #1f2a2680; color: var(--cream); }
#countdown b { font-size: calc(var(--u) * 180); line-height: 1; -webkit-text-stroke: calc(var(--u) * 6) var(--ink); color: var(--orange); }
#countdown span { font-size: calc(var(--u) * 36); font-weight: 700; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: #1f2a26a0; font-size: calc(var(--u) * 16); }
.overlay .card { background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; padding: 20px 28px; text-align: center; }

/* ---------- menus ---------- */
.screen { position: absolute; inset: 0; overflow-y: auto; display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px;
  background: radial-gradient(circle at 30% 10%, #3b4a43, var(--bg) 70%); touch-action: pan-y; }
.menu-card { width: min(560px, 100%); background: var(--paper); border: 4px solid var(--ink); border-radius: 22px; padding: 22px; box-shadow: 0 8px 0 #0006; margin: auto 0; }
.menu-card.wide { width: min(820px, 100%); }
.logo { margin: 0; line-height: .85; font-size: clamp(40px, 10vw, 64px); text-align: center; }
.logo b { display: block; color: var(--ink); } .logo i { display: block; color: var(--orange); font-style: normal; -webkit-text-stroke: 2px var(--ink); }
.tag { text-align: center; margin: 10px 0 16px; }
.field { display: flex; flex-direction: column; font-weight: 700; gap: 4px; margin-bottom: 14px; }
input { font: inherit; font-size: 18px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink); -webkit-user-select: text; user-select: text; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode { text-align: left; padding: 14px; border: 3px solid var(--ink); border-radius: 16px; background: var(--orange); color: #fff; box-shadow: 0 5px 0 var(--ink); display: flex; flex-direction: column; gap: 4px; }
.mode[data-mode=versus] { background: var(--blue); }
.mode b { font-size: 21px; } .mode span { font-size: 14px; opacity: .95; }
.mode:active, button:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.join { display: flex; gap: 8px; margin-top: 14px; }
.join input { flex: 1; text-transform: uppercase; letter-spacing: .2em; min-width: 0; }
.join #join-pass { flex: .9; letter-spacing: .1em; }
.join #join-pass.ask { border-color: var(--orange); box-shadow: 0 0 0 3px #f07a2255; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 15px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--orange); flex: none; }
button:not(.mode):not(.ghost):not(.tb):not(.ghost-light) { padding: 10px 18px; border: 3px solid var(--ink); border-radius: 12px; background: var(--good); color: #fff; font-weight: 700; font-size: 17px; box-shadow: 0 4px 0 var(--ink); }
button.secondary { background: #e8e2d6 !important; color: var(--ink) !important; }
button:disabled { opacity: .5; }
.ghost-light { padding: 8px 12px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; font-weight: 600; }
#room-list { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.room-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 2px solid #2b211d40; border-radius: 12px; padding: 6px 6px 6px 12px; }
.room-row small { display: block; opacity: .7; }
.room-row.locked button { background: #e8e2d6 !important; color: var(--ink) !important; }
#room-list .empty { font-size: 14px; opacity: .7; }
.room-row button { padding: 6px 14px !important; font-size: 15px !important; }
.conn { text-align: center; font-size: 13px; opacity: .7; margin: 12px 0 0; }
.lobby-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.lobby-head h2 { margin: 0; font-size: 28px; } .lobby-head b { color: var(--orange); letter-spacing: .12em; }
.lobby-head small { font-weight: 700; opacity: .7; text-transform: uppercase; letter-spacing: .08em; }
#teams { display: grid; gap: 12px; margin: 16px 0; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.team { border: 3px solid var(--ink); border-radius: 16px; padding: 10px; background: #fff; }
.team h3 { margin: 0 0 8px; display: flex; justify-content: space-between; align-items: center; }
.team h3 span { font-size: 14px; opacity: .7; }
.member { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; font-weight: 600; }
.member:nth-child(odd) { background: #0000000a; }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--ink); flex: none; }
.member .mini { width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--ink); background: #fff; object-fit: cover; flex: none; }
#picker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
#picker b { margin-right: 4px; }
#picker button { padding: 3px !important; border-radius: 50% !important; background: #fff !important; box-shadow: 0 3px 0 var(--ink) !important; width: 58px; height: 58px; }
#picker button img { width: 100%; height: 100%; border-radius: 50%; display: block; }
#picker button.on { background: var(--orange) !important; outline: 3px solid var(--orange); outline-offset: 2px; }
#picker button.text { width: auto; border-radius: 12px !important; padding: 6px 10px !important; color: var(--ink) !important; font-size: 14px !important; }
#picker small { flex-basis: 100%; opacity: .7; }
.ready-btn { background: #fff !important; color: var(--ink) !important; }
.ready-btn.on { background: var(--good) !important; color: #fff !important; }
.member .ok { color: #3f9a3a; font-weight: 700; margin-left: 6px; font-size: 13px; }
.member em { margin-left: auto; font-style: normal; font-size: 12px; opacity: .7; }
.team .switch { margin-top: 8px; width: 100%; padding: 6px !important; font-size: 14px !important; background: #fff !important; color: var(--ink) !important; }
.lobby-actions { display: flex; justify-content: space-between; gap: 10px; }
.lobby-actions button:last-child { flex: 1; }
.note { text-align: center; font-size: 14px; opacity: .75; min-height: 1em; }
.how { margin-top: 10px; } .how summary { font-weight: 700; cursor: pointer; } .how li { margin: 6px 0; }
#results-title { text-align: center; font-size: 34px; margin: 0 0 10px; }
.res-stores { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.res-store { border: 3px solid var(--ink); border-radius: 16px; padding: 12px; background: #fff; }
.res-store.win { background: #fff1c4; }
.res-store h3 { margin: 0; display: flex; justify-content: space-between; }
.res-store .big { font-size: 40px; font-weight: 700; color: var(--orange-d); }
.res-store table { width: 100%; border-collapse: collapse; font-size: 14px; }
.res-store td, .res-store th { padding: 3px 4px; text-align: right; } .res-store td:first-child, .res-store th:first-child { text-align: left; }
.awards { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.award { background: var(--cream); border: 2px solid var(--ink); border-radius: 99px; padding: 2px 10px; font-size: 13px; font-weight: 700; }

/* ---------- touch ---------- */
#touch { position: absolute; inset: 0; pointer-events: none; }
#stick-zone { position: absolute; left: 0; top: 15%; bottom: 0; width: 55%; pointer-events: auto; }
#knob { position: absolute; display: none; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 3px solid #fff8; background: #0003; pointer-events: none; }
#knob div { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); }
#touch-buttons { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; gap: 10px; align-items: end; pointer-events: auto; }
.tb { border: 4px solid var(--ink); border-radius: 50%; color: #fff; font-weight: 700; box-shadow: 0 5px 0 var(--ink); line-height: 1; padding: 0; touch-action: none; }
.tb.down { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.tb.big { width: 78px; height: 78px; background: #5fbf5ae6; font-size: 13px; grid-row: 1 / 3; grid-column: 2; padding: 5px; }
.tb.mid { width: 52px; height: 52px; background: #f07a22d9; font-size: 11px; grid-column: 1; grid-row: 1; }
.tb.small { width: 48px; height: 48px; background: #8e8373d9; font-size: 10px; grid-column: 1; grid-row: 2; }
.tb.big.disabled { background: #9a948ab3; }
#touch-buttons { gap: 6px; }

#rotate { position: absolute; inset: 0; z-index: 10; background: var(--bg); color: var(--cream); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; font-size: 20px; font-weight: 700; text-align: center; padding: 20px; }
#rotate .phone { width: 60px; height: 100px; border: 5px solid var(--cream); border-radius: 12px; animation: turn 1.6s ease-in-out infinite; }
@keyframes turn { 50%, 100% { transform: rotate(-90deg); } }

/* phones in landscape: compact tickets */
@media (max-height: 500px) {
  #tickets { width: calc(var(--u) * 300); }
  .ticket { padding: calc(var(--u) * 5) calc(var(--u) * 8); }
  .ticket:not(.expanded) .t-status, .ticket:not(.expanded) .t-story { display: none; }
  .menu-card { padding: 14px; }
}
@media (max-width: 520px) { .modes { grid-template-columns: 1fr; } }
.ticket.truck.idle { opacity: .8; }
.ticket.appliance { border-left: calc(var(--u) * 8) solid #7a8a99; }

/* rush hour */
#rush { position: absolute; left: 50%; top: calc(var(--u) * 120); transform: translateX(-50%); text-align: center; pointer-events: none;
  background: var(--bad); color: #fff; border: calc(var(--u) * 4) solid var(--ink); border-radius: calc(var(--u) * 16);
  padding: calc(var(--u) * 8) calc(var(--u) * 26); box-shadow: 0 calc(var(--u) * 5) 0 #0006; animation: rushIn .5s ease-out, rushOut .6s ease-in 3.2s forwards; }
#rush b { display: block; font-size: calc(var(--u) * 40); line-height: 1; letter-spacing: .04em; }
#rush span { font-size: calc(var(--u) * 17); font-weight: 700; }
@keyframes rushIn { from { transform: translateX(-50%) scale(.4) rotate(-6deg); opacity: 0; } }
@keyframes rushOut { to { transform: translateX(-50%) translateY(calc(var(--u) * -40)); opacity: 0; } }
#hud.rush #topbar { border-bottom-color: var(--bad); background: linear-gradient(#5a1f1af0, #3a1f1ac0); }
#hud.rush #clock { color: #ff8a7a; animation: pulse .8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }
.rush-chip { display: none; background: var(--bad); color: #fff; border-radius: 99px; padding: 0 calc(var(--u) * 8); font-size: calc(var(--u) * 12); font-weight: 700; }
#hud.rush .rush-chip { display: inline-block; }

/* claims */
.ticket { cursor: pointer; }
.ticket.claimed { box-shadow: 0 calc(var(--u) * 4) 0 #0004, inset 0 0 0 calc(var(--u) * 3) var(--claim); }
.claimer { display: inline-block; margin-left: calc(var(--u) * 4); padding: 0 calc(var(--u) * 7); border: calc(var(--u) * 2) solid var(--ink); border-radius: 99px; font-size: calc(var(--u) * 11); font-weight: 700; background: var(--claim); }
.ticket .tap { margin-left: calc(var(--u) * 4); font-size: calc(var(--u) * 10); opacity: .55; }
.ticket.claimed .tap { display: none; }

/* callouts on touch */
.tb.call { width: 52px; height: 52px; background: #3a8fd8d9; font-size: 12px; grid-column: 1; grid-row: 1; position: absolute; right: 140px; bottom: 0; }
#ask { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -62%); width: min(calc(var(--u) * 560), 92%); background: var(--paper); color: var(--ink); border: 4px solid var(--ink); border-radius: 20px; padding: calc(var(--u) * 18) calc(var(--u) * 22); box-shadow: 0 8px 0 #0006; pointer-events: auto; z-index: 6; text-align: center; }
#ask-who { font-size: calc(var(--u) * 13); font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: .05em; }
#ask-q { font-size: calc(var(--u) * 24); font-weight: 700; margin: calc(var(--u) * 6) 0 calc(var(--u) * 12); }
#ask-opts { display: flex; flex-direction: column; gap: calc(var(--u) * 8); }
#ask-opts button { font-size: calc(var(--u) * 18); padding: calc(var(--u) * 10) calc(var(--u) * 14) !important; background: #fff !important; color: var(--ink) !important; text-align: left; }
#ask-opts button b { color: var(--orange); margin-right: 8px; }
#ask-opts button.right { background: #b9f0b4 !important; } #ask-opts button.wrong { background: #f6b8b0 !important; }
#ask-note { min-height: calc(var(--u) * 20); margin-top: calc(var(--u) * 8); font-size: calc(var(--u) * 15); font-weight: 700; }
#call-menu { position: absolute; right: max(150px, env(safe-area-inset-right)); bottom: 70px; display: flex; flex-direction: column; gap: 6px; pointer-events: auto; }
#call-menu button { padding: 8px 14px !important; font-size: 15px !important; background: var(--paper) !important; color: var(--ink) !important; }
@media (max-height: 500px) { .ticket.claimed .t-status { display: block; } }
.ticket.rental { border-left: calc(var(--u) * 8) solid #2f8f8a; }

.ver { margin-top: 4px; }
#news-dot { font-style: normal; font-weight: 700; font-size: 11px; background: var(--orange); color: #fff; border-radius: 99px; padding: 1px 7px; margin-left: 6px; }
#news { width: min(520px, calc(100% - 32px)); max-height: 80vh; overflow-y: auto; background: var(--paper); color: var(--ink); border: 4px solid var(--ink); border-radius: 20px; padding: 18px 22px; box-shadow: 0 8px 0 #0006; }
#news::backdrop { background: #0008; }
#news h2 { margin: 0 0 8px; }
#board { width: min(560px, calc(100% - 32px)); max-height: 82vh; overflow-y: auto; background: var(--paper); color: var(--ink); border: 4px solid var(--ink); border-radius: 20px; padding: 18px 22px; box-shadow: 0 8px 0 #0006; }
#board::backdrop { background: #0008; }
#board h2 { margin: 0 0 8px; }
#board h3 { margin: 14px 0 4px; font-size: 16px; color: var(--orange); }
#board ol { margin: 0; padding: 0; list-style: none; }
#board li { display: grid; grid-template-columns: 30px 82px 1fr; gap: 6px; align-items: baseline; padding: 6px 4px; border-bottom: 2px dashed #cabda2; font-size: 15px; }
#board li b { font-size: 16px; } #board li .place { font-weight: 700; color: var(--orange); }
#board li small { display: block; opacity: .7; font-size: 12px; }
#board li.empty { display: block; opacity: .6; border: 0; }
#board-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
#board-tabs button { padding: 6px 12px !important; font-size: 14px !important; background: #fff !important; color: var(--ink) !important; box-shadow: 0 3px 0 var(--ink) !important; }
#board-tabs button.on { background: var(--orange) !important; color: #fff !important; }
#board .note { font-size: 12px; opacity: .7; margin: 12px 0 0; }
#board-close { margin-top: 12px; width: 100%; }
.receipt-rank { margin: 8px 0 2px; padding: 6px 10px; background: #fff1c4; border: 2px solid #c8901b; border-radius: 10px; font-weight: 700; font-size: 14px; }
.fps-opt { display: flex; align-items: center; gap: 6px; font-size: 14px; }
#fps { position: absolute; left: calc(var(--u) * 10); top: calc(var(--u) * 60); z-index: 5; background: #000b; color: #9ff09a; font: 600 calc(var(--u) * 13) ui-monospace, Consolas, monospace; padding: calc(var(--u) * 3) calc(var(--u) * 8); border-radius: calc(var(--u) * 8); pointer-events: none; }
#news h3 { margin: 14px 0 4px; font-size: 16px; color: var(--orange); }
#news ul { margin: 0; padding-left: 20px; } #news li { margin: 3px 0; font-size: 15px; }
#news-close { margin-top: 14px; width: 100%; }
/* Badges: earned ones in colour, the rest greyed with how to get them. */
#badges { width: min(560px, calc(100% - 32px)); max-height: 80vh; overflow-y: auto; background: var(--paper); color: var(--ink); border: 4px solid var(--ink); border-radius: 20px; padding: 18px 22px; box-shadow: 0 8px 0 #0006; }
#badges::backdrop { background: #0008; }
#badges h2 { margin: 0 0 4px; } #badges-count { margin: 0 0 10px; font-weight: 600; }
#badges-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.badge { display: flex; gap: 8px; align-items: flex-start; border: 3px solid var(--ink); border-radius: 14px; padding: 8px; background: #fff; }
/* Badges sit inside the GPT medal frames (bronze/silver/gold): the icon goes in the medal's round face, low in the image. */
.badge i, i.medal { font-style: normal; font-size: 17px; line-height: 1; width: 46px; height: 46px; padding-top: 13px; box-sizing: border-box; display: grid; place-items: center; background: url(assets/gpt-ui-v1/medal-bronze.png) center / contain no-repeat; flex: none; }
.badge.silver i, i.medal.silver { background-image: url(assets/gpt-ui-v1/medal-silver.png); } .badge.gold i, i.medal.gold { background-image: url(assets/gpt-ui-v1/medal-gold.png); }
.award i.medal { display: inline-grid; vertical-align: middle; width: 32px; height: 32px; padding-top: 9px; font-size: 12px; margin-right: 4px; }
.perks button .perk-icon { width: 24px; height: 24px; object-fit: contain; vertical-align: middle; margin-right: 5px; }
.badge b { display: block; font-size: 14px; } .badge small { font-size: 12px; line-height: 1.25; display: block; }
.badge.locked { background: #f1ebe0; } .badge.locked i { filter: grayscale(1); opacity: .45; } .badge.locked b { opacity: .6; }
#badges-close { margin-top: 14px; width: 100%; }
.link { background: none !important; border: none !important; box-shadow: none !important; padding: 0 !important; color: inherit !important; font-size: inherit !important; text-decoration: underline; cursor: pointer; }
.music-icon.off { opacity: .5; text-decoration: line-through; }
.vol { display: inline-flex; align-items: center; gap: 6px; }
.vol input, #vol-pop input { accent-color: var(--orange); width: 110px; padding: 0; border: 0; background: none; }
.vol-n { min-width: 3.2em; display: inline-block; text-align: left; }
#vol-pop { position: absolute; z-index: 7; right: calc(var(--u) * 150); top: calc(var(--u) * 62); display: flex; align-items: center; gap: 10px;
  background: #fffaf0; color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; padding: 8px 12px; font-weight: 700; box-shadow: 0 4px 0 var(--ink); }
#vol-pop input { width: 150px; }
select.quality { font: inherit; font-size: 14px; padding: 3px 6px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; color: var(--ink); }
#vol-pop { flex-wrap: wrap; max-width: 420px; }

#reconnect { position: absolute; left: 50%; bottom: calc(var(--u) * 20); transform: translateX(-50%); background: var(--warn); border: calc(var(--u) * 3) solid var(--ink);
  border-radius: 99px; padding: calc(var(--u) * 6) calc(var(--u) * 18); font-weight: 700; font-size: calc(var(--u) * 16); white-space: nowrap; z-index: 5; animation: pulse 1s ease-in-out infinite; }

/* game night */
#countdown small { font-size: calc(var(--u) * 20); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
#countdown p { max-width: calc(var(--u) * 640); text-align: center; font-size: calc(var(--u) * 22); font-weight: 600; background: #1f2a26cc;
  border-radius: calc(var(--u) * 14); padding: calc(var(--u) * 10) calc(var(--u) * 18); margin: calc(var(--u) * 12) 0 0; }
#countdown p:empty { display: none; }
.clockbox { display: flex; flex-direction: column; align-items: center; line-height: 1; }
#shift-no { font-size: calc(var(--u) * 11); letter-spacing: .08em; opacity: .8; text-transform: uppercase; }
#settings { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 14px; padding: 10px 12px; border: 2px dashed #2b211d40; border-radius: 14px; }
#settings .group { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#settings b { margin-right: 4px; }
#settings button { padding: 6px 12px !important; font-size: 15px !important; background: #fff !important; color: var(--ink) !important; box-shadow: 0 3px 0 var(--ink) !important; }
#settings button.on { background: var(--orange) !important; color: #fff !important; }
#settings .plan { flex-basis: 100%; font-size: 14px; opacity: .8; }
#settings .pass { font-weight: 700; letter-spacing: .12em; color: var(--orange); }
.night-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 15px; }
.night-table td, .night-table th { padding: 4px 6px; text-align: right; } .night-table td:first-child, .night-table th:first-child { text-align: left; }
.next-up { margin: 12px 0; padding: 10px 14px; border: 3px solid var(--ink); border-radius: 14px; background: #fff5cf; }
.next-up b { display: block; font-size: 18px; }
.progress { display: flex; gap: 6px; justify-content: center; margin: 4px 0 10px; }
.progress i { width: 34px; height: 8px; border-radius: 99px; background: #0001; border: 2px solid var(--ink); }
.progress i.done { background: var(--good); } .progress i.now { background: var(--orange); }
.guide-toggle.off { opacity: .45; }

/* how phones join */
#join-box { display: flex; gap: 14px; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: #e8f3ff; border: 2px solid #3a8fd8; }
#join-box .qr { flex: none; background: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 4px; line-height: 0; }
#join-box .qr svg { width: 132px; height: 132px; }
#join-box .addr { font-size: 22px; font-weight: 700; color: #2a6fae; word-break: break-all; -webkit-user-select: text; user-select: text; }
#join-box small { display: block; opacity: .75; }
#join-box.warn { background: #fff5cf; border-color: var(--warn); }
@media (max-width: 640px) { #join-box .qr { display: none; } }

/* bottom bar: what you're holding (left) and what your buttons do right now (centre), like the mockup */
.ticket .face { width: calc(var(--u) * 30); height: calc(var(--u) * 30); border-radius: 50%; border: calc(var(--u) * 2) solid var(--ink); background: #e8f3ff; margin-right: calc(var(--u) * 6); vertical-align: middle; flex: none; }
.t-head { align-items: center; } .t-head b { display: flex; align-items: center; }
#hands { position: absolute; left: calc(var(--u) * 14); bottom: calc(var(--u) * 14); display: flex; gap: calc(var(--u) * 8); }
#hands .slot { position: relative; width: calc(var(--u) * 62); height: calc(var(--u) * 62); background: var(--paper); border: calc(var(--u) * 3) solid var(--ink); border-radius: calc(var(--u) * 14); box-shadow: 0 calc(var(--u) * 4) 0 #0004; display: grid; place-items: center; }
#hands .slot img { width: 80%; height: 80%; }
#hands .slot b { position: absolute; right: calc(var(--u) * -6); bottom: calc(var(--u) * -6); min-width: calc(var(--u) * 22); height: calc(var(--u) * 22); border-radius: 99px; background: var(--ink); color: #fff; font-size: calc(var(--u) * 13); display: grid; place-items: center; }
#action-bar { position: absolute; left: 50%; bottom: calc(var(--u) * 14); transform: translateX(-50%); display: flex; gap: calc(var(--u) * 8); align-items: center; white-space: nowrap; }
#action-bar .act { display: flex; align-items: center; gap: calc(var(--u) * 10); background: var(--paper); border: calc(var(--u) * 3) solid var(--ink); border-radius: calc(var(--u) * 16);
  padding: calc(var(--u) * 7) calc(var(--u) * 16) calc(var(--u) * 7) calc(var(--u) * 8); font-weight: 700; font-size: calc(var(--u) * 19); box-shadow: 0 calc(var(--u) * 4) 0 #0004; text-transform: uppercase; }
#action-bar .act.small { font-size: calc(var(--u) * 14); padding: calc(var(--u) * 5) calc(var(--u) * 12) calc(var(--u) * 5) calc(var(--u) * 6); }
#action-bar .act.off { opacity: .6; text-transform: none; }
#action-bar kbd { display: grid; place-items: center; min-width: calc(var(--u) * 34); height: calc(var(--u) * 34); border-radius: calc(var(--u) * 8); background: var(--ink); color: #fff; font: inherit; font-size: calc(var(--u) * 17); }
#action-bar .small kbd { min-width: calc(var(--u) * 26); height: calc(var(--u) * 26); font-size: calc(var(--u) * 14); }
body.touch #action-bar, body.touch #hands { display: none; }
/* "I'm new": one coaching line under the top bar, and bigger button prompts */
#coach { position: absolute; left: 50%; bottom: calc(var(--u) * 124); transform: translateX(-50%); max-width: 56%; text-align: center;
  background: #fffaf0; border: calc(var(--u) * 3) solid var(--ink); border-radius: calc(var(--u) * 16); padding: calc(var(--u) * 8) calc(var(--u) * 18);
  font-weight: 700; font-size: calc(var(--u) * 19); box-shadow: 0 calc(var(--u) * 4) 0 var(--ink); pointer-events: none; animation: coach-in .3s ease-out; }
#coach b { color: var(--orange); }
@keyframes coach-in { from { opacity: 0; transform: translate(-50%, calc(var(--u) * 8)); } }
body.newbie #action-bar { transform: translateX(-50%) scale(1.2); transform-origin: bottom center; }

/* ---------- main menu: the illustrated "action" title screen (from look-preview/action-menu) ---------- */
#menu.action-screen { padding: 0; display: block; background: #182e2b; }
#menu .action-menu { min-height: 100%; position: relative; isolation: isolate; overflow: hidden; color: #fff4dc; display: flex; flex-direction: column; }
#menu .action-art { position: absolute; inset: 0; background: url('assets/menu/menu-action.jpg') center / cover no-repeat; z-index: -3; }
#menu .action-menu::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #182e2bf5 0%, #182e2bdc 30%, #182e2b10 68%); z-index: -2; }
#menu .action-marquee { display: flex; justify-content: space-between; align-items: center; padding: 14px 25px; border-bottom: 2px solid #fff4dc33; background: #172b2cbf; font-size: 11px; letter-spacing: 1.2px; }
#menu .action-marquee i { display: inline-block; width: 8px; height: 8px; background: #f6c544; border-radius: 50%; margin-right: 7px; box-shadow: 0 0 0 4px #f6c54422; }
#menu .action-menu-content { flex: 1; padding: 22px 36px 80px; width: 42%; min-width: 360px; max-width: 480px; position: relative; z-index: 3; }
#menu .action-title { transform: rotate(-2deg); margin: 4px 0 18px; }
#menu .title-sticker { display: inline-block; background: #f6c544; border: 3px solid #2b211d; box-shadow: 3px 3px 0 #2b211d; color: #2b211d; font-size: 12px; font-weight: 700; letter-spacing: 2px; padding: 6px 12px; transform: rotate(-5deg); }
#menu .action-title h1 { font-size: 50px; line-height: .95; letter-spacing: -2px; white-space: nowrap; margin: 16px 0 10px; font-weight: 700; color: #fff4dc; text-shadow: 4px 5px 0 #2b211d; -webkit-text-stroke: 1px #2b211d; }
#menu .action-title h1 strong { display: block; font-size: 96px; letter-spacing: -4px; color: #f07a22; text-shadow: 5px 6px 0 #2b211d; }
#menu .action-title p { font-size: 17px; line-height: 1.3; font-weight: 500; text-shadow: 2px 2px #2b211d; margin: 12px 0 0; }
#menu .punch-card { background: #fff4dc; color: #2b211d; padding: 16px; border: 3px solid #2b211d; border-radius: 13px; box-shadow: 5px 6px 0 #2b211d66; transform: rotate(.5deg); }
#menu .punch-card > label[for=name] { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; }
#menu #name { width: 100%; padding: 9px 11px; background: #f0e7d4; border: 0; border-bottom: 3px dashed #b6a78a; border-radius: 5px; margin: 6px 0 12px; font-size: 18px; }
#menu .action-mode-picker { display: grid; gap: 8px; }
#menu .action-mode-picker .mode { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 2px solid #c5bda8; background: #f5eedc; color: #2b211d; border-radius: 9px; padding: 7px; box-shadow: none; flex-direction: row; transition: transform .15s; }
#menu .action-mode-picker .mode[aria-pressed=true] { background: #f6d295; border-color: #2b211d; box-shadow: 3px 3px 0 #2b211d; }
#menu .action-mode-picker .mode:active { transform: translateY(2px); }
#menu .mode-face { width: 40px; height: 40px; object-fit: cover; background: #fff4dc; border: 2px solid #2b211d; border-radius: 50%; flex: none; }
#menu .action-mode-picker b { display: block; font-size: 17px; }
#menu .action-mode-picker small { display: block; font-size: 11px; margin-top: 2px; opacity: .85; }
#menu .action-mode-picker i { margin-left: auto; font-style: normal; font-size: 22px; opacity: .4; }
#menu .action-mode-picker .mode[aria-pressed=true] i { opacity: 1; }
#menu .action-primary { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 14px; background: #f07a22; border: 3px solid #2b211d; border-radius: 10px; color: #2b211d; box-shadow: 0 5px 0 #2b211d; font: 700 24px Fredoka, sans-serif; padding: 12px 16px; transition: transform .12s, box-shadow .12s; }
#menu .action-primary span { font-size: 30px; line-height: 1; }
#menu .action-primary:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 8px 0 #2b211d; }
#menu .action-primary:active { transform: translateY(4px); box-shadow: 0 1px 0 #2b211d; }
#menu .check { font-size: 14px; margin-top: 12px; }
#menu .action-join-toggle { display: block; margin-top: 10px; background: none; border: 0; box-shadow: none; padding: 4px 0; color: #3e6159; font-size: 14px; font-weight: 600; }
#menu .action-join { margin-top: 8px; border-top: 2px dashed #b6a78a; padding-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; font-size: 11px; font-weight: 700; letter-spacing: 1px; }
#menu .action-join[hidden] { display: none; }
#menu .action-join input { min-width: 0; padding: 8px; font-size: 17px; border: 2px solid #2b211d; border-radius: 7px; text-transform: uppercase; letter-spacing: .15em; }
#menu .action-join #join-pass.ask { border-color: var(--orange); box-shadow: 0 0 0 3px #f07a2255; }
#menu .action-join button { grid-column: 1 / -1; margin-top: 4px; padding: 9px; font-size: 15px; background: #527f87; color: #fff4dc; border: 2px solid #2b211d; border-radius: 7px; box-shadow: 0 3px 0 #2b211d; }
#menu #room-list { margin-top: 12px; }
#menu #room-list:empty { display: none; }
#menu .action-callout { position: absolute; display: flex; align-items: center; gap: 8px; background: #fff4dc; color: #2b211d; border: 3px solid #2b211d; box-shadow: 4px 4px 0 #2b211d55; border-radius: 12px; padding: 8px 12px; transform: rotate(4deg); font-size: 13px; font-weight: 700; animation: callout-bob 4s ease-in-out infinite; z-index: 2; }
#menu .action-callout img { width: 40px; height: 40px; object-fit: contain; }
#menu .action-callout .mode-face { object-fit: cover; }
#menu .callout-delivery { right: 4%; top: 16%; }
#menu .callout-team { right: 26%; bottom: 16%; transform: rotate(-5deg); animation-delay: -2s; }
#menu .action-forklift { position: absolute; right: 5%; bottom: 52px; width: 130px; z-index: 2; animation: forklift-delivery 14s ease-in-out infinite; }
#menu .action-forklift img { width: 100%; display: block; filter: drop-shadow(5px 9px 0 #2b211d33); }
#menu .action-bottom { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: #172b2cdb; border-top: 2px solid #fff4dc44; padding: 10px 25px; font-size: 13px; z-index: 4; }
#menu .action-bottom .link { color: #fff4dc !important; }
#menu .action-bottom a { color: #f6c544; }
@keyframes callout-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes forklift-delivery { 0%, 15%, 100% { transform: translateX(0); } 45%, 65% { transform: translateX(-100px); } }
@media (max-width: 1050px) {
  #menu .action-menu-content { width: 55%; padding: 20px 24px 80px; }
  #menu .action-title h1 { font-size: 42px; } #menu .action-title h1 strong { font-size: 80px; }
  #menu .callout-team { right: 8%; bottom: 26%; } #menu .action-marquee span + span { display: none; }
}
/* phones held upright: the art sits on top, the card below */
@media (max-width: 760px) {
  #menu .action-art { background-image: url('assets/menu/menu-action-small.jpg'); background-position: 68% 0; background-size: auto 300px; }
  #menu .action-menu::before { background: linear-gradient(0deg, #182e2b 0%, #182e2b 60%, #182e2b00 100%); top: 120px; }
  #menu .action-menu-content { width: 100%; min-width: 0; max-width: none; padding: 150px 16px 96px; }
  #menu .action-title h1 { font-size: 36px; } #menu .action-title h1 strong { font-size: 70px; }
  #menu .action-title p { font-size: 15px; } #menu .action-title p br { display: none; }
  #menu .action-marquee { padding: 10px 15px; font-size: 10px; }
  #menu .callout-delivery { top: 56px; font-size: 11px; padding: 5px 8px; } #menu .callout-delivery img { width: 28px; height: 28px; }
  #menu .callout-team, #menu .action-forklift { display: none; }
  #menu .action-bottom { padding: 8px 15px; font-size: 12px; }
}
/* phones held sideways: short screens, so the title shrinks and the card sits beside it */
@media (max-height: 500px) and (orientation: landscape) {
  #menu .action-art { background-image: url('assets/menu/menu-action-small.jpg'); }
  #menu .action-marquee { display: none; }
  #menu .action-menu-content { width: 100%; max-width: 760px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; align-items: start; padding: 14px 18px 70px; }
  #menu .action-title h1 { font-size: 30px; } #menu .action-title h1 strong { font-size: 56px; }
  #menu .action-title p { font-size: 13px; }
  #menu .callout-team, #menu .action-forklift, #menu .callout-delivery { display: none; }
}
@media (prefers-reduced-motion: reduce) { #menu * { animation: none !important; transition: none !important; } }

/* ---------- lobby and results: the crew banner and a till receipt (from look-preview/style.html) ---------- */
.crew-screen { background: linear-gradient(#182e2be6, #182e2bf2), url('assets/menu/menu-action-small.jpg') center / cover; }
.crew-screen .menu-card { background: #fff4dc; padding: 0; overflow: hidden; }
.crew-screen .menu-card > :not(.room-hero) { margin-left: 22px; margin-right: 22px; }
.crew-screen .menu-card > :last-child { margin-bottom: 20px; }
.room-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 22px; padding: 18px; margin-bottom: 16px; background: #a9b5a1; border-bottom: 6px solid var(--orange); }
.room-hero img { width: 100%; height: 190px; object-fit: cover; object-position: 50% 34%; border: 3px solid var(--ink); border-radius: 14px; background: #a9b5a1; }
.room-hero small { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; opacity: .75; }
.room-hero h2 { margin: 6px 0 8px; font-size: 40px; line-height: 1; color: var(--ink); }
.room-hero h2 em { display: block; font-style: normal; color: var(--orange); }
.room-hero p { margin: 0; font-size: 16px; font-weight: 600; }
#results-title { font-size: 20px; text-align: left; margin: 0; }
.receipt { background: #fffdf6 !important; border-style: dashed !important; border-radius: 6px !important; }
.receipt.win { background: #fff1c4 !important; }
.receipt-head { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; opacity: .7; }
.receipt-total { font-size: 44px; font-weight: 700; color: #477b4d; margin: 4px 0 6px; }
.receipt-row { display: flex; justify-content: space-between; border-bottom: 2px dashed #cabda2; padding: 7px 0; font-size: 15px; }
.receipt-crew { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 12px; }
.receipt-person { display: grid; justify-items: center; gap: 2px; width: 74px; text-align: center; font-size: 13px; }
.receipt-person img, .receipt-person .dot { width: 46px; height: 46px; border: 2px solid var(--ink); border-radius: 50%; background: #f4d99b; object-fit: cover; }
.receipt-person b { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt-person small { font-size: 11px; opacity: .7; }
.receipt-person.top img { border-color: #c8901b; box-shadow: 0 0 0 3px #f6c544; }
.receipt-person.top small { opacity: 1; color: #9a6b12; font-weight: 700; }
@media (max-width: 640px) {
  .room-hero { grid-template-columns: 1fr; gap: 10px; }
  .room-hero img { height: 130px; }
  .room-hero h2 { font-size: 32px; }
  .crew-screen .menu-card > :not(.room-hero) { margin-left: 14px; margin-right: 14px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .room-hero { grid-template-columns: 160px 1fr; padding: 10px 14px; }
  .room-hero img { height: 96px; }
  .room-hero h2 { font-size: 26px; } .room-hero p { font-size: 14px; }
}
#menu .action-title h1.storeday-wordmark{width:100%;margin:14px 0 10px;line-height:1;font-size:0;white-space:normal;letter-spacing:0;text-shadow:none;-webkit-text-stroke:0}#menu .storeday-wordmark img{display:block;width:100%;height:auto;max-height:180px;object-fit:contain;object-position:left center}.brand{min-width:calc(var(--u)*110)}.brand img{display:block;width:calc(var(--u)*110);height:calc(var(--u)*44);object-fit:contain}

/* Publisher home, placed with the menu footer controls. */
.action-bottom .kizamade-link { color: inherit; font-weight: 600; text-underline-offset: 3px; }
.action-bottom .kizamade-link:focus-visible { outline: 3px solid #fff4dc; outline-offset: 4px; border-radius: 3px; }

/* Join is a second, clearly visible route into the game. */
#menu .action-join-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 48px; margin: 14px 0 12px; padding: 11px 14px;
  border: 3px solid #2b211d; border-radius: 10px; background: #397fa5;
  color: #fff4dc; box-shadow: 0 4px 0 #2b211d; font-size: 16px; font-weight: 700;
  text-align: left; cursor: pointer;
}
#menu .action-join-toggle:hover { background: #2d6c8d; transform: translateY(-1px); }
#menu .action-join-toggle:focus-visible { outline: 3px solid #f6c544; outline-offset: 4px; }
#menu .action-join-toggle[aria-expanded=true] { background: #28566e; }

#menu .music-mute { min-height:32px; padding:5px 9px; border:2px solid #fff4dc88; border-radius:7px; color:#fff4dc; background:#31534d; font:600 12px Fredoka,sans-serif; cursor:pointer; }
#menu .music-mute[aria-pressed=true] { background:#fff4dc;color:#2b211d; }
#menu .music-mute:focus-visible { outline:3px solid #f6c544;outline-offset:3px; }

/* Arcade streak panel stays clear of the right-hand tickets and lower touch controls. */
#arcade-streaks{position:absolute;left:12px;top:76px;width:210px;max-width:30vw;padding:10px 12px;border:3px solid #2b211d;border-radius:12px;background:#fff4dc;color:#2b211d;pointer-events:none;box-shadow:0 4px 0 #2b211d}#arcade-streaks>b{display:block;color:#b54a09;font-size:16px}#arcade-streaks>small{display:block;font-size:10px;margin:5px 0}#arcade-streaks>div{display:flex;justify-content:space-between;gap:7px;padding-top:5px;font-size:11px}.action-mode-picker .arcade-mode{background:#7353b4}.action-mode-picker .arcade-mode[aria-pressed=true]{outline-color:#ffcf4c}
@media(max-height:500px){#arcade-streaks{top:62px;width:175px;padding:6px 8px}#arcade-streaks>b{font-size:13px}#arcade-streaks>div{font-size:10px}}

#arcade-streaks{top:94px}#fps{max-width:70vw;white-space:normal}@media(max-height:500px){#arcade-streaks{top:66px}}

#arcade-dash{position:absolute;left:12px;bottom:90px;pointer-events:auto;z-index:3;border:3px solid #2b211d;border-radius:14px;padding:12px 16px;background:#ffe05b;color:#2b211d;font:700 14px Fredoka,sans-serif;box-shadow:0 4px #2b211d;touch-action:none}#arcade-dash[hidden]{display:none}#arcade-dash:disabled{background:#b9b6ac;color:#514c43}#arcade-dash.down{transform:translateY(3px);box-shadow:0 1px #2b211d}

#picker{gap:10px;align-items:flex-start}#picker>b{flex-basis:100%}#picker button:not(.text){width:82px;height:103px;border-radius:13px!important;padding:5px!important;background:#fff4dc!important;position:relative}#picker button img{width:68px;height:68px;object-fit:contain;border-radius:8px}#picker button span{display:block;font-size:9px;line-height:1.2;color:#2b211d;white-space:normal}#picker button.on{background:#ffcf78!important;border-color:#2b211d;outline-color:#f07a22}#picker button.on img{animation:pick-smile .6s ease-out}#settings .helper-face{width:27px;height:27px;vertical-align:middle;object-fit:contain;margin-right:5px;background:#fff4dc;border-radius:50%}@keyframes pick-smile{0%{transform:scale(.85) rotate(-6deg)}45%{transform:scale(1.12) rotate(4deg)}100%{transform:scale(1) rotate(0)}}@media(prefers-reduced-motion:reduce){#picker button.on img{animation:none}}@media(max-height:500px){#picker button:not(.text){width:67px;height:85px}#picker button img{width:53px;height:53px}#picker button span{font-size:8px}}

#picker .random-pick{display:flex;flex-direction:column;align-items:center;justify-content:center;border-style:dashed;background:#d3eee6!important}#picker .random-pick i{font:700 47px Fredoka,sans-serif;color:#285d53;line-height:1.3}@media(max-height:500px){#picker .random-pick i{font-size:35px}}

.member-duty{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 0 12px;border-bottom:1px solid #dbcdb5;margin-bottom:7px}.member-duty>span{font-size:12px;color:#5b665b}.member-duty select,.duty-member select{max-width:100%;min-height:42px;padding:7px 9px;border:2px solid #2b211d;border-radius:8px;background:#fffaf0;color:#2b211d;font:500 14px Fredoka,sans-serif}.member-duty select{width:230px}.member-duty select:disabled,.duty-member select:disabled{opacity:1;color:#777267;background:#eee8da}
#crew-duties{position:absolute;left:12px;top:94px;width:280px;max-width:50vw;max-height:65vh;overflow-y:auto;padding:14px;border:3px solid #2b211d;border-radius:12px;background:#fff4dc;box-shadow:0 4px #2b211d;color:#2b211d;z-index:5;pointer-events:auto;touch-action:pan-y}#crew-duties[hidden]{display:none}#crew-duties>b{font-size:18px}#crew-duties>p{font-size:12px;line-height:1.4}.duty-member{padding:8px 0;border-top:1px solid #d9c9ab}.duty-member strong{display:block;font-size:13px;margin-bottom:5px}.duty-member select{width:100%}#btn-roles{font-size:12px}
@media(max-width:540px){.member-duty{flex-direction:column;align-items:stretch;gap:6px}.member-duty select{width:100%}}@media(max-height:500px){#crew-duties{top:65px;max-height:65vh}}
#arcade-streaks>small.special{color:#2f6b2a;font-weight:700}

/* Story Mode beta: its own game at /storeday/story, linked first on the menu in deep garden green. */
#menu .action-mode-picker .story-link{display:flex;align-items:center;gap:10px;width:100%;box-sizing:border-box;text-decoration:none;background:#2f6b4f;color:#fff;border:2px solid #2b211d;border-radius:9px;padding:10px 9px;box-shadow:3px 3px 0 #2b211d;margin-bottom:2px}
#menu .action-mode-picker .story-link span{display:flex;flex-direction:column;flex:1;min-width:0}
#menu .action-mode-picker .story-link b{font-size:19px;color:#fff}#menu .action-mode-picker .story-link small{color:#e3f3e6}
#menu .action-mode-picker .story-link em{font-style:normal;font-size:11px;background:#ffd166;color:#2b211d;border-radius:5px;padding:1px 5px;vertical-align:3px}
#menu .action-mode-picker .story-link i{color:#ffd166;font-style:normal}
#menu .action-mode-picker .story-link:active{transform:translateY(2px)}
