/* ============================================================
   20 — MAGIC ACADEMY
   Konsep: dark academia. Buku mantra, lilin melayang, bintang,
   potret hidup, gulungan, dan sihir yang paling tua: cinta.
   ============================================================ */
:root {
  --ma-navy: #070b1c;
  --ma-navy-2: #0b1026;
  --ma-indigo: #111735;
  --ma-purple: #241a45;
  --ma-parchment: #efe3c6;
  --ma-parchment-2: #e2d2ac;
  --ma-gold: #c9a227;
  --ma-gold-light: #e8cf8a;
  --ma-gold-deep: #8f6f1c;
  --ma-cream: #f8f0d8;
  --ma-ink: #2a2116;
  --ma-muted: #9d8f74;
  --ma-line: rgba(201, 162, 39, 0.24);
  --ma-display: "Cinzel", "Times New Roman", serif;
  --ma-body: "Cormorant Garamond", Georgia, serif;
  --ma-script: "Italianno", "Segoe Script", cursive;
  --ma-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ma-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

html { scroll-padding-top: 84px; }

body {
  background:
    radial-gradient(circle at 18% 8%, rgba(74, 52, 120, 0.35), transparent 42%),
    radial-gradient(circle at 82% 26%, rgba(28, 50, 100, 0.32), transparent 45%),
    var(--ma-navy);
  color: var(--ma-cream);
  font-family: var(--ma-body);
  overflow-x: hidden;
}
body.ma-locked { overflow: hidden; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  opacity: 0.06;
  background-image: var(--ma-grain);
  background-size: 180px;
  mix-blend-mode: overlay;
}

::selection { background: var(--ma-gold); color: #1b1408; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.ma-skip {
  position: fixed;
  top: -80px;
  left: 12px;
  z-index: 500;
  padding: 10px 16px;
  background: var(--ma-gold);
  color: #1b1408;
  font-family: var(--ma-display);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-decoration: none;
}
.ma-skip:focus { top: 12px; }

.ma-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ============================================================
   AMBIENT: STARS + CANDLES
   ============================================================ */
.ma-stars { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ma-star {
  position: absolute;
  width: var(--s, 2px);
  height: var(--s, 2px);
  border-radius: 50%;
  background: #fff8e2;
  opacity: var(--o, 0.6);
  box-shadow: 0 0 5px rgba(255, 245, 210, 0.8);
  animation: maTwinkle var(--d, 4s) ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
}
@keyframes maTwinkle {
  from { opacity: 0.12; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1.15); }
}

.ma-candle {
  position: absolute;
  width: 9px;
  height: 74px;
  pointer-events: none;
  animation: maFloat 6s ease-in-out infinite alternate;
}
.ma-candle__body {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 46px;
  border-radius: 2px 2px 3px 3px;
  background: linear-gradient(90deg, #bfae8c, #fff8e6 42%, #d9c8a4 75%, #a89573);
  box-shadow: 0 0 22px rgba(255, 220, 150, 0.16);
}
.ma-candle__flame {
  position: absolute;
  left: 50%;
  bottom: 45px;
  width: 9px;
  height: 17px;
  margin-left: -4.5px;
  border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 72%, #fffbe0, #ffd36e 42%, #e8892c 68%, transparent 76%);
  filter: blur(0.4px);
  box-shadow: 0 0 18px rgba(255, 190, 90, 0.7), 0 0 40px rgba(255, 170, 70, 0.25);
  transform-origin: bottom center;
  animation: maFlame 1.3s ease-in-out infinite alternate;
}
@keyframes maFlame {
  0% { transform: scale(0.9) rotate(-2deg); opacity: 0.85; }
  50% { transform: scale(1.05) rotate(1deg); opacity: 1; }
  100% { transform: scale(0.95) rotate(2deg); opacity: 0.9; }
}
@keyframes maFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}
.ma-candle--g1 { top: 16%; left: 8%; }
.ma-candle--g2 { top: 28%; right: 10%; height: 62px; animation-delay: -1.4s; }
.ma-candle--g3 { bottom: 18%; left: 15%; height: 58px; animation-delay: -2.6s; }
.ma-candle--g4 { bottom: 24%; right: 16%; animation-delay: -3.8s; }
.ma-candle--h1 { top: 24%; left: 6%; height: 64px; opacity: 0.85; }
.ma-candle--h2 { top: 34%; right: 7%; height: 58px; animation-delay: -2s; opacity: 0.8; }
.ma-candle--h3 { bottom: 20%; left: 12%; animation-delay: -3.4s; opacity: 0.7; }

/* ============================================================
   GATE / SPELLBOOK
   ============================================================ */
.ma-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 66px 18px 54px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 36%, rgba(74, 52, 120, 0.5), transparent 58%),
    radial-gradient(ellipse at 50% 110%, rgba(20, 12, 40, 0.9), transparent 60%),
    linear-gradient(170deg, #0a0e22, #070b1c 55%, #05070f);
  transition: opacity 0.9s ease, visibility 0.9s;
}
.ma-gate::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--ma-grain);
  opacity: 0.06;
  pointer-events: none;
}
.ma-gate.is-open {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.ma-gate__sky { position: absolute; inset: 0; overflow: hidden; }
.ma-gate__eyebrow {
  position: relative;
  z-index: 2;
  font-family: var(--ma-display);
  font-size: 0.56rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ma-gold-light);
  text-align: center;
  margin-bottom: 20px;
}

