/* Dialogue.Dance. String Lights as the room, Block Party as the moments (Paul, 2026-11-25).
   Tokens only below :root, and nothing in this file hard-codes a brand colour outside them.

   THE DIVISION OF LABOUR

   Teal night #10353F is the ground: the app bar, the hero, the footer, the stage behind a
   celebration. It is furniture. It never asks for anything.

   Marigold #F0A202 is the invitation, and the single brightest thing in the room. It takes one
   job on the home page, the hero pill, plus the replay pill on the celebration stage. The moment
   marigold lands on a second kind of thing, the invitation stops being obvious.

   Coral owns action and feeling: the page button, the obstacle titles, Apply on the invitation
   code, the quiet moment. Two values, because a fill and an ink are not the same problem. Coral
   fill #C6452E takes white or cream type on it. Coral ink #B93D27 is coral at text size on a pale
   ground, where the fill value lands at 4.45 against the warm wash and fails. So: --cta is a
   fill, --cta-ink is text. They are not interchangeable.

   Lit teal #1B4C58 carries the headings and your own chat bubbles. The room one shade up, not a
   third accent.

   Harbour blue carries only the true things, the ones that are true rather than persuasive: the
   Alpha tag, what we store, recorded live, the countdown, the step rail, the track edges. Three
   rules keep it apart from the teal ground, which is its cousin. Harbour is always brighter and
   bluer than the wall. Harbour is a fill, a rule, a frame or a mark, never a paragraph: a blue
   shape 44px wide reads as blue, a blue sentence at 15px reads as black. Harbour never takes a
   primary action. Two harbours per theme: --trust carries text, --trust-fill carries shapes.

   Block Party, the five bright colours in --k1 to --k5, appears only in the confetti. Two
   moments, no third, and nothing else on any screen may borrow them.

   Every pair here is checked by tests/contrast-check.mjs: 4.5:1 for anything a person reads,
   3.0:1 for a control edge, in both themes. Change a token here and change it there. */
