:root {
  --bg: #faf4ef;
  --bg-warm: #f6e7dc;
  --ink: #2a1a1f;
  --ink-soft: #6b4f56;
  --accent: #e35d6a;
  --accent-deep: #b8384a;
  --gold: #c69363;
  --serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

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

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

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

/* =============== GATE =============== */
body.locked { overflow: hidden; }
body.locked > *:not(.gate) { filter: blur(14px); pointer-events: none; user-select: none; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at center, #fff5ec 0%, #f6e1d1 60%, #efc9b4 100%);
  padding: 1.5rem;
  padding-top: calc(1.5rem + var(--safe-t));
  padding-bottom: calc(1.5rem + var(--safe-b));
  animation: gate-in 0.8s ease both;
}

.gate.out { animation: gate-out 0.8s ease forwards; pointer-events: none; }

@keyframes gate-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes gate-out { to { opacity: 0; transform: scale(1.05); visibility: hidden; } }

.gate-inner {
  text-align: center;
  max-width: 460px;
  width: 100%;
}

.gate-eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #8b5a4a;
  margin-bottom: 1.25rem;
}

.gate-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 10vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 2rem;
}

.gate-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 60%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gate-hint {
  font-family: var(--serif);
  font-style: italic;
  color: #8b5a4a;
  font-size: 0.92rem;
  margin-bottom: 1.75rem;
  padding: 0 0.5rem;
}

.gate-form {
  display: flex;
  gap: 0.4rem;
  background: #fff;
  padding: 0.35rem;
  border-radius: 99px;
  box-shadow: 0 25px 60px -30px rgba(42,26,31,0.35), 0 1px 0 rgba(255,255,255,0.9) inset;
}

.gate-form input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  padding: 0.85rem 1rem;
  font-family: var(--sans);
  font-size: 16px; /* prevent iOS zoom */
  color: var(--ink);
  letter-spacing: 0.08em;
}

.gate-form input::placeholder { color: #c6a899; }

.gate-form button {
  flex: 0 0 auto;
  border: none;
  padding: 0.85rem 1.4rem;
  border-radius: 99px;
  background: var(--ink);
  color: #fff5ec;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.25s ease, transform 0.2s ease;
}

.gate-form button:active { transform: scale(0.97); }

.gate-error {
  margin-top: 1rem;
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent-deep);
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gate-error.show { opacity: 1; }

.gate-form.shake { animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* =============== CURSOR GLOW =============== */
.cursor-glow {
  position: fixed;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227,93,106,0.18), transparent 60%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1;
  mix-blend-mode: multiply;
  transition: opacity 0.4s ease;
  opacity: 0;
}

/* =============== HERO =============== */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  justify-items: center;
  padding: 1.5rem;
  padding-top: calc(1.5rem + var(--safe-t));
  padding-bottom: calc(1.5rem + var(--safe-b));
  background: radial-gradient(ellipse at top, #fff2e8 0%, var(--bg) 60%);
  overflow: hidden;
}

.stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(227,93,106,0.4), transparent),
    radial-gradient(1px 1px at 70% 80%, rgba(198,147,99,0.5), transparent),
    radial-gradient(1.5px 1.5px at 40% 60%, rgba(227,93,106,0.3), transparent),
    radial-gradient(1px 1px at 90% 20%, rgba(198,147,99,0.4), transparent),
    radial-gradient(1px 1px at 10% 80%, rgba(227,93,106,0.3), transparent),
    radial-gradient(1.5px 1.5px at 55% 15%, rgba(198,147,99,0.5), transparent);
  animation: drift 40s linear infinite;
  pointer-events: none;
}

@keyframes drift {
  from { transform: translateY(0); }
  to   { transform: translateY(-60px); }
}

.hero-inner {
  position: relative;
  text-align: center;
  z-index: 2;
  grid-row: 2;
  align-self: center;
  width: 100%;
  max-width: 90vw;
}

.hero-heart {
  width: clamp(48px, 9vw, 78px);
  margin: 0 auto 1.5rem;
  opacity: 0;
  transform: translateY(-8px) scale(0.85);
  animation: heart-in 1.6s 0.1s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards,
             heart-beat 2.4s 1.8s ease-in-out infinite;
  filter: drop-shadow(0 12px 24px rgba(227, 93, 106, 0.35));
}

