/* ==========================================================================
   Story of Love — 3D Digital Novel Flipbook
   ========================================================================== */

:root {
  --bg-0: #08060f;
  --bg-1: #120c1f;
  --bg-2: #1f1430;
  --bg-3: #2e1a33;

  --gold: #d9b46a;
  --gold-light: #f3dca0;
  --gold-deep: #9c7536;
  --rose: #e8a3b4;

  --paper: #f8f0df;
  --paper-edge: #eadbbd;
  --ink: #2a221d;
  --ink-soft: #6b5c4f;
  --accent: #8a2e3f;

  --wine: #5a1a2b;
  --wine-dark: #33101b;

  --glass: rgba(28, 20, 44, 0.55);
  --glass-strong: rgba(24, 17, 38, 0.82);
  --glass-border: rgba(243, 220, 160, 0.16);
  --text-ui: #f4ead6;
  --text-ui-soft: rgba(244, 234, 214, 0.62);

  /* Diisi oleh script.js sesuai ukuran layar (rasio B5) */
  --page-w: 480px;
  --page-h: 682px;
  --fs: 15px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-body: "Lora", Georgia, "Times New Roman", serif;
  --font-display: "Playfair Display", "Didot", Georgia, serif;
  --font-script: "Great Vibes", "Brush Script MT", cursive;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--bg-3) 0%, transparent 60%),
    radial-gradient(100% 80% at 50% 100%, #1a1030 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
  color: var(--text-ui);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   Latar ambient: partikel, cahaya, vignette
   ========================================================================== */

.particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  mix-blend-mode: screen;
  will-change: transform;
}

.ambient__orb--1 {
  width: 46vmax;
  height: 46vmax;
  left: -12vmax;
  top: -14vmax;
  background: radial-gradient(circle, rgba(217, 180, 106, 0.38), transparent 65%);
  animation: orbFloat1 26s ease-in-out infinite alternate;
}

.ambient__orb--2 {
  width: 40vmax;
  height: 40vmax;
  right: -14vmax;
  bottom: -16vmax;
  background: radial-gradient(circle, rgba(232, 163, 180, 0.3), transparent 65%);
  animation: orbFloat2 32s ease-in-out infinite alternate;
}

.ambient__orb--3 {
  width: 30vmax;
  height: 30vmax;
  left: 35%;
  top: 30%;
  background: radial-gradient(circle, rgba(140, 110, 220, 0.22), transparent 65%);
  animation: orbFloat3 38s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
  to { transform: translate3d(14vmax, 10vmax, 0) scale(1.15); }
}
@keyframes orbFloat2 {
  to { transform: translate3d(-12vmax, -8vmax, 0) scale(1.2); }
}
@keyframes orbFloat3 {
  0% { transform: translate3d(-10vmax, -6vmax, 0) scale(0.9); }
  100% { transform: translate3d(8vmax, 6vmax, 0) scale(1.1); }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(4, 2, 10, 0.72) 100%);
}

/* ==========================================================================
   Header & progress
   ========================================================================== */

.brand {
  position: fixed;
  top: 18px;
  left: 22px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.8s var(--ease-out) 0.4s, transform 0.8s var(--ease-out) 0.4s;
}

.is-reading .brand {
  opacity: 1;
  transform: none;
}

.brand__mark {
  width: 28px;
  height: 28px;
  fill: var(--gold);
  filter: drop-shadow(0 0 8px rgba(217, 180, 106, 0.6));
  animation: heartbeat 2.8s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.14); }
  24% { transform: scale(1); }
  36% { transform: scale(1.1); }
  48% { transform: scale(1); }
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__text strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--gold-light);
}

.brand__text small {
  font-size: 11.5px;
  font-style: italic;
  color: var(--text-ui-soft);
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.04);
}

.progress__bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-light), var(--rose));
  box-shadow: 0 0 12px rgba(243, 220, 160, 0.7);
  transition: width 0.9s var(--ease-out);
}

/* ==========================================================================
   Panggung buku
   ========================================================================== */

.stage {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding-top: var(--stage-top, 84px);
  padding-bottom: var(--stage-bottom, 96px);
  opacity: 0;
  transform: translateY(40px) scale(0.94);
  transition: opacity 1.1s var(--ease-out), transform 1.4s var(--ease-out);
  pointer-events: none;
}

.is-reading .stage {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.stage__glow {
  position: absolute;
  left: 50%;
  top: calc(50% + (var(--stage-top, 84px) - var(--stage-bottom, 96px)) / 2);
  width: calc(var(--book-w, 960px) * 1.35);
  height: calc(var(--page-h) * 1.35);
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(243, 220, 160, 0.2), rgba(232, 163, 180, 0.07) 45%, transparent 70%);
  filter: blur(10px);
  animation: glowBreath 7s ease-in-out infinite;
  pointer-events: none;
}

