/* Living Room & Office TV Party Console — leftrightchristmas.com
 * Dual-surface palette: crisp daylight host studio + high-contrast 10-foot TV dark stage.
 */

:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --surface-warm: #f4eee4;
  --border: #e5dccd;
  --border-strong: #cfc2ad;
  --ink: #11231b;
  --ink-muted: #4b5e55;
  --crimson: #b91c1c;
  --crimson-dark: #991b1b;
  --crimson-soft: #fef2f2;
  --pine: #0f5132;
  --pine-bright: #10b981;
  --pine-soft: #ecfdf5;
  --gold: #b45309;
  --gold-bright: #f59e0b;
  --gold-soft: #fffbeb;
  --frost: #0284c7;
  --frost-bright: #38bdf8;
  --tv-bg: #0a1712;
  --tv-card: #12261f;
  --tv-border: rgba(250, 246, 238, 0.14);
  --tv-ink: #faf6ee;
  --tv-muted: #b6c8bf;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 10px 28px rgba(17, 35, 27, 0.07);
  --shadow-lg: 0 18px 46px rgba(17, 35, 27, 0.14);
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--pine); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 248, 243, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--tv-ink);
  display: grid;
  place-items: center;
  font-size: 16px;
  border: 2px solid #d9a441;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name { font-family: var(--font-display); font-size: 1.08rem; }
.brand-sub { font-size: 0.72rem; font-weight: 600; color: var(--ink-muted); letter-spacing: 0.04em; text-transform: uppercase; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.brand,
.nav-link,
.pass-pill,
.breadcrumbs a,
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
}

.nav-link {
  justify-content: center;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink-muted);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--surface-warm);
  color: var(--ink);
  text-decoration: none;
}

.nav-link.active {
  background: var(--ink);
  color: var(--tv-ink);
}

.pass-pill {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--gold);
  background: var(--gold-soft);
  color: #78350f;
  font-size: 0.85rem;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}