.ma-book {
  position: relative;
  z-index: 3;
  width: min(292px, 76vw);
  aspect-ratio: 3 / 4;
  perspective: 1600px;
  cursor: pointer;
  transition: opacity 0.7s ease, transform 0.8s var(--ma-ease);
  outline-offset: 8px;
}
.ma-book:focus-visible { outline: 2px solid var(--ma-gold-light); }
.ma-book__back {
  position: absolute;
  inset: 0;
  border-radius: 3px 6px 6px 3px;
  background: linear-gradient(135deg, #1b1226, #0c0916);
  border: 1px solid rgba(201, 162, 39, 0.4);
  transform: translate(5px, 7px);
  box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.85);
}
.ma-book__pages {
  position: absolute;
  inset: 5px 4px 5px 8px;
  border-radius: 2px 5px 5px 2px;
  background:
    repeating-linear-gradient(90deg, #f3e8cf 0 2px, #e7d8b6 2px 4px),
    var(--ma-parchment);
  border: 1px solid #cbb78c;
  box-shadow: inset 0 0 22px rgba(90, 65, 25, 0.25);
}
.ma-book__pages span {
  position: absolute;
  left: 3px;
  right: 3px;
  height: 1px;
  background: rgba(90, 65, 25, 0.18);
}
.ma-book__pages span:nth-child(1) { top: 22%; }
.ma-book__pages span:nth-child(2) { top: 52%; }
.ma-book__pages span:nth-child(3) { top: 80%; }

.ma-book__cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  transform-origin: left center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  border-radius: 3px 6px 6px 3px;
  background:
    radial-gradient(ellipse at 40% 20%, rgba(120, 85, 40, 0.25), transparent 55%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 5px),
    linear-gradient(140deg, #3a2415, #24160d 55%, #160d07);
  border: 1px solid rgba(201, 162, 39, 0.65);
  box-shadow:
    0 0 0 3px #120b06,
    0 0 0 4px rgba(201, 162, 39, 0.28),
    0 36px 60px -22px rgba(0, 0, 0, 0.9);
  transition: transform 1.35s cubic-bezier(0.62, 0, 0.2, 1);
  overflow: hidden;
}
.ma-book__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--ma-grain);
  opacity: 0.16;
  mix-blend-mode: multiply;
}
.ma-book.is-open .ma-book__cover { transform: rotateY(-158deg); }
.ma-book__border {
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: 2px 4px 4px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  text-align: center;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.25), inset 0 0 30px rgba(201, 162, 39, 0.08);
}
.ma-book__border::before,
.ma-book__border::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--ma-gold);
  opacity: 0.7;
}
.ma-book__border::before { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.ma-book__border::after { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }
.ma-book__crest { width: 78px; color: var(--ma-gold-light); margin-bottom: 10px; filter: drop-shadow(0 0 10px rgba(201, 162, 39, 0.25)); }
.ma-book__title {
  font-family: var(--ma-display);
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.12em;
  color: var(--ma-gold-light);
}
.ma-book__sub {
  font-family: var(--ma-body);
  font-style: italic;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: rgba(248, 240, 216, 0.75);
  margin-top: 5px;
}
.ma-book__year {
  font-family: var(--ma-display);
  font-size: 0.5rem;
  letter-spacing: 0.3em;
  color: rgba(201, 162, 39, 0.75);
  margin-top: 14px;
}
.ma-seal {
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 60px;
  height: 60px;
  margin-left: -30px;
  display: grid;
  place-items: center;
  border-radius: 47% 53% 52% 48% / 51% 46% 54% 49%;
  background:
    radial-gradient(circle at 34% 28%, #b33a34, #7e1d1b 55%, #5b120f);
  border: 1px solid rgba(255, 190, 160, 0.3);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.55),
    inset 0 0 0 4px rgba(90, 12, 10, 0.55),
    inset 0 0 0 5px rgba(255, 200, 170, 0.18);
  color: #f3d8c2;
  z-index: 6;
  transition: opacity 0.5s, transform 0.6s var(--ma-ease);
}
.ma-seal::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 220, 190, 0.35);
  border-radius: 50%;
}
.ma-seal span {
  font-family: var(--ma-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.ma-book.is-open .ma-seal { opacity: 0; transform: scale(1.6) rotate(14deg); }

.ma-gate__hint {
  position: relative;
  z-index: 2;
  margin-top: 28px;
  font-family: var(--ma-display);
  font-size: 0.5rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(248, 240, 216, 0.45);
  text-align: center;
}
.ma-gate.is-reading .ma-book { opacity: 0; transform: scale(0.92) translateY(-10px); pointer-events: none; }
.ma-gate.is-reading .ma-gate__hint { opacity: 0; }
.ma-gate.is-reading .ma-candle { opacity: 0; transition: opacity 0.4s ease; }

.ma-gate__welcome {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 22px 60px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(74, 52, 120, 0.45), transparent 62%),
    linear-gradient(180deg, rgba(7, 11, 28, 0.96), rgba(5, 7, 15, 0.98));
  animation: maWelcome 0.9s var(--ma-ease) both;
}
@keyframes maWelcome {
  from { opacity: 0; transform: translateY(14px); }
}
.ma-gate__welcomeSmall {
  font-family: var(--ma-display);
  font-size: 0.54rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ma-gold);
  margin-bottom: 8px;
}
.ma-gate__guest {
  font-family: var(--ma-script);
  font-size: clamp(2.1rem, 9vw, 3rem);
  line-height: 1.1;
  color: var(--ma-gold-light);
  max-width: 92vw;
  overflow-wrap: anywhere;
  margin-bottom: 14px;
}
.ma-gate__line {
  font-size: 0.86rem;
  line-height: 1.8;
  color: var(--ma-muted);
  max-width: 44ch;
  margin: 0 auto 24px;
}
.ma-gate__back {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 9;
  font-family: var(--ma-display);
  font-size: 0.46rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(248, 240, 216, 0.45);
  text-decoration: none;
  white-space: nowrap;
}
.ma-gate__back:hover { color: var(--ma-gold-light); }

/* ============================================================
   APP + NAV
   ============================================================ */
.ma-app {
  position: relative;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease 0.15s, visibility 1s;
}
body.ma-live .ma-app { opacity: 1; visibility: visible; }