.stage.is-flipping .stage__glow {
  animation-duration: 2.4s;
}

@keyframes glowBreath {
  0%, 100% { opacity: 0.75; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}

.book-shift {
  position: relative;
  width: var(--book-w, 960px);
  height: var(--page-h);
  transform: translateX(var(--shift, 0px));
  transition: transform 0.9s var(--ease-out);
  user-select: none;
  -webkit-user-select: none;
}

/* Bayangan dasar buku + tumpukan tepi halaman (berubah sesuai progres) */
.book-base {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.book-base__half {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  border-radius: 3px;
  transition: opacity 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}

.book-base__half--left {
  left: 0;
  box-shadow:
    calc(var(--stack-l, 3px) * -1) calc(var(--stack-l, 3px) * 0.6) 0 -1px #d9c7a3,
    calc(var(--stack-l, 3px) * -2) calc(var(--stack-l, 3px) * 1.2) 0 -2px #cbb68f,
    -10px 26px 40px rgba(0, 0, 0, 0.55),
    0 40px 70px -20px rgba(0, 0, 0, 0.7);
}

.book-base__half--right {
  right: 0;
  box-shadow:
    var(--stack-r, 3px) calc(var(--stack-r, 3px) * 0.6) 0 -1px #d9c7a3,
    calc(var(--stack-r, 3px) * 2) calc(var(--stack-r, 3px) * 1.2) 0 -2px #cbb68f,
    10px 26px 40px rgba(0, 0, 0, 0.55),
    0 40px 70px -20px rgba(0, 0, 0, 0.7);
}

.book-shift.at-front .book-base__half--left,
.book-shift.at-back .book-base__half--right {
  opacity: 0;
}

.book-shift.is-portrait .book-base__half {
  width: 100%;
}

.book-shift.is-portrait .book-base__half--left {
  opacity: 0;
}

.stage.is-flipping .book-base__half {
  box-shadow:
    0 0 0 0 transparent,
    0 0 0 0 transparent,
    0 34px 60px rgba(0, 0, 0, 0.65),
    0 60px 90px -20px rgba(0, 0, 0, 0.75);
}

.flipbook {
  position: absolute;
  left: 0;
  top: 0;
  transition: opacity 0.4s ease;
}

.flipbook.is-building {
  opacity: 0;
}

/* --- Aturan dasar StPageFlip --- */
.stf__parent {
  position: relative;
  display: block;
  box-sizing: border-box;
  transform: translateZ(0);
  touch-action: pan-y;
}

.stf__wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.stf__block {
  position: absolute;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  perspective: 2400px;
}

.stf__item {
  display: none;
  position: absolute;
  transform-style: preserve-3d;
}

.stf__outerShadow,
.stf__innerShadow,
.stf__hardShadow,
.stf__hardInnerShadow {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

/* ==========================================================================
   Halaman (kertas)
   ========================================================================== */

.page {
  overflow: hidden;
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .35 0 0 0 0 .22 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 40%, #fbf5e8 0%, var(--paper) 55%, var(--paper-edge) 100%);
  color: var(--ink);
  cursor: grab;
}

.page:active {
  cursor: grabbing;
}

/* Bayangan lipatan tengah (gutter) */
.page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.page[data-side="right"]::after {
  background:
    linear-gradient(90deg, rgba(60, 40, 20, 0.28) 0%, rgba(60, 40, 20, 0.1) 2.5%, rgba(60, 40, 20, 0.03) 7%, transparent 14%),
    linear-gradient(270deg, rgba(60, 40, 20, 0.08), transparent 3%);
}

.page[data-side="left"]::after {
  background:
    linear-gradient(270deg, rgba(60, 40, 20, 0.3) 0%, rgba(60, 40, 20, 0.11) 2.5%, rgba(60, 40, 20, 0.03) 7%, transparent 14%),
    linear-gradient(90deg, rgba(60, 40, 20, 0.08), transparent 3%);
}

.book-shift.is-portrait .page[data-side]::after {
  background:
    linear-gradient(90deg, rgba(60, 40, 20, 0.22) 0%, rgba(60, 40, 20, 0.06) 3%, transparent 10%);
}

.page-inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  font-size: var(--fs);
  padding:
    calc(var(--page-h) * 0.068)
    calc(var(--page-w) * 0.085)
    calc(var(--page-h) * 0.05)
    calc(var(--page-w) * 0.105);
}

.page[data-side="left"] .page-inner {
  padding-left: calc(var(--page-w) * 0.085);
  padding-right: calc(var(--page-w) * 0.105);
}

/* Running head */
.rh {
  flex: 0 0 auto;
  height: 2.6em;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.68em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.85;
}

.rh:empty {
  visibility: hidden;
}

/* Isi bacaan */
.pbody {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.pbody p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1em;
  line-height: 1.64;
  text-align: justify;
  text-indent: 1.6em;
  hyphens: manual;
  -webkit-hyphens: manual;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
  orphans: 1;
  widows: 1;
}

.pbody.tight p {
  line-height: 1.5;
}

.pbody p.cont,
.pbody p.noindent {
  text-indent: 0;
}

.pbody p.split {
  text-align-last: justify;
}

.pbody em {
  font-style: italic;
}

.pbody strong {
  font-weight: 600;
}

/* Drop cap di awal bab */
.pbody p.dropcap {
  text-indent: 0;
}

.pbody p.dropcap::first-letter {
  float: left;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 3.7em;
  line-height: 0.8;
  padding: 0.07em 0.1em 0 0;
  margin-top: 0.02em;
  color: var(--accent);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.pbody p.dropcap::first-line {
  font-variant: small-caps;
  letter-spacing: 0.03em;
}

.pbody p.preface {
  font-style: italic;
  line-height: 1.72;
}

/* Kepala bab */
.ch-head {
  text-align: center;
  padding: 2.6em 0 1.5em;
}

.ch-head--preface {
  padding-top: 3.2em;
}

.ch-label {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.66em;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
}

.ch-title {
  display: block;
  margin: 0.38em 0 0.42em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.9em;
  line-height: 1.15;
  color: var(--ink);
}

.ch-orn {
  display: block;
  width: 7.2em;
  height: auto;
  margin: 0 auto;
  color: var(--gold-deep);
}

.ch-quote {
  display: block;
  font-family: var(--font-display);
  font-size: 4.2em;
  line-height: 0.6;
  height: 0.5em;
  color: rgba(138, 46, 63, 0.25);
}

/* Folio / nomor halaman */
.folio {
  flex: 0 0 auto;
  height: 2.6em;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.7em;
  font-family: var(--font-display);
  font-size: 0.74em;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.folio::before,
.folio::after {
  content: "";
  width: 1.8em;
  height: 1px;
  margin-bottom: 0.55em;
  background: linear-gradient(90deg, transparent, rgba(107, 92, 79, 0.55), transparent);
}

.folio:empty {
  visibility: hidden;
}

/* --- Animasi teks saat halaman dibuka --- */
.page .reveal {
  opacity: 0;
  transform: translateY(14px);
}

.page .pbody p {
  opacity: 0.16;
  transform: translateY(6px);
}

.page.is-revealed .reveal {
  animation: revealUp 0.95s var(--ease-out) forwards;
  animation-delay: calc(var(--d, 0) * 110ms + 120ms);
}

.page.is-revealed .pbody p {
  animation: revealText 0.8s var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 45ms + 60ms);
}

.page.is-seen .pbody p,
.page.is-seen .reveal {
  opacity: 1;
  transform: none;
}

@keyframes revealUp {
  from { opacity: 0; transform: translateY(14px); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes revealText {
  from { opacity: 0.16; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.measure .page .reveal,
.measure .page .pbody p {
  opacity: 1;
  transform: none;
  animation: none;
}

/* ==========================================================================
   Halaman khusus: sampul, endpaper, judul, epigraf, daftar isi, penutup
   ========================================================================== */

.page--cover {
  cursor: pointer;
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(255, 255, 255, 0.08), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #6e2234 0%, var(--wine) 45%, var(--wine-dark) 100%);
  color: var(--gold-light);
}

.page--cover::after {
  background: none !important;
}

.cover {
  position: absolute;
  inset: 0;
  font-size: var(--fs);
  overflow: hidden;
}

/* Engsel sampul */
.cover::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7%;
  z-index: 2;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.45), rgba(255, 255, 255, 0.08) 45%, rgba(0, 0, 0, 0.25) 70%, transparent);
}

.page[data-side="right"] .cover::before { left: 0; }
.page[data-side="left"] .cover::before { right: 0; transform: scaleX(-1); }

.cover__frame {
  position: absolute;
  inset: 5.5% 7% 5.5% 10%;
  border: 1px solid rgba(217, 180, 106, 0.65);
  outline: 1px solid rgba(217, 180, 106, 0.3);
  outline-offset: 0.45em;
  border-radius: 2px;
}

.page[data-side="left"] .cover__frame {
  inset: 5.5% 10% 5.5% 7%;
}

.cover__frame::before,
.cover__frame::after {
  content: "❦";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4em;
  line-height: 1;
  padding: 0 0.4em;
  color: var(--gold);
  background: transparent;
}

.cover__frame::before { top: -0.7em; }
.cover__frame::after { bottom: -0.7em; transform: translateX(-50%) rotate(180deg); }

.cover__content {
  position: absolute;
  inset: 12% 14% 11% 17%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 3;
}

.cover__eyebrow {
  font-size: 0.66em;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(243, 220, 160, 0.8);
}

.cover__title {
  margin: 0.45em 0 0.2em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.3em;
  line-height: 1;
  letter-spacing: 0.01em;
}

.cover__title em {
  display: block;
  font-family: var(--font-script);
  font-weight: 400;
  font-style: normal;
  font-size: 0.62em;
  line-height: 1.1;
  margin: 0.05em 0;
}

.gold-text {
  background: linear-gradient(100deg, #b8893f 0%, #f6e3a8 22%, #c9a050 40%, #fff3cc 52%, #b8893f 70%, #f3dca0 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: goldShimmer 7s linear infinite;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}

@keyframes goldShimmer {
  from { background-position: 0% 50%; }
  to { background-position: 250% 50%; }
}

.cover__orn {
  width: 8.5em;
  margin: 0.9em auto;
  color: var(--gold);
}

.cover__ft {
  margin: 0;
  font-family: var(--font-script);
  font-size: 1.65em;
  line-height: 1.25;
  color: var(--gold-light);
}

.cover__theme {
  margin: 1.2em 0 0;
  font-size: 0.72em;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(243, 220, 160, 0.72);
}

.cover__author {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-family: var(--font-display);
  font-size: 0.78em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(243, 220, 160, 0.85);
}

.cover__shine {
  position: absolute;
  inset: -50%;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 244, 214, 0.16) 50%, transparent 58%);
  animation: coverShine 6.5s ease-in-out infinite;
}

@keyframes coverShine {
  0%, 55% { transform: translateX(-40%); }
  100% { transform: translateX(40%); }
}

.cover--back .cover__content {
  justify-content: center;
}

.cover__blurb {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.22em;
  line-height: 1.55;
  color: var(--gold-light);
}

.cover__blurb-sub {
  margin: 1.4em 0 0;
  font-size: 0.8em;
  line-height: 1.7;
  color: rgba(243, 220, 160, 0.75);
}

.cover__heart {
  width: 2.2em;
  height: 2.2em;
  fill: var(--gold);
  margin-bottom: 1.4em;
  filter: drop-shadow(0 0 10px rgba(217, 180, 106, 0.55));
}

/* Endpaper (bagian dalam sampul) */
.page--endpaper {
  background:
    radial-gradient(circle at 25% 25%, rgba(217, 180, 106, 0.22) 0 2px, transparent 2.5px) 0 0 / 2.2em 2.2em,
    radial-gradient(circle at 75% 75%, rgba(217, 180, 106, 0.16) 0 1.4px, transparent 2px) 0 0 / 2.2em 2.2em,
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 1.1em),
    linear-gradient(160deg, #4a1524, #2c0c16);
  font-size: var(--fs);
}

.endpaper__seal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(217, 180, 106, 0.45);
  display: grid;
  place-items: center;
  color: var(--gold);
  box-shadow: inset 0 0 0 0.5em rgba(217, 180, 106, 0.06);
}

.endpaper__seal span {
  font-family: var(--font-script);
  font-size: 2.6em;
  line-height: 1;
}

/* Halaman judul */
.title-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
}

.title-page__eyebrow {
  font-size: 0.66em;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
}

.title-page__title {
  margin: 0.5em 0 0.15em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.9em;
  line-height: 1.02;
  color: var(--ink);
}

.title-page__title em {
  display: block;
  font-family: var(--font-script);
  font-style: normal;
  font-weight: 400;
  font-size: 0.6em;
  color: var(--accent);
}

.title-page__ft {
  margin: 0.4em 0 0;
  font-family: var(--font-script);
  font-size: 1.55em;
  color: var(--ink-soft);
}

.title-page .ch-orn {
  margin: 1.5em auto;
}

.title-page__author-label {
  font-size: 0.66em;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.title-page__author {
  margin-top: 0.4em;
  font-family: var(--font-display);
  font-size: 1.05em;
  letter-spacing: 0.06em;
}

/* Epigraf */
.epigraph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 0 0.6em;
}

.epigraph__label {
  font-size: 0.66em;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
}

.epigraph__theme {
  margin: 0.5em 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.75em;
  line-height: 1.25;
}

.epigraph .ch-orn {
  margin: 1.8em auto;
}

.epigraph__quote {
  margin: 0;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.02em;
  line-height: 1.7;
  color: var(--ink-soft);
}

.epigraph__source {
  margin-top: 0.9em;
  font-size: 0.72em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Daftar isi di dalam buku */
.toc-page__head {
  text-align: center;
  padding: 1.6em 0 1.2em;
}

.toc-page__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-page__list li {
  margin: 0;
}

.toc-row {
  display: flex;
  align-items: baseline;
  width: 100%;
  padding: 0.42em 0.3em;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s var(--ease-out);
}

.toc-row * {
  pointer-events: none;
}

.toc-row:hover,
.toc-row:focus-visible {
  background: rgba(138, 46, 63, 0.08);
  color: var(--accent);
  transform: translateX(0.25em);
  outline: none;
}

.toc-row__label {
  flex: 0 0 auto;
  min-width: 3.3em;
  font-size: 0.66em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.toc-row__title {
  flex: 0 1 auto;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.98em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toc-row__dots {
  flex: 1 1 auto;
  min-width: 1em;
  margin: 0 0.45em;
  border-bottom: 1px dotted rgba(107, 92, 79, 0.55);
  transform: translateY(-0.3em);
}

.toc-row__num {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 0.9em;
  color: var(--ink-soft);
}

/* Penutup */
.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.closing__fin {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5em;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.closing__heart {
  width: 2.4em;
  height: 2.4em;
  margin: 1.2em auto;
  fill: var(--accent);
  animation: heartbeat 2.8s ease-in-out infinite;
}

.closing__date {
  font-family: var(--font-display);
  font-size: 1.05em;
  line-height: 1.6;
}

.closing__place {
  margin-top: 0.3em;
  font-style: italic;
  font-size: 0.86em;
  color: var(--ink-soft);
}

.closing__names {
  margin-top: 1.2em;
  font-family: var(--font-script);
  font-size: 1.9em;
  line-height: 1.25;
  color: var(--ink);
}

.closing__note {
  margin-top: 1.6em;
  padding-top: 1em;
  border-top: 1px solid rgba(107, 92, 79, 0.25);
  font-size: 0.7em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.blank-orn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.6em;
  color: rgba(107, 92, 79, 0.35);
}

/* Elemen pengukur (tidak terlihat) */
.measure {
  position: fixed;
  left: -20000px;
  top: 0;
  visibility: hidden;
  pointer-events: none;
}

.measure .page {
  position: relative;
  display: block;
}

/* ==========================================================================
   Tombol kontrol (glassmorphism + hover micro-interaction)
   ========================================================================== */

.controls {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform 0.9s var(--ease-out) 0.5s, opacity 0.9s var(--ease-out) 0.5s;
}

.is-reading .controls {
  transform: translate(-50%, 0);
  opacity: 1;
}

.controls__sep {
  width: 1px;
  height: 24px;
  margin: 0 4px;
  background: var(--glass-border);
}

.ctrl,
.player__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--text-ui);
  cursor: pointer;
  overflow: visible;
  transition:
    transform 0.35s var(--ease-spring),
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.35s ease,
    color 0.3s ease;
}

.ctrl svg,
.player__btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s var(--ease-spring);
}

.ctrl svg circle {
  fill: currentColor;
  stroke: none;
}

.ctrl::before,
.player__btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(243, 220, 160, 0.35), transparent 70%);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.35s ease, transform 0.45s var(--ease-out);
  pointer-events: none;
}

.ctrl:hover,
.player__btn:hover,
.ctrl:focus-visible,
.player__btn:focus-visible {
  outline: none;
  color: var(--gold-light);
  background: rgba(243, 220, 160, 0.1);
  border-color: rgba(243, 220, 160, 0.35);
  box-shadow: 0 0 18px rgba(243, 220, 160, 0.25);
  transform: translateY(-3px);
}

.ctrl:hover::before,
.player__btn:hover::before {
  opacity: 1;
  transform: scale(1.25);
}

.ctrl:hover svg,
.player__btn:hover svg {
  transform: scale(1.12);
}

#btnPrev:hover svg { transform: translateX(-2px) scale(1.12); }
#btnNext:hover svg { transform: translateX(2px) scale(1.12); }

.ctrl:active,
.player__btn:active {
  transform: translateY(0) scale(0.92);
  transition-duration: 0.12s;
}

.ctrl:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* Tooltip */
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  color: var(--text-ui);
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 0.25s ease, transform 0.3s var(--ease-out);
}

