:root {
  color-scheme: light;
  --paper: #f3eee4; --card: #fcf8ef; --ink: #24201d; --muted: #655b51;
  --line: #d9cdbd; --red: #8d252b; --red-dark: #711e23; --green: #cce86e;
  --mono: ui-monospace, "Cascadia Mono", "Courier New", monospace;
  --display: "Arial Black", "Segoe UI", Arial, sans-serif;
  font: 16px/1.45 "Segoe UI", system-ui, sans-serif;
  color: var(--ink); background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; min-height: 100svh; display: flex; flex-direction: column; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
a { color: inherit; }
:focus-visible { outline: 3px solid #167ba3; outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.site-header, .site-footer { width: 100%; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { width: min(1280px, calc(100% - 96px)); margin-inline: auto; }
.header-inner { height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.wordmark b { display: block; font: 900 15px/1 var(--display); letter-spacing: -.025em; }
.wordmark small { display: block; margin-top: 6px; font: 10px/1 var(--mono); letter-spacing: .065em; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 99px; padding: 4px; }
.nav a { text-decoration: none; font-size: 13px; font-weight: 700; padding: 7px 15px; border-radius: 99px; white-space: nowrap; }
.nav a:hover { background: #e9e0d3; }
.nav a[aria-current] { color: var(--card); background: var(--ink); }
#app { flex: 1; }
.wrap { width: min(1280px, calc(100% - 96px)); margin-inline: auto; }
.section-cap, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 700 11px/1.35 var(--mono); letter-spacing: .095em; }
.section-cap { color: var(--muted); padding: 24px 0 13px; }
.section-cap b { color: var(--red-dark); }
.footer-inner { border-top: 1px solid var(--line); min-height: 64px; color: var(--muted); }
.sep { color: var(--red); margin-inline: .4em; }
.stage-grid { min-height: clamp(470px, 65vh, 720px); margin-bottom: 26px; display: grid; grid-template-columns: 1fr 1.08fr; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.textile {
  color: #fff4e8;
  background-color: #57191d;
  background-image:
    radial-gradient(ellipse at 45% 35%, #be303766 0%, transparent 69%),
    repeating-linear-gradient(0deg, #1f0c0b40 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, #fff0d212 0 1px, transparent 1px 3px),
    linear-gradient(145deg, #8d202a, #48191c 73%, #291316);
}
.brand-panel { position: relative; min-width: 0; padding: 28px; display: grid; grid-template-rows: auto 1fr auto; gap: 20px; isolation: isolate; }
.brand-panel::before { content: ""; position: absolute; inset: 13px; border: 1px dashed #ffedcd70; border-radius: 11px; z-index: -1; pointer-events: none; }
.brand-top, .brand-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 700 10px/1.3 var(--mono); letter-spacing: .13em; }
.brand-top .tiny, .brand-bottom { color: #ffedcdbb; }
.brand-center { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 0; }
.brand-logo { width: min(93%, 410px); height: auto; display: block; filter: drop-shadow(0 6px 8px #160405aa); }
.live-label { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.live-dot { width: 7px; height: 7px; display: inline-block; flex-shrink: 0; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px #cce86786; }
.is-off .live-dot { background: currentColor; opacity: .55; box-shadow: none; }
.crosses { color: var(--green); letter-spacing: .4em; white-space: nowrap; }
.guest-panel { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: clamp(27px, 5.3vw, 78px); }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--red-dark); font: 800 11px/1.35 var(--mono); letter-spacing: .115em; }
.eyebrow::before { content: "✳"; font-size: 15px; line-height: 1; }
.guest-panel h1 { margin-top: 16px; font: 900 clamp(33px, 4.15vw, 66px)/.99 var(--display); letter-spacing: -.065em; overflow-wrap: anywhere; }
.guest-panel .question-title { font-size: clamp(29px, 3.35vw, 48px); line-height: 1.06; letter-spacing: -.05em; }
.guest-panel h1 em { color: var(--red); font-style: normal; }
.guest-copy { max-width: 345px; color: var(--muted); margin-top: 21px; font-size: 16px; }
.waiting-status { margin-top: 34px; width: fit-content; border: 1px dashed #b7a897; border-radius: 8px; display: inline-flex; gap: 9px; align-items: center; padding: 10px 13px; color: #594f45; font: 700 11px/1.3 var(--mono); letter-spacing: .045em; }
.waiting-status .live-dot { background: #648626; box-shadow: none; }
.waiting-status.is-off .live-dot { background: currentColor; }
.waiting-accent { color: var(--red); }
.notice { min-height: 1.4em; color: var(--red-dark); font-size: 13px; margin-top: 12px; }
.notice:empty { display: none; }
.timer { margin: 21px 0 18px; --stitch: var(--red); --rail: #dccfc0; }
.timer-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; color: var(--muted); font: 700 10px/1 var(--mono); letter-spacing: .08em; }
.timer-number { color: var(--ink); font: 800 18px/1 var(--mono); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.stitch-track { position: relative; height: 8px; }
.stitch-track::before, .stitch-fill { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(110deg, transparent 0 2px, var(--rail) 2px 7px, transparent 7px 10px); }
.stitch-fill { background: repeating-linear-gradient(110deg, transparent 0 2px, var(--stitch) 2px 7px, transparent 7px 10px); clip-path: inset(0 calc(100% - var(--remaining, 0%)) 0 0); }
.choices { display: grid; gap: 8px; }
.choice, .choice-static { width: 100%; min-width: 0; min-height: 52px; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; text-align: left; gap: 12px; padding: 8px 12px; color: var(--ink); background: #fffdf6; border: 1px solid #d8cbb9; border-radius: 9px; }
.choice { transition: background .16s, border-color .16s; }
.choice:hover:not(:disabled) { background: #f8e9da; border-color: var(--red); }
.choice:active:not(:disabled) { background: #f3d8cc; }
.choice-tag { width: 30px; min-height: 30px; display: grid; place-items: center; border-radius: 5px; font: 800 13px/1 var(--mono); color: var(--ink); background: var(--tag, #dbeba4); }
.choice-text { font-weight: 750; line-height: 1.17; overflow-wrap: anywhere; }
.choice-tail { font: 800 14px/1 var(--mono); color: var(--red-dark); white-space: nowrap; }
.winner-row { border-color: #80994e; background: #edf2d6; }
.vote-done { margin-top: 23px; display: flex; gap: 10px; align-items: center; padding: 13px; border-radius: 9px; border: 1px dashed #9aa76e; background: #eef0d9; color: #33451e; font-weight: 750; }
.vote-done span { font-size: 17px; }
.result-list { margin-top: 22px; }
.btn { min-height: 44px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 10px 15px; text-decoration: none; border: 1px solid var(--line); border-radius: 8px; background: #fffbf2; color: var(--ink); font-size: 14px; font-weight: 750; }
.btn:hover:not(:disabled) { border-color: var(--red); }
.btn.primary { color: #fff8ed; background: var(--red-dark); border-color: var(--red-dark); }
.btn.primary:hover:not(:disabled) { background: var(--red); }
.btn.quiet { background: transparent; }
.btn.danger { color: var(--red-dark); }
.admin-wrap { padding-bottom: 32px; }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.admin-heading h1, .login-card h1 { font: 900 clamp(33px, 5vw, 60px)/1 var(--display); letter-spacing: -.055em; }
.admin-links { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-grid { display: grid; grid-template-columns: minmax(245px, .78fr) minmax(0, 1.32fr); align-items: start; gap: 17px; }
.card { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 21px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head h2 { font-size: 20px; letter-spacing: -.03em; }
.card-head .btn { min-height: 36px; padding: 6px 10px; }
.queue { display: grid; gap: 8px; }
.queue-row { border: 1px solid var(--line); border-radius: 8px; padding: 9px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px; background: #fffaf0; min-width: 0; }
.queue-row.is-selected { border-color: var(--red); background: #f9ece2; }
.queue-select, .icon-btn { color: var(--ink); background: transparent; border: 0; border-radius: 5px; text-align: left; }
.queue-select { display: flex; align-items: center; gap: 8px; padding: 4px; min-height: 40px; min-width: 0; }
.queue-title { display: block; font-size: 14px; line-height: 1.18; font-weight: 750; overflow-wrap: anywhere; }
.queue-time { display: block; margin-top: 4px; font: 11px/1.2 var(--mono); color: var(--muted); }
.queue-index { color: var(--red-dark); font: 800 12px/1 var(--mono); }
.icon-btn { padding: 7px; font-size: 18px; min-width: 35px; text-align: center; }
.icon-btn:hover { background: #f0e1d2; }
.board { overflow: hidden; padding: 0; }
.board-stage { padding: 22px 25px; }
.board-stage .eyebrow, .board-stage .timer-number, .board-stage .timer-top { color: #fff2db; }
.board-stage h2 { font: 850 clamp(24px, 3vw, 38px)/1.07 var(--display); margin-top: 9px; letter-spacing: -.04em; overflow-wrap: anywhere; }
.board-stage .timer { --stitch: #d0ec71; --rail: #fbe7c942; margin-bottom: 0; }
.board-main { padding: 21px; }
.control-row { display: flex; flex-wrap: wrap; gap: 8px; }
.next-cue { flex-basis: 100%; margin: 0 0 2px; font-size: 13px; color: var(--muted); }
.next-cue strong { color: var(--ink); }
.board p.subtle, .subtle { color: var(--muted); font-size: 14px; }
.tally { margin: 17px 0 0; }
.tally .choice-static { margin-top: 6px; min-height: 44px; }
.tally .choice-tag { min-height: 26px; }
.total { font: 700 11px/1.4 var(--mono); color: var(--muted); margin-bottom: 8px; letter-spacing: .055em; }
.login-card { max-width: 455px; margin: 52px auto; }
.login-card h1 { font-size: clamp(30px, 5vw, 41px); margin: 10px 0; }
.login-card form { margin-top: 22px; }
.field { display: grid; gap: 6px; margin-bottom: 13px; font-size: 13px; font-weight: 700; }
.field input, .field textarea { color: var(--ink); background: #fffdf8; border: 1px solid #bcae9d; border-radius: 7px; width: 100%; padding: 9px 10px; min-height: 44px; font-size: 16px; }
.field textarea { resize: vertical; }
.field input[type=number] { max-width: 135px; }
.field-group { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 10px; }
.editor { margin-top: 15px; }
.editor .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.preview-links { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.connection-note { font: 700 10px/1.35 var(--mono); color: var(--muted); }
.projector-page { color-scheme: dark; background: #231416; color: #fff6e7; }
.projector-page #app { display: flex; flex-direction: column; }
.projector {
  min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; gap: clamp(14px, 3vh, 38px);
  padding: clamp(20px, 4vw, 70px); position: relative; isolation: isolate;
}
.projector::before { content: ""; position: absolute; inset: clamp(8px, 1.3vw, 22px); border: 1px dashed #f6d8b361; border-radius: 12px; z-index: -1; }
.projector-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.projector-top img { width: clamp(90px, 12vw, 180px); height: auto; }
.projector-top .live-label, .projector-bottom { font: 800 clamp(10px, 1vw, 15px)/1.4 var(--mono); letter-spacing: .10em; }
.projector-main { display: grid; grid-template-columns: minmax(0, 1fr) clamp(155px, 20vw, 320px); align-items: center; gap: clamp(18px, 5vw, 90px); }
.projector .eyebrow { color: var(--green); font-size: clamp(11px, 1.2vw, 17px); }
.projector h1 { font: 900 clamp(36px, 6.6vw, 115px)/.99 var(--display); letter-spacing: -.063em; margin-top: 14px; overflow-wrap: anywhere; }
.projector h1 em { font-style: normal; color: var(--green); }
.projector h1.projector-question { font-size: clamp(31px, 4.9vw, 77px); line-height: 1.04; }
.projector-copy { color: #fff3dfcc; margin-top: 18px; font-size: clamp(14px, 1.9vw, 26px); max-width: 34ch; }
.qr-frame { text-align: center; }
.qr-panel { background: #fff; color: #241a19; padding: 4px; aspect-ratio: 1; border-radius: 13px; display: grid; place-items: center; box-shadow: 0 9px 30px #22080a50; }
.qr-panel svg { display: block; width: 100%; height: 100%; }
.qr-url { display: block; margin-top: 10px; font: 750 clamp(10px, 1.2vw, 18px)/1.25 var(--mono); text-decoration: none; overflow-wrap: anywhere; }
.qr-url:hover { text-decoration: underline; }
.qr-label { margin-top: 8px; color: #ffe7c8c7; font-size: clamp(11px, 1.25vw, 17px); }
.projector .choice-static { min-height: clamp(44px, 7vh, 80px); background: #27161994; color: #fff6e7; border-color: #f6d8b360; grid-template-columns: auto minmax(0, 1fr) auto; }
.projector .choice-tag { width: clamp(28px, 4vw, 53px); min-height: clamp(27px, 4vw, 53px); font-size: clamp(12px, 1.45vw, 20px); }
.projector .choice-text { font-size: clamp(15px, 2.25vw, 35px); }
.projector .choice-tail { color: var(--green); font-size: clamp(13px, 1.5vw, 22px); }
.projector .winner-row { background: #cce86e24; border-color: var(--green); }
.projector .timer { --stitch: var(--green); --rail: #ffe4c94a; margin: clamp(14px, 2vh, 29px) 0; }
.projector .timer-top, .projector .timer-number { color: #fff4dc; }
.projector .timer-number { font-size: clamp(18px, 2.6vw, 38px); }
.projector .stitch-track { height: 12px; }
.projector .stitch-track::before, .projector .stitch-fill { background: repeating-linear-gradient(110deg, transparent 0 3px, var(--rail) 3px 9px, transparent 9px 14px); }
.projector .stitch-fill { --rail: var(--green); }
.projector-bottom { color: #ffe8c8b0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.projector-bottom button { color: #fff7e7; background: transparent; border: 1px solid #f8dfbf6b; border-radius: 7px; padding: 6px 9px; font: inherit; }
.projector-bottom button:hover { border-color: #fff7e7; }
@media (max-width: 880px) {
  .header-inner, .footer-inner, .wrap { width: calc(100% - 48px); }
  .brand-panel { padding: 23px; }
  .guest-panel { padding: 34px; }
}
@media (max-width: 650px) {
  .header-inner, .footer-inner, .wrap { width: calc(100% - 28px); }
  .header-inner { height: 61px; gap: 10px; }
  .wordmark { gap: 7px; }
  .wordmark img { width: 29px; height: 29px; }
  .wordmark b { font-size: 11px; }
  .wordmark small { margin-top: 4px; font-size: 8px; letter-spacing: 0; }
  .nav { gap: 0; padding: 2px; }
  .nav a { padding: 6px 7px; font-size: 10px; }
  .section-cap { padding: 13px 0 8px; font-size: 9px; letter-spacing: .055em; }
  .stage-grid { grid-template-columns: 1fr; min-height: 0; margin-bottom: 15px; border-radius: 12px; }
  .brand-panel { grid-template-rows: auto 1fr; min-height: 126px; padding: 14px 16px 9px; gap: 0; }
  .brand-panel::before { inset: 6px; border-radius: 7px; }
  .brand-center { padding: 2px 0 5px; }
  .brand-logo { width: 155px; max-height: 72px; }
  .brand-top { font-size: 8px; letter-spacing: .11em; }
  .brand-bottom { display: none; }
  .guest-panel { padding: 25px 17px 26px; }
  .guest-panel h1 { font-size: clamp(34px, 10.5vw, 56px); margin-top: 12px; }
  .guest-panel .question-title { font-size: clamp(28px, 7.8vw, 40px); }
  .guest-copy { margin-top: 14px; font-size: 14px; }
  .waiting-status { margin-top: 21px; font-size: 10px; }
  .timer { margin: 15px 0 12px; }
  .footer-inner { min-height: 45px; font-size: 8px; letter-spacing: .055em; }
  .admin-heading { align-items: start; flex-direction: column; }
  .admin-grid { grid-template-columns: 1fr; }
  .card, .board-main { padding: 14px; }
  .board { padding: 0; }
  .board-stage { padding: 17px 14px; }
  .login-card { margin: 25px auto; }
  .projector-main { grid-template-columns: 1fr; align-content: center; gap: 15px; }
  .qr-frame { width: min(200px, 65vw); }
  .projector { padding: 20px; }
}
@media (max-width: 365px) {
  .header-inner, .footer-inner, .wrap { width: calc(100% - 20px); }
  .nav a { padding-inline: 5px; }
  .brand-panel { min-height: 108px; }
  .brand-logo { width: 135px; max-height: 59px; }
  .guest-panel { padding: 20px 13px; }
  .choice, .choice-static { gap: 8px; padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