.ma-ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ma-ambient__glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.4; }
.ma-ambient__glow--1 { width: 44vw; height: 44vw; top: -12vw; left: -10vw; background: #3b2a68; }
.ma-ambient__glow--2 { width: 38vw; height: 38vw; bottom: 4%; right: -12vw; background: #173158; }
.ma-particles { position: absolute; inset: 0; }
.ma-particle {
  position: absolute;
  width: var(--s, 2px);
  height: var(--s, 2px);
  border-radius: 50%;
  background: var(--ma-gold-light);
  opacity: 0;
  box-shadow: 0 0 6px rgba(232, 207, 138, 0.8);
  animation: maDust var(--d, 14s) linear infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes maDust {
  0% { opacity: 0; transform: translate3d(0, 20px, 0) scale(0.6); }
  20% { opacity: 0.7; }
  80% { opacity: 0.4; }
  100% { opacity: 0; transform: translate3d(var(--dx, 30px), -80vh, 0) scale(1); }
}

.ma-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(7, 11, 28, 0.9), transparent);
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s, padding 0.35s, backdrop-filter 0.35s;
}
.ma-nav.is-solid {
  background: rgba(7, 11, 28, 0.93);
  border-bottom-color: rgba(201, 162, 39, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-top: calc(7px + env(safe-area-inset-top));
  padding-bottom: 7px;
}
.ma-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--ma-display);
  font-size: 0.5rem;
  letter-spacing: 0.16em;
  color: var(--ma-gold-light);
  text-decoration: none;
  white-space: nowrap;
}
.ma-nav__brand svg { width: 24px; color: var(--ma-gold); }
.ma-nav__links { display: none; align-items: center; gap: 15px; margin-left: auto; }
.ma-nav__links a {
  font-family: var(--ma-display);
  font-size: 0.46rem;
  letter-spacing: 0.12em;
  color: var(--ma-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.ma-nav__links a:hover, .ma-nav__links a.is-active { color: var(--ma-gold-light); }
.ma-nav__right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ma-nav__links + .ma-nav__right { margin-left: 0; }
.ma-nav__cta {
  padding: 7px 10px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  font-family: var(--ma-display);
  font-size: 0.44rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ma-gold-light);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.ma-nav__cta:hover { background: var(--ma-gold); color: #1b1408; }
.ma-nav__back {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 50%;
  color: var(--ma-muted);
  text-decoration: none;
  font-size: 0.75rem;
}
.ma-nav__back:hover { color: var(--ma-gold-light); border-color: var(--ma-gold); }

/* ============================================================
   HERO
   ============================================================ */
.ma-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 96px 16px 54px;
  overflow: hidden;
  text-align: center;
}
.ma-hero__bg { position: absolute; inset: 0; }
.ma-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  filter: brightness(0.34) saturate(0.75) contrast(1.1) hue-rotate(-8deg);
}
.ma-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 34%, rgba(7, 11, 28, 0.2), rgba(7, 11, 28, 0.72) 62%, var(--ma-navy) 100%),
    linear-gradient(180deg, rgba(7, 11, 28, 0.85), transparent 24%, transparent 58%, var(--ma-navy) 100%);
}
.ma-hero__inner { position: relative; z-index: 3; width: 100%; max-width: 760px; }
.ma-hero__crest {
  width: 104px;
  margin: 0 auto 16px;
  color: var(--ma-gold-light);
  filter: drop-shadow(0 0 18px rgba(201, 162, 39, 0.3));
}
body.ma-live .ma-hero__crest { animation: maCrest 1.8s var(--ma-ease) both; }
@keyframes maCrest {
  from { opacity: 0; transform: translateY(14px) scale(0.92); }
}
.ma-eyebrow {
  font-family: var(--ma-display);
  font-size: 0.52rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ma-gold);
  margin-bottom: 10px;
}
.ma-hero__script {
  font-family: var(--ma-script);
  font-size: clamp(1.5rem, 6.4vw, 2rem);
  line-height: 1;
  color: var(--ma-gold-light);
  margin-bottom: 4px;
}
.ma-hero__title {
  font-family: var(--ma-display);
  font-weight: 500;
  font-size: clamp(3rem, 14vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--ma-cream);
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  margin-bottom: 10px;
}
.ma-hero__title span { display: inline-block; }
.ma-hero__title em {
  display: inline-block;
  font-family: var(--ma-script);
  font-style: normal;
  font-weight: 400;
  font-size: 0.86em;
  color: var(--ma-gold);
  margin: 0 0.02em;
  vertical-align: 0.06em;
}
.ma-hero__sub {
  font-family: var(--ma-display);
  font-size: 0.66rem;
  letter-spacing: 0.4em;
  color: var(--ma-gold-light);
  margin-bottom: 14px;
}
.ma-hero__rule, .ma-chapter__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ma-gold);
  margin: 0 auto 16px;
  max-width: 240px;
}
.ma-hero__rule::before, .ma-hero__rule::after,
.ma-chapter__rule::before, .ma-chapter__rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.55), transparent);
}
.ma-hero__rule span, .ma-chapter__rule span { font-size: 0.55rem; }
.ma-hero__date {
  font-family: var(--ma-body);
  font-size: 1.02rem;
  letter-spacing: 0.08em;
  color: var(--ma-cream);
  margin-bottom: 4px;
}
.ma-hero__venue {
  font-family: var(--ma-display);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ma-muted);
  margin-bottom: 22px;
}
.ma-hero__guest {
  margin-top: 18px;
  font-family: var(--ma-body);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ma-muted);
}
.ma-hero__guest strong { color: var(--ma-gold-light); font-weight: 500; }

