/* DWD 2026 Pre-Event. Brand: Date With Destiny (brand.tonyrobbins.com): Purple #8840FF, Black, White.
   Black app shell with purple accents; long reading and writing surfaces on white.
   Fonts: Suisse Intl and Druk are licensed and not bundled. Inter, Lora and IBM Plex Mono stand in.
   To use the real files, add their @font-face rules to fonts.css; the stacks below already prefer them. */
:root {
  --font-sans: "Suisse Intl", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --purple: #8840FF;
  --purple-hi: #A671FF;
  --purple-lo: #6A22E6;
  --purple-ink: #4B13B8;
  --lilac: #F3ECFF;
  --lilac-2: #E9DDFF;
  --black: #000;
  --coal: #0E0D12;
  --coal-2: #17151D;
  --line-dark: #2A2733;
  --white: #FFF;
  --paper: #FFFFFF;
  --canvas: #F4F2F8;
  --ink: #111014;
  --ink-2: #4A4754;
  --muted: #8C8898;
  --muted-dark: #A9A5B4;
  --hair: #E4E1EA;
  --map: #E3E0E8;
  --ok: #2FCB7A;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(10, 4, 30, .12);
  --tap: 48px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; background: var(--black); color: var(--white); }
body { font-family: var(--font-sans); font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--purple-hi); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }
.screen { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.pad { padding-left: 20px; padding-right: 20px; }

/* ---------- type ---------- */
.eyebrow { font-family: var(--font-mono); font-weight: 500; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow.purple { color: var(--purple-hi); }
.eyebrow.muted { color: var(--muted-dark); }
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; margin: 0; }
.h1 { font-size: 2rem; line-height: 1.12; letter-spacing: -.02em; }
.h2 { font-size: 1.45rem; line-height: 1.2; }
.h3 { font-size: 1.12rem; line-height: 1.3; }
.lead { font-size: 1.06rem; color: #DCD8E4; }
.muted { color: var(--muted-dark); }
.serif { font-family: var(--font-serif); }
p { margin: 0 0 .8em; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: var(--tap); padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 600; font-size: 1rem; text-decoration: none; transition: transform .08s ease, background .15s ease; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--purple); color: var(--white); box-shadow: 0 8px 24px rgba(136, 64, 255, .35); }
.btn-primary:hover { background: var(--purple-lo); }
.btn-white { background: var(--white); color: var(--black); }
.btn-black { background: var(--black); color: var(--white); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .28); }
.btn-ghost-dark { background: transparent; color: var(--ink); border-color: var(--hair); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .92rem; }
.link { background: none; border: 0; padding: 0; color: var(--purple-hi); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.link.dark { color: var(--purple-ink); }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--hair); background: var(--white); color: var(--ink); font-size: .95rem; }
.chip[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: var(--white); }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 20px 10px; }
.logo { display: block; width: 112px; height: auto; }
.logo-sm { width: 92px; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-dark); background: transparent; color: var(--white); display: grid; place-items: center; font-size: 1.1rem; }