.hero-heart svg {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes heart-in {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  15%      { transform: scale(1.08); }
  30%      { transform: scale(1); }
  45%      { transform: scale(1.04); }
  60%      { transform: scale(1); }
}

.eyebrow {
  font-family: var(--sans);
  font-size: clamp(0.65rem, 2.5vw, 0.75rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fade-up 1.2s 0.2s forwards;
}

.title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3rem, 16vw, 9rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.title .line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
  animation: fade-up 1.4s forwards;
  overflow: visible;
}

.title .line:nth-child(1) {
  animation-delay: 0.5s;
  line-height: 0.95;
}
.title .line:nth-child(2) {
  animation-delay: 0.9s;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 60%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
  padding-bottom: 0.2em;
  margin-bottom: -0.1em;
}

.nicknames {
  margin-top: 1.25rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 3.5vw, 1.6rem);
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: 1.35;
  padding: 0 1rem;
  opacity: 0;
  animation: fade-up 1.2s 1.3s forwards;
}

.sub {
  margin-top: 1.5rem;
  color: var(--ink-soft);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-style: italic;
  opacity: 0;
  animation: fade-up 1.2s 1.7s forwards;
  padding: 0 1rem;
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.scroll-hint {
  grid-row: 3;
  align-self: end;
  justify-self: center;
  width: 22px;
  height: 38px;
  border: 1.5px solid var(--ink-soft);
  border-radius: 14px;
  opacity: 0;
  animation: fade-up 1s 2s forwards;
  margin-bottom: 0.5rem;
}

.scroll-hint span {
  display: block;
  width: 3px;
  height: 8px;
  margin: 6px auto 0;
  background: var(--ink-soft);
  border-radius: 2px;
  animation: scroll-dot 1.8s ease-in-out infinite;
}

@keyframes scroll-dot {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-height: 640px) {
  .scroll-hint { display: none; }
  .hero { grid-template-rows: auto; place-items: center; }
  .hero-inner { grid-row: auto; }
}

/* =============== CHAPTERS =============== */
.chapter {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 4rem 1.25rem;
  padding-bottom: calc(4rem + var(--safe-b));
  position: relative;
}

.chapter.warm   { background: var(--bg-warm); }
.chapter.finale { background: linear-gradient(180deg, var(--bg-warm) 0%, #f0d6c5 100%); }

.chapter-inner {
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.chap-num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.75rem;
}

.chapter h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 8vw, 5rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 2.5rem;
  padding: 0 0.5rem;
}

.chapter h2 + .lead { margin-top: -1.25rem; }

.lead {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  padding: 0 0.5rem;
}

/* =============== METER =============== */
.meter {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px -30px rgba(42,26,31,0.25), 0 1px 0 rgba(255,255,255,0.9) inset;
}

.meter-track {
  position: relative;
  height: 12px;
  background: #f4e6dc;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.meter-fill {
  position: absolute;
  inset: 0;
  width: 50%;
  background: linear-gradient(90deg, var(--gold), var(--accent), var(--accent-deep));
  border-radius: 99px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(227,93,106,0.4);
}

#meterInput {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  height: 28px;
  padding: 0;
}

#meterInput::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid #fff;
  box-shadow: 0 8px 24px -6px rgba(227,93,106,0.6);
  cursor: grab;
}

#meterInput::-moz-range-thumb {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid #fff;
  cursor: grab;
}

.meter-readout { margin-top: 1.25rem; font-family: var(--serif); }

#meterValue {
  display: block;
  font-size: clamp(2.25rem, 8vw, 3rem);
  font-weight: 400;
  color: var(--accent-deep);
  line-height: 1;
}

.meter-unit {
  display: block;
  font-style: italic;
  color: var(--ink-soft);
  margin-top: 0.3rem;
  font-size: clamp(0.85rem, 2.2vw, 0.95rem);
  padding: 0 0.5rem;
}

/* =============== TIMELINE =============== */
.timeline {
  list-style: none;
  text-align: left;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  padding-left: 1.85rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), var(--accent), transparent);
}

.timeline li {
  position: relative;
  margin-bottom: 2.25rem;
  opacity: 0;
  transform: translateX(-16px);
  transition: all 0.8s ease;
}

.timeline li.in { opacity: 1; transform: translateX(0); }

.timeline .dot {
  position: absolute;
  left: -1.85rem;
  top: 7px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg-warm), 0 0 0 5px var(--accent);
  transform: translateX(2px);
}

