:root {
  --green: #0B7A4B;
  --green-deep: #075c38;
  --danfo: #FFC533;
  --ink: #13201A;
  --bg: #FBF7EE;
  --surface: #ffffff;
  --text: #13201A;
  --muted: #5d6b63;
  --line: #d6dfd7;
  --them: #e6ece6;
  --me: #0B7A4B;
  --me-text: #ffffff;
  --danger: #c0392b;
  --top: 58px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --green: #19a366; --green-deep: #138553; --bg: #09130e; --surface: #12211a; --text: #e8f0ea;
    --muted: #94a69b; --line: #25362c; --them: #1d2d24; --me: #138553; --danger: #e0584a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --green: #19a366; --green-deep: #138553; --bg: #09130e; --surface: #12211a; --text: #e8f0ea;
  --muted: #94a69b; --line: #25362c; --them: #1d2d24; --me: #138553; --danger: #e0584a; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }
a { color: var(--green); }
.muted { color: var(--muted); }

/* ---- top bar ---- */
.top {
  height: var(--top); display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 14px; padding-top: env(safe-area-inset-top);
  background: var(--surface); position: sticky; top: 0; z-index: 5;
}
.brand { font-size: 28px; font-weight: 900; letter-spacing: -1px; text-decoration: none; color: var(--text); }
.brand span { color: var(--green); }
.top-right { display: flex; align-items: center; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13.5px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; background: var(--bg); color: var(--text); border: 1px solid var(--line);
}
/* theme switch: sun | moon, knob left = light, centre = auto, right = dark */
.themeBtn { position: relative; width: 62px; height: 32px; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; flex: none; }
.themeBtn .ico { position: absolute; top: 50%; transform: translateY(-50%); font-size: 15px; line-height: 1; color: var(--muted); }
.themeBtn .sun { left: 8px; } .themeBtn .moon { right: 9px; }
.themeBtn .knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 4px rgba(0,0,0,.25); z-index: 1; transition: left .18s ease; }
.themeBtn[data-mode="auto"] .knob { left: 17px; background: var(--danfo); }
.themeBtn[data-mode="dark"] .knob { left: 31px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #2ecc71; display: inline-block; }
.stripe { display: flex; height: 4px; }
.stripe i { flex: 1; background: var(--green); }
.stripe i:nth-child(2) { background: #fff; }

/* ---- screens ---- */
.screen { min-height: calc(100dvh - var(--top)); display: flex; }
.screen.center { align-items: center; justify-content: center; padding: 24px 16px; }
.card {
  width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 26px 22px;
}
.h-card { margin: 0 0 6px; font-size: 26px; letter-spacing: -0.5px; line-height: 1.15; }
.tagline { margin: 0 0 12px; color: var(--muted); }

form label { display: block; margin: 16px 0 6px; font-weight: 700; font-size: 14.5px; }
form label small { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="tel"], input[type="email"], input:not([type]), select {
  width: 100%; padding: 13px 12px; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px;
}
input:focus, select:focus, button:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid var(--danfo); outline-offset: 1px;
}
.check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; margin-top: 18px !important; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--green); flex: none; }
.error { color: var(--danger); margin: 12px 0 0; font-size: 14px; }
.hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.hint.center { text-align: center; }
.row { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }

