/* ============================================================

   THE MAHROZ CHRONICLES — CINEMATIC EDITION

   Complete style.css

   Birthday: 06 November 2026

   From: Your Veere, Ahad

   ============================================================ */

/* 01 — DESIGN SYSTEM */

:root {

  --night: #171116;

  --plum: #241b22;

  --plum-light: #33232f;

  --burgundy: #632c40;

  --burgundy-light: #88455e;

  --gold: #c9a574;

  --gold-light: #e4c99e;

  --gold-dark: #96734d;

  --ivory: #f4e9d8;

  --paper: #f7eedf;

  --paper-dark: #e9d8bd;

  --ink: #402936;

  --ink-soft: #67535c;

  --sage: #77816c;

  --muted: #c6b2ab;

  --display: "Playfair Display", Georgia, serif;

  --book: "Cormorant Garamond", Georgia, serif;

  --ui: "DM Sans", Arial, sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);

  --header-height: 76px;

  color-scheme: dark;

}

/* 02 — RESET */

*,

*::before,

*::after {

  box-sizing: border-box;

}

html {

  scroll-behavior: smooth;

  scroll-padding-top: 70px;

}

body {

  margin: 0;

  min-width: 320px;

  min-height: 100vh;

  overflow-x: hidden;

  background: var(--night);

  color: var(--ivory);

  font-family: var(--ui);

  -webkit-font-smoothing: antialiased;

}

body.is-locked,

body.is-intro,

body.modal-open {

  overflow: hidden;

}

button,

input,

textarea {

  font: inherit;

}

button {

  cursor: pointer;

}

button:focus-visible,

a:focus-visible {

  outline: 2px solid var(--gold-light);

  outline-offset: 5px;

}

a {

  color: inherit;

  text-decoration: none;

}

img,

canvas {

  display: block;

  max-width: 100%;

}

[hidden] {

  display: none !important;

}

::selection {

  background: var(--gold);

  color: var(--night);

}

.sr-only {

  position: absolute !important;

  width: 1px !important;

  height: 1px !important;

  padding: 0 !important;

  margin: -1px !important;

  overflow: hidden !important;

  clip: rect(0, 0, 0, 0) !important;

  white-space: nowrap !important;

  border: 0 !important;

}

/* 03 — AMBIENT BACKGROUND */