[data-tip]:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
  transition-delay: 0.35s;
}

.player [data-tip]::after {
  bottom: auto;
  top: calc(100% + 12px);
  transform: translate(-50%, -6px);
}

.player [data-tip]:hover::after {
  transform: translate(-50%, 0);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(243, 220, 160, 0.45);
  transform: scale(0);
  animation: ripple 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes ripple {
  to { transform: scale(2.6); opacity: 0; }
}

.ctrl .ripple,
.player__btn .ripple {
  overflow: hidden;
}

#btnFullscreen .icon-exit { display: none; }
.is-fullscreen #btnFullscreen .icon-enter { display: none; }
.is-fullscreen #btnFullscreen .icon-exit { display: block; }

.pager {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 112px;
  padding: 0 8px;
}

.pager__label {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-ui);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pager__track {
  position: relative;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.pager__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-light));
  transition: width 0.8s var(--ease-out);
}

/* ==========================================================================
   Floating audio player
   ========================================================================== */

.player {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 18px;
  z-index: 26;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 8px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.8s var(--ease-out) 0.6s, transform 0.8s var(--ease-out) 0.6s, box-shadow 0.5s ease;
}

.is-reading .player {
  opacity: 1;
  transform: none;
}

.player.is-playing {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 28px rgba(217, 180, 106, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.player__disc {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--gold) 0 14%, #2a1a12 15% 18%, transparent 19%),
    repeating-radial-gradient(circle, #1b1220 0 1.5px, #2a1d2e 1.5px 3px);
  box-shadow: 0 0 0 1px rgba(243, 220, 160, 0.25), 0 6px 14px rgba(0, 0, 0, 0.5);
  animation: spin 5s linear infinite;
  animation-play-state: paused;
}

.player__disc span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 30deg, transparent 0 20%, rgba(255, 255, 255, 0.18) 25%, transparent 32% 70%, rgba(255, 255, 255, 0.12) 75%, transparent 82%);
}

