/* ================= Tokens ================= */
:root {
  --f-display: "Cormorant Garamond", Georgia, serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "Space Mono", ui-monospace, monospace;
  --daily: #ff7b00;
  /* gate / default: maroon & gold */
  --bg: #3d0a14; --bg2: #5b0f1a; --ink: #fff4e0; --muted: #e6c9a8;
  --accent: #ffb703; --accent2: #ff8fab; --gold: #e9c46a;
  --line: rgba(233, 196, 106, .28); --card: rgba(255, 244, 224, .06); --card-line: rgba(233, 196, 106, .35);
  --btn-ink: #3d0a14;
  --radius: 16px;
}
html[lang="gu"] { --f-display: "Rasa", serif; --f-body: "Mukta Vaani", system-ui, sans-serif; }
html[lang="hi"] { --f-display: "Tiro Devanagari Hindi", serif; --f-body: "Mukta", system-ui, sans-serif; }

/* Groom: robotics — blueprint navy, saffron and cyan, bandhani dots */
body[data-side="groom"] {
  --bg: #06131f; --bg2: #0b2236; --ink: #e6f1f6; --muted: #8fb3c4;
  --accent: #ff9f1c; --accent2: #3dd6d0; --gold: #e9c46a;
  --line: rgba(61, 214, 208, .2); --card: rgba(12, 36, 56, .72); --card-line: rgba(61, 214, 208, .28);
  --btn-ink: #06131f;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 159, 28, .14) 1.2px, transparent 1.4px),
    linear-gradient(rgba(61, 214, 208, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 214, 208, .06) 1px, transparent 1px);
  background-size: 22px 22px, 44px 44px, 44px 44px;
}
/* Bride: biotech — ivory, rani pink and emerald, leheriya stripes */
body[data-side="bride"] {
  --bg: #fff7f0; --bg2: #ffe8ee; --ink: #3a0b1f; --muted: #8a5a6a;
  --accent: #c2185b; --accent2: #0f7b6c; --gold: #b8860b;
  --line: rgba(194, 24, 91, .18); --card: rgba(255, 255, 255, .82); --card-line: rgba(194, 24, 91, .22);
  --btn-ink: #fff;
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(135deg, rgba(194, 24, 91, .045) 0 14px, transparent 14px 28px, rgba(255, 183, 3, .06) 28px 42px, transparent 42px 56px);
}

/* ================= Base ================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg);
  font: 400 16px/1.6 var(--f-body); overflow-x: hidden;
  transition: background-color .5s;
}
body[data-side="none"] { background: radial-gradient(ellipse at 50% 20%, #6d1424 0%, #3d0a14 55%, #26050c 100%) fixed; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); }
.mono { font-family: var(--f-mono); letter-spacing: .04em; }
.muted { color: var(--muted); }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.15; margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ================= Top bar ================= */
#topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  background: linear-gradient(var(--bg) 40%, transparent); pointer-events: none;
}
#topbar > * { pointer-events: auto; }
.brand { background: none; border: 0; font-family: var(--f-display); font-size: 1.1rem; font-weight: 700; display: flex; gap: 6px; align-items: center; padding: 4px; }
.brand i { color: var(--accent); font-style: normal; font-size: .8em; }
.tb-right { display: flex; gap: 8px; align-items: center; }
.pill { border: 1px solid var(--card-line); background: var(--card); backdrop-filter: blur(8px); border-radius: 99px; padding: 6px 12px; font-size: .8rem; }
.langs { display: flex; border: 1px solid var(--card-line); border-radius: 99px; overflow: hidden; background: var(--card); backdrop-filter: blur(8px); }
.langs button { border: 0; background: none; padding: 6px 10px; font-size: .82rem; min-width: 36px; }
.langs button.on { background: var(--accent); color: var(--btn-ink); font-weight: 700; }

/* ================= Toran & mandala ================= */
.toran { display: block; width: 100%; height: 92px; position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none; }
.mandala { width: 100%; height: 100%; }

