/* ═══════════════════════════════════════════════
   UNMASKING THE MONSTER — maze.support
   Hanna-Barbera / 1969 Scooby-Doo visual style
═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  /* ── Hanna-Barbera palette ── */
  --deep:    #1A0936;   /* darkest background */
  --purple:  #2E1260;   /* page background */
  --plum:    #3D1C7A;   /* card/panel fill */
  --teal:    #2B8C87;   /* Mystery Machine */
  --teal-hi: #3DBDB6;   /* lighter teal hover */
  --orange:  #C45200;   /* Velma's sweater */
  --orange-hi: #E06000;
  --yellow:  #F2BE22;   /* Scooby gold */
  --yellow-hi: #FFD740;
  --green:   #4D7826;   /* Shaggy's shirt */
  --red:     #B22020;   /* panic red */
  --red-hi:  #D42020;
  --cream:   #F5E8C0;   /* parchment text / light panels */
  --paper:   #EDD9A3;   /* slightly darker parchment */
  --ink:     #160928;   /* near-black for outlines */

  /* ── Comic geometry ── */
  --r:   4px;           /* very slight rounding — old school */
  --outline: 3px solid var(--ink);
  --shadow:  4px 4px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
}

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

html { height: 100%; }
body {
  min-height: 100%;
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  font-weight: 700;
  /* Deep purple with subtle halftone dot pattern */
  background-color: var(--purple);
  background-image: radial-gradient(rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--cream);
  padding-bottom: 90px;
}

/* ─── TYPOGRAPHY ─────────────────────────────────────────────────────────────── */
h1 {
  font-family: 'Bangers', cursive;
  font-size: clamp(2rem, 6vw, 2.6rem);
  letter-spacing: .07em;
  color: var(--yellow);
  /* classic cartoon title shadow: dark below-right, highlight top-left */
  text-shadow:
    3px  3px 0 var(--ink),
    2px  2px 0 var(--ink),
   -1px  0   0 rgba(0,0,0,.4);
  line-height: 1.1;
}
h1 em {
  font-style: normal;
  color: var(--teal-hi);
  text-shadow:
    3px  3px 0 var(--ink),
    2px  2px 0 var(--ink);
}
h4 {
  font-family: 'Bangers', cursive;
  letter-spacing: .06em;
  font-size: .95rem;
  color: var(--yellow);
}

/* ─── LAYOUT ─────────────────────────────────────────────────────────────────── */
#app {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ─── HEADER ─────────────────────────────────────────────────────────────────── */
.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 14px;
  border-bottom: var(--outline);
  margin-bottom: 20px;
}
.header-logo {
  font-family: 'Bangers', cursive;
  font-size: 1.3rem;
  letter-spacing: .08em;
  color: var(--yellow);
  text-shadow: 2px 2px 0 var(--ink);
}
.header-url {
  font-size: .7rem;
  font-weight: 800;
  color: var(--teal-hi);
  text-decoration: none;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .7;
}

/* ─── STEP NAV ───────────────────────────────────────────────────────────────── */
.step-nav {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
}
.step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.step-dot span {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--plum);
  border: var(--outline);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bangers', cursive;
  font-size: 1rem;
  letter-spacing: .04em;
  color: var(--cream);
  transition: background .25s, color .25s, box-shadow .25s;
}
.step-dot label {
  font-size: .65rem;
  font-weight: 800;
  color: rgba(245,232,192,.4);
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: color .25s;
  white-space: nowrap;
}
.step-dot.active span {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.step-dot.active label { color: var(--yellow); }
.step-dot.done span {
  background: var(--teal);
  color: var(--cream);
}
.step-dot.done label { color: var(--teal-hi); }

.step-line {
  flex: 1;
  height: 3px;
  background: var(--ink);
  margin: 0 3px 20px;
  position: relative;
}
.step-line::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--teal);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s ease;
}
.step-line.done::after { transform: scaleX(1); }

/* ─── STEPS ──────────────────────────────────────────────────────────────────── */
.steps-wrap { position: relative; }
.step { display: none; }
.step.active {
  display: block;
  animation: step-in .25s ease;
}
@keyframes step-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  padding-bottom: 16px;
}

.step-icon { font-size: 3.2rem; }

.step-sub {
  font-size: .88rem;
  color: rgba(245,232,192,.65);
  line-height: 1.6;
  max-width: 380px;
}

