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

[hidden] {
  display: none !important;
}

:root {
  --wood-1: #1a0d08;
  --wood-2: #2f180e;
  --wood-3: #4a2716;

  --wine-1: #240a12;
  --wine-2: #4a1424;
  --wine-3: #6d2138;

  --gold-1: #f6e2a4;
  --gold-2: #d9b26a;
  --gold-3: #a67c36;

  --paper: #f8f0e2;
  --paper-edge: #e7d9c0;
  --rule: #dccdb0;
  --margin: #c65b6b;

  --ink: #1f2a44;
  --ink-soft: #55607c;
  --rose: #b5566b;

  --book-w: 700px;
  --book-h: 480px;
  --page-w: 350px;

  --ease-page: cubic-bezier(0.645, 0.045, 0.355, 1);
}

html,
body {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  touch-action: manipulation;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  font-family: 'Caveat', 'Segoe Print', cursive;
  color: var(--ink);
  background:
    repeating-linear-gradient(90deg, transparent 0 90px, rgba(0, 0, 0, 0.05) 90px 92px),
    repeating-linear-gradient(0deg, transparent 0 210px, rgba(0, 0, 0, 0.03) 210px 212px),
    linear-gradient(180deg, var(--wood-1) 0%, var(--wood-2) 35%, var(--wood-3) 62%, var(--wood-2) 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(12, 5, 3, 0.65) 100%);
  pointer-events: none;
  z-index: 3;
}

.lamp {
  position: fixed;
  inset: 0;
  background: radial-gradient(55% 50% at 70% 20%, rgba(255, 196, 120, 0.26), transparent 72%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
}

.coffee-ring {
  position: fixed;
  top: 68%;
  left: 7%;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 5px solid rgba(20, 8, 3, 0.28);
  box-shadow: inset 0 0 6px rgba(20, 8, 3, 0.25);
  transform: rotate(12deg) scaleY(0.92);
  pointer-events: none;
  z-index: 2;
}

#fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 40;
}

/* ───────── المشهد والكتاب ───────── */

.scene {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  perspective: 1800px;
  z-index: 10;
}

.book-scaler {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--book-w);
  height: var(--book-h);
  margin: calc(var(--book-h) / -2) 0 0 calc(var(--book-w) / -2);
  transform-style: preserve-3d;
  transition: transform 1.2s var(--ease-page);
}

.book-container {
  width: var(--book-w);
  height: var(--book-h);
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(8deg) translateX(calc(-1 * var(--page-w) / 2));
  transition: transform 1.2s var(--ease-page);
}

.book-container.open {
  transform: rotateX(8deg) translateX(0);
}

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

/* حواف الأوراق */
.book::before,
.book::after {
  content: '';
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 8px;
  z-index: -1;
}

.book::before {
  right: -8px;
  background: linear-gradient(90deg, #faf6ed 0%, #e8dfd0 30%, #d4c5a9 50%, #faf6ed 80%, #b0a38d 100%);
  border-radius: 0 4px 4px 0;
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.25);
}

.book::after {
  left: -8px;
  background: linear-gradient(-90deg, #faf6ed 0%, #e8dfd0 30%, #d4c5a9 50%, #faf6ed 80%, #b0a38d 100%);
  border-radius: 4px 0 0 4px;
  box-shadow: -1px 1px 4px rgba(0, 0, 0, 0.25);
}

.spine-shadow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: calc(var(--book-h) - 20px);
  transform: translate(-50%, -50%) rotateX(8deg);
  background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.12) 30%, rgba(0, 0, 0, 0.22) 50%, rgba(0, 0, 0, 0.12) 70%, transparent 100%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.8s ease 0.4s;
}

.book-container.open .spine-shadow {
  opacity: 1;
}

/* ───────── الأوراق ───────── */

.leaf {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--page-w);
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition: transform 1.2s var(--ease-page);
  cursor: pointer;
}

.leaf.flipped {
  transform: rotateY(-180deg);
}

.page {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  border-radius: 2px 8px 8px 2px;
}

.page.back {
  transform: rotateY(180deg);
  border-radius: 8px 2px 2px 8px;
}

.paper {
  background-color: var(--paper);
  background-image: repeating-linear-gradient(transparent 0 27px, var(--rule) 27px 28px);
  background-position: 0 2px;
  padding: 30px 32px 26px 46px;
}

/* ظل عند الكعب */
.page.front.paper {
  box-shadow: inset 22px 0 26px -18px rgba(60, 35, 15, 0.28), inset 0 0 40px rgba(0, 0, 0, 0.04);
}