/* ---------- home ---------- */
.home-hero { position: relative; padding: 8px 20px 28px; overflow: hidden; }
.home-hero::before { content: ""; position: absolute; inset: -40% -30% auto auto; width: 120%; height: 160%; background: radial-gradient(closest-side, rgba(136, 64, 255, .55), rgba(136, 64, 255, 0) 70%); pointer-events: none; }
.home-hero > * { position: relative; }
.video-slot { margin: 0 0 18px; border-radius: var(--radius); overflow: hidden; background: var(--coal); position: relative; }
.video-slot video { width: 100%; display: block; aspect-ratio: 16 / 9; background: #000; }
.video-slot .skip { position: absolute; right: 10px; top: 10px; }
.greeting { font-size: 2.1rem; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; margin: 14px 0 18px; }
.countdown { display: flex; align-items: flex-end; gap: 14px; }
.countdown .num { font-size: 5.2rem; line-height: .82; font-weight: 700; letter-spacing: -.04em; background: linear-gradient(160deg, #fff 10%, var(--purple-hi) 55%, var(--purple) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.countdown .lbl { font-size: 1.1rem; font-weight: 500; padding-bottom: 6px; color: #E9E5F0; }
.countdown.tomorrow .lbl { font-size: 1.5rem; font-weight: 600; color: var(--white); }
.night { border-radius: var(--radius); padding: 22px; background: linear-gradient(145deg, var(--purple) 0%, var(--purple-lo) 55%, #2A0A6B 100%); box-shadow: 0 18px 50px rgba(136, 64, 255, .35); }
.night .t { font-size: 1.6rem; line-height: 1.15; font-weight: 600; margin-bottom: 6px; }
.night .when { font-family: var(--font-mono); font-size: .82rem; letter-spacing: .06em; opacity: .9; margin-bottom: 16px; }
.night .q { font-size: 1.15rem; font-weight: 500; margin-bottom: 12px; }
.quote { font-family: var(--font-serif); font-style: italic; font-size: 1.02rem; line-height: 1.5; }
.quote .by { font-family: var(--font-sans); font-style: normal; font-size: .85rem; opacity: .8; display: block; margin-top: 4px; }

.stack { display: grid; gap: 14px; padding: 0 20px; }
.card { border-radius: var(--radius); padding: 20px; }
.card-white { background: var(--paper); color: var(--ink); }
.card-dark { background: var(--coal); border: 1px solid var(--line-dark); }
.card-purple { background: linear-gradient(140deg, var(--purple) 0%, var(--purple-lo) 70%); color: var(--white); position: relative; overflow: hidden; }
.card-purple::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .22), transparent); }
.card .eyebrow { margin-bottom: 10px; }
.report-card .first { font-family: var(--font-serif); font-size: 1.22rem; line-height: 1.4; margin: 0 0 16px; color: var(--ink); }
.tony-card h2 { font-size: 1.3rem; margin-bottom: 6px; }
.tony-card p { color: rgba(255, 255, 255, .92); margin-bottom: 16px; }
.section-title { padding: 30px 20px 12px; }
.anticipation p { font-size: 1.12rem; line-height: 1.55; color: #ECE9F2; margin: 0; }

.week { list-style: none; margin: 0; padding: 0 20px; display: grid; gap: 12px; }
.week li { background: var(--coal); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 18px; display: grid; grid-template-columns: 40px 1fr; gap: 4px 14px; }
.week .n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--coal-2); border: 1.5px solid var(--purple); color: var(--white); font-weight: 600; grid-row: span 3; }
.week li.done .n { background: var(--purple); }
.week h3 { font-size: 1.08rem; margin-top: 7px; }
.week .body { color: var(--muted-dark); font-size: .96rem; }
.week .act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: rgba(47, 203, 122, .14); color: #7BE8AE; }
.lockline { display: flex; gap: 8px; align-items: flex-start; color: #CFC6E6; font-size: .95rem; }

.think { margin: 26px 20px 0; padding: 22px 20px; border-left: 3px solid var(--purple); background: linear-gradient(90deg, rgba(136, 64, 255, .16), rgba(136, 64, 255, 0)); border-radius: 0 var(--radius) var(--radius) 0; }
.think .q { font-size: 1.32rem; line-height: 1.3; font-weight: 600; margin: 8px 0 14px; }
.plan-invite { margin: 26px 20px 0; border-radius: var(--radius); padding: 22px; background: var(--paper); color: var(--ink); display: grid; gap: 14px; }
.plan-invite p { margin: 0; font-size: 1.04rem; }
.links { display: flex; flex-wrap: wrap; gap: 10px; padding: 22px 20px 0; }
.foot { padding: 34px 20px 10px; color: var(--muted); font-size: .85rem; display: flex; justify-content: space-between; gap: 10px; }

/* ---------- sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: flex; align-items: flex-end; justify-content: center; z-index: 50; animation: fade .15s ease; }
.sheet { width: 100%; max-width: 560px; background: var(--paper); color: var(--ink); border-radius: 22px 22px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); max-height: 86vh; overflow: auto; }
.sheet h2 { font-size: 1.2rem; margin-bottom: 10px; }
.sheet .row { display: flex; gap: 10px; margin-top: 16px; }
.sheet .row .btn { flex: 1; }
@keyframes fade { from { opacity: 0; } }

/* ---------- questionnaire ---------- */
.qbar { position: sticky; top: 0; z-index: 10; background: rgba(0, 0, 0, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: calc(10px + env(safe-area-inset-top)) 20px 12px; }
.qbar-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; }
.progress { width: 100%; height: 6px; border-radius: 99px; background: #26232E; overflow: hidden; margin-top: 8px; border: 0; padding: 0; display: block; }
.progress span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--purple), var(--purple-hi)); transition: width .3s ease; }
.secbtn { background: none; border: 0; color: #DCD7E8; font-family: var(--font-mono); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; padding: 8px 0; display: inline-flex; gap: 6px; align-items: center; }
.saved { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--muted-dark); text-transform: uppercase; display: inline-flex; gap: 6px; align-items: center; min-width: 64px; justify-content: flex-end; }
.saved.ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.guide { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; color: #CFC9DD; font-size: .88rem; }
.guide .av { width: 30px; height: 30px; border-radius: 50%; background: conic-gradient(from 200deg, var(--purple), #E8DAFF, var(--purple-lo), var(--purple)); box-shadow: 0 0 0 3px rgba(136, 64, 255, .25); }
.qhead { padding: 18px 20px 6px; }
.qhead .sec { color: var(--purple-hi); margin-bottom: 10px; }
.qhead .intro { color: #CFC9DD; font-size: 1rem; margin: 0 0 12px; }
.qhead .qtext { font-size: 1.36rem; line-height: 1.32; font-weight: 600; letter-spacing: -.01em; }
.banner { margin: 14px 20px 0; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(136, 64, 255, .18); border: 1px solid rgba(136, 64, 255, .5); color: #F1EAFF; font-size: .95rem; }
.answer { margin: 16px 12px 0; background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow); }
.answer label, .flabel { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
.answer .opt-note { font-size: .82rem; color: var(--muted); margin-top: 8px; }
textarea, input[type=text], input[type=email], input[type=number] { width: 100%; border: 1.5px solid var(--hair); border-radius: var(--radius-sm); background: #FCFBFE; color: var(--ink); padding: 12px 14px; font-size: 1.05rem; line-height: 1.45; -webkit-appearance: none; appearance: none; }
textarea:focus, input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(136, 64, 255, .18); background: #fff; }
textarea.long { min-height: 190px; resize: vertical; }
textarea.short { min-height: 108px; resize: vertical; }
.choices { display: grid; gap: 10px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--hair); background: #fff; color: var(--ink); text-align: left; font-size: 1rem; width: 100%; }
.choices.two .choice { justify-content: center; font-weight: 600; }
.choice .box { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 6px; border: 2px solid #BDB7CB; display: grid; place-items: center; }
.choice.radio .box { border-radius: 50%; }
.choice[aria-checked="true"], .choice[aria-pressed="true"] { border-color: var(--purple); background: var(--lilac); }
.choice[aria-checked="true"] .box { background: var(--purple); border-color: var(--purple); }
.choice[aria-checked="true"] .box::after { content: ""; width: 10px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.choice.radio[aria-checked="true"] .box::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.choices.two .choice[aria-pressed="true"] { background: var(--purple); color: #fff; border-color: var(--purple); }
.sub { margin-top: 14px; }
.rows { display: grid; gap: 10px; }
.rowfields { display: grid; grid-template-columns: 1fr 90px 36px; gap: 8px; align-items: end; }
.rowfields .rm { height: 46px; border: 0; background: none; color: var(--muted); font-size: 1.2rem; }
.listfields { display: grid; gap: 10px; }
.listfields .li { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: center; }
.listfields .li span { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); text-align: right; }
.req-note { font-size: .86rem; color: var(--ink-2); margin-bottom: 10px; }
.example { color: #9B96A8; font-size: .92rem; background: #F7F6FA; border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 14px; }
.example b { font-weight: 600; }
.lf { display: grid; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 8px; }
.mic { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--hair); background: #fff; color: var(--ink-2); font-size: .92rem; font-weight: 600; }
.mic.on { border-color: var(--purple); color: var(--purple-ink); background: var(--lilac); }
.mic .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--purple); }
.mic.on .dot { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.followup { margin: 14px 12px 0; padding: 18px 16px; border-radius: var(--radius); background: var(--lilac); color: var(--ink); border: 1.5px solid var(--lilac-2); }
.followup .ft { font-weight: 600; font-size: 1.06rem; margin-bottom: 10px; }
.followup .row { display: flex; gap: 10px; margin-top: 12px; }
.qnav { display: flex; gap: 12px; padding: 22px 20px 0; }
[hidden] { display: none !important; }   /* 2026-11-09: .qnav{display:flex} beat the hidden attribute, so Back/Next stayed up behind the follow-up card and Next re-opened it (Julie) */
.qnav .btn { flex: 1; }
.full { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 40px 24px; }
.enc { text-align: left; background: radial-gradient(120% 80% at 100% 0%, rgba(136, 64, 255, .55), transparent 60%), radial-gradient(90% 60% at 0% 100%, rgba(136, 64, 255, .35), transparent 60%), var(--black); }
.enc .big { font-size: 2.4rem; line-height: 1.08; font-weight: 700; letter-spacing: -.02em; margin-bottom: 16px; }
.enc p { font-size: 1.18rem; color: #E7E2F1; margin-bottom: 32px; }
.welcome p { font-size: 1.06rem; line-height: 1.6; color: #E4E0EC; }
.welcome .h1 { margin: 10px 0 18px; }
.consent .body { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 18px; font-size: .98rem; line-height: 1.55; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 8px; padding: 14px; border-radius: var(--radius-sm); background: var(--coal); border: 1px solid var(--line-dark); cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--purple); flex: 0 0 22px; }
.decline { margin-top: 14px; padding: 14px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .06); color: #F0EAFB; }
.review-list { display: grid; gap: 8px; }
.review-sec { margin-top: 22px; }
.review-sec h2 { font-size: 1.05rem; color: var(--purple-hi); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; font-weight: 500; margin-bottom: 10px; }
.ritem { display: block; text-decoration: none; width: 100%; text-align: left; background: var(--paper); color: var(--ink); border: 0; border-radius: var(--radius-sm); padding: 14px 16px; }
.ritem .rq { font-size: .9rem; color: var(--ink-2); margin-bottom: 6px; }
.ritem .ra { white-space: pre-wrap; font-size: 1rem; }
.ritem .ra.empty { color: var(--muted); font-style: italic; }
.ritem.missing { box-shadow: inset 4px 0 0 var(--purple); }
.missing-box { margin-top: 18px; padding: 16px; border-radius: var(--radius); background: rgba(136, 64, 255, .14); border: 1px solid rgba(136, 64, 255, .45); }
.missing-box .ritem { margin-top: 10px; }
.answer-this { display: inline-block; margin-top: 8px; color: var(--purple-ink); font-weight: 600; font-size: .92rem; }
.closed { margin: 24px 20px; padding: 18px; border-radius: var(--radius); background: var(--coal); border: 1px solid var(--line-dark); }

/* ---------- report ---------- */
.report { background: var(--paper); color: var(--ink); min-height: 100vh; }
.rhero { background: var(--black); color: var(--white); padding: calc(14px + env(safe-area-inset-top)) 22px 34px; position: relative; overflow: hidden; }
.rhero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(closest-side, rgba(136, 64, 255, .55), transparent); }
.rhero > * { position: relative; z-index: 1; }
.rhero .eyebrow { color: var(--purple-hi); margin: 22px 0 14px; }
.rhero .outcome { font-family: var(--font-serif); font-size: 1.65rem; line-height: 1.32; margin: 0; }
.rhero .fu { font-family: var(--font-serif); font-size: 1.12rem; line-height: 1.5; color: #E2DCF0; margin-top: 14px; }
.rhero .ev { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .18); }
.rhero .ev .lead-in { font-size: .95rem; font-weight: 600; color: var(--purple-hi); margin-bottom: 6px; }
.rhero .ev p { font-family: var(--font-serif); font-size: 1.1rem; line-height: 1.5; margin: 0 0 6px; }
.rsec { padding: 26px 22px; border-bottom: 1px solid var(--hair); }
.rsec h2 { font-size: 1.12rem; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.rsec h2::before { content: ""; width: 18px; height: 3px; background: var(--purple); border-radius: 2px; }
.rsec ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.rsec li { font-family: var(--font-serif); font-size: 1.08rem; line-height: 1.5; padding-left: 20px; position: relative; }
.rsec li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--purple); }
.ecards { display: grid; gap: 12px; }
.ecard { background: var(--lilac); border-radius: var(--radius-sm); padding: 14px 16px; display: grid; gap: 6px; }
.ecard div { display: grid; grid-template-columns: 92px 1fr; gap: 8px; }
.ecard dt { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--purple-ink); padding-top: 4px; }
.ecard dd { margin: 0; font-family: var(--font-serif); font-size: 1.02rem; }
.theme { padding: 4px 0 4px 16px; border-left: 3px solid var(--purple); margin-bottom: 16px; }
.theme b { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.theme span { color: var(--ink-2); }
.rclose { background: var(--black); color: var(--white); padding: 34px 22px; position: relative; overflow: hidden; }
.rclose::before { content: ""; position: absolute; left: -100px; bottom: -140px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(closest-side, rgba(136, 64, 255, .5), transparent); }
.rclose > * { position: relative; }
.rclose .lead-in { font-size: .98rem; color: #DCD5EC; margin-bottom: 14px; }
.rclose .q { font-family: var(--font-serif); font-style: italic; font-size: 1.62rem; line-height: 1.32; }
.rfoot { padding: 26px 22px 40px; display: grid; gap: 16px; justify-items: start; }
.rfoot .mine { font-size: 1.05rem; font-weight: 500; }
.rfoot small { color: var(--muted); }
.loading { padding: 60px 22px; text-align: center; color: var(--ink-2); }
.backlink { background: none; border: 0; color: inherit; padding: 8px 0; font-size: .98rem; display: inline-flex; gap: 6px; align-items: center; opacity: .9; }

/* ---------- plan ---------- */
.plan { background: var(--canvas); color: var(--ink); min-height: 100vh; }
.phead { background: var(--black); color: var(--white); padding: calc(10px + env(safe-area-inset-top)) 20px 18px; border-radius: 0 0 26px 26px; position: relative; overflow: hidden; }
.phead::after { content: ""; position: absolute; right: -90px; top: -110px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(closest-side, rgba(136, 64, 255, .5), transparent); }
.phead > * { position: relative; z-index: 1; }
.phead h1 { font-size: 1.95rem; line-height: 1.1; margin: 8px 0 8px; }
.phead .sub { color: #D3CDE0; margin: 0 0 10px; font-size: 1rem; }
.intro-box { background: rgba(255, 255, 255, .08); border-radius: var(--radius-sm); padding: 14px; color: #EAE5F3; font-size: .96rem; margin-top: 10px; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.tab { min-height: 46px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .22); background: transparent; color: #fff; font-weight: 500; }
.tab[aria-selected="true"] { background: #fff; color: #000; border-color: #fff; font-weight: 600; }
.pbody { padding: 16px 14px 0; }
.ucard { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-weight: 700; font-size: .78rem; letter-spacing: .08em; }
.bar.result { background: var(--black); color: #fff; }
.bar.purpose { background: var(--purple); color: #fff; }
.bar.map { background: var(--map); color: var(--black); }
.bar .ebtn { min-height: 32px; padding: 0 14px; border-radius: 999px; border: 1.5px solid currentColor; background: transparent; color: inherit; font-size: .82rem; font-weight: 600; letter-spacing: 0; text-transform: none; opacity: .95; }
.bartext { padding: 14px 16px 16px; }
.bartext.res { font-weight: 700; font-size: 1.08rem; line-height: 1.38; }
.bartext.pur { font-style: italic; color: var(--ink-2); }
.bartext.pur p { margin: 0 0 10px; }
.bartext.pur p:last-child { margin: 0; }
.bartext ul { margin: 0; padding-left: 18px; }
.bartext ul li { margin-bottom: 6px; font-style: italic; color: var(--ink-2); }
.bartext ul li::marker { color: var(--purple); }
.editbox { background: var(--lilac); padding: 12px 14px 14px; }
.editbox textarea { background: #fff; min-height: 110px; }
.ref { background: #F7F5FB; border-bottom: 1px solid var(--hair); padding: 12px 16px; font-size: .95rem; color: var(--ink-2); }
.ref b { color: var(--ink); }
.restore { display: inline-block; margin: 10px 2px 0; }
.kr-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 24px 6px 12px; }
.kr-head h2 { font-size: 1.32rem; }
.kr-head h2 small { display: block; font-size: .88rem; font-weight: 400; color: var(--muted); margin-top: 2px; letter-spacing: 0; }
.kr-head .count { font-size: .9rem; color: var(--ink-2); white-space: nowrap; }
.lock { background: var(--lilac); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 2px 12px; font-size: .95rem; }
.blocks { display: grid; gap: 12px; }
.block { background: #fff; border-radius: var(--radius); overflow: hidden; }
.block-head { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 16px; border: 0; background: none; color: inherit; text-align: left; }
.block-head .num { width: 36px; height: 36px; border-radius: 50%; background: var(--black); color: #fff; display: grid; place-items: center; font-weight: 700; }
.block-head .tt { font-weight: 700; font-size: 1.05rem; line-height: 1.28; }
.block-head .fl { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; color: var(--purple); display: block; margin-bottom: 3px; font-weight: 600; }
.block-head .cnt { font-size: .86rem; color: var(--ink-2); white-space: nowrap; }
.block-body { margin: 0 12px 14px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--hair); }
.actions { list-style: none; margin: 0; padding: 0; }
.action { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 14px 14px; border-top: 1px solid var(--hair); }
.action:first-child { border-top: 0; }
.cbox { width: 28px; height: 28px; border-radius: 7px; border: 2px solid #B6B0C4; background: #fff; display: grid; place-items: center; padding: 0; }
.cbox[aria-checked="true"] { background: var(--purple); border-color: var(--purple); }
.cbox[aria-checked="true"]::after { content: ""; width: 11px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.cbox[disabled] { opacity: .45; cursor: not-allowed; }
.action .txt { font-size: 1rem; line-height: 1.45; }
.action.done .txt { text-decoration: line-through; color: var(--muted); }
.alink { display: inline-block; margin-top: 6px; font-size: .9rem; font-weight: 600; color: var(--purple-ink); text-decoration: none; background: none; border: 0; padding: 0; }
.alink.off { color: var(--muted); font-weight: 500; cursor: default; }
.aedit { padding: 12px 14px; border-top: 1px solid var(--hair); background: var(--lilac); }
.aedit textarea { min-height: 72px; background: #fff; font-size: .98rem; }
.actrl { display: flex; gap: 18px; margin-top: 6px; font-size: .9rem; }
.actrl button { background: none; border: 0; padding: 4px 0; color: var(--purple-ink); font-weight: 600; }
.actrl button.del { color: #C0265B; }
.addrow { display: flex; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--hair); }
.addrow input { border-radius: 999px; min-height: 46px; }
.other-way { padding: 0 16px 14px; }
.day90 { background: #fff; border-radius: var(--radius); padding: 18px; margin-top: 14px; }
.day90 h2 { font-size: 1.15rem; margin-bottom: 10px; }
.day90 ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.pfoot { display: flex; justify-content: center; padding: 26px 0 40px; }

/* ---------- forms / sign in ---------- */
.signin { padding: 30px 22px; }
.signin form { display: grid; gap: 14px; margin-top: 22px; }
.signin label { font-size: .88rem; color: #D8D2E4; display: grid; gap: 6px; }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--white); color: var(--ink); padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow); font-size: .92rem; z-index: 60; }

/* ---------- read-only answers ---------- */
.written { background: var(--paper); color: var(--ink); min-height: 100vh; }
.written .rhero { padding-bottom: 24px; }
.wsec { padding: 18px 22px; border-bottom: 1px solid var(--hair); }
.wsec h2 { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; color: var(--purple-ink); margin-bottom: 12px; font-weight: 600; }
.wq { margin-bottom: 16px; }
.wq .q { font-size: .92rem; color: var(--ink-2); margin-bottom: 4px; }
.wq .a { font-family: var(--font-serif); font-size: 1.04rem; white-space: pre-wrap; }
.wq .f { margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--lilac-2); }

@media (min-width: 600px) {
  #app { border-left: 1px solid #141218; border-right: 1px solid #141218; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Standalone questionnaire: there is no home to go back to. */
.standalone .backlink { visibility: hidden; }

/* Announcement on Home (Part 3): newest undismissed one, dismissible, no push */
.announce { display: flex; align-items: flex-start; gap: 12px; margin: 10px 16px 0; padding: 14px 14px 14px 16px; border-radius: 14px; background: var(--purple); color: var(--white); box-shadow: 0 8px 24px rgba(136, 64, 255, .3); }
.announce p { margin: 0; flex: 1; white-space: pre-wrap; line-height: 1.4; }
.announce .x { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .18); color: var(--white); font-size: 20px; line-height: 1; cursor: pointer; }
