:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #2563eb;
  --danger: #dc2626;
  --ok: #16a34a;
  --border: rgba(255,255,255,.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #0b1220, var(--bg));
  color: var(--text);
}
.container { max-width: 1100px; margin: 0 auto; padding: 24px; }
.container.narrow { max-width: 520px; }
.hero { display:flex; gap:16px; justify-content:space-between; align-items:center; margin-bottom:20px; }
.card {
  background: rgba(17,24,39,.92);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  margin-bottom: 20px;
}
.grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap:20px; }
video { width: 100%; max-height: 65vh; background: #000; border-radius: 14px; }
.controls { display:flex; flex-wrap:wrap; gap:12px; margin:16px 0; }
button, .link-btn {
  appearance:none; border:0; border-radius:12px; padding:12px 16px;
  background:var(--accent); color:white; font-weight:600; text-decoration:none; cursor:pointer;
}
button.secondary { background: var(--panel-2); }
button:disabled { opacity:.5; cursor:not-allowed; }
.form { display:grid; gap:14px; }
label { display:grid; gap:8px; color: var(--muted); }
input {
  width:100%; padding:12px 14px; border-radius:12px; border:1px solid var(--border);
  background:#0b1220; color:var(--text);
}
.alert { margin:12px 0 16px; padding:12px 14px; border-radius:12px; background:rgba(220,38,38,.15); border:1px solid rgba(220,38,38,.25); }
.badge { display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:999px; font-weight:700; background:rgba(156,163,175,.12); border:1px solid rgba(156,163,175,.2); }
.badge-live { background: rgba(22,163,74,.16); color: #86efac; border: 1px solid rgba(22,163,74,.25); }
.badge-off { background: rgba(156,163,175,.12); color: #d1d5db; border: 1px solid rgba(156,163,175,.2); }
.video-note, p, li { color: var(--muted); line-height: 1.55; }
code { background: #0b1220; padding: 2px 6px; border-radius: 6px; }
.video-shell { position: relative; }
.player-overlay {
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  border-radius:14px; background:linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.58)); pointer-events:none;
}
.player-overlay-content {
  max-width:80%; text-align:center; background:rgba(15,23,42,.72); border:1px solid var(--border);
  padding:18px 20px; border-radius:16px; backdrop-filter: blur(6px);
}
.player-overlay strong { display:block; margin-bottom:12px; line-height:1.4; }
.player-overlay button { pointer-events:auto; }
.hidden { display:none !important; }
.debug-log {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.5; max-height: 220px; overflow:auto;
  background:#0b1220; border:1px solid var(--border); border-radius:12px; padding:12px; margin:14px 0;
}
.debug-toolbar { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:12px; }
.table-wrap { overflow:auto; }
.debug-table { width:100%; border-collapse: collapse; font-size: 14px; }
.debug-table th, .debug-table td { padding:10px 12px; border-bottom:1px solid var(--border); text-align:left; vertical-align: top; }
.muted-cell { color: var(--muted); text-align:center; }
.debug-inline {
  margin-top:10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:12px; color:#cbd5e1; background:#0b1220; border:1px solid var(--border); border-radius:10px; padding:10px;
}



/* --- Viewer: Boho wedding design --- */
body.viewer-home {
  --bg: #f7f0e7;
  --panel: rgba(255, 251, 246, 0.88);
  --panel-2: #e9ddcf;
  --text: #3f342d;
  --muted: #7e6c60;
  --accent: #b57f5c;
  --danger: #b14f44;
  --ok: #6e8b68;
  --border: rgba(102, 75, 58, 0.12);
  background:
    radial-gradient(circle at top left, rgba(200, 171, 144, 0.18), transparent 28%),
    radial-gradient(circle at right 18% top 10%, rgba(170, 131, 101, 0.10), transparent 18%),
    linear-gradient(180deg, #f9f4ee 0%, #f3eadf 100%);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

body.viewer-home .container { max-width: 1180px; padding: 42px 24px 56px; position: relative; z-index: 2; }
body.viewer-home h1,
body.viewer-home h2,
body.viewer-home h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: #503f35;
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}
body.viewer-home h1 { font-size: clamp(2.8rem, 5vw, 5rem); line-height: 0.95; }
body.viewer-home h2 { font-size: clamp(2rem, 3.2vw, 3rem); line-height: 1.05; }
body.viewer-home h3 { font-size: 2rem; line-height: 1.1; }
body.viewer-home p,
body.viewer-home li,
body.viewer-home .video-note { color: var(--muted); }

body.viewer-home .boho-bg {
  position: fixed;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
  z-index: 0;
}
body.viewer-home .boho-bg-a {
  width: 420px; height: 420px;
  left: -110px; top: -70px;
  background: radial-gradient(circle, rgba(194,154,124,0.18), rgba(194,154,124,0.02) 66%, transparent 72%);
}
body.viewer-home .boho-bg-b {
  width: 360px; height: 360px;
  right: -90px; bottom: 30px;
  background: radial-gradient(circle, rgba(151,125,102,0.16), rgba(151,125,102,0.02) 66%, transparent 72%);
}

body.viewer-home .card-boho {
  background: linear-gradient(180deg, rgba(255,251,246,0.88), rgba(255,248,242,0.80));
  border: 1px solid rgba(130, 98, 76, 0.14);
  border-radius: 30px;
  padding: 28px;
  box-shadow:
    0 16px 50px rgba(103, 79, 61, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.55);
  backdrop-filter: blur(10px);
}

body.viewer-home .boho-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.8fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 24px;
}

body.viewer-home .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  color: #a17b61;
  margin: 0 0 10px;
  font-weight: 700;
}

body.viewer-home .boho-lead {
  max-width: 64ch;
  font-size: 1.03rem;
  line-height: 1.72;
  margin: 12px 0 0;
}

body.viewer-home .boho-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

body.viewer-home .badge {
  background: rgba(180, 145, 120, 0.10);
  border: 1px solid rgba(180, 145, 120, 0.18);
  color: #7c5c49;
}
body.viewer-home .badge-live {
  background: rgba(110, 139, 104, 0.14);
  color: #4f6b49;
  border-color: rgba(110, 139, 104, 0.22);
}
body.viewer-home .badge-off {
  background: rgba(126, 108, 96, 0.10);
  color: #7d6e63;
  border-color: rgba(126, 108, 96, 0.18);
}
body.viewer-home .boho-info-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.48);
  border: 1px solid rgba(130, 98, 76, 0.12);
  color: #806754;
  font-weight: 600;
}