.ma-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid rgba(201, 162, 39, 0.55);
  background: transparent;
  color: var(--ma-gold-light);
  font-family: var(--ma-display);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ma-ease), box-shadow 0.25s;
}
.ma-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -16px rgba(201, 162, 39, 0.7); }
.ma-btn--gold {
  background: linear-gradient(110deg, #b8912c, #e8cf8a 45%, #c9a227 75%, #a8831f);
  border-color: transparent;
  color: #1b1408;
}
.ma-btn--gold:hover { color: #000; }
.ma-btn--ghost { background: rgba(7, 11, 28, 0.35); }
.ma-btn--ghost:hover { background: rgba(201, 162, 39, 0.12); }
.ma-btn--full { width: 100%; }

.ma-hero__index {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 16px;
  max-width: 880px;
  margin: 34px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(201, 162, 39, 0.18);
}
.ma-hero__index a {
  font-family: var(--ma-display);
  font-size: 0.44rem;
  letter-spacing: 0.1em;
  color: rgba(157, 143, 116, 0.9);
  text-decoration: none;
  transition: color 0.2s;
}
.ma-hero__index a span { color: var(--ma-gold); margin-right: 4px; }
.ma-hero__index a:hover { color: var(--ma-gold-light); }
.ma-hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 3;
  font-family: var(--ma-display);
  font-size: 0.42rem;
  letter-spacing: 0.26em;
  color: rgba(157, 143, 116, 0.5);
  animation: maScrollCue 2.4s ease-in-out infinite;
}
@keyframes maScrollCue {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.4; }
  50% { transform: translate(-50%, 4px); opacity: 0.8; }
}

/* ============================================================
   CHAPTERS
   ============================================================ */
.ma-chapter {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 76px 16px;
}
.ma-chapter__head { max-width: 660px; margin: 0 auto 40px; text-align: center; }
.ma-chapter__no {
  font-family: var(--ma-display);
  font-size: 0.48rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ma-gold);
  margin-bottom: 8px;
}
.ma-chapter__no--light { color: var(--ma-gold-light); }
.ma-chapter__head h2, .ma-alignment h2 {
  font-family: var(--ma-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 8vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: 0.02em;
  color: var(--ma-cream);
  margin-bottom: 12px;
}
.ma-chapter__head h2 em, .ma-alignment h2 em {
  font-family: var(--ma-body);
  font-style: italic;
  font-weight: 500;
  color: var(--ma-gold-light);
}
.ma-chapter__sub {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--ma-muted);
  max-width: 54ch;
  margin: 0 auto;
}
.ma-chapter__rule { margin-top: 18px; max-width: 180px; }
.ma-quote {
  max-width: 640px;
  margin: 44px auto 0;
  text-align: center;
  font-family: var(--ma-script);
  font-size: clamp(1.7rem, 7vw, 2.4rem);
  line-height: 1.15;
  color: var(--ma-gold-light);
}

/* ============================================================
   CHAPTER I — WIZARDS
   ============================================================ */
.ma-wizards__grid { display: grid; gap: 38px; max-width: 900px; margin: 0 auto; }
.ma-wizard { text-align: center; }
.ma-wizard__portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 50% 50% 5px 5px / 26% 26% 5px 5px;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.55);
  padding: 7px;
  background: #0b1026;
  box-shadow: 0 24px 44px -26px rgba(0, 0, 0, 0.9);
}
.ma-wizard__portrait::before {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: 2;
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: inherit;
  pointer-events: none;
}
.ma-wizard__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  filter: saturate(0.72) contrast(1.06) brightness(0.8) sepia(0.08);
  transition: filter 0.6s, transform 1s var(--ma-ease);
}
.ma-wizard:hover .ma-wizard__portrait img { filter: saturate(0.9) contrast(1.03) brightness(0.9); transform: scale(1.03); }
.ma-wizard__arch {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, transparent 55%, rgba(7, 11, 28, 0.85));
  pointer-events: none;
}
.ma-wizard__house {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 3;
  font-family: var(--ma-display);
  font-size: 0.44rem;
  letter-spacing: 0.16em;
  color: var(--ma-gold-light);
  text-align: center;
  padding-top: 9px;
  border-top: 1px solid rgba(201, 162, 39, 0.35);
}
.ma-wizard__body { padding: 20px 8px 0; }
.ma-wizard__role {
  font-family: var(--ma-display);
  font-size: 0.46rem;
  letter-spacing: 0.18em;
  color: var(--ma-gold);
  margin-bottom: 4px;
}
.ma-wizard__body h3 {
  font-family: var(--ma-display);
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ma-cream);
  margin-bottom: 5px;
}
.ma-wizard__parents {
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--ma-muted);
  margin-bottom: 8px;
}
.ma-wizard__bio {
  font-size: 0.88rem;
  line-height: 1.7;
  color: #d6c9b2;
  max-width: 40ch;
  margin: 0 auto 14px;
}
.ma-wizard__stats {
  display: grid;
  gap: 7px;
  max-width: 360px;
  margin: 0 auto 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(201, 162, 39, 0.16);
}
.ma-wizard__stats div { display: flex; justify-content: space-between; gap: 12px; }
.ma-wizard__stats dt {
  font-family: var(--ma-display);
  font-size: 0.44rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ma-gold);
}
.ma-wizard__stats dd { margin: 0; font-size: 0.76rem; color: var(--ma-cream); opacity: 0.85; }
.ma-wizard__ig {
  font-family: var(--ma-display);
  font-size: 0.48rem;
  letter-spacing: 0.1em;
  color: var(--ma-gold-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 162, 39, 0.4);
  padding-bottom: 2px;
}
.ma-wizard__ig:hover { color: #fff; border-color: #fff; }

/* ============================================================
   CHAPTER II — MEMORY BOOK
   ============================================================ */
.ma-book-spread {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 10px;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 5px),
    linear-gradient(140deg, #2e1d10, #1a100a 60%, #120b06);
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: 5px;
  box-shadow: 0 36px 70px -40px rgba(0, 0, 0, 0.95);
}
.ma-book-spread__inner {
  position: relative;
  display: grid;
  gap: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(255, 255, 255, 0.35), transparent 45%),
    repeating-linear-gradient(90deg, rgba(90, 65, 25, 0.035) 0 1px, transparent 1px 3px),
    var(--ma-parchment);
  border: 1px solid #c9b48a;
  overflow: hidden;
  color: var(--ma-ink);
}
.ma-book-spread__inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--ma-grain);
  opacity: 0.13;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.ma-book-spread__left { position: relative; z-index: 1; padding: 16px 16px 10px; }