.player.is-playing .player__disc {
  animation-play-state: running;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.player__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.player__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--gold-light);
  white-space: nowrap;
}

.player__status {
  font-size: 11px;
  color: var(--text-ui-soft);
  white-space: nowrap;
}

/* Equalizer */
.eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  width: 26px;
}

.eq span {
  flex: 1;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
  transform-origin: bottom;
  transform: scaleY(0.18);
  transition: transform 0.5s var(--ease-out);
}

.player.is-playing .eq span {
  animation: eq 1s ease-in-out infinite alternate;
}

.player.is-playing .eq span:nth-child(1) { animation-duration: 0.82s; }
.player.is-playing .eq span:nth-child(2) { animation-duration: 0.56s; animation-delay: -0.2s; }
.player.is-playing .eq span:nth-child(3) { animation-duration: 0.94s; animation-delay: -0.45s; }
.player.is-playing .eq span:nth-child(4) { animation-duration: 0.66s; animation-delay: -0.1s; }
.player.is-playing .eq span:nth-child(5) { animation-duration: 0.78s; animation-delay: -0.6s; }

.player.is-muted .eq span {
  animation-play-state: paused;
  opacity: 0.45;
}

@keyframes eq {
  0% { transform: scaleY(0.2); }
  30% { transform: scaleY(0.95); }
  55% { transform: scaleY(0.45); }
  80% { transform: scaleY(0.8); }
  100% { transform: scaleY(0.3); }
}

