/* =====================================================================
   Buku Harian Rafly & Tiya — style.css
   ===================================================================== */

:root {
  --paper: #FBF4E8;
  --paper-2: #FFFDF8;
  --dot: #E6D6BC;
  --ink: #3E322C;
  --muted: #6E5D53;
  --terra: #B94A34;
  --terra-d: #8E3624;
  --sage: #56645A;
  --sea: #2F6F73;
  --sea-l: #7EBFC3;
  --mustard: #E7B65C;
  --blush: #F3C7B6;
  --kraft: #E3D2B8;
  --line: #E3D3BA;
  --photo: #EADCC6;
  --tape-a: rgba(243, 214, 166, .85);
  --tape-b: rgba(184, 212, 200, .85);
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  --f-body: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sh-paper: 0 8px 18px rgba(62, 50, 44, .14);
  --sh-photo: 0 10px 22px rgba(62, 50, 44, .16);
  --paper-bg: var(--paper) radial-gradient(var(--dot) 1px, transparent 1.2px) 0 0 / 18px 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper-bg);
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px dashed var(--terra); outline-offset: 3px; }
main:focus { outline: none; }

.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Tipografi ---------- */
.display { font-family: var(--f-display); font-weight: 600; font-size: clamp(42px, 12vw, 52px); line-height: 1.12; }
.display em, .em { font-style: italic; font-weight: 500; color: var(--terra); }
.h2 { font-family: var(--f-display); font-weight: 600; font-size: 34px; line-height: 1.2; }
.h2 span {
  background: linear-gradient(transparent 58%, rgba(231, 182, 92, .55) 58%);
  padding: 0 6px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hand { font-family: var(--f-hand); font-weight: 700; font-size: 28px; line-height: 1.15; color: var(--terra); transform: rotate(-2deg); }
.hand--lg { font-size: 32px; }
.overline { font-size: 12px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: #85663D; }
.micro { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.normal { font-weight: 400; letter-spacing: 0; text-transform: none; }
.small { font-size: 13px; line-height: 1.55; }
.center { text-align: center; }
.lead { font-size: 16px; line-height: 1.65; }
.salam { font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: 24px; line-height: 1.3; }
.salam--sm { font-size: 19px; }
.pg {
  display: inline-block; align-self: center;
  padding: 4px 10px; border-radius: 4px;
  background: var(--ink); color: var(--paper);
  font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; line-height: 1.4;
}
.sec-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.sec-head .hand { margin-top: 6px; }
.sec-head .muted { margin-top: 6px; font-size: 15px; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px;
  border: 2px solid var(--ink); border-radius: 999px;
  font-family: var(--f-body); font-size: 15px; font-weight: 700; line-height: 1.2;
  text-decoration: none; text-align: center;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.btn--primary { background: var(--sage); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); box-shadow: 0 3px 0 var(--blush); }
.btn--ghost:active { box-shadow: 0 0 0 var(--blush); }
.btn--lg { min-height: 54px; padding: 0 32px; font-size: 16px; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 14px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; }
.round {
  width: 46px; height: 46px; flex: none; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--ink); border-radius: 50%;
  background: #fff; color: var(--ink); font-size: 22px; line-height: 1;
  box-shadow: 0 3px 0 var(--blush);
}
.round--fill { background: var(--sage); color: #fff; box-shadow: 0 3px 0 var(--ink); }
.round[disabled] { opacity: .35; cursor: not-allowed; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 16px;
  border: 2px solid var(--ink); border-radius: 999px; background: #fff;
  box-shadow: 0 3px 0 var(--blush);
  font-size: 14px; font-weight: 700; text-decoration: none;
}

/* ---------- Kertas, selotip, polaroid ---------- */
.tape { position: absolute; top: -11px; z-index: 2; width: 76px; height: 22px; background: var(--tape-a); pointer-events: none; }
.tape--l { left: 14px; transform: rotate(-12deg); }
.tape--r { right: 14px; transform: rotate(10deg); }
.tape--c { left: 50%; margin-left: -38px; transform: rotate(-3deg); }
.tape--mint { background: var(--tape-b); }

.polaroid { position: relative; margin: 0; padding: 10px 10px 6px; background: #fff; box-shadow: var(--sh-photo); }
.polaroid--l { transform: rotate(-3deg); }
.polaroid--r { transform: rotate(3deg); }
.polaroid__img { position: relative; aspect-ratio: 1 / 1; background: var(--photo); overflow: hidden; display: grid; place-items: center; }
.polaroid__img--portrait { aspect-ratio: 5 / 6; }
.polaroid__img img { width: 100%; height: 100%; object-fit: cover; }
.polaroid__cap { font-family: var(--f-hand); font-weight: 700; font-size: 24px; line-height: 1.3; text-align: center; color: var(--ink); padding-top: 2px; }
.ph { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--terra); text-align: center; }
.ph b { font-family: var(--f-hand); font-weight: 700; font-size: 46px; line-height: 1; }
.ph svg { width: 34px; height: 30px; }

.lined {
  position: relative; margin: 0;
  padding: 30px 22px 22px;
  background: var(--paper-2) repeating-linear-gradient(transparent 0 29px, #EFE3CF 29px 30px);
  box-shadow: var(--sh-paper);
  transform: rotate(1deg);
}
.quote { margin: 0; font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: 19px; line-height: 30px; }
.quote__src { margin-top: 12px; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--terra); }

.stamp {
  width: 84px; height: 84px; border-radius: 50%;
  border: 2px dashed var(--sage); color: var(--sage);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; line-height: 1.15; transform: rotate(10deg);
}
.stamp b { font-family: var(--f-display); font-weight: 600; font-size: 20px; }
.stamp span { font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.stamp small { font-size: 9px; font-weight: 700; letter-spacing: .2em; margin-top: 2px; }

/* ---------- COVER ---------- */
.cover {
  position: fixed; inset: 0; z-index: 50;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--paper-bg);
}
.cover__inner {
  position: relative;
  min-height: 100%;
  max-width: 1080px; margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(10px, 2.6vh, 26px);
}
.cover__photo { position: relative; width: 100%; max-width: 350px; display: flex; justify-content: center; padding-top: 52px; }
.cover__std { position: absolute; top: 6px; left: 0; font-size: 30px; transform: rotate(-7deg); }
.cover__stamp { position: absolute; top: -2px; right: 0; }
.cover__polaroid { width: min(230px, 62vw); transform: rotate(-3deg); }
.cover__polaroid .polaroid__img { aspect-ratio: auto; height: clamp(140px, 25vh, 230px); }
.cover__text { display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2.2vh, 20px); text-align: center; width: 100%; }
.cover__text .overline { margin-bottom: -6px; }
.cover__wave { position: absolute; right: 20px; bottom: 18px; fill: none; stroke: var(--sea-l); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }

.ticket { display: flex; width: 100%; max-width: 420px; filter: drop-shadow(0 8px 12px rgba(62, 50, 44, .16)); transform: rotate(-1deg); text-align: left; }
.ticket__main { flex: 1; min-width: 0; background: #fff; border-radius: 14px 0 0 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; }
.ticket__row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ticket__brand { font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--terra); }
.ticket__no { font-size: 10px; color: var(--muted); }
.ticket__guest { display: block; font-family: var(--f-display); font-weight: 600; font-size: 22px; line-height: 1.22; overflow-wrap: anywhere; }
.ticket__guest.is-long { font-size: 18px; }
.ticket__route { display: flex; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.ticket__route b, .ticket__meta b { display: block; font-family: var(--f-display); font-weight: 600; font-size: 16px; line-height: 1.3; }
.ticket__meta { display: flex; gap: 20px; }
.ticket__meta b { font-family: var(--f-body); font-weight: 700; font-size: 13px; }
.ticket__plane { fill: none; stroke: var(--terra); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ticket__stub {
  position: relative; width: 78px; flex: none;
  background: #fff; border-radius: 0 14px 14px 0; border-left: 2px dashed var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  transform-origin: 0 50%;
}
.ticket__stub::before, .ticket__stub::after { content: ""; position: absolute; left: -10px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); }
.ticket__stub::before { top: -9px; }
.ticket__stub::after { bottom: -9px; }
.ticket__seat { font-family: var(--f-hand); font-weight: 700; font-size: 17px; line-height: 1; color: var(--terra); text-align: center; }

/* animasi buka */
.cover { transition: transform .75s cubic-bezier(.7, 0, .3, 1) .45s, opacity .4s ease .9s; }
.cover .ticket__stub { transition: transform .55s cubic-bezier(.3, .7, .4, 1), opacity .45s ease .1s; }
.cover.is-opening .ticket__stub { transform: translate(46px, 70px) rotate(24deg); opacity: 0; }
.cover.is-opening { transform: translateY(-104%); }

@media (min-width: 900px) {
  .cover__inner { flex-direction: row; gap: 80px; padding: 48px 40px; }
  .cover__photo { max-width: 420px; padding-top: 70px; }
  .cover__polaroid { width: 320px; }
  .cover__polaroid .polaroid__img { height: min(340px, 46vh); }
  .cover__text { align-items: flex-start; text-align: left; max-width: 470px; }
  .cover__text .display { font-size: 76px; }
  .ticket__guest { font-size: 26px; }
}

/* ---------- Halaman / spread ---------- */
main { display: block; }
/* jaga agar dekorasi miring tidak membuat halaman bisa digeser ke samping */
main, .cover__inner { overflow-x: clip; }
.spread { position: relative; }
.page { position: relative; padding: 64px 20px; display: flex; flex-direction: column; gap: 28px; }
.page--center { align-items: center; text-align: center; }
.page + .page { padding-top: 24px; }

@media (min-width: 1024px) {
  body { background: var(--kraft); }
  body.locked { background: var(--paper-bg); }
  main { padding: 72px 24px 96px; display: flex; flex-direction: column; gap: 72px; }
  .spread {
    display: grid; grid-template-columns: 1fr 1fr;
    width: 100%; max-width: 1160px; margin: 0 auto;
    border-radius: 10px; overflow: hidden;
    box-shadow: 0 24px 50px rgba(62, 50, 44, .22);
  }
  .spread.single { grid-template-columns: 1fr; max-width: 640px; }
  .page, .page + .page { padding: 56px 48px; background: var(--paper-bg); }
  .spread:not(.single) > .page:first-child { box-shadow: inset -28px 0 32px -26px rgba(62, 50, 44, .28); }
  .spread:not(.single) > .page:last-child { box-shadow: inset 28px 0 32px -26px rgba(62, 50, 44, .28); }
  .h2 { font-size: 40px; }
  .page:not(.page--center) .sec-head { align-items: flex-start; text-align: left; }
  .page:not(.page--center) .sec-head .pg { align-self: flex-start; }
  .page:not(.page--center) > .pg { align-self: flex-start; }
}

/* ---------- Pembuka & countdown ---------- */
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 440px; }
.cal { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 12px rgba(62, 50, 44, .12); display: flex; flex-direction: column; align-items: center; }
.cal::before {
  content: ""; width: 100%; height: 16px; background-color: var(--c, var(--terra));
  background-image: radial-gradient(circle at 30% 50%, var(--paper) 3px, transparent 3.5px), radial-gradient(circle at 70% 50%, var(--paper) 3px, transparent 3.5px);
}
.cal b { font-family: var(--f-display); font-weight: 600; font-size: 30px; line-height: 42px; font-variant-numeric: tabular-nums; }
.cal span { padding-bottom: 10px; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cal:nth-child(1) { transform: rotate(-2deg); }
.cal:nth-child(2) { --c: var(--sage); transform: rotate(1.5deg); }
.cal:nth-child(3) { --c: var(--sea); transform: rotate(-1deg); }
.cal:nth-child(4) { --c: var(--mustard); transform: rotate(2deg); }
.countdown-done { max-width: 360px; font-size: 26px; }
.summary { font-size: 15px; font-weight: 700; }
@media (min-width: 1024px) {
  #pembuka .page--center { justify-content: center; }
  .cal b { font-size: 40px; line-height: 54px; }
}

/* ---------- Mempelai ---------- */
.person { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; width: 100%; }
.person__photo { width: 210px; }
.name-tape { display: inline-block; padding: 6px 14px; background: var(--tape-b); font-family: var(--f-display); font-weight: 600; font-size: 22px; line-height: 1.3; transform: rotate(1.5deg); }
.name-tape--alt { background: var(--tape-a); transform: rotate(-1.5deg); }
.parents { font-size: 15px; line-height: 1.6; color: var(--muted); }
.parents strong { color: var(--ink); }
.amp {
  width: 58px; height: 58px; flex: none;
  display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--blush);
  font-family: var(--f-hand); font-weight: 700; font-size: 36px; line-height: 1; color: var(--terra);
  transform: rotate(-8deg);
}
@media (min-width: 1024px) {
  .person__photo { width: 240px; }
  .name-tape { font-size: 26px; }
  #mempelai .page:last-child { justify-content: flex-end; }
  .amp { position: absolute; left: -29px; top: 140px; z-index: 3; }
}

/* ---------- Acara ---------- */
.evt { position: relative; display: flex; filter: drop-shadow(0 8px 12px rgba(62, 50, 44, .14)); transform: rotate(-1.5deg); text-align: left; }
.evt + .evt { transform: rotate(1deg); }
.evt__main { flex: 1; min-width: 0; background: #fff; border-radius: 14px 0 0 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.evt__title { font-family: var(--f-display); font-weight: 600; font-size: 28px; line-height: 1.15; }
.evt__when { font-size: 15px; line-height: 1.55; }
.evt__note { font-size: 14px; line-height: 1.6; color: var(--muted); }
.evt__stub { width: 56px; flex: none; background: #fff; border-radius: 0 14px 14px 0; border-left: 2px dashed var(--line); display: flex; align-items: center; justify-content: center; }
.evt__stub span { transform: rotate(90deg); white-space: nowrap; font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.evt__stub i { font-style: normal; }
.evt--main .evt__main, .evt--main .evt__stub { border-top: 6px solid var(--mustard); }
.evt--main .evt__stub span { color: var(--terra); }
.badge-stamp {
  position: absolute; top: -14px; right: 64px; z-index: 2;
  padding: 5px 10px; border: 2.5px solid var(--terra); border-radius: 6px;
  background: rgba(255, 255, 255, .85); color: var(--terra);
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  transform: rotate(-8deg);
}
.dress { padding: 16px 18px; background: #FFF1B8; box-shadow: var(--sh-paper); transform: rotate(-1deg); }
.mapcard { position: relative; width: 100%; max-width: 440px; margin: 0; padding: 12px 12px 10px; background: #fff; box-shadow: var(--sh-photo); transform: rotate(-1deg); }
.mapcard svg { display: block; width: 100%; height: auto; }
.mapcard__cap { margin-top: 6px; font-family: var(--f-hand); font-weight: 600; font-size: 17px; color: var(--muted); text-align: right; }
.venue { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.venue__name { font-family: var(--f-display); font-weight: 600; font-size: 24px; line-height: 1.25; }
.venue__city { font-size: 12px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--terra); }
.venue__addr { max-width: 400px; font-size: 14px; line-height: 1.6; }
.venue .btn { margin-top: 8px; }

/* ---------- Cerita ---------- */
.story { position: relative; list-style: none; margin: 0; padding: 8px 0 0; display: flex; flex-direction: column; gap: 22px; }
.story::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px dashed #CDB99B; }
.story__item { position: relative; width: 62%; padding: 8px 8px 10px; background: #fff; box-shadow: var(--sh-paper); display: flex; flex-direction: column; gap: 3px; }
.story__item:nth-child(odd) { margin-right: auto; transform: rotate(-3deg); }
.story__item:nth-child(even) { margin-left: auto; transform: rotate(3deg); }
.story__item::before { content: ""; position: absolute; top: -12px; left: 50%; margin-left: -5px; width: 10px; height: 26px; border-radius: 3px; background: #C99A5B; }
.story__img { aspect-ratio: 16 / 11; background: var(--photo); overflow: hidden; display: grid; place-items: center; margin-bottom: 4px; }
.story__img--heart { background: var(--blush); }
.story__img img { width: 100%; height: 100%; object-fit: cover; }
.story__date { font-family: var(--f-hand); font-weight: 700; font-size: 20px; line-height: 1.1; color: var(--terra); }
.story__title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.story__text { font-size: 13px; line-height: 1.5; color: var(--muted); }

/* ---------- Galeri ---------- */
.gallery { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.gallery__track {
  display: flex; gap: 18px; width: calc(100% + 40px); margin: 0 -20px;
  padding: 18px 20px 26px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain; outline-offset: -4px;
}
.gallery__track::-webkit-scrollbar { display: none; }
.g-item { flex: 0 0 78%; max-width: 320px; scroll-snap-align: center; margin: 0; padding: 10px 10px 6px; background: #fff; border: 0; box-shadow: var(--sh-photo); cursor: zoom-in; text-align: center; }
.g-item:nth-child(odd) { transform: rotate(-1.5deg); }
.g-item:nth-child(even) { transform: rotate(1.5deg); }
.g-item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--photo); }
.g-item .polaroid__cap { font-size: 20px; min-height: 1.3em; }
.gallery__nav { display: flex; align-items: center; gap: 16px; }
.gallery__count { min-width: 64px; text-align: center; font-size: 14px; font-weight: 700; color: var(--muted); }
.gallery__hint { font-size: 20px; color: var(--muted); transform: none; }
.gallery-empty { position: relative; margin: 10px auto 0; max-width: 300px; padding: 30px 22px; background: #fff; box-shadow: var(--sh-photo); transform: rotate(-2deg); text-align: center; }
@media (min-width: 1024px) {
  .gallery__track { width: calc(100% + 96px); margin: 0 -48px; padding: 18px 48px 26px; }
  .g-item { flex-basis: 58%; max-width: 290px; }
}

.lightbox { width: 100%; height: 100%; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); }
.lightbox::backdrop { background: rgba(30, 24, 20, .9); }
.lightbox__inner { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 64px 12px; }
.lightbox__frame { margin: 0; padding: 12px 12px 6px; background: #fff; max-width: min(92vw, 900px); }
.lightbox__frame img { max-width: 100%; max-height: calc(100vh - 190px); object-fit: contain; margin: 0 auto; }
.lightbox__close { position: absolute; top: 14px; right: 14px; }
.lightbox__prev, .lightbox__next { position: absolute; top: 50%; margin-top: -23px; z-index: 2; }
.lightbox__prev { left: 10px; }
.lightbox__next { right: 10px; }

/* ---------- Kartu balasan ---------- */
.postcard {
  position: relative;
  padding: 22px 20px 24px;
  background: var(--paper-2); border: 2px solid var(--ink); border-radius: 6px;
  box-shadow: 6px 6px 0 var(--blush);
  display: flex; flex-direction: column; gap: 18px; text-align: left;
}
.postcard__stamp {
  position: absolute; top: 14px; right: 14px;
  width: 62px; height: 74px; padding: 4px;
  border: 2px dashed var(--terra); background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transform: rotate(5deg);
  font-size: 8px; font-weight: 700; letter-spacing: .1em; color: var(--terra);
}
.postcard__mark { position: absolute; top: 58px; right: 58px; fill: none; stroke: #8A776B; stroke-width: 1.2; opacity: .55; pointer-events: none; }
.postcard__to { font-family: var(--f-hand); font-weight: 700; font-size: 24px; color: var(--terra); padding-right: 82px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field--narrow { padding-right: 70px; }
.field > label, .field legend, .field__label { display: block; padding: 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.field legend { margin-bottom: 6px; }
.line-input {
  width: 100%; height: 44px; padding: 0 2px;
  border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; background: transparent;
  font-family: var(--f-display); font-weight: 600; font-size: 20px; color: var(--ink);
}
.lined-input {
  width: 100%; min-height: 120px; padding: 6px 2px; resize: vertical;
  border: 0; border-radius: 0; background: transparent repeating-linear-gradient(transparent 0 29px, var(--line) 29px 30px);
  background-attachment: local;
  font-family: var(--f-body); font-size: 16px; line-height: 30px; color: var(--ink);
}
.line-input:focus, .lined-input:focus { outline: 2px dashed var(--terra); outline-offset: 4px; }
.line-input::placeholder, .lined-input::placeholder { color: #9A8A7F; }
.is-invalid { border-bottom-color: var(--terra) !important; }
.field > label.check { display: flex; padding: 0; font-size: 16px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.check { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 16px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box { width: 26px; height: 26px; flex: none; border: 2px solid var(--ink); border-radius: 6px; background: #fff; display: grid; place-items: center; }
.check__box svg { width: 22px; height: 22px; fill: none; stroke: var(--terra); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .2s; }
.check input:checked + .check__box svg { opacity: 1; transform: scale(1); }
.check input:checked ~ * { font-weight: 700; }
.check:has(input:checked) { font-weight: 700; }
.check input:focus-visible + .check__box { outline: 2px dashed var(--terra); outline-offset: 3px; }
.stepper-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.stepper-row .small { display: block; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper output { min-width: 28px; text-align: center; font-family: var(--f-display); font-weight: 600; font-size: 26px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.4em; font-size: 14px; font-weight: 700; }
.form-status.is-error { color: var(--terra); }
.demo-note, .sent-note { padding: 10px 14px; border: 2px dashed var(--mustard); border-radius: 8px; background: #FFF8DD; font-size: 13px; line-height: 1.5; }
.demo-note code { font-size: 12px; }
.sent-stamp {
  position: absolute; left: 50%; top: 42%; z-index: 3;
  padding: 8px 18px; border: 4px solid var(--sea); border-radius: 8px;
  background: rgba(255, 253, 248, .9); color: var(--sea);
  font-family: var(--f-display); font-weight: 600; font-size: 34px; letter-spacing: .08em; text-transform: uppercase;
  transform: translate(-50%, -50%) rotate(-10deg) scale(1.8); opacity: 0; pointer-events: none;
  display: none;
}
.postcard.is-sent .sent-stamp { display: block; animation: stampIn .45s cubic-bezier(.2, .9, .3, 1.3) forwards; }
@keyframes stampIn { to { opacity: 1; transform: translate(-50%, -50%) rotate(-10deg) scale(1); } }
.rsvp-done { position: relative; padding: 32px 22px 24px; background: #fff; box-shadow: var(--sh-photo); transform: rotate(-1deg); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.rsvp-done:focus { outline: none; }

/* ---------- Dinding ucapan ---------- */
.wall-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.wall-title { font-family: var(--f-display); font-weight: 600; font-size: 28px; }
.wall-count { font-size: 20px; transform: none; }
.wall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; align-items: start; }
.wish { position: relative; padding: 18px 14px 12px; background: #FFF1B8; box-shadow: 0 6px 12px rgba(62, 50, 44, .12); display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
.wish::before { content: ""; position: absolute; top: -6px; left: 50%; margin-left: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--pin, var(--terra)); box-shadow: 0 2px 2px rgba(0, 0, 0, .2); }
.wish:nth-child(4n+1) { transform: rotate(-2deg); }
.wish:nth-child(4n+2) { background: #FADADD; --pin: var(--sea); transform: rotate(2deg); margin-top: 14px; }
.wish:nth-child(4n+3) { background: #D6EFE6; --pin: var(--mustard); transform: rotate(1.5deg); }
.wish:nth-child(4n+4) { background: #DDEBF7; transform: rotate(-2.5deg); margin-top: 14px; }
.wish__msg { font-size: 14px; line-height: 1.45; white-space: pre-line; }
.wish__name { font-family: var(--f-hand); font-weight: 700; font-size: 20px; line-height: 1.1; }
.wish__meta { font-size: 11px; color: var(--muted); }
.wish.is-new { animation: dropIn .5s ease; }
@keyframes dropIn { from { opacity: 0; translate: 0 -16px; } }
.wall-empty { text-align: center; color: var(--muted); transform: none; font-size: 22px; padding: 20px 0; }
.wall-more { align-self: center; }
@media (max-width: 340px) { .wall { grid-template-columns: 1fr; } .wish:nth-child(n) { margin-top: 0; } }

/* ---------- Amplop ---------- */
.gifts { display: flex; flex-direction: column; align-items: center; gap: 36px; width: 100%; }
.envelope { position: relative; width: min(320px, 100%); aspect-ratio: 320 / 300; }
.envelope__card { position: absolute; left: 9%; right: 9%; top: 0; padding: 16px; background: #fff; box-shadow: var(--sh-paper); transform: rotate(-2deg); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.envelope__bank { font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--terra); }
.envelope__num { font-family: var(--f-display); font-weight: 600; font-size: 22px; letter-spacing: .04em; overflow-wrap: anywhere; }
.envelope__holder { font-size: 13px; color: var(--muted); }
.envelope__body { position: absolute; left: 0; right: 0; bottom: 0; height: 63%; }
.envelope__body svg { width: 100%; height: 100%; display: block; }
.envelope__seal { position: absolute; left: 50%; bottom: 27%; width: 48px; height: 48px; margin-left: -24px; border-radius: 50%; background: var(--terra); box-shadow: 0 3px 0 var(--terra-d); display: grid; place-items: center; }
.envelope .btn { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap; }
.envelope .btn:active { transform: translate(-50%, 4px); }

/* ---------- Penutup ---------- */
.letter {
  position: relative; width: 100%; max-width: 460px;
  padding: 34px 22px 26px;
  background: var(--paper-2) repeating-linear-gradient(transparent 0 29px, #EFE3CF 29px 30px);
  box-shadow: var(--sh-paper); transform: rotate(-.8deg);
  display: flex; flex-direction: column; gap: 14px; text-align: center;
}
.letter__title { font-size: 36px; transform: none; }
.letter > p:not([class]) { font-size: 15px; line-height: 1.65; }
.sign { display: flex; justify-content: center; align-items: center; gap: 14px; font-family: var(--f-hand); font-weight: 700; font-size: 44px; line-height: 1.1; }
.sign span:first-child { transform: rotate(-4deg); }
.sign span:last-child { transform: rotate(3deg); }
#families { white-space: pre-line; }
.actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.contacts { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ending { font-size: 20px; font-weight: 600; color: var(--muted); transform: none; }

/* ---------- Musik ---------- */
.vinyl {
  position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%;
  background: var(--ink); color: var(--muted);
  box-shadow: 0 4px 10px rgba(62, 50, 44, .3);
  display: grid; place-items: center;
}
.vinyl__disc { animation: spin 5s linear infinite; animation-play-state: paused; }
.vinyl.is-playing .vinyl__disc { animation-play-state: running; }
.vinyl__off { display: none; width: 22px; height: 22px; }
.vinyl.is-off { background: var(--paper); border: 2px dashed #8A776B; }
.vinyl.is-off .vinyl__disc { display: none; }
.vinyl.is-off .vinyl__off { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60;
  max-width: calc(100% - 40px); padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 700;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Muncul saat discroll ---------- */
.js .reveal { opacity: 0; translate: 0 14px; transition: opacity .55s ease, translate .55s ease; }
.js .reveal.in { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; translate: 0 0; }
}

/* ---------- Pilihan rekening ---------- */
.gift-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 400px; }
.gift-tab {
  min-height: 40px; padding: 0 14px;
  border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 700; box-shadow: 0 3px 0 var(--blush);
}
.gift-tab[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: 0 3px 0 var(--terra); }
.gifts { gap: 22px; }
.envelope__card.is-swap { animation: cardPop .35s ease; }
@keyframes cardPop { from { translate: 0 10px; opacity: .4; } }

/* ---------- Cerita: kartu teks tanpa foto ---------- */
.story__item--text { padding: 14px 14px 12px; }
.story__item--text .story__date { font-size: 21px; }

/* ---------- Info tamu luar Lombok ---------- */
.travel { display: grid; grid-template-columns: 1fr; gap: 18px; width: 100%; max-width: 560px; text-align: left; }
.travel__card {
  position: relative; padding: 16px 18px 16px 22px;
  background: #fff; border: 2px solid var(--ink); border-radius: 12px;
  box-shadow: 4px 4px 0 var(--tape-b);
}
.travel__card::before { /* lubang tali label koper */
  content: ""; position: absolute; left: -9px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--paper);
}
.travel__card:nth-child(even) { box-shadow: 4px 4px 0 var(--blush); }
.travel__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.travel__badge { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--paper); border: 1.5px dashed var(--terra); display: grid; place-items: center; color: var(--terra); }
.travel__ico { width: 18px; height: 18px; }
.travel__title { font-family: var(--f-display); font-weight: 600; font-size: 20px; line-height: 1.2; }
.travel__list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.travel__list li::marker { color: var(--terra); }
@media (min-width: 700px) { .travel { grid-template-columns: repeat(2, minmax(0, 1fr)); } .travel__card:last-child:nth-child(odd) { grid-column: 1 / -1; } }
