/* ═══════════════════════════════════════════════════════════════
   A MATCH MADE IN PARAÍSO — interactive pitch
   Y2K tropical romance UI. All hand-rolled, no frameworks.
   ═══════════════════════════════════════════════════════════════ */

/* ---------- fonts (self-hosted) ---------- */
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/Fredoka-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/Fredoka-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/Fredoka-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/Fredoka-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/Fredoka-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/Fredoka-500-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/Fredoka-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/Fredoka-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Quicksand'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/Quicksand-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Quicksand'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/Quicksand-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Quicksand'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/Quicksand-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Quicksand'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/Quicksand-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Quicksand'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/Quicksand-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Quicksand'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/Quicksand-500-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Quicksand'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/Quicksand-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Quicksand'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/Quicksand-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Silkscreen'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/Silkscreen-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'Silkscreen'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/Silkscreen-700-latin.woff2') format('woff2'); }
@font-face { font-family: 'Shadows Into Light Two'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/ShadowsIntoLightTwo-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Shadows Into Light Two'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/ShadowsIntoLightTwo-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('assets/fonts/Lora-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('assets/fonts/Lora-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- design tokens ---------- */
:root {
  --cream:   #FAF3E8;
  --cream-2: #F2E6D0;
  --paper:   #FFFDF6;
  --ink:     #40291D;
  --ink-soft:#6B5040;
  --coral:   #F25B4A;
  --coral-dk:#C93A2A;
  --orange:  #F68831;
  --orange-dk:#B85E12;
  --pink:    #EE7AB7;
  --pink-lt: #FADAEB;
  --pink-dk: #B44A82;
  --green:   #6D8642;
  --green-dk:#4E622C;
  --green-lt:#DFE7CB;
  --gold:    #E9BE58;
  --gold-lt: #F7E5B5;
  --gold-dk: #8A6A1B;

  --font-display: 'Fredoka', 'Trebuchet MS', sans-serif;
  --font-body: 'Quicksand', 'Verdana', sans-serif;
  --font-pixel: 'Silkscreen', 'Courier New', monospace;
  /* per-group fonts (see font map) */
  --font-kicker: var(--font-pixel);                                    /* group 1: section pills */
  --font-title: 'Shadows Into Light Two', 'Fredoka', cursive;          /* group 2: big titles + character names */
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;             /* hook, blurb, bio, comp titles */

  --border: 2.5px solid var(--ink);
  --sticker: 4px 4px 0 var(--ink);
  --sticker-sm: 3px 3px 0 var(--ink);
  --radius: 16px;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  /* subtle Y2K checkerboard */
  background-image:
    linear-gradient(45deg, var(--cream-2) 25%, transparent 25%, transparent 75%, var(--cream-2) 75%),
    linear-gradient(45deg, var(--cream-2) 25%, transparent 25%, transparent 75%, var(--cream-2) 75%);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  display: grid;
  place-items: center;
}

.px { font-family: var(--font-pixel); letter-spacing: 0.02em; }

/* ---------- desktop backdrop doodles ---------- */
.desktop-doodles { position: fixed; inset: 0; pointer-events: none; display: none; }
.doodle { position: absolute; }
.doodle-sun {
  top: 6vh; right: 8vw; width: 130px; height: 130px; border-radius: 50%;
  background: var(--gold); border: var(--border); box-shadow: var(--sticker);
}
.doodle-sun::after {
  content: ''; position: absolute; inset: -26px; border-radius: 50%;
  background:
    repeating-conic-gradient(from 8deg, var(--orange) 0deg 6deg, transparent 6deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%);
          mask: radial-gradient(circle, transparent 62%, #000 63%);
}
.doodle-wave { left: 0; right: 0; height: 24px; opacity: .55; background:
  radial-gradient(circle at 12px -6px, transparent 14px, var(--green) 15px, var(--green) 17px, transparent 18px);
  background-size: 48px 24px; }
.doodle-wave-1 { bottom: 9vh; }
.doodle-wave-2 { bottom: 5.5vh; background-position-x: 24px; opacity: .35; }

/* ---------- the device / window ---------- */
.device {
  position: relative;
  width: 100%;
  height: 100dvh;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 760px) and (min-height: 700px) {
  .desktop-doodles { display: block; }
  .device {
    width: 432px;
    height: min(880px, 94vh);
    border: 3px solid var(--ink);
    border-radius: 22px;
    box-shadow: 8px 8px 0 var(--ink), 8px 8px 0 3px var(--coral);
  }
}

/* ---------- window chrome ---------- */
.chrome {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(180deg, var(--coral) 0%, var(--coral) 55%, var(--coral-dk) 100%);
  border-bottom: var(--border);
  position: relative; z-index: 30;
}
.chrome::after { /* glossy strip */
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 42%;
  background: linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,0));
  pointer-events: none;
}
.chrome-dots { display: flex; gap: 5px; }
.chrome-dots i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); display: block; }
.chrome-dots i:nth-child(1) { background: var(--gold); }
.chrome-dots i:nth-child(2) { background: var(--green); }
.chrome-dots i:nth-child(3) { background: var(--pink); }
.chrome-title { color: #fff; font-size: 12px; text-shadow: 1.5px 1.5px 0 var(--ink); position: relative; z-index: 1; }
.chrome-actions { display: flex; gap: 6px; align-items: center; position: relative; z-index: 1; }
.chrome-btn {
  font-size: 10px; line-height: 1;
  background: var(--cream); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 6px;
  padding: 4px 7px; cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}
.chrome-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.chrome-btn[aria-pressed="true"] { background: var(--gold); }
.chrome-coin {
  display: flex; align-items: center; gap: 5px;
  background: var(--ink); color: var(--gold-lt);
  border-radius: 999px; padding: 4px 10px 4px 6px;
  font-size: 10px; position: relative; z-index: 1;
}
.chrome-coin b { font-weight: 700; min-width: 14px; text-align: center; }
.coin-ico { width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FBE9BE 0 25%, var(--gold) 55%, #C9992F 100%);
  border: 1.5px solid var(--gold-dk); }
.chrome-coin.bump { animation: coinbump .3s ease; }
@keyframes coinbump { 40% { transform: scale(1.2); } }
.coin-float {
  position: fixed; z-index: 99;
  font-size: 13px; font-weight: 700;
  color: var(--gold); text-shadow: 1.5px 1.5px 0 var(--ink);
  pointer-events: none;
  animation: floatup 1s ease-out forwards;
}
.chrome-x { cursor: default; }

/* ---------- progress ---------- */
.progress {
  flex: 0 0 auto;
  display: flex; gap: 4px;
  padding: 10px 14px 6px;
  position: relative; z-index: 25;
  transition: opacity .3s;
}
.progress.hidden { opacity: 0; }
.progress i {
  flex: 1; height: 6px; border-radius: 4px;
  background: var(--cream-2);
  border: 1.5px solid var(--ink);
  opacity: .8;
}
.progress i.done { background: var(--orange); }
.progress i.now { background: var(--coral); box-shadow: 1.5px 1.5px 0 var(--ink); opacity: 1; }

/* ---------- stage & screens ---------- */
.stage { position: relative; flex: 1; min-height: 0; }

.screen {
  position: absolute; inset: 0;
  overflow-x: hidden;
  display: flex; flex-direction: column;
  align-items: center; justify-content: safe center;
  gap: 14px;
  padding: 16px 22px 30px;
  overflow-y: auto;
  visibility: hidden; opacity: 0;
  transform: translateY(14px);
  transition: opacity .32s ease, transform .32s ease, visibility 0s .32s;
}
.screen.active {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity .32s ease, transform .32s ease;
  z-index: 5;
}

.slide-kicker {
  font-family: var(--font-kicker); font-weight: 700;
  font-size: 14px; letter-spacing: .02em;
  color: #fff;
  background: var(--green);
  border: 3px solid var(--ink); border-radius: 999px;
  box-shadow: var(--sticker);
  padding: 9px 22px 8px;
  text-shadow: 1.5px 1.5px 0 var(--ink);
}
.screen[data-level] { justify-content: flex-start; padding-top: 22px; }
.screen[data-level]::after { content: ''; margin-top: auto; }
.level-title { display: contents; }
.level-line { margin-bottom: auto; }
.screen[data-level] .slide-kicker { margin-bottom: auto; }
.level-line {
  font-weight: 700; font-size: min(37px, 9.4vw); line-height: 1;
  letter-spacing: .08em; white-space: nowrap;
  color: var(--coral-dk); text-shadow: 3px 3px 0 var(--gold);
  display: flex; align-items: center; gap: 14px;
}
.level-line .lh { font-size: .62em; color: var(--pink); text-shadow: 2px 2px 0 var(--ink); }
.level-title.pop .level-line, .level-title.pop .slide-kicker { animation: badgepop .55s cubic-bezier(.2, 1.6, .4, 1) both; }
.kicker-note { font-size: 12px; opacity: .9; }

.tap-hint {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 92%;
  text-align: center; font-size: 9px; color: var(--ink);
  background: rgba(233, 190, 88, .42);
  border: 1.5px solid rgba(64, 41, 29, .35);
  border-radius: 999px; padding: 6px 14px;
  animation: hintblink 1.3s ease-in-out infinite;
}
@keyframes hintpulse { 50% { opacity: .35; } }
@keyframes hintblink { 50% { opacity: .3; } }

/* gesture tutorial hints */
.gesture {
  position: absolute; left: 50%; top: 46%;
  transform: translateX(-50%);
  z-index: 18; pointer-events: none; opacity: 0;
  font-size: 12px;
  background: rgba(64, 41, 29, .85); color: var(--gold-lt);
  padding: 9px 16px; border-radius: 999px;
  white-space: nowrap;
}
.gesture-swipe.play { animation: ghswipe 3.6s ease-in-out .5s forwards; }
@keyframes ghswipe {
  0% { opacity: 0; transform: translateX(calc(-50% - 36px)); }
  12% { opacity: 1; }
  35% { transform: translateX(calc(-50% + 36px)); }
  60% { transform: translateX(calc(-50% - 36px)); }
  85% { opacity: 1; transform: translateX(calc(-50% + 36px)); }
  100% { opacity: 0; transform: translateX(calc(-50% + 36px)); }
}
.gesture-tap.play { animation: ghtap 3.2s ease-in-out .5s forwards; }
@keyframes ghtap {
  0% { opacity: 0; transform: translateX(-50%) scale(.85); }
  15% { opacity: 1; transform: translateX(-50%) scale(1.05); }
  30% { transform: translateX(-50%) scale(.92); }
  45% { transform: translateX(-50%) scale(1.05); }
  60% { transform: translateX(-50%) scale(.92); }
  85% { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) scale(1); }
}
.gesture-scroll { top: 58%; }
.gesture-scroll.play { animation: ghscroll 3.2s ease-in-out .5s forwards; }
@keyframes ghscroll {
  0% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  15% { opacity: 1; transform: translateX(-50%) translateY(6px); }
  40% { transform: translateX(-50%) translateY(-8px); }
  65% { transform: translateX(-50%) translateY(6px); }
  85% { opacity: 1; transform: translateX(-50%) translateY(-8px); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
}

@keyframes badgepop { from { transform: scale(.25) rotate(8deg); opacity: 0; } }

/* highlights */
.hl { padding: 0 5px; border-radius: 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; color: inherit;
  position: relative;
  transition: background-color .3s ease, color .3s ease, text-shadow .3s ease; }
.hl.dim { background: transparent !important; color: inherit !important; text-shadow: none !important; }
.plus-one {
  position: absolute; top: -14px; right: -10px;
  font-size: 12px; font-weight: 700; color: var(--gold);
  text-shadow: 1.5px 1.5px 0 var(--ink);
  pointer-events: none;
  animation: floatup 1.1s ease-out forwards;
}
@keyframes floatup {
  0% { opacity: 0; transform: translateY(6px) scale(.7); }
  20% { opacity: 1; transform: translateY(0) scale(1.1); }
  100% { opacity: 0; transform: translateY(-30px) scale(1); }
}
.hl-coral { background: var(--coral); color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.hl-orange { background: var(--orange); color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.hl-pink { background: var(--pink); color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.hl-green { background: var(--green); color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.hl-gold { background: var(--gold); color: var(--ink); }

/* pill buttons */
.pill-btn {
  font-family: var(--font-body); font-weight: 600; font-size: 17px;
  color: #fff; text-shadow: 1px 1px 0 var(--ink);
  background: linear-gradient(180deg, #F77463 0%, var(--coral) 45%, var(--coral-dk) 100%);
  border: var(--border); border-radius: 999px;
  box-shadow: var(--sticker);
  padding: 12px 26px 13px;
  cursor: pointer;
  position: relative;
}
.pill-btn::after {
  content: ''; position: absolute; left: 14px; right: 14px; top: 4px; height: 38%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
  pointer-events: none;
}
.pill-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.pill-btn-ghost { background: var(--paper); color: var(--ink); text-shadow: none; }
.pill-btn-ghost::after { display: none; }

/* ═══════════════ BOOT ═══════════════ */
.screen-boot { background:
  linear-gradient(180deg, #47331F 0%, #40291D 100%); }
.boot-inner { width: 100%; max-width: 330px; color: var(--gold-lt); font-size: 11px; }
.boot-brand { font-size: 22px; font-weight: 700; color: var(--gold); margin-bottom: 2px; }
.boot-ver { font-size: 11px; color: var(--pink); }
.boot-copy { color: #A8917B; margin-bottom: 22px; }
.boot-lines { display: grid; gap: 9px; min-height: 110px; }
.boot-line { opacity: 0; }
.boot-line.on { opacity: 1; }
.boot-line .ok { color: #9FBF6A; }
.boot-line .warn { color: var(--pink); }
.boot-dots { opacity: .5; }
.cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.boot-bar {
  margin: 22px 0 26px; height: 18px;
  border: 2px solid var(--gold-lt); border-radius: 4px; padding: 2px;
}
.boot-bar-fill {
  height: 100%; width: 0%;
  background: repeating-linear-gradient(90deg, var(--orange) 0 10px, var(--gold) 10px 20px);
  background-size: 20px 100%;
  transition: width .28s steps(4);
  animation: barpole .5s linear infinite;
}
@keyframes barpole { to { background-position: 20px 0; } }
.press-start {
  font-family: var(--font-pixel); font-weight: 700; font-size: 15px;
  width: 100%; padding: 13px 10px;
  color: var(--ink); background: var(--gold);
  border: var(--border); border-radius: 10px; box-shadow: 4px 4px 0 #14202b00, var(--sticker);
  cursor: pointer;
  opacity: 0; pointer-events: none; transform: translateY(6px);
  transition: opacity .4s, transform .4s;
}
.press-start.on { opacity: 1; pointer-events: auto; transform: none; animation: hintpulse 1.8s ease-in-out infinite .8s; }
.press-start:active { transform: translate(3px, 3px); box-shadow: none; }

/* ═══════════════ MATCH ═══════════════ */
.match-eyebrow { font-size: 11px; color: var(--coral-dk); font-weight: 700; }

.book-card {
  width: min(100%, 330px);
  background: var(--paper);
  border: var(--border); border-radius: var(--radius);
  box-shadow: var(--sticker);
  overflow: hidden;
  position: relative;
  z-index: 25;   /* above the left back-zone so edge taps flip photos, not screens */
  touch-action: pan-y;
  cursor: grab;
  flex-shrink: 0;   /* never let the flex layout squash & clip the card body */
  user-select: none; -webkit-user-select: none;
}
.book-card.dragging { cursor: grabbing; transition: none; }
.book-card.snap { transition: transform .35s cubic-bezier(.2, 1.3, .4, 1); }

.book-card-art { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: var(--border); background: #2A3A54; }
.art-img { width: 100%; height: 100%; object-fit: cover; display: block;
  image-rendering: pixelated; user-select: none; -webkit-user-drag: none; }

/* ── slideshow crossfade (beach auto-loops; character cards loop only when zoomed) ── */
.ss-ready { position: relative; }
.ss-ready .ss-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .55s ease; image-rendering: auto; }
.ss-ready .ss-slide.ss-on { opacity: 1; }
.ss-dots { position: absolute; left: 0; right: 0; bottom: 7px; z-index: 4;
  display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.ss-dot { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .55); box-shadow: 0 0 2px rgba(0, 0, 0, .45);
  cursor: pointer; pointer-events: auto; transition: background .2s ease, transform .2s ease; }
.ss-dot.on { background: #fff; transform: scale(1.25); }
.ss-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  font-family: system-ui, sans-serif; font-size: 30px; line-height: 1; color: #fff;
  opacity: .3; text-shadow: 0 1px 4px rgba(0, 0, 0, .55); pointer-events: none; user-select: none; }
.ss-prev { left: 5px; } .ss-next { right: 5px; }
.ss-arrow[hidden] { display: none; }

.book-card-body { padding: 14px 18px 16px; display: grid; gap: 8px; }
.book-card-name { font-family: var(--font-title); font-weight: 700; font-size: 25px; line-height: 1.05; letter-spacing: .01em; }
.book-card-meta { font-size: 9px; color: var(--ink-soft); }
.book-card-bio { font-family: var(--font-serif); font-size: 14px; font-weight: 500; line-height: 1.5; }
.chip-row { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: var(--font-body); font-weight: 500; font-size: 12px;
  background: var(--pink-lt); border: 2px solid var(--ink); border-radius: 999px;
  padding: 2px 10px 3px;
}
.chip:nth-child(2) { background: var(--green-lt); }
.chip:nth-child(3) { background: #FBDDBC; }
.chip:nth-child(4) { background: var(--gold-lt); }
.chip:nth-child(5) { background: var(--pink-lt); }
.chip:nth-child(6) { background: var(--green-lt); }
.chip:nth-child(7) { background: #FBDDBC; }
.chip:nth-child(8) { background: var(--green-lt); }
.chip:nth-child(9) { background: var(--gold-lt); }
.chip:nth-child(10) { background: #FBDDBC; }
.chip:nth-child(11) { background: var(--pink-lt); }

.stamp {
  position: absolute; top: 20px;
  font-size: 22px; font-weight: 700;
  border: 3px solid; border-radius: 8px; padding: 4px 12px;
  opacity: 0; transform: rotate(-14deg) scale(.9);
  pointer-events: none;
}
.stamp-nope { right: 16px; color: var(--coral-dk); border-color: var(--coral-dk); transform: rotate(14deg) scale(.9); }
.stamp-like { left: 16px; color: var(--green-dk); border-color: var(--green-dk); }

.match-actions { display: flex; align-items: center; gap: 18px; }
.round-btn {
  width: 62px; height: 62px; border-radius: 50%;
  border: var(--border); box-shadow: var(--sticker-sm);
  font-size: 26px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  position: relative;
}
.round-btn::after { content: ''; position: absolute; inset: 5px 9px 55% 9px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0)); pointer-events: none; }
.round-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.round-btn-nope { background: var(--paper); color: var(--coral-dk); }
.round-btn-like { background: linear-gradient(180deg, #F896C8 0%, var(--pink) 60%, var(--pink-dk) 100%); color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.round-btn-like .beat { display: inline-block; animation: heartbeat 1.3s ease-in-out infinite; }
@keyframes heartbeat {
  0%, 40%, 100% { transform: scale(1); }
  10% { transform: scale(1.22); }
  20% { transform: scale(1); }
  30% { transform: scale(1.16); }
}
.match-hint { font-size: 9px; color: var(--ink-soft); }

.nope-toast {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%) translateY(8px);
  white-space: nowrap;
  font-size: 10px; background: var(--ink); color: var(--gold-lt);
  border-radius: 8px; padding: 8px 14px;
  opacity: 0; transition: opacity .25s, transform .25s;
}
.nope-toast.on { opacity: 1; transform: translateX(-50%); }

/* match overlay */
.match-overlay {
  position: absolute; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(238,122,183,.32), transparent 60%),
    linear-gradient(180deg, var(--coral) 0%, var(--pink) 100%);
  text-align: center;
}
.match-overlay[hidden] { display: none; }
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.match-overlay-inner { position: relative; padding: 24px; display: grid; gap: 14px; justify-items: center; max-width: 340px; }
.match-bang {
  font-size: 15px; font-weight: 700; color: var(--gold-lt);
  background: var(--ink); padding: 6px 14px; border-radius: 8px;
  transform: rotate(-3deg);
}
.match-headline {
  font-family: var(--font-title); font-weight: 700;
  font-size: 42px; line-height: 1.02; color: #fff;
  text-shadow: 2.5px 2.5px 0 var(--ink);
}
.match-headline em { font-style: normal; color: var(--gold); }
.match-sub { font-size: 13.5px; font-weight: 600; color: #fff; text-shadow: 1px 1px 0 rgba(64,41,29,.65); line-height: 1.5; }

/* ═══════════════ HOOK ═══════════════ */
.hook-logline {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(17px, 4.6vw, 20px); line-height: 1.5; text-align: center;
  max-width: 352px;
}
.hook-body {
  font-size: 14.5px; line-height: 1.6; font-weight: 500; text-align: center;
  background: var(--paper); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--sticker); padding: 16px 18px;
  max-width: 340px;
}
.hook-body em { color: var(--coral-dk); font-weight: 700; }

/* ═══════════════ TRADING CARDS ═══════════════ */
.deck { position: relative; width: min(100%, 300px); height: 544px; }
@media (max-height: 760px) { .deck { width: min(100%, 258px); height: 460px; } }
.deck .trading-card {
  position: absolute; inset: 0;
  cursor: pointer;
  transition: transform .55s cubic-bezier(.25, 1.2, .35, 1);
  transform-origin: 50% 50%;
  will-change: transform;
}
.deck[data-step="0"] .card-nick { transform: translate(-23%, -25%) scale(.53) rotate(-5deg); z-index: 2; }
.deck[data-step="0"] .card-ren  { transform: translate(23%, 27%) scale(.53) rotate(4deg); z-index: 1; }
.deck[data-step="1"] .card-nick { transform: translate(0, 0) scale(1) rotate(-1.2deg); z-index: 3; }
.deck[data-step="1"] .card-ren  { transform: translate(30%, 30%) scale(.5) rotate(6deg); z-index: 1; }
.deck[data-step="2"] .card-nick { transform: translate(-30%, -30%) scale(.5) rotate(-6deg); z-index: 1; }
.deck[data-step="2"] .card-ren  { transform: translate(0, 0) scale(1) rotate(1.2deg); z-index: 3; }

.trading-card {
  border: var(--border); border-radius: var(--radius);
  box-shadow: var(--sticker);
  overflow: hidden;
  background: var(--paper);
  display: flex; flex-direction: column;
}
.card-nick { background: linear-gradient(180deg, #FCE4C6 0%, var(--paper) 46%); }
.card-ren { background: linear-gradient(180deg, #FBD9D0 0%, var(--paper) 46%); }
.tc-head {
  display: flex; justify-content: center; align-items: center;
  padding: 10px 14px;
  border-bottom: var(--border);
  font-family: var(--font-body);
}
.card-nick .tc-head { background: var(--orange); }
.card-ren .tc-head { background: var(--coral); }
.tc-name { font-family: var(--font-title); font-weight: 400; font-size: 30px; color: #fff; text-shadow: 2px 2px 0 var(--ink); letter-spacing: .02em; }

.tc-art { position: relative; aspect-ratio: 1 / 1; flex: none; margin: 9px 20px 0; border: 2px solid var(--ink); border-radius: 10px;
  overflow: hidden; background: #fff; }
.tc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  image-rendering: auto; user-select: none; -webkit-user-drag: none; }

.tc-body { padding: 9px 14px 13px; display: grid; gap: 6px; font-size: 12.5px; line-height: 1.4; align-content: start; }
.tc-class b { color: var(--coral-dk); }
.tc-stats { border-top: 2px dashed var(--ink-soft); padding-top: 8px; display: grid; gap: 6px; }
.stat { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; }
.stat > span:first-child { min-width: 0; }
/* Nick's stats wrap more, so tighten his spacing to keep the last row from clipping */
.card-nick .tc-body { gap: 5px; }
.card-nick .tc-stats { padding-top: 6px; gap: 3px; }
.card-nick .tc-stats .stat { line-height: 1.2; }
.meter { font-size: 13px; letter-spacing: 1px; white-space: nowrap; font-style: normal; }
.meter i { font-style: normal; filter: grayscale(1); opacity: .28; }

/* ═══════════════ STORY ═══════════════ */
.screen-story { justify-content: center; gap: 18px; }
.story-text {
  max-width: 350px;
  font-size: 15.5px; line-height: 1.62; font-weight: 500;
}
.story-aside { color: var(--ink-soft); font-size: 13.5px; }
.story-punch {
  font-family: var(--font-title); font-weight: 700;
  font-size: 23px; line-height: 1.3; text-align: center;
  max-width: 330px;
}
.story-punch-sm { font-size: 17px; font-weight: 600; }

/* ═══════════════ TROPES ═══════════════ */
.trope-cloud {
  list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 9px 7px;
  max-width: 360px;
}
.trope {
  font-family: var(--font-body); font-weight: 600;
  font-size: 13px; line-height: 1.25; text-align: center;
  border: 2px solid var(--ink); border-radius: 999px;
  box-shadow: var(--sticker-sm);
  padding: 6px 13px 7px;
  background: var(--paper);
}
.trope i { font-style: normal; font-weight: 500; font-size: 11px; opacity: .85; }
.trope:nth-child(odd) { transform: rotate(-1.6deg); }
.trope:nth-child(even) { transform: rotate(1.8deg); }
.t-big { font-size: 14.5px; }
.t-coral { background: var(--coral); color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.t-orange { background: var(--orange); }
.t-pink { background: var(--pink); color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.t-green { background: var(--green); color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.t-gold { background: var(--gold); }
.t-quote { border-radius: 12px; font-style: italic; }

/* ═══════════════ VIBES — ipod & cassette pile ═══════════════ */
/* full-bleed to the slide edges and pulled up; the iPod screen is anchored in % so it moves with it */
.pile { position: relative; z-index: 1; width: calc(100% + 44px); max-width: none; margin: -18px -22px 0; }
/* keep the "bonus comps" pill above the pulled-up pile. .level-title is display:contents,
   so the z-index must sit on its actual children (the box-generating elements) */
.screen-vibes .level-line, .screen-vibes .slide-kicker { position: relative; z-index: 3; }
.pile-scene { position: relative; width: 100%; container-type: inline-size; }
.pile-img { width: 100%; display: block; }
.pile.play .pile-scene { animation: itemdrop .55s cubic-bezier(.2, 1.3, .4, 1) backwards; }
@keyframes itemdrop { from { opacity: 0; transform: translateY(-46px); } }

/* live iPod screen, anchored + rotated to match the tilted magenta marker in the scene image */
.ipod-live { position: absolute; left: 38.8%; top: 32.05%; width: 25.8%; height: 14.9%;
  transform: translate(-50%, -50%) rotate(-5.4deg); transform-origin: center;
  background: #C9DCC1; border-radius: 3px; overflow: hidden;
  padding: 0.34em 0.42em; color: #26361D; line-height: 1.24;
  font-family: var(--font-body); font-size: 1.72cqw; font-weight: 600; }
.ipod-live .ipod-ttl { border-bottom: 1px solid #26361D; padding-bottom: .1em; margin-bottom: .16em; font-weight: 700; }
.ipod-live .ipod-tr { padding: .06em .1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ipod-live .ipod-tr.sel { background: #26361D; color: #C9DCC1; border-radius: 2px; }

/* ipod */
.ipod { width: 148px; height: 223px; background: linear-gradient(180deg, #FFFDF6 0%, #EDE1CC 100%);
  border: var(--border); border-radius: 16px; box-shadow: var(--sticker);
  padding: 10px 10px 13px;
  display: flex; flex-direction: column; }
.ipod-screen { background: #C9DCC1; border: 2.5px solid var(--ink); border-radius: 6px;
  padding: 6px 7px; font-size: 7.2px; color: #26361D;
  height: 109px; overflow: hidden; }
.ipod-ttl { border-bottom: 1.5px solid #26361D; padding-bottom: 2px; margin-bottom: 3px; font-weight: 700; }
.ipod-tr { padding: 1.5px 2px; }
.ipod-tr.sel { background: #26361D; color: #C9DCC1; border-radius: 2px; }
.pile.play .ipod-tr { animation: trsel 9s infinite; animation-delay: calc(var(--i, 0) * 1.5s); border-radius: 2px; }
@keyframes trsel {
  0%, 16.5% { background: #26361D; color: #C9DCC1; }
  16.6%, 100% { background: transparent; color: #26361D; }
}
.ipod-wheel { width: 80px; height: 80px; flex: none; margin: auto auto 0; border-radius: 50%;
  background: var(--cream-2); border: 2.5px solid var(--ink);
  display: grid; place-items: center; }
.ipod-wheel i { width: 28px; height: 28px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }

/* cassette tapes */
.tape { width: 168px; border: var(--border); border-radius: 10px;
  box-shadow: var(--sticker-sm); padding: 8px 9px 9px; position: relative; }
.tape::after { /* bottom trapezoid with holes */
  content: '· ·'; letter-spacing: 14px; text-indent: 14px;
  font-size: 13px; line-height: 13px; color: rgba(64, 41, 29, .8);
  display: block; margin: 6px auto 0; width: 86px; height: 16px;
  border: 2px solid var(--ink); border-radius: 3px;
  background: rgba(255, 253, 246, .38);
  clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%);
  text-align: center;
}
.tape-coral { background: linear-gradient(180deg, #F77463 0%, var(--coral-dk) 100%); }
.tape-pink { background: linear-gradient(180deg, var(--pink) 0%, var(--pink-dk) 100%); }
.tape-green { background: linear-gradient(180deg, var(--green) 0%, var(--green-dk) 100%); }
.tape-blue { background: linear-gradient(180deg, #7A9BC9 0%, #4A6FA8 100%); }
.tape-orange { background: linear-gradient(180deg, var(--orange) 0%, var(--orange-dk) 100%); }
.tape-paper { background: var(--paper); border: 2px solid var(--ink); border-radius: 5px;
  padding: 5px 6px 7px; }
.tape-title { text-align: center; font-family: var(--font-body); font-weight: 600;
  font-size: 12.5px; line-height: 1.12; margin-bottom: 5px; }
.tape-sub { font-weight: 500; font-size: 10.5px; color: var(--ink-soft); }
.tape-note { font-weight: 500; font-size: 10.5px; font-style: italic; color: var(--coral-dk); }
.tape-window { margin: 0 auto; width: 104px; height: 26px;
  background: #5A4632; border: 2px solid var(--ink); border-radius: 999px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.reel { width: 17px; height: 17px; border-radius: 50%; background: var(--paper);
  border: 2px solid var(--ink); position: relative; }
.reel::after { content: ''; position: absolute; inset: 3px; border-radius: 50%;
  border: 1.5px dotted var(--ink-soft); }

/* post-its */
.postit { position: absolute; top: -18px; right: -14px; width: 92px;
  background: #FBEFA9;
  border: 1.5px solid rgba(64, 41, 29, .3);
  box-shadow: 2px 3px 5px rgba(64, 41, 29, .22);
  padding: 7px 8px 9px;
  font-size: 10px; font-weight: 700; line-height: 1.3; color: var(--ink);
  z-index: 4;
}
.postit-wide { width: 118px; }
.postit::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 9px;
  background: rgba(64, 41, 29, .07); }
.tape .postit { top: -42px; right: -8px; }
.tape .postit-wide { top: -58px; }
.postit-pair { top: -68px; right: 34px; width: 100px; z-index: 6; }

/* ═══════════════ COMPS (party lobby) ═══════════════ */
.lobby {
  width: min(100%, 344px);
  background: var(--paper); border: var(--border); border-radius: 12px;
  box-shadow: var(--sticker); overflow: hidden;
}
.lobby-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 10px; color: #fff; text-shadow: 1px 1px 0 var(--ink);
  background: linear-gradient(180deg, var(--green) 0%, var(--green-dk) 100%);
  padding: 8px 12px; border-bottom: var(--border);
}
.lobby-head b { background: var(--ink); color: #9FE06A; padding: 3px 8px; border-radius: 5px; text-shadow: none; }
.lobby-list { padding: 8px; display: grid; gap: 5px; }
.lobby-row {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 8px; border-radius: 8px;
}
.odot { width: 11px; height: 11px; border-radius: 50%; flex: none;
  background: #CBB79E; border: 2px solid var(--ink);
  transition: background .3s, box-shadow .3s; }
.lobby-cov { width: 34px; aspect-ratio: 2 / 3; object-fit: cover; flex: none;
  border: 2px solid var(--ink); border-radius: 4px; display: block; }
.lobby-txt { flex: 1; min-width: 0; }
.lobby-txt b { font-family: var(--font-serif); font-weight: 600; font-size: 14px; display: block; line-height: 1.15; }
.lobby-txt em { font-style: normal; font-size: 10.5px; color: var(--ink-soft); }
.lobby-tag { font-size: 8.5px; color: var(--ink-soft); flex: none; transition: color .3s; }
.lobby-row.on .odot { background: #7CC64B; box-shadow: 0 0 0 2px rgba(124, 198, 75, .35); }
.lobby-row.on .lobby-tag { color: var(--green-dk); }
.lobby-row.on { animation: rowpop .35s ease; }
@keyframes rowpop { 40% { transform: scale(1.03); } }

/* ═══════════════ SNIPPETS ═══════════════ */
.chat-window {
  width: min(100%, 336px);
  background: var(--paper); border: var(--border); border-radius: 12px;
  box-shadow: var(--sticker); overflow: hidden;
}
.chat-head { font-size: 10px; color: #fff; text-shadow: 1px 1px 0 var(--ink);
  background: linear-gradient(180deg, var(--pink) 0%, var(--pink-dk) 100%);
  padding: 8px 12px; border-bottom: var(--border); }
.chat-body { padding: 12px; display: grid; gap: 8px; }
.bubble {
  max-width: 86%;
  font-family: var(--font-serif);
  font-size: 13.5px; line-height: 1.5; font-weight: 500;
  border: 2px solid var(--ink);
  padding: 7px 12px 8px;
}
.bubble b { font-family: var(--font-pixel); font-weight: 400; font-size: 8.5px; display: block; margin-bottom: 2px; color: var(--ink-soft); }
.b-ren { justify-self: start; background: var(--green-lt); border-radius: 3px 14px 14px 14px; }
.b-nick { justify-self: end; background: var(--pink-lt); border-radius: 14px 3px 14px 14px; }

.notepad {
  width: min(100%, 336px);
  background: var(--gold-lt); border: var(--border); border-radius: 12px;
  box-shadow: var(--sticker); overflow: hidden;
}
.notepad-head { font-size: 10px; color: var(--ink);
  background: linear-gradient(180deg, var(--gold) 0%, #D3A83C 100%);
  padding: 8px 12px; border-bottom: var(--border); }
.notepad-body {
  padding: 12px 14px; font-size: 13px; line-height: 1.65; font-weight: 500;
  background-image: repeating-linear-gradient(180deg, transparent 0 20.5px, rgba(64,41,29,.14) 20.5px 21.5px);
}

/* ═══════════════ STORY CHAT ═══════════════ */
.story-chat { width: min(100%, 344px); }
.story-chat .chat-body {
  max-height: min(460px, calc(100svh - 232px));   /* fit within the viewport so the last bubble is reachable */
  overflow-y: auto;
  padding-bottom: 34px;
  scroll-padding-bottom: 34px;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--pink) var(--paper);
}
.story-chat .bubble b { font-family: inherit; font-size: inherit; display: inline; margin: 0; color: inherit; font-weight: 700; }

/* ═══════════════ STATS ═══════════════ */
.stats-panel {
  width: min(100%, 340px);
  background: var(--ink); color: var(--gold-lt);
  border: var(--border); border-radius: 12px; box-shadow: 4px 4px 0 var(--coral);
  padding: 18px 16px;
}
.stats-title { text-align: center; font-weight: 700; font-size: 13px; color: var(--gold); margin-bottom: 14px; }
.stats-grid { display: grid; gap: 9px; }
.stats-grid > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-size: 10px; }
.stats-grid dt { color: var(--orange); white-space: nowrap; }
.stats-grid dd { text-align: right; color: #F7EEDD; }
.stats-grid .tk { color: var(--pink); border: 1.5px dashed var(--pink); border-radius: 4px; padding: 1px 6px; }

/* ═══════════════ AUTHOR ═══════════════ */
.author-card {
  width: min(100%, 344px);
  background: var(--paper); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--sticker);
  padding: 22px 22px 24px;
  display: grid; gap: 14px;
}
.author-name { font-family: var(--font-title); font-weight: 700; font-size: 27px; text-align: center; }
.author-list { list-style: none; display: grid; gap: 10px; }
.author-list li {
  position: relative; padding-left: 20px;
  font-size: 13.5px; line-height: 1.5; font-weight: 500;
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s ease, transform .3s ease;
}
.author-list li::before { content: '▸'; position: absolute; left: 2px; color: var(--orange-dk); }
.author-list li.on { opacity: 1; transform: none; }
.author-mission-li { font-family: var(--font-body); font-weight: 600; font-size: 15px;
  border-top: 2px dashed var(--ink-soft); padding-top: 12px; margin-top: 4px; }
.author-mission-li::before { display: none; }
.author-mission-li .mgreen { color: var(--green-dk); }
.author-mission-li .mpink { color: var(--pink-dk); }

/* ═══════════════ END ═══════════════ */
.screen-end { gap: 16px; background: linear-gradient(180deg, var(--cream) 0%, var(--gold-lt) 60%, var(--gold) 130%); }
.end-art { width: auto; height: auto; max-width: min(100%, 300px); max-height: 44svh;
  border: var(--border); border-radius: 14px;
  box-shadow: var(--sticker); image-rendering: pixelated; }
.end-gameover { font-size: 13px; font-weight: 700; color: var(--coral-dk); letter-spacing: .1em; }
.end-line {
  font-family: var(--font-title); font-weight: 700;
  font-size: clamp(26px, 7vw, 32px); line-height: 1.15; text-align: center;
  max-width: 320px;
}
.end-thanks { text-align: center; font-family: var(--font-body); font-weight: 600; font-size: 15px; letter-spacing: .06em; }
.end-thanks span { font-family: var(--font-body); font-weight: 500; font-size: 12.5px; color: var(--ink-soft); letter-spacing: 0; }

/* ---------- tap zones ---------- */
.tapzone-back { position: absolute; left: 0; top: 90px; bottom: 0; width: 17%; z-index: 20; cursor: w-resize; }

/* ---------- small phones ---------- */
@media (max-height: 700px) {
  .screen { gap: 10px; padding-bottom: 26px; }
}
