:root {
  --red: #b3202a;
  --red-deep: #7c1218;
  --gold: #ffcf3f;
  --ink: #16120f;
  --paper: #f7f2e8;
  --panel: rgba(20, 14, 12, 0.72);
  --line: rgba(255, 255, 255, 0.12);
  --good: #5fd08a;
  --bad: #ff6a5a;
  --sans: 'Rubik', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #120d0b;
  color: #fff;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
#stage, #stage canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#stage canvas { touch-action: none; }

/* --- Touch screens ------------------------------------------------------------------------ */
#stick, #touchbar { display: none; }
body.touch #stick { display: block; position: absolute; left: 22px; bottom: 22px; width: 132px; height: 132px; border-radius: 50%; background: rgba(20, 14, 12, 0.35); border: 2px solid rgba(255, 255, 255, 0.25); pointer-events: auto; touch-action: none; }
body.touch #stick i { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(255, 207, 63, 0.85); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
body.touch #touchbar { display: flex; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100vw - 170px); position: absolute; right: 12px; bottom: 16px; gap: 8px; pointer-events: auto; }
body.touch #touchbar button { width: 46px; height: 46px; padding: 0; border-radius: 14px; font-size: 20px; background: rgba(20, 14, 12, 0.6); color: #fff; box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.2); }
body.touch #help-hint, body.touch #crosshair { display: none; }
body.touch #board { bottom: 76px; min-width: 0; max-width: calc(100vw - 200px); left: calc(50% + 40px); }
body.touch #toasts { bottom: 76px; }

.hidden { display: none !important; }

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.1em 0.45em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom-width: 2px;
  font: 600 0.78em/1.4 var(--sans);
  text-align: center;
}