.player__btn--main {
  width: 44px;
  height: 44px;
  background: linear-gradient(145deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  color: #2b1a10;
  box-shadow: 0 6px 18px rgba(217, 180, 106, 0.35);
}

.player__btn--main svg {
  fill: currentColor;
  stroke: none;
}

.player__btn--main:hover,
.player__btn--main:focus-visible {
  color: #2b1a10;
  background: linear-gradient(145deg, #fff1c8, var(--gold-light) 55%, var(--gold));
  box-shadow: 0 10px 26px rgba(217, 180, 106, 0.55);
}

.player.is-playing .player__btn--main {
  animation: pulseGold 2.4s ease-out infinite;
}

@keyframes pulseGold {
  0% { box-shadow: 0 6px 18px rgba(217, 180, 106, 0.35), 0 0 0 0 rgba(243, 220, 160, 0.45); }
  70% { box-shadow: 0 6px 18px rgba(217, 180, 106, 0.35), 0 0 0 12px rgba(243, 220, 160, 0); }
  100% { box-shadow: 0 6px 18px rgba(217, 180, 106, 0.35), 0 0 0 0 rgba(243, 220, 160, 0); }
}

.player .icon-pause { display: none; }
.player.is-playing .icon-pause { display: block; }
.player.is-playing .icon-play { display: none; }

.player__volume {
  display: flex;
  align-items: center;
  gap: 4px;
}

.player__volume .player__btn {
  width: 36px;
  height: 36px;
}

.player__volume .player__btn .fill {
  fill: currentColor;
  stroke: none;
}

.player .icon-muted { display: none; }
.player.is-muted .icon-muted { display: block; }
.player.is-muted .icon-vol { display: none; }

.volume {
  --val: 60;
  -webkit-appearance: none;
  appearance: none;
  width: 92px;
  height: 4px;
  margin: 0 4px 0 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold) 0 calc(var(--val) * 1%), rgba(255, 255, 255, 0.18) calc(var(--val) * 1%) 100%);
  cursor: pointer;
  outline: none;
  transition: width 0.4s var(--ease-out);
}

.volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-light);
  border: 2px solid #2b1a10;
  box-shadow: 0 0 0 3px rgba(243, 220, 160, 0.2);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s ease;
}

.volume::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-light);
  border: 2px solid #2b1a10;
  box-shadow: 0 0 0 3px rgba(243, 220, 160, 0.2);
}

.volume:hover::-webkit-slider-thumb,
.volume:focus-visible::-webkit-slider-thumb {
  transform: scale(1.25);
  box-shadow: 0 0 0 6px rgba(243, 220, 160, 0.18);
}

.player.is-muted .volume {
  opacity: 0.5;
}

/* ==========================================================================
   Drawer daftar isi
   ========================================================================== */

.toc {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.toc__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 3, 12, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.toc__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(380px, 88vw);
  padding: 28px 22px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(36, 22, 48, 0.96), rgba(18, 11, 28, 0.98));
  border-right: 1px solid var(--glass-border);
  box-shadow: 30px 0 60px rgba(0, 0, 0, 0.5);
  transform: translateX(-105%);
  transition: transform 0.6s var(--ease-out);
}

.toc.is-open {
  pointer-events: auto;
}

.toc.is-open .toc__backdrop {
  opacity: 1;
}

.toc.is-open .toc__panel {
  transform: none;
}

.toc__head {
  position: relative;
  margin-bottom: 18px;
}