.page.back.paper {
  box-shadow: inset -22px 0 26px -18px rgba(60, 35, 15, 0.28), inset 0 0 40px rgba(0, 0, 0, 0.04);
}

.margin-line {
  position: absolute;
  top: 0;
  left: 38px;
  width: 2px;
  height: 100%;
  background: var(--margin);
  opacity: 0.32;
}

.page-content {
  position: relative;
  z-index: 5;
  height: 100%;
}

.page-num {
  position: absolute;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  color: var(--ink-soft);
  opacity: 0.6;
}

/* ───────── الكتابة على الورق ───────── */

.page-heading {
  position: relative;
  display: flex;
  align-items: center;
  height: 56px;
  white-space: nowrap;
  overflow: hidden;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 700;
  font-style: italic;
  color: var(--wine-2);
  line-height: 1;
}

.page-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 6px;
  width: 74px;
  height: 7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='74' height='7' viewBox='0 0 74 7'%3E%3Cpath d='M1 4 Q7 0 13 4 T25 4 T37 4 T49 4 T61 4 T73 4' fill='none' stroke='%23b5566b' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left center;
}

.page-hint {
  font-size: 1.15rem;
  line-height: 28px;
  color: var(--ink-soft);
}

.letter p,
.closing-line,
.know-list li,
.love-list li,
.promise .txt {
  font-size: calc(1.32rem * var(--fit, 1));
  line-height: 28px;
}

.letter p {
  text-indent: 1.4em;
}

.letter p.greeting {
  text-indent: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.9rem;
  font-style: italic;
  color: var(--wine-2);
  margin-bottom: 28px;
}

.letter p.sign {
  text-indent: 0;
  margin-top: 28px;
  text-align: right;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-style: italic;
  color: var(--rose);
}

.know-list,
.love-list {
  list-style: none;
}

.know-list li,
.love-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 0;
}

.know-list li::before,
.love-list li::before {
  content: '✎';
  position: absolute;
  left: 0;
  color: var(--rose);
  font-size: 0.95rem;
}

.love-list li::before {
  content: '♥';
  font-size: 0.8rem;
}

.closing-line {
  margin-top: 28px;
  font-weight: 700;
  color: var(--wine-2);
}

/* ───────── الوعود ───────── */

.promises {
  list-style: none;
  margin-top: 0;
}

.promise {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 56px;
  cursor: pointer;
  outline-offset: 2px;
  border-radius: 6px;
}

.promise:focus-visible {
  outline: 2px solid var(--rose);
}

.seal {
  flex: none;
  width: 34px;
  height: 34px;
  margin-top: -3px;
  border-radius: 50%;
  border: 1.5px dashed #b9a684;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  color: transparent;
  transition: border-color 0.2s;
}

.promise:hover .seal {
  border-color: var(--rose);
}

.promise.signed .seal {
  border: none;
  color: #ffdfe4;
  background: radial-gradient(circle at 35% 30%, #d9556c, #8c1c34 72%);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.12);
  transform: rotate(-8deg);
  animation: stamp 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@keyframes stamp {
  0% {
    transform: scale(2.3) rotate(-30deg);
    opacity: 0;
  }

  100% {
    transform: scale(1) rotate(-8deg);
    opacity: 1;
  }
}

.signature-wrap {
  margin-top: 6px;
  min-height: 56px;
  display: flex;
  align-items: center;
}

.signature {
  font-family: 'Great Vibes', cursive;
  font-size: 2.6rem;
  color: var(--ink);
  transform: rotate(-3deg);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.8s ease-out;
}

.signature.on {
  clip-path: inset(0 0 0 0);
}

/* ───────── تذكرة اللقاء ───────── */

.ticket {
  position: relative;
  margin: 8px 4px 16px 0;
  padding: 12px 16px 8px;
  background: linear-gradient(135deg, #fffaf0 0%, #f3e6cd 100%);
  border: 1px solid #d9c49a;
  border-radius: 10px;
  box-shadow: 2px 4px 10px rgba(40, 20, 8, 0.22);
  transform: rotate(-1.5deg);
}

.ticket::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  width: 46px;
  height: 16px;
  transform: translateX(-50%) rotate(2deg);
  background: rgba(230, 200, 130, 0.65);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.ticket-route {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pt {
  min-width: 0;
  max-width: 96px;
}

.pt small {
  display: block;
  font-size: 0.82rem;
  line-height: 1.2;
  color: var(--ink-soft);
}

.pt strong {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--wine-2);
  overflow-wrap: anywhere;
}

.route-line {
  position: relative;
  flex: 1;
  border-top: 2px dotted var(--rose);
}

.plane {
  position: absolute;
  top: -15px;
  left: 50%;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--rose);
  background: #f8eedb;
  padding: 0 4px;
  transform: translateX(-50%) scaleX(-1);
}

.ticket-count {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1.5px dashed #cdb68a;
  text-align: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.3rem;
  line-height: 1.4;
  font-style: italic;
  color: var(--ink);
}

/* ───────── الغلاف ───────── */

.cover-page,
.back-cover-panel {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' 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 .32 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(120% 95% at 28% 18%, var(--wine-3) 0%, var(--wine-2) 48%, var(--wine-1) 100%);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.5), 5px 0 18px rgba(0, 0, 0, 0.35);
  color: var(--gold-2);
}

.cover-page {
  display: grid;
  place-items: center;
  overflow: visible;
  border-radius: 2px 10px 10px 2px;
}

.cover-frame {
  position: absolute;
  inset: 16px;
  border: 1px solid var(--gold-3);
  opacity: 0.75;
  border-radius: 4px;
  pointer-events: none;
}

.cover-frame::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid var(--gold-3);
  opacity: 0.5;
  border-radius: 2px;
}

.cover-content {
  position: relative;
  z-index: 5;
  width: 100%;
  padding: 0 40px;
  text-align: center;
}

.cover-kicker {
  font-size: 1.35rem;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--gold-1);
  opacity: 0.85;
}