.ma-book-spread__frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid #b9a279;
  background: #d8c7a2;
  box-shadow: inset 0 0 20px rgba(70, 50, 20, 0.2);
}
.ma-book-spread__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.22) contrast(1.03) brightness(0.97);
}
.ma-book-spread__caption {
  margin-top: 7px;
  text-align: center;
  font-family: var(--ma-script);
  font-size: 1.3rem;
  line-height: 1;
  color: #5c4728;
}
.ma-book-spread__right { position: relative; z-index: 1; padding: 20px 20px 26px; }
.ma-book-spread__page {
  font-family: var(--ma-display);
  font-size: 0.44rem;
  letter-spacing: 0.24em;
  color: var(--ma-gold-deep);
  margin-bottom: 4px;
}
.ma-book-spread__date {
  font-family: var(--ma-display);
  font-size: 0.48rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a7146;
  margin-bottom: 6px;
}
.ma-book-spread__right h3 {
  font-family: var(--ma-display);
  font-size: clamp(1.35rem, 5.4vw, 1.85rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ma-ink);
  margin-bottom: 10px;
}
.ma-book-spread__text {
  font-size: 0.9rem;
  line-height: 1.85;
  color: #43351f;
  min-height: 8.5em;
}
.ma-book-spread__sign {
  margin-top: 14px;
  text-align: right;
  font-family: var(--ma-script);
  font-size: 1.4rem;
  color: #6b4f2b;
}
.ma-book-spread__folio {
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: var(--ma-gold-deep);
  font-size: 0.55rem;
  opacity: 0.6;
}
.ma-book-spread__flip {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(120, 90, 40, 0.18), transparent 18%, transparent 82%, rgba(120, 90, 40, 0.16)),
    var(--ma-parchment-2);
  border-left: 1px solid rgba(120, 90, 40, 0.25);
  transform-origin: left center;
  transform: rotateY(0deg);
  opacity: 0;
  pointer-events: none;
}
.ma-book-spread.is-flipping .ma-book-spread__flip {
  animation: maPageFlip 0.7s cubic-bezier(0.6, 0, 0.3, 1);
}
@keyframes maPageFlip {
  0% { opacity: 1; transform: rotateY(0deg); box-shadow: 12px 0 24px rgba(50, 30, 10, 0.3); }
  100% { opacity: 0; transform: rotateY(-104deg); box-shadow: -4px 0 12px rgba(50, 30, 10, 0.1); }
}
.ma-book-spread__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 4px 2px;
}
.ma-book-btn {
  padding: 8px 10px;
  background: transparent;
  border: 1px solid rgba(201, 162, 39, 0.4);
  color: var(--ma-gold-light);
  font-family: var(--ma-display);
  font-size: 0.44rem;
  letter-spacing: 0.1em;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.ma-book-btn:hover:not(:disabled) { background: var(--ma-gold); color: #1b1408; border-color: var(--ma-gold); }
.ma-book-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.ma-book-spread__dots { display: flex; gap: 5px; }
.ma-book-spread__dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.5);
  background: transparent;
  transition: background 0.2s, transform 0.2s;
}
.ma-book-spread__dots button.is-active { background: var(--ma-gold); transform: scale(1.2); }

/* ============================================================
   CHAPTER III — CEREMONY SCROLL
   ============================================================ */
.ma-scroll { max-width: 880px; margin: 0 auto; }
.ma-scroll__rod {
  position: relative;
  height: 13px;
  border-radius: 8px;
  background: linear-gradient(180deg, #e8cf8a, #a8831f 45%, #6f5312 75%, #c9a227);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
  z-index: 2;
}
.ma-scroll__rod::before, .ma-scroll__rod::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 14px;
  height: 19px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #f3dfa4, #a8831f 60%, #6f5312);
}
.ma-scroll__rod::before { left: -7px; }
.ma-scroll__rod::after { right: -7px; }
.ma-scroll__paper {
  position: relative;
  padding: 30px 20px 78px;
  margin: 0 4px;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(255, 255, 255, 0.35), transparent 40%),
    repeating-linear-gradient(90deg, rgba(90, 65, 25, 0.03) 0 1px, transparent 1px 3px),
    var(--ma-parchment);
  color: var(--ma-ink);
  border-left: 1px solid #c9b48a;
  border-right: 1px solid #c9b48a;
  box-shadow: 0 20px 40px -26px rgba(0, 0, 0, 0.8);
  text-align: center;
}
.ma-scroll__paper::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--ma-grain);
  opacity: 0.12;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.ma-scroll__paper > * { position: relative; z-index: 1; }
