/* Live boards - The Useful Agent palette: ink, paper, lime, coral. */
:root {
  --lime: #c6f135;
  --coral: #ff6a4d;
  --ink: #16141f;
  --ink-2: #232036;
  --violet: #5a3ff0;
  --paper: #ffffff;
  --bg: #f5f3ec;
  --muted: #55526a;
  --line: #dcd8ca;
  --danger: #c2391d;
  --ok: #3a5200;
  --ok-soft: #e6f9b4;
  --radius: 18px;
  /* themeable roles (wall, presenter, header band) */
  --stage-1: #16141f; --stage-2: #232036; --glow-1: #2c3a0a; --glow-2: #3d1a12;
  --band-bg: #16141f; --band-fg: #f5f3ec; --band-dot-1: #c6f135; --band-dot-2: #ff6a4d; --crumb: #c6f135;
  --card-3: #a99bff; --card-3-fg: #16141f; --hl-end: #e8ff8f; --lb-2: #e3ffa0; --lb-3: #f1ffd0;
  --display: "Bricolage Grotesque", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

/* Classic theme: the original orange / yellow / teal design in Verdana. */
:root[data-theme=classic] {
  --lime: #FF9E18; --coral: #00729C; --ink: #14202a; --ink-2: #00384d; --violet: #00729C;
  --bg: #f4f6f8; --muted: #5b6b76; --line: #dfe5ea;
  --stage-1: #062330; --stage-2: #00384d; --glow-1: #0a4d66; --glow-2: #3a2a05;
  --band-bg: linear-gradient(135deg, #FF9E18, #ffb547 60%, #FFDA35); --band-fg: #14202a;
  --band-dot-1: #FFDA35; --band-dot-2: #00729C; --crumb: #14202a;
  --card-3: #00729C; --card-3-fg: #ffffff; --hl-end: #FFDA35; --lb-2: #FFDA35; --lb-3: #ffe98a;
  --display: Verdana, Geneva, Tahoma, sans-serif;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}
:root[data-theme=classic] .band::after { opacity: 0.45; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); line-height: 1.45; }
a { color: var(--violet); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.01em; }

/* ---------- page header band ---------- */
.band { background: var(--band-bg); color: var(--band-fg); padding: 28px 16px 64px; position: relative; overflow: hidden; }
.band::after {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -60px; top: -90px;
  background: var(--band-dot-1); opacity: 0.9;
}
.band::before {
  content: ""; position: absolute; width: 70px; height: 70px; border-radius: 50%; right: 150px; top: 40px;
  background: var(--band-dot-2);
}
.band h1 { margin: 0 0 4px; font-size: 1.6rem; position: relative; z-index: 1; max-width: calc(100% - 140px); overflow-wrap: anywhere; }
.band p { margin: 0; opacity: 0.8; position: relative; z-index: 1; max-width: calc(100% - 140px); }
.band .crumb { position: relative; z-index: 1; font-size: 0.85rem; margin-bottom: 10px; }
.band .crumb a { color: var(--crumb); text-decoration: none; font-weight: 600; }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px 40px; position: relative; }
.wrap.wide { max-width: 1040px; }
.card { background: var(--paper); border-radius: var(--radius); box-shadow: 0 1px 0 rgba(22,20,31,.06), 0 14px 34px -18px rgba(22,20,31,.35); padding: 20px; margin-top: -44px; position: relative; z-index: 2; }
.card + .card, .stack > .card + .card { margin-top: 16px; }
.card h2 { margin: 0 0 10px; font-size: 1.15rem; }
label { display: block; font-weight: 600; font-size: 0.9rem; margin: 16px 0 6px; }
label:first-child { margin-top: 0; }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff;
  font-size: 16px; /* stops iOS zoom */ transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--violet); }
textarea { min-height: 120px; resize: vertical; }
.hint { color: var(--muted); font-size: 0.82rem; margin-top: 4px; display: flex; justify-content: space-between; gap: 8px; }
.muted { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: 0.9rem; }
.chip[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid transparent; border-radius: 999px; padding: 13px 22px; cursor: pointer;
  font-weight: 700; background: var(--ink); color: #f5f3ec; text-decoration: none; line-height: 1.1;
}
.btn.block { width: 100%; margin-top: 20px; font-size: 1.05rem; padding: 16px; }
.btn.accent { background: var(--lime); color: var(--ink); }
.btn.coral { background: var(--coral); color: var(--ink); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.small { padding: 8px 14px; font-size: 0.85rem; }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn:disabled { opacity: 0.5; cursor: default; }
.error { color: var(--danger); font-size: 0.9rem; margin-top: 12px; min-height: 1.2em; }
.hidden { display: none !important; }
.done { text-align: center; padding: 24px 8px; }
.done .big { font-size: 3rem; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.switch { display: flex; align-items: center; gap: 10px; font-weight: normal; margin: 12px 0 0; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--ink); }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--bg); border-radius: 12px; padding: 8px 10px; margin-top: 6px; font-size: 0.85rem; word-break: break-all; }
.linkbox code { flex: 1; }
.pill { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; border-radius: 999px; padding: 2px 8px; font-weight: 700; white-space: nowrap; }
.pill.live { background: var(--ok-soft); color: var(--ok); }
.pill.pending { background: #ffe2da; color: #a8321a; }
.pill.hidden { background: #eee; color: #666; display: inline !important; }

/* ---------- result bars (phones + admin) ---------- */
.bars { display: grid; gap: 10px; margin-top: 12px; }
.bar { position: relative; border-radius: 12px; background: var(--bg); overflow: hidden; min-height: 46px; display: flex; align-items: center; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 12px; transition: width 0.5s cubic-bezier(.2,.9,.3,1); opacity: 0.9; }
.bar span { position: relative; padding: 10px 14px; flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.bar b { position: relative; padding: 0 14px; }
.bar.mine { outline: 3px solid var(--ink); outline-offset: -3px; }
.bar.right span::after { content: " ✓"; }
.bar.wrong { opacity: 0.45; }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