.cover-title {
  margin: 4px 0 0;
  font-family: 'Great Vibes', cursive;
  font-size: 6.2rem;
  font-weight: 400;
  line-height: 1.3;
  padding: 0 0.15em;
  background: linear-gradient(110deg, #a67c36 0%, #f6e2a4 30%, #d9b26a 44%, #fff6d2 50%, #d9b26a 56%, #a67c36 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.55));
  animation: foil 3.4s ease-out 0.5s 1 both;
}

@keyframes foil {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: 0 0;
  }
}

.cover-orn {
  margin: 2px 0 6px;
  font-size: 1.2rem;
  color: var(--gold-2);
  opacity: 0.8;
}

.cover-to {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.2rem;
  font-style: italic;
  color: var(--gold-1);
}

.cover-hint {
  margin-top: 26px;
  font-size: 1.3rem;
  color: var(--gold-2);
  opacity: 0.6;
  animation: hint 2.2s infinite alternate ease-in-out;
}

@keyframes hint {
  from {
    opacity: 0.3;
    transform: translateX(0);
  }

  to {
    opacity: 0.75;
    transform: translateX(5px);
  }
}

.bookmark-ribbon {
  position: absolute;
  top: 0;
  left: 34px;
  width: 22px;
  height: 58px;
  background: linear-gradient(to bottom, #7a1230, #a3203f);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.cover-strap {
  position: absolute;
  top: 50%;
  right: -18px;
  width: 42px;
  height: 30px;
  transform: translateY(-50%);
  transform-origin: left center;
  background: linear-gradient(180deg, #4a2214 0%, #2a1108 100%);
  border-radius: 0 6px 6px 0;
  border-left: 2px solid #150804;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  z-index: 100;
  transition: transform 0.8s var(--ease-page), opacity 0.6s ease;
}

.strap-snap {
  font-size: 0.8rem;
  color: var(--gold-1);
  text-shadow: 0 0 6px rgba(246, 226, 164, 0.6);
}

.book-container.open .cover-strap {
  transform: translateY(-50%) rotateY(110deg);
  opacity: 0;
  pointer-events: none;
}

/* الغلاف الخلفي (السؤال الأخير) */

.back-cover-panel {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--page-w);
  height: 100%;
  z-index: 0;
  pointer-events: none;
  border-radius: 2px 10px 10px 2px;
  display: grid;
  place-items: center;
}

.ask,
.answer {
  position: relative;
  z-index: 5;
  width: 100%;
  padding: 0 38px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.ask-orn {
  font-size: 1.5rem;
  color: var(--gold-2);
  opacity: 0.85;
}

.ask-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.5rem;
  line-height: 1.25;
  font-style: italic;
  font-weight: 700;
  color: var(--gold-1);
}

.ask-sub {
  font-size: 1.5rem;
  line-height: 1.3;
  color: #ecd9b3;
  opacity: 0.9;
}

.ask-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.btn-gold,
.btn-ghost,
.btn-link {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 22px;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-gold {
  display: inline-block;
  font-weight: 700;
  color: var(--wine-1);
  background: linear-gradient(135deg, #f6e2a4, #d9b26a 60%, #b98c3e);
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.btn-gold:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-ghost {
  color: var(--gold-1);
  background: transparent;
  border: 1px solid rgba(217, 178, 106, 0.6);
}

.btn-ghost:hover {
  background: rgba(217, 178, 106, 0.14);
}

.btn-link {
  border: none;
  background: none;
  color: var(--gold-2);
  opacity: 0.75;
  font-size: 0.95rem;
  text-decoration: underline;
  padding: 4px;
}

.btn-gold:focus-visible,
.btn-ghost:focus-visible,
.btn-link:focus-visible,
.nav-btn:focus-visible,
.round-btn:focus-visible {
  outline: 2px solid var(--gold-1);
  outline-offset: 3px;
}

/* ───────── التحكم ───────── */

.nav-controls {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 60;
}

.nav-btn {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  color: var(--gold-1);
  background: rgba(255, 236, 200, 0.08);
  border: 1px solid rgba(217, 178, 106, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 8px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
  background: rgba(255, 236, 200, 0.18);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.nav-indicator {
  min-width: 120px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--gold-1);
  opacity: 0.85;
}

.hud {
  position: fixed;
  bottom: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 60;
}

.round-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(217, 178, 106, 0.35);
  background: rgba(255, 236, 200, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--gold-1);
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, transform 0.3s ease;
}

.round-btn:hover {
  background: rgba(255, 236, 200, 0.2);
}

#reset-btn:hover {
  transform: rotate(-180deg);
}

.eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.eq i {
  display: block;
  width: 3px;
  height: 5px;
  background: currentColor;
  border-radius: 2px;
}

.round-btn.playing .eq i {
  animation: eq 0.9s infinite ease-in-out;
}

.round-btn.playing .eq i:nth-child(2) {
  animation-delay: 0.2s;
}

.round-btn.playing .eq i:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes eq {

  0%,
  100% {
    height: 4px;
  }

  50% {
    height: 16px;
  }
}

.song-label {
  font-size: 0.85rem;
  color: var(--gold-1);
  opacity: 0.7;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ───────── الهواتف ───────── */

@media (max-width: 600px) {
  .coffee-ring {
    display: none;
  }

  .nav-controls {
    gap: 8px;
    bottom: 12px;
  }

  .nav-btn {
    font-size: 0.9rem;
    padding: 6px 14px;
  }

  .nav-indicator {
    min-width: 84px;
    font-size: 0.85rem;
  }

  .hud {
    left: auto;
    right: 12px;
    bottom: auto;
    top: 12px;
  }

  .song-label {
    display: none;
  }

  .round-btn {
    width: 38px;
    height: 38px;
  }
}

@media (max-height: 460px) {
  .hud {
    bottom: 10px;
    left: 10px;
    top: auto;
    right: auto;
  }

  .nav-controls {
    bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .leaf,
  .book-container,
  .book-scaler {
    transition-duration: 0.01s;
  }

  .cover-title,
  .cover-hint,
  .round-btn.playing .eq i {
    animation: none;
  }

  .signature {
    transition: none;
  }
}

/* ───────── القلب في الصفحة الأخيرة ───────── */

.heart-btn {
  width: 78px;
  height: 78px;
  margin-top: 6px;
  border-radius: 50%;
  border: 1px solid rgba(217, 178, 106, 0.55);
  background: radial-gradient(circle at 35% 30%, #e0607a, #9a2340 75%);
  color: #ffe3e8;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), inset 0 0 0 3px rgba(255, 255, 255, 0.08);
  animation: beat 2.4s ease-in-out infinite;
  transition: filter 0.2s ease;
}

.heart-btn:hover {
  filter: brightness(1.12);
}

.heart-btn:active {
  transform: scale(0.94);
}

.heart-btn:focus-visible {
  outline: 2px solid var(--gold-1);
  outline-offset: 4px;
}

.heart-btn.sent {
  animation: none;
}

@keyframes beat {

  0%,
  60%,
  100% {
    transform: scale(1);
  }

  20% {
    transform: scale(1.09);
  }

  40% {
    transform: scale(1.03);
  }
}

.heart-hint {
  min-height: 2.6em;
  font-size: 1.3rem;
  line-height: 1.3;
  font-style: italic;
  color: var(--gold-1);
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .heart-btn {
    animation: none;
  }
}

/* ───────── الهاتف عموديًا: صفحة واحدة في كل مرة ───────── */

body.single .book-container,
body.single .book-container.open {
  transform: rotateX(8deg) translateX(var(--pan, -175px));
}

body.single .spine-shadow {
  display: none;
}

@media (max-width: 600px) {
  .nav-controls {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .nav-btn {
    min-height: 44px;
    padding: 8px 18px;
  }

  .hud {
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: 12px;
  }

  .round-btn {
    width: 44px;
    height: 44px;
  }
}

@media (max-height: 460px) {
  .nav-controls {
    bottom: 8px;
  }
}
