/* ---------- Token tema ---------- */
:root, [data-theme="editorial"] {
  --bg: #FAF8F3; --bg2: #EFEBE1; --ink: #1E2622; --muted: #5C655E; --accent: #2F4A3C;
  --on-accent: #FAF8F3; --line: #D8D3C5; --gold: #2F4A3C;
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 0; --display-weight: 300;
  --ornament: none;
}
[data-theme="javanese"] {
  --bg: #F2E5CC; --bg2: #E3CFA6; --ink: #3A2415; --muted: #6B4F36; --accent: #8E5F17;
  --on-accent: #FFF6E0; --line: #CDB487; --gold: #B8893A;
  --font-display: 'Marcellus', Georgia, serif;
  --font-body: 'Lora', Georgia, serif;
  --radius: 2px; --display-weight: 400;
  --ornament: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48' fill='none' stroke='%238E5F17' stroke-opacity='.2' stroke-width='1'%3E%3Cellipse cx='24' cy='12' rx='6' ry='12'/%3E%3Cellipse cx='24' cy='36' rx='6' ry='12'/%3E%3Cellipse cx='12' cy='24' rx='12' ry='6'/%3E%3Cellipse cx='36' cy='24' rx='12' ry='6'/%3E%3C/svg%3E");
}
[data-theme="modern-dark"] {
  --bg: #17181B; --bg2: #0F1012; --ink: #ECE7DF; --muted: #A5A097; --accent: #D2AE92;
  --on-accent: #17181B; --line: #34363B; --gold: #D2AE92;
  --font-display: 'Bodoni Moda', Georgia, serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 999px; --display-weight: 400;
  --ornament: none;
}

/* ---------- Dasar ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg2); color: var(--ink);
  font: 400 1rem/1.65 var(--font-body);
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p, blockquote, ul { margin: 0; padding: 0; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-copy { position: fixed; left: -9999px; top: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.9rem; padding: .65rem 1.5rem; border: 1px solid var(--accent);
  background: var(--accent); color: var(--on-accent); border-radius: var(--radius);
  font: 500 .95rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, opacity .2s;
}
.btn:hover { opacity: .88; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: var(--on-accent); opacity: 1; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1.5rem; }

/* ---------- Halaman status ---------- */
.state {
  min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 2rem 1.5rem; text-align: center; background: var(--bg);
}
.state__title { font: var(--display-weight) 2rem/1.2 var(--font-display); max-width: 20ch; }
.state__text { max-width: 34ch; color: var(--muted); }
.state__brand { margin-top: 1.5rem; font-size: .85rem; color: var(--muted); text-decoration: none; }

/* ---------- Cover ---------- */
.cover {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  background: var(--bg) var(--ornament); color: var(--ink);
  transition: transform .9s cubic-bezier(.7, 0, .2, 1);
}
.cover.is-open { transform: translateY(-100%); }
.cover__photo { position: relative; flex: 1 1 52%; min-height: 0; overflow: hidden; }
.cover__photo img { width: 100%; height: 100%; object-fit: cover; }
.cover__body {
  padding: 1.5rem 1.5rem calc(1.75rem + env(safe-area-inset-bottom)); text-align: center;
  max-width: 32rem; width: 100%; margin: 0 auto;
}
.cover__lead { font-size: .9rem; color: var(--muted); }
.cover__names {
  font: var(--display-weight) clamp(2.5rem, 12vw, 3.8rem)/1.02 var(--font-display);
  margin: .3rem 0 .5rem; overflow-wrap: anywhere;
}
.cover__date { color: var(--muted); margin-bottom: 1.1rem; }
.cover__guest-label { font-size: .9rem; color: var(--muted); }
.cover__guest { font: 400 1.4rem/1.3 var(--font-display); margin: .1rem 0 1.25rem; overflow-wrap: anywhere; }