/* ================= Gate ================= */
.gate { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 104px 16px 40px; overflow: hidden; text-align: center; }
.gate-mandala { position: absolute; width: min(140vw, 900px); aspect-ratio: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--gold); opacity: .13; animation: spin 140s linear infinite; }
.gate-inner { position: relative; z-index: 3; max-width: 720px; width: 100%; }
.blessing { color: var(--gold); font-family: var(--f-display); font-size: 1.05rem; margin: 0 0 .4rem; letter-spacing: .04em; }
.together { color: var(--muted); margin: 0; font-size: .95rem; }
.names { font-size: clamp(3rem, 14vw, 6.4rem); display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .1em .3em; margin: .2em 0; color: var(--ink); }
body[data-side="none"] .names span { background: linear-gradient(180deg, #ffe9a8, #e9c46a 60%, #b8860b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.names em { font-style: italic; font-size: .45em; color: var(--accent2); }
.date { font-family: var(--f-display); font-size: 1.3rem; margin: .2rem 0 1rem; }
.date span { color: var(--muted); font-size: .9em; }
.cd-mini { display: flex; justify-content: center; gap: 10px; margin: 0 0 2rem; }
.cd-mini span { display: grid; min-width: 62px; padding: 8px 4px; border: 1px solid var(--card-line); border-radius: 12px; background: var(--card); }
.cd-mini b { font: 700 1.5rem/1 var(--f-mono); color: var(--accent); }
.cd-mini small { font-size: .7rem; color: var(--muted); }
.choose { font-size: 1.6rem; margin-bottom: 1rem; }
.sides { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .sides { grid-template-columns: 1fr 1fr; } }
.side-card {
  position: relative; display: flex; gap: 14px; align-items: center; text-align: left; padding: 18px; border-radius: 20px;
  border: 1px solid var(--card-line); background: var(--card); overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.side-card::before { content: ""; position: absolute; inset: 0; opacity: .18; pointer-events: none; transition: opacity .25s; }
.side-card.groom::before { background: linear-gradient(rgba(61, 214, 208, .5) 1px, transparent 1px) 0 0/16px 16px, linear-gradient(90deg, rgba(61, 214, 208, .5) 1px, transparent 1px) 0 0/16px 16px; }
.side-card.bride::before { background: repeating-linear-gradient(135deg, rgba(232, 93, 154, .6) 0 6px, transparent 6px 14px); }
.side-card:hover, .side-card:focus-visible { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(0, 0, 0, .35); border-color: var(--gold); }
.side-card:hover::before { opacity: .32; }
.sc-icon { flex: 0 0 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .2); }
.sc-icon svg { width: 52px; height: 52px; }
.side-card.groom .sc-icon { color: #3dd6d0; }
.side-card.groom .sc-icon svg { animation: spin 10s linear infinite; }
.side-card.bride .sc-icon { color: #ff8fab; }
.sc-text { display: grid; gap: 2px; }
.sc-text b { font-family: var(--f-display); font-size: 1.45rem; }
.sc-text small { color: var(--muted); font-size: .82rem; }
.sc-text i { font-style: normal; font-family: var(--f-mono); font-size: .78rem; color: var(--accent); margin-top: 4px; }

/* ================= Boot overlay ================= */
.boot { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; transition: opacity .5s; }
.boot.out { opacity: 0; pointer-events: none; }
.boot-groom { background: #04101a; color: #3dd6d0; }
.boot-bride { background: #2a0716; color: #ffd1e1; }
.boot-box { width: min(640px, 100%); }
.boot-art { width: 72px; height: 72px; margin-bottom: 16px; }
.boot-art svg { width: 100%; height: 100%; animation: spin 4s linear infinite; }
.boot-bride .boot-art svg { animation: pulse 1.4s ease-in-out infinite; }
.boot pre { font: 400 clamp(.72rem, 3.2vw, .95rem)/1.8 var(--f-mono); white-space: pre-wrap; margin: 0 0 16px; min-height: 11em; }
.boot pre::after { content: "▍"; animation: blink 1s steps(1) infinite; }
.boot .pill { background: transparent; color: inherit; border-color: currentColor; }

/* ================= Hero ================= */
.hero { position: relative; padding: 108px 16px 32px; text-align: center; overflow: hidden; }
.hero-in { position: relative; z-index: 3; max-width: 860px; margin: 0 auto; }
.phase { display: inline-block; font-size: .78rem; text-transform: uppercase; color: var(--btn-ink); background: var(--accent); padding: 4px 12px; border-radius: 99px; margin: 0 0 .6rem; }
.hero .names { font-size: clamp(2.8rem, 12vw, 5.6rem); }
.hero .names span { color: var(--ink); }
.hero-art { margin: 0 auto 6px; max-width: 560px; }
.gears-hero { width: 100%; height: auto; overflow: visible; }
.gears-hero .gear { animation: spin 18s linear infinite; transform-box: view-box; }
.gears-hero .g2 { animation-direction: reverse; }
.gear-body { fill: rgba(255, 159, 28, .1); stroke: var(--accent); stroke-width: 2; }
.gear-ring, .gear-hole { fill: none; stroke: var(--accent2); stroke-width: 1.5; opacity: .7; }
.gear-hub { fill: var(--bg2); stroke: var(--gold); stroke-width: 2; }
.gear-letter { font: 700 30px var(--f-display); fill: var(--gold); }
.hud { fill: none; stroke: var(--accent2); stroke-width: 1; opacity: .5; stroke-dasharray: 2 6; }
.hud text { fill: var(--accent2); stroke: none; font: 11px var(--f-mono); }
.helix-wrap { width: 100%; }
.helix { width: 100%; height: auto; display: block; }
.helix .strand { fill: none; stroke-width: 3; stroke-linecap: round; }
.helix .s1 { stroke: #ffb703; } .helix .s2 { stroke: #e85d9a; }
.helix .rung { stroke-width: 2.4; stroke-linecap: round; }
.helix .rung.at { stroke: #0f7b6c; } .helix .rung.gc { stroke: #7b2cbf; }
.helix .b1 { fill: #fb8500; } .helix .b2 { fill: #c2185b; }
.cd-title { font-size: .8rem; text-transform: uppercase; color: var(--muted); margin: .4rem 0 .6rem; }

/* Countdown rings */
.cd { display: flex; justify-content: center; gap: clamp(6px, 2.5vw, 18px); }
.cd-unit { position: relative; width: clamp(68px, 20vw, 104px); aspect-ratio: 1; display: grid; place-content: center; text-align: center; }
.cd-unit svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cd-track { fill: none; stroke: var(--line); stroke-width: 4; }
.cd-arc { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .6s; }
.cd-tick { stroke: var(--accent2); stroke-width: 1.5; }
.cd-petal { fill: var(--accent2); opacity: .5; }
.cd-unit b { font: 700 clamp(1.3rem, 5.5vw, 2rem)/1 var(--f-mono); position: relative; }
.cd-unit small { position: relative; font-size: .68rem; color: var(--muted); text-transform: uppercase; }

/* ================= Sections ================= */
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.sec { padding: 48px 0 8px; scroll-margin-top: 64px; }
.sec-h { margin-bottom: 18px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.sec-h h2 { font-size: clamp(1.9rem, 6vw, 2.6rem); }
.kicker { font-size: .74rem; color: var(--accent); text-transform: uppercase; }
.sub { color: var(--muted); margin: -6px 0 18px; }
.card { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 20px; backdrop-filter: blur(6px); }
body[data-side="groom"] .card { clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); border-radius: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px; border: 1px solid var(--accent); text-decoration: none; font-weight: 600; font-size: .95rem; min-height: 46px; }
.btn.primary, button.primary { background: var(--accent); color: var(--btn-ink); border-color: var(--accent); }
.btn.ghost, button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--card-line); }
button.link { background: none; border: 0; color: var(--accent); text-decoration: underline; padding: 8px 0; }
.note { font-size: .88rem; color: var(--muted); border-left: 3px solid var(--accent); padding: 4px 10px; margin: 0 0 16px; }
.small-h { font-size: 1.4rem; margin: 24px 0 8px; }

/* Invitation card */
.invite-card { position: relative; text-align: center; padding: 36px 22px; font-size: 1.12rem; }
.ic-body { font-family: var(--f-display); font-size: 1.32em; line-height: 1.5; margin: 0 0 1rem; }
.ic-body b { color: var(--accent); }
.ic-presence { font-style: italic; color: var(--muted); }
.ic-from { font-family: var(--f-display); font-weight: 600; margin: 1rem 0 0; }
.ic-corner { position: absolute; width: 34px; height: 34px; border: 2px solid var(--gold); }
.ic-corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.ic-corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.ic-corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.ic-corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
body[data-side="bride"] .ic-corner { border-radius: 50% 0 0 0; }
body[data-side="bride"] .ic-corner.tr { border-radius: 0 50% 0 0; }
body[data-side="bride"] .ic-corner.bl { border-radius: 0 0 0 50%; }
body[data-side="bride"] .ic-corner.br { border-radius: 0 0 50% 0; }

/* Today capsule */
.today { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 720px) { .today { grid-template-columns: minmax(240px, 340px) 1fr; } }
.today-photo { max-width: min(340px, 72vw); margin: 0 auto; width: 100%; }
.arch-frame { width: 100%; height: auto; display: block; overflow: visible; }
.arch-line { fill: none; stroke: var(--daily); stroke-width: 3; }
.arch-line.thin { stroke: var(--gold); stroke-width: 1; opacity: .7; }
.ph-bg { fill: var(--bg2); }
.ph-art { color: var(--daily); opacity: .6; }
.ph-soon { fill: var(--muted); font: 10px var(--f-body); }
.hud-overlay { fill: none; stroke: var(--accent2); stroke-width: 2; }
.hud-overlay text, .lab-overlay text { fill: #fff; stroke: none; font: 8px var(--f-mono); paint-order: stroke; }
.hud-overlay .rec { fill: #ff3b3b; stroke: none; animation: blink 1.2s steps(1) infinite; }
.lab-overlay path { stroke: var(--accent); stroke-width: 2; }
.lab-overlay text { fill: var(--accent); }
.ph-cap { text-align: center; color: var(--muted); font-style: italic; margin: 8px 0 0; }
.today-info { display: grid; gap: 14px; }
.daily-chip { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.daily-chip span { width: 16px; height: 16px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 3px var(--card); }
.fact { border-left: 4px solid var(--daily); }
.fact p { margin: 6px 0 0; font-size: 1.08rem; }

/* Events timeline */
.ev-day { margin-bottom: 20px; }
.ev-date { font-size: 1.5rem; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; }
.ev-date::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 27px; top: 12px; bottom: 12px; width: 2px; background: repeating-linear-gradient(var(--accent) 0 6px, transparent 6px 12px); opacity: .5; }
body[data-side="bride"] .timeline::before { background: linear-gradient(var(--accent), var(--accent2)); opacity: .3; }
.ev { display: grid; grid-template-columns: 48px 1fr; gap: 14px; padding: 10px 0; position: relative; }
.ev-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--bg2); border: 2px solid var(--accent); color: var(--accent); position: relative; z-index: 1; }
body[data-side="groom"] .ev-ic { border-radius: 10px; transform: rotate(45deg); }
body[data-side="groom"] .ev-ic svg { transform: rotate(-45deg); }
.ev-icon { width: 30px; height: 30px; }
.ev-time { font-size: .78rem; color: var(--accent); }
.ev-body h4 { font-size: 1.35rem; margin: 2px 0 4px; }
.ev-body p { margin: 0; color: var(--muted); }
.ev-note { margin-top: 6px !important; color: var(--ink) !important; font-size: .92rem; background: var(--card); border: 1px dashed var(--card-line); border-radius: 10px; padding: 6px 10px; }

/* Culture bridge */
.bridge-h { display: grid; grid-template-columns: 1fr 40px 1fr; text-align: center; font-family: var(--f-mono); font-size: .78rem; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.pair { display: grid; grid-template-columns: 1fr 40px 1fr; align-items: stretch; margin-bottom: 10px; }
.pc { background: var(--card); border: 1px solid var(--card-line); padding: 12px; border-radius: 12px; }
.pc h4 { font-size: 1.15rem; margin-bottom: 4px; }
.pc p { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.5; }
.pc.gj { border-top: 3px solid #ff9f1c; } .pc.rj { border-top: 3px solid #e85d9a; }
.pair-link { display: grid; place-items: center; }
.pair-link svg { width: 40px; height: 40px; fill: none; stroke: var(--accent); stroke-width: 2; }
@media (max-width: 520px) {
  .bridge-h, .pair { grid-template-columns: 1fr 22px 1fr; }
  .pair-link svg { width: 22px; }
  .pc { padding: 10px 8px; }
  .pc h4 { font-size: 1rem; }
  .pc p { font-size: .8rem; }
}

/* Puzzle */
.pz-wrap { max-width: 560px; margin: 0 auto; }
.pz-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.pz-arm { width: 96px; flex: 0 0 96px; }
.robot-arm { width: 100%; height: auto; }
.arm-base { fill: var(--bg2); stroke: var(--accent2); stroke-width: 2; }
.arm-link { fill: var(--accent); }
.arm-joint { fill: var(--bg); stroke: var(--gold); stroke-width: 3; }
.arm-grip { stroke: var(--accent2); stroke-width: 4; stroke-linecap: round; }
.arm-shoulder { transform-box: view-box; animation: shoulder 4s ease-in-out infinite; }
.arm-elbow { transform-box: view-box; animation: elbow 4s ease-in-out infinite; }
.pz-title h3 { font-size: 1.6rem; }
.pz-title .mono { font-size: .78rem; color: var(--muted); }
.pz-how { color: var(--muted); margin: 4px 0 12px; }
.pz-board { background: var(--card); border: 1px solid var(--card-line); border-radius: 14px; padding: 8px; }
.pz-board svg { width: 100%; height: auto; display: block; max-height: 60vh; }
.cell { fill: var(--bg2); stroke: var(--line); stroke-width: .3; }
.trail { fill: none; stroke: var(--accent2); stroke-width: .8; stroke-dasharray: 1.2 1.2; opacity: .8; }
.bot { transition: transform .28s ease-in-out; }
.sp-robot rect { fill: var(--accent2); }
.sp-robot .eye { fill: var(--bg); }
.sp-robot path { stroke: var(--accent2); }
.sp-robot .ant { fill: #ff3b3b; }
.sp-robot .garland { fill: none; stroke: #ffb703; stroke-width: 1.1; stroke-dasharray: .9 .5; }
.sp-diya path { fill: #b5651d; }
.sp-diya .flame, .sp-mandap .flame { fill: #ffb703; animation: flicker 1.2s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
.sp-mandap path:first-child { fill: none; stroke: var(--gold); stroke-width: .6; }
.sp-mandap path:first-child + path { fill: none; }
.pz.crash .pz-board { animation: shake .35s; border-color: #ff3b3b; }
.pz-prog { display: flex; align-items: center; gap: 8px; margin: 10px 0; min-height: 40px; flex-wrap: wrap; }
.pz-prog .mono { font-size: .78rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.chip { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--card-line); background: var(--card); font-weight: 700; padding: 0; }
.chip.on { background: var(--accent); color: var(--btn-ink); }
.pz-pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pz-pad button { min-height: 52px; font-size: 1.4rem; border-radius: 12px; border: 1px solid var(--card-line); background: var(--card); }
.pz-pad button:active { transform: scale(.95); }
.pz-actions { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; margin-top: 8px; }
.pz-actions button { min-height: 46px; border-radius: 12px; font-weight: 600; }
.pz.running button { opacity: .5; pointer-events: none; }
.pz-msg { min-height: 1.6em; margin: 12px 0 0; text-align: center; }
.pz-msg.ok { color: var(--accent2); }
.pz-msg.bad { color: #ff5d5d; }
body[data-side="bride"] .pz-msg.bad { color: #c1121f; }
.stars { color: #ffb703; letter-spacing: 2px; }
.solved-note { font-size: .88rem; color: var(--ink); }
.pz-foot { text-align: center; }
.archive { margin-top: 10px; text-align: center; }
.archive p { font-size: .85rem; margin: 6px 0; }
.arch-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.arch-chips button { min-width: 38px; height: 32px; border-radius: 8px; border: 1px solid var(--card-line); background: var(--card); font: 400 .78rem var(--f-mono); padding: 0 6px; }
.arch-chips button.done { border-color: var(--accent2); color: var(--accent2); }
.arch-chips button.on { background: var(--accent); color: var(--btn-ink); }

/* DNA puzzle */
.dna-board { background: var(--card); border: 1px solid var(--card-line); border-radius: 14px; padding: 8px 4px; overflow-x: auto; }
.dna-board svg { width: 100%; min-width: 300px; height: auto; display: block; }
.backbone { stroke: var(--muted); stroke-width: 3; opacity: .4; }
.nt circle { fill: var(--bg2); stroke: var(--muted); stroke-width: 2; }
.nt text { font: 700 13px var(--f-mono); text-anchor: middle; dominant-baseline: central; fill: var(--ink); }
.nt.base-A circle { fill: #2a9d8f; stroke: #2a9d8f; } .nt.base-T circle { fill: #e76f51; stroke: #e76f51; }
.nt.base-G circle { fill: #7b2cbf; stroke: #7b2cbf; } .nt.base-C circle { fill: #e9a400; stroke: #e9a400; }
.nt[class*="base-"] text { fill: #fff; }
.slot { cursor: pointer; }
.slot.cur circle { stroke: var(--accent); stroke-width: 3; stroke-dasharray: 4 3; animation: spin 6s linear infinite; transform-box: fill-box; transform-origin: center; }
.slot.bad circle { stroke: #ff3b3b; stroke-width: 3; }
.hbond { stroke: var(--muted); stroke-width: 1.6; stroke-dasharray: 3 3; }
.hbond.bad { stroke: #ff3b3b; }
.hbond.glow { stroke: var(--accent); stroke-dasharray: none; }
.dna-pad { grid-template-columns: repeat(5, 1fr); }
.dna-pad button { font: 700 1.2rem var(--f-mono); color: #fff; border: 0; }
.dna-pad .base-A { background: #2a9d8f; } .dna-pad .base-T { background: #e76f51; }
.dna-pad .base-G { background: #7b2cbf; } .dna-pad .base-C { background: #e9a400; }
.dna-pad .ghost { color: var(--ink); border: 1px solid var(--card-line); background: var(--card); }

/* Mosaic + tug */
.mosaic-wrap { margin-top: 24px; text-align: center; }
.mosaic-wrap h3 { font-size: 1.6rem; }
.mosaic { max-width: 420px; margin: 12px auto 0; border-radius: 14px; overflow: hidden; border: 2px solid var(--gold); }
.mosaic svg { width: 100%; height: auto; display: block; }
.tile rect { fill: var(--bg2); stroke: var(--card-line); stroke-width: 1; }
body[data-side="groom"] .tile rect { fill: #0e2a40; }
body[data-side="bride"] .tile rect { fill: #f7c6d6; }
.tile text { fill: var(--accent); font-size: 18px; opacity: .6; }
.tile.flip { animation: flipout 1.4s .3s forwards; transform-box: fill-box; transform-origin: center; }
.tug { margin-top: 16px; text-align: center; }
.tug h3 { font-size: 1.4rem; }
.tug-bar { display: flex; height: 38px; border-radius: 99px; overflow: hidden; margin-top: 10px; font: 700 .78rem var(--f-mono); }
.tug-g { background: linear-gradient(90deg, #0b2236, #1d6f8a); color: #fff; display: flex; align-items: center; padding-left: 12px; min-width: 25%; transition: width 1s; white-space: nowrap; }
.tug-b { flex: 1; background: linear-gradient(90deg, #e85d9a, #c2185b); color: #fff; display: flex; align-items: center; justify-content: flex-end; padding-right: 12px; min-width: 25%; white-space: nowrap; }

/* Venue */
.venue { padding: 0; overflow: hidden; }
.venue-sky { height: 160px; color: var(--accent); }
.skyline { width: 100%; height: 100%; display: block; }
.sky-sun { fill: var(--daily); opacity: .85; }
.sky-hill2 { fill: var(--accent2); opacity: .18; }
.sky-hill1 { fill: var(--accent2); opacity: .3; }
.sky-palace { fill: var(--gold); opacity: .9; }
.sky-palace path[stroke] { fill: none; }
.sky-win { fill: var(--bg); opacity: .5; }
.sky-lake { fill: var(--accent2); opacity: .25; }
.sky-ripple { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; opacity: .3; }
.venue-body { padding: 18px 20px 22px; }
.venue-body h3 { font-size: 1.7rem; }
.venue-body p { margin: 6px 0; }
.coords { font-size: .8rem; color: var(--accent); }
.dist { color: var(--muted); }
.travel { padding-left: 1.2em; margin: 0; }
.travel li { margin-bottom: 6px; }
.travel li::marker { content: "✦  "; color: var(--accent); }

/* RSVP */
.rsvp { display: grid; gap: 14px; max-width: 560px; }
.rsvp label { display: grid; gap: 4px; font-size: .9rem; color: var(--muted); }
.rsvp input:not([type=radio]):not([type=checkbox]), .rsvp textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--card-line); border-radius: 10px; padding: 12px; font-size: 16px; width: 100%;
}
.rsvp fieldset { border: 1px solid var(--card-line); border-radius: 10px; padding: 8px 12px 12px; margin: 0; }
.rsvp legend { font-size: .9rem; color: var(--muted); padding: 0 4px; }
.rsvp .chk { display: flex; align-items: center; gap: 8px; color: var(--ink); padding: 4px 0; }
.rsvp .chk input { width: 20px; height: 20px; accent-color: var(--accent); }
.if-yes { display: grid; gap: 14px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { display: block; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 12px 8px; border-radius: 10px; border: 1px solid var(--card-line); color: var(--ink); font-weight: 600; }
.seg input:checked + span { background: var(--accent); color: var(--btn-ink); border-color: var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.rsvp-err { color: #ff5d5d; margin: 0; }
.rsvp-done p { font-family: var(--f-display); font-size: 1.4rem; margin: 0; text-align: center; }

/* Footer */
.foot { margin-top: 56px; position: relative; text-align: center; }
.foot-sky { height: 180px; color: var(--accent); }
.foot-in { background: var(--bg2); padding: 20px 16px calc(28px + env(safe-area-inset-bottom)); }
.foot-in p { color: var(--muted); font-size: .88rem; margin: 12px 0 0; }

/* Petals & toast */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 120; overflow: hidden; }
.petals i { position: absolute; top: -20px; width: 12px; height: 16px; border-radius: 50% 50% 50% 0; animation: fall linear forwards; opacity: .9; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 130; background: var(--accent); color: var(--btn-ink); padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); transition: opacity .5s; max-width: calc(100% - 32px); text-align: center; }
.toast.out { opacity: 0; }

/* ================= Animations ================= */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { transform: scale(1.12); } }
@keyframes flicker { from { transform: scaleY(1); } to { transform: scaleY(1.25) skewX(4deg); } }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes shoulder { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(10deg); } }
@keyframes elbow { 0%, 100% { transform: rotate(16deg); } 50% { transform: rotate(-18deg); } }
@keyframes flipout { 0% { opacity: 1; transform: scale(1); } 60% { transform: scale(1.15) rotate(8deg); } 100% { opacity: 0; transform: scale(.2) rotate(30deg); } }
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