:root {
  --bg: #FFF9F0; --bg-deep: #F6EADA; --surface: #FFFFFF; --surface-2: #F7ECDD;
  --text: #1C1A17; --muted: #4A443C; --line: #E6DCCC;
  --brand: #1B4C58; --brand-text: #FFF7EC;
  /* The band: every dark teal strip, and the type and the pill that sit on it. --band-text is the
     only safe ink on the band. --brand-text is NOT: in the dark theme it is the deep teal that
     sits on a cream card, and the band is that same teal, so a heading using it disappears. That
     is exactly what shipped on 2026-11-25. */
  --band: #10353F; --band-text: #FFF7EC; --on-band-line: rgba(255, 247, 236, .62);
  --band-cta: #F0A202; --band-cta-text: #241A00;
  --cta: #C6452E; --cta-text: #FFFFFF; --cta-hover: #AB3A25; --cta-ink: #B93D27;
  --coral-wash: #FBE6E0;
  --bubble: #1B4C58; --bubble-text: #FFF7EC;
  /* The invitation code field stays warm cream in both themes, so its three tokens do not move:
     a code is read character by character and wants the steadiest ground on the page. */
  --code-field: #FFF9F0; --code-text: #13282E; --code-muted: #4C5F63;
  --apply: #C6452E; --apply-text: #FFF7EC;
  --trust: #0D6A88; --trust-fill: #16809F; --trust-wash: #DCEAF2; --trust-wash-line: #B9D7E6;
  --trust-rule: #A3CBDE; --trust-badge-ink: #FFF9F0; --trust-on-band: #9FD1E8;
  --dot-a: #C6452E; --dot-b: #16809F; --track: #E9DECC;
  /* A control's own edge, not a card's. A field or a ghost button whose only boundary is its
     border needs 3:1, and --line is 1.33 against the page. --line stays for cards, which are told
     apart by their surface and their shadow. */
  --control-edge: #6F7B74;
  /* A face sits against nothing that tints it, so the video well is a plain charcoal in both
     themes and is not a palette colour. */
  --well: #1C1A1B;
  --k1: #F26A1B; --k2: #C9186B; --k3: #0E6E62; --k4: #123A6B; --k5: #F2B01E;
  --conf-edge: inset 0 0 0 1px rgba(28, 26, 23, .30);
  --shadow: 0 1px 2px rgba(16, 53, 63, .07), 0 8px 24px rgba(16, 53, 63, .09);
  --radius: 20px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1A1E; --bg-deep: #071215; --surface: #15272C; --surface-2: #1D343A;
    --text: #F0E9DE; --muted: #AFB8B6; --line: #273C42;
    --brand: #FFF3E4; --brand-text: #0E2C34;
    --band: #0E2C34; --band-text: #F0E9DE;
    --band-cta: #F5B433; --band-cta-text: #1C1200;
    --cta: #E8683F; --cta-text: #220A05; --cta-hover: #F2805C; --cta-ink: #F59C85;
    --coral-wash: #3A1F18;
    --bubble: #E8683F; --bubble-text: #220A05;
    --trust: #9FD1E8; --trust-fill: #4E9DBF; --trust-wash: #15323E; --trust-wash-line: #26576B;
    --trust-rule: #2F6378; --trust-badge-ink: #0A2430; --trust-on-band: #9FD1E8;
    --dot-a: #E8683F; --dot-b: #4E9DBF; --track: #2B3A3F;
    --control-edge: #7F8F8C;
    --k1: #FF8A3D; --k2: #F0509A; --k3: #35C8B4; --k4: #5A8CE0; --k5: #F7C04A;
    /* On a dark ground every piece already reads, and a hairline round a 7px rectangle is noise. */
    --conf-edge: none;
    --shadow: 0 1px 2px rgba(0, 0, 0, .40), 0 10px 28px rgba(0, 0, 0, .34);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1A1E; --bg-deep: #071215; --surface: #15272C; --surface-2: #1D343A;
  --text: #F0E9DE; --muted: #AFB8B6; --line: #273C42;
  --brand: #FFF3E4; --brand-text: #0E2C34;
  --band: #0E2C34; --band-text: #F0E9DE;
  --band-cta: #F5B433; --band-cta-text: #1C1200;
  --cta: #E8683F; --cta-text: #220A05; --cta-hover: #F2805C; --cta-ink: #F59C85;
  --coral-wash: #3A1F18;
  --bubble: #E8683F; --bubble-text: #220A05;
  --trust: #9FD1E8; --trust-fill: #4E9DBF; --trust-wash: #15323E; --trust-wash-line: #26576B;
  --trust-rule: #2F6378; --trust-badge-ink: #0A2430; --trust-on-band: #9FD1E8;
  --dot-a: #E8683F; --dot-b: #4E9DBF; --track: #2B3A3F;
  --control-edge: #7F8F8C;
  --k1: #FF8A3D; --k2: #F0509A; --k3: #35C8B4; --k4: #5A8CE0; --k5: #F7C04A;
  /* On a dark ground every piece already reads, and a hairline round a 7px rectangle is noise. */
  --conf-edge: none;
  --shadow: 0 1px 2px rgba(0, 0, 0, .40), 0 10px 28px rgba(0, 0, 0, .34);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg-deep); color: var(--text); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--cta); outline-offset: 3px; border-radius: 8px; }
/* Any link with no class of its own. Without this the browser's own blue shows through, and in
   a teal room a stray blue underline reads as a broken harbour mark. Found on 2026-11-25 on the
   reply screen, where "What we store, in plain words" was rendering in Chrome's #0000EE.
   The What-we-store and write-to-us links go harbour, because they are the true things, which
   is harbour's whole job. Everything else takes coral ink. Both rules sit above the bar and the
   nav, so a door in either keeps its own colour. */