.ma-scroll__kicker {
  font-family: var(--ma-display);
  font-size: 0.44rem;
  letter-spacing: 0.26em;
  color: var(--ma-gold-deep);
  margin-bottom: 5px;
}
.ma-scroll__title {
  font-family: var(--ma-display);
  font-size: clamp(1.5rem, 6.4vw, 2.2rem);
  font-weight: 600;
  line-height: 1.1;
  color: #2f2413;
  margin-bottom: 22px;
}
.ma-ceremony__grid { display: grid; gap: 16px; }
.ma-ceremony__item { padding: 6px 0; }
.ma-ceremony__seal {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  border-radius: 50%;
  border: 1px solid var(--ma-gold-deep);
  font-family: var(--ma-display);
  font-size: 0.62rem;
  color: var(--ma-gold-deep);
  background: rgba(201, 162, 39, 0.08);
}
.ma-ceremony__time {
  font-family: var(--ma-display);
  font-size: 0.52rem;
  letter-spacing: 0.16em;
  color: var(--ma-gold-deep);
  margin-bottom: 3px;
}
.ma-ceremony__item h4 {
  font-family: var(--ma-display);
  font-size: 1.32rem;
  font-weight: 600;
  color: #2f2413;
  margin-bottom: 3px;
}
.ma-ceremony__venue { font-family: var(--ma-body); font-size: 1rem; font-weight: 600; color: #43351f; }
.ma-ceremony__address { font-size: 0.76rem; line-height: 1.6; color: #6d5a3b; max-width: 34ch; margin: 3px auto 8px; }
.ma-link {
  font-family: var(--ma-display);
  font-size: 0.44rem;
  letter-spacing: 0.1em;
  color: var(--ma-gold-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(143, 111, 28, 0.5);
  padding-bottom: 1px;
}
.ma-link:hover { color: #2f2413; border-color: #2f2413; }
.ma-ceremony__divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ma-gold-deep);
  font-size: 0.55rem;
}
.ma-ceremony__divider::before, .ma-ceremony__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(143, 111, 28, 0.28);
}
.ma-scroll__note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(143, 111, 28, 0.25);
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #5b4829;
}
.ma-scroll__stamp {
  position: absolute;
  right: 16px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 47% 53% 52% 48% / 51% 46% 54% 49%;
  background: radial-gradient(circle at 34% 28%, #b33a34, #7e1d1b 55%, #5b120f);
  color: #f3d8c2;
  font-family: var(--ma-display);
  font-size: 0.6rem;
  transform: rotate(-10deg);
  opacity: 0.85;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   CHAPTER IV — PORTRAITS
   ============================================================ */
.ma-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 1000px;
  margin: 0 auto;
}
.ma-portrait {
  position: relative;
  padding: 5px;
  background: #0b1026;
  border: 1px solid rgba(201, 162, 39, 0.28);
  text-align: center;
  transition: transform 0.4s var(--ma-ease), border-color 0.3s, box-shadow 0.4s;
}
.ma-portrait:nth-child(even) { margin-top: 18px; }
.ma-portrait:hover, .ma-portrait:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(201, 162, 39, 0.7);
  box-shadow: 0 20px 36px -24px rgba(0, 0, 0, 0.9);
  z-index: 2;
}
.ma-portrait__frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 50% 50% 3px 3px / 24% 24% 3px 3px;
  background: #0f1430;
}
.ma-portrait__frame::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(201, 162, 39, 0.32);
  border-radius: inherit;
  pointer-events: none;
}
.ma-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) contrast(1.05) brightness(0.78) sepia(0.1);
  animation: maPortrait 14s ease-in-out infinite alternate;
  transition: filter 0.5s;
}
.ma-portrait:nth-child(3n) img { animation-delay: -4s; animation-duration: 17s; }
.ma-portrait:nth-child(3n+1) img { animation-delay: -8s; }
.ma-portrait:hover img { filter: saturate(0.9) contrast(1.02) brightness(0.9); }
@keyframes maPortrait {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.07) translateY(-2%); }
}
.ma-portrait__plaque { padding: 8px 4px 4px; }
.ma-portrait__no {
  display: block;
  font-family: var(--ma-display);
  font-size: 0.4rem;
  letter-spacing: 0.18em;
  color: var(--ma-gold);
  margin-bottom: 2px;
}
.ma-portrait__cap {
  display: block;
  font-size: 0.66rem;
  line-height: 1.3;
  color: var(--ma-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ma-gallery__hint {
  margin-top: 24px;
  text-align: center;
  font-family: var(--ma-display);
  font-size: 0.46rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(157, 143, 116, 0.7);
}
.ma-gallery__hint span { color: var(--ma-gold-light); }

/* ============================================================
   CHAPTER V — ALIGNMENT
   ============================================================ */
.ma-alignment {
  position: relative;
  margin: 24px 0;
  padding: 84px 16px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(92, 68, 150, 0.3), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(28, 50, 100, 0.25), transparent 55%),
    linear-gradient(160deg, #0a0e22, #1a1435 55%, #0a0e22);
  border-top: 1px solid rgba(201, 162, 39, 0.24);
  border-bottom: 1px solid rgba(201, 162, 39, 0.24);
}
.ma-alignment::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 248, 226, 0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 28% 64%, rgba(255, 248, 226, 0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 46% 12%, rgba(255, 248, 226, 0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 64% 78%, rgba(255, 248, 226, 0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 82% 30%, rgba(255, 248, 226, 0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 92% 66%, rgba(255, 248, 226, 0.45), transparent 60%);
  pointer-events: none;
}
.ma-alignment__inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.ma-alignment__lead {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--ma-muted);
  max-width: 52ch;
  margin: 0 auto 28px;
}
.ma-alignment__lead strong { color: var(--ma-gold-light); font-weight: 500; }
.ma-clock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; max-width: 620px; margin: 0 auto; }
.ma-clock__unit {
  padding: 16px 4px 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(201, 162, 39, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.ma-clock__unit strong {
  display: block;
  font-family: var(--ma-display);
  font-size: clamp(1.8rem, 8vw, 3rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ma-gold-light);
  text-shadow: 0 0 24px rgba(201, 162, 39, 0.25);
}
.ma-clock__unit span {
  display: block;
  margin-top: 6px;
  font-family: var(--ma-display);
  font-size: 0.44rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ma-muted);
}
.ma-alignment__note {
  margin-top: 26px;
  font-family: var(--ma-script);
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--ma-gold-light);
}

/* ============================================================
   CHAPTER VI — GREAT HALL
   ============================================================ */
.ma-hall__grid { display: grid; gap: 30px; max-width: 1000px; margin: 0 auto; }
.ma-hall__venue {
  font-family: var(--ma-display);
  font-size: clamp(1.3rem, 5.4vw, 1.7rem);
  letter-spacing: 0.03em;
  color: var(--ma-gold-light);
  margin-bottom: 4px;
}
.ma-hall__address { font-size: 0.86rem; line-height: 1.7; color: var(--ma-muted); max-width: 42ch; }
.ma-hall__note { margin-top: 12px; font-size: 0.82rem; line-height: 1.75; color: rgba(157, 143, 116, 0.85); max-width: 44ch; }
.ma-hall__actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.ma-hall__meta { display: grid; gap: 7px; margin-top: 22px; padding-top: 15px; border-top: 1px solid rgba(201, 162, 39, 0.16); }
.ma-hall__meta span { font-family: var(--ma-display); font-size: 0.44rem; letter-spacing: 0.12em; color: var(--ma-muted); }
.ma-hall__meta b { color: var(--ma-gold); font-weight: 500; margin-right: 8px; }
.ma-hall__map {
  padding: 9px;
  background: #0a0e22;
  border: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: 0 24px 44px -30px rgba(0, 0, 0, 0.9);
}
.ma-hall__maphead {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 2px 8px;
  font-family: var(--ma-display);
  font-size: 0.42rem;
  letter-spacing: 0.16em;
  color: var(--ma-gold);
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
  margin-bottom: 8px;
}
.ma-hall__frame { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #0d1128; }
.ma-hall__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.75) sepia(0.2) contrast(1.1) brightness(0.6);
}
.ma-hall__pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--ma-gold);
  background: rgba(7, 11, 28, 0.8);
  color: var(--ma-gold-light);
  box-shadow: 0 0 0 7px rgba(201, 162, 39, 0.1);
  font-size: 0.75rem;
  pointer-events: none;
}
.ma-hall__legend {
  padding: 8px 2px 2px;
  font-family: var(--ma-display);
  font-size: 0.42rem;
  letter-spacing: 0.12em;
  color: var(--ma-muted);
}