.timeline .dot.big {
  width: 18px; height: 18px;
  top: 2px;
  transform: translateX(0);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--bg-warm), 0 0 0 5px var(--accent), 0 0 0 5px rgba(227,93,106,0.4); }
  50%      { box-shadow: 0 0 0 3px var(--bg-warm), 0 0 0 5px var(--accent), 0 0 0 14px rgba(227,93,106,0); }
}

.timeline h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.1rem, 3.8vw, 1.4rem);
  margin-bottom: 0.35rem;
  color: var(--ink);
  line-height: 1.25;
}

.timeline p {
  color: var(--ink-soft);
  font-size: clamp(0.92rem, 2.5vw, 1rem);
  line-height: 1.65;
}

/* =============== CARDS =============== */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  max-width: 760px;
  margin: 0 auto;
}

.card {
  aspect-ratio: 3/4;
  border: none;
  background: transparent;
  cursor: pointer;
  perspective: 1000px;
  padding: 0;
}

.card-inner {
  position: relative;
  width: 100%; height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

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

.card-front, .card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 14px;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.card-front {
  background: linear-gradient(135deg, #fff 0%, #fbeee4 100%);
  border: 1px solid rgba(227,93,106,0.15);
  box-shadow: 0 15px 40px -25px rgba(42,26,31,0.3);
}

.card-front span {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2rem, 8vw, 2.5rem);
  color: var(--accent);
  opacity: 0.6;
}

.card-front::after {
  content: "♡";
  position: absolute;
  bottom: 0.75rem;
  font-size: 1rem;
  color: var(--accent);
  opacity: 0.4;
}

.card-back {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  transform: rotateY(180deg);
  box-shadow: 0 20px 50px -25px rgba(184,56,74,0.5);
}

.card-back p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(0.85rem, 2.4vw, 1.05rem);
  line-height: 1.4;
  text-align: center;
}

/* =============== HEART CANVAS =============== */
#heart {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  width: min(460px, 85vw);
  height: auto;
}

.tiny {
  margin-top: 1.25rem;
  font-family: ui-monospace, monospace;
  font-size: clamp(0.68rem, 2vw, 0.8rem);
  color: var(--ink-soft);
  opacity: 0.7;
  padding: 0 0.75rem;
  word-break: break-word;
}

/* =============== CHAT BUBBLES =============== */
.chats {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: 560px;
  margin: 0 auto;
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 0.85rem;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 50px -30px rgba(42,26,31,0.25);
}

.bubble {
  position: relative;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: clamp(0.92rem, 2.8vw, 1rem);
  line-height: 1.4;
  max-width: 88%;
}

.bubble .who {
  display: block;
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  opacity: 0.7;
}

.bubble.jeroen {
  align-self: flex-start;
  background: #f4e6dc;
  color: var(--ink);
  border-bottom-left-radius: 4px;
}

.bubble.mayesta {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  border-bottom-right-radius: 4px;
}

.bubble.mayesta .who { color: rgba(255,255,255,0.85); }

/* =============== DICTIONARY =============== */
.dict {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  max-width: 820px;
  margin: 0 auto 2.5rem;
}

.word {
  padding: 1.1rem 1.15rem;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(227,93,106,0.12);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.word .said {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 3vw, 1.1rem);
  color: var(--accent-deep);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.word .meant {
  font-family: var(--sans);
  font-size: clamp(0.8rem, 2.2vw, 0.85rem);
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.blooper-list {
  max-width: 560px;
  margin: 2rem auto 0;
  padding: 1.4rem 1.4rem;
  background: #fff;
  border-radius: 18px;
  text-align: left;
  box-shadow: 0 20px 50px -30px rgba(42,26,31,0.2);
}

.blooper-list h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  color: var(--accent-deep);
  font-style: italic;
}

.blooper-list ul { list-style: none; padding: 0; }

.blooper-list li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(227,93,106,0.15);
  color: var(--ink);
  font-size: clamp(0.88rem, 2.4vw, 0.95rem);
  line-height: 1.4;
}

.blooper-list li:last-child { border-bottom: none; }
.blooper-list li::before { content: "— "; color: var(--accent); }

/* =============== GIFT =============== */
.gift {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  min-height: 360px;
  display: grid;
  place-items: center;
}

