/* TTP tools, stadium-at-night look (2026-11-13). One scene on screen at a time,
   driven by stage.js. Desktop and phone share the markup; the split layouts
   stack under 900px. */
:root {
    --night: #04141F;
    --field: #07263A;
    --chalk: #EAF2F2;
    --fog: #A9BEC6;
    --mist: #7E98A3;
    --dim: #5F7C88;
    --ice: #ABFFEF;
    --gold: #DDB65C;
    --line: rgba(234, 242, 242, .1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.st { background: var(--night); color: var(--chalk); font-family: Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
:where(body.st) a { color: inherit; }
.st [hidden] { display: none !important; }

.t-stage { position: relative; overflow: hidden; min-height: 100svh;
    background: radial-gradient(90% 70% at 78% -12%, rgba(171,255,239,.13), rgba(171,255,239,0) 60%),
        radial-gradient(60% 50% at 8% -20%, rgba(221,182,92,.08), rgba(221,182,92,0) 60%),
        linear-gradient(180deg, #07263A 0%, #04141F 58%, #020B11 100%); }
.t-beam { position: absolute; top: -20%; width: 38%; height: 140%; background: linear-gradient(180deg, rgba(234,242,242,.07), rgba(234,242,242,0) 70%); filter: blur(18px); pointer-events: none; }
.t-beam.l { left: -6%; transform: rotate(18deg); }
.t-beam.r { right: -6%; transform: rotate(-18deg); }
.t-turf { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; pointer-events: none;
    background: repeating-linear-gradient(90deg, rgba(234,242,242,.025) 0 2px, rgba(234,242,242,0) 2px 120px);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000); mask-image: linear-gradient(180deg, transparent, #000); }

.t-top { position: absolute; left: 0; right: 0; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 72px; }
.t-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 13px Montserrat, sans-serif; color: var(--chalk); }
.t-brand img { height: 30px; width: auto; display: block; }
.t-tool { font: 500 14px Inter, sans-serif; color: var(--mist); text-align: right; }
.t-back { all: unset; cursor: pointer; font: 600 14px Inter, sans-serif; color: var(--mist); }
.t-back:hover { color: var(--chalk); }

/* Scenes */
.scene { display: none; position: relative; z-index: 2; min-height: 100svh; padding: 120px 72px 72px; }
.scene.on { display: flex; }
.sc-split { display: none; }
.scene.on.sc-split { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: center; }
.sc-left { flex-direction: column; justify-content: center; gap: 28px; max-width: 760px; }
.sc-center { flex-direction: column; align-items: center; justify-content: center; gap: 30px; text-align: center; }
.sc-col { display: flex; flex-direction: column; gap: 24px; }

/* Type */
.scene h1:focus, .scene h2:focus { outline: none; }
.t-display { font-family: Montserrat, sans-serif; font-weight: 900; letter-spacing: -.035em; line-height: .94; margin: 0; color: var(--chalk); text-wrap: balance; }
.t-xl { font-size: clamp(46px, 6.6vw, 96px); }
.t-l { font-size: clamp(36px, 4.6vw, 66px); line-height: .98; }
.t-m { font-size: clamp(28px, 3.4vw, 52px); line-height: 1; }
.t-glow { color: var(--ice); text-shadow: 0 0 40px rgba(171,255,239,.35); }
.t-body { font-size: 18px; line-height: 1.6; color: var(--fog); margin: 0; max-width: 34em; }
.t-small { font-size: 14px; line-height: 1.55; color: var(--mist); margin: 0; max-width: 40em; }
.t-small a { color: var(--chalk); }

/* Buttons */
.t-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.t-gold { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: var(--gold); color: var(--night);
    font: 800 17px Montserrat, sans-serif; min-height: 60px; padding: 0 34px; box-shadow: 0 18px 40px -16px rgba(221,182,92,.55); cursor: pointer; text-decoration: none; }
.t-gold:hover { box-shadow: 0 18px 44px -12px rgba(221,182,92,.75); }
.t-gold[disabled] { opacity: .45; cursor: default; box-shadow: none; }
.t-ghost { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(234,242,242,.28); border-radius: 999px; background: transparent; color: var(--chalk);
    font: 700 15px Montserrat, sans-serif; min-height: 52px; padding: 0 24px; cursor: pointer; text-decoration: none; }
.t-ghost:hover { border-color: var(--chalk); }
.t-link { all: unset; cursor: pointer; color: var(--chalk); font: 600 15px Inter, sans-serif; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(234,242,242,.35); }
.t-gold:focus-visible, .t-ghost:focus-visible, .t-link:focus-visible, .t-back:focus-visible, .st button:focus-visible, .st input:focus-visible, .st textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Echo: the moment repeating behind the scene */
.t-echo-field { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.t-echo { position: absolute; white-space: nowrap; font-family: Montserrat, sans-serif; font-weight: 900; letter-spacing: -.04em; line-height: .9; color: var(--chalk); transition: opacity .6s ease; }
.t-veil { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(50% 55% at 50% 52%, rgba(4,20,31,.92), rgba(4,20,31,.55) 70%, rgba(4,20,31,0)); }

/* Rating, 0 to 10 */
.t-rate { width: min(620px, 100%); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.t-rate .t-num { font-size: clamp(130px, 16vw, 200px); }
.t-rate-row { width: 100%; display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
.t-rate-row button { all: unset; cursor: pointer; height: 46px; border-radius: 10px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; box-sizing: border-box;
    font: 700 12px Inter, sans-serif; color: var(--dim); background: rgba(234,242,242,.06); }
.t-rate-row button.on { background: linear-gradient(180deg, rgba(171,255,239,.9), rgba(171,255,239,.55)); color: var(--night); box-shadow: 0 0 18px rgba(171,255,239,.35); }
.t-rate-row button:hover { color: var(--chalk); }
.t-rate-row button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.t-rate-ends { width: 100%; display: flex; justify-content: space-between; font: 500 14px Inter, sans-serif; color: var(--mist); }

/* Numbers */
.t-num { font-family: Montserrat, sans-serif; font-weight: 900; font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; letter-spacing: -.04em; line-height: .82; color: var(--chalk); }
.t-pair { display: flex; align-items: flex-end; gap: 40px; }
.t-pair figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.t-pair figcaption { font: 600 14px Inter, sans-serif; color: var(--mist); padding-left: .12em; }
.t-pair .was .t-num { color: rgba(234,242,242,.30); font-size: clamp(84px, 10vw, 150px); }
.t-pair .now .t-num { text-shadow: 0 0 60px rgba(171,255,239,.4); font-size: clamp(130px, 16vw, 240px); }
.t-pair .now figcaption { color: var(--ice); }
.t-clock { position: absolute; pointer-events: none; z-index: 1; font-family: Montserrat, sans-serif; font-weight: 900; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.04em; line-height: .8; color: rgba(171,255,239,.07); white-space: nowrap; }

/* Breath orb */
.t-orb { position: relative; width: min(520px, 82vw); aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; transform: scale(.86);
    transition-property: transform; transition-timing-function: ease-in-out;
    background: radial-gradient(circle at 50% 50%, rgba(171,255,239,.42) 0%, rgba(171,255,239,.16) 38%, rgba(171,255,239,.04) 58%, rgba(171,255,239,0) 70%); }
.t-orb::before { content: ""; position: absolute; inset: 22%; border-radius: 50%; border: 1.5px solid rgba(171,255,239,.65); box-shadow: 0 0 60px rgba(171,255,239,.25) inset, 0 0 40px rgba(171,255,239,.18); }
.t-orb::after { content: ""; position: absolute; inset: 8%; border-radius: 50%; border: 1px solid rgba(171,255,239,.14); }
.t-orb-text { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.t-orb-word { font: 900 clamp(34px, 4.4vw, 64px) Montserrat, sans-serif; letter-spacing: -.03em; }
.t-orb-sub { font: 600 clamp(14px, 1.3vw, 18px) Inter, sans-serif; color: var(--ice); }
@media (prefers-reduced-motion: reduce) { .t-orb { transition: none !important; transform: none !important; } .t-echo { transition: none; } }

.t-steps { display: flex; gap: 28px; font: 700 14px Montserrat, sans-serif; color: var(--dim); }
.t-steps .on { color: var(--chalk); font-weight: 800; position: relative; }
.t-steps .on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 2px; border-radius: 2px; background: var(--ice); }

/* Choices: big tappable words */
.t-words { display: flex; flex-wrap: wrap; column-gap: .55em; row-gap: .2em; align-items: baseline; }
.t-words button { all: unset; cursor: pointer; font-family: Montserrat, sans-serif; font-weight: 900; letter-spacing: -.03em; line-height: 1.12; color: rgba(234,242,242,.3); }
.t-words button:hover { color: rgba(234,242,242,.6); }
.t-words button.on { color: var(--chalk); text-shadow: 0 0 34px rgba(171,255,239,.45); }
.t-words button:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 6px; }
.t-words.quiet button { font-weight: 800; color: rgba(234,242,242,.22); }
.t-words.quiet button.on { color: #8FA6AF; text-shadow: none; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: rgba(143,166,175,.4); }
.t-label { font: 600 14px Inter, sans-serif; color: var(--mist); }
.t-input { width: 100%; background: rgba(234,242,242,.05); border: 1px solid rgba(234,242,242,.2); border-radius: 16px; color: var(--chalk); font: 600 18px Inter, sans-serif; padding: 16px 18px; }
.t-input::placeholder { color: var(--dim); }
textarea.t-input { resize: vertical; min-height: 96px; line-height: 1.5; }

/* The keepsake card (HTML preview; the download is drawn on canvas) */
.t-card { position: relative; width: 340px; aspect-ratio: 9 / 16; border-radius: 34px; overflow: hidden; color: var(--chalk); padding: 40px 30px; display: flex; flex-direction: column; justify-content: space-between;
    background: radial-gradient(80% 50% at 50% 30%, rgba(171,255,239,.22), rgba(171,255,239,0) 70%), linear-gradient(180deg, #0A3350, #04141F);
    box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(234,242,242,.08); justify-self: center; transform: rotate(3deg); }
.t-card .k { font: 600 13px Inter, sans-serif; color: var(--mist); }
.t-card .v { font: 800 22px Montserrat, sans-serif; line-height: 1.15; margin-top: 4px; }
.t-card .cue { font: 900 56px Montserrat, sans-serif; letter-spacing: -.04em; line-height: .95; color: var(--ice); text-shadow: 0 0 30px rgba(171,255,239,.35); margin-top: 6px; overflow-wrap: anywhere; }
.t-card .url { font: 700 12px Montserrat, sans-serif; color: var(--dim); }

/* Next steps */
.t-next { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 8px; }
.t-next a { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font: 700 16px Inter, sans-serif; color: var(--chalk); }
.t-next a span:last-child { color: var(--mist); font-weight: 500; white-space: nowrap; }
.t-next a:hover span:first-child { color: var(--ice); }
.t-support { font-size: 13px; line-height: 1.55; color: var(--mist); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; max-width: 40em; }

/* Send scene (light) */
.scene.send { background: #EEF2F1; color: #04141F; }
.scene.send .t-display { color: #04141F; }
.scene.send .t-body { color: #45626F; }
.t-who { display: flex; flex-wrap: wrap; gap: 10px; }
.t-who button { all: unset; cursor: pointer; border-radius: 999px; padding: 12px 18px; font: 700 15px Inter, sans-serif; color: #04141F; border: 1px solid rgba(4,20,31,.25); }
.t-who button.on { background: #04141F; color: #EAF2F2; border-color: #04141F; }
.t-who button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.scene.send textarea { width: 100%; min-height: 110px; border-radius: 18px; border: 1px solid rgba(4,20,31,.2); padding: 16px; font: 500 17px Inter, sans-serif; color: #04141F; background: #fff; resize: vertical; }
.scene.send .t-ghost { color: #04141F; border-color: rgba(4,20,31,.3); }
.t-chat { width: min(420px, 100%); border-radius: 40px; background: #fff; padding: 26px 20px; box-shadow: 0 40px 80px -40px rgba(4,20,31,.45); display: flex; flex-direction: column; gap: 12px; justify-self: center; }
.t-chat .who { font: 500 12px Inter, sans-serif; color: #777; }
.t-chat .bubble { background: #E9E9EB; border-radius: 18px; padding: 10px 14px; font: 500 15px Inter, sans-serif; color: #111; max-width: 300px; white-space: pre-wrap; }
.t-chat .preview { border-radius: 20px; overflow: hidden; background: #E9E9EB; max-width: 320px; }
.t-chat .preview .img { background: linear-gradient(180deg, #07263A, #04141F); padding: 22px 18px; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.t-chat .preview .img b { font: 900 24px Montserrat, sans-serif; letter-spacing: -.03em; color: #EAF2F2; line-height: 1; }
.t-chat .preview .img span { font: 600 13px Inter, sans-serif; color: var(--ice); }
.t-chat .preview .meta { padding: 10px 14px 12px; font: 700 14px Inter, sans-serif; color: #111; }
.t-chat .preview .meta small { display: block; font: 500 12px Inter, sans-serif; color: #777; }

.t-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; transition: .25s; z-index: 50; background: var(--chalk); color: var(--night); font: 700 14px Inter, sans-serif; border-radius: 999px; padding: 12px 20px; pointer-events: none; }
.t-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Embed: the frame sets the height, so scenes stop asking for a full viewport */
body.embed .t-stage, body.embed .scene { min-height: 640px; }
body.embed .t-top .t-brand { pointer-events: none; }

@media (max-width: 900px) {
    .t-top { padding: 20px 22px; }
    .t-brand span { display: none; }
    .scene { padding: 84px 22px 28px; }
    .scene.on.sc-split { grid-template-columns: 1fr; gap: 32px; align-items: start; }
    .sc-left { justify-content: flex-start; gap: 20px; }
    .sc-center { gap: 22px; }
    .t-body { font-size: 16px; }
    .t-actions .t-gold, .t-actions .t-ghost { width: 100%; }
    .t-pair { gap: 24px; }
    .t-card { width: 100%; max-width: 340px; aspect-ratio: auto; min-height: 380px; transform: none; padding: 28px 24px; }
    .t-card .cue { font-size: 44px; }
    .t-rate-row { gap: 4px; }
    .t-rate-row button { height: 42px; }
    .t-steps { gap: 18px; font-size: 13px; }
    .t-orb { width: min(340px, 86vw); }
}
