@font-face { font-family: 'Fraunces'; src: url('/fonts/Fraunces.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #fffaf5; --ink: #1c1917; --muted: #78716c; --line: #ece4da; --card: #ffffff;
  --accent: #c2410c; --accent-2: #ea580c; --accent-soft: #ffedd5; --hero-1: #2a1d15; --hero-2: #4a2a17; --hero-eyebrow: #fdba74; --hero-sub: #fde68a; --glow: #ffe6cf; --gold: #f59e0b; --ok: #15803d; --danger: #b91c1c;
  --radius: 18px; --shadow: 0 1px 2px rgba(28,25,23,.04), 0 8px 24px rgba(28,25,23,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 Inter, system-ui, -apple-system, sans-serif; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); } h2 { font-size: clamp(1.35rem, 3.5vw, 1.8rem); } h3 { font-size: 1.25rem; }
h1 em { font-style: italic; color: var(--accent); font-weight: 600; }
a { color: var(--accent); }
img, video { max-width: 100%; display: block; }
code { font-size: .85em; background: #f5efe8; padding: .1em .4em; border-radius: 6px; word-break: break-all; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--accent); margin: 0 0 .75rem; }
.lede { font-size: 1.15rem; color: #44403c; max-width: 60ch; }
.center .lede { margin-left: auto; margin-right: auto; }
section { padding: 56px 0; }
.page { padding: 36px 0 64px; }
.band { background: linear-gradient(color-mix(in srgb, var(--accent-soft) 45%, var(--bg)), var(--bg)); border-block: 1px solid var(--line); }

/* nav/footer */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(255,250,245,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.nav nav { display: flex; gap: 18px; align-items: center; }
.nav nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
@media (max-width: 560px) { .nav nav a:not(.btn) { display: none; } }
.logo { font-family: Fraunces, serif; font-weight: 700; font-size: 1.35rem; color: var(--ink); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.logo-mark { color: var(--accent); }
.foot { border-top: 1px solid var(--line); padding: 40px 0 28px; background: #fff; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.foot-grid div { display: flex; flex-direction: column; gap: 6px; }
.foot-grid a:not(.logo) { color: var(--muted); text-decoration: none; font-size: .92rem; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* buttons */
.btn { --b: var(--accent); display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--b); color: #fff; font: 600 1rem/1 Inter, sans-serif; padding: 13px 20px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 2px 0 rgba(0,0,0,.06), 0 6px 16px color-mix(in srgb, var(--accent) 25%, transparent); transition: transform .08s, background .15s; min-height: 44px; }
.btn:hover { background: var(--accent-2); } .btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { background: color-mix(in srgb, var(--accent-soft) 40%, #fff); }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid #fecaca; box-shadow: none; } .btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 8px 14px; font-size: .9rem; min-height: 36px; }
.btn-lg { padding: 16px 26px; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn-rec { background: #dc2626; } .btn-rec.on { background: #111; }
.linkish { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; padding: 4px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 12px; }
.cta-row.center { justify-content: center; }
.cta-row form { margin: 0; }

/* hero */
.hero { padding: 56px 0 40px; background: radial-gradient(1000px 400px at 80% 0%, var(--glow) 0%, transparent 60%); }
.hero-sm { padding-bottom: 24px; }
.hero-in { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .hero-in { grid-template-columns: 1fr; } .hero-art { display: none; } }
.phone { width: 270px; height: 540px; margin: 0 auto; border-radius: 42px; background: #1c1917; padding: 12px; box-shadow: 0 30px 60px rgba(124,45,18,.25); transform: rotate(3deg); }
.phone-screen { height: 100%; border-radius: 32px; background: linear-gradient(#2a1d15, #3b2416); color: #fff; padding: 26px 18px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.ph-cover { width: 84px; height: 84px; margin: 10px auto 4px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; font-size: 40px; }
.ph-title { font-family: Fraunces, serif; font-size: 1.6rem; } .ph-sub { color: #fde68a; font-size: .85rem; }
.ph-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.ph-tiles div { aspect-ratio: 4/3; border-radius: 10px; background: linear-gradient(135deg, #fb923c, #f59e0b); opacity: .9; }
.ph-tiles div:nth-child(2) { background: linear-gradient(135deg, #f472b6, #fb923c); } .ph-tiles div:nth-child(3) { background: linear-gradient(135deg, #60a5fa, #a78bfa); } .ph-tiles div:nth-child(4) { background: linear-gradient(135deg, #34d399, #60a5fa); }
.ph-note { background: #fffaf5; color: var(--ink); border-radius: 12px; padding: 12px; font-family: Fraunces, serif; font-size: .95rem; text-align: left; margin-top: auto; }
.ph-note b { display: block; font-family: Inter; font-size: .75rem; color: var(--accent); margin-top: 6px; }

/* steps & grids */
.steps { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps li > span { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; }
.steps p { margin: .3em 0 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.occ-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 24px; }
.occ-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 8px; transition: transform .12s, box-shadow .12s; }
.occ-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.occ-emoji { font-size: 1.8rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }

/* cards/forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 18px 0; box-shadow: var(--shadow); }
.grid2 > .card { margin: 0; }
.form { display: flex; flex-direction: column; gap: 16px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
input, select, textarea { font: 400 1rem Inter, sans-serif; padding: 12px 14px; border: 1px solid #ddd3c7; border-radius: 12px; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
input[type=file] { padding: 10px; background: #fffaf5; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.alert { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 12px 16px; border-radius: 12px; margin: 12px 0; }
.alert-ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.copy { display: flex; gap: 8px; margin: 12px 0; } .copy input { font-size: .9rem; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); margin: 12px 0; }
.keep { margin-top: -4px; }
.big-emoji { font-size: 3.5rem; margin-bottom: 8px; }
.radio { flex-direction: row; align-items: center; font-weight: 500; } .radio input { width: auto; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0 12px; }
@media (max-width: 800px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.plan .btn { margin-top: auto; }
.plan-pop { border: 2px solid var(--accent); box-shadow: 0 12px 30px rgba(194,65,12,.15); }
.pop { position: absolute; top: -12px; left: 22px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.price { font-family: Fraunces, serif; font-size: 2.2rem; font-weight: 700; } .price span { font: 400 .9rem Inter; color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 8px 0 16px; display: flex; flex-direction: column; gap: 8px; }
.ticks li { padding-left: 26px; position: relative; } .ticks li::before { content: '✓'; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.summary { display: flex; justify-content: space-between; gap: 12px; align-items: start; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 12px; }
.testmode { background: #fffbeb; border: 1px dashed var(--gold); color: #92400e; border-radius: 12px; padding: 10px 14px; font-size: .9rem; margin: 12px 0; }
.upsell { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: color-mix(in srgb, var(--accent-soft) 45%, #fff); }

/* faq */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 10px 0; }
.faq summary { font-weight: 600; cursor: pointer; } .faq p { color: #44403c; margin: .6em 0 0; }

/* manage */
.manage-head { display: flex; gap: 18px; align-items: center; margin-bottom: 8px; }
.mh-cover { flex: 0 0 84px; height: 84px; border-radius: 20px; overflow: hidden; background: var(--accent-soft); display: grid; place-items: center; font-size: 40px; }
.mh-cover img { width: 100%; height: 100%; object-fit: cover; }
.manage-head h1 { margin: 0 0 4px; font-size: clamp(1.7rem, 5vw, 2.6rem); }
.mod-list { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; }
.mod-item { display: grid; grid-template-columns: 220px 1fr; gap: 16px; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; }
.mod-item.hidden { opacity: .55; } .mod-item.pending { border-color: var(--accent-soft); background: color-mix(in srgb, var(--accent-soft) 25%, #fff); }
@media (max-width: 620px) { .mod-item { grid-template-columns: 1fr; } }
.mod-media video, .mod-media img { width: 100%; border-radius: 10px; background: #000; max-height: 220px; object-fit: cover; }
.mod-media .note-body { font-family: Fraunces, serif; font-size: 1.05rem; margin: 6px 0 0; }
.mod-meta { display: flex; flex-direction: column; gap: 6px; }
.mod-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; } .mod-actions form { margin: 0; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; vertical-align: middle; }
.pill-pending { background: #ffedd5; color: #9a3412; } .pill-approved { background: #dcfce7; color: #166534; } .pill-hidden { background: #f5f5f4; color: #57534e; } .pill-reported { background: #fee2e2; color: #991b1b; }
.vid-wait { aspect-ratio: 16/9; display: grid; place-items: center; background: #f5efe8; border-radius: 10px; color: var(--muted); font-size: .9rem; }
.rendering { display: flex; gap: 16px; align-items: center; padding: 18px; background: color-mix(in srgb, var(--accent-soft) 45%, #fff); border-radius: 14px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 1s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
video.final { width: 100%; border-radius: 14px; background: #000; aspect-ratio: 16/9; }
.thanks { border-left: 4px solid var(--accent); margin: 12px 0; padding: 8px 16px; font-family: Fraunces, serif; font-size: 1.15rem; }
.thanks cite { display: block; font: 400 .8rem Inter; color: var(--muted); margin-top: 4px; }

/* contribute */
.contrib-hero { padding: 40px 0 8px; background: radial-gradient(700px 300px at 50% 0%, var(--glow), transparent 70%); }
.avatar { width: 104px; height: 104px; border-radius: 50%; margin: 0 auto 16px; overflow: hidden; background: var(--accent-soft); display: grid; place-items: center; font-size: 48px; border: 4px solid #fff; box-shadow: var(--shadow); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.intro-note { font-family: Fraunces, serif; font-size: 1.2rem; max-width: 52ch; margin: 0 auto 8px; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: #f5efe8; padding: 5px; border-radius: 14px; margin-bottom: 14px; }
.tab { border: 0; background: transparent; padding: 11px 6px; border-radius: 10px; font: 600 .92rem Inter; cursor: pointer; color: #57534e; }
.tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.prompt { margin-bottom: 12px; }
#cform { display: flex; flex-direction: column; gap: 14px; }
.recorder { position: relative; aspect-ratio: 4/3; background: #1c1917; border-radius: 14px; overflow: hidden; }
.recorder video { width: 100%; height: 100%; object-fit: cover; }
#live { transform: scaleX(-1); }
.rec-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #d6d3d1; text-align: center; padding: 20px; gap: 6px; }
.rec-timer { position: absolute; top: 12px; left: 12px; background: #dc2626; color: #fff; font-weight: 700; padding: 4px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.rec-controls { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.drop { border: 2px dashed #e7d8c8; border-radius: 14px; padding: 22px; text-align: center; background: #fffaf5; }
.progress { height: 8px; background: #f5efe8; border-radius: 99px; overflow: hidden; } .progress div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.viral { text-align: center; background: linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 50%, #fff), #fff); margin-top: 28px; }
.viral .btn { margin: 6px 4px; }

/* reveal */
.reveal-hero { position: relative; color: #fff; background: linear-gradient(160deg, var(--hero-1), var(--hero-2)); padding: 72px 0 64px; overflow: hidden; }
.rh-bg { position: absolute; inset: -20px; background-size: cover; background-position: center; filter: blur(14px) brightness(.45); }
.rh-in { position: relative; } .reveal-hero .eyebrow { color: var(--hero-eyebrow); } .reveal-hero .lede { color: var(--hero-sub); }
.reveal-hero h1 { animation: rise .9s ease both; } .reveal-hero .lede { animation: rise .9s .25s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.final-wrap { margin: -40px auto 28px; max-width: 900px; position: relative; box-shadow: 0 30px 60px rgba(0,0,0,.25); border-radius: 14px; }
.wall { columns: 3 280px; column-gap: 16px; margin-top: 8px; }
.wall-item { break-inside: avoid; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0 0 16px; box-shadow: var(--shadow); }
.wall-item video, .wall-item img { width: 100%; border-radius: 12px; background: #000; }
.wall-item .note-body { font-family: Fraunces, serif; font-size: 1.15rem; line-height: 1.45; margin: 10px 4px; white-space: pre-line; }
.wall-item footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; color: var(--accent); }
.note-solo { max-width: 640px; margin: 0 auto; } .note-solo .note-body { font-size: 1.45rem; }
.loop { margin-top: 32px; } .loop form { display: flex; flex-direction: column; gap: 10px; }
.dlg { border: 0; border-radius: var(--radius); padding: 22px; max-width: 420px; width: calc(100% - 32px); box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.dlg::backdrop { background: rgba(28,25,23,.5); } .dlg form { display: flex; flex-direction: column; gap: 10px; }
.prose ul { padding-left: 1.2em; } .prose li { margin: .4em 0; }
[hidden] { display: none !important; }

/* ---- Occasions: picker, tones, themes ---- */
.picker { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.picker legend { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: 8px; }
.pgroup-h { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; margin-bottom: 8px; }
.pgroup-h h2, .pgroup-h h3 { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; flex-direction: row; font-weight: 500; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.chip span { display: inline-block; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .92rem; transition: background .12s, border-color .12s; }
.chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.chip input:focus-visible + span { outline: 3px solid #bfdbfe; }
.home-group { margin: 26px 0 8px; }
.occ-grid-sm { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-top: 6px; }
.occ-grid-sm .occ-card { padding: 14px; flex-direction: row; align-items: center; gap: 10px; }
.occ-grid-sm .occ-emoji { font-size: 1.4rem; }
.occ-card.tone-gentle { background: #f7fafc; }
.instead h2 { font-size: clamp(1.25rem, 3.2vw, 1.7rem); max-width: 30ch; margin-left: auto; margin-right: auto; }
.ideas { background: color-mix(in srgb, var(--accent-soft) 40%, #fff); border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; }
.ideas summary { cursor: pointer; font-weight: 600; }
.ideas ul { margin: 8px 0; padding-left: 1.1em; } .ideas li { margin: 4px 0; }
.tips { margin: 6px 0; }
.future { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: repeating-linear-gradient(135deg, #faf7f2, #faf7f2 10px, #f6f1e9 10px, #f6f1e9 20px); box-shadow: none; border-style: dashed; }
.future h2 { margin: 6px 0 4px; font-size: 1.15rem; } .future p { margin: 0; max-width: 52ch; }
.loop-quiet { max-width: 560px; margin: 32px auto 0; }
.guide-list { display: flex; flex-direction: column; gap: 4px; }
.guide-card { display: flex; gap: 16px; align-items: flex-start; text-decoration: none; color: var(--ink); margin: 10px 0; }
.guide-card p { margin: 4px 0 0; } .guide-card:hover { box-shadow: 0 10px 28px rgba(28,25,23,.1); }
.prose .card h2 { font-size: 1.3rem; } .prose .card p { margin: .5em 0; }
/* gentle reveals: slower, softer motion, quieter hero */
.tone-gentle.reveal-hero h1, .tone-gentle.reveal-hero .lede { animation-duration: 1.6s; }
.reveal-hero.tone-gentle { padding: 84px 0 76px; }
/* confetti: only rendered by the server for bright (celebration) occasions */
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -12px; left: calc(var(--i) * 4.6%); width: 8px; height: 14px; border-radius: 2px; background: hsl(calc(var(--i) * 47), 90%, 62%); opacity: .85; animation: fall calc(5s + (var(--i) % 5) * .7s) linear infinite; animation-delay: calc((var(--i) % 7) * -.9s); transform: rotate(calc(var(--i) * 31deg)); }
@keyframes fall { to { transform: translateY(420px) rotate(540deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .reveal-hero h1, .reveal-hero .lede { animation: none; } }

/* ===== Chain mode ===== */
.steps-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .steps-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps-4 { grid-template-columns: 1fr; } }
[hidden] { display: none !important; }
.ph-chain { display: flex; align-items: center; justify-content: center; gap: 0; margin: 14px 0 6px; }
.ph-chain b { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--accent); font: 800 .85rem Inter; flex: none; }
.ph-chain i { width: 16px; height: 3px; background: rgba(255,255,255,.55); flex: none; }
.ph-chain .pair { display: flex; flex-direction: column; gap: 6px; margin-left: 4px; } .ph-chain .pair b { width: 28px; height: 28px; font-size: .75rem; background: var(--hero-eyebrow); }
.ph-chain .fork { width: 14px; }

.modes { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-width: 0; }
.modes legend { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: 8px; }
.mode { position: relative; display: block; cursor: pointer; }
.mode input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.mode > span { display: block; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; padding: 14px 16px; font-size: .9rem; color: var(--muted); height: 100%; transition: border-color .12s, background .12s; }
.mode strong { display: block; color: var(--ink); font-size: 1.02rem; margin-bottom: 2px; }
.mode em { position: absolute; top: 10px; right: 12px; font-style: normal; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.mode input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
.mode input:focus-visible + span { outline: 3px solid #bfdbfe; }
@media (max-width: 560px) { .modes { grid-template-columns: 1fr; } }
.chain-fields { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--line); padding-top: 18px; }
.chain-fields h3 { margin: 0; }
.check { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; font-size: .92rem; }
.check input { width: auto; margin-top: 4px; flex: none; }
.form-grid { display: grid; gap: 14px; margin: 14px 0; }
.form-grid .btn { justify-self: start; }

.phasebar { list-style: none; padding: 0; margin: 18px 0; display: flex; gap: 6px; flex-wrap: wrap; }
.phasebar li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: .88rem; font-weight: 600; }
.phasebar li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; background: #f5f5f4; }
.phasebar li.done { color: var(--ok); } .phasebar li.done span { background: #dcfce7; }
.phasebar li.now { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); } .phasebar li.now span { background: var(--accent); color: #fff; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 8px 0 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stat b { display: block; font: 650 1.6rem Fraunces, serif; line-height: 1.1; } .stat span { color: var(--muted); font-size: .8rem; }
.stat-warn b { color: var(--danger); }

.tree, .tree-kids { list-style: none; margin: 0; padding: 0; }
.tree-kids { margin-left: 22px; padding-left: 18px; border-left: 2px solid color-mix(in srgb, var(--accent) 22%, var(--line)); }
.tree-kids > li { position: relative; padding-top: 10px; }
.tree-kids > li::before { content: ''; position: absolute; left: -18px; top: 38px; width: 16px; height: 2px; background: color-mix(in srgb, var(--accent) 22%, var(--line)); }
.tnode { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.tn-av { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: var(--accent-soft); display: grid; place-items: center; font: 700 1.1rem Fraunces, serif; color: var(--accent); flex: none; }
.tn-av img { width: 100%; height: 100%; object-fit: cover; }
.tn-body { min-width: 0; flex: 1; } .tn-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tn-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; } .tn-acts form { margin: 0; }
.tn-ok { border-color: #bbf7d0; } .tn-review { border-color: #fed7aa; background: #fffbf5; } .tn-invited { border-style: dashed; border-color: var(--accent); }
.tn-stalled { border-color: #fecaca; background: #fff8f8; } .tn-skipped, .tn-hidden { opacity: .6; }
.tn-invited .tn-av, .tn-stalled .tn-av { background: #fff; border: 2px dashed currentColor; }
.pill-tn-ok { background: #dcfce7; color: #166534; } .pill-tn-review { background: #ffedd5; color: #9a3412; } .pill-tn-hidden, .pill-tn-skipped { background: #f5f5f4; color: #57534e; }
.pill-tn-invited { background: var(--accent-soft); color: var(--accent); } .pill-tn-stalled { background: #fee2e2; color: #991b1b; }

.chain-hero .intro-note { max-width: 52ch; margin-inline: auto; }
.chain-card h3 { margin-top: 18px; }
.bubbles { display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center; margin: 12px 0; }
.bub { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 500; }
.bub .arrow { font-style: normal; color: var(--muted); margin: 0 2px; }
.bub-av { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: .75rem; }
.teaser { position: relative; border-radius: 14px; overflow: hidden; margin-top: 12px; background: #111; aspect-ratio: 16/7; }
.teaser img { width: 100%; height: 100%; object-fit: cover; filter: blur(16px) brightness(.7); transform: scale(1.15); }
.teaser-note { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: #fff; padding: 12px 20px; gap: 4px; font-size: .88rem; }
.teaser-note strong { font: 650 1.1rem Fraunces, serif; }

.kids { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.kid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; }
.kid-stalled { border-color: #fecaca; } .kid-skipped { opacity: .55; }
.kid-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .kid-acts .copy { min-width: 220px; }
.tag-form { display: flex; flex-direction: column; gap: 14px; }
.tag-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--accent-soft) 25%, #fff); }
@media (max-width: 560px) { .tag-row { grid-template-columns: 1fr; } }
.pass-card { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }

.subnav { display: flex; gap: 6px; margin: 4px 0 18px; flex-wrap: wrap; }
.subnav a { padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; }
.subnav a.on { background: var(--accent-soft); border-color: var(--accent); }
.filter { margin: 12px 0 18px; } .filter .chip.on span { background: var(--accent-soft); border-color: var(--accent); font-weight: 600; } .filter a { text-decoration: none; color: inherit; }
.outbox { display: flex; flex-direction: column; gap: 10px; }
.msg { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.msg summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.msg-body { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; } .msg pre { white-space: pre-wrap; font: .9rem/1.5 Inter, sans-serif; margin: 6px 0; background: #faf7f2; padding: 12px 14px; border-radius: 10px; }
.pill-kind { background: var(--accent-soft); color: var(--accent); } .pill-ch { background: #e0f2fe; color: #075985; }
.pill-logged { background: #fef3c7; color: #92400e; } .pill-blocked, .pill-failed { background: #fee2e2; color: #991b1b; }
.tbl { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); } .tbl th { background: #faf7f2; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.copy-inline code { word-break: break-all; }
.countdown { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; background: #fff; border: 1.5px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: var(--radius); padding: 18px 20px; margin: 18px 0; box-shadow: var(--shadow); }
.cd-label { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 700; color: var(--accent); }
.cd-time { font: 650 clamp(2rem, 8vw, 2.8rem)/1.1 Fraunces, serif; font-variant-numeric: tabular-nums; }
.cd-low .cd-time { color: var(--danger); } .cd-over .cd-time { color: var(--muted); }
.cd-sub { max-width: 48ch; }
.tn-queued { border-style: dotted; background: #fafaf9; } .tn-queued .tn-av { opacity: .7; }
.tn-late { border-color: #fcd34d; background: #fffdf3; }
.pill-tn-queued { background: #e7e5e4; color: #44403c; } .pill-tn-late { background: #fef3c7; color: #92400e; } .pill-tn-skipped { background: #fee2e2; color: #991b1b; }
.tn-skipped { opacity: .8; border-color: #fecaca; background: #fff8f8; } .tn-skipped .tn-av { border: 2px dashed #f87171; background: #fff; color: #b91c1c; }
.backup { grid-column: 1 / -1; font-size: .9rem; } .backup summary { cursor: pointer; color: var(--accent); font-weight: 600; } .backup .row2 { margin-top: 10px; }
.pretag { padding: 0; } .pretag > summary { cursor: pointer; padding: 16px 20px; list-style: none; } .pretag > summary::-webkit-details-marker { display: none; }
.pretag[open] > summary { border-bottom: 1px solid var(--line); } .pretag .pass-card { border: 0; box-shadow: none; margin: 0; }
.keep-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: color-mix(in srgb, var(--accent-soft) 40%, #fff); }
.keep-card p { margin: 2px 0 0; }