a:not([class]) { color: var(--cta-ink); text-underline-offset: 3px; }
a[href*="wig-privacy"]:not([class]), a[href^="mailto:"]:not([class]) { color: var(--trust); font-weight: 650; text-decoration-thickness: 2px; text-underline-offset: 3px; }
/* The same link on the band is the band's own harbour, not the page's. Mid harbour on teal night
   is 2.14:1 and vanishes; pale harbour is 7.96. Caught by tests/_contrast.cjs the moment the
   rule above went in, which is what that gate is for. */
footer a[href*="wig-privacy"]:not([class]), .appbar a[href*="wig-privacy"]:not([class]) { color: var(--trust-on-band); }
/* A focus ring has to be seen against whatever it is drawn on, which WCAG puts at 3:1. Coral
   manages 4.67 on the page and only 2.68 on the teal band, so anything standing on the band
   takes the band's own cream instead, at 12.33. The ring sits 3px outside its control, so the
   pair that matters is ring against band, never ring against the pill it surrounds. */
.appbar :focus-visible, .home .hero :focus-visible, footer :focus-visible { outline-color: var(--band-text); }

.frame { max-width: 480px; min-height: 100dvh; margin: 0 auto; background: var(--bg); position: relative; display: flex; flex-direction: column; }
@media (min-width: 700px) { body { padding: 24px 0; } .frame { min-height: calc(100dvh - 48px); border-radius: 32px; box-shadow: var(--shadow); overflow: hidden; } }
.demo-strip { font-size: 12.5px; text-align: center; padding: 7px 16px; background: var(--trust-wash); color: var(--trust); letter-spacing: .01em; }
main { flex: 1; padding: 20px 16px 110px; outline: none; }
.view { animation: rise .32s cubic-bezier(.2,.7,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view, .bubble, .toast { animation: none !important; transition: none !important; } }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--brand); letter-spacing: -.01em; margin: 0; }
h1 { font-size: 34px; line-height: 1.12; }
h2 { font-size: 25px; line-height: 1.2; }
h3 { font-size: 19px; line-height: 1.3; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14.5px; }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cta-ink); }
.stack > * + * { margin-top: 14px; }
.stack-lg > * + * { margin-top: 24px; }
.row { display: flex; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

.brandmark { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 20px; color: var(--brand); }
.mark { width: 33px; height: 22px; position: relative; flex: none; }
.mark i { position: absolute; top: 0; width: 15px; height: 22px; -webkit-mask: url(/media/dd-mark-d.svg) center / 100% 100% no-repeat; mask: url(/media/dd-mark-d.svg) center / 100% 100% no-repeat; }
.mark i:first-child { left: 0; }
.mark i:last-child { right: 0; transform: scaleX(-1); }
.brandmark .mark i:first-child { background: #3A3F4B; }
.brandmark .mark i:last-child { background: #2A9D9F; }
:root[data-theme="dark"] .brandmark .mark i:first-child { background: #C9CED8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brandmark .mark i:first-child { background: #C9CED8; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card.tint { background: var(--coral-wash); border-color: transparent; }
.card.sage { background: var(--trust-wash); border-color: transparent; }
.card.hero { background: var(--brand); color: var(--brand-text); border: 0; }
.card.hero h2, .card.hero h3 { color: var(--brand-text); }
.card.hero .muted { color: inherit; opacity: .8; }
a.card, button.card { display: block; width: 100%; text-align: left; color: inherit; text-decoration: none; }
button.card { font: inherit; }
a.card:active, button.card:active { transform: scale(.99); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 999px; border: 0; font-weight: 650; font-size: 17px; text-decoration: none; transition: background .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--cta); color: var(--cta-text); }
.btn.primary:hover { background: var(--cta-hover); }
.btn.primary[disabled] { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--control-edge); }
.btn.light { background: var(--brand-text); color: var(--brand); }
.btn.block { width: 100%; }
.link { background: none; border: 0; padding: 8px 0; color: var(--cta-ink); font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }

.choice { display: block; width: 100%; text-align: left; padding: 16px 18px; min-height: 56px; border-radius: 16px; border: 1.5px solid var(--control-edge); background: var(--surface); margin-top: 10px; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--cta); }
.choice[aria-pressed="true"] { border-color: var(--cta); background: var(--coral-wash); }
.choice strong { display: block; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--control-edge); background: var(--surface); font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--brand); color: var(--brand-text); border-color: var(--brand); }
.tag { display: inline-block; font-size: 12.5px; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag.sage { background: var(--trust-wash); color: var(--trust); }
.tag.rose { background: var(--coral-wash); color: var(--cta-ink); }

.segment { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 999px; padding: 4px; }
.segment button { min-height: 44px; border: 0; border-radius: 999px; background: transparent; font-weight: 650; color: var(--muted); }
.segment button[aria-pressed="true"] { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }

label.field { display: block; font-weight: 650; font-size: 15px; }
.input, textarea.input { display: block; width: 100%; margin-top: 8px; min-height: 52px; padding: 13px 16px; border-radius: 14px; border: 1.5px solid var(--control-edge); background: var(--surface); font-size: 17px; }
textarea.input { min-height: 92px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--cta); outline: none; }
.hint { font-size: 14px; color: var(--muted); margin-top: 6px; }
.error-text { font-size: 14.5px; color: var(--cta-ink); margin-top: 6px; }

