:root {
  --bg: #FDF7EE;
  --bg-grad: radial-gradient(circle at 18% 12%, rgba(235, 193, 128, 0.25), transparent 45%),
             radial-gradient(circle at 82% 24%, rgba(124, 168, 206, 0.18), transparent 48%);
  --surface: rgba(255, 252, 246, 0.78);
  --surface-strong: rgba(255, 253, 249, 0.94);
  --border: rgba(196, 152, 86, 0.26);
  --ink: #362922;
  --ink-soft: #726155;
  --gold: #C48F44;
  --gold-bright: #E8B86B;
  --accent: #547EA6;
  --btn-text: #FFFDF9;
  --shadow: 0 18px 46px rgba(72, 49, 28, 0.11);
  --radius-lg: 28px;
  --radius-md: 20px;
  --font-serif: "Noto Serif SC", "Cormorant Garamond", "Songti SC", "STSong", Georgia, serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

body[data-theme="dawn"] {
  --bg: #FDF7EE;
  --surface: rgba(255, 252, 247, 0.78);
  --surface-strong: rgba(255, 253, 249, 0.94);
  --border: rgba(196, 152, 86, 0.26);
  --ink: #362922;
  --ink-soft: #726155;
  --gold: #C48F44;
  --accent: #547EA6;
}

body[data-theme="cream"] {
  --bg: #F8F3EA;
  --surface: rgba(255, 252, 247, 0.8);
  --surface-strong: rgba(255, 254, 251, 0.95);
  --border: rgba(182, 142, 84, 0.24);
  --ink: #322721;
  --ink-soft: #6C5F57;
  --gold: #BF8B40;
  --accent: #4E789E;
}

body[data-theme="crimson"] {
  --bg: #6B131B;
  --surface: rgba(114, 22, 31, 0.62);
  --surface-strong: rgba(94, 16, 23, 0.88);
  --border: rgba(244, 198, 114, 0.34);
  --ink: #FFF7EC;
  --ink-soft: #F2D6BE;
  --gold: #F2C572;
  --accent: #F2C572;
  --shadow: 0 22px 54px rgba(24, 3, 6, 0.38);
}

body[data-theme="starlight"] {
  --bg: #221316;
  --surface: rgba(255, 244, 232, 0.08);
  --surface-strong: rgba(44, 24, 28, 0.92);
  --border: rgba(240, 194, 116, 0.26);
  --ink: #FFF6EB;
  --ink-soft: #DFC6B0;
  --gold: #F0C274;
  --accent: #E8A65D;
  --shadow: 0 24px 60px rgba(8, 2, 4, 0.45);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: var(--bg-grad);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: clip;
  transition: background-color 0.85s ease, color 0.65s ease;
}

body.is-locked,
body.is-lb-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button, input, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* Canvases & Toast */
#ambient-canvas,
#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#ambient-canvas { z-index: 1; }
#fx-canvas { z-index: 95; }

.toast {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translate(-50%, -14px);
  z-index: 120;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(34, 22, 18, 0.92);
  color: #FFF7EC;
  border: 1px solid rgba(242, 197, 114, 0.45);
  font-size: 13px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26);
  opacity: 0;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  text-align: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Intro Ceremony */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 34%, rgba(232, 184, 107, 0.2), transparent 55%),
    linear-gradient(160deg, #2B171B 0%, #1B0F12 100%);
  color: #FFF6EB;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.7s ease;
}

.intro-overlay.is-dismissed {
  opacity: 0;
  transform: scale(1.04);
  visibility: hidden;
  pointer-events: none;
}

.intro-card {
  position: relative;
  width: min(440px, 100%);
  text-align: center;
  padding: 34px 24px 28px;
  border-radius: 32px;
  background: rgba(255, 246, 236, 0.06);
  border: 1px solid rgba(242, 197, 114, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.intro-medallion {
  position: relative;
  width: 152px;
  height: 152px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
}

.intro-orbit {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1.5px dashed rgba(242, 197, 114, 0.55);
  animation: slowSpin 26s linear infinite;
}

.intro-halo {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 197, 114, 0.35), transparent 72%);
  animation: gentlePulse 3.2s ease-in-out infinite;
}