/* ============================================================
   CHAPTER VII — RSVP
   ============================================================ */
.ma-scroll--rsvp { max-width: 760px; }
.ma-scroll--rsvp .ma-scroll__paper { text-align: left; }
.ma-scroll--rsvp .ma-scroll__kicker,
.ma-scroll--rsvp .ma-scroll__title { text-align: center; }
.ma-form { display: grid; gap: 14px; position: relative; z-index: 1; }
.ma-form__row { display: grid; gap: 12px; }
.ma-form label {
  display: block;
  font-family: var(--ma-display);
  font-size: 0.44rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ma-gold-deep);
  margin-bottom: 4px;
}
.ma-form input,
.ma-form select,
.ma-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(143, 111, 28, 0.28);
  border-radius: 0;
  padding: 9px 10px;
  font-family: var(--ma-body);
  font-size: 0.9rem;
  color: var(--ma-ink);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.ma-form input::placeholder, .ma-form textarea::placeholder { color: #8d7957; }
.ma-form select option { background: var(--ma-parchment); color: var(--ma-ink); }
.ma-form input:focus,
.ma-form select:focus,
.ma-form textarea:focus {
  outline: 0;
  border-color: var(--ma-gold-deep);
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 0 3px rgba(143, 111, 28, 0.12);
}
.ma-form textarea { resize: vertical; min-height: 82px; }
.ma-form .ma-btn--gold { margin-top: 2px; }
.ma-form__done {
  font-family: var(--ma-body);
  font-size: 0.82rem;
  line-height: 1.5;
  color: #6b4f2b;
  font-style: italic;
}
.ma-scroll__sign {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px dashed rgba(143, 111, 28, 0.35);
}
.ma-scroll__sign span {
  font-family: var(--ma-display);
  font-size: 0.42rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a7146;
}
.ma-scroll__sign strong {
  font-family: var(--ma-script);
  font-size: 1.6rem;
  font-weight: 400;
  color: #5c4728;
}
.ma-seal--stamp {
  position: absolute;
  right: 16px;
  bottom: 12px;
  z-index: 3;
  width: 58px;
  height: 58px;
  margin: 0;
  opacity: 0;
  transform: rotate(-12deg) scale(1.5);
  transition: opacity 0.4s, transform 0.5s var(--ma-ease);
  pointer-events: none;
}
.ma-scroll--rsvp.is-signed .ma-seal--stamp { opacity: 0.9; transform: rotate(-12deg) scale(1); }

/* ============================================================
   CLOSING
   ============================================================ */
.ma-closing {
  position: relative;
  padding: 86px 16px 58px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(74, 52, 120, 0.35), transparent 55%),
    linear-gradient(180deg, #070b1c, #0a0d20 60%, #05070f);
  border-top: 1px solid rgba(201, 162, 39, 0.2);
}
.ma-closing::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 16% 24%, rgba(255, 248, 226, 0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 74% 16%, rgba(255, 248, 226, 0.4), transparent 60%),
    radial-gradient(1.5px 1.5px at 86% 62%, rgba(255, 248, 226, 0.35), transparent 60%),
    radial-gradient(1.5px 1.5px at 26% 76%, rgba(255, 248, 226, 0.3), transparent 60%);
  pointer-events: none;
}
.ma-closing__inner { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.ma-closing__crest { width: 84px; margin: 0 auto 16px; color: var(--ma-gold-light); opacity: 0.9; }
.ma-closing__kicker {
  font-family: var(--ma-display);
  font-size: 0.5rem;
  letter-spacing: 0.34em;
  color: var(--ma-gold);
  margin-bottom: 8px;
}
.ma-closing h2 {
  font-family: var(--ma-display);
  font-size: clamp(2rem, 8.6vw, 3.4rem);
  font-weight: 500;
  line-height: 1.08;
  color: var(--ma-cream);
  margin-bottom: 20px;
}
.ma-closing h2 em { font-family: var(--ma-body); font-style: italic; font-weight: 500; color: var(--ma-gold-light); }
.ma-closing blockquote {
  font-family: var(--ma-script);
  font-size: clamp(1.6rem, 6.6vw, 2.2rem);
  line-height: 1.2;
  color: var(--ma-gold-light);
  max-width: 34ch;
  margin: 0 auto 22px;
}
.ma-closing__message {
  font-size: 0.86rem;
  line-height: 1.8;
  color: var(--ma-muted);
  max-width: 48ch;
  margin: 0 auto 10px;
}
.ma-closing__thanks { font-size: 0.78rem; line-height: 1.7; color: rgba(157, 143, 116, 0.75); margin-bottom: 18px; }
.ma-closing__hash {
  font-family: var(--ma-display);
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  color: var(--ma-gold);
  margin-bottom: 10px;
}
.ma-closing__note {
  font-family: var(--ma-script);
  font-size: 1.3rem;
  color: rgba(232, 207, 138, 0.7);
  margin-bottom: 26px;
}
.ma-closing__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-bottom: 36px; }
.ma-closing__credits {
  display: grid;
  gap: 4px;
  padding-top: 22px;
  border-top: 1px solid rgba(201, 162, 39, 0.14);
  font-family: var(--ma-display);
  font-size: 0.44rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(157, 143, 116, 0.55);
}
.ma-closing__fine {
  margin-top: 20px;
  font-size: 0.66rem;
  color: rgba(157, 143, 116, 0.55);
}
.ma-closing__fine a { color: rgba(232, 207, 138, 0.8); text-decoration: none; border-bottom: 1px solid rgba(201, 162, 39, 0.3); }