.progress { height: 6px; border-radius: 6px; background: var(--track); box-shadow: inset 0 0 0 1px var(--trust-fill); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--cta); border-radius: 6px; transition: width .3s; }
.backbar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin: -6px 0 10px; }
.back { background: none; border: 0; color: var(--muted); font-weight: 600; padding: 10px 4px; min-height: 44px; }

.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 22px; color: var(--cta-text); flex: none; }
.avatar.lg { width: 84px; height: 84px; font-size: 36px; }
.person-card { display: flex; gap: 14px; align-items: flex-start; }
.person-card .who { min-width: 0; }
.person-card .line { font-size: 15.5px; color: var(--muted); margin-top: 4px; }

.trait { padding: 14px 0; border-top: 1px solid var(--line); }
.trait:first-child { border-top: 0; }
.track { position: relative; height: 10px; border-radius: 10px; background: var(--track); box-shadow: inset 0 0 0 1px var(--trust-fill); margin: 12px 9px 6px; }
.track .dot { position: absolute; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.track .dot.a { background: var(--dot-a); }
.track .dot.b { background: var(--dot-b); }
.ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.legend { display: flex; gap: 16px; font-size: 14px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.starters { margin: 10px 0 0; padding-left: 20px; }
.starters li { margin-top: 6px; }

.thread { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 86%; padding: 12px 16px; border-radius: 20px; animation: rise .3s ease; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--bubble); color: var(--bubble-text); border-bottom-right-radius: 6px; }
.bubble.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble .q { font-weight: 650; display: block; margin-bottom: 4px; }
.round-label { align-self: center; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.typing { display: inline-flex; gap: 5px; padding: 16px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

.banner { padding: 12px 14px; border-radius: 14px; font-size: 14.5px; font-weight: 600; }
.banner.test { background: var(--trust-wash); color: var(--trust); }
.banner.warn { background: var(--coral-wash); color: var(--cta-ink); }
.pack { display: flex; justify-content: space-between; align-items: center; }
.pack .price { font-family: var(--serif); font-size: 24px; color: var(--brand); }

.skeleton { border-radius: var(--radius); height: 96px; background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 36px 16px; }
.empty .glyph { font-family: var(--serif); font-size: 40px; color: var(--muted); }

.promise { display: flex; gap: 12px; }
.promise .mark { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--trust-wash); color: var(--trust); display: grid; place-items: center; font-weight: 700; font-size: 14px; }

.tabs { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); z-index: 5; }
@media (min-width: 700px) { .tabs { bottom: 24px; border-radius: 0 0 32px 32px; } }
.tabs[hidden] { display: none; }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; min-height: 52px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; border-radius: 12px; }
.tabs a svg { width: 24px; height: 24px; }
.tabs a[aria-current="page"] { color: var(--cta-ink); }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center; z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 15px; background: var(--surface-2); padding: 12px 14px; border-radius: 12px; overflow-wrap: anywhere; }
.sticky-cta { position: sticky; bottom: 92px; padding-top: 12px; background: linear-gradient(transparent, var(--bg) 30%); }
.door-video { display: block; width: 100%; max-height: 70vh; min-height: 220px; object-fit: contain; border-radius: var(--radius); background: var(--well); }
.pain { font-family: var(--serif, Georgia, serif); font-size: 21px; line-height: 1.3; color: var(--brand, inherit); }
.stack > .pain + .pain { margin-top: 6px; }