.intro-medallion img {
  position: relative;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  border: 2.5px solid rgba(242, 197, 114, 0.8);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
}

.intro-kicker {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #F2C572;
  border: 1px solid rgba(242, 197, 114, 0.35);
  background: rgba(242, 197, 114, 0.08);
  margin-bottom: 12px;
}

.intro-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(28px, 6vw, 34px);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.intro-subtitle {
  margin: 8px 0 4px;
  font-size: 15px;
  color: #F2D8C0;
}

.intro-date {
  margin: 0 0 18px;
  font-family: "Cormorant Garamond", var(--font-serif);
  font-size: 18px;
  letter-spacing: 0.14em;
  color: #F2C572;
}

.intro-music-opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #EAD3BE;
  cursor: pointer;
}

.intro-music-opt input {
  accent-color: #E8B86B;
  width: 16px;
  height: 16px;
}

.intro-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.intro-skip {
  background: none;
  border: none;
  color: rgba(245, 224, 200, 0.65);
  font-size: 12px;
  padding: 6px 12px;
}

/* Shared Buttons & Chips */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, #C78936 0%, #9E621C 100%);
  color: #FFFDF8;
  box-shadow: 0 10px 26px rgba(158, 98, 28, 0.34);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(184, 121, 48, 0.44);
}

.btn-glow {
  width: 100%;
  font-size: 15px;
  box-shadow: 0 12px 32px rgba(232, 184, 107, 0.38);
}

.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
  backdrop-filter: blur(12px);
}

.btn-outline:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.btn-full { width: 100%; }

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.chip-btn:hover {
  border-color: var(--gold);
}

.icon-circle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 20px;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.icon-circle-btn:hover {
  transform: scale(1.06);
  border-color: var(--gold);
}

/* Top Bar */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px max(16px, env(safe-area-inset-left));
  pointer-events: none;
}

.top-bar > * {
  pointer-events: auto;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.eq-bars span {
  width: 2.5px;
  height: 5px;
  border-radius: 2px;
  background: var(--gold);
  transition: height 0.2s ease;
}

.chip-btn.is-playing {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(232, 184, 107, 0.28);
}

.chip-btn.is-playing .eq-bars span:nth-child(1) { animation: eqBounce 0.7s ease-in-out infinite; }
.chip-btn.is-playing .eq-bars span:nth-child(2) { animation: eqBounce 0.7s ease-in-out 0.18s infinite; }
.chip-btn.is-playing .eq-bars span:nth-child(3) { animation: eqBounce 0.7s ease-in-out 0.34s infinite; }

/* Main Layout */
main {
  position: relative;
  z-index: 5;
}

.section-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 76px 18px;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 38px;
}

.sec-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.sec-title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(26px, 4.4vw, 40px);
  font-weight: 700;
  line-height: 1.25;
}

.sec-desc {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Section 1: Hero */
.hero-section {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 86px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 44px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 18px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(212, 154, 58, 0.55);
  animation: dotPulse 2s infinite;
}

.hero-heading {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: clamp(34px, 5.4vw, 56px);
  font-weight: 700;
  line-height: 1.18;
}

.hero-heading em {
  font-style: normal;
  background: linear-gradient(120deg, var(--gold) 0%, #DF8B57 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  margin: 0 0 24px;
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 500px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}

.stat-pill {
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.stat-pill strong {
  display: block;
  font-family: "Cormorant Garamond", var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--gold);
}

.stat-pill span {
  font-size: 12px;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Hero 3D Arch Showcase */
.hero-visual {
  display: flex;
  justify-content: center;
  perspective: 1100px;
}

.hero-tilt-stage {
  --rx: 0deg;
  --ry: 0deg;
  --sx: 50%;
  --sy: 30%;
  position: relative;
  width: min(410px, 90vw);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.1s linear;
}

.hero-arch-frame {
  position: relative;
  border-radius: 220px 220px 32px 32px;
  overflow: hidden;
  padding: 10px;
  background: var(--surface-strong);
  border: 1px solid rgba(200, 155, 84, 0.45);
  box-shadow: var(--shadow);
}

.hero-main-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 210px 210px 24px 24px;
}

.hero-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--sx) var(--sy), rgba(255, 255, 255, 0.28), transparent 55%);
  mix-blend-mode: overlay;
}

