/* =====================================================================
   Hush Tonight — "after dark" brand
   Deep aubergine night, warm ivory type, and an ember-to-rose glow.
   Display: Lora (self-hosted, so nothing loads from third parties).
   ===================================================================== */
@font-face { font-family: 'Lora'; src: url('/lora.woff') format('woff'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Lora'; src: url('/lora-italic.woff') format('woff'); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  color-scheme: dark;
  /* Night */
  --bg: #110a13;
  --bg-2: #170e1a;
  --surface: #1b1220;
  --surface-2: #241829;
  --surface-3: #2e2033;
  --line: #34253a;
  --line-soft: rgba(255, 236, 228, .07);
  /* Type */
  --text: #f6ece6;
  --muted: #b4a2ad;
  --faint: #7f6d79;
  /* Glow */
  --ember: #f29a6b;
  --rose: #e0567f;
  --plum: #8e4fb8;
  --gold: #e9c49a;
  --glow: linear-gradient(135deg, #f6a571 0%, #e8657a 55%, #c94d86 100%);
  --glow-soft: linear-gradient(135deg, rgba(246, 165, 113, .16), rgba(201, 77, 134, .16));
  --accent: #ef7d78;
  --accent-ink: #1a0d14;
  --accent-soft: rgba(239, 125, 120, .14);
  /* Answers */
  --yes: #f08a6e;
  --maybe: #b69be8;
  --no: #5d4f63;
  --ok: #5fc596;
  --warn: #e7b062;
  /* Shape */
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 0 rgba(255, 236, 228, .05) inset, 0 18px 40px -18px rgba(0, 0, 0, .7);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  --serif: 'Lora', ui-serif, Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh;
  background:
    radial-gradient(900px 520px at 85% -120px, rgba(224, 86, 127, .22), transparent 70%),
    radial-gradient(800px 600px at -10% 10%, rgba(142, 79, 184, .18), transparent 70%),
    radial-gradient(700px 500px at 50% 110%, rgba(242, 154, 107, .10), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
::selection { background: rgba(239, 125, 120, .35); }
a { color: var(--ember); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.05rem; font-family: var(--font); font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 .8rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.strong { font-weight: 600; margin: 0 0 6px; }
.block { display: block; margin-top: 2px; }
.center { text-align: center; margin: 4px auto 16px; max-width: 34em; }
[hidden] { display: none !important; }

/* ---------- Header & brand ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 20px;
  position: sticky; top: 0; z-index: 20; flex-wrap: wrap;
  background: rgba(17, 10, 19, .72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand .word { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.6rem; letter-spacing: -.02em; line-height: 1; display: inline-flex; align-items: center; }
.brand .word .sub { font-family: var(--font); font-style: normal; font-weight: 600; font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-left: 9px; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: var(--muted); padding: 8px 14px; border-radius: 999px; font-size: .92rem; font-weight: 500; transition: color .15s, background .15s; }
nav a:hover { color: var(--text); }
nav a.active { color: var(--text); background: var(--accent-soft); }
nav a.active svg { stroke: var(--ember); }
nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

main { max-width: 720px; margin: 0 auto; padding: 28px 16px 96px; }
main > * { animation: rise .35s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Surfaces ---------- */
.card {
  background: linear-gradient(180deg, rgba(255, 236, 228, .035), rgba(255, 236, 228, .01)), var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }
.banner { background: var(--glow-soft); border: 1px solid rgba(239, 125, 120, .22); border-radius: var(--radius-sm); padding: 13px 16px; margin-bottom: 16px; font-size: .95rem; }
.tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .16em; color: var(--gold); font-weight: 600; }
.tag.new { color: var(--maybe); margin-left: 8px; }

/* ---------- Forms ---------- */
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=time], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: .95rem; font-weight: 400; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }

/* ---------- Buttons ---------- */
button, .btn {
  font: inherit; font-weight: 500; cursor: pointer; border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  padding: 11px 20px; border-radius: 999px; text-decoration: none; display: inline-block; transition: transform .1s ease, background .15s, border-color .15s, box-shadow .2s;
}
button:hover, .btn:hover { border-color: #4a3852; }
button:active, .btn:active { transform: scale(.98); }
button.primary, a.primary-btn {
  background: var(--glow); color: #1a0b12; border-color: transparent; font-weight: 600;
  box-shadow: 0 10px 30px -10px rgba(232, 101, 122, .7);
}
button.primary:hover, a.primary-btn:hover { box-shadow: 0 14px 36px -10px rgba(232, 101, 122, .85); }
button.danger { color: #ff8e8e; }
button:disabled { opacity: .45; cursor: default; transform: none; }
button.link { background: none; border: none; padding: 0; color: var(--ember); text-decoration: underline; text-underline-offset: 3px; box-shadow: none; }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; background: var(--bg-2); padding: 5px; border-radius: 999px; border: 1px solid var(--line); width: fit-content; }
.tabs button { border: none; background: transparent; padding: 8px 18px; color: var(--muted); }
.tabs button[aria-selected=true] { background: var(--surface-3); color: var(--text); }

/* ---------- Landing ---------- */
.hero { padding: 26px 0 30px; position: relative; }
.hero::before {
  content: ""; position: absolute; z-index: -1; width: 340px; height: 340px; right: -80px; top: -40px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(246, 165, 113, .55), rgba(224, 86, 127, .35) 45%, transparent 70%); filter: blur(30px); opacity: .7;
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; font-weight: 600; color: var(--gold); margin-bottom: 16px; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--gold); opacity: .7; }
.hero-title { font-size: 3rem; line-height: 1.04; margin-bottom: 18px; font-weight: 500; letter-spacing: -.025em; }
.hero-title em { font-style: italic; background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 32em; margin-bottom: 24px; }
.hero .row { gap: 12px; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.pillar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; position: relative; overflow: hidden; }
.pillar::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--glow); opacity: .8; }
.pillar .glyph { width: 34px; height: 34px; border-radius: 10px; background: var(--glow-soft); display: grid; place-items: center; margin-bottom: 12px; }
.pillar .glyph svg { width: 18px; height: 18px; fill: none; stroke: var(--ember); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pillar h3 { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; margin-bottom: 4px; }
.pillar p { margin: 0; }
ol.steps { list-style: none; padding: 0; margin: 0; }
ol.steps li { display: flex; gap: 14px; padding: 14px 0; }
ol.steps li + li { border-top: 1px solid var(--line); }
ol.steps p { margin: 2px 0 0; }
.step-n { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--glow); color: #1a0b12; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 1rem; }
.privacy { display: flex; gap: 14px; align-items: flex-start; }
.privacy svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.sample { border-color: rgba(239, 125, 120, .3); }
.sample .scene { font-size: 1.15rem; }

/* ---------- Questionnaire ---------- */
.progress { height: 5px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin: 10px 0 18px; }
.progress span { display: block; height: 100%; background: var(--glow); border-radius: 999px; transition: width .4s ease; }
.scenario { padding: 26px 22px; }
.scene { font-family: var(--serif); font-size: 1.32rem; line-height: 1.45; margin: 6px 0; color: var(--text); }
.prompt { margin: 0; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choices button { padding: 13px 8px; border-radius: 14px; font-weight: 600; min-height: 50px; background: var(--surface-2); }
.choices button[data-v=yes]:hover { border-color: var(--yes); }
.choices button[data-v=maybe]:hover { border-color: var(--maybe); }
.choices button[aria-pressed=true][data-v=yes] { background: var(--glow); color: #1a0b12; border-color: transparent; box-shadow: 0 8px 22px -10px rgba(232, 101, 122, .8); }
.choices button[aria-pressed=true][data-v=maybe] { background: var(--maybe); color: #170d22; border-color: var(--maybe); }
.choices button[aria-pressed=true][data-v=no] { background: var(--no); color: var(--text); border-color: var(--no); }
.choices button[aria-pressed=true][data-v=man], .choices button[aria-pressed=true][data-v=woman] { background: var(--glow); color: #1a0b12; border-color: transparent; }
.choice-wide { width: 100%; text-align: left; border-radius: 16px; padding: 14px 16px; min-height: 52px; background: var(--surface-2); }
.choice-wide[aria-pressed=true] { background: var(--glow-soft); border-color: var(--accent); }
.choices button:active, .choice-wide:active { transform: scale(.97); }
.intro h1 { margin: 8px 0 6px; font-size: 2.1rem; }
.intro p { margin-bottom: 0; }
.intro button.primary { margin-top: 10px; }
.role-row { border-top: 1px solid var(--line); padding-top: 14px; }
.role-row .role-label { margin: 0; font-size: .7rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 600; color: var(--gold); }
.role-row .role-text { margin: 3px 0 10px; font-family: var(--serif); font-size: 1.08rem; line-height: 1.45; }

/* Section bar: a green tick and line for every finished section */
.stepper { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; margin: -10px -16px 14px; padding: 6px 16px 8px; scroll-snap-type: x proximity; }
.stepper::-webkit-scrollbar { display: none; }
.stepper .step { flex: none; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 80px; padding: 0 2px; border: none; background: none; box-shadow: none;
  border-radius: 0; position: relative; color: var(--faint); font-size: .68rem; font-weight: 500; line-height: 1.2; scroll-snap-align: center; }
.stepper .step::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.stepper .step:first-child::before { display: none; }
.stepper .step.done::before, .stepper .step.current::before { background: var(--ok); }
.stepper .step.current:not(.done)::before { background: linear-gradient(90deg, var(--ok), var(--line)); }
.stepper .dotn { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .8rem;
  background: var(--bg-2); border: 2px solid var(--line); color: var(--faint); }
.stepper .step.done .dotn { background: var(--ok); border-color: var(--ok); color: #0d1f16; }
.stepper .step.current .dotn { border-color: var(--ember); color: var(--ember); box-shadow: 0 0 0 5px var(--accent-soft); }
.stepper .step.done.current .dotn { color: #0d1f16; }
.stepper .step.current .lbl { color: var(--text); font-weight: 600; }
.stepper .lbl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: center; }
.done-card { text-align: center; }
.big-tick { width: 68px; height: 68px; border-radius: 50%; background: var(--ok); color: #0d1f16; display: grid; place-items: center; font-size: 2rem; margin: 4px auto 8px;
  box-shadow: 0 0 0 10px rgba(95, 197, 150, .12); animation: pop .4s ease-out both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* Fine-tune list */
.cat { margin-top: 28px; }
.q { padding: 14px 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: none; }
.q-title { font-weight: 500; margin-bottom: 8px; }
.q-side { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.q-side span { color: var(--muted); font-size: .9rem; }
.q-side.sub { padding-left: 16px; }
.q-side + .q-side { margin-top: 10px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--bg-2); }
.seg button { border: none; border-radius: 0; padding: 7px 14px; background: transparent; font-size: .88rem; box-shadow: none; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed=true][data-v=yes] { background: var(--glow); color: #1a0b12; }
.seg button[aria-pressed=true][data-v=maybe] { background: var(--maybe); color: #170d22; }
.seg button[aria-pressed=true][data-v=no] { background: var(--no); color: var(--text); }

/* ---------- Plans ---------- */
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.idea { padding: 18px 0; border-top: 1px solid var(--line); }
.idea:first-of-type { border-top: none; padding-top: 6px; }
.idea p.text { margin: 6px 0 10px; font-family: var(--serif); font-size: 1.1rem; line-height: 1.5; }
.notes { list-style: none; padding: 11px 14px; margin: 0 0 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; font-size: .88rem; color: var(--muted); }
.notes li + li { margin-top: 5px; }
.rate { display: flex; gap: 6px; flex-wrap: wrap; }
.rate button { padding: 6px 14px; font-size: .84rem; }
.rate button[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.retired { opacity: .5; }
.stats-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-decoration: none; color: var(--text); text-align: center; background: var(--glow-soft), var(--surface); }
.stat strong { display: block; font-family: var(--serif); font-size: 2.2rem; font-weight: 500; line-height: 1.05; background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent; }
ul.plain { padding-left: 1.1rem; margin: 0; }
ul.plain li { margin: 5px 0; }
.profile-list li { padding: 6px 0; }
.note { margin-top: 2px; font-style: italic; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days button { padding: 9px 14px; }
.days button[aria-pressed=true] { background: var(--glow); color: #1a0b12; border-color: transparent; }

/* ---------- Sharing ---------- */
.invite { border-color: rgba(239, 125, 120, .35); background: var(--glow-soft), var(--surface); }
.code { font-family: ui-monospace, monospace; font-size: 1.6rem; letter-spacing: .12em; background: var(--bg-2); padding: 10px 16px; border-radius: 12px; display: inline-block; }
.code-inline { font-family: ui-monospace, monospace; letter-spacing: .1em; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; }
.share-btn { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 13px 6px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); text-decoration: none; font-size: .84rem; font-weight: 500; min-height: 68px; }
.share-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.share-btn.wa { background: #1fa855; border-color: #1fa855; color: #fff; }
.code-chip { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; border-radius: 14px; border-style: dashed; background: transparent; }
.code-chip strong { font-size: 1.1rem; }
.code-chip span:last-child { color: var(--ember); font-weight: 600; }

/* ---------- Rating ---------- */
.rating-card { text-align: center; background: radial-gradient(420px 220px at 50% 0%, rgba(232, 101, 122, .25), transparent 70%), var(--surface); border-color: rgba(239, 125, 120, .3); }
.rating-card h1 { margin: 6px 0 0; font-size: 2.3rem; font-style: italic; }
.heat { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.heat span { width: 32px; height: 8px; border-radius: 999px; background: var(--surface-3); }
.heat span.on { background: var(--glow); box-shadow: 0 0 12px rgba(232, 101, 122, .6); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.chip { padding: 5px 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: .84rem; }
.chip.more { color: var(--muted); border-style: dashed; }

/* ---------- Occasions ---------- */
.countdown { display: inline-grid; place-items: center; min-width: 76px; padding: 7px 12px; border-radius: 999px; background: var(--glow-soft); border: 1px solid rgba(239, 125, 120, .3);
  color: var(--ember); font-weight: 600; font-size: .78rem; text-align: center; flex: none; }
.occ-next, .occ-row { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--text); }
.occ-row .grow { flex: 1; min-width: 0; }
.occ-row .tag { display: inline-block; margin-top: 4px; }
.occ-empty .countdown { font-size: 1.3rem; min-width: 46px; height: 46px; padding: 0; }
.kind-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.kind-tile { display: flex; flex-direction: column; gap: 3px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); text-decoration: none; }
.kind-tile:hover { border-color: var(--accent); }
.occ-hero { text-align: center; background: radial-gradient(420px 220px at 50% 0%, rgba(242, 154, 107, .22), transparent 70%), var(--surface); }
.occ-hero h1 { margin: 12px 0 4px; font-size: 2.2rem; }
.occ-hero p { margin: 0; }
.occ-item { margin: 12px 0 0; }
.occ-item.touch .tag { display: block; color: var(--ok); margin-bottom: 3px; }
.occ-divider { margin: 20px 0 2px; padding-top: 14px; border-top: 1px dashed var(--line); font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.15rem;
  background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.occ-section .idea:first-of-type { border-top: none; }

/* ---------- Toast ---------- */
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 40; background: var(--text); color: var(--bg); padding: 11px 20px; border-radius: 999px;
  font-size: .92rem; font-weight: 500; max-width: calc(100% - 32px); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .7); }

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
  /* A blurred header would trap the fixed bottom menu inside it, so the header is solid on phones. */
  .top { padding: 12px 16px; backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(17, 10, 19, .96); }
  nav { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30; justify-content: space-around; gap: 0; flex-wrap: nowrap;
    background: rgba(27, 18, 32, .86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 22px; padding: 6px;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .8); }
  nav a { flex-direction: column; gap: 3px; font-size: .64rem; padding: 7px 2px; border-radius: 16px; flex: 1; }
  nav a.active { background: var(--accent-soft); }
  nav svg { width: 22px; height: 22px; }
  body.has-nav main { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  body.has-nav #toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .pillars { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.45rem; }
  h1 { font-size: 1.75rem; }
  .card { padding: 18px; }
  .scenario { padding: 22px 18px; }
  .q-side { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { main > *, .big-tick { animation: none; } * { transition: none !important; } }