/* One shell for every real page (home, Was I Ghosted, The Kind Decline, What we store): the brand bar
   on top, one content column, the app nav fixed at the bottom. The demo keeps its own .frame. */
:root { --col: 720px; }
body.dd { background: var(--bg); padding: 0 0 calc(72px + env(safe-area-inset-bottom)); }
.page main:focus, .page main:focus-visible { outline: none; }
.appbar { background: var(--band); color: var(--band-text); }
.appbar-in { max-width: var(--col); margin: 0 auto; min-height: 56px; padding: 6px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.appbar a { color: var(--band-text); text-decoration: none; }
.appbar-brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 21px; line-height: 1; }
.appbar-brand .mark i:first-child { background: var(--band-text); }
.appbar-brand .mark i:last-child { background: #5CC5C7; }
.alpha-tag { display: inline-block; margin-left: 10px; padding: 3px 7px 2px; border: 1.5px solid var(--trust-on-band); border-radius: 999px; font: 700 10.5px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--trust-on-band); vertical-align: middle; position: relative; top: -1px; }
.appbar-sfl { font: 600 13.5px var(--sans); letter-spacing: .02em; opacity: .85; padding: 8px 0; }
.appbar-sfl:hover, .appbar-brand:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
/* The Profile door, top right (Paul, 2026-11-23). It is the member's own corner, so it shows only
   once js/appbar.js has heard back that somebody is signed in. The [hidden] rule has to be said
   out loud, because a display rule beats the attribute. 44px tall, so a thumb finds it. */
.appbar-profile { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 15px; border: 1px solid var(--on-band-line); border-radius: 999px; font: 650 14.5px var(--sans); white-space: nowrap; }
.appbar-profile[hidden] { display: none; }
.appbar-profile svg { width: 17px; height: 17px; flex: none; }
.appbar-profile:hover { background: rgba(255, 247, 236, .14); }
.appbar-profile[aria-current=page] { background: rgba(255, 247, 236, .18); border-color: rgba(255, 247, 236, .9); }
/* On a phone the brand and the word Profile cannot both fit beside each other, and the bar must
   never push the page sideways. So below 480px the door is the person mark alone, in the corner
   where an account door lives, and the word stays in the page for a screen reader to read. */
@media (max-width: 480px) {
  .appbar-profile { padding: 0 11px; gap: 0; }
  .appbar-profile .label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  /* The back end's own "Back end" label steps aside too. Since the door became always-on
     (js/appbar.js, 2026-11-25) that bar carries three items, and three do not fit 343px: it
     pushed the door 9px off the right edge of a 375px screen and the page scrolled sideways.
     Found by tests/nav-shots.cjs on 2026-11-25. The words stay in the page for a screen reader,
     the same way the Profile label does. */
  .appbar-sfl { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
}
body.dd .demo-strip { border-bottom: 1px solid var(--line); }
.page { max-width: var(--col); margin: 0 auto; }
.page main { padding: 24px 16px 40px; }

/* The bar is fixed over the foot of every app page, and body.dd above leaves 72px of room for it
   in the flow. Scrolling needs telling as well. Without this, every scroll-into-view the browser
   does for itself (a focus, a jumped-to anchor, a test driver before a click) stops at the
   smallest scroll that works, which parks the thing it scrolled to flush with the bottom of the
   window, under the bar. Measured 2026-11-28 on the record screen at 1280x900: the Start
   recording button landed at 848-900 with the bar top at 835, and the hit at the centre of the
   button was the Dance link in the bar. A press there navigates away instead, and on a live camera
   that throws the take away. Same height as the padding, so the two agree. */
html { scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

.appnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(16, 53, 63, .09); padding: 6px max(4px, env(safe-area-inset-right), calc((100% - var(--col)) / 2)) calc(6px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left), calc((100% - var(--col)) / 2)); font-family: var(--sans); }
/* Two kinds of door live in this bar and they have to look identical. A link goes somewhere. The
   Dating tools button goes nowhere: it opens the list below (Paul, 2026-11-23, R5.1). */