.arch-caption {
  position: absolute;
  left: 18px;
  right: auto;
  bottom: 18px;
  max-width: calc(100% - 178px);
  padding: 9px 14px;
  border-radius: 14px;
  background: rgba(34, 24, 18, 0.68);
  backdrop-filter: blur(10px);
  color: #FFF8EE;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.arch-caption span {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #F2C572;
}

.arch-caption strong {
  font-family: var(--font-serif);
  font-size: 15px;
}

.hero-mini-polaroid {
  position: absolute;
  right: -14px;
  bottom: -22px;
  width: 152px;
  padding: 8px 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(220, 175, 102, 0.48);
  background: #FFFDF8;
  color: #362922;
  box-shadow: 0 18px 40px rgba(45, 24, 14, 0.24);
  transform: translateZ(46px) rotate(5deg);
  transition: transform 0.25s ease;
  text-align: center;
}

.hero-mini-polaroid:hover {
  transform: translateZ(56px) rotate(2deg) scale(1.04);
}

.hero-mini-polaroid img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 6px;
}

.hero-mini-polaroid span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #B6332D;
  white-space: nowrap;
}

.hero-float-date {
  position: absolute;
  top: 24px;
  left: -14px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  font-family: "Cormorant Garamond", var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gold);
  transform: translateZ(34px) rotate(-4deg);
}

/* Section 2: Interactive 3D Stage */
.mode-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-top: 18px;
}

.mode-btn {
  min-height: 38px;
  padding: 7px 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.mode-btn.is-active {
  background: linear-gradient(135deg, #C78936, #9E621C);
  color: #FFFDF8;
  box-shadow: 0 6px 16px rgba(158, 98, 28, 0.3);
}

.stage-panel {
  display: none;
}

.stage-panel.is-active {
  display: block;
}

#sec-stage .section-shell {
  padding-bottom: 114px;
}

.coverflow-viewport {
  position: relative;
  height: 386px;
  perspective: 1200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.coverflow-aura {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(28px);
  pointer-events: none;
  transition: background 0.6s ease;
}

.coverflow-track {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.cf-card {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 0;
  border: none;
  background: transparent;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
}

.cf-card.is-portrait {
  width: 244px;
  margin-left: -122px;
  margin-top: -152px;
}

.cf-card.is-landscape {
  width: 340px;
  margin-left: -170px;
  margin-top: -136px;
}

.cf-card-inner {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  padding: 8px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(32, 20, 12, 0.2);
}

.cf-card.is-center .cf-card-inner {
  border-color: var(--gold);
  box-shadow: 0 26px 64px rgba(38, 22, 12, 0.28);
}

.cf-card.is-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 16px;
}

.cf-card.is-landscape img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.cf-num {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(28, 18, 14, 0.62);
  color: #FFF8EE;
  font-size: 11px;
  font-weight: 600;
}

.coverflow-controls {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 14px;
  max-width: 660px;
  margin: 8px auto 0;
}

.cf-caption-box {
  text-align: center;
  padding: 16px 20px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.cf-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.cf-title {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 20px;
}

.cf-desc {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-soft);
}

.cf-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}

.cf-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: rgba(180, 140, 88, 0.3);
  transition: width 0.25s ease, background-color 0.25s ease;
}

.cf-dot.is-active {
  width: 24px;
  background: var(--gold);
}

.stage-hint {
  text-align: center;
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}

/* Polaroid Stack */
.polaroid-deck {
  position: relative;
  height: 430px;
  width: min(360px, 100%);
  margin: 12px auto 20px;
}

.polaroid-card {
  position: absolute;
  inset: 0;
  padding: 14px 14px 18px;
  border-radius: 20px;
  background: #FFFDF8;
  color: #342721;
  border: 1px solid rgba(196, 152, 86, 0.35);
  box-shadow: 0 18px 46px rgba(45, 28, 16, 0.16);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
  user-select: none;
  touch-action: pan-y;
}

.polaroid-card.is-top {
  cursor: grab;
  touch-action: none;
}

.polaroid-card.is-top:active {
  cursor: grabbing;
}

.polaroid-card.is-flying-right {
  transform: translate3d(420px, 24px, 0) rotate(18deg) !important;
  opacity: 0;
}

