/*
 * Teen & tween mode (public/static/shared/agemode.js, docs/TEEN_MODE.md). A layer over ANY theme:
 * the theme supplies --accent/--accent2/--gold and its hero art; this file turns them into an
 * editorial, music-festival look for 13+ ("teen") and a cooler, calmer type for 8-12 ("tween").
 *
 * Teen palette: near-black paper (#0b0a0f), off-white ink (#f4f2ec, 17.9:1), a muted ink
 * (#b4b0c2, 9.4:1) and the theme's accent lifted toward white in OKLCH (--tn-hi) so accent text
 * stays AA on the dark paper whatever the theme. Buttons are --tn-hi with near-black ink.
 * Motion: transform and opacity only; prefers-reduced-motion shows every final state still.
 */

/* ---------------- tokens ---------------- */
.tn, body[data-look="teen"], .tn-op, .tn-op-gate, .tv-teen {
  --tn-paper: #0b0a0f; --tn-paper-2: #15131c; --tn-ink: #f4f2ec; --tn-mute: #b4b0c2; --tn-line: rgba(244, 242, 236, .16);
  --tn-hi: color-mix(in oklab, var(--accent, #ff4d8d) 58%, #fff); --tn-hi-2: color-mix(in oklab, var(--accent2, #6ee7ff) 55%, #fff);
  --tn-on-hi: #0b0a0f;
  --tn-display: "Anton", "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  --tn-body: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --tn-mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --tn-ease: cubic-bezier(.16, 1, .3, 1);
}
html body[data-look="teen"] { background: var(--tn-paper); background-image: none; color: var(--tn-ink); }
body[data-look="teen"] .topbar .chip { background: rgba(244, 242, 236, .1); color: var(--tn-ink); font-family: var(--tn-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }

.tn { position: relative; color: var(--tn-ink); font-family: var(--tn-body); background: var(--tn-paper); margin: 0 -16px; padding: 0 16px 8px; isolation: isolate; overflow: clip; }
.tn h1, .tn h2, .tn h3 { font-family: var(--tn-display); font-weight: 400; letter-spacing: .005em; text-transform: uppercase; line-height: .95; color: var(--tn-ink); text-wrap: balance; }
.tn p { text-wrap: pretty; }
.tn a { color: var(--tn-hi); }
.tn .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tn-eyebrow { margin: 0 0 6px; font-family: var(--tn-mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--tn-hi); }

/* ---------------- the poster ---------------- */
.tn-hero { container-type: inline-size; position: relative; margin: 0 -16px; padding: 30px 20px 0; min-height: min(74svh, 640px); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate; }
.tn-bg { position: absolute; inset: 0; z-index: -1; background: var(--tn-paper); }
/* the theme's own art as a duotone: greyscale, then multiplied by the accent and screened with the ink */
.tn-art { position: absolute; inset: 0; z-index: 0; display: grid; align-items: end; opacity: .9; filter: grayscale(1) contrast(1.5) brightness(1.9); }
/* a halftone sun: the festival-poster graphic, in the theme's accent */
.tn-sun { position: absolute; z-index: 1; right: -18%; top: 9%; width: min(92vw, 520px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--tn-hi) 34%, transparent 36%) 0 0 / 11px 11px;
  -webkit-mask: radial-gradient(closest-side, #000 55%, rgba(0, 0, 0, .55) 80%, transparent 100%); mask: radial-gradient(closest-side, #000 55%, rgba(0, 0, 0, .55) 80%, transparent 100%); opacity: .8; mix-blend-mode: screen; }
.tn-art svg { width: 160%; max-width: none; margin-left: -30%; height: auto; transform-origin: 50% 100%; }
.tn-bg::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, color-mix(in oklab, var(--accent, #ff4d8d) 85%, #000) 0%, color-mix(in oklab, var(--accent2, #6ee7ff) 60%, #000) 100%); mix-blend-mode: multiply; }
.tn-bg::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(11, 10, 15, .1) 0%, rgba(11, 10, 15, .35) 45%, var(--tn-paper) 92%); }
.tn-grain { position: absolute; inset: -50%; z-index: 3; opacity: .22; pointer-events: none; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); }
.tn-glow { position: absolute; z-index: 2; width: 120%; height: 60%; left: -10%; top: 6%; background: radial-gradient(closest-side, color-mix(in oklab, var(--tn-hi) 55%, transparent), transparent); opacity: .5; mix-blend-mode: screen; }
.tn-kicker { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 auto; font-family: var(--tn-mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tn-ink); }
.tn-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border: 1.5px solid var(--tn-ink); border-radius: 2px; font-weight: 700; }
.tn-from { color: var(--tn-mute); }
.tn-title { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 10px; margin: 28px 0 0; }
.tn-name { --len: 4; display: block; font-size: clamp(3rem, calc(170cqi / max(var(--len), 3.6)), 10.5rem); line-height: .82; letter-spacing: -.01em; overflow-wrap: anywhere; color: var(--tn-ink); }
.tn-age { display: flex; flex-direction: column; align-items: flex-start; font-size: clamp(3rem, 17cqi, 6.4rem); line-height: .82; color: var(--tn-hi); -webkit-text-stroke: 0; }
.tn-age small { font-family: var(--tn-mono); font-size: .72rem; letter-spacing: .16em; color: var(--tn-mute); line-height: 1.4; }
.tn-what { position: relative; margin: 10px 0 0; font-family: var(--tn-display); font-size: clamp(1.6rem, 9vw, 2.8rem); line-height: 1; letter-spacing: .02em; text-transform: uppercase; color: transparent; -webkit-text-stroke: 1.5px var(--tn-ink); }
@supports not (-webkit-text-stroke: 1px #000) { .tn-what { color: var(--tn-ink); } }
.tn-when { position: relative; margin: 10px 0 0; font-family: var(--tn-mono); font-weight: 700; font-size: clamp(.95rem, 4.2vw, 1.2rem); letter-spacing: .08em; color: var(--tn-ink); }
.tn-lede { position: relative; margin: 12px 0 0; max-width: 32ch; color: var(--tn-mute); font-size: 1rem; }
.tn-tape { position: relative; margin: 26px -20px 0; padding: 9px 0; background: var(--tn-hi); color: var(--tn-on-hi); overflow: hidden; transform: rotate(-2deg); transform-origin: 50% 50%; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .8); }
.tn-tape-in { display: flex; width: max-content; gap: 14px; font-family: var(--tn-mono); font-weight: 700; font-size: .82rem; letter-spacing: .1em; white-space: nowrap; }
.tn-tape i { font-style: normal; }

/* the birthday kid's photo (optional): the Kid Photo hook's figure (public/static/shared/photo.js),
   which teen mode's layer makes a duotone ticket stub; this only places it on the poster */
.tn-photo { position: absolute; right: 18px; top: 72px; width: clamp(96px, 30vw, 150px); margin: 0; transform: rotate(4deg); filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .55)); }
.tn-photo .kp { --kp-w: 100%; display: block; rotate: 0deg; }
.tn-photo .kp-cap { font-family: var(--tn-mono); font-size: .62rem; letter-spacing: .14em; }
.tn-photo ~ .tn-lede, .tn-photo ~ .tn-what { max-width: calc(100% - 20px); }

