/* The page is the last box: kraft cardboard, a taped-on shipping label,
   marker handwriting, typewriter label text, and rubber stamps. */

:root {
  --kraft: #c69c66;
  --kraft-deep: #a87d49;
  --paper: #fffdf8;
  --ink: #1c2541;
  --ink-soft: #4a5370;
  --stamp: #d1293d;
  --tape: rgba(240, 226, 182, 0.88);
  --yellow: #ffdd3c;
  --ok: #1d8a58;
  --ok-bg: #d3f1df;
  --bad-bg: #ffe0e3;
  --note: #fff3a8;
  --marker: "Permanent Marker", "Marker Felt", "Chalkboard SE", cursive;
  --type: "Courier Prime", "Courier New", Courier, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
/* Only html gets overflow hidden (it applies to the page itself). On body it
   would make body its own scroll container, and with overscroll-behavior: none
   iOS then swallows vertical swipes. clip hides overflow without that. */
html { overflow-x: hidden; }
body { overflow-x: clip; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--type);
  font-size: 17px;
  line-height: 1.45;
  background-color: var(--kraft);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .2 0 0 0 0 .07 0 0 0 .45 -.08'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(90deg, transparent 0 7px, rgba(90, 55, 20, 0.05) 7px 8px);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: manipulation;
}

button { font: inherit; color: inherit; cursor: pointer; }

#app {
  max-width: 480px;
  margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top) + 14px)
    max(16px, env(safe-area-inset-right))
    calc(env(safe-area-inset-bottom) + 40px)
    max(16px, env(safe-area-inset-left));
}

.hidden { display: none !important; }

/* ---------- Progress tape ---------- */
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -6px 14px;
  padding: 9px 18px;
  background: var(--tape);
  font-family: var(--marker);
  font-size: 1.05rem;
  transform: rotate(-1deg);
  box-shadow: 0 2px 5px rgba(60, 35, 10, 0.18);
  clip-path: polygon(0 0, 100% 0, 98.6% 22%, 100% 45%, 98.4% 70%, 100% 100%, 0 100%, 1.4% 76%, 0 50%, 1.6% 25%);
}
.hud[hidden] { display: none; }
.hud-boxes { display: flex; gap: 4px; }
.hud-boxes i {
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 2px;
}
.hud-boxes i.done { background: var(--ink); }
.hud-boxes i.now { background: var(--stamp); }

/* ---------- Screens ---------- */
.stage-host { display: grid; }
.screen {
  grid-area: 1 / 1;
  min-width: 0;
  animation: enter 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.screen.leaving {
  animation: leave 0.28s ease-in forwards;
  pointer-events: none;
}
@keyframes enter {
  from { opacity: 0; transform: translateY(28px) rotate(1.5deg); }
}
@keyframes leave {
  to { opacity: 0; transform: translateY(-18px) scale(0.97); }
}

/* ---------- Type ---------- */
.title {
  margin: 10px 0 4px;
  font-family: var(--marker);
  font-weight: 400;
  font-size: clamp(2.1rem, 10vw, 2.8rem);
  line-height: 1.02;
  transform: rotate(-1.5deg);
  transform-origin: left center;
}
.lede { margin: 0 0 22px; max-width: 34ch; }
h2 {
  margin: 0.1em 0 0.7em;
  font-family: var(--marker);
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.15;
}
p { margin: 0.6em 0; }
.small { font-size: 0.9rem; color: var(--ink-soft); }
.center { text-align: center; }
.meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 2px; }

/* ---------- Shipping label card ---------- */
.label {
  position: relative;
  padding: 24px 20px 22px;
  background: var(--paper);
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 14px 26px -14px rgba(60, 35, 10, 0.55);
}
.label::before,
.label::after {
  content: "";
  position: absolute;
  top: -13px;
  width: 92px;
  height: 26px;
  background: var(--tape);
  box-shadow: 0 1px 2px rgba(60, 35, 10, 0.15);
}
.label::before { left: 14px; transform: rotate(-5deg); }
.label::after { right: 14px; transform: rotate(4deg); }
.label.thud { animation: thud 0.3s 0.12s; }
@keyframes thud {
  40% { transform: translateY(3px) scale(0.995); }
}

.ship {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--ink-soft);
}
.ship dt { font-weight: 700; }
.ship dd { margin: 0; }

.note {
  padding: 12px 14px;
  background: var(--note);
  transform: rotate(-0.6deg);
  box-shadow: 0 6px 12px -8px rgba(60, 35, 10, 0.6);
  animation: pop 0.3s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.stack { display: grid; gap: 10px; margin-top: 16px; }
.stack:empty { display: none; }

/* ---------- Stamps ---------- */
.stamp {
  --rot: -12deg;
  --stamp-color: var(--stamp);
  position: absolute;
  top: 16px;
  right: 12px;
  z-index: 3;
  padding: 6px 12px 5px;
  border: 3px solid var(--stamp-color);
  border-radius: 6px;
  outline: 2px solid var(--stamp-color);
  outline-offset: 2px;
  color: var(--stamp-color);
  font: 700 1.05rem/1 var(--type);
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-transform: uppercase;
  opacity: 0.85;
  mix-blend-mode: multiply;
  pointer-events: none;
  transform: rotate(var(--rot));
  animation: slam 0.32s cubic-bezier(0.3, 1.5, 0.5, 1) backwards;
}
@keyframes slam {
  from { opacity: 0; transform: rotate(var(--rot)) scale(2.6); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 20px 12px;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--marker);
  font-size: 1.25rem;
  line-height: 1.2;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 0.06s, box-shadow 0.06s;
  -webkit-user-select: none;
  user-select: none;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: 0.5; }
.btn-block { display: block; width: 100%; }
.btn-ghost { background: var(--paper); }
.btn:focus-visible,
.opt:focus-visible,
.key:focus-visible,
.tile:focus-visible,
.choice:focus-visible { outline: 3px solid var(--stamp); outline-offset: 3px; }

.btn.floating {
  position: fixed;
  z-index: 60;
  transition: left 0.22s ease-out, top 0.22s ease-out;
}
.btn.poof { animation: poof 0.3s forwards; }
@keyframes poof { to { transform: scale(0); opacity: 0; } }

.linkish {
  justify-self: center;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-decoration: underline;
}

.shake { animation: shake 0.4s; }
@keyframes shake {
  20% { transform: translateX(-7px) rotate(-1deg); }
  40% { transform: translateX(6px) rotate(1deg); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.85); }
}
.pop-in { animation: pop 0.3s cubic-bezier(0.2, 1.4, 0.4, 1); }