.appnav a, .appnav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 4px 2px; border-radius: 12px; font-size: 12.5px; font-weight: 600; line-height: 1.2; text-align: center; color: var(--muted); text-decoration: none; }
.appnav button { appearance: none; -webkit-appearance: none; background: none; border: 0; font-family: inherit; cursor: pointer; }
.appnav a svg, .appnav button svg { width: 24px; height: 24px; flex: none; }
.appnav a[aria-current="page"], .appnav button[aria-current="page"] { color: var(--cta-ink); }
.appnav a:hover, .appnav button:hover { color: var(--cta-ink); }
/* Three doors on the narrowest phone still in use. "Dialogue.Dance" is the widest label and it has
   to stay on one line, so the type steps down rather than the word wrapping or the bar scrolling. */
@media (max-width: 389px) {
  .appnav a, .appnav button { font-size: 11px; padding: 4px 1px; letter-spacing: -.1px; }
}

/* The Dating tools list. A bottom sheet, because the door that opens it is at the bottom. A native
   dialog, so Escape closes it and focus stays inside without any code of ours. */
.appsheet { border: 0; padding: 0; margin: 0; width: 100%; height: 100%; max-width: 100%; max-height: 100%; background: none; color: var(--text); font: inherit; position: fixed; inset: 0; display: none; }
.appsheet[open] { display: flex; align-items: flex-end; justify-content: center; }
.appsheet::backdrop { background: rgba(7, 18, 21, .62); }
.appsheet-in { width: 100%; max-width: var(--col); max-height: 86vh; overflow-y: auto; background: var(--surface); border-radius: 22px 22px 0 0; border-top: 1px solid var(--line); box-shadow: 0 -10px 40px rgba(7, 18, 21, .26); padding: 16px max(16px, env(safe-area-inset-left)) calc(18px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right)); }
.appsheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.appsheet-head h2 { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.appsheet-x { appearance: none; -webkit-appearance: none; background: var(--surface-2); border: 0; border-radius: 999px; width: 38px; height: 38px; flex: none; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.appsheet-x svg { width: 20px; height: 20px; }
.appsheet-x:hover { color: var(--cta-ink); }
.appsheet-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.appsheet-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface-2); color: var(--text); text-decoration: none; }
.appsheet-item svg { width: 24px; height: 24px; flex: none; margin-top: 2px; color: var(--cta-ink); }
.appsheet-words { display: block; min-width: 0; }
.appsheet-words strong { display: block; font-size: 16px; line-height: 1.3; }
.appsheet-words .small { display: block; margin-top: 2px; }
a.appsheet-item:hover { background: var(--coral-wash); }
a.appsheet-item[aria-current="page"] strong { color: var(--cta-ink); }
/* Named, and honest about not existing. No link and nothing to press. */
.appsheet-item.is-coming { background: none; border: 1px dashed var(--line); }
.appsheet-item.is-coming svg { color: var(--muted); }
.appsheet-item.is-coming .tag { flex: none; margin-left: auto; align-self: flex-start; }
.appsheet-foot { margin: 14px 0 0; }

/* ---- Block Party. Confetti, and only ever confetti. --------------------------------------
   Two moments, no third. --k1 to --k5 are the five bright colours and nothing else on any
   screen may borrow them. js/confetti.js builds the pieces; this file moves them.

   A piece carries a hairline in the light theme (--conf-edge), because amber on near-white is
   1.82:1 and all but vanishes without one. With the hairline the faintest piece reads at 3.26
   against the page. On a dark ground every piece already clears 5:1, so the hairline is off.

   Reduced motion gets .conf.still: fewer pieces, scattered and stopped. A person who asked for
   less motion still gets to see that something was celebrated. */