/* --- HUD ------------------------------------------------------------------------------ */
#hud { position: fixed; inset: 0; pointer-events: none; }
.panel {
  background: var(--panel);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.bar { position: absolute; top: 16px; display: flex; align-items: center; gap: 18px; padding: 10px 16px; }
.top-left { left: 16px; }
.top-right { right: 16px; gap: 22px; }
.brand { font: 400 26px/1 'Lobster', Georgia, serif; color: var(--gold); letter-spacing: 0.5px; }
.clock { display: flex; flex-direction: column; line-height: 1.05; }
.clock time { font: 700 22px/1 var(--mono); }
.clock span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: #ffcf3fcc; }
.day { font-size: 12px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.1em; }
.today { font-size: 12.5px; font-weight: 600; color: var(--gold); white-space: nowrap; }
.stat { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.stat small { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; opacity: 0.6; }
.stat b { font: 700 19px/1.1 var(--mono); }
.stat.warn b { color: #ffb3a8; }
#rating { color: var(--gold); }
#rating .cnt { font: 500 10px var(--sans); opacity: 0.6; margin-left: 4px; color: #fff; }
.stat:has(#rating) { pointer-events: auto; cursor: pointer; }
.stat:has(#rating):hover small { color: var(--gold); opacity: 1; }

/* Tickets: thermal-paper slips on a rail */
#tickets { position: absolute; left: 16px; top: 86px; width: 250px; max-height: calc(100vh - 170px); overflow: hidden; -webkit-mask-image: linear-gradient(#000 85%, transparent); mask-image: linear-gradient(#000 85%, transparent); }
.rail-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; opacity: 0.7; margin: 0 0 8px 4px; }
.rail-title kbd { font-size: 10px; }
.ticket {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border-radius: 3px 3px 0 0;
  padding: 10px 12px 12px;
  margin-bottom: 12px;
  font: 500 12px/1.45 var(--mono);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transform-origin: top left;
  transition: transform 0.2s, opacity 0.2s;
  opacity: 0.86;
  transform: scale(0.94);
}
.ticket::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -7px; height: 8px;
  background: linear-gradient(-45deg, transparent 5px, var(--paper) 0) 0 0 / 10px 8px repeat-x,
              linear-gradient(45deg, transparent 5px, var(--paper) 0) 0 0 / 10px 8px repeat-x;
}
.ticket.focus { opacity: 1; transform: scale(1); box-shadow: 0 0 0 3px var(--gold), 0 10px 26px rgba(0, 0, 0, 0.45); }
.ticket h4 { margin: 0 0 4px; font: 700 13px/1.3 var(--mono); display: flex; justify-content: space-between; gap: 8px; }
.ticket h4 span { color: var(--red); }
.ticket .rows { margin: 0; padding: 0; list-style: none; }
.ticket .rows li { display: flex; gap: 6px; }
.ticket .rows li::before { content: '·'; opacity: 0.5; }
.ticket .rows li.ok { color: #1f7a3f; }
.ticket .rows li.ok::before { content: '✓'; opacity: 1; }
.ticket .togo { display: inline-block; margin-top: 6px; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; }
.ticket .togo.go { background: var(--red); color: #fff; }
.ticket .togo.in { background: #2d5b8a; color: #fff; }
.ticket .togo.app { background: #1f9d5a; color: #fff; }
.ticket .pat { height: 4px; margin-top: 8px; background: rgba(0, 0, 0, 0.1); border-radius: 2px; overflow: hidden; }
.ticket .pat i { display: block; height: 100%; border-radius: 2px; }
.ticket .say { margin-top: 6px; font-style: italic; opacity: 0.7; font-family: var(--sans); font-size: 11.5px; }

/* Opening / closing checklist */
#checklist { position: absolute; left: 16px; top: 86px; width: 270px; pointer-events: auto; }
.cl-card { background: var(--paper); color: var(--ink); border-radius: 6px; padding: 12px 14px 12px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35); font: 500 12.5px/1.45 var(--mono); }
.cl-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.cl-head b { font: 800 14px/1.2 var(--sans); letter-spacing: 0.02em; }
.cl-head span { font-weight: 700; color: var(--red); }
.cl-bar { height: 5px; border-radius: 3px; background: rgba(0, 0, 0, 0.1); overflow: hidden; margin-bottom: 8px; }
.cl-bar i { display: block; height: 100%; background: var(--good); border-radius: 3px; transition: width 0.3s; }
#cl-list { list-style: none; margin: 0 0 10px; padding: 0; max-height: 52vh; overflow: auto; }
#cl-list li { display: flex; gap: 8px; padding: 3px 0; align-items: baseline; }
#cl-list li::before { content: '○'; flex: none; width: 14px; color: rgba(0, 0, 0, 0.45); }
#cl-list li.done { color: rgba(0, 0, 0, 0.45); text-decoration: line-through; }
#cl-list li.done::before { content: '✓'; color: #1f7a3f; text-decoration: none; }
#cl-list li.next { font-weight: 700; }
#cl-list li.more { color: rgba(0, 0, 0, 0.5); font-style: italic; text-decoration: none; }
#cl-list li.more::before { content: '…'; color: rgba(0, 0, 0, 0.35); }
#cl-list li.next::before { content: '▸'; color: var(--red); }
#cl-skip { width: 100%; font-size: 12px; padding: 8px 10px; background: rgba(0, 0, 0, 0.08); color: var(--ink); }

/* The board: what's being built right now */
#board { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 10px 14px; min-width: 420px; max-width: 70vw; }
.board-head { display: flex; justify-content: space-between; gap: 16px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; opacity: 0.8; margin-bottom: 6px; }
.board-head em { font-style: normal; font-weight: 700; color: var(--gold); letter-spacing: 0.06em; }
#board-items { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 12.5px; font-weight: 500; }
.chip.ok { background: rgba(95, 208, 138, 0.2); color: #c9f5d9; }
.chip.bad { background: rgba(255, 106, 90, 0.2); color: #ffd0c9; }
.chip.need { background: transparent; border: 1px dashed rgba(255, 255, 255, 0.35); color: rgba(255, 255, 255, 0.7); }
.chip b { font-family: var(--mono); font-weight: 700; }
.empty { opacity: 0.55; font-size: 13px; }

#status { position: absolute; right: 16px; top: 86px; padding: 10px 14px; font-size: 12.5px; display: grid; gap: 5px; }
#status div { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px currentColor; }
.dot.low { background: var(--gold); }
.dot.out { background: var(--bad); }
.dot.idle { background: rgba(255, 255, 255, 0.35); box-shadow: none; }

#crosshair { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35); }
/* Guide: banner + arrow */
#guide { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 9px 16px 9px 10px; max-width: min(560px, calc(100vw - 700px)); min-width: 300px; border-color: rgba(255, 207, 63, 0.55); }
#guide .tag { flex: none; padding: 4px 8px; border-radius: 8px; background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
#guide .txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
#guide b { font-size: 16px; }
#guide small { font-size: 12.5px; opacity: 0.8; }
#guide.done { border-color: rgba(95, 208, 138, 0.8); }
#guide.done .tag { background: var(--good); }
#guide.pulse { animation: guidePulse 0.5s ease-out; }
@keyframes guidePulse { 0% { transform: translateX(-50%) scale(1.06); } 100% { transform: translateX(-50%) scale(1); } }
@media (max-width: 1100px) { #guide { top: 84px; max-width: calc(100vw - 32px); } }
#guide-marker { position: absolute; left: 0; top: 0; pointer-events: none; }
#guide-marker .pin { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); animation: bob 0.9s ease-in-out infinite; }
#guide-marker .arrow { display: block; width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 22px solid var(--gold); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
#guide-marker.edge .pin { transform: translate(-50%, -50%) rotate(var(--rot)); animation: none; }
#guide-marker span { position: absolute; left: 0; top: 18px; transform: translateX(-50%); white-space: nowrap; font-size: 13px; font-weight: 700; color: var(--gold); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9); }
#guide-marker span:empty { display: none; }
@keyframes bob { 0%, 100% { transform: translate(-50%, -100%); } 50% { transform: translate(-50%, calc(-100% - 10px)); } }
.follow { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--gold); max-width: 470px; }
.arrow-mini { flex: none; width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 13px solid var(--gold); }

#relock { position: absolute; left: 50%; top: calc(50% - 60px); transform: translateX(-50%); padding: 8px 14px; border-radius: 10px; background: var(--panel); font-size: 14px; font-weight: 600; }
button.wide { width: 100%; margin-top: 14px; }
.hire { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); font-size: 14px; line-height: 1.4; cursor: pointer; }
.hire input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); }
.hire small { opacity: 0.7; }
#crosshair.on { width: 14px; height: 14px; margin: -7px 0 0 -7px; background: transparent; border: 2px solid var(--gold); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3); }
#prompt { position: absolute; left: 50%; top: calc(50% + 26px); transform: translateX(-50%); text-align: center; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); min-width: 300px; }
#prompt .line { font-size: 17px; font-weight: 700; display: inline-flex; align-items: center; gap: 10px; }
#prompt .line kbd { background: var(--gold); color: var(--ink); border-color: #b8901f; font-weight: 800; }
#prompt.bad .line kbd { background: rgba(255, 255, 255, 0.2); color: #fff; border-color: rgba(255, 255, 255, 0.3); }
#prompt.bad .line { opacity: 0.85; font-weight: 600; }
#prompt.warn .line kbd { background: #ff9b5a; }
#prompt .detail { font-size: 13px; opacity: 0.85; margin-top: 4px; }
#prompt .gauge { position: relative; margin: 8px auto 0; width: 240px; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.55); overflow: hidden; display: none; }
#prompt .gauge.on { display: block; }
#prompt .gauge .band { position: absolute; top: 0; bottom: 0; background: rgba(95, 208, 138, 0.45); }
#prompt .gauge .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold); border-radius: 4px; }

#toasts { position: absolute; right: 16px; bottom: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.toast { padding: 9px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; animation: toast 4.2s forwards; backdrop-filter: blur(8px); }
.toast.good { border-color: rgba(95, 208, 138, 0.6); }
.toast.bad { border-color: rgba(255, 106, 90, 0.6); }
.toast.info { border-color: rgba(255, 207, 63, 0.5); }
@keyframes toast { 0% { opacity: 0; transform: translateY(8px); } 8% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }
#help-hint { position: absolute; left: 16px; bottom: 16px; font-size: 12px; line-height: 2; opacity: 0.65; }

/* Speech bubbles over customers */
#bubbles { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.bubble { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; transform-origin: 50% 100%; will-change: transform; }
.bubble .say { max-width: 260px; padding: 7px 11px; border-radius: 12px; background: #fff; color: var(--ink); font-size: 13.5px; line-height: 1.3; font-weight: 500; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); position: relative; text-align: center; }
.bubble .say::after { content: ''; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-top-color: #fff; border-bottom: 0; }
.bubble .tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; background: rgba(20, 14, 12, 0.82); border: 1px solid rgba(255, 255, 255, 0.2); font: 700 13px/1.2 var(--mono); }
.bubble .ring { width: 16px; height: 16px; border-radius: 50%; display: inline-block; mask: radial-gradient(circle, transparent 4px, #000 5px); -webkit-mask: radial-gradient(circle, transparent 4px, #000 5px); }
.bubble.focus .tag { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255, 207, 63, 0.4); }
.bubble.angry .say { background: #ffe0dc; }

/* --- Overlays ------------------------------------------------------------------------- */
.overlay { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; overflow-y: auto; background: radial-gradient(ellipse at center, rgba(20, 10, 8, 0.35), rgba(10, 6, 5, 0.78)); z-index: 5; }
#title { background: linear-gradient(90deg, rgba(12, 7, 6, 0.9) 0%, rgba(12, 7, 6, 0.55) 45%, rgba(12, 7, 6, 0) 75%); place-items: center start; padding-left: clamp(16px, 6vw, 90px); }
.card { width: min(520px, 100%); padding: 28px 30px; border-radius: 20px; background: rgba(24, 16, 13, 0.86); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.card.hero { background: transparent; border: 0; box-shadow: none; padding: 0; }
.card.wide { width: min(980px, 100%); }
.eyebrow { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: #ffcf3fbb; }
h1 { margin: 6px 0 10px; font: 400 clamp(56px, 9vw, 104px)/0.95 'Lobster', Georgia, serif; color: #fff; text-shadow: 0 6px 30px rgba(179, 32, 42, 0.6); }
h2 { margin: 0 0 8px; font-size: 26px; }
h3 { margin: 0 0 6px; font-size: 15px; color: var(--gold); }
.lede { font-size: 17px; line-height: 1.5; opacity: 0.9; max-width: 460px; }
.how { padding-left: 20px; line-height: 1.55; font-size: 14.5px; opacity: 0.92; max-width: 470px; }
.how li { margin-bottom: 4px; }
.how b { color: var(--gold); }
.controls { font-size: 13px; opacity: 0.75; line-height: 2; }
.start-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.saved { font-size: 13px; opacity: 0.7; margin: 10px 0 0; }
/* New game: a döner shop or a café, and its name. */
.choose { max-width: 520px; }
.choose-q { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--gold); }
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.kind { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); color: #fff; box-shadow: none; border: 2px solid rgba(255, 255, 255, 0.14); font-size: 16px; line-height: 1.25; }
.kind small { font: 500 12.5px/1.4 var(--sans); opacity: 0.78; }
.kind.on { border-color: var(--gold); background: rgba(255, 207, 63, 0.14); box-shadow: 0 0 0 3px rgba(255, 207, 63, 0.25); }
.kind.cafe.on { border-color: #9fd3a8; background: rgba(31, 74, 58, 0.55); box-shadow: 0 0 0 3px rgba(159, 211, 168, 0.25); }
.kind:active { transform: translateY(1px); box-shadow: none; }
.shop-name { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.shop-name input { flex: 1; max-width: 280px; font: 600 16px var(--sans); padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.1); color: #fff; user-select: text; }
.shop-name input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
@media (max-width: 560px) { .kinds { grid-template-columns: 1fr; } }
@media (max-height: 560px) { .kind { padding: 9px 12px; } .kind small { font-size: 11px; } .shop-name { margin-bottom: 8px; } }
button { font: 700 16px/1 var(--sans); padding: 14px 26px; border-radius: 12px; border: 0; cursor: pointer; background: var(--gold); color: var(--ink); box-shadow: 0 6px 0 #b8901f; transition: transform 0.08s, box-shadow 0.08s; pointer-events: auto; }
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(4px); box-shadow: 0 2px 0 #b8901f; }
button:disabled { opacity: 0.6; cursor: progress; }
button.ghost { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: none; font-size: 14px; padding: 10px 16px; }
.row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.sens { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 13px; opacity: 0.85; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin: 12px 0 20px; }
.cols ul { padding-left: 18px; margin: 0; line-height: 1.5; font-size: 14px; }
.cols li { margin-bottom: 6px; }
@media (max-width: 720px) { .cols { grid-template-columns: 1fr; } }
/* Phones (landscape) and short windows: a compact title card, overlays scroll. */
@media (max-height: 560px) {
  h1 { font-size: 46px; margin: 2px 0 4px; }
  .lede { font-size: 13.5px; margin: 4px 0; }
  .how { font-size: 12.5px; margin: 6px 0; line-height: 1.35; }
  .follow { font-size: 13px; margin: 6px 0; }
  .controls { display: none; }
  #title { place-items: start start; padding-top: 12px; background: linear-gradient(90deg, rgba(12, 7, 6, 0.92) 0%, rgba(12, 7, 6, 0.7) 60%, rgba(12, 7, 6, 0.2) 100%); }
  button { padding: 11px 20px; }
  .card { padding: 16px 18px; }
}
body.touch .controls { display: none; }

.receipt { width: min(380px, 100%); background: var(--paper); color: var(--ink); font-family: var(--mono); border-radius: 4px; padding: 26px 26px 22px; }
.r-head { text-align: center; font-weight: 700; font-size: 18px; letter-spacing: 0.1em; margin-bottom: 14px; }
.r-head small { font-size: 12px; font-weight: 500; letter-spacing: 0.04em; }
#s-lines .l { display: flex; justify-content: space-between; font-size: 13.5px; line-height: 1.8; }
#s-lines .sep { border-top: 1px dashed rgba(0, 0, 0, 0.35); margin: 8px 0; }
#s-lines .l.big { font-weight: 700; font-size: 16px; }
#s-lines .neg { color: var(--red); }
.r-foot { text-align: center; font-size: 12px; margin: 14px 0 18px; opacity: 0.75; }
.receipt button { width: 100%; }

#loader { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: #120d0b; z-index: 10; transition: opacity 0.6s; }
#loader.done { opacity: 0; pointer-events: none; }
#loader p { opacity: 0.75; font-size: 14px; }
#loader.failed p { color: #ffb3a8; max-width: 420px; text-align: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: var(--gold); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Small screens (phones in landscape, short windows) ----------------------------------
   Last in the file so it wins over the rules above. */
@media (max-width: 900px), (max-height: 520px) {
  .bar { top: 6px; padding: 5px 10px; gap: 10px; border-radius: 10px; }
  .top-left { left: 6px; }
  .top-right { right: 6px; gap: 12px; }
  .brand { font-size: 17px; }
  .clock time { font-size: 16px; }
  .clock span, .day { font-size: 9.5px; }
  .stat small { font-size: 8.5px; }
  .stat b { font-size: 14px; }
  #status, #board, #help-hint { display: none; }
  #tickets, #checklist { top: 50px; left: 6px; width: 176px; }
  .ticket { font-size: 10px; padding: 6px 8px 8px; margin-bottom: 8px; }
  .ticket h4 { font-size: 11px; }
  .ticket .say { display: none; }
  .cl-card { font-size: 10.5px; padding: 8px 10px; }
  #cl-list { max-height: 40vh; }
  #guide { top: 50px; min-width: 0; max-width: calc(100vw - 420px); left: calc(50% + 70px); padding: 5px 10px 5px 6px; }
  #guide b { font-size: 12.5px; }
  #guide small { display: none; }
  #guide .tag { font-size: 9px; padding: 3px 6px; }
  #prompt { min-width: 0; }
  #prompt .line { font-size: 13px; }
  #prompt .detail { font-size: 11px; }
  #toasts { right: 6px; bottom: 70px; gap: 5px; }
  .toast { font-size: 11px; padding: 6px 10px; max-width: 46vw; }
  .toast:nth-last-child(n+3) { display: none; }
  .bubble .say { font-size: 11px; max-width: 180px; }
  body.touch #stick { width: 110px; height: 110px; left: 14px; bottom: 14px; }
  body.touch #touchbar { bottom: 10px; gap: 6px; }
  body.touch #touchbar button { width: 40px; height: 40px; font-size: 17px; }
}