.polaroid-photo-wrap {
  flex: 1;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #F3EBDF;
  display: flex;
  align-items: center;
  justify-content: center;
}

.polaroid-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.polaroid-foot {
  padding-top: 12px;
}

.polaroid-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.polaroid-title-row strong {
  font-family: var(--font-serif);
  font-size: 18px;
}

.polaroid-title-row span {
  font-size: 12px;
  color: #8A7665;
}

.polaroid-foot p {
  margin: 0;
  font-size: 13px;
  color: #6B5D53;
}

.polaroid-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* Chapter 1 & Chapter 2 Editorial Galleries */
.gallery-portraits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 780px;
  margin: 0 auto 28px;
}

.gallery-landscapes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.gallery-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 26px;
}

.gallery-card {
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.card-media {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.05);
}

.card-media.is-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-media.is-landscape img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-card:hover .card-media img {
  transform: scale(1.035);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(28, 18, 14, 0.64);
  color: #FFF8EE;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.card-zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.85);
  color: #362922;
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.gallery-card:hover .card-zoom-hint {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  padding: 16px 18px 18px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.card-title-row h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
}

.card-body p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  font-size: 12px;
  font-weight: 600;
  transition: transform 0.18s ease, border-color 0.2s ease;
}

.like-btn:active { transform: scale(0.92); }
.like-btn.is-liked { border-color: #E35D5B; }

/* Spotlight Card in Crimson Chapter */
.spotlight-card {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  align-items: center;
  gap: 28px;
  padding: 20px;
  border-radius: 30px;
  background: rgba(132, 24, 34, 0.56);
  border: 1.5px solid rgba(242, 197, 114, 0.45);
  box-shadow: 0 28px 66px rgba(20, 2, 5, 0.44);
  backdrop-filter: blur(14px);
}

.spotlight-media {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
}

.spotlight-media img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.spotlight-media:hover img {
  transform: scale(1.03);
}

.spotlight-ribbon {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #F4CC7B, #D79C43);
  color: #4D1014;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.spotlight-copy {
  padding: 8px 12px;
}

.spot-kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #F2C572;
  margin-bottom: 10px;
}

.spotlight-copy h3 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 34px);
}

.spotlight-copy p {
  margin: 0 0 22px;
  font-size: 15px;
  color: #F5DEC9;
}

.spot-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* Section 5: Finale (Letter, Wishing Wall, Postcard Studio) */
.letter-card {
  position: relative;
  max-width: 780px;
  margin: 0 auto 64px;
  padding: 46px 36px 38px;
  border-radius: 28px;
  background: linear-gradient(170deg, rgba(255, 249, 240, 0.96), rgba(246, 236, 221, 0.94));
  color: #362821;
  border: 1px solid rgba(224, 178, 102, 0.5);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
}

.wax-seal {
  position: absolute;
  top: -28px;
  right: 34px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(255, 235, 198, 0.65);
  background: radial-gradient(circle at 32% 28%, #D84840, #961D18);
  color: #FFF4DF;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
  transform: rotate(-8deg);
  transition: transform 0.25s ease;
}

.wax-seal:hover {
  transform: rotate(0deg) scale(1.06);
}

.wax-seal.is-stamped {
  animation: stampBounce 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.wax-seal span {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
}

.wax-seal small {
  font-size: 8px;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.letter-heading {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 28px);
  color: #7E261E;
}

.letter-body p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.85;
  color: #46372E;
}

.letter-sign {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed rgba(182, 134, 72, 0.38);
  text-align: right;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: #843124;
}

/* Wishing Stream */
.wishes-block {
  margin-bottom: 68px;
}

.sub-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.sub-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 28px);
}

.sub-badge {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  color: var(--gold);
}

.wish-stream {
  overflow: hidden;
  padding: 10px 0;
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.wish-row {
  display: flex;
  width: max-content;
  gap: 12px;
  margin-bottom: 12px;
}

.wish-row.row-1 { animation: marqueeLeft 44s linear infinite; }
.wish-row.row-2 { animation: marqueeRight 48s linear infinite; }
.wish-stream:hover .wish-row { animation-play-state: paused; }

.wish-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 245, 232, 0.1);
  border: 1px solid rgba(242, 197, 114, 0.25);
  color: #FFF5E8;
  font-size: 13px;
  white-space: nowrap;
}