/* Javanese: foto dalam lengkung, bingkai emas */
[data-theme="javanese"] .cover { align-items: center; }
[data-theme="javanese"] .cover__photo {
  flex: 0 1 auto; width: min(68vw, 17rem); height: min(42dvh, 21rem); margin: 2rem auto 0;
  border: 2px solid var(--gold); border-radius: 999px 999px 0 0; padding: 6px;
}
[data-theme="javanese"] .cover__photo img { border-radius: 999px 999px 0 0; }

/* Modern-dark: foto penuh, teks menimpa gradien */
[data-theme="modern-dark"] .cover { justify-content: flex-end; }
[data-theme="modern-dark"] .cover__photo { position: absolute; inset: 0; flex: none; }
[data-theme="modern-dark"] .cover__photo img { filter: brightness(.72); }
[data-theme="modern-dark"] .cover__body {
  position: relative; max-width: none; padding-top: 7rem;
  background: linear-gradient(to bottom, rgba(23, 24, 27, 0), var(--bg) 62%);
}

/* ---------- Halaman ---------- */
.page { max-width: 32rem; margin: 0 auto; background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
.section { padding: 4.5rem 1.5rem; text-align: center; background-image: var(--ornament); }
.section + .section { border-top: 1px solid var(--line); }
.h2 { font: var(--display-weight) 1.9rem/1.2 var(--font-display); margin-bottom: 1.5rem; }

.intro { padding-top: 5.5rem; }
.intro__names { font: var(--display-weight) clamp(2.6rem, 12vw, 3.6rem)/1.05 var(--font-display); overflow-wrap: anywhere; }
.intro__text { max-width: 30ch; margin: 1.25rem auto 0; color: var(--muted); }
.intro__date { margin-top: 1.25rem; font-weight: 500; }

.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.cd div { padding: 1rem .25rem; border: 1px solid var(--line); border-radius: var(--radius) ; }
[data-theme="modern-dark"] .cd div { border-radius: 1rem; }
.cd b { display: block; font: 400 2rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.cd span { font-size: .8rem; color: var(--muted); }
.cd-done { font: italic 400 1.3rem/1.4 var(--font-display); }

.person__name { font: var(--display-weight) 1.8rem/1.25 var(--font-display); }
.person__parents { color: var(--muted); margin-top: .35rem; max-width: 28ch; margin-inline: auto; }
.amp { font: italic 400 2.4rem/1 var(--font-display); color: var(--gold); margin: 1.25rem 0; }
.quote { margin-top: 2.5rem; font: italic 400 1.15rem/1.7 var(--font-display); color: var(--muted); max-width: 32ch; margin-inline: auto; }

.event-list { display: grid; gap: 1rem; }
.event { padding: 2rem 1.25rem; border: 1px solid var(--line); }
[data-theme="javanese"] .event { border-color: var(--gold); outline: 1px solid var(--line); outline-offset: 4px; }
[data-theme="modern-dark"] .event { border-radius: 1.25rem; }
.event__title { font: var(--display-weight) 1.5rem/1.2 var(--font-display); margin-bottom: .75rem; }
.event__date { font-weight: 600; }
.event__time { color: var(--muted); }
.event__venue { margin: .9rem auto 1.25rem; max-width: 26ch; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.gallery button { padding: 0; border: 0; background: var(--bg2); cursor: zoom-in; overflow: hidden; aspect-ratio: 3 / 4; border-radius: var(--radius); }
[data-theme="modern-dark"] .gallery button { border-radius: 1rem; }
.gallery button:nth-child(5n+1) { grid-column: span 2; aspect-ratio: 16 / 10; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

.gift__text { color: var(--muted); max-width: 32ch; margin: 0 auto 1.5rem; }
.gift__box { padding: 1.75rem 1.25rem; border: 1px solid var(--line); }
[data-theme="modern-dark"] .gift__box { border-radius: 1.25rem; }
.gift__bank { font-weight: 600; }
.gift__acc { font: 400 1.7rem/1.3 var(--font-display); letter-spacing: .04em; margin: .35rem 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.gift__holder { color: var(--muted); margin-bottom: 1.25rem; }

/* ---------- Form RSVP ---------- */
.form { text-align: left; display: grid; gap: 1.25rem; }
.field { display: grid; gap: .4rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field__label { font-size: .9rem; font-weight: 600; padding: 0; }
.field input[type="text"], .field select, .field textarea {
  width: 100%; padding: .8rem .9rem; background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: min(var(--radius), 12px);
  font: 400 1rem/1.4 var(--font-body);
}
.field textarea { resize: vertical; }
.field select option { color: #111; }
.field__hint { color: var(--muted); font-size: .8rem; text-align: right; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.seg label { display: block; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: flex; align-items: center; justify-content: center; min-height: 2.9rem; padding: .4rem;
  border: 1px solid var(--line); border-radius: min(var(--radius), 12px); font-size: .9rem; text-align: center; cursor: pointer;
}
.seg input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.ts-box { min-height: 65px; }
.form__status { min-height: 1.4em; font-size: .9rem; }
.form__status.is-error { color: #C0392B; }
[data-theme="modern-dark"] .form__status.is-error { color: #FF8F84; }
.form__status.is-ok { color: var(--accent); }

.wishes { margin-top: 3.5rem; text-align: left; }
.wishes__title { font: var(--display-weight) 1.4rem/1.2 var(--font-display); margin-bottom: 1rem; }
.wishes__empty { color: var(--muted); }
.wish { padding: 1rem 0; border-top: 1px solid var(--line); }
.wish__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; }
.wish__name { font-weight: 600; overflow-wrap: anywhere; }
.wish__meta { font-size: .8rem; color: var(--muted); }
.wish__msg { margin-top: .3rem; overflow-wrap: anywhere; white-space: pre-line; }
.wishes .btn { margin-top: 1rem; }

.footer { padding: 3rem 1.5rem calc(4rem + env(safe-area-inset-bottom)); text-align: center; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer a { display: inline-block; margin-top: .75rem; color: var(--accent); }

/* ---------- Musik, toast, lightbox ---------- */
.music-btn {
  position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 40;
  width: 2.9rem; height: 2.9rem; border-radius: 50%; border: 1px solid var(--accent);
  background: var(--bg); color: var(--accent); font-size: 1.2rem; cursor: pointer;
}
.music-btn[aria-pressed="false"] { opacity: .55; text-decoration: line-through; }
.toast {
  position: fixed; left: 50%; bottom: calc(5rem + env(safe-area-inset-bottom)); z-index: 90;
  transform: translate(-50%, 1rem); opacity: 0; pointer-events: none; max-width: calc(100vw - 2rem);
  padding: .7rem 1.1rem; background: var(--ink); color: var(--bg); font-size: .9rem;
  border-radius: min(var(--radius), 10px); transition: opacity .2s, transform .2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.lb { border: 0; padding: 0; background: transparent; color: #fff; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; }
.lb::backdrop { background: rgba(0, 0, 0, .9); }
.lb[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; padding: 1rem; }
.lb__img { max-width: 100%; max-height: 75dvh; object-fit: contain; }
.lb__cap { min-height: 1.4em; font-size: .9rem; text-align: center; }
.lb__nav { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.lb .btn--ghost { color: #fff; border-color: #fff; }
.lb .btn { background: #fff; color: #111; border-color: #fff; }
.lb .btn--ghost { background: transparent; color: #fff; }

/* ---------- Halaman /share ---------- */
body.share-page { background: var(--bg); }
.share { max-width: 46rem; margin: 0 auto; padding: 2.5rem 1.25rem 5rem; }
.share__title { font: var(--display-weight) 2rem/1.2 var(--font-display); }
.share__sub { color: var(--muted); margin: .4rem 0 2rem; }
.panel { display: grid; gap: 1.25rem; padding: 1.5rem; border: 1px solid var(--line); margin-bottom: 2rem; }
.panel textarea { width: 100%; padding: .8rem .9rem; background: transparent; color: var(--ink); border: 1px solid var(--line); font: 400 1rem/1.5 var(--font-body); resize: vertical; }
.panel .seg { grid-template-columns: repeat(3, 1fr); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; align-items: center; margin-bottom: 1rem; font-size: .9rem; }
.toolbar label { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.cards { display: grid; gap: 1rem; }
.gcard { border: 1px solid var(--line); padding: 1.1rem; display: grid; gap: .7rem; }
.gcard.is-sent { opacity: .6; }
.gcard__name { font: 400 1.25rem/1.3 var(--font-display); overflow-wrap: anywhere; }
.gcard__msg { white-space: pre-wrap; font-size: .9rem; color: var(--muted); max-height: 9.5rem; overflow: auto; padding: .7rem; background: var(--bg2); }
.gcard__link { font-size: .85rem; overflow-wrap: anywhere; color: var(--accent); }
.gcard__btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.gcard__btns .btn { min-height: 2.6rem; padding: .5rem 1rem; font-size: .9rem; }
.gcard__sent { display: flex; align-items: center; gap: .5rem; font-size: .9rem; cursor: pointer; }

@media (min-width: 40rem) { .section { padding-inline: 2.5rem; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; animation: none !important; }
}

/* ---------- Softer editorial direction ---------- */
:root, [data-theme="editorial"] {
  --bg: #FBF6F0; --bg2: #F1E8DF; --ink: #342A28; --muted: #796A61;
  --accent: #98675E; --on-accent: #FFF9F4; --line: #E8D9CD; --gold: #B98D69;
  --radius: 22px; --display-weight: 400;
}
[data-theme="javanese"] { --radius: 20px; }
[data-theme="modern-dark"] { --radius: 22px; }
body { background: radial-gradient(ellipse at 50% 0, #fffaf5 0, var(--bg2) 58%); }
.page { max-width: 36rem; box-shadow: 0 22px 80px rgba(66, 43, 33, .09); }
.cover { background-color: var(--bg); }
.cover__photo { flex-basis: 58%; }
.cover__photo img { transform: scale(1.015); }
.cover__body {
  position: relative; z-index: 1; margin-top: -1.75rem; padding-top: 1.8rem;
  border-radius: 30px 30px 0 0; background-color: var(--bg);
}
.cover__lead, .cover__guest-label { letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; }
.cover__names { margin: .55rem 0 .7rem; }
.cover__guest { font-size: 1.55rem; }
.btn { box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 20%, transparent); }
.btn--ghost { box-shadow: none; }
.page .section { position: relative; border: 0; padding-block: 4rem; }
.page .section + .section { border: 0; }
.page .section:nth-child(odd) { background-color: color-mix(in srgb, var(--bg2) 42%, var(--bg)); }
.h2 { margin-bottom: 1.65rem; font-size: 2.15rem; }
.intro { padding-top: 5rem !important; }
.intro__names { color: var(--accent); }
.intro__text { max-width: 32ch; line-height: 1.85; }
.intro__date { display: inline-block; padding: .55rem 1.1rem; border-radius: 999px; background: var(--bg2); color: var(--accent); }
.opening-block { max-width: 45ch; margin: 0 auto 2.8rem; }
.intro__opening { white-space: pre-line; font: 400 1.02rem/1.8 var(--font-body); color: var(--ink); }
.intro__verse { position: relative; margin: 1.4rem 0 .55rem; padding: 1.1rem 1.25rem; border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); border-radius: 20px 20px 20px 5px; background: color-mix(in srgb, var(--bg2) 45%, var(--bg)); color: var(--ink); font: italic 1rem/1.8 var(--font-display); }
.intro__reference { display: block; color: var(--muted); font: 500 .76rem/1.5 var(--font-body); letter-spacing: .06em; }
.cd div { background: color-mix(in srgb, var(--bg) 78%, transparent); border-radius: 18px; border-color: transparent; box-shadow: 0 5px 20px rgba(66,43,33,.05); }
.person { padding: .7rem 0; }
.person__name { font-size: 2rem; }
.amp { margin: .8rem 0; font-size: 2.8rem; }
.quote { max-width: 34ch; padding: 1.3rem 1.5rem; border-radius: 22px 22px 22px 6px; background: var(--bg2); color: var(--ink); }
.event-list { gap: 1.1rem; }
.event { padding: 2rem 1.5rem; border: 0; border-radius: 24px 24px 24px 6px; background: color-mix(in srgb, var(--bg2) 58%, var(--bg)); box-shadow: 0 10px 30px rgba(66,43,33,.055); }
.event__title { font-size: 1.7rem; color: var(--accent); }
.gallery { gap: .7rem; }
.gallery button { border-radius: 18px; box-shadow: 0 8px 22px rgba(45,30,24,.12); }
.gallery button:nth-child(3n+2) { transform: translateY(.65rem); }
.gift__box { border: 0; border-radius: 24px 24px 24px 6px; background: var(--bg2); }
.gift__acc { color: var(--accent); }
.field input[type="text"], .field select, .field textarea { border-radius: 14px; background: color-mix(in srgb, var(--bg) 80%, transparent); }
.seg span { border-radius: 999px; }
.seg input:checked + span { box-shadow: 0 5px 15px color-mix(in srgb, var(--accent) 22%, transparent); }
.wish { border-color: color-mix(in srgb, var(--line) 72%, transparent); }
.footer { border: 0; background: var(--bg2); }
.music-btn { box-shadow: 0 6px 20px rgba(0,0,0,.12); }

/* Jawa modern: aksen tradisi yang halus dengan layout kontemporer. */
[data-theme="javanese"] {
  --bg: #F8F2E7; --bg2: #EDE3D2; --ink: #332B24; --muted: #766957;
  --accent: #526451; --on-accent: #FBF7EF; --line: #DED0B8; --gold: #B58A4B;
  --font-display: 'Marcellus', Georgia, serif;
  --font-body: 'Lora', Georgia, serif;
  --ornament: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96' fill='none' stroke='%23B58A4B' stroke-opacity='.12' stroke-width='1'%3E%3Cpath d='M48 8C59 20 59 36 48 48C37 36 37 20 48 8Z'/%3E%3Cpath d='M48 48C59 60 59 76 48 88C37 76 37 60 48 48Z'/%3E%3Cpath d='M8 48C20 37 36 37 48 48C36 59 20 59 8 48Z'/%3E%3Cpath d='M48 48C60 37 76 37 88 48C76 59 60 59 48 48Z'/%3E%3C/svg%3E");
}
[data-theme="javanese"] .cover { background-image: var(--ornament); background-size: 96px; }
[data-theme="javanese"] .cover__photo {
  width: min(74vw, 20rem); height: min(45dvh, 22rem); margin: 1.5rem auto 0;
  padding: 5px; border: 1px solid var(--gold); border-radius: 48% 48% 24px 24px;
  box-shadow: 0 14px 36px rgba(58, 44, 25, .14);
}
[data-theme="javanese"] .cover__photo img { border-radius: 48% 48% 19px 19px; }
[data-theme="javanese"] .cover__body { background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg2) 38%, var(--bg))); }
[data-theme="javanese"] .event { background: color-mix(in srgb, var(--bg2) 54%, var(--bg)); outline: 0; }
[data-theme="javanese"] .footer { background: var(--bg2); }

.footer {
  position: relative; overflow: hidden; padding: 3.5rem 1.5rem calc(3.5rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg2) 55%, var(--bg)), var(--bg2));
}
.footer::before, .footer::after {
  content: ''; position: absolute; width: 9rem; height: 9rem; border: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
  border-radius: 50%; pointer-events: none;
}
.footer::before { left: -6rem; top: 1rem; }
.footer::after { right: -6rem; bottom: 1rem; }
.footer__flower { color: var(--gold); font-size: 1.15rem; margin-bottom: .8rem; }
.footer__thanks { max-width: 30ch; margin: 0 auto; color: var(--muted); font: italic 1.2rem/1.55 var(--font-display); }
.footer__brand {
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  margin: 1.4rem auto 0; padding: 1rem 1.5rem .25rem; text-align: center;
}
.footer__brand-name { color: var(--ink); font: 500 .95rem/1.2 var(--font-body); letter-spacing: .22em; text-decoration: none; }
.footer__promo { color: var(--muted); font-size: .76rem; letter-spacing: .1em; }
.footer__visit { max-width: 30ch; margin-top: .3rem; color: var(--accent); font-size: .7rem; line-height: 1.55; text-decoration: underline; text-underline-offset: 3px; }
.footer__visit b { display: inline-block; margin-left: .2rem; transition: transform .2s; }
.footer__brand:hover .footer__visit b { transform: translate(2px, -2px); }
.reveal-on-scroll { opacity: 0; transform: translateY(18px); transition: opacity .75s ease var(--reveal-delay, 0ms), transform .75s cubic-bezier(.2,.7,.2,1) var(--reveal-delay, 0ms); }
.reveal-on-scroll.is-revealed { opacity: 1; transform: none; }
@media (max-width: 380px) {
  .page .section { padding-inline: 1.15rem; }
  .cover__body { padding-inline: 1.2rem; }
  .seg { gap: .3rem; }
  .seg span { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll { opacity: 1; transform: none; }
}
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html[data-motion="off"] .reveal-on-scroll { opacity: 1; transform: none; }

/* Tema dibuat punya suasana dan komposisi yang berbeda, bukan sekadar palet warna. */
:root, [data-theme="editorial"] {
  --bg: #FCF8F5; --bg2: #F2E8E4; --ink: #342B2B; --muted: #76696A;
  --accent: #A76E72; --on-accent: #FFF9F6; --line: #E8D9D5; --gold: #B89479;
  --font-display: 'Newsreader', Georgia, serif;
  --font-body: 'Instrument Sans', system-ui, sans-serif;
}
[data-theme="javanese"] {
  --bg: #F8F2E7; --bg2: #EDE3D2; --ink: #332B24; --muted: #766957;
  --accent: #526451; --on-accent: #FBF7EF; --line: #DED0B8; --gold: #B58A4B;
  --font-display: 'Marcellus', Georgia, serif; --font-body: 'Lora', Georgia, serif;
}
[data-theme="modern-dark"] {
  --bg: #151719; --bg2: #202326; --ink: #F0EBE3; --muted: #B6B0A7;
  --accent: #D3B17D; --on-accent: #171819; --line: #393B3B; --gold: #D3B17D;
  --font-display: 'Bodoni Moda', Georgia, serif; --font-body: 'Manrope', system-ui, sans-serif;
}
body { background: var(--bg2); }
[data-theme="editorial"] body { background: radial-gradient(ellipse at 50% 0, #FFFDFC 0, #F0E6E2 72%); }
[data-theme="javanese"] body { background: radial-gradient(ellipse at 50% 0, #FBF7EF 0, #E9DECB 76%); }
[data-theme="modern-dark"] body { background: #101214; }
.page { background: var(--bg); }
[data-theme="editorial"] .cover__photo img { filter: saturate(.88); }
[data-theme="editorial"] .cover__body { max-width: 36rem; border-radius: 34px 34px 0 0; }
[data-theme="editorial"] .intro { padding-inline: 2.25rem; }
[data-theme="editorial"] .gallery button:nth-child(3n+2) { transform: translateY(.7rem) rotate(1deg); }
[data-theme="editorial"] .gallery button:nth-child(3n) { transform: translateY(-.2rem) rotate(-.7deg); }
[data-theme="javanese"] .cover__body { background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg2) 38%, var(--bg))); }
[data-theme="javanese"] .page .section { background-image: var(--ornament); background-size: 96px; }
[data-theme="javanese"] .h2 { position: relative; display: table; margin-inline: auto; padding-bottom: .7rem; }
[data-theme="javanese"] .h2::after { content: ''; position: absolute; left: 25%; right: 25%; bottom: 0; height: 1px; background: var(--gold); opacity: .7; }
[data-theme="javanese"] .event { border-left: 2px solid var(--gold); border-radius: 4px 22px 22px 4px; }
[data-theme="javanese"] .gallery button { border: 1px solid color-mix(in srgb, var(--gold) 50%, var(--line)); border-radius: 7rem 7rem 18px 18px; padding: 4px; }
[data-theme="javanese"] .gallery button img { border-radius: inherit; }
[data-theme="modern-dark"] .cover__body { max-width: none; margin-top: 0; padding-top: 8rem; border-radius: 0; background: linear-gradient(180deg, transparent 0%, rgba(21,23,25,.82) 44%, var(--bg) 100%); }
[data-theme="modern-dark"] .cover__photo img { filter: brightness(.55) saturate(.72); }
[data-theme="modern-dark"] .page { box-shadow: 0 0 70px rgba(0,0,0,.4); }
[data-theme="modern-dark"] .page .section:nth-child(odd) { background-color: #191C1E; }
[data-theme="modern-dark"] .intro__names, [data-theme="modern-dark"] .event__title { color: #E4C696; }
[data-theme="modern-dark"] .event { border: 1px solid #41403D; border-radius: 2px 28px 2px 28px; background: linear-gradient(135deg,#222527,#191B1D); }
[data-theme="modern-dark"] .gift__box, [data-theme="modern-dark"] .quote { background: #222527; border: 1px solid #393B3B; }
[data-theme="modern-dark"] .footer { background: #101214; }
[data-theme="modern-dark"] .cd div { background: #202326; border: 1px solid #393B3B; border-radius: 4px 18px; }
@media (max-width: 380px) {
  [data-theme="editorial"] .intro { padding-inline: 1.15rem; }
  [data-theme="modern-dark"] .cover__body { padding-top: 6rem; }
}
.person__photo{width:clamp(118px,38vw,168px);height:clamp(152px,48vw,210px);margin:0 auto 1.05rem;object-fit:cover;border:4px solid color-mix(in srgb,var(--gold) 54%,var(--bg));border-radius:48% 48% 22px 22px;box-shadow:0 12px 28px rgba(45,30,24,.12)}
[data-theme="javanese"] .person__photo{border-radius:48% 48% 22px 22px;border-width:2px;outline:1px solid var(--gold);outline-offset:4px}
[data-theme="modern-dark"] .person__photo{border-radius:48% 48% 20px 20px}
.story-list{position:relative;display:grid;gap:1rem;max-width:38rem;margin:0 auto;text-align:left}
.story-list:before{content:'';position:absolute;left:8px;top:18px;bottom:18px;width:1px;background:color-mix(in srgb,var(--gold) 52%,var(--line))}
.story-card{position:relative;margin-left:27px;padding:1.1rem 1.2rem;border-radius:20px 20px 20px 6px;background:color-mix(in srgb,var(--bg2) 60%,var(--bg));box-shadow:0 8px 24px rgba(45,30,24,.045)}
.story-card:before{content:'';position:absolute;left:-24px;top:22px;width:9px;height:9px;border:2px solid var(--gold);border-radius:50%;background:var(--bg)}
.story-card__photo{width:100%;max-height:250px;aspect-ratio:16/10;object-fit:cover;border-radius:14px;margin-bottom:.85rem}
.story-card__date{color:var(--accent);font:500 .72rem/1.5 var(--font-body);letter-spacing:.08em;text-transform:uppercase}
.story-card__title{margin:.22rem 0 .45rem;font:400 1.45rem/1.2 var(--font-display)}
.story-card__body{color:var(--muted);font-size:.92rem;line-height:1.7}
[data-theme="modern-dark"] .story-card{background:#212226}
[data-theme="javanese"] .story-card{background:color-mix(in srgb,var(--bg2) 60%,var(--bg))}
.gift__group + .gift__group{margin-top:2rem}.gift__group-title{font:400 1.4rem/1.2 var(--font-display);margin-bottom:.8rem;color:var(--accent)}.gift__accounts{display:grid;gap:.8rem}.gift__accounts .gift__box{margin:0}.gift__address{margin:.4rem auto 1rem;max-width:36ch;white-space:pre-line;line-height:1.65}