body.viewer-home .boho-hero-ornament {
  min-height: 250px;
  display: grid;
  place-items: center;
  position: relative;
}
body.viewer-home .arch {
  position: absolute;
  border-radius: 220px 220px 0 0;
  border: 1.5px solid rgba(172, 132, 104, 0.22);
  border-bottom: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.26), rgba(255,255,255,0.03));
}
body.viewer-home .arch-1 { width: 250px; height: 200px; }
body.viewer-home .arch-2 { width: 190px; height: 150px; transform: translateY(22px); }
body.viewer-home .arch-3 { width: 130px; height: 100px; transform: translateY(44px); }

body.viewer-home .stream-card { margin-bottom: 24px; }
body.viewer-home .stream-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}
body.viewer-home .stream-small-note {
  max-width: 280px;
  text-align: right;
  font-size: 0.94rem;
  margin: 0;
}

body.viewer-home .boho-video-shell {
  border-radius: 26px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(58,46,38,0.08), rgba(58,46,38,0.24)),
    #1a1715;
  border: 1px solid rgba(111, 84, 66, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}
body.viewer-home video {
  display: block;
  width: 100%;
  max-height: 72vh;
  border-radius: 26px;
  background: #0e0d0c;
}
body.viewer-home .boho-overlay {
  background: linear-gradient(180deg, rgba(32, 26, 22, 0.18), rgba(32, 26, 22, 0.62));
}
body.viewer-home .boho-overlay-content {
  max-width: 520px;
  background: rgba(255, 249, 243, 0.78);
  border: 1px solid rgba(137, 107, 85, 0.15);
  color: #4b3d34;
  box-shadow: 0 18px 44px rgba(46, 35, 28, 0.16);
}
body.viewer-home .overlay-kicker {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #a07e67;
  font-weight: 700;
}
body.viewer-home .overlay-subline {
  margin: 10px 0 0;
  line-height: 1.6;
  color: #7f6b5d;
}
body.viewer-home button,
body.viewer-home .link-btn {
  background: linear-gradient(180deg, #c29373, #b37c59);
  color: #fffaf6;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(179, 124, 89, 0.22);
}
body.viewer-home button.secondary { background: #d8cabd; color: #5e4d41; box-shadow: none; }

body.viewer-home .boho-note {
  margin-top: 16px;
  padding-left: 18px;
  border-left: 3px solid rgba(181, 127, 92, 0.36);
}

body.viewer-home .boho-grid { gap: 24px; }
body.viewer-home .status-copy {
  font-size: 1.02rem;
  color: #6b5b4f;
}
body.viewer-home .boho-debug {
  background: rgba(255,255,255,0.46);
  border: 1px solid rgba(130, 98, 76, 0.10);
  color: #6d5a4d;
}

@media (max-width: 900px) {
  body.viewer-home .boho-hero {
    grid-template-columns: 1fr;
  }
  body.viewer-home .boho-hero-ornament {
    min-height: 180px;
    order: -1;
  }
  body.viewer-home .stream-card-head {
    flex-direction: column;
    align-items: start;
  }
  body.viewer-home .stream-small-note {
    max-width: none;
    text-align: left;
  }
  body.viewer-home h1 { font-size: clamp(2.4rem, 12vw, 4rem); }
  body.viewer-home h2 { font-size: clamp(1.8rem, 8vw, 2.5rem); }
}

@media (max-width: 640px) {
  body.viewer-home .container { padding: 24px 16px 40px; }
  body.viewer-home .card-boho { padding: 20px; border-radius: 24px; }
  body.viewer-home video,
  body.viewer-home .boho-video-shell,
  body.viewer-home .player-overlay { border-radius: 20px; }
}