/* ─── STEP 1 — NAME IT ───────────────────────────────────────────────────────── */
.name-input {
  width: 100%;
  background: var(--cream);
  border: var(--outline);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 14px 20px;
  color: var(--ink);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  transition: box-shadow .15s;
}
.name-input:focus {
  outline: none;
  box-shadow: 6px 6px 0 var(--ink);
}
.name-input::placeholder {
  color: rgba(22,9,40,.4);
  font-weight: 600;
}
.input-hint {
  font-size: .75rem;
  color: rgba(245,232,192,.4);
  font-weight: 600;
}

/* ─── STEP 2 — BUILD IT ──────────────────────────────────────────────────────── */
.monster-stage {
  width: 100%;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
    transparent, transparent 27px, rgba(22,9,40,.07) 27px, rgba(22,9,40,.07) 28px
  );
  border: var(--outline);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

/* ── CSS Monster ─────────────────────────────────────────────────── */
.monster-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Topper — hat / horns / halo / antennae */
.m-topper {
  position: relative;
  width: 120px;
  height: 8px; /* collapsed by default */
  display: flex;
  justify-content: center;
  align-items: flex-end;
  transition: height .3s ease;
}

/* Hat */
.m-topper.t-hat { height: 54px; }
.m-topper.t-hat::after {   /* crown */
  content: '';
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 46px; height: 42px;
  background: var(--ink);
  border-radius: 3px 3px 0 0;
}
.m-topper.t-hat::before { /* brim */
  content: '';
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 72px; height: 10px;
  background: var(--ink);
  border-radius: 2px;
  z-index: 2;
}

/* Horns */
.m-topper.t-horns { height: 50px; }
.m-topper.t-horns::before,
.m-topper.t-horns::after {
  content: '';
  position: absolute; bottom: 0;
  width: 0; height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-bottom: 44px solid #C40000;
}
.m-topper.t-horns::before { left: 14px; transform: rotate(-12deg); transform-origin: bottom; }
.m-topper.t-horns::after  { right: 14px; transform: rotate(12deg);  transform-origin: bottom; }

/* Halo */
.m-topper.t-halo { height: 36px; }
.m-topper.t-halo::before {
  content: '';
  position: absolute; bottom: 8px; left: 50%;
  transform: translateX(-50%);
  width: 72px; height: 18px;
  border-radius: 50%;
  border: 5px solid var(--yellow);
  box-shadow: 0 0 10px var(--yellow), 0 0 20px rgba(242,190,34,.5);
}

/* Antennae */
.m-topper.t-antennae { height: 52px; }
.m-topper.t-antennae::before,
.m-topper.t-antennae::after {
  content: '';
  position: absolute; bottom: 0;
  width: 4px; height: 36px;
  background: var(--ink);
  border-radius: 2px 2px 0 0;
}
.m-topper.t-antennae::before {
  left: 26px;
  transform: rotate(-16deg); transform-origin: bottom center;
  /* yellow ball at tip via box-shadow in local rotated space */
  box-shadow: 0 -40px 0 6px var(--yellow), 0 -40px 0 8px var(--ink);
}
.m-topper.t-antennae::after {
  right: 26px;
  transform: rotate(16deg); transform-origin: bottom center;
  box-shadow: 0 -40px 0 6px var(--yellow), 0 -40px 0 8px var(--ink);
}