.wish-pill.is-user-wish {
  background: rgba(242, 197, 114, 0.18);
  border-color: rgba(242, 197, 114, 0.68);
}

.wish-pill strong {
  color: #F2C572;
}

.wish-form {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.wish-icons {
  display: flex;
  gap: 6px;
}

.wish-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
}

.wish-icon-btn.is-active {
  border-color: var(--gold);
  background: rgba(242, 197, 114, 0.22);
}

.input-field {
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 250, 244, 0.1);
  color: var(--ink);
  font-size: 14px;
  outline: none;
}

.input-field::placeholder {
  color: var(--ink-soft);
  opacity: 0.78;
}

.input-field:focus {
  border-color: var(--gold);
}

.wish-author-input { width: 150px; }
.wish-text-input { flex: 1; min-width: 220px; }

/* Postcard Studio */
.poster-studio {
  padding: 28px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.poster-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  gap: 28px;
  margin-top: 18px;
}

.poster-preview-wrap {
  display: flex;
  justify-content: center;
}

#poster-canvas {
  width: min(360px, 100%);
  height: auto;
  border-radius: 18px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.42);
}

.poster-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.control-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.poster-thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.poster-thumb-btn {
  padding: 2px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: transparent;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.2s ease;
}

.poster-thumb-btn img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 7px;
}

.poster-thumb-btn.is-active {
  border-color: var(--gold);
  transform: scale(1.05);
}

.poster-theme-btns {
  display: flex;
  gap: 10px;
}

.poster-theme-btns .mode-btn {
  flex: 1;
  border: 1px solid var(--border);
}

.poster-tip {
  margin: 0;
  font-size: 12px;
  color: var(--ink-soft);
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 34px 18px calc(92px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 13px;
}

.site-footer p { margin: 4px 0; }

.footer-btns {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

/* Bottom Floating Dock */
.bottom-dock {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
  max-width: calc(100vw - 20px);
}

.bottom-dock a {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.22s ease, color 0.22s ease;
}

.bottom-dock a.is-active {
  background: linear-gradient(135deg, #C78936, #9E621C);
  color: #FFFDF8;
}

/* Cinema Lightbox & MV Mode */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #140B0D;
  color: #FFF7EC;
  opacity: 0;
  transition: opacity 0.26s ease;
}

.lightbox.is-open { opacity: 1; }

.lb-bg {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(44px) brightness(0.32);
  transform: scale(1.1);
  pointer-events: none;
}

.lb-progress-track {
  position: relative;
  z-index: 2;
  height: 3px;
  background: rgba(255, 255, 255, 0.14);
}

.lb-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #F2C572, #FFE6AA);
}

.lb-topbar,
.lb-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
}

.lb-topbar .chip-btn,
.lb-bottom .chip-btn {
  background: rgba(255, 250, 244, 0.12);
  color: #FFF7EC;
  border-color: rgba(242, 197, 114, 0.32);
}

.lb-topbar .icon-circle-btn {
  background: rgba(255, 250, 244, 0.14);
  color: #FFF7EC;
  border-color: rgba(255, 255, 255, 0.24);
}

.lb-counter {
  font-family: "Cormorant Garamond", var(--font-serif);
  font-size: 16px;
  letter-spacing: 0.12em;
  color: #F2C572;
}

.lb-top-actions,
.lb-bottom-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-stage {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 54px;
}

.lb-frame {
  max-width: 100%;
  max-height: 100%;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.56);
}

.lb-frame img {
  max-width: 100%;
  max-height: calc(100svh - 210px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.lb-frame.is-kenburns img {
  animation: kenBurns 5.4s ease-out forwards;
}

.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(20, 12, 14, 0.56);
  color: #FFF7EC;
  font-size: 26px;
  display: grid;
  place-items: center;
}

.lb-arrow-prev { left: 10px; }
.lb-arrow-next { right: 10px; }

.lb-bottom {
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(16, 8, 10, 0.84), transparent);
}

.lb-tag {
  display: inline-block;
  font-size: 11px;
  color: #F2C572;
}

