:root {
  --bg: #0a0d08;
  --green: #b3d188;
  --green-dim: #6f8458;
  --green-faint: #3d4a32;
  --amber: #d9a55d;
  --rust: #b5663a;
  --steel: #7d8794;
  --err: #ff8a80;
  --panel: rgba(20, 28, 16, .35);
  --glow: 0 0 6px rgba(179, 209, 136, .45);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  background: radial-gradient(ellipse at 50% 0%, #10160d 0%, var(--bg) 60%);
  color: var(--green);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 15px; line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: none;
}

.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(to bottom,
    rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.16) 3px, rgba(0,0,0,0) 4px);
  mix-blend-mode: multiply;
}

.hidden { display: none !important; }

.lobby { width: min(680px, 94vw); margin: 0 auto; padding: 26px 18px 60px; }

.hdr { border-bottom: 1px solid var(--green-faint); padding-bottom: 14px; margin-bottom: 24px;
       display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.title-row { display: flex; align-items: center; gap: 12px; }
.ascii { color: var(--green); font-weight: 700; letter-spacing: 2px; font-size: 17px; text-shadow: var(--glow); }
.clock { color: var(--green-dim); font-size: 13px; margin-top: 8px; letter-spacing: 1px; }

/* Refresh — a small, sharp-cornered icon button (house style) that hard-reloads
   the kiosk so a fresh deploy shows up without closing the home-screen app. */
.refresh-btn {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--green-faint); background: transparent;
  color: var(--green-dim); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.refresh-btn:active { background: var(--green-faint); color: var(--green); }
.refresh-btn .ph { width: 18px; height: 18px; }
/* A one-shot spin confirms the tap landed before the reload kicks in. */
.refresh-btn.spin .ph { animation: refresh-spin .6s linear; }
@keyframes refresh-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.active-shifts { text-align: right; font-size: 12px; letter-spacing: 1px; flex-shrink: 0; padding-top: 2px; }
.active-shifts .active-name { display: flex; align-items: center; justify-content: flex-end; gap: 6px; color: var(--green); margin-bottom: 3px; }
.active-shifts .active-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 5px var(--green), 0 0 10px rgba(179, 209, 136, .3); flex-shrink: 0; }
.active-shifts .no-active { color: var(--amber); font-size: 11px; letter-spacing: 2px; }
.back-link { display: inline-block; color: var(--green-dim); text-decoration: none; font-size: 12px; letter-spacing: 1px; margin-bottom: 10px; }
.back-link:active { color: var(--green); }

.panel { border: 1px solid var(--green-faint); background: var(--panel); padding: 18px; }
.panel-title { font-size: 13px; letter-spacing: 3px; color: var(--amber); font-weight: 500; margin-bottom: 16px; }
.dim { color: var(--green-dim); }

/* Phosphor icons — inline SVGs themed via currentColor (no OS emoji). */
.ph { width: 1.05em; height: 1.05em; vertical-align: -0.16em; display: inline-block;
      filter: drop-shadow(0 0 2px currentColor); }
.ph-amber { color: var(--amber); }
.ph-green { color: var(--green); }
.ph-medal { width: 1.7em; height: 1.7em; vertical-align: -0.5em; }

/* Today's shows — a plain info list (divider rows), deliberately NOT styled
   like buttons: no per-row border/background, no pointer, nothing tappable. */
.shows-body { display: flex; flex-direction: column; }
.show-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline; gap: 16px;
  padding: 11px 2px; width: 100%; text-align: left;
  border-bottom: 1px solid rgba(61, 74, 50, .4);
}
.show-card:last-child { border-bottom: none; }
.show-time { color: var(--amber); font-weight: 500; white-space: nowrap; }
.show-title { color: var(--green); min-width: 0; overflow-wrap: anywhere; }
.show-tix { color: var(--green); text-shadow: var(--glow); white-space: nowrap; font-weight: 500; }
.show-card.past { opacity: .45; }

.shows-error { color: var(--amber); }

.clock-btn {
  display: block; width: 100%; margin-top: 26px; padding: 24px;
  border: 1px solid var(--green); background: rgba(179,209,136,.12);
  color: var(--green); font-family: inherit; font-size: 18px; font-weight: 500;
  letter-spacing: 4px; cursor: pointer; text-shadow: var(--glow);
}
.clock-btn:active { background: var(--green); color: var(--bg); text-shadow: none; }

/* PING PHILL — amber accent so it reads as its own action, distinct from the
   green clock button but still a primary, full-width tap target. */
.ping-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 12px; padding: 18px;
  border: 1px solid var(--amber); background: rgba(217,165,93,.10);
  color: var(--amber); font-family: inherit; font-size: 16px; font-weight: 500;
  letter-spacing: 3px; cursor: pointer; text-shadow: 0 0 6px rgba(217,165,93,.4);
}
.ping-btn:active { background: var(--amber); color: var(--bg); text-shadow: none; }
.ping-btn .ph { width: 20px; height: 20px; }