.conf { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.conf i { position: absolute; top: -20px; border-radius: 2px; box-shadow: var(--conf-edge); animation-fill-mode: both; }
.conf i.c1 { background: var(--k1); }
.conf i.c2 { background: var(--k2); }
.conf i.c3 { background: var(--k3); }
.conf i.c4 { background: var(--k4); }
.conf i.c5 { background: var(--k5); }
.conf.burst i { animation-name: dd-burst; animation-duration: var(--d); animation-timing-function: cubic-bezier(.22, .62, .3, 1); animation-delay: var(--dl); }
.conf.fall i { animation-name: dd-fall; animation-duration: var(--d); animation-timing-function: linear; animation-delay: var(--dl); }
.conf.still i { animation: none; }
@keyframes dd-burst {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  7% { opacity: 1; }
  42% { transform: translate(calc(var(--x) * .6), calc(var(--y) * -1)) rotate(calc(var(--r) * .45)); opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translate(var(--x), var(--h)) rotate(var(--r)); opacity: 0; }
}
@keyframes dd-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  12% { opacity: 1; }
  78% { opacity: 1; }
  100% { transform: translate(var(--x), var(--h)) rotate(var(--r)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .conf i { animation: none !important; } }

/* The frame a moment sits in. The stage is the loud one and its ground is teal night in BOTH
   themes, because on cream the amber piece disappears and because the lights going down is the
   right feeling for the loudest thing this product does. The quiet one is a thin scatter on the
   page ground of whichever theme you are in: an active member sees it several times a week, so
   it has to survive being seen often. */
.moment { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.moment-in { position: relative; z-index: 2; padding: 30px 20px 28px; max-width: 48ch; margin: 0 auto; }
.moment.stage { background: #10353F; border: 1px solid var(--line); color: #FFF7EC; text-align: center; min-height: 300px; display: grid; place-items: center;
  --k1: #FF8A3D; --k2: #F0509A; --k3: #35C8B4; --k4: #5A8CE0; --k5: #F7C04A; --conf-edge: none; }
.moment.quiet { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.m-kick { font: 700 11.5px var(--sans); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 7px; }
.moment.stage .m-kick { color: #F0A202; }
.moment.quiet .m-kick { color: var(--cta-ink); }
.m-big { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0 0 9px; }
.moment.stage .m-big { font-size: clamp(28px, 5.4vw, 40px); color: #FFF7EC; }
.moment.quiet .m-big { font-size: clamp(22px, 4vw, 29px); color: var(--brand); }
.m-sub { font-size: 16px; margin: 0 0 20px; }
.moment.quiet .m-sub { color: var(--text); }
.m-sub:last-child { margin-bottom: 0; }
.replay { min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; font: 650 16px var(--sans); cursor: pointer; }
.moment.stage .replay { background: #F0A202; color: #241A00; }
.moment.stage .replay:focus-visible { outline: 3px solid #F0A202; outline-offset: 3px; }

/* The not-open-yet bubble, on any applet that is still being shaped, with the check box that
   gathers interest. Paul, 2026-11-30. */
.soon-bubble { background: var(--trust-wash); border: 1.5px solid var(--trust);
  border-radius: 14px; padding: 14px 16px; margin: 14px 0 0; }
.soon-line { margin: 0 0 10px; font-weight: 600; }
.soon-check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.soon-check input { width: 20px; height: 20px; }
#tellme-form { margin-top: 12px; }
#tellme-form[hidden] { display: none; }

/* The four places people arrive from, drawn rather than photographed, so it costs nothing to
   load and reads at any size. Paul, 2026-11-30. */
.sources { display: block; width: 100%; max-width: 420px; margin: 4px auto 0;
  color: var(--trust); }