/* ---------------- cards ---------------- */
.tn-main { display: grid; gap: 14px; padding-top: 18px; }
.tn-card { position: relative; padding: 20px 18px; border: 1px solid var(--tn-line); border-radius: 6px; background: linear-gradient(180deg, rgba(244, 242, 236, .055), rgba(244, 242, 236, .02)); color: var(--tn-ink); }
.tn-card h2 { margin: 0 0 6px; font-size: clamp(1.9rem, 8vw, 2.4rem); }
.tn-head p { margin: 0 0 12px; color: var(--tn-mute); }
.tn-card .note, .tn-card .opt { color: var(--tn-mute); }
.tn-card .note .ic, .tn-parent-note .ic { color: var(--tn-hi); }
.tn-rows { margin: 0; display: grid; gap: 0; }
.tn-row { display: grid; grid-template-columns: 6.6rem 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--tn-line); }
.tn-row:first-child { border-top: 0; }
.tn-row dt { font-family: var(--tn-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tn-mute); padding-top: 3px; }
.tn-row dd { margin: 0; display: grid; gap: 4px; min-width: 0; }
.tn-row .v { font-weight: 600; overflow-wrap: anywhere; }
.tn-row .sub { color: var(--tn-mute); font-size: .92rem; }
.tn-row .links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tn .chip { background: rgba(244, 242, 236, .1); color: var(--tn-ink); font-family: var(--tn-body); font-weight: 600; border-radius: 999px; }
.tn .chip .ic { color: var(--tn-hi); }
.tn-locked { display: inline-flex; align-items: center; gap: 6px; color: var(--tn-hi); }

.tn-facts { padding-top: 54px; }
.tn-stub { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; gap: 8px; padding: 10px 18px; font-family: var(--tn-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--tn-mute); border-bottom: 1.5px dashed var(--tn-line); }
.tn-stub b { color: var(--tn-ink); }
.tn-stub span:nth-child(2) { margin-right: auto; }
@media (max-width: 359px) { .tn-stub span:nth-child(2) { display: none; } }