.toc__eyebrow {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.toc__head h2 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 30px;
  color: var(--text-ui);
}

.toc__close {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform 0.4s var(--ease-spring), background-color 0.3s ease, border-color 0.3s ease;
}

.toc__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.toc__close:hover {
  transform: rotate(90deg);
  background: rgba(243, 220, 160, 0.1);
  border-color: rgba(243, 220, 160, 0.3);
}

.toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc__item {
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 40ms + 120ms);
}

.toc.is-open .toc__item {
  opacity: 1;
  transform: none;
}

.toc__link {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 12px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.35s var(--ease-out);
}

.toc__link:hover,
.toc__link:focus-visible {
  outline: none;
  background: rgba(243, 220, 160, 0.08);
  border-color: rgba(243, 220, 160, 0.22);
  transform: translateX(4px);
}

.toc__link.is-current {
  background: rgba(243, 220, 160, 0.12);
  border-color: rgba(243, 220, 160, 0.35);
}

.toc__link-label {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.toc__link-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--text-ui);
}

.toc__link-num {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-ui-soft);
}

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 35;
  max-width: min(92vw, 520px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  color: var(--text-ui);
  font-size: 13.5px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.4s ease, transform 0.5s var(--ease-out);
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   Layar pembuka
   ========================================================================== */

.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at center, rgba(18, 12, 31, 0.35), rgba(8, 6, 15, 0.82));
  transition: opacity 1s var(--ease-out), visibility 1s, backdrop-filter 1s;
  backdrop-filter: blur(2px);
}

.intro.is-leaving {
  opacity: 0;
  visibility: hidden;
}

.intro__card {
  position: relative;
  width: min(560px, 100%);
  padding: 46px 36px 36px;
  text-align: center;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(40, 25, 52, 0.55), rgba(20, 12, 30, 0.55));
  border: 1px solid var(--glass-border);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition: transform 1s var(--ease-out), opacity 0.8s ease;
}

.intro.is-leaving .intro__card {
  transform: translateY(-30px) scale(0.96);
}

.intro__card > * {
  opacity: 0;
  animation: revealUp 1.1s var(--ease-out) forwards;
}