.ambient-background {

  position: fixed;

  inset: 0;

  z-index: -2;

  overflow: hidden;

  pointer-events: none;

  background:

    radial-gradient(ellipse at 50% 15%, #4c293c55, transparent 58%),

    linear-gradient(145deg, #211820, #120e12 65%, #271923);

}

.ambient-glow {

  position: absolute;

  width: 520px;

  height: 520px;

  border-radius: 50%;

  filter: blur(110px);

  opacity: .28;

  animation: ambientDrift 20s ease-in-out infinite alternate;

}

.glow-one {

  top: -180px;

  left: -150px;

  background: #95435d;

}

.glow-two {

  right: -200px;

  bottom: -200px;

  background: #8c6649;

  animation-delay: -9s;

}

.grain-overlay {

  position: absolute;

  inset: 0;

  opacity: .09;

  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http\\://www\\.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");

}

@keyframes ambientDrift {

  to {

    transform: translate(80px, 55px) scale(1.15);

  }

}

/* 04 — FLOATING PARTICLES */

.floating-particles {

  position: fixed;

  inset: 0;

  z-index: 3;

  overflow: hidden;

  pointer-events: none;

}

.floating-particle {

  position: absolute;

  bottom: -20px;

  width: 3px;

  height: 3px;

  border-radius: 50%;

  background: var(--gold-light);

  box-shadow: 0 0 12px #e4c99e77;

  animation: particleFloat 18s linear infinite;

}

@keyframes particleFloat {

  0% {

    opacity: 0;

    transform: translateY(0);

  }

  15% {

    opacity: .65;

  }

  85% {

    opacity: .45;

  }

  100% {

    opacity: 0;

    transform: translate(35px, -110vh);

  }

}

/* 05 — COUNTDOWN / INTRO SCREEN */

.screen {

  position: fixed;

  inset: 0;

  z-index: 100;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 24px;

  overflow-y: auto;

  opacity: 0;

  visibility: hidden;

  pointer-events: none;

  transition: opacity .65s ease, visibility .65s ease;

}

.screen.is-active {

  opacity: 1;

  visibility: visible;

  pointer-events: auto;

}

.countdown-screen {

  background:

    radial-gradient(circle at center, #512a3b66, transparent 65%),

    #171116;

}

.countdown-frame {

  position: relative;

  width: min(100%, 820px);

  margin: auto;

  padding: 42px 25px;

  text-align: center;

  animation: riseIn 1.2s var(--ease) both;

}

.countdown-frame::before,

.countdown-frame::after {

  content: "";

  position: absolute;

  width: 85px;

  height: 85px;

  border-color: #c9a57477;

  border-style: solid;

}

.countdown-frame::before {

  top: 0;

  left: 0;

  border-width: 1px 0 0 1px;

}

.countdown-frame::after {

  right: 0;

  bottom: 0;

  border-width: 0 1px 1px 0;

}

.countdown-top-ornament {

  color: var(--gold);

  font-size: 23px;

  letter-spacing: 12px;

  margin-bottom: 22px;

}

.eyebrow,

.countdown-label,

.countdown-date,

.section-kicker {

  font-family: var(--ui);

  font-size: 10px;

  font-weight: 700;

  letter-spacing: .22em;

  text-transform: uppercase;

}

.eyebrow {

  color: var(--gold-light);

  margin: 0 0 25px;

}

.countdown-book-symbol {

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 15px;

  width: 110px;

  height: 110px;

  margin: 0 auto 20px;

  border: 1px solid #c9a57477;

  border-radius: 50%;

  color: var(--gold-light);

}

.book-monogram {

  font-family: var(--display);

  font-size: 64px;

}

.countdown-title {

  margin: 0;

  font-family: var(--display);

  font-size: clamp(42px, 8vw, 83px);

  font-weight: 400;

  line-height: 1.2;

  letter-spacing: -.055em;

}

.countdown-title em {

  display: block;

  color: var(--gold-light);

  font-weight: 400;

}

.countdown-description {

  max-width: 470px;

  margin: 22px auto 27px;

  color: var(--muted);

  font-family: var(--book);

  font-size: 25px;

  font-style: italic;

}

.ornamental-divider,

.hero-rule,

.epilogue-divider {

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 15px;

  color: var(--gold);

}

.ornamental-divider {

  width: 230px;

  margin: 0 auto 25px;

}

.ornamental-divider span,

.hero-rule span,

.epilogue-divider span {

  flex: 1;

  height: 1px;

  background: linear-gradient(90deg, transparent, #c9a57488);

}

.ornamental-divider span:last-child,

.hero-rule span:last-child,

.epilogue-divider span:last-child {

  transform: rotate(180deg);

}

.countdown-label {

  margin: 0 0 19px;

  color: var(--gold-light);

}

.countdown-grid {

  display: flex;

  align-items: flex-start;

  justify-content: center;

  gap: clamp(6px, 2vw, 22px);

}

.countdown-unit {

  display: flex;

  flex-direction: column;

  align-items: center;

  min-width: clamp(62px, 12vw, 110px);

  padding: 15px 8px;

  border: 1px solid #c9a57455;

  border-radius: 5px;

  background: #ffffff08;

}

.countdown-number {

  font-family: var(--display);

  font-size: clamp(27px, 5vw, 48px);

  font-variant-numeric: tabular-nums;

  line-height: 1.1;

}

.countdown-unit-label {

  margin-top: 10px;

  color: var(--gold);

  font-size: 8px;

  font-weight: 700;

  letter-spacing: .12em;

}

.countdown-colon {

  padding-top: 21px;

  color: var(--gold);

  font-size: 25px;

}

.countdown-date {

  margin-top: 25px;

  color: var(--gold-light);

}

.countdown-bottom-note {

  margin-top: 36px;

  color: var(--muted);

  font-family: var(--book);

  font-size: 21px;

  font-style: italic;

}

@keyframes riseIn {

  from {

    opacity: 0;

    transform: translateY(25px);

  }

  to {

    opacity: 1;

    transform: translateY(0);

  }

}

/* 06 — CINEMATIC INTRO */

.intro-screen {

  z-index: 110;

  background: radial-gradient(circle, #4d293c, #171116 72%);

}

.intro-light {

  position: absolute;

  width: 500px;

  height: 500px;

  border-radius: 50%;

  background: #c9a57422;

  filter: blur(100px);

  animation: lightPulse 3s ease-in-out infinite alternate;

}

@keyframes lightPulse {

  to {

    transform: scale(1.3);

    opacity: .45;

  }

}

.intro-content {

  position: relative;

  z-index: 1;

  text-align: center;

}

.intro-kicker {

  color: var(--gold-light);

  font-size: 10px;

  font-weight: 700;

  letter-spacing: .25em;

  animation: riseIn 1s both;

}

.intro-emblem {

  margin: 25px 0;

  color: var(--gold);

  font-size: 42px;

  animation: introRotate 3s ease both;

}

@keyframes introRotate {

  from {

    opacity: 0;

    transform: rotate(-100deg) scale(.3);

  }

  to {

    opacity: 1;

    transform: rotate(0) scale(1);

  }

}

.intro-first-line,

.intro-second-line {

  font-family: var(--book);

  font-size: clamp(23px, 4vw, 34px);

  font-style: italic;

}

.intro-first-line {

  animation: riseIn 1s .4s both;

}

.intro-main-name {

  margin: 5px 0;

  color: var(--gold-light);

  font-family: var(--display);

  font-size: clamp(65px, 13vw, 145px);

  font-weight: 400;

  letter-spacing: -.07em;

  animation: riseIn 1.2s .8s both;

}

.intro-second-line {

  animation: riseIn 1s 1.2s both;

}

.intro-line-divider {

  width: 100px;

  height: 1px;

  margin: 25px auto;

  background: var(--gold);

  animation: riseIn 1s 1.5s both;

}

.intro-birthday-message {

  color: var(--gold-light);

  font-family: var(--display);

  font-size: clamp(19px, 3vw, 28px);

  animation: riseIn 1s 1.7s both;

}

/* 07 — MAIN SITE & HEADER */

.birthday-site {

  position: relative;

  z-index: 5;

  opacity: 0;

  visibility: hidden;

  pointer-events: none;

  transition: opacity .9s ease, visibility .9s ease;

}

.birthday-site.is-unlocked {

  opacity: 1;

  visibility: visible;

  pointer-events: auto;

}

.site-header {

  position: fixed;

  z-index: 50;

  top: 0;

  left: 0;

  right: 0;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  min-height: var(--header-height);

  padding: 14px clamp(20px, 5vw, 75px);

  border-bottom: 1px solid #c9a57422;

  background: #171116aa;

  backdrop-filter: blur(18px);

  -webkit-backdrop-filter: blur(18px);

}

.site-logo {

  display: inline-flex;

  align-items: center;

  gap: 12px;

  color: var(--gold-light);

  font-size: 10px;

  font-weight: 700;

  letter-spacing: .17em;

}

.logo-star {

  font-size: 24px;

}

.header-actions {

  display: flex;

  align-items: center;

  gap: 25px;

}

.header-edition {

  color: var(--muted);

  font-size: 9px;

  letter-spacing: .14em;

}

.music-toggle {

  display: inline-flex;

  align-items: center;

  gap: 10px;

  min-height: 40px;

  padding: 8px 15px;

  border: 1px solid #c9a57477;

  border-radius: 30px;

  background: #c9a57411;

  color: var(--gold-light);

  font-size: 10px;

  font-weight: 700;

  letter-spacing: .08em;

  transition: background .25s ease, transform .25s ease;

}

.music-toggle:hover {

  background: #c9a57422;

  transform: translateY(-2px);

}

.music-icon {

  display: flex;

  align-items: flex-end;

  gap: 2px;

  height: 13px;

}

.music-icon i {

  width: 2px;

  height: 5px;

  background: currentColor;

}

.music-toggle.playing .music-icon i {

  animation: musicBars .75s ease-in-out infinite alternate;

}

.music-toggle.playing .music-icon i:nth-child(2) {

  animation-delay: .2s;

}

.music-toggle.playing .music-icon i:nth-child(3) {

  animation-delay: .4s;

}

.music-toggle.playing .music-icon i:nth-child(4) {

  animation-delay: .1s;

}

@keyframes musicBars {

  to {

    height: 13px;

  }

}

.story-progress {

  position: fixed;

  z-index: 51;

  top: var(--header-height);

  left: 0;

  width: 100%;

  height: 2px;

  background: #c9a57415;

}

.story-progress-fill {

  width: 0;

  height: 100%;

  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));

  transition: width .12s linear;

}

/* 08 — GLOBAL CINEMATIC SCENES */

.scene {

  position: relative;

  isolation: isolate;

  overflow: hidden;

}

.story-scene {

  padding: clamp(100px, 13vw, 175px) 25px;

}

.story-container {

  position: relative;

  z-index: 2;

  width: min(100%, 1120px);

  margin: 0 auto;

}

.section-heading {

  margin-bottom: 70px;

  text-align: center;

}

.section-kicker {

  color: var(--gold);

}

.section-ornament {

  display: block;

  margin: 15px auto 10px;

  color: var(--gold);

  font-size: 26px;

}

.section-heading h2 {

  margin: 0;

  font-family: var(--display);

  font-size: clamp(43px, 6.8vw, 84px);

  font-weight: 400;

  line-height: 1.17;

  letter-spacing: -.055em;

}

.section-heading h2 em {

  color: var(--gold-light);

  font-weight: 400;

}

.section-rule {

  width: 100px;

  height: 1px;

  margin: 25px auto 0;

  background: var(--gold);

}

.section-intro {

  max-width: 760px;

  margin: -20px auto 55px;

  color: var(--muted);

  font-family: var(--book);

  font-size: clamp(23px, 3vw, 32px);

  line-height: 1.4;

  text-align: center;

}

/* Scroll reveal — JS adds .is-visible */

.reveal {

  opacity: 1;

  transform: none;

}

.js-ready .reveal:not(.is-visible) {

  opacity: 0;

  transform: translateY(45px);

}

.js-ready .reveal {

  transition:

    opacity 1s var(--ease),

    transform 1s var(--ease);

}

.js-ready .reveal.is-visible {

  opacity: 1;

  transform: translateY(0);

}

/* 09 — CINEMATIC HERO */

.hero-scene {

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  min-height: 100svh;

  padding: 135px 25px 90px;

  text-align: center;

  background:

    radial-gradient(ellipse at 50% 43%, #632c4055, transparent 60%),

    linear-gradient(180deg, #241820, #171116);

}

.hero-scene::before {

  content: "";

  position: absolute;

  inset: 20px;

  border: 1px solid #c9a57422;

  pointer-events: none;

}

.hero-stars span {

  position: absolute;

  color: var(--gold);

  animation: starPulse 3s ease-in-out infinite alternate;

}

.hero-stars span:nth-child(1) {

  top: 19%;

  left: 15%;

}

.hero-stars span:nth-child(2) {

  top: 31%;

  right: 14%;

  animation-delay: .7s;

}

.hero-stars span:nth-child(3) {

  bottom: 23%;

  left: 11%;

  animation-delay: 1.2s;

}

.hero-stars span:nth-child(4) {

  bottom: 15%;

  right: 17%;

  animation-delay: 1.8s;

}

@keyframes starPulse {

  from {

    opacity: .25;

    transform: scale(.8);

  }

  to {

    opacity: 1;

    transform: scale(1.3);

  }

}

.hero-visual {

  position: relative;

  width: 210px;

  height: 210px;

  margin-bottom: 28px;

}

.hero-halo {

  position: absolute;

  inset: -15px;

  border: 1px solid #c9a57444;

  border-radius: 50%;

  box-shadow: 0 0 75px #c9a57422;

  animation: haloBreath 5s ease-in-out infinite alternate;

}

@keyframes haloBreath {

  to {

    transform: scale(1.08);

    opacity: .6;

  }

}

.hero-book {

  position: absolute;

  inset: 24px 43px;

  border-radius: 3px 9px 9px 3px;

  border: 2px solid var(--gold);

  background: linear-gradient(135deg, #773a52, #3d1c2d);

  box-shadow:

    7px 8px 0 #e4d0b1,

    13px 15px 30px #0006;

  transform: rotate(-8deg);

  animation: bookFloat 5s ease-in-out infinite alternate;

}

@keyframes bookFloat {

  to {

    transform: rotate(-3deg) translateY(-10px);

  }

}

.hero-book-border {

  position: absolute;

  inset: 8px;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: space-around;

  border: 1px solid #c9a57499;

  color: var(--gold-light);

}

.hero-book-letter {

  font-family: var(--display);

  font-size: 65px;

}

.hero-book-ornament {

  font-size: 18px;

}

.hero-flower {

  position: absolute;

  color: var(--gold);

  font-size: 48px;

  opacity: .65;

}

.flower-left {

  bottom: 0;

  left: 0;

  transform: rotate(-30deg);

}

.flower-right {

  top: 0;

  right: 0;

  transform: rotate(30deg);

}

.hero-content {

  position: relative;

  z-index: 2;

}

.hero-overline {

  color: var(--gold-light);

  font-size: 10px;

  font-weight: 700;

  letter-spacing: .25em;

}

.hero-title {

  margin: 16px 0 18px;

  font-family: var(--display);

  font-size: clamp(55px, 9vw, 125px);

  font-weight: 400;

  line-height: 1.14;

  letter-spacing: -.065em;

}

.hero-title em {

  display: block;

  color: var(--gold-light);

  font-weight: 400;

}

.hero-subtitle {

  color: var(--muted);

  font-family: var(--book);

  font-size: clamp(24px, 3.5vw, 37px);

  font-style: italic;

  line-height: 1.35;

}

.hero-rule {

  width: 220px;

  margin: 30px auto;

}

.hero-dedication {

  color: var(--ivory);

  font-family: var(--display);

  font-size: 21px;

}

.hero-author {

  color: var(--gold);

  font-family: var(--book);

  font-size: 22px;

  font-style: italic;

}

.hero-scroll-link {

  display: inline-flex;

  flex-direction: column;

  align-items: center;

  gap: 12px;

  margin-top: 35px;

  color: var(--gold-light);

  font-size: 10px;

  font-weight: 700;

  letter-spacing: .18em;

}

.scroll-arrow {

  display: grid;

  place-items: center;

  width: 38px;

  height: 38px;

  border: 1px solid #c9a57477;

  border-radius: 50%;

  font-size: 21px;

  animation: scrollBounce 2s ease-in-out infinite;

}

@keyframes scrollBounce {

  50% {

    transform: translateY(9px);

  }

}

.hero-bottom {

  position: absolute;

  right: 6%;

  bottom: 30px;

  left: 6%;

  display: flex;

  justify-content: space-between;

  gap: 15px;

  color: #c9a574aa;

  font-size: 9px;

  font-weight: 600;

  letter-spacing: .13em;

}

/* 10 — PROLOGUE */

.prologue-scene {

  background:

    radial-gradient(ellipse at 15% 50%, #5a2c4055, transparent 60%),

    #241b22;

}

.scene-ornament {

  position: absolute;

  color: #c9a57422;

  font-size: 230px;

  pointer-events: none;

}

.ornament-left {

  top: 12%;

  left: -60px;

}

.ornament-right {

  right: -35px;

  bottom: 10%;

}

.prologue-layout,

.defender-layout {

  display: grid;

  grid-template-columns: 1fr 1fr;

  align-items: center;

  gap: clamp(45px, 7vw, 100px);

}

.prologue-illustration {

  position: relative;

  display: grid;

  place-items: center;

  min-height: 510px;

}

.illustration-circle {

  position: absolute;

  width: 380px;

  height: 380px;

  max-width: 95%;

  border: 1px solid #c9a57455;

  border-radius: 50%;

  box-shadow: 0 0 80px #c9a57411;

}

.illustration-book {

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: space-around;

  width: 240px;

  height: 335px;

  padding: 30px;

  border: 2px solid var(--gold);

  border-radius: 4px 14px 14px 4px;

  background: linear-gradient(130deg, #70354d, #321a29);

  box-shadow:

    12px 12px 0 #ead9bf,

    22px 26px 40px #0007;

  transform: rotate(-9deg);

}

.illustration-book span,

.illustration-book small {

  color: var(--gold-light);

  font-size: 10px;

  letter-spacing: .2em;

}

.illustration-book strong {

  color: var(--gold-light);

  font-family: var(--display);

  font-size: 110px;

  font-weight: 400;

}

.illustration-star {

  position: absolute;

  color: var(--gold);

  font-size: 30px;

}

.star-a {

  top: 8%;

  left: 15%;

}

.star-b {

  top: 20%;

  right: 8%;

}

.star-c {

  bottom: 8%;

  left: 22%;

}

.story-prose,

.birthday-feature-copy {

  color: var(--ivory);

  font-family: var(--book);

  font-size: clamp(24px, 2.7vw, 31px);

  line-height: 1.4;

}

.story-prose p,

.birthday-feature-copy p {

  margin: 0 0 23px;

}

.drop-cap::first-letter {

  float: left;

  margin-right: 9px;

  color: var(--gold-light);

  font-family: var(--display);

  font-size: 70px;

  line-height: .95;

}

.story-quote {

  margin: 28px 0;

  padding: 22px 25px;

  border-left: 2px solid var(--gold);

  color: var(--gold-light);

  font-family: var(--display);

  font-size: clamp(21px, 2.4vw, 28px);

  font-style: italic;

  line-height: 1.55;

}

.story-quote strong {

  display: block;

  margin-top: 10px;

  font-weight: 500;

}

.story-signoff {

  color: var(--gold-light);

  font-style: italic;

}

/* 11 — CHAPTER ONE */

.chapter-one-scene {

  background: linear-gradient(160deg, #211720, #3b2131 55%, #211720);

}

.birthday-feature {

  display: grid;

  grid-template-columns: 1fr 1fr;

  align-items: center;

  gap: clamp(50px, 8vw, 110px);

}

.birthday-feature-copy strong {

  color: var(--gold-light);

}

.chapter-opening {

  font-style: italic;

}

.birthday-feature-card {

  position: relative;

  padding: 55px 35px;

  border: 1px solid var(--gold);

  background:

    radial-gradient(circle at top, #ffffffaa, transparent 65%),

    var(--paper);

  color: var(--ink);

  text-align: center;

  box-shadow: 0 30px 70px #0005;

}

.birthday-feature-card::before {

  content: "";

  position: absolute;

  inset: 12px;

  border: 1px solid #96734d77;

  pointer-events: none;

}

.feature-card-top,

.feature-card-bottom {

  color: var(--gold-dark);

  font-size: 10px;

  font-weight: 700;

  letter-spacing: .18em;

}

.feature-card-decoration {

  display: block;

  margin: 30px 0;

  color: var(--gold-dark);

  font-size: 40px;

}

.birthday-feature-card h3 {

  margin: 0;

  color: var(--ink);

  font-family: var(--display);

  font-size: clamp(40px, 5vw, 65px);

  font-weight: 400;

  line-height: 1.25;

}

.birthday-feature-card h3 em {

  color: var(--burgundy);

}

.birthday-feature-card p {

  margin: 30px 0;

  color: var(--ink-soft);

  font-family: var(--book);

  font-size: 25px;

  line-height: 1.35;

}

/* 12 — CHAPTER TWO */

.chapter-two-scene {

  background:

    radial-gradient(ellipse at 85% 50%, #6b364855, transparent 60%),

    #241b22;

}

.defender-quote {

  position: relative;

  padding: 60px 40px;

  border: 1px solid #c9a57455;

  background: #c9a5740c;

  text-align: center;

}

.large-quote-mark {

  color: var(--gold);

  font-family: var(--book);

  font-size: 130px;

  line-height: .6;

}

.defender-quote p {

  color: var(--gold-light);

  font-family: var(--display);

  font-size: clamp(25px, 3.3vw, 39px);

  font-style: italic;

  line-height: 1.5;

}

.quote-decoration {

  color: var(--gold);

  font-size: 25px;

}

/* 13 — ROAST CHAPTER */

.chapter-three-scene {

  background: linear-gradient(180deg, #2e1e2a, #1b141b);

}

.roast-header {

  margin-bottom: 30px;

  text-align: center;

}

.roast-header > span {

  display: inline-block;

  padding: 10px 18px;

  border: 1px solid #c9a57477;

  color: var(--gold-light);

  font-size: 10px;

  font-weight: 700;

  letter-spacing: .15em;

}

.roast-header p {

  color: var(--muted);

  font-family: var(--book);

  font-size: 24px;

  font-style: italic;

}

.roast-grid {

  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 24px;

}

.roast-card {

  position: relative;

  display: flex;

  flex-direction: column;

  min-height: 270px;

  padding: 30px;

  border: 1px solid #c9a57477;

  background: linear-gradient(145deg, #f5e9d6, #dfc9ac);

  color: var(--ink);

  text-align: left;

  box-shadow: 0 15px 35px #0003;

  transition:

    background .35s ease,

    border-color .35s ease,

    box-shadow .35s ease;

}

.roast-card:hover {

  box-shadow: 0 25px 50px #0005;

}

.roast-card-number {

  color: var(--gold-dark);

  font-size: 10px;

  font-weight: 700;

  letter-spacing: .15em;

}

.roast-front,

.roast-back {

  display: flex;

  flex: 1;

  flex-direction: column;

  justify-content: center;

  gap: 15px;

}

.roast-front small,

.roast-back small {

  font-size: 10px;

  font-weight: 700;

  letter-spacing: .17em;

}

.roast-front strong,

.roast-back strong {

  font-family: var(--book);

  font-size: clamp(27px, 3vw, 37px);

  font-weight: 600;

  line-height: 1.25;

}

.roast-front em {

  color: var(--gold-dark);

  font-size: 10px;

  font-style: normal;

  font-weight: 700;

  letter-spacing: .12em;

}

.roast-back {

  display: none;

}

.roast-card.is-flipped {

  background: linear-gradient(145deg, #71364c, #3b1e2e);

  color: var(--ivory);

}

.roast-card.is-flipped .roast-front {

  display: none;

}

.roast-card.is-flipped .roast-back {

  display: flex;

}

.roast-card.is-flipped .roast-card-number,

.roast-card.is-flipped .roast-back small {

  color: var(--gold-light);

}

.roast-back > span {

  font-size: 28px;

}

.roast-ending {

  margin: 55px auto 0;

  color: var(--gold-light);

  font-family: var(--book);

  font-size: 29px;

  font-style: italic;

  line-height: 1.5;

  text-align: center;

}

/* 14 — DRAMA LIBRARY */

.chapter-four-scene {

  background: linear-gradient(160deg, #241b22, #352536, #241b22);

}

.library-gallery {

  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 35px;

  align-items: stretch;

  margin: 70px auto;

}

.library-book {

  position: relative;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: space-between;

  min-height: 410px;

  padding: 35px 22px;

  border: 1px solid var(--gold);

  border-left: 12px solid #0005;

  border-radius: 3px 12px 12px 3px;

  color: var(--ivory);

  text-align: center;

  box-shadow:

    9px 10px 0 #ead9bf,

    18px 25px 35px #0005;

  transition: transform .5s var(--ease) !important;

}

.library-book:hover {

  transform: translateY(-18px) rotate(-2deg) !important;

}

.book-one {

  background: linear-gradient(135deg, #73354d, #311a29);

}

.book-two {

  background: linear-gradient(135deg, #66755c, #2b3a30);

}

.book-three {

  background: linear-gradient(135deg, #896044, #392728);

}

.library-book-edition {

  font-size: 9px;

  font-weight: 700;

  letter-spacing: .16em;

}

.library-book-symbol {

  color: var(--gold-light);

  font-size: 58px;

}

.library-book h3 {

  font-family: var(--display);

  font-size: clamp(26px, 3vw, 37px);

  font-weight: 400;

  line-height: 1.4;

}

.library-book-volume {

  color: var(--gold-light);

  font-size: 10px;

  letter-spacing: .17em;

}

.drama-profile {

  max-width: 850px;

  margin: 100px auto 0;

  padding: 45px 55px;

  border: 1px solid #c9a57455;

  background: #c9a5740c;

}

.drama-profile-heading {

  margin: 0 0 25px;

  color: var(--gold-light);

  font-size: 11px;

  font-weight: 700;

  letter-spacing: .2em;

  text-align: center;

}

.drama-profile-row {

  display: flex;

  align-items: baseline;

  justify-content: space-between;

  gap: 25px;

  padding: 18px 0;

  border-bottom: 1px solid #c9a57433;

}

.drama-profile-row:last-child {

  border-bottom: 0;

}

.drama-profile-row span {

  color: var(--gold);

  font-size: 10px;

  font-weight: 700;

  letter-spacing: .1em;

}

.drama-profile-row strong {

  font-family: var(--book);

  font-size: 26px;

  font-weight: 500;

  text-align: right;

}

/* 15 — CELEBRATION */

.celebration-scene {

  min-height: 100svh;

  padding: 130px 25px;

  background: radial-gradient(ellipse at center, #632c4066, #171116 72%);

}

.celebration-light {

  position: absolute;

  top: 40%;

  left: 50%;

  width: 500px;

  height: 500px;

  border-radius: 50%;

  background: #c9a57418;

  filter: blur(100px);

  transform: translate(-50%, -50%);

}

.celebration-container {

  text-align: center;

}

.cake-scene {

  position: relative;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: flex-end;

  width: 350px;

  height: 315px;

  max-width: 100%;

  margin: 45px auto;

  padding-bottom: 15px;

}

.cake-stars {

  position: absolute;

  inset: 0;

  pointer-events: none;

}

.cake-stars span {

  position: absolute;

  color: var(--gold-light);

  font-size: 25px;

  animation: starPulse 2s ease-in-out infinite alternate;

}

.cake-stars span:nth-child(1) {

  top: 10%;

  left: 7%;

}

.cake-stars span:nth-child(2) {

  top: 5%;

  right: 12%;

  animation-delay: .4s;

}

.cake-stars span:nth-child(3) {

  top: 45%;

  left: 0;

  animation-delay: .8s;

}

.cake-stars span:nth-child(4) {

  top: 50%;

  right: 0;

  animation-delay: 1.2s;

}

.cake-candles {

  z-index: 4;

  display: flex;

  gap: 27px;

  margin-bottom: -2px;

}

.candle {

  position: relative;

  width: 12px;

  height: 49px;

  border-radius: 3px 3px 0 0;

  background: repeating-linear-gradient(

    -35deg,

    #f9e5d3 0,

    #f9e5d3 8px,

    #a84f6b 8px,

    #a84f6b 13px

  );

}

.flame {

  position: absolute;

  bottom: calc(100% + 5px);

  left: 50%;

  width: 15px;

  height: 24px;

  border-radius: 60% 60% 60% 0;

  background: radial-gradient(circle at 50% 75%, #fffbd6, #ffd46c 40%, #ef873b);

  box-shadow: 0 0 22px #ffb444aa;

  transform: translateX(-50%) rotate(-45deg);

  animation: flameFlicker .7s ease-in-out infinite alternate;

}

.candle:nth-child(2) .flame {

  animation-delay: .2s;

}

.candle:nth-child(3) .flame {

  animation-delay: .4s;

}

@keyframes flameFlicker {

  to {

    transform: translateX(-50%) rotate(-40deg) scale(1.15);

  }

}

.cake-top {

  z-index: 3;

  width: 185px;

  height: 55px;

  border-radius: 13px 13px 4px 4px;

  background: linear-gradient(90deg, #ead1c4, #fff6e8, #e3c0b6);

  box-shadow: inset 0 -8px #dcaea8;

}

.cake-icing {

  display: block;

  height: 20px;

  border-radius: 50% 50% 30% 30%;

  background: #fff8ed;

}

.cake-middle {

  z-index: 2;

  display: grid;

  place-items: center;

  width: 245px;

  height: 78px;

  border-top: 6px solid #f1d4c1;

  border-radius: 8px 8px 3px 3px;

  background: linear-gradient(90deg, #6e2f43, #a65b74, #6e2f43);

}

.cake-middle span {

  color: var(--gold-light);

  font-family: var(--display);

  font-size: 30px;

  letter-spacing: .2em;

}

.cake-bottom {

  z-index: 1;

  width: 285px;

  height: 62px;

  border-top: 8px solid #d6a58f;

  border-radius: 8px 8px 4px 4px;

  background: linear-gradient(90deg, #e5c0ae, #fff0dc, #dfb8a8);

}

.cake-plate {

  width: 320px;

  height: 13px;

  border-radius: 50%;

  background: linear-gradient(90deg, #8b694c, #e0be8c, #8b694c);

  box-shadow: 0 12px 25px #0005;

}

.cake-scene.candles-out .flame {

  opacity: 0;

  animation: none;

  transform: translateX(-50%) scale(0);

  transition: opacity .35s, transform .35s;

}

.cake-message {

  color: var(--ivory);

  font-family: var(--book);

  font-size: 27px;

  font-style: italic;

}

.gold-button {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  gap: 14px;

  min-height: 55px;

  margin-top: 20px;

  padding: 15px 30px;

  border: 1px solid var(--gold);

  border-radius: 3px;

  background: var(--gold);

  color: var(--night);

  font-size: 11px;

  font-weight: 700;

  letter-spacing: .14em;

  transition: transform .25s, background .25s;

}

.gold-button:hover:not(:disabled) {

  transform: translateY(-4px);

  background: var(--gold-light);

}

.gold-button:disabled {

  opacity: .8;

  cursor: default;

}

.cake-footnote {

  margin-top: 25px;

  color: var(--muted);

  font-family: var(--book);

  font-size: 20px;

  font-style: italic;

}

/* 16 — SECRET ENVELOPE */

.final-letter-scene {

  min-height: 100svh;

  padding: 150px 25px;

  background: linear-gradient(160deg, #2b1d29, #171116);

  text-align: center;

}

.envelope-stage {

  position: relative;

  display: flex;

  flex-direction: column;

  align-items: center;

  margin: 65px auto 0;

}

.envelope-glow {

  position: absolute;

  top: 25px;

  width: 350px;

  height: 250px;

  max-width: 90vw;

  border-radius: 50%;

  background: #c9a57422;

  filter: blur(70px);

}

.secret-envelope {

  position: relative;

  z-index: 2;

  width: 310px;

  height: 195px;

  max-width: 85vw;

  padding: 0;

  border: 0;

  background: transparent;

  filter: drop-shadow(0 25px 25px #0006);

  transition: transform .45s var(--ease);

}

.secret-envelope:hover {

  transform: translateY(-12px) rotate(-2deg);

}

.envelope-back {

  position: absolute;

  inset: 0;

  background: #e8cba8;

  border: 1px solid #c69e75;

}

.envelope-front {

  position: absolute;

  inset: 0;

  z-index: 2;

  background: #ead0ae;

  clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%);

}

.envelope-flap {

  position: absolute;

  inset: 0;

  z-index: 3;

  background: #e5c29d;

  clip-path: polygon(0 0, 100% 0, 50% 60%);

  transform-origin: top center;

  transition: transform .5s var(--ease);

}

.secret-envelope:hover .envelope-flap {

  transform: rotateX(35deg);

}

.envelope-seal {

  position: absolute;

  z-index: 4;

  top: 52%;

  left: 50%;

  display: grid;

  place-items: center;

  width: 58px;

  height: 58px;

  border: 3px double #f5dcc299;

  border-radius: 50%;

  background: var(--burgundy);

  color: var(--gold-light);

  font-family: var(--display);

  font-size: 29px;

  transform: translate(-50%, -50%);

}

.envelope-caption {

  margin: 40px 0 5px;

  color: var(--gold-light);

  font-size: 11px;

  font-weight: 700;

  letter-spacing: .2em;

}

.envelope-instruction {

  color: var(--muted);

  font-family: var(--book);

  font-size: 23px;

  font-style: italic;

}

/* 17 — EPILOGUE */

.epilogue-scene {

  display: grid;

  place-items: center;

  min-height: 100svh;

  padding: 140px 25px;

  background: radial-gradient(ellipse at center, #5a2c4055, #171116 70%);

  text-align: center;

}

.epilogue-halo {

  position: absolute;

  width: 600px;

  height: 600px;

  max-width: 95vw;

  border: 1px solid #c9a57422;

  border-radius: 50%;

  box-shadow: 0 0 100px #c9a57411;

}

.epilogue-content {

  position: relative;

  z-index: 2;

  max-width: 800px;

}

.epilogue-ornament {

  display: block;

  margin-bottom: 30px;

  color: var(--gold);

  font-size: 65px;

}

.epilogue-title {

  margin: 20px 0;

  font-family: var(--display);

  font-size: clamp(52px, 8vw, 100px);

  font-weight: 400;

  line-height: 1.2;

  letter-spacing: -.055em;

}

.epilogue-title em {

  display: block;

  color: var(--gold-light);

}

.epilogue-divider {

  width: 220px;

  margin: 30px auto;

}

.epilogue-quote {

  color: var(--gold-light);

  font-family: var(--display);

  font-size: clamp(24px, 3.5vw, 37px);

  font-style: italic;

  line-height: 1.5;

}

.epilogue-message {

  max-width: 650px;

  margin: 30px auto;

  color: var(--muted);

  font-family: var(--book);

  font-size: clamp(23px, 3vw, 30px);

  line-height: 1.45;

}

.epilogue-birthday {

  margin: 40px 0 15px;

  color: var(--gold-light);

  font-family: var(--display);

  font-size: clamp(30px, 4.5vw, 48px);

  font-weight: 400;

}

.epilogue-signature {

  color: var(--ivory);

  font-family: var(--book);

  font-size: 27px;

  font-style: italic;

}

.epilogue-signature strong {

  color: var(--gold-light);

}

.epilogue-date {

  display: flex;

  justify-content: center;

  gap: 18px;

  margin-top: 40px;

  color: var(--gold);

  font-size: 10px;

  letter-spacing: .15em;

}

.back-to-top {

  display: inline-block;

  margin-top: 55px;

  padding: 14px 25px;

  border: 1px solid #c9a57477;

  color: var(--gold-light);

  font-size: 10px;

  font-weight: 700;

  letter-spacing: .13em;

  transition: background .25s;

}

.back-to-top:hover {

  background: #c9a57422;

}

/* 18 — FOOTER */

.site-footer {

  display: flex;

  justify-content: space-between;

  gap: 20px;

  padding: 28px 5%;

  border-top: 1px solid #c9a57433;

  background: #120e12;

  color: #c9a574aa;

  font-size: 9px;

  font-weight: 600;

  letter-spacing: .13em;

}

/* 19 — LETTER MODAL */

.letter-modal {

  position: fixed;

  inset: 0;

  z-index: 200;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 22px;

  opacity: 0;

  visibility: hidden;

  pointer-events: none;

  transition: opacity .4s ease, visibility .4s ease;

}

.letter-modal.is-open {

  opacity: 1;

  visibility: visible;

  pointer-events: auto;

}

.letter-backdrop {

  position: absolute;

  inset: 0;

  background: #100b10ed;

  backdrop-filter: blur(12px);

}

.letter-dialog {

  position: relative;

  z-index: 2;

  width: min(100%, 700px);

  max-height: 90dvh;

  transform: translateY(30px) scale(.96);

  transition: transform .45s var(--ease);

}

.letter-modal.is-open .letter-dialog {

  transform: translateY(0) scale(1);

}

.letter-close {

  position: absolute;

  z-index: 3;

  top: -12px;

  right: -12px;

  width: 44px;

  height: 44px;

  border: 1px solid var(--gold);

  border-radius: 50%;

  background: var(--burgundy);

  color: var(--ivory);

  font-size: 29px;

}

.letter-paper {

  max-height: 90dvh;

  overflow-y: auto;

  padding: 30px 45px;

  border: 1px solid var(--gold-dark);

  background:

    radial-gradient(ellipse at top, #ffffffaa, transparent 65%),

    var(--paper);

  color: var(--ink);

  box-shadow: 0 30px 90px #0008;

}

.letter-paper-top,

.letter-paper-bottom {

  display: flex;

  justify-content: space-between;

  gap: 10px;

  color: var(--gold-dark);

  font-size: 9px;

  font-weight: 700;

  letter-spacing: .13em;

}

.letter-paper-top {

  padding-bottom: 15px;

  border-bottom: 1px solid #96734d44;

}

.letter-paper-bottom {

  padding-top: 15px;

  border-top: 1px solid #96734d44;

}

.letter-content {

  padding: 30px 10px;

}

.letter-ornament {

  display: block;

  color: var(--gold-dark);

  font-size: 35px;

  text-align: center;

}

.letter-content h2 {

  color: var(--ink);

  font-family: var(--display);

  font-size: clamp(31px, 5vw, 46px);

  font-weight: 400;

  line-height: 1.3;

  text-align: center;

}

.letter-content h2 em {

  color: var(--burgundy);

}

.letter-rule {

  display: flex;

  align-items: center;

  justify-content: center;

  margin: 20px 0 30px;

  color: var(--gold-dark);

}

.letter-rule::before,

.letter-rule::after {

  content: "";

  width: 75px;

  height: 1px;

  margin: 0 12px;

  background: #96734d66;

}

.letter-content p {

  margin: 0 0 19px;

  color: var(--ink-soft);

  font-family: var(--book);

  font-size: 25px;

  line-height: 1.42;

}

.letter-content .letter-final-wish {

  margin-top: 25px;

  color: var(--burgundy);

  font-family: var(--display);

}

.letter-signature {

  margin-top: 28px !important;

  font-style: italic;

}

.letter-signature strong {

  color: var(--burgundy);

}

/* 20 — CONFETTI */

.celebration-canvas {

  position: fixed;

  inset: 0;

  z-index: 150;

  width: 100%;

  height: 100%;

  pointer-events: none;

  opacity: 0;

  visibility: hidden;

}

.celebration-canvas.is-active {

  opacity: 1;

  visibility: visible;

}

/* 21 — TABLET */

@media (max-width: 900px) {

  .prologue-layout,

  .defender-layout,

  .birthday-feature {

    grid-template-columns: 1fr;

    gap: 45px;

  }

  .prologue-illustration {

    min-height: 400px;

  }

  .illustration-circle {

    width: 320px;

    height: 320px;

  }

  .illustration-book {

    width: 190px;

    height: 270px;

  }

  .illustration-book strong {

    font-size: 85px;

  }

  .story-prose,

  .birthday-feature-copy {

    max-width: 720px;

    margin: 0 auto;

  }

  .birthday-feature-card {

    width: min(100%, 600px);

    margin: 0 auto;

  }

  .library-gallery {

    gap: 18px;

  }

  .library-book {

    min-height: 330px;

    padding: 25px 12px;

  }

}

/* 22 — MOBILE */

@media (max-width: 600px) {

  :root {

    --header-height: 64px;

  }

  html {

    scroll-padding-top: 64px;

  }

  .site-header {

    padding: 12px 15px;

    gap: 8px;

  }

  .site-logo {

    gap: 7px;

    font-size: 8px;

    letter-spacing: .07em;

  }

  .logo-star {

    font-size: 17px;

  }

  .header-edition {

    display: none;

  }

  .music-toggle {

    min-height: 35px;

    padding: 7px 10px;

    font-size: 8px;

  }

  .countdown-frame {

    padding: 30px 8px;

  }

  .countdown-frame::before,

  .countdown-frame::after {

    width: 45px;

    height: 45px;

  }

  .countdown-top-ornament {

    font-size: 17px;

    margin-bottom: 15px;

  }

  .eyebrow {

    font-size: 8px;

  }

  .countdown-book-symbol {

    width: 85px;

    height: 85px;

  }

  .book-monogram {

    font-size: 50px;

  }

  .countdown-title {

    font-size: clamp(37px, 10vw, 56px);

  }

  .countdown-description {

    font-size: 20px;

  }

  .countdown-grid {

    gap: 5px;

  }

  .countdown-unit {

    flex: 1;

    min-width: 0;

    max-width: 78px;

    padding: 12px 4px;

  }

  .countdown-number {

    font-size: clamp(24px, 7vw, 34px);

  }

  .countdown-unit-label {

    font-size: 7px;

    letter-spacing: .06em;

  }

  .countdown-colon {

    padding-top: 17px;

    font-size: 17px;

  }

  .countdown-date {

    font-size: 9px;

  }

  .countdown-bottom-note {

    font-size: 18px;

  }

  .intro-main-name {

    font-size: clamp(55px, 15vw, 80px);

  }

  .intro-first-line,

  .intro-second-line {

    font-size: 22px;

  }

  .hero-scene {

    padding: 120px 20px 100px;

  }

  .hero-scene::before {

    inset: 10px;

  }

  .hero-visual {

    width: 160px;

    height: 160px;

    margin-bottom: 15px;

  }

  .hero-book {

    inset: 20px 34px;

  }

  .hero-book-letter {

    font-size: 48px;

  }

  .hero-flower {

    font-size: 32px;

  }

  .hero-overline {

    font-size: 8px;

    letter-spacing: .15em;

  }

  .hero-title {

    font-size: clamp(47px, 12vw, 68px);

  }

  .hero-subtitle {

    font-size: 24px;

  }

  .hero-dedication {

    font-size: 18px;

  }

  .hero-author {

    font-size: 19px;

  }

  .hero-bottom {

    justify-content: center;

    font-size: 8px;

  }

  .hero-bottom span:first-child,

  .hero-bottom span:last-child {

    display: none;

  }

  .story-scene {

    padding: 90px 20px;

  }

  .section-heading {

    margin-bottom: 45px;

  }

  .section-heading h2 {

    font-size: clamp(40px, 10vw, 58px);

  }

  .section-intro {

    margin: -5px auto 35px;

    font-size: 24px;

  }

  .scene-ornament {

    font-size: 130px;

  }

  .prologue-illustration {

    min-height: 310px;

  }

  .illustration-circle {

    width: 260px;

    height: 260px;

  }

  .illustration-book {

    width: 160px;

    height: 225px;

    padding: 18px;

  }

  .illustration-book strong {

    font-size: 70px;

  }

  .illustration-book span,

  .illustration-book small {

    font-size: 8px;

  }

  .story-prose,

  .birthday-feature-copy {

    font-size: 24px;

  }

  .drop-cap::first-letter {

    font-size: 55px;

  }

  .story-quote {

    font-size: 21px;

    padding: 18px;

  }

  .birthday-feature-card {

    padding: 45px 22px;

  }

  .birthday-feature-card h3 {

    font-size: 46px;

  }

  .birthday-feature-card p {

    font-size: 23px;

  }

  .defender-quote {

    padding: 45px 25px;

  }

  .defender-quote p {

    font-size: 27px;

  }

  .roast-grid {

    grid-template-columns: 1fr;

    gap: 15px;

  }

  .roast-card {

    min-height: 215px;

    padding: 25px;

  }

  .roast-front strong,

  .roast-back strong {

    font-size: 29px;

  }

  .roast-ending {

    margin-top: 35px;

    font-size: 24px;

  }

  .library-gallery {

    grid-template-columns: 1fr;

    gap: 30px;

    max-width: 300px;

    margin: 50px auto;

  }

  .library-book {

    min-height: 360px;

    padding: 30px 20px;

  }

  .library-book h3 {

    font-size: 32px;

  }

  .drama-profile {

    margin-top: 60px;

    padding: 25px 20px;

  }

  .drama-profile-row {

    flex-direction: column;

    align-items: flex-start;

    gap: 7px;

    padding: 15px 0;

  }

  .drama-profile-row strong {

    font-size: 23px;

    text-align: left;

  }

  .celebration-scene,

  .final-letter-scene,

  .epilogue-scene {

    padding: 100px 20px;

  }

  .cake-scene {

    transform: scale(.85);

    margin: 15px auto;

  }

  .cake-message {

    font-size: 23px;

  }

  .secret-envelope {

    width: 255px;

    height: 165px;

  }

  .envelope-caption {

    font-size: 9px;

  }

  .envelope-instruction {

    font-size: 20px;

  }

  .epilogue-title {

    font-size: clamp(47px, 12vw, 68px);

  }

  .epilogue-quote {

    font-size: 25px;

  }

  .epilogue-message {

    font-size: 23px;

  }

  .epilogue-birthday {

    font-size: 32px;

  }

  .epilogue-signature {

    font-size: 24px;

  }

  .site-footer {

    flex-direction: column;

    align-items: center;

    gap: 9px;

    text-align: center;

    font-size: 8px;

  }

  .letter-modal {

    padding: 12px;

  }

  .letter-paper {

    padding: 22px 19px;

    max-height: 92dvh;

  }

  .letter-content {

    padding: 22px 4px;

  }

  .letter-content p {

    font-size: 21px;

  }

  .letter-paper-top,

  .letter-paper-bottom {

    font-size: 7px;

  }

  .letter-close {

    top: -8px;

    right: -7px;

    width: 38px;

    height: 38px;

  }

}

/* 23 — SMALL MOBILE */

@media (max-width: 380px) {

  .site-logo {

    font-size: 7px;

  }

  .hero-title {

    font-size: 43px;

  }

  .section-heading h2 {

    font-size: 37px;

  }

  .story-prose,

  .birthday-feature-copy {

    font-size: 22px;

  }

  .countdown-title {

    font-size: 35px;

  }

  .countdown-unit {

    padding: 10px 2px;

  }

}

/* 24 — REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

  *,

  *::before,

  *::after {

    scroll-behavior: auto !important;

    animation-duration: .01ms !important;

    animation-iteration-count: 1 !important;

    transition-duration: .01ms !important;

  }

  .js-ready .reveal {

    opacity: 1 !important;

    transform: none !important;

  }

}

/* END — THE MAHROZ CHRONICLES CINEMATIC EDITION */





/* ============================================================

   25 — RESPONSIVE REFINEMENT (ADDED TO COMPLETE ORIGINAL CSS)

   Preserves all original scenes, styles, colours and animations.

   ============================================================ */



/* Flexible viewport foundations */

html {

  scroll-padding-top: calc(var(--header-height) + 16px);

  -webkit-text-size-adjust: 100%;

  text-size-adjust: 100%;

}

body {

  min-width: 0;

}

.birthday-site, .scene, .screen, .story-container,

.hero-content, .intro-content, .countdown-frame,

.letter-dialog, .letter-paper, .epilogue-content {

  min-width: 0;

  max-width: 100%;

}

.prologue-layout > *, .defender-layout > *,

.birthday-feature > *, .roast-grid > *,

.library-gallery > * {

  min-width: 0;

}

.hero-title, .section-heading h2, .epilogue-title,

.intro-main-name, .countdown-title, .library-book h3,

.story-prose, .letter-content p {

  overflow-wrap: break-word;

}

.site-logo { min-width: 0; }

.header-actions { flex-shrink: 0; }

.music-toggle, .roast-card, .gold-button,

.secret-envelope, .letter-close {

  touch-action: manipulation;

}

.music-toggle, .letter-close { min-height: 44px; }

.hero-scene { min-height: 100svh; height: auto; }

.countdown-grid { width: min(100%, 560px); margin-inline: auto; }

.countdown-unit { min-width: 0; flex: 1 1 0; }

.countdown-colon { flex: 0 0 auto; }

.letter-paper {

  overscroll-behavior: contain;

  -webkit-overflow-scrolling: touch;

}

.letter-modal { max-width: 100%; }

.letter-dialog { max-height: calc(100dvh - 24px); }

.letter-paper { max-height: calc(100dvh - 24px); overflow-y: auto; }



/* Laptop / browser zoom reflow */

@media (max-width: 1100px) {

  .header-edition { display: none; }

  .library-gallery { gap: 24px; }

  .story-container { width: min(100%, 960px); }

}

@media (max-width: 900px) {

  .prologue-layout, .defender-layout, .birthday-feature {

    grid-template-columns: minmax(0, 1fr);

  }

  .library-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .library-book:last-child {

    grid-column: 1 / -1;

    width: min(100%, 350px);

    justify-self: center;

  }

  .roast-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .story-container { max-width: 720px; }

  .prologue-illustration { min-height: 400px; }

}

@media (max-width: 680px) {

  :root { --header-height: 64px; }

  .site-header { padding: 8px 14px; gap: 8px; }

  .site-logo { gap: 7px; font-size: clamp(8px, 2vw, 10px); letter-spacing: .06em; }

  .site-logo span:last-child { overflow-wrap: anywhere; }

  .header-actions { gap: 8px; }

  .music-toggle { padding: 8px 10px; font-size: 9px; white-space: nowrap; }

  .story-scene { padding: clamp(74px, 13vw, 100px) clamp(16px, 5vw, 28px); }

  .hero-scene { padding: calc(var(--header-height) + 36px) 18px 85px; }

  .hero-scene::before { inset: 10px; }

  .hero-title { font-size: clamp(2.5rem, 10.5vw, 4.5rem); line-height: 1.15; }

  .hero-subtitle { font-size: clamp(1.3rem, 5.6vw, 1.7rem); }

  .hero-visual { width: 155px; height: 155px; margin-bottom: 12px; }

  .hero-book { inset: 19px 32px; }

  .hero-book-letter { font-size: 48px; }

  .hero-flower { font-size: 32px; }

  .hero-bottom { justify-content: center; }

  .hero-bottom span:first-child, .hero-bottom span:last-child { display: none; }

  .section-heading { margin-bottom: 40px; }

  .section-heading h2 { font-size: clamp(2.15rem, 9.3vw, 3.7rem); }

  .section-intro { margin: 0 auto 35px; font-size: clamp(1.35rem, 5.4vw, 1.75rem); }

  .story-prose, .birthday-feature-copy { font-size: clamp(1.4rem, 5.5vw, 1.75rem); }

  .prologue-illustration { min-height: 330px; }

  .roast-grid, .library-gallery { grid-template-columns: minmax(0, 1fr); }

  .roast-card { min-height: 210px; padding: 23px; }

  .library-gallery { width: min(100%, 330px); margin: 40px auto; }

  .library-book, .library-book:last-child {

    grid-column: auto; width: 100%; min-height: 350px;

  }

  .drama-profile { padding: 25px 20px; margin-top: 65px; }

  .drama-profile-row { flex-direction: column; align-items: flex-start; gap: 7px; }

  .drama-profile-row strong { text-align: left; font-size: 23px; }

  .birthday-feature-card { padding: 45px 24px; }

  .celebration-scene, .final-letter-scene, .epilogue-scene {

    padding: 100px 18px;

  }

  .cake-scene { margin-inline: auto; }

  .letter-dialog { width: min(100%, 520px); }

  .letter-paper { padding: 26px 20px; }

  .letter-content p { font-size: clamp(1.3rem, 5.4vw, 1.55rem); }

  .epilogue-title { font-size: clamp(2.8rem, 11vw, 4.8rem); }

  .site-footer { flex-direction: column; align-items: center; text-align: center; }

}

@media (max-width: 420px) {

  .site-logo span:last-child { max-width: 140px; line-height: 1.4; }

  .screen { padding: 12px; }

  .countdown-frame { padding: 25px 6px; }

  .countdown-book-symbol { width: 78px; height: 78px; margin-bottom: 12px; }

  .book-monogram { font-size: 45px; }

  .countdown-title { font-size: clamp(2.05rem, 10vw, 2.65rem); }

  .countdown-description { margin: 14px auto; font-size: 20px; }

  .countdown-grid { gap: 3px; }

  .countdown-unit { padding: 11px 3px; }

  .countdown-number { font-size: clamp(1.35rem, 6.5vw, 1.85rem); }

  .countdown-unit-label { font-size: 7px; letter-spacing: 0; }

  .countdown-colon { padding-top: 15px; font-size: 16px; }

  .countdown-bottom-note { margin-top: 20px; font-size: 18px; }

  .hero-title { font-size: clamp(2.35rem, 10.6vw, 3.2rem); }

  .cake-scene { zoom: .85; }

  .secret-envelope { width: min(80vw, 280px); height: auto; aspect-ratio: 310 / 195; }

  .letter-dialog { max-height: calc(100dvh - 16px); }

  .letter-paper { max-height: calc(100dvh - 16px); }

}

@media (max-width: 350px) {

  .site-logo span:last-child { max-width: 118px; }

  .hero-title { font-size: 2.2rem; }

  .countdown-grid { gap: 2px; }

  .countdown-unit-label { font-size: 6px; }

  .cake-scene { zoom: .76; }

}

/* Landscape and short phones: allow vertical scrolling of the lock screen. */

@media (max-height: 620px) and (max-width: 900px) {

  .screen { align-items: flex-start; }

  .countdown-frame, .intro-content { margin-block: auto; }

  .countdown-book-symbol { width: 60px; height: 60px; margin-bottom: 8px; }

  .book-monogram { font-size: 35px; }

  .countdown-bottom-note { margin-top: 12px; }

}

@media (hover: none) {

  .library-book:hover { transform: none !important; }

  .secret-envelope:hover, .music-toggle:hover { transform: none; }

  .secret-envelope:hover .envelope-flap { transform: none; }

}

@media (prefers-reduced-motion: reduce) {

  .floating-particle, .hero-book, .hero-halo, .hero-stars span {

    animation: none !important;

  }

}

/* ============================================================
   23 — SMART ENTRY & ONE LAST GIFT (ADDITIONS ONLY)
   Inherits original Mahroz Chronicles design tokens.
   Existing birthday sections are intentionally unchanged.
   ============================================================ */

.entry-screen {
  z-index: 105;
  background: radial-gradient(ellipse at 50% 42%, #632c4055, transparent 65%), var(--night);
}
.entry-frame {
  position: relative;
  width: min(100%, 880px);
  margin: auto;
  padding: clamp(35px, 6vw, 70px) clamp(18px, 5vw, 65px);
  text-align: center;
  border: 1px solid #c9a57433;
  background: linear-gradient(145deg, #241b22ed, #171116f5);
  box-shadow: 0 35px 90px #0006;
  animation: riseIn 1s var(--ease) both;
}
.entry-frame::before, .entry-frame::after {
  content: "";
  position: absolute;
  width: 66px;
  height: 66px;
  pointer-events: none;
  border: solid #c9a57488;
}
.entry-frame::before { top: 12px; left: 12px; border-width: 1px 0 0 1px; }
.entry-frame::after { right: 12px; bottom: 12px; border-width: 0 1px 1px 0; }
.entry-emblem {
  margin: 23px 0 15px;
  color: var(--gold);
  font-family: var(--display);
  font-size: clamp(25px, 4vw, 39px);
  letter-spacing: .16em;
}
.entry-title {
  margin: 0;
  color: var(--ivory);
  font-family: var(--display);
  font-size: clamp(38px, 7vw, 77px);
  font-weight: 400;
  line-height: 1.17;
  letter-spacing: -.05em;
}
.entry-title em { color: var(--gold-light); font-weight: 400; }
.entry-description {
  max-width: 570px;
  margin: 20px auto 38px;
  color: var(--muted);
  font-family: var(--book);
  font-size: clamp(22px, 3vw, 29px);
  font-style: italic;
  line-height: 1.4;
}
.entry-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.entry-option {
  display: flex;
  min-width: 0;
  min-height: 210px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 25px 18px;
  border: 1px solid #c9a57477;
  border-radius: 3px;
  color: var(--ivory);
  text-align: center;
  background: linear-gradient(145deg, #33232f, #241b22);
  box-shadow: 0 15px 35px #0003;
  transition: transform .35s var(--ease), border-color .35s ease, box-shadow .35s ease;
}
.entry-option:hover { transform: translateY(-6px); border-color: var(--gold-light); box-shadow: 0 24px 45px #0005; }
.entry-option-library { background: linear-gradient(145deg, #632c40, #33232f); }
.entry-option-symbol { color: var(--gold-light); font-size: 38px; line-height: 1; }
.entry-option-heading { color: var(--ivory); font-family: var(--display); font-size: clamp(22px, 3vw, 30px); line-height: 1.25; }
.entry-option-description { color: var(--muted); font-family: var(--book); font-size: 21px; line-height: 1.25; }
.entry-signature { margin: 35px 0 0; color: var(--gold); font-family: var(--book); font-size: 21px; font-style: italic; }

/* Final epilogue gift — does not alter existing epilogue text. */
.library-invitation {
  position: relative;
  max-width: 720px;
  margin: clamp(50px, 7vw, 85px) auto 35px;
  padding: clamp(30px, 5vw, 60px) clamp(20px, 5vw, 55px);
  border: 1px solid #c9a57477;
  background: linear-gradient(150deg, #33232fee, #241b22ee);
  box-shadow: 0 25px 65px #0005;
}
.library-invitation::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid #c9a57433;
  pointer-events: none;
}
.library-invitation-kicker { margin: 0; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .19em; }
.library-invitation-ornament { margin: 20px 0; color: var(--gold-light); font-size: 26px; }
.library-invitation-title { margin: 0; color: var(--ivory); font-family: var(--display); font-size: clamp(30px, 5vw, 51px); font-weight: 400; line-height: 1.2; }
.library-invitation-title em { color: var(--gold-light); font-weight: 400; }
.library-invitation-description { max-width: 530px; margin: 22px auto 28px; color: var(--muted); font-family: var(--book); font-size: clamp(22px, 3vw, 28px); line-height: 1.35; }
.library-invitation-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 55px;
  max-width: 100%;
  padding: 15px 25px;
  border: 1px solid var(--gold);
  border-radius: 3px;
  background: var(--gold);
  color: var(--night);
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  transition: background .25s ease, transform .25s ease;
}
.library-invitation-link:hover { background: var(--gold-light); transform: translateY(-3px); }
.library-invitation-note { margin: 22px 0 0; color: var(--gold-light); font-family: var(--book); font-size: 21px; font-style: italic; }

@media (max-width: 680px) {
  .entry-screen { padding: 15px; }
  .entry-frame { padding: 35px 20px; }
  .entry-options { grid-template-columns: 1fr; gap: 12px; }
  .entry-option { min-height: 125px; gap: 7px; padding: 17px 15px; }
  .entry-option-symbol { font-size: 27px; }
  .entry-description { margin-bottom: 25px; }
  .entry-signature { margin-top: 22px; }
  .library-invitation-link { font-size: 10px; letter-spacing: .06em; }
}
@media (max-width: 380px) {
  .entry-frame { padding: 25px 14px; }
  .entry-title { font-size: 35px; }
  .entry-option { min-height: 112px; }
  .entry-option-description { font-size: 18px; }
  .library-invitation { padding: 30px 16px; }
}
@media (max-height: 680px) {
  .entry-frame { padding-top: 22px; padding-bottom: 22px; }
  .entry-emblem { margin: 10px 0; }
  .entry-description { margin: 12px auto 20px; }
  .entry-option { min-height: 115px; }
  .entry-signature { margin-top: 15px; }
}
@media (hover: none) { .entry-option:hover, .library-invitation-link:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .entry-frame { animation: none; }
  .entry-option, .library-invitation-link { transition: none; }
}