.pass-pill:hover { background: #fef3c7; }

/* Page Layout */
.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--pine-soft);
  color: var(--pine);
  border: 1px solid #b7e4cc;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.hero h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero p {
  margin: 0;
  max-width: 680px;
  color: var(--ink-muted);
  font-size: 1.03rem;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Workspace Grid */
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(310px, 410px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.workspace-grid.balanced {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card-title {
  margin: 0 0 14px;
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Forms & Inputs */
.field { margin-bottom: 15px; }

.field label, .field-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.field-hint {
  display: block;
  font-size: 0.79rem;
  color: var(--ink-muted);
  margin-top: 5px;
}

.input, .select, .textarea {
  width: 100%;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 0.96rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgba(15, 81, 50, 0.14);
}

.textarea { min-height: 88px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.segmented {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.seg-btn {
  flex: 1 1 auto;
  min-width: 78px;
  min-height: 44px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.seg-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--tv-ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-weight: 750;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.08s, background 0.15s, border-color 0.15s;
  text-decoration: none;
  min-width: 44px;
  min-height: 44px;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--crimson); color: #fff; }
.btn-primary:hover { background: var(--crimson-dark); }

.btn-tv {
  background: var(--ink);
  color: var(--tv-ink);
  border-color: #d9a441;
}
.btn-tv:hover { background: #193529; }

.btn-pine { background: var(--pine); color: #fff; }
.btn-pine:hover { background: #0c4128; }

.btn-secondary {
  background: var(--surface-warm);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: #ebe1d2; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-sm { padding: 7px 12px; font-size: 0.84rem; border-radius: 9px; }
.btn-block { width: 100%; }

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Badges & Stats */
.stat-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 750;
  background: var(--surface-warm);
  border: 1px solid var(--border);
}

.stat-chip.left { background: var(--pine-soft); color: #065f46; border-color: #a7f3d0; }
.stat-chip.right { background: var(--crimson-soft); color: #991b1b; border-color: #fecaca; }
.stat-chip.balanced { background: var(--gold-soft); color: #92400e; border-color: #fde68a; }
.stat-chip.frost { background: #e0f2fe; color: #075985; border-color: #bae6fd; }

/* Left-Right Story Output */
.story-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.story-sentence {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 1.03rem;
  line-height: 1.65;
}

.story-sentence .sent-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-right: 8px;
}

.cue-left {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  background: #059669;
  color: #ffffff;
  font-weight: 850;
  letter-spacing: 0.03em;
}

.cue-right {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  background: #dc2626;
  color: #ffffff;
  font-weight: 850;
  letter-spacing: 0.03em;
}

body[data-tv-theme="velvet"] {
  --tv-bg: #1f0710;
  --tv-card: #34101c;
  --tv-border: rgba(255, 214, 140, 0.22);
  --tv-ink: #fff4e2;
  --tv-muted: #e3b9a6;
}

body[data-tv-theme="rink"] {
  --tv-bg: #061826;
  --tv-card: #0d2a40;
  --tv-border: rgba(190, 230, 255, 0.20);
  --tv-ink: #f2faff;
  --tv-muted: #a9cbe0;
}

body[data-tv-theme="neon"] {
  --tv-bg: #0a0614;
  --tv-card: #1a0f2e;
  --tv-border: rgba(255, 90, 200, 0.30);
  --tv-ink: #fbf7ff;
  --tv-muted: #cbb8ea;
}

/* Office & Team Party Pass Clean TV mode: hides corner QR only when Office Pass host enables it */
body[data-tv-clean="1"] .tv-corner-badge {
  display: none !important;
}

.tv-team-banner {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(245, 215, 142, 0.18);
  border: 1px solid #d9a441;
  color: #fde68a;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.tv-team-banner[hidden] { display: none !important; }

.tv-header-input {
  width: 210px;
}

.tv-header-input::placeholder {
  color: var(--tv-muted);
}

/* Full-Screen TV Overlay (10-foot readable at 1920x1080 + clean mobile layout) */
.tv-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(circle at 20% 10%, var(--tv-card) 0%, var(--tv-bg) 62%);
  color: var(--tv-ink);
  display: flex;
  flex-direction: column;
  padding: 22px 32px 24px;
  overflow-y: auto;
  overflow-x: hidden;
}

.tv-overlay[hidden] { display: none !important; }

.tv-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--tv-border);
}

.tv-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tv-live-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid #ef4444;
  color: #fecaca;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tv-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 2.3rem);
}

.tv-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tv-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid rgba(250, 246, 238, 0.26);
  background: rgba(250, 246, 238, 0.08);
  color: var(--tv-ink);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
}

.tv-btn:hover { background: rgba(250, 246, 238, 0.16); text-decoration: none; }
.tv-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.tv-btn.primary { background: #dc2626; border-color: #f87171; color: #fff; }
.tv-btn.emerald { background: #059669; border-color: #34d399; color: #fff; }

.tv-select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--tv-border);
  background: var(--tv-card);
  color: var(--tv-ink);
  font-size: 0.88rem;
}

.tv-main-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 20px 0 116px;
  text-align: center;
}

.tv-cue-banners {
  display: flex;
  gap: 36px;
  justify-content: center;
  align-items: center;
  margin-bottom: 28px;
  width: 100%;
  flex-wrap: wrap;
}

.tv-cue-pill {
  min-width: 260px;
  padding: 18px 34px;
  border-radius: 20px;
  font-size: clamp(1.6rem, 3.2vw, 2.9rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  border: 3px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(250, 246, 238, 0.3);
  transition: transform 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

@keyframes cueFlashLeft {
  0% { transform: scale(1.0); box-shadow: 0 0 18px rgba(16, 185, 129, 0.45); }
  45% { transform: scale(1.08); box-shadow: 0 0 56px rgba(16, 185, 129, 0.95); }
  100% { transform: scale(1.05); box-shadow: 0 0 36px rgba(16, 185, 129, 0.65); }
}

@keyframes cueFlashRight {
  0% { transform: scale(1.0); box-shadow: 0 0 18px rgba(239, 68, 68, 0.45); }
  45% { transform: scale(1.08); box-shadow: 0 0 56px rgba(239, 68, 68, 0.95); }
  100% { transform: scale(1.05); box-shadow: 0 0 36px rgba(239, 68, 68, 0.65); }
}

.tv-cue-pill.left.lit {
  background: linear-gradient(135deg, #059669, #d97706);
  border-color: #fde68a;
  color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.7);
  animation: cueFlashLeft 0.55s ease-out 2;
}

.tv-cue-pill.right.lit {
  background: linear-gradient(135deg, #dc2626, #ea580c);
  border-color: #fed7aa;
  color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.75);
  animation: cueFlashRight 0.55s ease-out 2;
}

.tv-teleprompter-text {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.3vw, 4.1rem);
  line-height: 1.3;
  color: var(--tv-ink);
  max-width: 1380px;
  margin: 0 auto 26px;
}

.tv-teleprompter-text .cue-left {
  background: #10b981;
  color: #042117;
  padding: 2px 14px;
  border-radius: 12px;
  opacity: 0.78;
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
}

.tv-teleprompter-text .cue-right {
  background: #ef4444;
  color: #ffffff;
  padding: 2px 14px;
  border-radius: 12px;
  opacity: 0.78;
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
}

.tv-teleprompter-text .cue-active {
  opacity: 1 !important;
  outline: 4px solid #fde68a;
  box-shadow: 0 0 32px rgba(253, 230, 138, 0.85);
}

.tv-progress {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 1.3vw, 1.25rem);
  color: var(--tv-muted);
}

.nl-tv-stage-grid {
  width: 100%;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 500px);
  gap: 36px;
  align-items: center;
  padding: 20px 8px 110px;
}

.nl-tv-spotlight {
  text-align: left;
  background: var(--tv-card);
  border: 1.5px solid rgba(217, 164, 65, 0.35);
  border-radius: 24px;
  padding: clamp(24px, 3vw, 44px);
}

.nl-tv-verdict-pill {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  border: 2px solid #ef4444;
  background: rgba(185, 28, 28, 0.25);
  color: #fff;
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 1.35vw, 1.4rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.nl-tv-party {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 1.2vw, 1.25rem);
  color: #f5d78e;
  letter-spacing: 0.08em;
  font-weight: 750;
}

.nl-tv-recipient {
  margin: 8px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.3vw, 4.6rem);
  line-height: 1.08;
  color: #ffffff;
}

.nl-tv-award {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 12px;
  background: #d9a441;
  color: #0b1612;
  font-weight: 900;
  font-size: clamp(1.35rem, 2.1vw, 2.25rem);
  margin-bottom: 22px;
}

.nl-tv-bullets {
  margin: 0;
  padding-left: 28px;
  color: var(--tv-ink);
  font-size: clamp(1.55rem, 2.05vw, 2.35rem);
  line-height: 1.42;
}

.nl-tv-bullets li {
  margin-bottom: 14px;
}

.nl-tv-receipt-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.nl-tv-canvas {
  max-height: 76vh;
  width: auto;
  max-width: 100%;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.58);
}

/* PERMANENT K-LOOP CORNER BADGE (NEVER HIDDEN — 76px QR for couch scannability) */
.tv-corner-badge {
  position: fixed;
  right: 22px;
  bottom: 18px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(11, 23, 18, 0.95);
  border: 2px solid #d9a441;
  color: #faf6ee;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.tv-corner-badge-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}

.tv-corner-badge-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f5d78e;
  font-weight: 750;
}

.tv-corner-badge-domain {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
}

.tv-corner-qr {
  width: 76px;
  height: 76px;
  padding: 4px;
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.tv-corner-qr svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* White Elephant Board + Responsive Full-Width TV Layout */
.timer-panel {
  text-align: center;
  padding: 20px;
  border-radius: 18px;
  background: var(--tv-bg);
  color: var(--tv-ink);
  border: 1.5px solid rgba(217, 164, 65, 0.35);
  margin-bottom: 18px;
}

.timer-digits {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 6vw, 4.8rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 8px 0 12px;
}

.tv-timer-digits {
  font-size: clamp(4rem, 7.2vw, 6.8rem);
}

.timer-digits.urgent { color: #f87171; animation: pulseUrgent 0.6s infinite alternate; }

@keyframes pulseUrgent {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

.timer-bar-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  margin-bottom: 14px;
}

.timer-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #f59e0b);
  transition: width 0.25s linear;
}

.timer-bar-fill.urgent { background: linear-gradient(90deg, #ef4444, #f97316); }

.we-tv-layout {
  width: 100%;
  max-width: none;
  margin: 22px 0 112px;
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.tv-turn-queue {
  text-align: left;
  margin-top: 16px;
  font-size: clamp(1rem, 1.35vw, 1.45rem);
  color: var(--tv-muted);
  max-height: 46vh;
  overflow-y: auto;
}

.turn-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.turn-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  overflow-wrap: anywhere;
  gap: 6px;
  padding: 6px 10px 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.turn-pill.current {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #fff;
}

.turn-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  opacity: 0.85;
}

.pill-remove-btn {
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
  display: grid;
  place-items: center;
}

.turn-pill.current .pill-remove-btn { background: rgba(255, 255, 255, 0.22); }

.gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.tv-gift-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.gift-card {
  border-radius: 16px;
  padding: 16px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, transform 0.2s;
}

.tv-gift-grid .gift-card {
  padding: 20px;
  gap: 12px;
}

.gift-card.frozen {
  background: linear-gradient(155deg, #e0f2fe 0%, #f0f9ff 100%);
  color: var(--ink);
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
}

.gift-card.just-frozen { animation: freezePop 0.55s ease; }

@keyframes freezePop {
  0% { transform: scale(0.96); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.gift-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.gift-name { font-weight: 800; font-size: 1.06rem; margin: 0; overflow-wrap: anywhere; }
.tv-gift-grid .gift-name { font-size: clamp(1.25rem, 1.8vw, 1.9rem); line-height: 1.2; }
.tv-gift-grid .gift-holder-line { font-size: clamp(1.05rem, 1.35vw, 1.45rem); }

.steal-pips {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.pip {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: var(--border);
  border: 1px solid var(--border-strong);
}

.pip.filled { background: var(--crimson); border-color: var(--crimson-dark); }
.pip.frozen { background: var(--frost); border-color: #0369a1; }

.frozen-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 9px;
  background: #0369a1;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.tv-gift-grid .frozen-banner { font-size: clamp(0.9rem, 1.15vw, 1.15rem); padding: 9px 13px; }

/* Ugly Sweater Contest & Live Voting */
.privacy-banner {
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--pine-soft);
  border: 1px solid #a7f3d0;
  color: #064e3b;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.contestant-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.contestant-row .input {
  min-width: 0;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 36px;
  border-radius: 9px;
  background: var(--ink);
  color: #f5d78e;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.contestant-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}

.room-result-box {
  padding: 18px;
  border-radius: 16px;
  background: var(--tv-bg);
  color: var(--tv-ink);
  border: 1.5px solid #d9a441;
}

.room-code-big {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 2.8vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #f5d78e;
}

/* Dedicated TV Projection Page (/ugly-sweater-contest/tv/:token) — 10-foot full-bleed 1080p fit */
.tv-page-body {
  background: radial-gradient(circle at 18% 8%, var(--tv-card) 0%, var(--tv-bg) 62%);
  color: var(--tv-ink);
  min-height: 100vh;
}

.tv-projection-wrap {
  width: 100%;
  max-width: none;
  padding: 20px 30px 116px;
}

.tv-projection-grid {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 18px;
}

.tv-scan-card {
  background: var(--tv-card);
  border: 1.5px solid rgba(217, 164, 65, 0.45);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
}

.tv-big-qr {
  background: #ffffff;
  border-radius: 14px;
  padding: 12px;
  display: inline-block;
  margin: 10px 0 14px;
}

.tv-big-qr svg { width: clamp(190px, 14vw, 250px); height: clamp(190px, 14vw, 250px); display: block; }

.leaderboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}

.leaderboard-grid.dense {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.cat-board {
  background: var(--tv-card);
  border: 1px solid var(--tv-border);
  border-radius: 18px;
  padding: 18px 20px;
}

.cat-board h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.75vw, 1.85rem);
  color: #f5d78e;
}

.bar-row { margin-bottom: 11px; }

.bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 5px;
  font-weight: 750;
  font-size: clamp(1.02rem, 1.3vw, 1.45rem);
}

.bar-track {
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #f59e0b);
  transition: width 0.45s ease;
}

.bar-row.winner .bar-fill {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.winner-crown {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f59e0b;
  color: #111;
  font-size: 0.78rem;
  font-weight: 900;
  margin-left: 8px;
}

.cat-more-note {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--tv-muted);
  font-family: var(--font-mono);
}

/* Mobile Guest Voting Page */
.vote-shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 56px;
}

.vote-category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.vote-option-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.vote-option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 15px;
  border-radius: 14px;
  border: 2px solid var(--border-strong);
  background: var(--bg);
  text-align: left;
  cursor: pointer;
  min-height: 58px;
}

.vote-option-btn:hover { border-color: var(--pine); background: var(--pine-soft); }
.vote-option-btn.selected {
  border-color: var(--pine);
  background: var(--pine);
  color: #ffffff;
}

.vote-option-btn.selected .badge-tag {
  background: #ffffff;
  color: var(--ink);
}

/* Naughty List Thermal Receipt Preview */
.receipt-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.receipt-canvas {
  width: 100%;
  max-width: 460px;
  height: auto;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

/* Retention & SEO Guide / FAQ */
.retention-strip {
  margin-top: 34px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #11231b 0%, #19382b 100%);
  color: var(--tv-ink);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px;
  align-items: center;
}

.retention-strip h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.retention-strip p { margin: 0; color: var(--tv-muted); font-size: 0.94rem; }

.reminder-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reminder-form .input {
  flex: 1 1 200px;
  background: rgba(255, 255, 255, 0.96);
}

.seo-section {
  margin-top: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

.faq-list details {
  border-bottom: 1px solid var(--border);
}

.faq-list summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.faq-list details p {
  margin: 0 0 12px;
  color: var(--ink-muted);
  font-size: 0.94rem;
}

/* Guides Hub, Article Typography, Tables & Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.guide-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 18px;
}

.guide-hub-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.guide-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.guide-link-list li {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.guide-article {
  padding: 28px;
}

.guide-intro {
  font-size: 1.08rem;
  color: var(--ink-muted);
  margin: 0;
}

.guide-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.guide-section h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--ink);
}

.guide-section p {
  margin: 0 0 12px;
  color: var(--ink);
}

.guide-bullets,
.guide-steps {
  margin: 10px 0 14px;
  padding-left: 22px;
}

.guide-bullets li,
.guide-steps li {
  margin-bottom: 8px;
}

.guide-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.guide-table th,
.guide-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.guide-table thead th {
  background: var(--surface-warm);
  font-weight: 800;
  color: var(--ink);
}

.guide-table tbody tr:last-child td {
  border-bottom: none;
}

.guide-inline-cta {
  margin-top: 12px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(10, 23, 18, 0.68);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop[hidden] { display: none !important; }

.modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.modal-card-wide {
  max-width: 820px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.pricing-tier-card {
  border: 1.5px solid var(--border-strong);
  border-radius: 16px;
  padding: 18px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pricing-tier-card.featured {
  border-color: var(--gold);
  background: var(--gold-soft);
  box-shadow: 0 8px 24px rgba(180, 83, 9, 0.12);
}

.tier-eyebrow {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-warm);
  color: var(--ink-muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
  align-self: flex-start;
}

.tier-eyebrow.featured {
  background: var(--ink);
  color: #fde68a;
}

.tier-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
}

.tier-price {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--ink);
  margin: 6px 0 2px;
  line-height: 1.1;
}

.tier-cadence {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--ink-muted);
}

.tier-anchor {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}

.tier-footnote {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin: 0 0 12px;
}

.modal-list {
  padding-left: 20px;
  margin: 12px 0 16px;
  color: var(--ink);
}

.modal-list li { margin-bottom: 6px; }

.notice-box {
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--surface-warm);
  font-size: 0.84rem;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-warm);
  padding: 26px 20px 36px;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.status-msg {
  font-size: 0.88rem;
  font-weight: 650;
  margin-top: 8px;
  min-height: 20px;
}

.status-msg.ok { color: var(--pine); }
.status-msg.err { color: var(--crimson); }

@media (prefers-reduced-motion: reduce) {
  .tv-cue-pill.left.lit,
  .tv-cue-pill.right.lit,
  .timer-digits.urgent,
  .gift-card.just-frozen {
    animation: none !important;
  }
}

/* Mobile & Tablet Responsive */
@media (max-width: 900px) {
  .workspace-grid,
  .workspace-grid.balanced,
  .tv-projection-grid,
  .we-tv-layout,
  .nl-tv-stage-grid,
  .retention-strip,
  .seo-section {
    grid-template-columns: 1fr;
  }
  .tv-gift-grid {
    grid-template-columns: 1fr;
  }
  .leaderboard-grid,
  .leaderboard-grid.dense {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner { padding: 10px 14px; }
  .container { padding: 18px 14px 48px; }
  .card { padding: 16px; border-radius: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .main-nav { width: 100%; flex-wrap: wrap; gap: 5px; }
  .nav-link { padding: 6px 10px; font-size: 0.8rem; }
  .pass-pill { padding: 6px 11px; font-size: 0.78rem; }
  .tv-overlay { padding: 14px 14px 96px; }
  .tv-projection-wrap { padding: 14px 14px 96px; }
  .tv-cue-banners { gap: 14px; }
  .tv-cue-pill { min-width: 140px; padding: 12px 16px; font-size: 1.2rem; }
  .tv-corner-badge {
    right: 10px;
    bottom: 10px;
    padding: 7px 10px;
    gap: 8px;
  }
  .tv-corner-qr { width: 52px; height: 52px; }
  .tv-corner-badge-domain { font-size: 0.8rem; }
  .tv-corner-badge-label { font-size: 0.66rem; }
}