.intro__card > :nth-child(1) { animation-delay: 0.15s; }
.intro__card > :nth-child(2) { animation-delay: 0.3s; }
.intro__card > :nth-child(3) { animation-delay: 0.45s; }
.intro__card > :nth-child(4) { animation-delay: 0.6s; }
.intro__card > :nth-child(5) { animation-delay: 0.72s; }
.intro__card > :nth-child(6) { animation-delay: 0.86s; }
.intro__card > :nth-child(7) { animation-delay: 0.95s; }
.intro__card > :nth-child(8) { animation-delay: 1.05s; }
.intro__card > :nth-child(9) { animation-delay: 1.1s; }

.intro__eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}

.intro__title {
  margin: 14px 0 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 9vw, 64px);
  line-height: 1.05;
}

.intro__title span {
  background: linear-gradient(100deg, #b8893f 0%, #f6e3a8 22%, #c9a050 40%, #fff3cc 52%, #b8893f 70%, #f3dca0 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: goldShimmer 6s linear infinite;
}

.intro__ft {
  margin: 0;
  font-family: var(--font-script);
  font-size: clamp(22px, 5vw, 30px);
  color: var(--text-ui);
}

.intro__orn {
  width: 140px;
  margin: 20px auto;
  color: var(--gold);
}

.intro__theme {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--text-ui-soft);
}

.intro__theme span {
  margin-right: 6px;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.intro__theme em {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-ui);
}

.intro__start {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--gold-light), var(--gold) 50%, var(--gold-deep));
  color: #2b1a10;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(217, 180, 106, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  overflow: hidden;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease, filter 0.4s ease;
}

.intro__start svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.intro__start::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: skewX(-20deg);
  animation: btnSheen 3.2s ease-in-out infinite;
}

@keyframes btnSheen {
  0%, 60% { left: -60%; }
  100% { left: 130%; }
}

.intro__start:not(:disabled):hover,
.intro__start:not(:disabled):focus-visible {
  outline: none;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 20px 44px rgba(217, 180, 106, 0.5), 0 0 0 6px rgba(243, 220, 160, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.intro__start:not(:disabled):active {
  transform: scale(0.97);
}

.intro__start:disabled {
  cursor: progress;
  filter: saturate(0.4) brightness(0.85);
}

.intro__start:disabled svg {
  animation: spin 1.6s linear infinite;
  stroke-dasharray: 3 3;
}

.intro__start-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.intro__start:not(:disabled) .intro__start-ring {
  animation: pulseGold 2.2s ease-out infinite;
}

.intro__resume {
  display: block;
  margin: 14px auto 0;
  padding: 8px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-ui-soft);
  font-size: 13.5px;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, transform 0.35s var(--ease-spring);
}

.intro__resume:hover,
.intro__resume:focus-visible {
  outline: none;
  color: var(--gold-light);
  border-color: rgba(243, 220, 160, 0.4);
  background: rgba(243, 220, 160, 0.08);
  transform: translateY(-2px);
}

.intro__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 26px 0 0;
  font-size: 12.5px;
  color: var(--text-ui-soft);
}

.intro__hint svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.7;
}

.intro__error {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(160, 40, 60, 0.2);
  border: 1px solid rgba(232, 120, 140, 0.35);
  font-size: 13px;
  line-height: 1.5;
  color: #ffd9df;
}

.noscript {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 99;
  padding: 14px;
  text-align: center;
  background: #5a1a2b;
  color: #fff;
}

/* ==========================================================================
   Responsif
   ========================================================================== */

@media (max-width: 900px) {
  .player__meta { display: none; }
  .volume { width: 70px; }
}

@media (max-width: 640px) {
  .brand { top: 14px; left: 14px; gap: 8px; }
  .brand__mark { width: 22px; height: 22px; }
  .brand__text strong { font-size: 14px; }
  .brand__text small { display: none; }

  .player { right: 10px; gap: 8px; padding: 6px 8px 6px 6px; }
  .player__disc { width: 32px; height: 32px; }
  .player__btn--main { width: 38px; height: 38px; }
  .volume { display: none; }
  .eq { width: 20px; height: 18px; }

  .controls { gap: 2px; padding: 5px 6px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .ctrl { width: 38px; height: 38px; }
  #btnFirst, #btnLast, .controls__sep { display: none; }
  .pager { min-width: 92px; padding: 0 4px; }

  [data-tip]::after { display: none; }
  .toast { bottom: 80px; font-size: 12.5px; }
  .intro__card { padding: 36px 22px 28px; border-radius: 22px; }
}

@media (hover: none) {
  .volume { width: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .page .reveal,
  .page .pbody p {
    opacity: 1;
    transform: none;
  }
}