/* Body shapes */
.m-body-shape {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 14px;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transition: all .35s cubic-bezier(.34,1.2,.64,1);
}
.b-blob   { width: 110px; height: 130px; border-radius: 55% 45% 50% 50% / 42% 42% 58% 58%; background: #5BAD7E; }
.b-tower  { width: 72px;  height: 168px; border-radius: 36% 36% 18% 18%; background: #7B5EA7; }
.b-orb    { width: 148px; height: 148px; border-radius: 50%; background: var(--orange); }
.b-cube   { width: 128px; height: 112px; border-radius: 4px; background: #3D7BA0; }
.b-shadow { width: 115px; height: 138px; border-radius: 45% 45% 0 0; background: #2A1A50; border-color: #6A5A9E; }
.b-puddle { width: 175px; height: 62px;  border-radius: 50%; background: #8B5E2A; }

/* Eyes */
.m-eyes { display: flex; align-items: center; gap: 14px; }
.m-eye {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.m-pupil { width: 10px; height: 12px; border-radius: 50%; background: var(--ink); flex-shrink: 0; }

/* Wide — big surprised eyes */
.m-eyes.e-wide .m-eye { width: 36px; height: 36px; }
.m-eyes.e-wide .m-pupil { width: 11px; height: 13px; }

/* Angry — rotated + brow via ::before */
.m-eyes.e-angry { gap: 10px; }
.m-eyes.e-angry .m-eye { overflow: visible; }
.m-eyes.e-angry .m-eye::before {
  content: '';
  position: absolute; top: -7px; left: -4px;
  width: 30px; height: 5px;
  background: var(--ink);
  border-radius: 3px;
}
.m-eyes.e-angry .m-eye.left  { transform: rotate(16deg);  }
.m-eyes.e-angry .m-eye.right { transform: rotate(-16deg); }
.m-eyes.e-angry .m-eye.left::before  { transform: rotate(-16deg); }
.m-eyes.e-angry .m-eye.right::before { transform: rotate(16deg);  }

/* Sleepy — eyelid drooping from top */
.m-eyes.e-sleepy .m-eye { overflow: hidden; }
.m-eyes.e-sleepy .m-eye::after {
  content: '';
  position: absolute; top: 0; left: -2px; right: -2px;
  height: 56%;
  background: var(--ink);
}

/* One-eyed */
.m-eyes.e-one .m-eye.right { display: none; }
.m-eyes.e-one .m-eye.left  { width: 42px; height: 42px; }
.m-eyes.e-one .m-pupil     { width: 16px; height: 18px; }

/* Spiral — concentric rings, no pupil */
.m-eyes.e-spiral .m-eye {
  background:
    radial-gradient(circle at 50%, var(--ink) 0 15%, white 15% 30%,
    var(--ink) 30% 46%, white 46% 62%, var(--ink) 62% 78%, white 78%);
}
.m-eyes.e-spiral .m-pupil { display: none; }

/* Mouth */
.m-mouth {
  width: 50px; height: 22px;
  border: 3px solid var(--ink);
  border-top: none;
  border-radius: 0 0 26px 26px;
  background: #8B0000;
  transition: all .25s ease;
  flex-shrink: 0;
}
.m-mouth.mo-grin   { width: 76px; height: 26px; }
.m-mouth.mo-frown  { border-top: 3px solid var(--ink); border-bottom: none; border-radius: 26px 26px 0 0; background: transparent; }
.m-mouth.mo-jagged {
  border: none; border-radius: 0;
  background: var(--ink);
  width: 58px; height: 20px;
  clip-path: polygon(0% 100%, 14% 0%, 28% 100%, 43% 0%, 57% 100%, 71% 0%, 86% 100%, 100% 0%, 100% 100%);
}
.m-mouth.mo-tiny   { width: 16px; height: 8px; border-radius: 4px; background: var(--ink); border: none; }
.m-mouth.mo-open   { height: 38px; border-radius: 0 0 32px 32px; }
.m-mouth.mo-none   { opacity: 0; height: 2px; }

/* Base extras — bow-tie / drips */
.m-base-extra { position: relative; display: flex; align-items: flex-start; justify-content: center; min-height: 4px; }

/* Bow-tie */
.m-base-extra.x-bowtie { height: 26px; width: 56px; margin-top: 6px; }
.m-base-extra.x-bowtie::before,
.m-base-extra.x-bowtie::after {
  content: '';
  position: absolute; top: 0;
  width: 0; height: 0;
}
.m-base-extra.x-bowtie::before { left: 0;  border-top: 13px solid transparent; border-bottom: 13px solid transparent; border-right: 24px solid var(--orange); }
.m-base-extra.x-bowtie::after  { right: 0; border-top: 13px solid transparent; border-bottom: 13px solid transparent; border-left:  24px solid var(--orange); }

/* Drips */
.m-base-extra.x-drips { gap: 10px; margin-top: 2px; }
.m-base-extra.x-drips::before,
.m-base-extra.x-drips::after {
  content: '';
  width: 13px; height: 28px;
  background: #3DA66A;
  border-radius: 0 0 50% 50%;
  border: 2px solid var(--ink);
}

/* ── Trait Picker ──────────────────────────────────────────────── */
.traits-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}
.trait-group {
  background: var(--plum);
  border: var(--outline);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: 12px;
}
.trait-group h4 { margin-bottom: 10px; }

.trait-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.trait-btn {
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  box-shadow: 2px 2px 0 var(--ink);
  padding: 7px 11px;
  cursor: pointer;
  color: var(--ink);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  transition: transform .1s, box-shadow .1s, background .15s;
}
.tb-name { font-size: .8rem; line-height: 1.1; }
.tb-sub  { font-size: .65rem; font-weight: 600; opacity: .55; line-height: 1.1; }
.trait-btn:hover {
  background: var(--paper);
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.trait-btn.sel {
  background: var(--sel-bg, var(--teal));
  color: var(--cream);
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transform: scale(1.05);
}
.trait-btn.sel .tb-sub { color: rgba(245,232,192,.7); opacity: 1; }

/* ─── STEP 3 — UNMASK IT ─────────────────────────────────────────────────────── */
.reveal-anim {
  font-size: 5rem;
  animation: spin-in .55s cubic-bezier(.34,1.56,.64,1);
  filter: drop-shadow(4px 4px 0 var(--ink));
}
@keyframes spin-in {
  0%   { transform: scale(0) rotate(180deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.villain-name {
  font-family: 'Bangers', cursive;
  font-size: 1.4rem;
  letter-spacing: .06em;
  color: var(--ink);
  background: var(--yellow);
  border: var(--outline);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: 6px 22px;
}

.reveal-body {
  background: var(--plum);
  border: var(--outline);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  font-size: .9rem;
  line-height: 1.65;
  color: var(--cream);
  width: 100%;
  text-align: left;
}

.reveal-quote {
  font-size: .82rem;
  font-style: italic;
  font-weight: 700;
  color: var(--ink);
  background: var(--teal-hi);
  border: var(--outline);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: 10px 16px;
  width: 100%;
  text-align: left;
}

/* ─── STEP 4 — DEBRIEF ───────────────────────────────────────────────────────── */
.debrief-prompt {
  font-size: .88rem;
  color: rgba(245,232,192,.7);
  line-height: 1.55;
}

.debrief-input {
  width: 100%;
  background: var(--cream);
  border: var(--outline);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  color: var(--ink);
  font-family: 'Nunito', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  resize: none;
  line-height: 1.55;
  transition: box-shadow .15s;
}
.debrief-input:focus { outline: none; box-shadow: 6px 6px 0 var(--ink); }
.debrief-input::placeholder { color: rgba(22,9,40,.4); }

.save-confirm {
  font-family: 'Bangers', cursive;
  font-size: 1.1rem;
  letter-spacing: .06em;
  color: var(--teal-hi);
  text-shadow: 2px 2px 0 var(--ink);
  animation: pop-in .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop-in {
  0%   { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Solved Mysteries wall */
.solved-wall { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.solved-wall:empty { display: none; }
.solved-header {
  font-family: 'Bangers', cursive;
  font-size: 1rem;
  letter-spacing: .08em;
  color: var(--yellow);
  text-shadow: 2px 2px 0 var(--ink);
  text-transform: uppercase;
}
.mystery-card {
  background: var(--paper);
  border: var(--outline);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: 10px 14px;
  text-align: left;
  /* slight random tilt — feels like pinned note */
}
.mystery-card:nth-child(odd)  { transform: rotate(-.4deg); }
.mystery-card:nth-child(even) { transform: rotate(.3deg); }
.mystery-lesson {
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
  font-style: italic;
}
.mystery-meta {
  font-size: .7rem;
  color: rgba(22,9,40,.55);
  margin-top: 4px;
  font-weight: 800;
}
.mystery-meta strong { color: var(--orange); }

.btn-restart {
  font-family: 'Bangers', cursive;
  font-size: 1.1rem;
  letter-spacing: .06em;
  background: transparent;
  border: var(--outline);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: 11px 28px;
  color: var(--cream);
  cursor: pointer;
  transition: background .15s, color .15s, transform .1s;
  margin-top: 8px;
}
.btn-restart:hover {
  background: var(--plum);
  transform: translateY(-1px);
}

/* ─── BUTTONS ────────────────────────────────────────────────────────────────── */
.btn-primary {
  font-family: 'Bangers', cursive;
  font-size: 1.2rem;
  letter-spacing: .07em;
  background: var(--orange);
  color: var(--cream);
  border: var(--outline);
  border-radius: var(--r);
  padding: 12px 34px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .1s, box-shadow .1s;
  text-shadow: 1px 1px 0 rgba(0,0,0,.4);
}
.btn-primary:hover {
  background: var(--orange-hi);
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn-secondary {
  font-family: 'Bangers', cursive;
  font-size: 1.1rem;
  letter-spacing: .06em;
  background: var(--teal);
  color: var(--cream);
  border: var(--outline);
  border-radius: var(--r);
  padding: 10px 24px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .1s, box-shadow .1s, background .15s;
  text-shadow: 1px 1px 0 rgba(0,0,0,.35);
}
.btn-secondary:hover {
  background: var(--teal-hi);
  transform: translateY(-1px);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn-secondary:active { transform: translateY(1px); box-shadow: 1px 1px 0 var(--ink); }

.btn-ghost {
  background: transparent;
  border: 2px solid rgba(245,232,192,.25);
  border-radius: var(--r);
  color: rgba(245,232,192,.5);
  font-family: 'Nunito', sans-serif;
  font-size: .85rem;
  font-weight: 800;
  padding: 7px 14px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.btn-ghost:hover {
  color: var(--cream);
  border-color: rgba(245,232,192,.5);
  background: rgba(245,232,192,.07);
}

/* ─── ZOINKS FAB ─────────────────────────────────────────────────────────────── */
.zoinks-fab {
  position: fixed;
  bottom: 22px; right: 20px;
  z-index: 500;
  /* Big round panic button — like a cartoon control panel */
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--red);
  border: var(--outline);
  box-shadow: var(--shadow), 0 0 0 4px var(--ink);
  cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1px;
  transition: transform .1s, box-shadow .1s;
  animation: fab-pulse 2.5s ease-in-out infinite;
}
@keyframes fab-pulse {
  0%,100%{ box-shadow: var(--shadow), 0 0 0 4px var(--ink); }
  50%    { box-shadow: 5px 5px 0 var(--ink), 0 0 0 4px var(--ink), 0 0 20px rgba(178,32,32,.6); }
}
.zoinks-fab:hover {
  background: var(--red-hi);
  transform: translateY(-3px) scale(1.06);
}
.zoinks-fab:active {
  transform: translateY(2px) scale(.96);
  box-shadow: 2px 2px 0 var(--ink), 0 0 0 4px var(--ink);
}
.zt {
  font-family: 'Bangers', cursive;
  font-size: .85rem;
  letter-spacing: .06em;
  color: var(--cream);
  text-shadow: 1px 1px 0 var(--ink);
  line-height: 1;
}
.zs { font-size: .55rem; font-weight: 800; color: rgba(245,232,192,.7); }

/* ─── ZOINKS OVERLAY ─────────────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(22,9,40,.92);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.zo-card {
  background: var(--plum);
  border: var(--outline);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  max-width: 380px; width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center;
}
.zo-char { font-size: 2.8rem; }
.zo-speech {
  font-size: .88rem;
  font-weight: 700;
  color: rgba(245,232,192,.85);
  line-height: 1.65;
  font-style: italic;
}

/* Crisis box — always visible, always first */
.crisis-box {
  width: 100%;
  background: var(--deep);
  border: 3px solid var(--red);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.crisis-box p {
  font-size: .75rem;
  font-weight: 800;
  color: rgba(245,232,192,.6);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 2px;
}
.crisis-box a {
  font-size: .8rem;
  font-weight: 800;
  color: #E87C6E;
  text-decoration: none;
  display: block;
}
.crisis-box a:hover { text-decoration: underline; }

/* Breathing section */
.breath-section {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 100%;
}
.breath-label-top {
  font-size: .75rem;
  font-weight: 800;
  color: rgba(245,232,192,.45);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.breath-ring {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: var(--teal);
  border: var(--outline);
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 1s ease, background 1s ease, box-shadow .5s ease;
}
.breath-ring.inhale {
  transform: scale(1.5);
  background: var(--teal-hi);
  box-shadow: 6px 6px 0 var(--ink);
}
.breath-ring.hold {
  transform: scale(1.5);
  background: var(--yellow);
  box-shadow: 6px 6px 0 var(--ink);
}
.breath-ring.exhale {
  transform: scale(1);
  background: var(--plum);
  box-shadow: var(--shadow);
}
.breath-ring span {
  font-family: 'Bangers', cursive;
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--cream);
  text-shadow: 1px 1px 0 var(--ink);
  pointer-events: none;
}
.breath-sub { font-size: .7rem; font-weight: 700; color: rgba(245,232,192,.35); }

/* ─── UTILITIES ──────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--deep); }
::-webkit-scrollbar-thumb { background: var(--plum); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal); }

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .zoinks-fab { bottom: calc(22px + env(safe-area-inset-bottom)); }
}