/* ---------- Multiple choice ---------- */
.options { display: grid; gap: 10px; margin: 4px 0 8px; }
.opt {
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
  text-align: left;
  font-size: 1rem;
  line-height: 1.3;
}
.opt:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.opt.right { background: var(--ok-bg); border-color: var(--ok); box-shadow: 0 3px 0 var(--ok); font-weight: 700; }
.opt.wrong { background: var(--bad-bg); color: var(--stamp); text-decoration: line-through; box-shadow: none; transform: translateY(2px); }
.opt:disabled:not(.right):not(.wrong) { opacity: 0.45; }

.score {
  margin: 8px 0 0;
  font-family: var(--marker);
  font-size: 4.5rem;
  line-height: 1;
  text-align: center;
}

/* ---------- Hangman ---------- */
.balloons { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto; overflow: visible; }
.balloons .bob { animation: bob 2.6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes bob {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(-4px) rotate(2deg); }
}
.balloons .popped { animation: balloon-pop 0.28s ease-out forwards; transform-box: fill-box; transform-origin: center; }
@keyframes balloon-pop {
  50% { transform: scale(1.35); opacity: 1; }
  to { transform: scale(1.7); opacity: 0; }
}
.balloons .giftbox.fall { animation: fall 0.8s cubic-bezier(0.55, 0, 1, 0.45) forwards; transform-box: fill-box; transform-origin: center; }
@keyframes fall {
  to { transform: translateY(80px) rotate(24deg); opacity: 0; }
}
.slots {
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: 4px;
  max-width: calc(var(--n) * 34px);
  margin: 12px auto 18px;
}
.slot {
  height: 38px;
  border-bottom: 3px solid var(--ink);
  font-family: var(--marker);
  font-size: 1.55rem;
  line-height: 40px;
  text-align: center;
}
.slot.filled { animation: pop 0.25s; }
.slot.gap { border-bottom: 0; }
.keys { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.key {
  height: 42px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 2px 0 var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
}
.key:active { transform: translateY(2px); box-shadow: none; }
.key.hit { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); box-shadow: none; }
.key.miss { background: #e8e2d6; border-color: #b7ad9a; color: #9a917f; text-decoration: line-through; box-shadow: none; }

/* ---------- Theater (gift 1) ---------- */
.theater {
  padding: 12px 12px 0;
  border: 3px solid var(--ink);
  border-radius: 16px 16px 6px 6px;
  background: linear-gradient(#4a1626, #2c0d17);
  box-shadow: 0 14px 26px -14px rgba(60, 35, 10, 0.7);
}
.marquee { display: flex; justify-content: space-between; padding: 0 6px 10px; }
.marquee i { width: 10px; height: 10px; border-radius: 50%; background: #6b5a3a; transition: background 0.3s, box-shadow 0.3s; }
.theater.lit .marquee i { background: #ffd75a; box-shadow: 0 0 8px 2px rgba(255, 215, 90, 0.8); animation: chase 0.9s steps(1) infinite; }
.theater.lit .marquee i:nth-child(odd) { animation-delay: -0.45s; }
@keyframes chase { 50% { opacity: 0.3; box-shadow: none; } }
.stage-box {
  position: relative;
  height: 290px;
  overflow: hidden;
  border-radius: 4px 4px 0 0;
  background: radial-gradient(ellipse at 50% 35%, #3b2540, #120a14 72%);
}
.stage-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52px;
  border-top: 3px solid #2a160a;
  background: repeating-linear-gradient(90deg, #7a4a26 0 22px, #66391b 22px 24px);
}
.spotlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 42% 16% at 50% 86%, rgba(255, 240, 190, 0.55), transparent 70%),
    linear-gradient(rgba(255, 240, 190, 0.22), rgba(255, 240, 190, 0.08));
  clip-path: polygon(44% 0, 56% 0, 82% 100%, 18% 100%);
  opacity: 0;
  transition: opacity 0.6s;
}
.theater.lit .spotlight { opacity: 1; }
.on-stage {
  position: absolute;
  inset: 34px 14% 58px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #fff7dc;
  text-align: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.5s 0.2s, transform 0.6s 0.2s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.theater.lit .on-stage { opacity: 1; transform: none; }
.stage-emoji { font-size: 54px; line-height: 1.1; }
.stage-kicker { font-size: 0.85rem; opacity: 0.85; }
.stage-title { font-family: var(--marker); font-size: 1.7rem; line-height: 1.1; color: #ffd75a; text-shadow: 0 2px 0 #000; }
.curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 50.5%;
  background: repeating-linear-gradient(90deg, #7c0d1d 0 6px, #b4182f 6px 16px, #d42a40 16px 19px, #a01428 19px 26px);
  box-shadow: inset 0 -7px 0 #e0b13c, inset 0 -9px 0 #6a4a0a;
  transition: transform 0.9s cubic-bezier(0.6, 0, 0.2, 1);
}
.curtain.left { left: 0; transform-origin: left center; }
.curtain.right { right: 0; transform-origin: right center; }
.theater.dragging .curtain { transition: none; }
.theater.open .curtain { transform: scaleX(0.14); }
.valance {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  height: 30px;
  background:
    linear-gradient(#e0b13c, #e0b13c) 0 12px / 100% 3px no-repeat,
    radial-gradient(circle at 50% 0, #b4182f 15px, #e0b13c 15px 17px, transparent 18px) 0 12px / 32px 18px repeat-x,
    linear-gradient(#b4182f, #b4182f) 0 0 / 100% 12px no-repeat;
}
.rope {
  position: absolute;
  top: 0;
  right: 10px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 12px 14px;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  transform-origin: 50% 0;
  animation: sway 2.4s ease-in-out infinite alternate;
}
.theater.dragging .rope { animation: none; }
@keyframes sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
.rope-cord {
  width: 4px;
  height: calc(118px + var(--pull, 0px));
  background: repeating-linear-gradient(#e0b13c 0 5px, #a77d1c 5px 8px);
}
.theater:not(.dragging) .rope-cord { transition: height 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.rope-tassel {
  width: 22px;
  height: 34px;
  margin-top: -2px;
  border: 2px solid #6a4a0a;
  border-radius: 50% 50% 40% 40% / 35% 35% 65% 65%;
  background: radial-gradient(circle at 40% 30%, #ffe28a, #c9971f);
}
.theater.open .rope { opacity: 0; pointer-events: none; transition: opacity 0.3s; }

/* ---------- Art class ---------- */
.draw-intro { margin: 0 0 2px; color: var(--ink-soft); }
.swatches { display: flex; gap: 10px; margin: 0 0 10px; }
.swatch {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 2px 0 var(--ink);
}
.swatch.on { outline: 3px solid var(--yellow); outline-offset: 2px; transform: scale(1.1); }
.draw-pad {
  position: relative;
  height: 300px;
  overflow: hidden;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  background: #fff;
}
.draw-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  background: linear-gradient(90deg, transparent, #2f9bd6 20%, #2f9bd6 80%, transparent);
  box-shadow: 0 0 16px 4px rgba(47, 155, 214, 0.55);
  animation: scan 0.85s ease-in-out infinite alternate;
}
@keyframes scan { to { top: calc(100% - 6px); } }
.verdict { font-size: 1.1rem; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 8px; }
.frame {
  margin: 0;
  padding: 4px;
  border: 5px solid #c9971f;
  outline: 2px solid #6a4a0a;
  background: #fff;
  box-shadow: inset 0 0 0 2px #6a4a0a, 0 8px 14px -8px rgba(0, 0, 0, 0.6);
}
.frame.big { grid-column: 1 / -1; order: -1; padding: 6px; border-width: 8px; }
.frame.big .placard { font-size: 0.8rem; }
.frame img { display: block; width: 100%; height: auto; }
.placard {
  margin-top: 6px;
  padding: 3px 4px;
  background: #f3ead2;
  font-size: 0.62rem;
  line-height: 1.2;
  text-align: center;
}

/* ---------- Musical shortlist (gift 1) ---------- */
.shortlist { min-width: 0; margin-top: 10px; animation: enter 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.amp { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-weight: 700; }
.shortlist-title { margin: 6px 0 2px; font-family: var(--marker); font-size: 1.7rem; line-height: 1.1; }
.shortlist-lede { margin: 0 0 10px; max-width: 36ch; }
.carousel {
  display: flex;
  gap: 12px;
  margin: 0 -16px;
  padding: 8px 16px 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.slide {
  position: relative;
  flex: 0 0 86%;
  overflow: hidden;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 5px 0 var(--ink);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.slide:not(.active) * { animation-play-state: paused !important; }
.slide-ribbon {
  position: absolute;
  top: 16px;
  right: -36px;
  z-index: 4;
  width: 150px;
  padding: 4px 0;
  background: var(--yellow);
  border-block: 2px solid var(--ink);
  font-family: var(--marker);
  font-size: 0.8rem;
  text-align: center;
  transform: rotate(35deg);
}
.slide-body { padding: 12px 14px 16px; }
.slide-where { font-size: 0.85rem; opacity: 0.75; }
.slide-body h3 { margin: 2px 0 6px; font-family: var(--marker); font-size: 1.45rem; font-weight: 400; line-height: 1.1; }
.slide-body p { margin: 0 0 10px; font-size: 0.95rem; line-height: 1.4; }
.slide-facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0 0 10px; font-size: 0.9rem; }
.slide-facts dt { font-weight: 700; }
.slide-facts dd { margin: 0; }
.slide-body .slide-city { font-size: 0.85rem; opacity: 0.8; }
.slide-link { color: var(--stamp); font-weight: 700; text-underline-offset: 3px; }
.carousel-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 16px; }
.carousel-nav .arrow {
  width: 42px;
  height: 42px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
  font-size: 1.5rem;
  line-height: 1;
}
.carousel-nav .arrow:disabled { opacity: 0.35; }
.dots { display: flex; gap: 8px; }
.dots button::after { content: ''; position: absolute; inset: -8px -4px; }
.dots button { position: relative; width: 11px; height: 11px; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: transparent; }
.dots button.on { background: var(--ink); }

/* Posters: one animated scene per production */
.poster { position: relative; height: 170px; overflow: hidden; }
.poster > * { position: absolute; }
.poster i, .cz i { font-style: normal; line-height: 1; }
.pz-say {
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 4px 10px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-family: var(--marker);
  font-size: 0.85rem;
  transform: rotate(-4deg);
}
.slide.active .pz-say { animation: pz-say 0.45s 0.6s cubic-bezier(0.3, 1.6, 0.6, 1) backwards; }
@keyframes pz-say { from { opacity: 0; transform: rotate(-4deg) scale(0.3); } }

.scene-julia { background: radial-gradient(circle at 30% 15%, #ff9ccc, transparent 55%), linear-gradient(160deg, #ff4f9a, #6a1fb0); }
.pz-hearts { inset: 0; }
.pz-hearts i { position: absolute; bottom: -30px; font-size: 1.3rem; animation: pz-rise 3.4s linear infinite; }
.pz-hearts i:nth-child(1) { left: 6%; }
.pz-hearts i:nth-child(2) { left: 22%; animation-delay: -1.1s; font-size: 1rem; }
.pz-hearts i:nth-child(3) { left: 40%; animation-delay: -2.3s; }
.pz-hearts i:nth-child(4) { left: 58%; animation-delay: -0.6s; font-size: 1rem; }
.pz-hearts i:nth-child(5) { left: 74%; animation-delay: -1.8s; }
.pz-hearts i:nth-child(6) { left: 88%; animation-delay: -2.9s; font-size: 1.1rem; }
@keyframes pz-rise {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(14px, -210px) scale(1.15); }
}
.pz-julia {
  top: 58px;
  left: 0;
  right: 0;
  color: #fff;
  font-family: var(--marker);
  font-size: 2.9rem;
  text-align: center;
  text-shadow: 3px 3px 0 #2b0a4a, 6px 6px 0 var(--yellow);
  animation: pz-wobble 1.1s ease-in-out infinite alternate;
}
@keyframes pz-wobble { from { transform: rotate(-3deg) scale(1); } to { transform: rotate(3deg) scale(1.08); } }
.pz-mic { right: 16px; bottom: 14px; font-size: 2rem; animation: pz-bounce 0.45s ease-in-out infinite alternate; }
@keyframes pz-bounce { to { transform: translateY(-9px) rotate(-12deg); } }

.scene-vampires { background: radial-gradient(circle at 78% 22%, #46297a, #160b2b 55%, #05030a); }
.pz-moon { top: 16px; right: 24px; width: 54px; height: 54px; border-radius: 50%; background: #f6edc8; box-shadow: 0 0 26px 8px rgba(246, 237, 200, 0.35); }
.pz-castle { left: 0; bottom: 0; width: 100%; height: 72px; }
.pz-bat { top: 46px; left: -40px; font-size: 1.5rem; animation: pz-fly 5s linear infinite, pz-flap 0.22s ease-in-out infinite alternate; }
.pz-bat.b2 { top: 78px; font-size: 1.1rem; animation-delay: -1.7s, 0s; }
.pz-bat.b3 { top: 22px; font-size: 1.9rem; animation-delay: -3.4s, -0.1s; }
@keyframes pz-fly {
  0% { translate: 0 0; }
  25% { translate: 110px -18px; }
  50% { translate: 210px 10px; }
  75% { translate: 300px -14px; }
  100% { translate: 420px 0; }
}
@keyframes pz-flap { to { scale: 1 0.5; } }
.pz-fog {
  left: -50%;
  bottom: 0;
  width: 200%;
  height: 44px;
  background:
    radial-gradient(ellipse 30% 100% at 25% 100%, rgba(205, 195, 235, 0.4), transparent),
    radial-gradient(ellipse 30% 100% at 70% 100%, rgba(205, 195, 235, 0.32), transparent);
  animation: pz-drift 7s ease-in-out infinite alternate;
}
@keyframes pz-drift { to { transform: translateX(22%); } }

.scene-lion { background: linear-gradient(#ffd56a, #ff8a3d 55%, #b8401e); }
.pz-sun {
  left: 50%;
  bottom: 22px;
  width: 112px;
  height: 112px;
  margin-left: -56px;
  border-radius: 50%;
  background: #fff3c0;
  box-shadow: 0 0 44px 14px rgba(255, 243, 192, 0.6);
}
.slide.active .pz-sun { animation: pz-sunrise 2.4s ease-out backwards; }
@keyframes pz-sunrise { from { transform: translateY(120px); } }
.pz-rock { left: 0; bottom: 0; width: 100%; height: 70px; }
.pz-lion { left: 72%; bottom: 33px; font-size: 1.9rem; }
.slide.active .pz-lion { animation: pz-lion 0.6s 1.9s cubic-bezier(0.3, 1.6, 0.6, 1) backwards; }
@keyframes pz-lion { from { opacity: 0; transform: translateY(16px) scale(0.6); } }
.pz-bird { top: 30px; left: -30px; font-size: 0.9rem; filter: brightness(0); opacity: 0.7; animation: pz-fly 7s linear infinite; }

.scene-mj { background: radial-gradient(ellipse at 50% 0%, #3d3d52, #0b0b10 70%); }
.pz-spot {
  top: -10px;
  left: 50%;
  width: 190px;
  height: 190px;
  margin-left: -95px;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 255, 255, 0.3), transparent 65%);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
}
.pz-floor {
  left: -12%;
  right: -12%;
  bottom: -4px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  height: 66px;
  transform: perspective(200px) rotateX(48deg);
  transform-origin: bottom;
}
.pz-floor i { border-radius: 2px; background: #2a2a35; animation: pz-tile 2.4s steps(1) infinite; }
@keyframes pz-tile {
  0% { background: #fff4c2; box-shadow: 0 0 12px #ffd75a; }
  25%, 100% { background: #2a2a35; box-shadow: none; }
}
.pz-mw { bottom: 36px; left: 0; font-size: 2.5rem; animation: pz-moonwalk 3.6s linear infinite; }
@keyframes pz-moonwalk {
  0% { opacity: 0; translate: 230px 0; }
  10%, 88% { opacity: 1; }
  100% { opacity: 0; translate: 20px 0; }
}
.pz-spark { font-size: 1rem; animation: pz-twinkle 1.2s ease-in-out infinite alternate; }
.pz-spark.s1 { top: 30px; right: 30px; }
.pz-spark.s2 { top: 64px; right: 70px; animation-delay: -0.6s; }
@keyframes pz-twinkle { from { opacity: 0.2; transform: scale(0.6) rotate(0); } to { opacity: 1; transform: scale(1.2) rotate(30deg); } }

.scene-moulin { background: radial-gradient(circle at 40% 30%, #c8102e, #4a000f 72%); }
.pz-mill { left: 50%; bottom: 0; width: 112px; height: 134px; margin-left: -84px; }
.pz-sails { transform-box: view-box; transform-origin: 50px 38px; animation: pz-spin 5s linear infinite; }
@keyframes pz-spin { to { transform: rotate(360deg); } }
.pz-bulb { fill: #ffd75a; animation: pz-blink 0.8s steps(1) infinite; }
.pz-bulb:nth-of-type(odd) { animation-delay: -0.4s; }
@keyframes pz-blink { 50% { fill: #7a4a10; } }
.pz-cancan { right: 22px; bottom: 10px; font-size: 2.3rem; transform-origin: 50% 100%; animation: pz-kick 0.38s ease-in-out infinite alternate; }
@keyframes pz-kick { from { transform: rotate(-12deg); } to { transform: rotate(12deg) translateY(-5px); } }
.pz-gem { font-size: 1.1rem; animation: pz-twinkle 1.1s ease-in-out infinite alternate; }
.pz-gem.g1 { top: 52px; right: 34px; }
.pz-gem.g2 { top: 92px; left: 18px; animation-delay: -0.5s; }

/* City strips */
.cz { position: relative; height: 56px; overflow: hidden; border-block: 2px solid var(--ink); }
.cz > * { position: absolute; }
.cz-label { top: 6px; left: 12px; z-index: 3; color: var(--ink); font-family: var(--marker); font-size: 1.1rem; text-shadow: 0 1px 0 #fff, 0 0 6px #fff; }
.cz-stuttgart { background: linear-gradient(#a9d8ff, #e6f4ff); }
.cz-hills { left: 0; bottom: 0; width: 100%; height: 34px; }
.cz-tower { right: 20%; bottom: 8px; width: 16px; height: 48px; }
.cz-car { bottom: 3px; left: 0; z-index: 2; font-size: 1.1rem; animation: cz-drive 3.6s linear infinite; }
@keyframes cz-drive { from { translate: 340px 0; } to { translate: -40px 0; } }
.cz-hamburg { background: linear-gradient(#8fa4b6, #c3d0da); }
.cz-elphi { right: 14%; bottom: 13px; width: 62px; height: 35px; }
.cz-ship { bottom: 9px; left: 30%; z-index: 2; font-size: 1.35rem; animation: cz-sail 6s ease-in-out infinite alternate, cz-bob 1.4s ease-in-out infinite alternate; }
@keyframes cz-sail { to { translate: 50px 0; } }
@keyframes cz-bob { to { transform: translateY(-2px) rotate(-3deg); } }
.cz-waves {
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 14px;
  background: radial-gradient(circle at 10px -3px, transparent 8px, #2f5d7c 9px) 0 0 / 20px 14px repeat-x;
  animation: cz-waves 1.6s linear infinite;
}
@keyframes cz-waves { to { background-position: 20px 0; } }
.cz-rain {
  inset: -20px 0 0;
  background: repeating-linear-gradient(110deg, transparent 0 9px, rgba(255, 255, 255, 0.55) 9px 10px, transparent 10px 19px);
  opacity: 0.7;
  animation: cz-rain 0.45s linear infinite;
}
@keyframes cz-rain { to { transform: translate(-7px, 20px); } }

/* ---------- Ticket ---------- */
.ticket {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 50px;
  margin-top: 6px;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 14px 26px -14px rgba(60, 35, 10, 0.7);
  animation: reveal 0.6s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  right: 39px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--kraft);
}
.ticket::before { top: -11px; }
.ticket::after { bottom: -11px; }
.ticket-main { padding: 18px 14px 58px 22px; border-radius: 12px 0 0 12px; }
.ticket-main h2 { margin-bottom: 0.4em; font-size: 1.7rem; }
.ticket-stage .ticket-main { padding-left: 34px; background: linear-gradient(90deg, #a01428 0 14px, #e0b13c 14px 18px, var(--paper) 18px); }
.ticket-paris .ticket-main { padding-left: 40px; background: linear-gradient(90deg, #0055a4 0 8px, #fff 8px 16px, #ef4135 16px 24px, var(--paper) 24px); }
.ticket-details { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0 0 4px; }
.ticket-details dt { font-weight: 700; }
.ticket-details dd { margin: 0; overflow-wrap: anywhere; }
.ticket-stub {
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 3px dashed var(--ink-soft);
  font-family: var(--marker);
  font-size: 1.05rem;
  writing-mode: vertical-rl;
}
.stamp.on-ticket { top: auto; bottom: 14px; right: 62px; }

/* ---------- Speech bubbles ---------- */
.bubble {
  position: absolute;
  z-index: 6;
  padding: 6px 11px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-family: var(--marker);
  font-size: 1.05rem;
  white-space: nowrap;
  animation: bubble 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) backwards;
}
.bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 16px;
  width: 12px;
  height: 12px;
  border-right: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  background: #fff;
  transform: rotate(45deg) skew(10deg, 10deg);
}
.bubble.tail-right::after { left: auto; right: 16px; }
@keyframes bubble { from { opacity: 0; transform: scale(0.3) rotate(-10deg); } }

/* ---------- Signature ---------- */
.sig-pad {
  position: relative;
  height: 170px;
  margin: 4px 0 6px;
  border: 2px dashed var(--ink-soft);
  border-radius: 10px;
  background: #fff;
}
.sig-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.sig-line { position: absolute; left: 16px; right: 16px; bottom: 44px; border-bottom: 2px solid var(--ink-soft); }
.sig-x { position: absolute; left: 18px; bottom: 50px; font-weight: 700; color: var(--ink-soft); }
.sig-msg { min-height: 1.4em; }
.sig-msg:empty { display: none; }
.stamp.stamp-center { inset: 0; width: max-content; height: max-content; margin: auto; font-size: 1.5rem; }
.row { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 14px; }

/* ---------- Padlock ---------- */
.lock { width: 104px; margin: 0 auto 14px; }
.lock svg { display: block; width: 100%; overflow: visible; }
.lock .shackle { transition: transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
.lock.open .shackle { transform: translateY(-20px); }
.dials {
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  gap: 10px;
  max-width: 300px;
  margin: 0 auto 6px;
}
.dial { display: grid; gap: 6px; }
.dial-btn {
  height: 40px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 2px 0 var(--ink);
  font-size: 0.85rem;
}
.dial-btn:active { transform: translateY(2px); box-shadow: none; }
.dial-window {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 66px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: linear-gradient(#ddd6c6, #fff 32%, #fff 68%, #ddd6c6);
  touch-action: none;
}
.dial-num { font-family: var(--marker); font-size: 2.4rem; line-height: 1; }
.dial-num.roll-up { animation: roll-up 0.16s ease-out; }
.dial-num.roll-down { animation: roll-down 0.16s ease-out; }
@keyframes roll-up { from { transform: translateY(60%); opacity: 0.2; } }
@keyframes roll-down { from { transform: translateY(-60%); opacity: 0.2; } }
.dial.solved .dial-window { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.dial.solved .dial-btn { opacity: 0.35; }

/* ---------- Shell game ---------- */
.shells { position: relative; height: 180px; margin: 8px 0 4px; border-bottom: 3px solid var(--ink); }
.shell {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 33.333%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
}
.shell-gift { position: absolute; left: 50%; bottom: 6px; font-size: 42px; line-height: 1; transform: translateX(-50%); }
.shell-box {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 84px;
  overflow: hidden;
  border: 2.5px solid var(--ink);
  border-radius: 4px 4px 2px 2px;
  background: var(--kraft);
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.08);
  transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.shell-box::before { content: ""; position: absolute; left: 0; right: 0; top: 24px; height: 16px; background: var(--tape); }
.shell-box.up { transform: translateY(-82px); }
.shell-print {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  font-size: 0.55rem;
  white-space: nowrap;
  font-weight: 700;
  color: rgba(28, 37, 65, 0.6);
  text-align: center;
  transform: rotate(180deg);
}

/* ---------- Survey ---------- */
.rating-face { font-size: 84px; line-height: 1.15; text-align: center; }
.rating-face.boing { animation: boing 0.25s; }
@keyframes boing { 50% { transform: scale(1.15) rotate(-6deg); } }
.rating-label { min-height: 2.6em; font-family: var(--marker); font-size: 1.2rem; line-height: 1.25; text-align: center; }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 16px;
  margin: 18px 0 8px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: linear-gradient(90deg, var(--ok), var(--yellow), var(--stamp));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 38px;
  height: 38px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
}
input[type="range"]::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}
.scale-ends { display: flex; justify-content: space-between; margin-bottom: 18px; font-size: 0.8rem; color: var(--ink-soft); }
.toss-scene { position: relative; height: 230px; margin: 4px 0 6px; }
.toss-fly { position: absolute; left: 6px; top: 30px; z-index: 1; }
.toss-paper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 110px;
  height: 140px;
  padding-top: 12px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 4px 0 rgba(28, 37, 65, 0.18);
}
.toss-spin { position: relative; }
.toss-ball { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; opacity: 0; }
.toss-ball svg { display: block; width: 100%; height: 100%; }
.toss-face { font-size: 40px; line-height: 1; }
.toss-score { font-family: var(--marker); font-size: 1.2rem; }
.toss-lines { display: grid; gap: 6px; width: 70%; margin-top: 4px; }
.toss-lines i { display: block; height: 3px; border-radius: 2px; background: #d6d0c4; }
.toss-lid { position: absolute; right: 4px; bottom: 98px; z-index: 0; width: 94px; height: 18px; transform-origin: right bottom; }
.toss-bin { position: absolute; right: 6px; bottom: 0; z-index: 2; width: 90px; height: 100px; transform-origin: center bottom; }
.toss-lid svg, .toss-bin svg { display: block; width: 100%; height: 100%; }
.love-letter { position: absolute; z-index: 2; font-size: 2.4rem; line-height: 1; }
.dove { position: absolute; top: 0; left: 0; z-index: 3; width: 0; height: 0; }
.dove-turn { position: absolute; left: -28px; top: -28px; transition: transform 0.25s ease-in-out; }
.dove-turn.turned { transform: scaleX(-1); }
.dove-bird { display: block; font-size: 3.2rem; line-height: 1; transform-origin: 50% 70%; animation: dove-flap 0.16s ease-in-out infinite alternate; }
@keyframes dove-flap { to { transform: scaleY(0.72) translateY(3px); } }
.dove-cargo { position: absolute; left: -14px; top: 18px; font-size: 1.8rem; line-height: 1; transform: rotate(-8deg); }
.love-heart { position: absolute; z-index: 2; font-size: 1.1rem; font-style: normal; line-height: 1; pointer-events: none; }
.toss-caption { min-height: 1.5em; font-family: var(--marker); font-size: 1.3rem; }

.bar {
  height: 16px;
  margin: 10px 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--paper);
}
.bar > i {
  display: block;
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 8px, var(--yellow) 8px 16px);
  transition: width 2.1s cubic-bezier(0.6, 0, 0.3, 1);
}

/* ---------- Which is bigger ---------- */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 150px;
  padding: 12px 8px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 5px 0 var(--ink);
  font-family: var(--marker);
  font-size: 1.15rem;
  line-height: 1.15;
  transition: transform 0.25s, opacity 0.25s, background 0.25s;
}
.choice .em { font-size: 54px; line-height: 1; }
.choice:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.choice.picked { background: var(--yellow); transform: scale(1.04) rotate(-2deg); }
.choice.faded { opacity: 0.35; transform: scale(0.94); }
.choice-wide { grid-column: 1 / -1; flex-direction: row; min-height: 0; padding: 12px; font-size: 1.05rem; }
.choice-wide .em, .choice-wide span:first-child { font-size: 1.5rem; }
.choice.gone { animation: gone 0.35s forwards; }
@keyframes gone { to { opacity: 0; transform: scale(0.6) rotate(8deg); visibility: hidden; } }

/* ---------- German ---------- */
.speech {
  position: relative;
  margin: 6px 0 22px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--marker);
  font-size: 1.4rem;
  line-height: 1.2;
}
.speech::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 28px;
  border-top: 14px solid var(--ink);
  border-right: 16px solid transparent;
}
.preview {
  min-height: 1.6em;
  margin-bottom: 8px;
  font-family: var(--marker);
  font-size: 1.3rem;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}
.tile-answer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 60px;
  margin-bottom: 14px;
  padding: 8px;
  border: 2px dashed var(--ink-soft);
  border-radius: 10px;
}
.tile-answer.good { border-style: solid; border-color: var(--ok); background: var(--ok-bg); }
.tile-placeholder { color: var(--ink-soft); font-size: 0.9rem; padding-left: 4px; }
.tile-pool { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; }
.tile {
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
}
.tile:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.tile.used { opacity: 0.18; box-shadow: none; }

/* ---------- Wheel ---------- */
.wheel-wrap { position: relative; width: min(100%, 330px); aspect-ratio: 1; margin: 12px auto 6px; }
.wheel-disc { width: 100%; height: 100%; transition: transform 4.6s cubic-bezier(0.12, 0.7, 0.1, 1); will-change: transform; }
.wheel-disc svg { display: block; width: 100%; height: 100%; }
.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  z-index: 2;
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 32px solid var(--stamp);
  transform: translateX(-50%);
  filter: drop-shadow(0 3px 0 var(--ink));
}
.wheel-hub {
  position: absolute;
  inset: 36%;
  z-index: 2;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 4px 0 var(--ink);
  font-family: var(--marker);
  font-size: 1.35rem;
}
.wheel-hub:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.wheel-hub:disabled { background: #eadfb8; }
.wheel-result:empty { display: none; }
.wheel-result { margin-top: 10px; }
.wheel-landed { display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--marker); font-size: 1.6rem; }
.wheel-landed .em { font-size: 2.2rem; }

/* ---------- Trebuchet ---------- */
.treb-canvas {
  display: block;
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: #bfe3f2;
  touch-action: none;
}
.power {
  height: 18px;
  margin: 14px 0 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--paper);
}
.power > i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--ok), var(--yellow) 55%, var(--stamp)); }
.status { min-height: 1.6em; margin: 10px 0 12px; font-family: var(--marker); font-size: 1.2rem; text-align: center; }
.fire { -webkit-touch-callout: none; touch-action: none; }
.fire.charging { background: var(--stamp); color: var(--paper); transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

/* ---------- Final ---------- */
.final-stage { display: grid; gap: 8px; }
.bigbox {
  margin: 24px 0 18px;
  font-size: 150px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  filter: drop-shadow(0 12px 0 rgba(60, 35, 10, 0.25));
}
.bigbox.burst { animation: burst 0.45s forwards; }
@keyframes burst { to { transform: scale(2.4); opacity: 0; } }
.hold-hint { min-height: 1.5em; font-family: var(--marker); font-size: 1.2rem; }
.final-stage .bar > i { transition: none; }
.flash { position: fixed; inset: 0; z-index: 90; background: #fff; pointer-events: none; animation: flash 0.8s forwards; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
@keyframes reveal { from { opacity: 0; transform: scale(0.6) rotate(-4deg); } }

/* ---------- Passphrase gate (low quiz score) ---------- */
.gate-score { margin: 2px 0 10px; font-size: 1.05rem; }
.gate-score strong { color: var(--stamp); font-family: var(--marker); font-size: 1.4rem; }
.pass-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: 700 1.05rem/1.3 var(--type); /* >=16px so iOS doesn't zoom on focus */
  box-shadow: inset 0 2px 0 rgba(28, 37, 65, 0.12);
}
.pass-input:focus { outline: 3px solid var(--yellow); outline-offset: 1px; }
.pass-input:disabled { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }

/* ---------- Paris (big gift) ---------- */
.paris {
  position: relative;
  height: 360px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 30% 8%, #fff, transparent),
    radial-gradient(1px 1px at 46% 22%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 70% 10%, #fff, transparent),
    radial-gradient(1px 1px at 88% 30%, #fff, transparent),
    radial-gradient(1px 1px at 20% 40%, #fff, transparent),
    linear-gradient(#121833, #34306a 55%, #b4688a);
  animation: reveal 0.5s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.paris-moon {
  position: absolute;
  top: 26px;
  right: 30px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff3c4;
  box-shadow: 0 0 24px 6px rgba(255, 243, 196, 0.35);
}
.paris-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 20px; background: #1c2541; }
.paris-tower {
  position: absolute;
  bottom: 18px;
  left: 50%;
  height: 82%;
  aspect-ratio: 120 / 250;
  transform: translateX(-50%);
  animation: rise 1.1s cubic-bezier(0.2, 0.9, 0.3, 1) backwards;
}
.paris-tower svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 14px rgba(233, 185, 73, 0.45)); }
@keyframes rise { from { transform: translate(-50%, 110%); } }
.paris-tower .spark { fill: #fff; opacity: 0; animation: twinkle 0.9s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: 1; } }
.paris-beret {
  position: absolute;
  top: -9%;
  left: 50%;
  width: 34%;
  transform: translate(-50%, 0) rotate(-12deg);
  animation: beret 0.8s 1.15s cubic-bezier(0.3, 1.4, 0.5, 1) backwards;
}
.paris-beret svg { display: block; width: 100%; }
@keyframes beret {
  from { transform: translate(-50%, -320px) rotate(-60deg); }
}
.flying { position: fixed; top: 0; left: 0; z-index: 75; font-size: 64px; line-height: 1; pointer-events: none; }

.seat-view {
  margin: 22px 4px 8px;
  padding: 10px 10px 14px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 12px 24px -12px rgba(60, 35, 10, 0.7);
  transform: rotate(-1.5deg);
  animation: enter 0.6s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.seat-photo { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #111; }
.seat-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.seat-view figcaption { margin-top: 10px; font-family: var(--marker); font-size: 1.2rem; text-align: center; }
.seat-note { margin: 4px 0 0; font-size: 0.85rem; text-align: center; opacity: 0.75; }
.view-pin {
  position: absolute;
  z-index: 2;
  padding: 4px 9px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--marker);
  font-size: 0.85rem;
  white-space: nowrap;
  box-shadow: 0 3px 0 var(--ink);
}
.view-pin::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -9px;
  margin-left: -7px;
  border: 7px solid transparent;
  border-bottom: 0;
  border-top-color: var(--ink);
}
.pin-stage { transform: translate(-50%, calc(-100% - 14px)); animation: pin-drop 0.5s 1.2s cubic-bezier(0.3, 1.6, 0.6, 1) backwards; }
.pin-you { left: 50%; bottom: 7%; transform: translateX(-50%); animation: pin-drop-you 0.5s 1.8s cubic-bezier(0.3, 1.6, 0.6, 1) backwards; }
@keyframes pin-drop { from { opacity: 0; transform: translate(-50%, calc(-100% - 60px)); } }
@keyframes pin-drop-you { from { opacity: 0; transform: translate(-50%, 30px); } }
.view-ring {
  position: absolute;
  z-index: 1;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 3px solid var(--yellow);
  border-radius: 50%;
  animation: view-ring 1.4s 1.2s ease-out infinite backwards;
}
@keyframes view-ring { from { opacity: 1; transform: scale(0.4); } to { opacity: 0; transform: scale(2.4); } }

.exit-survey { margin-top: 22px; }
.stars { display: flex; justify-content: center; gap: 6px; margin: 6px 0 4px; }
.star {
  padding: 0 2px;
  border: 0;
  background: none;
  color: #d6cfbf;
  font-size: 2.9rem;
  line-height: 1;
  -webkit-text-stroke: 2px var(--ink);
  transition: color 0.15s;
}
.star.on { color: var(--yellow); }
.star.fixed { color: #ffb43c; }
.star.pop { animation: star-pop 0.4s cubic-bezier(0.3, 1.8, 0.6, 1); }
@keyframes star-pop { 0% { transform: scale(0.5) rotate(-20deg); } 60% { transform: scale(1.35) rotate(8deg); } }
.stars.locked .star { pointer-events: none; }
.survey-caption { min-height: 1.5em; margin: 4px 0 8px; font-family: var(--marker); font-size: 1.15rem; line-height: 1.25; }
.review {
  margin: 4px 0 8px;
  padding: 12px 14px;
  border: 2px dashed var(--ink);
  border-radius: 10px;
  background: #fff;
  animation: enter 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.review-stars { color: var(--yellow); font-size: 1.4rem; letter-spacing: 2px; -webkit-text-stroke: 1px var(--ink); }
.review p { margin: 4px 0; font-style: italic; }
.review footer { font-size: 0.85rem; opacity: 0.75; }

.signoff { margin-top: 18px; font-family: var(--marker); font-size: 1.3rem; line-height: 1.3; text-align: center; }

/* ---------- Toast + confetti ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 22px);
  z-index: 80;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--marker);
  font-size: 1.1rem;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 160%) rotate(-1.5deg);
  transition: transform 0.3s cubic-bezier(0.2, 1.2, 0.4, 1), opacity 0.2s, visibility 0s 0.3s;
}
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) rotate(-1.5deg);
  transition: transform 0.3s cubic-bezier(0.2, 1.2, 0.4, 1), opacity 0.2s;
}

.confetti-canvas { position: fixed; inset: 0; z-index: 70; width: 100%; height: 100%; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .screen, .screen.leaving { animation-duration: 0.01s; }
  .balloons .bob { animation: none; }
}

/* ---------- Debug sidebar (only with ?debug) ---------- */
.dbg-toggle {
  position: fixed;
  left: 12px;
  bottom: calc(env(safe-area-inset-bottom) + 12px);
  z-index: 95;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
  font-size: 22px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.dbg-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 96;
  width: min(280px, 82vw);
  overflow-y: auto;
  padding: calc(env(safe-area-inset-top) + 12px) 12px calc(env(safe-area-inset-bottom) + 16px);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9rem;
  box-shadow: 6px 0 24px rgba(0, 0, 0, 0.35);
  transform: translateX(-105%);
  transition: transform 0.25s ease-out;
}
.dbg-panel.open { transform: none; }
.dbg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-family: var(--marker); font-size: 1.2rem; }
.dbg-panel button { color: var(--paper); background: none; border: 0; font: inherit; }
.dbg-x { padding: 6px 10px; font-size: 1.1rem; }
.dbg-list { margin: 0 0 12px; padding: 0; list-style: none; }
.dbg-list button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 253, 248, 0.12);
  text-align: left;
}
.dbg-panel button.on { background: var(--stamp); border-radius: 6px; }
.dbg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.dbg-row span { width: 100%; opacity: 0.7; }
.dbg-row button { padding: 6px 10px; border: 1px solid rgba(255, 253, 248, 0.35); border-radius: 6px; }
.dbg-actions { display: grid; gap: 6px; }
.dbg-actions button { padding: 9px 10px; border: 1px solid rgba(255, 253, 248, 0.35); border-radius: 6px; text-align: left; }