.lb-meta h3 {
  margin: 2px 0;
  font-family: var(--font-serif);
  font-size: 20px;
}

.lb-meta p {
  margin: 0;
  font-size: 13px;
  color: #E8D5C2;
}

/* Customizer Drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  justify-content: flex-end;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 8, 6, 0.54);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.drawer.is-open .drawer-backdrop { opacity: 1; }

.drawer-panel {
  position: relative;
  width: min(440px, 100vw);
  height: 100%;
  overflow-y: auto;
  padding: 22px 20px 30px;
  background: #FFF9F0;
  color: #352720;
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.26);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.drawer.is-open .drawer-panel { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.drawer-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
}

.drawer-head .icon-circle-btn {
  background: #F4EAE0;
  color: #352720;
}

.drawer-field {
  margin-bottom: 14px;
}

.drawer-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #7A5A3E;
  margin-bottom: 5px;
}

.drawer-field input,
.drawer-field textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(182, 134, 72, 0.35);
  background: #FFFFFF;
  color: #352720;
  font-size: 14px;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.drawer-actions .btn-outline {
  background: #F5ECE0;
  color: #352720;
}

/* Keyframes */
@keyframes slowSpin {
  to { transform: rotate(360deg); }
}

@keyframes gentlePulse {
  0%, 100% { transform: scale(1); opacity: 0.72; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(212, 154, 58, 0.65); }
  70% { box-shadow: 0 0 0 8px rgba(212, 154, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 154, 58, 0); }
}

@keyframes eqBounce {
  0%, 100% { height: 4px; }
  50% { height: 12px; }
}

@keyframes stampBounce {
  0% { transform: rotate(-8deg) scale(1); }
  45% { transform: rotate(4deg) scale(1.22); }
  100% { transform: rotate(-8deg) scale(1); }
}

@keyframes marqueeLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marqueeRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

@keyframes kenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

/* Responsive Breakpoints */
@media (max-width: 920px) {
  .hero-grid,
  .spotlight-card,
  .poster-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 36px;
    text-align: center;
  }

  .hero-tagline { margin-inline: auto; }
  .hero-actions { justify-content: center; }

  .gallery-landscapes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .section-shell { padding: 62px 14px; }
  .hero-section { padding-top: 76px; }
  .brand-pill { font-size: 12px; padding: 5px 11px; }
  .chip-btn { padding: 5px 10px; font-size: 11px; }

  .hero-mini-polaroid {
    width: 134px;
    right: -4px;
    bottom: -16px;
  }

  .arch-caption {
    max-width: calc(100% - 152px);
    left: 16px;
    bottom: 16px;
    padding: 8px 12px;
  }

  .hero-float-date {
    left: 2px;
    top: 14px;
  }

  .coverflow-viewport { height: 326px; }

  .cf-card.is-portrait {
    width: 196px;
    margin-left: -98px;
    margin-top: -122px;
  }

  .cf-card.is-landscape {
    width: 266px;
    margin-left: -133px;
    margin-top: -106px;
  }

  .coverflow-controls {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 8px;
  }

  .icon-circle-btn { width: 38px; height: 38px; }

  .gallery-portraits,
  .gallery-landscapes,
  .gallery-pair {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .letter-card { padding: 38px 20px 28px; }
  .wax-seal { width: 60px; height: 60px; right: 18px; top: -24px; }
  .wax-seal span { font-size: 16px; }

  .poster-studio { padding: 18px; }
  .poster-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .wish-form {
    flex-direction: column;
    align-items: stretch;
  }

  .wish-author-input { width: 100%; }
  .wish-text-input { min-width: 0; width: 100%; flex: none; }
  .wish-form .btn { width: 100%; }

  .bottom-dock a {
    padding: 7px 10px;
    font-size: 11px;
  }

  .lb-stage { padding: 8px 10px; }
  .lb-arrow { width: 36px; height: 36px; font-size: 22px; }
  .lb-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro-orbit,
  .intro-halo,
  .pulse-dot,
  .wish-row.row-1,
  .wish-row.row-2,
  .lb-frame.is-kenburns img {
    animation: none !important;
  }
  .reveal { opacity: 1; transform: none; transition: none; }
}