.gift-box {
  position: relative;
  width: 180px;
  height: 180px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  animation: gift-wobble 2.8s ease-in-out infinite;
  transform-origin: bottom center;
  transition: opacity 0.7s ease, transform 0.7s ease;
  filter: drop-shadow(0 20px 30px rgba(184, 56, 74, 0.3));
}

@keyframes gift-wobble {
  0%, 100% { transform: rotate(-2.5deg) translateY(0); }
  50%      { transform: rotate(2.5deg) translateY(-4px); }
}

.gift-body {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 68%;
  background: linear-gradient(135deg, #ff8a95 0%, var(--accent) 50%, var(--accent-deep) 100%);
  border-radius: 6px;
  overflow: hidden;
}

.gift-body::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.25), transparent 60%);
  pointer-events: none;
}

.gift-lid {
  position: absolute;
  top: 0;
  left: -5%;
  right: -5%;
  height: 36%;
  background: linear-gradient(135deg, #ffa3ac 0%, var(--accent) 100%);
  border-radius: 6px;
  transition: transform 0.9s cubic-bezier(0.3, 1.2, 0.4, 1), opacity 0.8s ease;
  transform-origin: center bottom;
  z-index: 3;
  overflow: hidden;
}

.gift-lid::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.3), transparent 60%);
}

.gift-ribbon-v, .gift-ribbon-top-v {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 16%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--gold) 0%, #a87a4f 100%);
  z-index: 2;
}

.gift-ribbon-top-v { z-index: 4; }

.gift-ribbon-h {
  display: none;
}

.gift-ribbon-top-h {
  display: none;
}

.gift-bow {
  position: absolute;
  top: -22%;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 55%;
  z-index: 5;
}

.gift-bow::before, .gift-bow::after {
  content: "";
  position: absolute;
  top: 25%;
  width: 48%;
  height: 65%;
  background: linear-gradient(135deg, var(--gold) 0%, #a87a4f 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: inset -2px 0 4px rgba(0,0,0,0.15);
}

.gift-bow::before {
  left: 0;
  transform: rotate(-18deg);
}

.gift-bow::after {
  right: 0;
  transform: rotate(18deg);
}

.gift-box:active {
  animation: none;
  transform: scale(0.96);
}

.gift.opened .gift-box {
  animation: none;
  opacity: 0;
  transform: scale(0.7) translateY(20px);
  pointer-events: none;
}

.gift.opened .gift-lid {
  transform: translateY(-140%) rotate(-18deg);
  opacity: 0;
}

.gift-reveal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 0.5rem;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: opacity 0.8s 0.4s ease, transform 0.8s 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.15);
  pointer-events: none;
}