/* SHIFT TO-DO — sits right under CLOCK IN / OUT and is ALWAYS shown as a stable
   entry point to the checklist. Amber so it reads as "needs attention." Only the
   count badge is conditional: home.js shows "N LEFT" when tasks remain and hides
   the badge (not the button) when the list is clear. */
.todo-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 12px; padding: 18px;
  border: 1px solid var(--amber); background: rgba(217,165,93,.10);
  color: var(--amber); font-family: inherit; font-size: 16px; font-weight: 500;
  letter-spacing: 3px; cursor: pointer; text-shadow: 0 0 6px rgba(217,165,93,.4);
}
.todo-btn:active { background: var(--amber); color: var(--bg); text-shadow: none; }
.todo-btn:active .ph { color: var(--bg); }
.todo-btn .ph { width: 20px; height: 20px; }
.todo-count {
  border: 1px solid var(--amber); padding: 1px 8px; font-size: 12px;
  letter-spacing: 1px; font-weight: 700; text-shadow: none;
}

/* SUPPLIES — the order-request list, same amber work-action family as SHIFT
   TO-DO / PING PHILL: staff flag what's running low, Phill orders from admin. */
.supplies-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 12px; padding: 18px;
  border: 1px solid var(--amber); background: rgba(217,165,93,.10);
  color: var(--amber); font-family: inherit; font-size: 16px; font-weight: 500;
  letter-spacing: 3px; cursor: pointer; text-shadow: 0 0 6px rgba(217,165,93,.4);
}
.supplies-btn:active { background: var(--amber); color: var(--bg); text-shadow: none; }
.supplies-btn:active .ph { color: var(--bg); }
.supplies-btn .ph { width: 20px; height: 20px; }

/* Secondary button — clearly tappable but lighter than CLOCK IN / OUT. */
.lb-btn {
  display: block; width: 100%; margin-top: 12px; padding: 16px;
  border: 1px solid var(--green-faint); background: transparent;
  color: var(--green-dim); font-family: inherit; font-size: 14px;
  letter-spacing: 3px; cursor: pointer;
}
.lb-btn:active { background: var(--green-faint); color: var(--green); }

/* Press feedback — a subtle scale-down so every tap is acknowledged the instant
   a finger lands, on top of the existing color shift. The full-width buttons
   scale only slightly so it reads as a firm press, not a jump. */
.clock-btn, .todo-btn, .supplies-btn, .ping-btn, .lb-btn {
  transition: background .12s, color .12s, transform .12s var(--ease-out);
}
.clock-btn:active, .todo-btn:active, .supplies-btn:active, .ping-btn:active, .lb-btn:active { transform: scale(.985); }
@media (prefers-reduced-motion: reduce) {
  .clock-btn:active, .todo-btn:active, .supplies-btn:active, .ping-btn:active, .lb-btn:active { transform: none; }
}

/* Leaderboard rows */
.lb-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline; gap: 14px; padding: 12px 2px;
  border-bottom: 1px solid rgba(61, 74, 50, .4);
}
.lb-row:last-child { border-bottom: none; }
.lb-rank { color: var(--amber); font-weight: 700; }
.lb-name { color: var(--green); }
.lb-time { color: var(--green); text-shadow: var(--glow); font-weight: 500; white-space: nowrap; }
.lb-date { grid-column: 2 / 4; color: var(--green-dim); font-size: 12px; margin-top: -6px; }

/* WALL OF SHAME — busted false claims, in rust so it reads as the dark mirror
   of the green leaderboards above it. Public on the kiosk = the punishment. */
.shame-title { color: var(--rust) !important; }
.shame-panel { border-color: #4a2c20; }
.shame-row { padding: 11px 2px; border-bottom: 1px solid rgba(181, 102, 58, .25); }
.shame-row:last-child { border-bottom: none; }
.shame-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.shame-name { color: var(--rust); font-weight: 700; letter-spacing: 1px; text-shadow: 0 0 6px rgba(181,102,58,.4); }
.shame-verb { color: var(--green-dim); }
.shame-task { color: var(--amber); }
.shame-reason { color: var(--green-dim); font-size: 12px; margin-top: 4px; font-style: italic; }
.shame-date { color: var(--green-faint); font-size: 11px; }
.shame-ph { color: var(--rust); }

@media (max-width: 480px) {
  .lobby { padding: 20px 12px 50px; }
  .ascii { font-size: 15px; }
  .show-card { gap: 12px; padding: 11px 2px; }
  .clock-btn { font-size: 17px; padding: 22px; letter-spacing: 3px; }
  .active-shifts { font-size: 11px; }
  .active-shifts .no-active { font-size: 10px; }
}
