:root {
  --bg: #0f2a1d;
  --bg2: #1b4a30;
  --card: #fffdf5;
  --ink: #17301f;
  --muted: #6b7f71;
  --lime: #b7e04a;
  --lime-dark: #5d8a12;
  --berry: #e8456b;
  --line: #e4e6d6;
  --radius: 20px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: radial-gradient(120% 80% at 50% 0%, var(--bg2), var(--bg)) fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 40px;
}
[hidden] { display: none !important; }
header { text-align: center; color: #fff; margin-bottom: 20px; }
header .logo { font-size: 56px; line-height: 1; }
header h1 { margin: 8px 0 4px; font-size: 28px; letter-spacing: -0.02em; }
header p { margin: 0; color: #cfe3d3; font-size: 15px; }
main { width: 100%; max-width: 440px; }
main.wide { max-width: 640px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  margin-bottom: 16px;
}
label.field { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
input[type="text"], input[type="password"] {
  width: 100%;
  font: inherit;
  font-size: 18px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
input:focus { border-color: var(--lime-dark); }
.flavors { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 18px; }
.flavor { position: relative; }
.flavor input { position: absolute; opacity: 0; inset: 0; }
.flavor span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, background 0.12s;
}
.flavor span i { font-style: normal; font-size: 34px; }
.flavor input:checked + span { border-color: var(--lime-dark); background: #f1f9d9; transform: scale(1.03); }
.flavor input:focus-visible + span { outline: 3px solid var(--lime); }
button {
  font: inherit;
  font-weight: 800;
  border: 0;
  border-radius: 14px;
  padding: 15px 18px;
  cursor: pointer;
  color: var(--ink);
  background: var(--line);
  touch-action: manipulation;
}
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.5; cursor: default; }
button.primary { background: var(--lime); width: 100%; font-size: 18px; box-shadow: 0 4px 0 var(--lime-dark); }
button.ghost { background: transparent; color: var(--muted); width: 100%; font-weight: 600; }
button.small { padding: 10px 14px; font-size: 14px; }
button.danger { background: #fde3e8; color: #b3183c; }
.hint { text-align: center; color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.error { color: #b3183c; font-weight: 700; font-size: 14px; margin: 12px 0 0; text-align: center; min-height: 1em; }

/* guest ticket */
.ticket { text-align: center; }
.ticket .num { font-size: 15px; font-weight: 700; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.ticket .who { font-size: 26px; font-weight: 800; margin: 6px 0 2px; overflow-wrap: anywhere; }
.ticket .what { color: var(--muted); font-weight: 600; }
.state { margin: 20px 0 16px; padding: 22px 14px; border-radius: 18px; background: #f3f5e8; }
.state .emoji { font-size: 52px; line-height: 1; }
.state .big { font-size: 44px; font-weight: 900; letter-spacing: -0.03em; margin: 8px 0 2px; }
.state .title { font-size: 21px; font-weight: 800; margin: 8px 0 4px; }
.state .sub { color: var(--muted); font-weight: 600; }
.state.preparing { background: #fff3cf; }
.state.ready { background: var(--lime); animation: pulse 1.1s ease-in-out infinite; }
.state.ready .sub { color: var(--ink); }
@keyframes pulse { 50% { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(183, 224, 74, 0.25); } }
@media (prefers-reduced-motion: reduce) { .state.ready { animation: none; } }

/* bartender board */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: rgba(255, 255, 255, 0.1); color: #fff; border-radius: 14px; padding: 12px 8px; text-align: center; }
.stat b { display: block; font-size: 26px; }
.stat span { font-size: 12px; color: #cfe3d3; }
.card h2 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.order { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.order:first-of-type { border-top: 0; padding-top: 0; }
.order .n { font-weight: 900; color: var(--muted); min-width: 34px; }
.order .info { flex: 1; min-width: 0; }
.order .info b { display: block; font-size: 18px; overflow-wrap: anywhere; }
.order .info span { font-size: 14px; color: var(--muted); font-weight: 600; }
.order .actions { display: flex; gap: 6px; flex-shrink: 0; }
.order button.go { background: var(--lime); }
.empty { color: var(--muted); text-align: center; margin: 4px 0; }
.card.preparing { background: #fff8e1; }
.card.ready { background: #f1f9d9; }
.topbar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.topbar button { background: transparent; color: #cfe3d3; font-weight: 600; padding: 6px 10px; }
