:root {
  --bg: #13182b;
  --bg-2: #1b2240;
  --card: #222a4d;
  --card-2: #2a3360;
  --line: #3a4478;
  --ink: #f6f1e7;
  --muted: #b9b4c9;
  --gold: #e7c26a;
  --gold-2: #f3d891;
  --on-gold: #1a1406;
  --good: #7ed6a2;
  --bad: #ff9b8a;
  --radius: 18px;
  --display: "Fraunces", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -200px, #3a2f6b 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 60%);
  background-repeat: no-repeat;
  color: var(--ink);
  font: 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 640px; margin: 0 auto; padding: 32px 16px 64px; }
.wrap.wide { max-width: 1100px; }

.eyebrow {
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
h1 {
  font: 600 clamp(36px, 9vw, 56px)/1.05 var(--display);
  margin: 10px 0 14px;
  letter-spacing: -0.01em;
}
h1 em { color: var(--gold); font-style: italic; }
h2 { font: 600 24px/1.2 var(--display); margin: 0 0 6px; }
p { margin: 0 0 12px; }
.lede { color: var(--muted); font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.confetti { font-size: 34px; letter-spacing: 6px; }

.hero-logo { width: 190px; margin: -8px 0 4px -14px; }
.hero-logo.small { width: 110px; margin-bottom: 0; }
.hero-logo svg, .hero-logo img { display: block; width: 100%; height: auto; }
.hero-logo .b {
  transform-box: fill-box;
  animation: rise 3.2s ease-in infinite;
}
.hero-logo .b2 { animation-delay: -0.6s; animation-duration: 2.7s; }
.hero-logo .b3 { animation-delay: -1.3s; }
.hero-logo .b4 { animation-delay: -2s; animation-duration: 3.6s; }
.hero-logo .b5 { animation-delay: -0.9s; animation-duration: 2.9s; }
.hero-logo .b6 { animation-delay: -2.4s; }
.hero-logo .b7 { animation-delay: -1.7s; animation-duration: 3.4s; }
@keyframes rise {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 0.9; }
  100% { transform: translateY(-95px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .hero-logo .b { animation: none; } }

.field { margin: 24px 0 8px; }
.field label { display: block; font-weight: 600; margin-bottom: 8px; }
input[type="text"], input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
}
input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-top: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.card .num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 700;
  margin-right: 8px;
}
.card .head { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.card.done { border-color: var(--good); }

.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

button, .btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--ink);
  font: 600 16px/1 var(--body);
  padding: 14px 18px;
  min-height: 48px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover, .btn:hover { border-color: var(--gold); }
button.primary, .btn.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--on-gold);
}
button.primary:hover { background: var(--gold-2); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.danger { color: var(--bad); }
button.small, .btn.small { min-height: 36px; padding: 8px 12px; font-size: 14px; }

.status { margin-top: 12px; font-size: 15px; }
.status.good { color: var(--good); }
.status.bad { color: var(--bad); }

.progress {
  height: 8px;
  border-radius: 99px;
  background: var(--bg);
  overflow: hidden;
  margin-top: 12px;
}
.progress > i { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.2s; }

.thanks { text-align: center; padding: 28px 20px; }

/* Recorder overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: #000;
  display: none;
  flex-direction: column;
  z-index: 10;
}
.overlay.open { display: flex; }
.overlay video {
  flex: 1;
  width: 100%;
  min-height: 0;
  object-fit: contain;
  background: #000;
}
.overlay video.mirror { transform: scaleX(-1); }
#live { object-fit: cover; }
.overlay .bar {
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  background: rgba(10, 12, 24, 0.92);
}
.overlay .prompt {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  left: 16px;
  right: 16px;
  text-align: center;
  font: 600 18px/1.3 var(--display);
  text-shadow: 0 2px 10px #000;
}
.timer {
  font: 600 18px/1 var(--body);
  font-variant-numeric: tabular-nums;
  min-width: 70px;
  text-align: center;
}
.timer.rec::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #ff4d4d;
  border-radius: 50%;
  margin-right: 8px;
  animation: blink 1s infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }
.countdown {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  font: 700 140px/1 var(--display);
  color: var(--gold);
  text-shadow: 0 4px 30px #000;
  pointer-events: none;
}
.countdown.on { display: grid; }
.rec-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: #ff4d4d;
  padding: 0;
}
.rec-btn.stop { border-radius: 50%; background: #fff; }
.rec-btn.stop::after {
  content: "";
  width: 24px;
  height: 24px;
  background: #ff4d4d;
  border-radius: 4px;
}

/* Admin */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
.figures { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.figure {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  min-width: 120px;
}
.figure b { display: block; font: 600 28px/1.1 var(--display); color: var(--gold); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.clip { margin: 0; padding: 12px; }
.clip video {
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 10px;
  object-fit: contain;
}
.clip.hidden { opacity: 0.45; }
.clip .name { font-weight: 700; margin-top: 8px; }
.clip .meta { font-size: 13px; color: var(--muted); }
.clip .row { margin-top: 8px; gap: 6px; }
.linkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 8px 8px 14px;
  word-break: break-all;
}
.linkbox code { flex: 1; font-size: 14px; }
section + section { margin-top: 36px; }
.nowrap { white-space: nowrap; }
.tag {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
}

.joke {
  margin-top: 40px;
  padding: 18px 20px;
  border-top: 1px dashed var(--line);
  text-align: center;
}
.joke .joke-text { font: 600 18px/1.4 var(--display); margin: 8px auto 12px; max-width: 520px; }

/* Ask Claude panel */
.ask { border-color: var(--gold); }
.ask .sparkle {
  display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 8px;
  border-radius: 50%; background: var(--gold); color: var(--on-gold); font-size: 16px;
}
textarea {
  width: 100%; margin-top: 8px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  font: inherit; font-size: 16px; resize: vertical;
}
.videos { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 16px; }
.video-block { flex: 1 1 260px; max-width: 360px; }
.video-block h3 { font: 600 20px/1.2 var(--display); margin: 0 0 10px; }
.video-block video {
  display: block; width: 100%; aspect-ratio: 9 / 16; max-height: 70vh; background: #000; border-radius: 12px;
}

/* Andy's photo with the sample pot raised beside him */
.hero-art { position: relative; width: 220px; margin: 4px 0 18px; }
.hero-photo {
  display: block; width: 190px; height: 190px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--gold); box-shadow: 0 0 0 6px rgba(231, 194, 106, 0.18), 0 14px 30px rgba(0, 0, 0, 0.35);
}
.hero-logo.toast { position: absolute; width: 120px; right: -34px; bottom: -22px; margin: 0; transform: rotate(10deg); }