.gift.opened .gift-reveal {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.gift-card {
  background: #fff;
  border-radius: 22px;
  padding: 2rem 1.4rem;
  box-shadow: 0 30px 70px -30px rgba(42,26,31,0.4), 0 1px 0 rgba(255,255,255,0.9) inset;
  text-align: center;
  max-width: 380px;
  width: 100%;
  border: 1px solid rgba(227,93,106,0.12);
  position: relative;
  overflow: hidden;
}

.gift-card::before {
  content: "";
  position: absolute;
  top: -50%; right: -50%;
  width: 150%; height: 150%;
  background: radial-gradient(circle, rgba(227,93,106,0.1), transparent 60%);
  pointer-events: none;
}

.gift-game-label {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.gift-game {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 7vw, 2.35rem);
  font-weight: 400;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 60%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.9rem;
  padding-bottom: 0.12em;
}

.gift-desc {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: clamp(0.88rem, 2.5vw, 0.95rem);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.gift-key {
  display: flex;
  gap: 0.4rem;
  background: linear-gradient(135deg, #fbeee4 0%, #f4e0d0 100%);
  border-radius: 12px;
  padding: 0.35rem;
  margin-bottom: 1rem;
  align-items: stretch;
  border: 1px dashed rgba(184,56,74,0.25);
}

.gift-key code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: clamp(0.82rem, 2.6vw, 0.95rem);
  padding: 0.75rem 0.5rem;
  color: var(--ink);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  word-break: break-all;
  user-select: all;
}

.gift-copy {
  border: none;
  background: var(--ink);
  color: #fff5ec;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  min-height: 42px;
  transition: background 0.25s ease, transform 0.15s ease;
}

.gift-copy:active { transform: scale(0.96); }
.gift-copy.copied { background: #3a8c5e; }

.gift-steam {
  display: inline-block;
  padding: 0.9rem 1.75rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 99px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  min-height: 48px;
  transition: transform 0.25s ease, box-shadow 0.3s ease, filter 0.25s ease;
  box-shadow: 0 15px 30px -15px rgba(184,56,74,0.55);
  position: relative;
  z-index: 1;
}

.gift-steam::after {
  content: " →";
  transition: transform 0.3s ease;
  display: inline-block;
}

@media (hover: hover) {
  .gift-steam:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -15px rgba(184,56,74,0.7); }
  .gift-steam:hover::after { transform: translateX(4px); }
  .gift-copy:hover { background: var(--accent-deep); }
  .gift-box:hover { animation-play-state: paused; }
}

/* =============== FINALE =============== */
.big-line {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 6vw, 3rem);
  font-weight: 300;
  line-height: 1.25;
  margin: 0.55rem 0;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(20px);
  transition: all 1.2s ease;
  padding: 0 0.5rem;
}

.big-line.muted {
  color: var(--ink-soft);
  font-style: italic;
  font-size: clamp(1rem, 3.2vw, 1.5rem);
}

.finale.active .big-line { opacity: 1; transform: translateY(0); }
.finale.active .big-line:nth-child(4) { transition-delay: 0.3s; }
.finale.active .big-line:nth-child(5) { transition-delay: 0.9s; }
.finale.active .big-line:nth-child(6) { transition-delay: 1.5s; }

.btn {
  margin-top: 2.25rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: 99px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  min-height: 48px;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 15px 35px -15px rgba(42,26,31,0.5);
}

.btn:active { transform: translateY(0); }

/* =============== FOOTER =============== */
footer {
  text-align: center;
  padding: 3rem 1.25rem;
  padding-bottom: calc(3rem + var(--safe-b));
  background: #f0d6c5;
  line-height: 1.5;
}

footer p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  font-weight: 300;
  color: var(--accent-deep);
  letter-spacing: 0.01em;
}

/* =============== CONFETTI =============== */
.floating-heart {
  position: fixed;
  pointer-events: none;
  font-size: 1.5rem;
  z-index: 1000;
  animation: rise 3s ease-out forwards;
}

@keyframes rise {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* =============== TABLET+ (≥560px) =============== */
@media (min-width: 560px) {
  .chapter { padding: 5rem 1.75rem; }
  .chapter h2 { margin-bottom: 1.5rem; }
  .lead { margin-bottom: 3rem; }

  .meter { padding: 2rem 1.75rem; }

  .cards { gap: 1rem; grid-template-columns: repeat(3, 1fr); }
  .card-front, .card-back { border-radius: 16px; padding: 1.25rem; }

  .chat { padding: 1.3rem 1.1rem; }

  .dict { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
  .word { padding: 1.3rem 1.25rem; }

  .blooper-list { padding: 1.6rem 1.8rem; }

  .timeline { padding-left: 2.25rem; }
  .timeline .dot { left: -2.25rem; }

  .bubble { max-width: 82%; font-size: 1rem; }
}

/* =============== DESKTOP (≥900px) =============== */
@media (min-width: 900px) {
  .chapter { padding: 6rem 2rem; }

  .meter { padding: 2.5rem; }

  .cards { gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

  .chat { padding: 1.5rem; }

  .dict { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
  .word { padding: 1.4rem 1.3rem; }

  .blooper-list { padding: 1.8rem 2rem; }

  .timeline { padding-left: 2.5rem; }
  .timeline .dot { left: -2.5rem; }

  .btn { margin-top: 3rem; padding: 1.1rem 2.4rem; }

  footer { padding: 3rem 2rem; }
}

/* =============== HOVER DEVICES ONLY =============== */
@media (hover: hover) {
  .card:hover .card-inner          { transform: translateY(-6px); }
  .card.flipped:hover .card-inner  { transform: rotateY(180deg) translateY(-6px); }
  .word:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -25px rgba(42,26,31,0.25);
  }
  .btn:hover {
    transform: translateY(-2px);
    background: var(--accent-deep);
    box-shadow: 0 20px 40px -15px rgba(184,56,74,0.6);
  }
  .gate-form button:hover { background: var(--accent-deep); }
}

/* =============== TOUCH DEVICES =============== */
@media (hover: none) {
  .cursor-glow { display: none; }
}

/* =============== MOTION =============== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .cursor-glow { display: none; }
}