.ma-footer {
  padding: 24px 16px calc(30px + env(safe-area-inset-bottom));
  text-align: center;
  background: #04060d;
  border-top: 1px solid rgba(201, 162, 39, 0.1);
  font-family: var(--ma-display);
  font-size: 0.42rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(157, 143, 116, 0.45);
}
.ma-footer__fine {
  margin-top: 7px;
  font-family: var(--ma-body);
  font-size: 0.7rem;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(157, 143, 116, 0.4);
}

/* ============================================================
   WAND CURSOR + SPARKLES
   ============================================================ */
@media (hover: hover) and (pointer: fine) {
  body.ma-live {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M5 29 L25 7' stroke='%23c9a227' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M25 7 l2 -3' stroke='%23e8cf8a' stroke-width='1.5'/%3E%3Ccircle cx='28' cy='3' r='1.3' fill='%23e8cf8a'/%3E%3Ccircle cx='23' cy='4' r='0.9' fill='%23e8cf8a'/%3E%3Ccircle cx='29' cy='9' r='0.8' fill='%23e8cf8a'/%3E%3C/svg%3E") 28 3, auto;
  }
  body.ma-live a,
  body.ma-live button,
  body.ma-live [role="button"],
  body.ma-live select,
  body.ma-live summary { cursor: pointer; }
  body.ma-live input,
  body.ma-live textarea { cursor: text; }
}
.ma-spark {
  position: fixed;
  z-index: 350;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, #e8cf8a 45%, transparent 72%);
  pointer-events: none;
  animation: maSpark 0.9s ease-out forwards;
}
@keyframes maSpark {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 620px) {
  .ma-chapter { padding-left: 30px; padding-right: 30px; }
  .ma-hero { padding-left: 30px; padding-right: 30px; }
  .ma-wizards__grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .ma-wizard__portrait { aspect-ratio: 3 / 4; }
  .ma-book-spread__inner { grid-template-columns: 1fr 1fr; }
  .ma-book-spread__left { padding: 18px; border-right: 1px solid rgba(120, 90, 40, 0.2); }
  .ma-book-spread__frame { aspect-ratio: 4 / 5; height: calc(100% - 32px); }
  .ma-book-spread__right { padding: 30px 28px 34px; }
  .ma-book-spread__text { min-height: 10em; }
  .ma-ceremony__grid { grid-template-columns: 1fr 40px 1fr; align-items: center; }
  .ma-ceremony__divider { flex-direction: column; height: 100%; }
  .ma-ceremony__divider::before, .ma-ceremony__divider::after { width: 1px; flex: 1; height: auto; }
  .ma-ceremony__item { text-align: center; }
  .ma-gallery { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .ma-hall__grid { grid-template-columns: 1fr 1.05fr; align-items: center; gap: 40px; }
  .ma-form__row { grid-template-columns: 1fr 1fr; }
  .ma-scroll__paper { padding: 40px 34px 44px; }
  .ma-closing__credits { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .ma-nav__links { display: flex; }
  .ma-nav { padding-left: 24px; padding-right: 24px; }
  .ma-hero { padding-top: 110px; }
  .ma-hero__crest { width: 124px; }
  .ma-chapter { padding: 94px 40px; }
  .ma-wizard__body { padding-top: 24px; }
  .ma-book-spread__right { padding: 40px 38px 44px; }
  .ma-gallery { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .ma-portrait:nth-child(even) { margin-top: 26px; }
  .ma-alignment { padding: 100px 40px; }
  .ma-clock__unit strong { font-size: 3.2rem; }
  .ma-scroll__paper { padding: 46px 48px 86px; }
}
@media (max-width: 379px) {
  .ma-hero__title { font-size: 2.7rem; }
  .ma-book { width: 78vw; }
  .ma-book__title { font-size: 1rem; }
  .ma-clock__unit strong { font-size: 1.65rem; }
  .ma-gallery { gap: 8px; }
  .ma-portrait__cap { font-size: 0.58rem; }
  .ma-scroll__paper { padding: 24px 14px 28px; }
  .ma-book-spread__right { padding: 16px 14px 22px; }
  .ma-hero__index { gap: 6px 10px; }
  .ma-hero__index a { font-size: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ma-star, .ma-candle, .ma-candle__flame, .ma-particle, .ma-portrait img, .ma-hero__scroll { animation: none; }
  .ma-particle { display: none; }
  .ma-book__cover { transition-duration: 0.001ms !important; }
  .ma-gate, .ma-app { transition-duration: 0.001ms !important; }
  .ma-book-spread.is-flipping .ma-book-spread__flip { animation: none; }
  .ma-spark { display: none; }
}

@media (max-height: 680px) {
  .ma-gate { overflow-y: auto; justify-content: flex-start; padding-top: 48px; overscroll-behavior: contain; }
}