button {
  font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: 12px 16px;
  cursor: pointer; color: var(--text); background: var(--them);
}
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary { background: var(--green); color: #fff; }
button.primary:not(:disabled):hover { background: var(--green-deep); }
form button.primary { width: 100%; margin-top: 18px; }
button.secondary { background: var(--them); }
button.danger { background: var(--danger); color: #fff; }
button.link { background: none; color: var(--green); padding: 8px 4px; }
button.link:disabled { color: var(--muted); }
#code { font-size: 24px; letter-spacing: 6px; text-align: center; }

/* ---- landing ---- */
.page { max-width: 760px; margin: 0 auto; padding: 8px 16px 40px; }
.hero { padding: 28px 0 8px; }
.hero h1 { margin: 0; font-size: clamp(34px, 8.5vw, 58px); line-height: 1.04; letter-spacing: -1.5px; font-weight: 900; }
.plate {
  display: inline-block; background: var(--danfo); color: #1a1405; padding: 0 12px 2px; border-radius: 8px;
  border-bottom: 5px solid #1a1405; margin-top: 6px; transform: rotate(-1.2deg);
}
.plate.swap { animation: plateIn 0.45s cubic-bezier(.2,.9,.3,1.2); }
@keyframes plateIn { from { transform: translateY(-40%) rotate(-1.2deg); opacity: 0; } to { transform: rotate(-1.2deg); opacity: 1; } }
.lede { margin: 18px 0 0; max-width: 34em; font-size: 18px; color: var(--muted); }

.panel {
  margin-top: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 6px 20px 22px;
}
.tags {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--bg);
}
.tags input { flex: 1; min-width: 150px; border: 0; background: transparent; padding: 6px 4px; }
.tags input:focus { outline: none; }
.tags:focus-within { outline: 3px solid var(--danfo); outline-offset: 1px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 11px; border-radius: 999px;
  background: var(--green); color: #fff; font-size: 14px; font-weight: 700;
}
.tag button { background: rgba(255,255,255,.22); color: #fff; padding: 0; width: 20px; height: 20px; border-radius: 50%; line-height: 1; font-size: 13px; }
.ideas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ideas button { font-size: 13.5px; padding: 5px 11px; border-radius: 999px; background: transparent; border: 1px dashed var(--line); color: var(--muted); font-weight: 600; }
.ideas button.on { border-style: solid; border-color: var(--green); color: var(--green); }

.modes { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.modes .or { color: var(--muted); font-size: 13px; }
.modeBtn { flex: 1; font-size: 22px; font-weight: 900; padding: 17px 10px; border-radius: 14px; border: 3px solid var(--green); background: transparent; color: var(--green); }
.modeBtn.video { background: var(--danfo); border-color: var(--danfo); color: #1a1405; box-shadow: 0 4px 0 #1a1405; }
.modeBtn:not(:disabled):active { transform: translateY(2px); }
.modeBtn.text:not(:disabled):hover { background: var(--green); color: #fff; }

.banner {
  margin: 20px 0 0; text-align: center; padding: 12px 14px; border-radius: 14px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line); color: var(--green);
}
.why { display: grid; grid-template-columns: 1fr; gap: 22px 28px; margin: 38px 0 0; }
.why h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: -0.3px; }
.why p { margin: 0; color: var(--muted); }
.faq { margin-top: 44px; }
.faq h2 { font-size: 24px; letter-spacing: -0.5px; margin: 0 0 12px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; }
summary { cursor: pointer; padding: 15px 16px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-size: 20px; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p { margin: 0; padding: 0 16px 16px; color: var(--muted); }
.foot { display: flex; justify-content: center; gap: 24px; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); }
.foot a { color: var(--muted); text-decoration: none; font-weight: 600; }
.foot a:hover { color: var(--green); }
@media (min-width: 720px) { .why { grid-template-columns: 1fr 1fr; } }

/* ---- chat ---- */
.chatscreen { height: calc(100dvh - var(--top) - 4px); display: flex; flex-direction: column; gap: 8px; padding: 8px; max-width: 1200px; margin: 0 auto; }
.stage { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.logpanel { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.flagBtn { position: absolute; top: 8px; right: 8px; z-index: 2; background: transparent; color: var(--danger); font-size: 26px; padding: 4px 10px; line-height: 1; }
.welcome { padding: 18px 56px 8px 18px; overflow-y: auto; }
.welcome h2 { margin: 0 0 10px; font-size: 24px; letter-spacing: -0.5px; }
.welcome .age { margin: 0 0 8px; font-weight: 800; color: var(--green); }
.welcome .age b { background: var(--danger); color: #fff; padding: 1px 7px; border-radius: 6px; margin-right: 6px; font-size: 13px; }
.welcome ul { margin: 0; padding-left: 20px; }
.welcome li { margin: 4px 0; }
.welcome .strong { margin: 10px 0 0; font-weight: 800; color: var(--muted); }
.welcome .videoOnly { display: none; }
.chatscreen.video .welcome .videoOnly { display: list-item; }
.log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; padding: 9px 13px; border-radius: 16px; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: var(--me); color: var(--me-text); border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; background: var(--them); border-bottom-left-radius: 4px; }
.msg.sys { align-self: stretch; max-width: 100%; text-align: left; color: var(--muted); font-size: 14.5px; padding: 2px 4px; background: none; }
.msg.sys.found { color: var(--text); font-size: 17px; font-weight: 700; }
.msg.sys.found em { font-style: normal; color: #1a1405; background: var(--danfo); padding: 0 8px; border-radius: 6px; }
.msg.sys.warn { color: var(--danger); }
.typing { margin: 0; padding: 2px 16px 8px; font-size: 13px; color: var(--muted); }

.tools { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 13.5px; font-weight: 700; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.chip.static { cursor: default; }
.chip.gold { background: var(--danfo); border-color: var(--danfo); color: #1a1405; }
.composer { display: flex; gap: 8px; align-items: stretch; padding-bottom: env(safe-area-inset-bottom); }
.composer input { flex: 1; min-width: 0; border-radius: 14px; background: var(--surface); }
.keyBtn { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 74px; padding: 8px 12px; background: var(--ink); color: #fff; border: 1px solid var(--line); line-height: 1.15; }
.keyBtn small { font-size: 11px; color: var(--danfo); font-weight: 800; }
.keyBtn.stop { min-width: 58px; background: var(--surface); color: var(--text); }
.sendBtn { background: var(--green); color: #fff; padding: 0 16px; font-size: 20px; }
@media (hover: none) { .keyBtn small { display: none; } }

.videos { display: flex; gap: 8px; }
.vbox { position: relative; flex: 1; aspect-ratio: 4 / 3; background: #0c1511; border-radius: 14px; overflow: hidden; max-height: 30vh; }
.vbox video { width: 100%; height: 100%; object-fit: cover; display: block; }
.vbox.local video { transform: scaleX(-1); }
.vbox.remote video.blurred { filter: blur(28px); }
.vnote { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; color: #d8e3dc; font-size: 14px; background: rgba(0, 0, 0, 0.5); }
.vtool { position: absolute; right: 8px; bottom: 8px; padding: 6px 10px; font-size: 13px; background: rgba(0, 0, 0, 0.6); color: #fff; }
/* spinner while searching, status line, flag on the picture */
.vnote.busy { background: rgba(0, 0, 0, 0.35); }
.vnote.busy::before { content: ''; width: 64px; height: 64px; border-radius: 50%; border: 6px solid rgba(255,255,255,.25); border-top-color: #fff; animation: vspin 0.9s linear infinite; }
@keyframes vspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vnote.busy::before { animation-duration: 3s; } }
.vstatus { display: none; margin: 0; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-weight: 700; }
.chatscreen.video .vstatus:not(:empty) { display: block; }
.vbox.remote .flagBtn { top: auto; bottom: 8px; right: 8px; z-index: 3; background: rgba(0, 0, 0, 0.45); color: #fff; border-radius: 10px; font-size: 22px; }
.vbox.remote .flagBtn:disabled { opacity: 0.55; }
.vbox.remote .vtool { right: auto; left: 8px; }
@media (min-width: 820px) { .chatscreen.video .vstatus { display: none; } }

/* Phone: the stranger fills the stage, you are a small picture-in-picture in the corner */
@media (max-width: 819px) {
  .videos { position: relative; display: block; }
  .vbox.remote { width: 100%; aspect-ratio: 3 / 4; max-height: 46vh; }
  .vbox.local { position: absolute; top: 8px; right: 8px; width: 28%; max-width: 120px; flex: none; aspect-ratio: 3 / 4; max-height: none; border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); z-index: 2; }
  .vbox.local .vtool { right: 4px; bottom: 4px; padding: 3px 7px; font-size: 11px; }
}
@media (min-width: 820px) {
  .chatscreen.video .stage { flex-direction: row; }
  .chatscreen.video .videos { flex-direction: column; width: 42%; max-width: 460px; }
  .chatscreen.video .vbox { max-height: none; flex: 1; aspect-ratio: auto; }
  .chatscreen.video .logpanel { flex: 1; }
}

/* how it works / live board / who it is for */
.steps, .board, .who { margin-top: 40px; }
.steps h2, .board h2, .who h2 { font-size: 24px; letter-spacing: -0.5px; margin: 0 0 10px; }
.steps ol { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 4px 52px; color: var(--muted); min-height: 40px; }
.steps li b { color: var(--text); }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 10px;
  background: var(--danfo); color: #1a1405; font-weight: 900; display: flex; align-items: center; justify-content: center; border-bottom: 3px solid #1a1405;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 12px; }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 11px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 700; line-height: 1.2;
}
.tile small { font-size: 12px; font-weight: 600; }
.tile.live { background: var(--green); border-color: var(--green); color: #fff; }
.tile.mine { outline: 3px solid var(--danfo); outline-offset: 0; }
.who ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.who li { padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) { .plate.swap { animation: none; } }

/* long-form pages (terms, privacy, rules) */
.card.doc { max-width: 720px; }
.doc h2 { margin: 26px 0 6px; font-size: 19px; }
.doc h3 { margin: 18px 0 4px; font-size: 16px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc .updated { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 8px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); font-weight: 600; }
.draft { border: 1px dashed var(--danger); border-radius: 10px; padding: 10px 12px; margin: 0 0 16px; font-size: 14px; color: var(--danger); }

dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); padding: 22px; width: min(92vw, 380px); }
dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
dialog h2 { margin: 0 0 4px; font-size: 20px; }
.actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; justify-content: flex-end; }
.doc h1, .card h1 { margin: 0 0 4px; font-size: 30px; letter-spacing: -0.5px; }
.doc h1 span { color: var(--green); }
.actions button.primary { width: auto; margin: 0; }
dialog p { margin: 8px 0 0; color: var(--muted); }

/* ---- launch pass: live hours, 18+ gate, video fallback, report reasons, waitlist, ad slot ---- */
.liveBanner { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--green); color: #fff; font-weight: 700; font-size: 14.5px; }
.liveBanner.closed { background: var(--danfo); color: #1a1405; }
.liveBanner b { font-variant-numeric: tabular-nums; font-size: 1.15em; margin-left: 4px; }
.vfail { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 14px; text-align: center; color: #fff; background: rgba(8, 20, 14, 0.9); font-size: 14px; }
.vfail p { margin: 0; color: #fff; }
.vfailBtns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.vfailBtns button { padding: 9px 14px; font-size: 14px; }
.reasons { border: 0; margin: 14px 0 0; padding: 0; }
.reasons legend { font-weight: 700; font-size: 14.5px; padding: 0; margin-bottom: 6px; }
.radio { display: flex !important; gap: 10px; align-items: center; margin: 0 !important; padding: 10px 6px; border-radius: 10px; font-weight: 400 !important; cursor: pointer; }
.radio:hover { background: var(--bg); }
.radio input { width: 20px; height: 20px; accent-color: var(--green); flex: none; margin: 0; }
.radio.urgent span { font-weight: 800; }
.actions.stack { flex-direction: column; justify-content: stretch; }
.actions.stack button { width: 100%; padding: 14px; }
#gateDialog { text-align: left; }
.adslot { margin: 28px 0 0; min-height: 90px; border: 1px dashed var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.adslot::before { content: 'Advertisement'; }
#waitForm input[type="email"] { margin-top: 2px; }

/* ---- logos: wordmark switches with the theme ---- */
.brand { display: inline-flex; align-items: center; line-height: 0; }
.wm { height: 34px; width: auto; display: block; }
.wm-dark { display: none; }
:root[data-theme="dark"] .wm-light { display: none; }
:root[data-theme="dark"] .wm-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wm-light { display: none; }
  :root:not([data-theme="light"]) .wm-dark { display: block; }
}
.heroMark { width: auto; height: 56px; margin: 0 0 10px; }
.heroMark.wm-light { display: block; }
