/* ═══════════════════════════════════════════════════════════════
   MATCHING GREEN OCEANS — 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'); }

/* ---------- 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;

  --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%; }

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-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;
  display: flex; flex-direction: column;
  align-items: center; justify-content: 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-display); font-weight: 700;
  font-size: 21px; letter-spacing: .03em;
  color: #fff;
  background: var(--green);
  border: 3px solid var(--ink); border-radius: 999px;
  box-shadow: var(--sticker);
  padding: 7px 24px 9px;
  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: 12px; left: 0; right: 0;
  text-align: center; font-size: 9px; color: var(--ink-soft);
  animation: hintpulse 1.6s ease-in-out infinite;
}
@keyframes hintpulse { 50% { opacity: .35; } }

@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-display); 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;
  touch-action: pan-y;
  cursor: grab;
  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: 584 / 350; 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; }

.book-card-body { padding: 14px 18px 16px; display: grid; gap: 8px; }
.book-card-name { font-family: var(--font-display); 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-size: 13.5px; font-weight: 500; line-height: 1.45; }
.chip-row { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: var(--font-display); 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); }

.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-display); 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-display); font-weight: 600;
  font-size: clamp(19px, 5.4vw, 22px); line-height: 1.48; 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: 520px; }
@media (max-height: 760px) { .deck { width: min(100%, 258px); height: 460px; } }
.deck .trading-card {
  position: absolute; inset: 0;
  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(-21%, -22%) scale(.56) rotate(-5deg); z-index: 2; }
.deck[data-step="0"] .card-ren  { transform: translate(21%, 22%) scale(.56) 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, var(--green-lt) 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-display);
}
.card-nick .tc-head { background: var(--green); }
.card-ren .tc-head { background: var(--coral); }
.tc-name { font-weight: 700; font-size: 23px; color: #fff; text-shadow: 2px 2px 0 var(--ink); letter-spacing: .04em; }

.tc-art { position: relative; aspect-ratio: 1 / 1; margin: 10px 12px 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: contain;
  image-rendering: pixelated; 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; }
.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-display); 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-display); 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 ═══════════════ */
.player-widget {
  width: min(100%, 330px);
  background: var(--ink); color: var(--gold-lt);
  border: var(--border); border-radius: 12px; box-shadow: var(--sticker);
  overflow: hidden;
}
.player-top { display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: linear-gradient(180deg, var(--orange) 0%, var(--orange-dk) 100%);
  border-bottom: var(--border); color: var(--ink); }
.player-title { font-size: 10px; font-weight: 700; }
.player-eq { display: flex; gap: 3px; align-items: flex-end; height: 14px; }
.player-eq i { width: 4px; background: var(--ink); animation: eq 1s ease-in-out infinite; }
.player-eq i:nth-child(1) { height: 60%; animation-delay: 0s; }
.player-eq i:nth-child(2) { height: 100%; animation-delay: .15s; }
.player-eq i:nth-child(3) { height: 45%; animation-delay: .3s; }
.player-eq i:nth-child(4) { height: 80%; animation-delay: .45s; }
@keyframes eq { 50% { transform: scaleY(.4); } }
.tracklist { list-style: none; padding: 8px 6px; display: grid; gap: 2px; }
.track { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; font-size: 13px; }
.track:hover { background: rgba(246,136,49,.18); }
.track-no { font-size: 9px; color: var(--orange); }
.track-name { flex: 1; font-weight: 500; color: #F7EEDD; }
.track-name b { color: var(--gold); }
.track-heart { color: var(--pink); }

.communities { list-style: none; width: min(100%, 330px); display: grid; gap: 8px; }
.community {
  display: flex; gap: 10px; align-items: center;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 10px;
  box-shadow: var(--sticker-sm);
  padding: 8px 12px;
  font-size: 12.5px; line-height: 1.4; font-weight: 500;
}
.community em { display: block; font-style: normal; font-size: 10px; color: var(--ink-soft); }
.community-ico {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px;
  border: 2px solid var(--ink); display: grid; place-items: center;
  font-size: 15px; color: #fff; text-shadow: 1px 1px 0 var(--ink);
}
.c-orange { background: var(--orange); } .c-pink { background: var(--pink); }
.c-green { background: var(--green); } .c-coral { background: var(--coral); }

/* ═══════════════ COMPS (buddy list) ═══════════════ */
.buddy-window {
  width: min(100%, 330px);
  background: var(--paper); border: var(--border); border-radius: 12px;
  box-shadow: var(--sticker); overflow: hidden;
}
.buddy-head { 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); }
.buddy-list { list-style: none; padding: 8px; display: grid; gap: 2px; }
.buddy { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; }
.buddy:hover { background: var(--green-lt); }
.buddy .dot { width: 10px; height: 10px; border-radius: 50%; background: #7CC64B; border: 2px solid var(--ink); flex: 0 0 auto;
  box-shadow: 0 0 0 2px rgba(124,198,75,.3); }
.buddy b { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; display: block; line-height: 1.2; }
.buddy em { font-style: normal; font-size: 11.5px; color: var(--ink-soft); }

/* ═══════════════ 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-size: 13px; line-height: 1.45; 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: clamp(260px, 54vh, 480px);
  overflow-y: auto;
  overscroll-behavior: contain;
  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%, 340px);
  background: var(--paper); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--sticker);
  padding: 22px 20px;
  display: grid; gap: 12px; justify-items: center; text-align: center;
}
.author-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink) 0%, var(--orange) 100%);
  border: var(--border); box-shadow: var(--sticker-sm);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 34px; color: #fff; text-shadow: 2px 2px 0 var(--ink);
}
.author-name { font-family: var(--font-display); font-weight: 700; font-size: 26px; }
.author-bio, .author-highlight { font-size: 13.5px; line-height: 1.55; font-weight: 500; }
.author-mission {
  font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.5;
  border-top: 2px dashed var(--ink-soft); padding-top: 12px; width: 100%;
}
.author-mission b:first-of-type { color: var(--green-dk); }
.author-mission b:last-of-type { color: var(--pink-dk); }

/* ═══════════════ END ═══════════════ */
.screen-end { gap: 16px; background: linear-gradient(180deg, var(--cream) 0%, var(--gold-lt) 60%, var(--gold) 130%); }
.end-scene { position: relative; width: 180px; height: 110px; }
.end-sun { position: absolute; left: 50%; top: 6px; transform: translateX(-50%);
  width: 74px; height: 74px; border-radius: 50%;
  background: linear-gradient(180deg, var(--orange) 0%, var(--coral) 100%);
  border: var(--border); box-shadow: var(--sticker-sm);
  animation: sunset 7s ease-in-out infinite alternate; }
@keyframes sunset { to { transform: translateX(-50%) translateY(14px); } }
.end-sea { position: absolute; left: 0; right: 0; bottom: 0; height: 44px;
  background: linear-gradient(180deg, var(--green) 0%, var(--green-dk) 100%);
  border: var(--border); border-radius: 10px; overflow: hidden; }
.end-sea i { position: absolute; height: 6px; border-radius: 4px; background: var(--green-lt); opacity: .7; }
.end-sea i:nth-child(1) { top: 10px; left: 12%; width: 34%; }
.end-sea i:nth-child(2) { top: 24px; left: 55%; width: 28%; }
.end-gameover { font-size: 13px; font-weight: 700; color: var(--coral-dk); letter-spacing: .1em; }
.end-line {
  font-family: var(--font-display); 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-display); 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; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

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