.tn .btn, .tn-btn { background: var(--tn-hi); color: var(--tn-on-hi); font-family: var(--tn-body); font-weight: 700; letter-spacing: .01em; border-radius: 3px; box-shadow: none; }
.tn .btn.ghost { background: transparent; color: var(--tn-ink); box-shadow: inset 0 0 0 1.5px var(--tn-line); }
.tn .btn:focus-visible, .tn .chip:focus-visible, .tn-rx:focus-visible, .tn summary:focus-visible { outline: 3px solid var(--tn-ink); outline-offset: 3px; }
.tn-cta { display: flex; justify-content: space-between; width: 100%; min-height: 60px; margin-top: 16px; padding: 0 22px; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .04em; font-family: var(--tn-display) !important; font-weight: 400 !important; }
.tn-cta span { transition: transform .3s var(--tn-ease); }
@media (hover: hover) { .tn-cta:hover span { transform: translateX(6px); } }
.tn-cal { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--tn-mute); font-size: .9rem; }
.tn-going { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; font-family: var(--tn-mono); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.tn-going b { font-family: var(--tn-display); font-size: 1.6rem; letter-spacing: 0; font-weight: 400; color: var(--tn-hi); }
.tn-stack { display: flex; }
.tn-stack span { display: grid; place-items: center; width: 34px; height: 34px; margin-left: -8px; border-radius: 50%; background: var(--tn-paper-2); border: 2px solid var(--tn-paper); font-size: 1rem; }
.tn-stack span:first-child { margin-left: 0; }
.tn-stack .tn-blur { background: linear-gradient(135deg, var(--tn-hi), var(--tn-hi-2)); opacity: .55; }

/* reactions */
.tn-react { margin: 0; }
.tn-rx-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.tn-rx-row::-webkit-scrollbar { display: none; }
.tn-rx { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 60px; min-height: 48px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--tn-line); background: rgba(244, 242, 236, .05); color: var(--tn-ink); font: 700 .95rem var(--tn-mono); cursor: pointer; transition: transform .2s var(--tn-ease), background-color .2s, border-color .2s; }
.tn-rx-e { font-size: 1.25rem; line-height: 1; display: inline-block; transition: transform .35s var(--tn-ease); }
.tn-rx[aria-pressed="true"] { background: color-mix(in oklab, var(--tn-hi) 22%, transparent); border-color: var(--tn-hi); }
.tn-rx:active { transform: scale(.94); }
.tn-rx.pop .tn-rx-e { animation: tn-pop .5s var(--tn-ease); }
@keyframes tn-pop { 0% { transform: scale(1); } 35% { transform: scale(1.5) rotate(-8deg); } 100% { transform: scale(1); } }
.tn-rx:disabled { opacity: .6; cursor: default; }

/* countdown */
.tn-count .count { gap: 6px; }
.tn .cbox { background: transparent; border: 1px solid var(--tn-line); border-radius: 3px; padding: 12px 2px 10px; }
.tn .cbox b { font-family: var(--tn-display); font-weight: 400; font-size: clamp(2rem, 10vw, 2.8rem); color: var(--tn-ink); font-variant-numeric: tabular-nums; }
.tn .cbox span { font-family: var(--tn-mono); font-size: .66rem; letter-spacing: .14em; color: var(--tn-mute); }

/* dress code */
.tn-vibe { overflow: hidden; }
.tn-vibe h2 { font-size: clamp(2.6rem, 13vw, 3.8rem); margin: 0; }
.tn-vibe p:last-of-type { margin: 6px 0 0; color: var(--tn-mute); max-width: 26ch; }
.tn-swatch { position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; border-radius: 50%; background: conic-gradient(from 210deg, var(--sw1), var(--sw2), var(--sw1)); opacity: .9; box-shadow: 0 0 0 1px var(--tn-line); }

/* the run + bring */
.tn-plan { display: grid; gap: 22px; }
.tn-run { list-style: none; margin: 0; padding: 0; }
.tn-run li { display: grid; grid-template-columns: 2.4rem 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--tn-line); }
.tn-run li:first-child { border-top: 0; }
.tn-n { font-family: var(--tn-mono); font-weight: 700; color: var(--tn-hi); }
.tn-run b { font-weight: 700; }
.tn-run p { margin: 2px 0 0; color: var(--tn-mute); font-size: .95rem; }
.tn .chk .box { background: transparent; border-color: var(--tn-line); border-radius: 3px; }
.tn .chk input:checked + .box { background: var(--tn-hi); border-color: var(--tn-hi); color: var(--tn-on-hi); }

/* RSVP */
.tn .f { color: var(--tn-ink); font-weight: 600; }
.tn .f input, .tn .f select, .tn .f textarea { background: var(--tn-paper); color: var(--tn-ink); border: 1.5px solid var(--tn-line); border-radius: 3px; font-family: var(--tn-body); }
.tn .f input::placeholder, .tn .f textarea::placeholder { color: #8f8a9f; }
.tn .f input:focus, .tn .f textarea:focus { border-color: var(--tn-hi); box-shadow: 0 0 0 3px color-mix(in oklab, var(--tn-hi) 30%, transparent); }
.tn fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.tn legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.tn .choice > span { background: transparent; color: var(--tn-ink); border: 1.5px solid var(--tn-line); border-radius: 3px; font-family: var(--tn-body); font-weight: 600; }
.tn .choice input:checked + span { background: var(--tn-hi); border-color: var(--tn-hi); color: var(--tn-on-hi); }
.tn .choice input:focus-visible + span { outline: 3px solid var(--tn-ink); outline-offset: 2px; }
.tn-yn { grid-template-columns: 1fr 1fr !important; }
.tn-yn .choice > span { min-height: 72px; font-family: var(--tn-display); font-weight: 400; font-size: clamp(1.4rem, 6.4vw, 1.9rem); text-transform: uppercase; letter-spacing: .02em; }
.tn-yes input:checked + span { animation: tn-thump .45s var(--tn-ease); }
@keyframes tn-thump { 0% { transform: scale(.94); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
.tn-st { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)) !important; }
.tn-st .choice > span { min-height: 52px; border-radius: 50%; aspect-ratio: 1; padding: 0; }
.tn-st-e { font-size: 1.45rem; line-height: 1; }
.tn-st .choice input:checked + span { background: color-mix(in oklab, var(--tn-hi) 30%, transparent); }
.tn-parent { margin-top: 6px !important; padding: 16px !important; border: 1.5px dashed var(--tn-line) !important; border-radius: 4px; background: rgba(244, 242, 236, .03); }
.tn-parent-note { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; color: var(--tn-mute); font-size: .92rem; }
.tn .photo-q-ask { color: var(--tn-mute); font-size: .92rem; margin: 0 0 8px; }
.tn details.more { border-top: 1px solid var(--tn-line); }
.tn-send { text-transform: uppercase; font-family: var(--tn-display) !important; font-weight: 400 !important; letter-spacing: .05em; font-size: 1.35rem !important; }
.tn .who-line { color: var(--tn-mute); font-family: var(--tn-mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.tn .sent h3 { font-family: var(--tn-display); font-size: clamp(2.4rem, 12vw, 3.4rem); margin: 6px 0; }
.tn-unlocked { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 3px; background: color-mix(in oklab, var(--tn-hi) 16%, transparent); border: 1px solid var(--tn-hi); }
.tn-unlocked .ic { color: var(--tn-hi); flex: none; }
.tn .err { color: #ff9db5; }

/* the wristband (after "I'm in", and the opening gate) */
.tn-band { position: relative; display: flex; max-width: 360px; margin: 0 auto; border-radius: 4px; overflow: hidden; background: var(--tn-hi); color: var(--tn-on-hi); text-align: left; border: 0; font: inherit; animation: tn-band-in .8s var(--tn-ease) both; box-shadow: 0 18px 40px -18px color-mix(in oklab, var(--tn-hi) 70%, #000); }
.tn-band-miss { background: var(--tn-paper-2); color: var(--tn-ink); box-shadow: inset 0 0 0 1px var(--tn-line); }
.tn-band-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-right: 2px dashed rgba(11, 10, 15, .35); }
.tn-band-main small, .tn-band-stub small { font-family: var(--tn-mono); font-weight: 700; font-size: .66rem; letter-spacing: .18em; }
.tn-band-main b { font-family: var(--tn-display); font-weight: 400; font-size: 2rem; line-height: 1; overflow-wrap: anywhere; }
.tn-band-main span { font-family: var(--tn-mono); font-size: .74rem; letter-spacing: .06em; }
.tn-band-stub { width: 30%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px; }
.tn-band-stub svg { width: 64px; height: 18px; fill: currentColor; }
.tn-band-st { font-size: 1.6rem; line-height: 1; }
.tn-band-shine { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); transform: translateX(-120%); animation: tn-shine 1.6s .5s var(--tn-ease) both; pointer-events: none; }
@keyframes tn-band-in { from { transform: translateY(-30px) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tn-shine { to { transform: translateX(120%); } }

/* who's going */
.tn-wall-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.tn-wall-grid li { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border: 1px solid var(--tn-line); border-radius: 4px; text-align: center; min-width: 0; animation: tn-rise .5s var(--tn-ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.tn-wall-grid .tn-av { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, color-mix(in oklab, var(--tn-hi) 40%, var(--tn-paper)), var(--tn-paper-2)); font-size: 1.3rem; font-family: var(--tn-display); color: var(--tn-ink); }
.tn-wall-grid b { font-size: .85rem; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-wall-grid .tn-ghost { border-style: dashed; }
.tn-wall-grid .tn-ghost .tn-av { background: rgba(244, 242, 236, .08); color: transparent; }
@keyframes tn-rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* songs */
.tn-tags { display: flex !important; flex-wrap: wrap; gap: 6px; }
.tn-tags .choice > span { min-height: 40px; padding: 4px 12px; border-radius: 999px; font-size: .9rem; }
.tn-queue { list-style: none; margin: 0 0 14px; padding: 0; counter-reset: q; }
.tn-queue li { counter-increment: q; display: grid; grid-template-columns: 2rem 1fr; gap: 8px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--tn-line); }
.tn-queue li::before { content: counter(q, decimal-leading-zero); font-family: var(--tn-mono); color: var(--tn-hi); font-weight: 700; font-size: .85rem; }
.tn-queue li.played { opacity: .55; }
.tn-queue b { font-weight: 700; overflow-wrap: anywhere; }
.tn-queue small { display: block; color: var(--tn-mute); font-family: var(--tn-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }

/* story card */
.tn-story-row { display: grid; gap: 14px; align-items: center; grid-template-columns: 96px 1fr; }
.tn-story-pv { width: 96px; aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; background: var(--tn-paper-2); box-shadow: 0 0 0 1px var(--tn-line); }
.tn-story-pv canvas, .tn-story-pv img { width: 100%; height: 100%; display: block; }

.tn-games .btn { margin-top: 4px; }
.tn-parents { background: rgba(244, 242, 236, .03); }
.tn-fine { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tn-fine li { padding: 6px 10px; border: 1px solid var(--tn-line); border-radius: 999px; font-size: .86rem; color: var(--tn-ink); background: transparent; box-shadow: none; }
.tn .serving { display: flex; gap: 8px; color: var(--tn-mute); margin: 12px 0 0; }
.tn-gate { text-align: left; }
.tn-gate h2 { font-size: clamp(2.4rem, 12vw, 3.4rem); }
.tn .resend input { background: var(--tn-paper); color: var(--tn-ink); border: 1.5px solid var(--tn-line); border-radius: 3px; }
.tn-foot { text-align: center; margin: 26px 0 0; font-family: var(--tn-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; opacity: 1; }
.tn-foot a { color: var(--tn-mute); text-decoration: none; }
.tn-pill { background: var(--tn-hi); color: var(--tn-on-hi); font-family: var(--tn-display); font-weight: 400; letter-spacing: .05em; text-transform: uppercase; border-radius: 3px; }
.tn .preview-banner { position: relative; z-index: 2; }
.tn-sticker { display: inline-grid; place-items: center; width: var(--s, 40px); height: var(--s, 40px); font-size: calc(var(--s, 40px) * .62); line-height: 1; }

/* reveals inside teen mode: a crisp rise, no bounce (invite.css hides .reveal until .in) */
.tn .reveal { transition: opacity .6s var(--tn-ease), transform .6s var(--tn-ease); }

/* ---------------- entrance: festival title card ---------------- */
.tn-hero > * { animation: tn-cut .9s var(--tn-ease) both; }
.tn-hero > .tn-kicker { animation-delay: .05s; }
.tn-hero > .tn-title { animation-delay: .15s; }
.tn-hero > .tn-what { animation-delay: .3s; }
.tn-hero > .tn-when { animation-delay: .4s; }
.tn-hero > .tn-photo { animation: tn-photo 1s .35s var(--tn-ease) both; }
.tn-hero > .tn-tape { animation: tn-tape-in .9s .5s var(--tn-ease) both; }
.tn-hero > .tn-bg { animation: none; }
.tn-tape-in { animation: tn-marquee 26s linear infinite; }
.tn-glow { animation: tn-breathe 6s ease-in-out infinite alternate; }
.tn-sun { animation: tn-spin 120s linear infinite; }
@keyframes tn-spin { to { transform: rotate(360deg); } }
@keyframes tn-cut { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes tn-photo { from { opacity: 0; transform: rotate(12deg) translateY(30px) scale(.9); } to { opacity: 1; transform: rotate(4deg); } }
@keyframes tn-tape-in { from { opacity: 0; transform: rotate(-2deg) translateX(-30%); } to { opacity: 1; transform: rotate(-2deg); } }
@keyframes tn-marquee { to { transform: translateX(-50%); } }
@keyframes tn-breathe { from { opacity: .35; } to { opacity: .6; } }

/* ---------------- the opening (opening.js) ---------------- */
.op-host[data-look="teen"], .op-host:has(.tn-op), .op-host:has(.tn-op-gate) { background: var(--tn-paper, #0b0a0f); color: #f4f2ec; }
.tn-op-gate .tn-band-gate { cursor: pointer; width: min(92vw, 360px); animation: tn-band-in .8s var(--tn-ease) both; }
.tn-op-gate .tn-band-gate:focus-visible { outline: 3px solid #f4f2ec; outline-offset: 4px; }
.tn-op-stage { position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center; }
.tn-op-art { position: absolute; inset: 0; display: grid; align-items: end; opacity: 0; filter: grayscale(1) contrast(1.3); }
.tn-op-art svg { width: 180%; margin-left: -40%; }
.tn-op-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in oklab, var(--accent, #ff4d8d) 80%, #000), #000); mix-blend-mode: multiply; }
.tn-op-card { position: absolute; z-index: 2; left: 8vw; right: 8vw; margin: 0; text-align: center; font-family: var(--tn-display); text-transform: uppercase; color: #f4f2ec; font-size: clamp(2rem, 10vw, 4.4rem); line-height: .95; opacity: 0; }
.tn-op-c0 { font-family: var(--tn-mono); font-size: clamp(.85rem, 3.8vw, 1.1rem); letter-spacing: .18em; }
.tn-op-c1 { font-size: clamp(5rem, 30vw, 12rem); }
.tn-op-c2 { color: var(--tn-hi); }
.op-run .tn-op-art { animation: tn-op-art 5.6s ease-out both; }
.op-run .tn-op-card { animation: tn-op-cut 1.1s var(--tn-ease) both; animation-delay: calc(var(--i) * 1.05s); }
.op-final .tn-op-card { animation: none; opacity: 0; }
.op-final .tn-op-art { opacity: .35; }
@keyframes tn-op-art { from { opacity: 0; transform: scale(1.15); } 20% { opacity: .5; } to { opacity: .35; transform: scale(1); } }
@keyframes tn-op-cut { 0% { opacity: 0; transform: scale(1.08); } 18% { opacity: 1; transform: scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: scale(.98); } }
.tn-op .op-card { background: transparent; backdrop-filter: none; border-radius: 0; }
.tn-op .op-card h2 { font-family: var(--tn-display); font-weight: 400; font-size: clamp(3.4rem, 18vw, 6rem); text-transform: uppercase; line-height: .9; margin: 4px 0; color: #f4f2ec; }
.tn-op .op-card h2 span { color: var(--tn-hi); }
.tn-op-when { font-family: var(--tn-mono); letter-spacing: .1em; margin: 6px 0 18px; }
.tn-op .op-skip, .tn-op-gate .op-skip { background: rgba(244, 242, 236, .12); color: #f4f2ec; font-family: var(--tn-mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }

/* ---------------- teen card art (wizard theme cards, sample cards, the marketing section) ---------------- */
.tn-cardart { --tn-hi: color-mix(in oklab, var(--accent, #ff4d8d) 58%, #fff); position: absolute; inset: 0; display: block; overflow: hidden; background: #0b0a0f; isolation: isolate; container-type: inline-size; }
.tn-cardart-bg { position: absolute; inset: 0; display: grid; align-items: end; filter: grayscale(1) contrast(1.5) brightness(1.8); opacity: .75; }
.tn-cardart-bg svg, .tn-cardart .hero-art { position: static !important; width: 140% !important; max-width: none; margin-left: -20%; height: auto !important; }
.tn-cardart::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(160deg, color-mix(in oklab, var(--accent, #ff4d8d) 85%, #000), #0b0a0f 85%); mix-blend-mode: multiply; }
.tn-cardart .tn-sun { width: 80%; right: -22%; top: -14%; z-index: 2; background-size: 8px 8px; }
.tn-cardart-txt { position: absolute; left: 7%; right: 7%; bottom: 8%; z-index: 3; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 6px; color: #f4f2ec; font-family: "Anton", Impact, "Arial Narrow Bold", sans-serif; text-transform: uppercase; line-height: .85; }
.tn-cardart-txt b { font-weight: 400; font-size: clamp(1.6rem, 26cqi, 5rem); letter-spacing: 0; }
.tn-cardart-txt em { font-style: normal; font-size: clamp(1.2rem, 16cqi, 3rem); color: var(--tn-hi); }
.tn-cardart-txt small { flex-basis: 100%; margin-top: 4px; font-family: "Space Mono", ui-monospace, monospace; font-weight: 700; font-size: clamp(.6rem, 5.4cqi, .9rem); letter-spacing: .14em; }

/* ---------------- minimal luxe (16+ by default: sweet sixteen, the 18th; the host can pick it at 13) ----------------
   Same structure, quieter voice: Bodoni Moda italic for the name, a gold hairline instead of the
   halftone, no ticker tape colors, cream on near-black. Gold #d8b46a on #0b0a0f: 9.6:1. */
.tn[data-variant="luxe"], .tn-op[data-variant="luxe"], .tn-cardart[data-variant="luxe"] { --tn-hi: #d8b46a; --tn-hi-2: #efe3c8; --tn-luxe: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif; }
.tn[data-variant="luxe"] h1, .tn[data-variant="luxe"] h2, .tn[data-variant="luxe"] h3 { font-family: var(--tn-luxe); font-style: italic; font-weight: 500; text-transform: none; letter-spacing: -.01em; line-height: 1; }
.tn[data-variant="luxe"] .tn-name { font-family: var(--tn-luxe); font-style: italic; font-weight: 500; text-transform: none; letter-spacing: -.02em; line-height: .9; font-size: clamp(3.2rem, calc(150cqi / max(var(--len), 3.6)), 8.5rem); }
.tn[data-variant="luxe"] .tn-age { font-family: var(--tn-luxe); font-weight: 400; color: transparent; -webkit-text-stroke: 1px var(--tn-hi); }
@supports not (-webkit-text-stroke: 1px #000) { .tn[data-variant="luxe"] .tn-age { color: var(--tn-hi); } }
.tn[data-variant="luxe"] .tn-what { font-family: var(--tn-mono); font-size: .9rem; letter-spacing: .32em; color: var(--tn-hi); -webkit-text-stroke: 0; }
.tn[data-variant="luxe"] .tn-chip { border-color: var(--tn-hi); color: var(--tn-hi); border-width: 1px; }
.tn-mile { font-family: var(--tn-luxe, Georgia, serif); font-style: italic; text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--tn-hi); }
.tn[data-variant="luxe"] .tn-sun, .tn-cardart[data-variant="luxe"] .tn-sun { background: none; border: 1px solid var(--tn-hi); -webkit-mask: none; mask: none; opacity: .55; mix-blend-mode: normal; animation: none; }
.tn[data-variant="luxe"] .tn-bg::before { background: linear-gradient(180deg, #1a1612, #0b0a0f); }
.tn[data-variant="luxe"] .tn-art { opacity: .22; }
.tn[data-variant="luxe"] .tn-glow { background: radial-gradient(closest-side, rgba(216, 180, 106, .28), transparent); }
.tn[data-variant="luxe"] .tn-tape { transform: none; background: transparent; color: var(--tn-hi); box-shadow: none; border-top: 1px solid rgba(216, 180, 106, .5); border-bottom: 1px solid rgba(216, 180, 106, .5); margin-top: 22px; }
.tn[data-variant="luxe"] .tn-hero > .tn-tape { animation-name: tn-cut; }
.tn[data-variant="luxe"] .tn-age small { font-family: var(--tn-mono); font-style: normal; font-weight: 400; color: var(--tn-mute); -webkit-text-stroke: 0; }
.tn[data-variant="luxe"] .tn-tape-in { font-weight: 400; letter-spacing: .3em; font-size: .72rem; }
.tn[data-variant="luxe"] .tn-card { border-radius: 2px; border-color: rgba(216, 180, 106, .22); background: rgba(244, 242, 236, .025); }
.tn[data-variant="luxe"] .btn, .tn[data-variant="luxe"] .tn-btn { border-radius: 0; }
.tn[data-variant="luxe"] .tn-cta, .tn[data-variant="luxe"] .tn-send { font-family: var(--tn-body) !important; font-weight: 600 !important; letter-spacing: .22em; font-size: .95rem !important; }
.tn[data-variant="luxe"] .tn-yn .choice > span { font-family: var(--tn-luxe); font-style: italic; text-transform: none; font-weight: 500; }
.tn[data-variant="luxe"] .tn-band { border-radius: 0; background: #efe3c8; }
.tn-op[data-variant="luxe"] .tn-op-card { font-family: var(--tn-luxe); font-style: italic; text-transform: none; }
.tn-cardart[data-variant="luxe"]::after { background: linear-gradient(160deg, #2a2219, #0b0a0f 85%); }
.tn-cardart[data-variant="luxe"] .tn-cardart-txt { font-family: var(--tn-luxe); font-style: italic; text-transform: none; }
.tn-cardart[data-variant="luxe"] .tn-cardart-txt em { font-style: normal; color: transparent; -webkit-text-stroke: 1px var(--tn-hi); }
.tn-cardart[data-variant="luxe"] .tn-cardart-txt small { font-style: normal; color: var(--tn-hi); letter-spacing: .28em; }

.theme-card .tc-art--teen { position: relative; overflow: hidden; height: 96px; }
.teen-set .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

/* ---------------- tween (8-12): same invite, cooler type, two mascots ---------------- */
.tw .title, .tw .sec-head h2, .tw .ticket b, .tw .rsvp-cta { font-family: "Space Grotesk", var(--font-body), system-ui, sans-serif; font-weight: 700; letter-spacing: -.025em; }
.tw .title { text-transform: none; line-height: 1; }
.tw .eyebrow { font-family: "Space Mono", ui-monospace, monospace; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.tw .squad { gap: 14px; }
.tw .age-badge { border-radius: 10px; }

/* ---------------- Party TV (Party HQ) in teen mode ---------------- */
.tv-teen { background: var(--tn-paper); color: var(--tn-ink); font-family: var(--tn-body); }
.tv-teen h1, .tv-teen h2 { font-family: var(--tn-display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; color: var(--tn-ink); }
.tv-teen h1 { font-size: clamp(5rem, 16vw, 14rem); line-height: .85; margin: 0; }
.tv-teen .tv-big { font-family: var(--tn-mono); color: var(--tn-hi); letter-spacing: .08em; text-transform: uppercase; }
.tv-board { list-style: none; margin: 0 auto; padding: 0; width: min(900px, 90vw); display: grid; gap: 10px; counter-reset: b; }
.tv-board li { counter-increment: b; display: grid; grid-template-columns: 4rem 1fr auto; align-items: center; gap: 16px; padding: 14px 20px; border: 1px solid var(--tn-line); border-radius: 4px; font-size: clamp(1.4rem, 3vw, 2.4rem); animation: tn-rise .6s var(--tn-ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
.tv-board li::before { content: counter(b, decimal-leading-zero); font-family: var(--tn-mono); color: var(--tn-hi); }
.tv-board li:first-child { background: var(--tn-hi); color: var(--tn-on-hi); border-color: var(--tn-hi); }
.tv-board li:first-child::before { color: var(--tn-on-hi); }
.tv-board b { font-family: var(--tn-display); font-weight: 400; }
.tv-board span { font-family: var(--tn-mono); }
.tv-rx { display: flex; justify-content: center; gap: 4vw; font-size: clamp(3rem, 8vw, 7rem); }
.tv-rx span { display: grid; justify-items: center; gap: 8px; animation: tn-rise .6s var(--tn-ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
.tv-rx b { font-family: var(--tn-display); font-weight: 400; font-size: .5em; color: var(--tn-ink); }

/* ---------------- reduced motion: every final state, still ---------------- */
@media (prefers-reduced-motion: reduce) {
  .tn-hero > *, .tn-tape-in, .tn-glow, .tn-sun, .tn-band, .tn-band-shine, .tn-wall-grid li, .tn-rx.pop .tn-rx-e, .tn-yes input:checked + span, .tv-board li, .tv-rx span, .op-run .tn-op-card, .op-run .tn-op-art { animation: none !important; }
  .tn-band-shine { display: none; }
  .tn .reveal, .tn-rx, .tn-cta span, .tn-rx-e { transition: none; }
}

/* ---------------- Party HQ > Songs and reactions (hq-teen.js) ---------------- */
.tq-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.tq-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent2, #ccc) 12%, #fff); }
.tq-row b { display: block; overflow-wrap: anywhere; }
.tq-row small { color: var(--muted, #555); }
.tq-row .btnrow { margin: 0; }
.tq-rx { display: flex; flex-wrap: wrap; gap: 14px; font-size: 1.3rem; }

/* the kid's photo (the Kid Photo hook) on the wristband and on the title card */
.tn-band-star { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 74px; padding: 10px 0 10px 10px; }
.tn-band .tn-band-star .kp { --kp-w: 52px; }
.tn-band .tn-band-star em { font-style: normal; font-family: var(--tn-mono); font-size: .56rem; letter-spacing: .06em; line-height: 1.2; text-align: center; max-width: 70px; white-space: normal; text-overflow: clip; overflow-wrap: anywhere; display: block; -webkit-line-clamp: unset; }
.tn-op-final > .kp { --kp-w: 104px; display: block; margin: 0 auto 12px; }
