/* ============================================================
   STACKERFOX - persistent chrome
   nav / progress / chapter rail / cursor / dock / boot / fox picker
   ============================================================ */

/* ---------------- scroll progress ---------------- */

.progress {
  display: none;   /* the footer readout still counts; the bar is off */
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: 3px;
  z-index: calc(var(--z-nav) + 2);
  pointer-events: none;
}

.progress i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--ink);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}

/* ---------------- nav ---------------- */

.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: var(--nav-h);
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-inline: var(--gutter);
  background: rgb(var(--ground-rgb) / 0.88);
  backdrop-filter: blur(10px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition:
    background-color var(--dur-3) var(--ease-out),
    border-color var(--dur-3) var(--ease-out),
    transform var(--dur-4) var(--ease-out);
}

.nav.is-hidden { transform: translateY(-102%); }
.nav.is-stuck { border-bottom-color: rgb(var(--ink-rgb) / 0.12); }

/* ---- wordmark: the horizontal lockup, inlined in index.html as #lockupGlyph,
   mark then word, as one vector in the text's own colour. On hover the
   chevrons squeeze together. ---- */

.mark {
  display: inline-flex;
  align-items: center;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1;
  color: inherit;
}

.lockup {
  height: 1.2em;
  width: auto;
  aspect-ratio: 1227.7 / 235.3;
  fill: currentColor;
  overflow: visible;
  display: block;
}

.mark:hover .lockup { --m1: 14px; --m3: -14px; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 44px;
}

.nav-link {
  font-weight: 700;
  font-size: 1rem;
  position: relative;
  padding-block: 4px;
}

/* the nav's button is a compact 44px pill */
.nav .btn { padding: 0 1.15em; height: 44px; font-size: 1rem; }

/* the wipe: a black sheet that rises over the page on a nav click, then
   lifts away upward once the page has jumped underneath it */
.wipe {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-dock) + 30);
  background: var(--void);
  transform: translateY(100%);
  pointer-events: none;
}
.wipe.is-in { transform: translateY(0); transition: transform 0.95s var(--ease-inout); }
.wipe.is-out { transform: translateY(-100%); transition: transform 0.95s var(--ease-inout); }

/* no underline on the nav links, hovered or current */
.nav-link:hover { opacity: 0.7; transition: opacity var(--dur-2) var(--ease-out); }

/* the fox button in the nav opens the coat picker */
.nav-fox {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform var(--dur-2) var(--ease-back);
}
.nav-fox canvas { width: 34px; height: 34px; }
.nav-fox:hover { transform: rotate(-12deg) scale(1.12); }

/* the reference keeps the full 80px nav with its links through 768 and
   collapses to a 62px wordmark-only bar on phones */
@media (max-width: 640px) {
  :root { --nav-h: 62px; }
  .nav { justify-content: center; }
  .nav-right { display: none; }
  /* the reference's phone wordmark runs at ~24px, not the desktop 17px */
  .mark { font-size: 1.45rem; }
}

/* ---------------- chapter rail ----------------
   mix-blend-mode: difference keeps it legible over ground, bone and void
   without ever recolouring it per section */

.rail {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-rail);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 13px;
  color: #fff;
  mix-blend-mode: difference;
}

.rail button {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  color: inherit;
}

.rail span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
  white-space: nowrap;
}

/* one bar per chapter: the stack, as a rail. The current one is longer. */
.rail i {
  width: 16px; height: 5px;
  border-radius: 3px;
  background: currentColor;
  opacity: 0.34;
  transition: width var(--dur-2) var(--ease-back), opacity var(--dur-2) var(--ease-out);
}

/* the current chapter keeps its name showing; the others show on hover */
.rail button:hover span,
.rail button[aria-current="true"] span { opacity: 1; transform: translateX(0); }
.rail button:hover i { opacity: 0.8; }
.rail button[aria-current="true"] i { opacity: 1; width: 28px; }

@media (max-width: 1100px) { .rail { display: none; } }

/* ---------------- dock ---------------- */

/* Over light ground the dock is black, with the brand colour for its type,
   icons and a hairline border; over a dark section it turns light instead.
   initDock reads what is behind it and sets .is-on-dark. */
.dock {
  --dock-bg: var(--ink);
  --dock-fg: var(--ground);
  --dock-line: var(--ground);
  position: fixed;
  right: var(--gutter);
  bottom: 18px;
  z-index: var(--z-dock);
  display: flex;
  gap: 9px;
}
.dock.is-on-dark {
  --dock-bg: var(--ground);
  --dock-fg: var(--ink);
  --dock-line: transparent;
}

.dock button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--dock-bg);
  color: var(--dock-fg);
  border: 1px solid var(--dock-line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: transform var(--dur-2) var(--ease-back), background-color var(--dur-2) var(--ease-out),
    color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.dock .dock-cta {
  --btn-bg: var(--dock-bg);
  --btn-fg: var(--dock-fg);
  border: 1px solid var(--dock-line);
  transition: transform var(--dur-3) var(--ease-back), background-color var(--dur-2) var(--ease-out),
    color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
/* the hover fill is the brand colour itself, so the type goes white on it */
.dock .dock-cta:hover,
.dock .dock-cta:focus-visible { --btn-fg: #fff; }

.dock button:hover { transform: translateY(-3px); }
.dock button[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: #fff; }

/* the tour's clock lives in the dock on a phone; anywhere else it stays out of the way */
.dock-time, .dock .g-next { display: none; }

@media (max-width: 640px) {
  /* three columns with the middle sized to its button, so it stays centred
     however wide the keys either side of it are */
  .dock {
    left: 12px; right: 12px;
    bottom: 12px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .dock #gameBtn { justify-self: end; }
  .dock .dock-cta {
    flex: 0 0 auto;
    justify-content: center;
    padding-inline: 26px;
    font-size: 12px;
    font-weight: 700;
  }
  .dock .dock-icon { width: 46px; height: 46px; padding: 0; justify-content: center; }
  .dock .dock-icon .label { display: none; }

  /* while the tour runs the dock is the tour bar, as the reference's is: the
     game button turns into a next-stop key with the countdown on it */
  body.is-touring .tour-bar { display: none; }
  body.is-touring #gameBtn { width: auto; padding: 0 16px 0 20px; gap: 9px; }
  body.is-touring #gameBtn .g-game { display: none; }
  body.is-touring #gameBtn .g-next { display: inline; }
  body.is-touring #gameBtn .dock-time { display: inline; font-weight: 700; font-variant-numeric: tabular-nums; }
}

@media (min-width: 641px) { .dock .dock-cta { display: none; } }

/* ---------------- custom cursor ----------------
   pointer-events:none, hidden on touch and under reduced motion.
   the native cursor is restored for anyone using keyboard or a coarse pointer */

.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: var(--z-cursor);
  pointer-events: none;
  will-change: transform;
}

/* a small black dot ringed in the brand colour; over a link or button it
   opens into a bigger empty ring */
.cursor-ring {
  position: absolute;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border: 1.5px solid var(--ground);
  background: var(--ink);
  border-radius: 50%;
  transition: width var(--dur-2) var(--ease-back),
              height var(--dur-2) var(--ease-back),
              margin var(--dur-2) var(--ease-back),
              background-color var(--dur-2) var(--ease-out),
              border-color var(--dur-2) var(--ease-out),
              opacity var(--dur-2) var(--ease-out);
}

.cursor-label {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--dur-1) var(--ease-out);
}

/* over a link or button: an empty two-tone ring, brand colour inside a
   black line, the same on every ground */
body[data-cursor="grow"] .cursor-ring {
  width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-width: 2px;
  border-color: var(--ground);
  box-shadow: 0 0 0 1.5px var(--ink);
  background: transparent;
}
body[data-cursor="label"] .cursor-ring {
  width: 92px; height: 92px; margin: -46px 0 0 -46px;
}
/* the label puck is a solid brand pill with ink text */
body[data-cursor="label"] .cursor-ring { border-color: transparent; background: var(--ground); }
body[data-cursor="label"] .cursor-label { opacity: 1; color: var(--ink); }
body[data-cursor="tiny"] .cursor-ring {
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-color: transparent;
  background: var(--ground);
}

html.has-cursor,
html.has-cursor a,
html.has-cursor button { cursor: none; }

@media (pointer: coarse) { .cursor { display: none; } html.has-cursor, html.has-cursor * { cursor: auto; } }
@media (prefers-reduced-motion: reduce) { .cursor { display: none; } }

/* ---------------- fox layer ----------------
   one fixed canvas the mascot lives on so it can cross section boundaries */

.fox-layer {
  position: fixed;
  inset: 0;
  z-index: var(--z-fox);
  pointer-events: none;
}

.fox-hit {
  position: fixed;
  width: 96px; height: 96px;
  margin: -48px 0 0 -48px;
  z-index: calc(var(--z-fox) + 1);
  border-radius: 50%;
  cursor: pointer;
}

/* The bubble is placed by its top-left corner on whichever side of the fox
   is clear (data-side, set in intro.js); --ax / --ay put the tail wherever
   the fox is once the bubble has had to slide to stay on screen. */
.fox-bubble {
  position: fixed;
  left: 0;
  top: 0;
  z-index: calc(var(--z-fox) + 2);
  /* a set width, so a fox near the screen edge does not squeeze the line
     into a narrow column before intro.js slides the bubble back on screen */
  width: max-content;
  max-width: 224px;
  padding: 12px 15px;
  background: var(--ink);
  color: #fff;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-tile);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.32;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-back);
}

.fox-bubble.is-on { opacity: 1; transform: scale(1); }

.fox-bubble::after {
  content: "";
  position: absolute;
  left: calc(var(--ax, 50%) - 6px);
  bottom: -8px;
  width: 12px; height: 12px;
  background: var(--ink);
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg);
}
.fox-bubble[data-side="down"]::after { bottom: auto; top: -8px; transform: rotate(225deg); }
.fox-bubble[data-side="left"]::after,
.fox-bubble[data-side="right"]::after { bottom: auto; top: calc(var(--ay, 50%) - 6px); }
.fox-bubble[data-side="left"]::after { left: auto; right: -8px; transform: rotate(-45deg); }
.fox-bubble[data-side="right"]::after { left: -8px; transform: rotate(135deg); }

/* on a phone the bubble stays on the fox like everywhere else, just slimmer,
   so it finds room beside a fox parked at the screen edge */
@media (max-width: 780px) { .fox-bubble { max-width: 168px; padding: 9px 12px; font-size: 0.76rem; } }

/* ---------------- boot ----------------
   three bars stack up, then the lid lifts */

.boot {
  position: fixed;
  inset: 0;
  z-index: var(--z-boot);
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--ground);
  transition: transform 0.9s var(--ease-inout);
}

.boot.is-done { transform: translateY(-101%); }

.boot-inner { display: grid; justify-items: center; gap: 22px; }

.boot-bars {
  display: flex;
  flex-direction: column-reverse;
  gap: 5px;
  width: clamp(120px, 18vw, 190px);
}

.boot-bars i {
  display: block;
  height: 13px;
  border-radius: 3px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  animation: boot-bar 0.5s var(--ease-back) forwards;
}

.boot-bars i:nth-child(1) { animation-delay: 0.05s; opacity: 0.35; }
.boot-bars i:nth-child(2) { animation-delay: 0.18s; opacity: 0.6; }
.boot-bars i:nth-child(3) { animation-delay: 0.31s; opacity: 0.82; }
.boot-bars i:nth-child(4) { animation-delay: 0.44s; }

@keyframes boot-bar { to { transform: scaleX(1); } }

.boot-count { font-variant-numeric: tabular-nums; }

/* ---------------- fox picker (intro) ---------------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: var(--z-intro);
  background: var(--ground);
  display: grid;
  grid-template-rows: auto 1fr auto;
  /* one column that may shrink below the picker's natural width, so the
     chips scroll instead of pushing the whole picker off a phone screen */
  grid-template-columns: minmax(0, 1fr);
  overflow-y: auto;
  padding: clamp(16px, 3vw, 34px);
  transition: opacity var(--dur-4) var(--ease-out), transform 0.8s var(--ease-inout);
}

/* swapping fox shudders the stage once, like a machine taking the change */
.intro-stage.is-shake { animation: intro-shake 0.28s var(--ease-out); }
@keyframes intro-shake {
  0%   { transform: none; }
  15%  { transform: translate3d(-6px, 1px, 0); }
  32%  { transform: translate3d(5px, -2px, 0); }
  50%  { transform: translate3d(-4px, 2px, 0); }
  68%  { transform: translate3d(3px, -1px, 0); }
  85%  { transform: translate3d(-2px, 1px, 0); }
  100% { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .intro-stage.is-shake { animation: none; } }

.intro[hidden] { display: none; }
.intro.is-out { opacity: 0; transform: scale(1.04); pointer-events: none; }

.intro-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.intro-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  align-content: center;
  gap: clamp(10px, 2vw, 22px);
  text-align: center;
}

.intro-stage h1 {
  /* sized by the shorter side too, so a landscape phone still fits it all */
  font-size: clamp(1.9rem, min(7.6vw, 9svh), 5.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.94;
}

.intro-fox {
  width: min(58vw, 300px, 34svh);
  aspect-ratio: 1;
}
/* a bare <canvas> defaults to 300x150, which squashes every cloud.
   anything we paint into must be told to fill its box. */
.intro-fox canvas { width: 100%; height: 100%; }

.intro-name {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 1.7vw, 1.25rem);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-weight: 700;
  text-indent: 0.4em;
}

.intro-role { color: var(--ink-soft); }

.intro-bottom { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 14px; }

.picker {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px;
  background: var(--ink);
  border-radius: var(--r-pill);
  max-width: 100%;
}

.picker-scroll {
  display: flex;
  min-width: 0;             /* lets the chip row shrink and scroll inside the pill */
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-inline: 2px;
}
.picker-scroll::-webkit-scrollbar { display: none; }

.picker-dot {
  width: 46px; height: 46px;
  flex: none;
  border-radius: 50%;
  background: rgb(var(--ground-rgb) / 0.16);
  cursor: pointer;
  display: grid;
  place-items: center;
  translate: var(--slide, 0px) 0;
  transition: transform var(--dur-2) var(--ease-back), background-color var(--dur-2) var(--ease-out);
}
/* the copies that make the phone row loop; wide screens show the set once */
.picker-dot.is-clone { display: none; }
.picker-scroll.is-sliding .picker-dot {
  transition: transform var(--dur-2) var(--ease-back), background-color var(--dur-2) var(--ease-out),
    translate 0.42s var(--ease-out);
}
.picker-dot canvas { width: 40px; height: 40px; }
.picker-dot:hover { transform: scale(1.1); }
.picker-dot[aria-selected="true"] { background: var(--ground); transform: scale(1.06); }

.picker-arrow {
  width: 42px; height: 42px;
  flex: none;
  border-radius: 50%;
  background: var(--ground);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.05rem;
  transition: transform var(--dur-2) var(--ease-back);
}
.picker-arrow:hover { transform: scale(1.12); }

.picker-go {
  margin-left: 6px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  background: var(--bone);
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur-2) var(--ease-back);
}
.picker-go:hover { transform: scale(1.04); }

.intro-skip {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  cursor: pointer;
}

.intro-hint { color: var(--ink-soft); }

/* a short screen (a phone on its side) tightens everything so the picker
   fits in one view; the intro can still scroll if even that is not enough */
@media (max-height: 560px) {
  .intro { padding: 12px clamp(16px, 3vw, 34px); }
  .intro-stage { gap: 6px; }
  .intro-stage .eyebrow { display: none; }
  .intro-bottom { gap: 8px; }
}

/* the line under the headline, and the picker's own sound switch */
.intro-sub {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}
.intro-top-right { display: flex; align-items: center; gap: 16px; }
.intro-sound {
  padding: 7px 14px;
  border: 1.5px solid rgb(var(--ink-rgb) / 0.32);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.intro-sound[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }

/* On a phone the picker reads like an app screen: a big two-line headline,
   then the chooser as a dark card - a chip carousel that sizes each fox by
   how far it is from the chosen one (data-d, set in intro.js) - with a
   full-width go button underneath. */
@media (max-width: 640px) {
  .intro-hint { display: none; }
  .intro-stage h1 {
    font-size: clamp(2.5rem, 13.5vw, 3.6rem);
    line-height: 0.9;
    letter-spacing: -0.055em;
    text-wrap: balance;
  }
  .intro-name { font-size: 1.05rem; }
  .picker {
    width: 100%;
    flex-wrap: wrap;
    gap: 12px 6px;
    padding: 12px;
    border-radius: 28px;
  }
  .picker-scroll { flex: 1 1 0; align-items: center; min-height: 60px; overflow-x: hidden; }
  .picker-dot.is-clone { display: grid; }
  .picker-arrow { width: 38px; height: 38px; }
  .picker-dot { width: 32px; height: 32px; opacity: 0.55; }
  .picker-dot[data-d="1"] { width: 40px; height: 40px; opacity: 0.85; }
  .picker-dot[data-d="0"] { width: 56px; height: 56px; opacity: 1; }
  .picker-dot canvas { width: 86%; height: 86%; }
  .picker-go {
    order: 3;
    flex: 1 0 100%;
    margin: 0;
    padding: 14px 20px;
    font-size: 1rem;
    background: var(--ground);
  }
}

/* ---------------- tour ---------------- */

.tour-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  max-width: calc(100vw - 24px);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(140%);
  z-index: var(--z-dock);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 20px;
  background: var(--ink);
  color: var(--ground);
  border-radius: var(--r-pill);
  transition: transform var(--dur-4) var(--ease-back), opacity var(--dur-2) var(--ease-out), visibility 0s linear var(--dur-4);
}
.tour-bar.is-on { transition-delay: 0s; opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.tour-bar button {
  padding: 8px 15px;
  border-radius: var(--r-pill);
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.tour-track { width: clamp(90px, 20vw, 200px); height: 3px; background: rgb(var(--ground-rgb) / 0.25); border-radius: 2px; }
.tour-track i { display: block; height: 100%; background: var(--ground); border-radius: 2px; transform: scaleX(var(--tp, 0)); transform-origin: 0 50%; }

/* the countdown reads as a key and a clock: Esc ends the show */
.tour-esc {
  padding: 3px 7px;
  border: 1px solid rgb(var(--ground-rgb) / 0.45);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}
.tour-time { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3.2ch; }

/* until the screen is wide enough for both side by side, the tour bar sits
   above the dock rather than running into it */
@media (max-width: 1300px) { .tour-bar { bottom: 74px; } }

/* ---------------- handoff blob ----------------
   The picker is sucked into the fox, a black blob swells out of it
   until only its eyes are left, then wipes off sideways onto the page. */

.blob {
  position: fixed;
  z-index: calc(var(--z-intro) + 1);
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: var(--void);
  pointer-events: none;
  transform: scale(0);
  transition: transform 0.62s cubic-bezier(0.7, 0, 0.84, 0);
}
.blob.is-on { transform: scale(var(--cover, 200)); }
.blob.is-open {
  transform: translateX(-160vmax) scale(var(--cover, 200));
  transition: transform 0.9s var(--ease-inout);
}

.blob-eyes {
  position: fixed;
  z-index: calc(var(--z-intro) + 2);
  display: flex;
  gap: 12px;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out);
}
.blob-eyes.is-on { opacity: 1; }
.blob-eyes i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fffaf2;
  display: grid;
  place-items: center;
}
.blob-eyes i::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--void); }

/* the game button calls for attention at the end of the tour */
.dock button.is-called { animation: dock-call 1.1s var(--ease-out) infinite; }
@keyframes dock-call {
  from { box-shadow: 0 0 0 0 rgb(var(--ink-rgb) / 0.55); }
  to { box-shadow: 0 0 0 16px rgb(var(--ink-rgb) / 0); }
}
/* ---------------- quote form ----------------
   Every "Start a stack" opens this. A dark card on a blurred page, three
   fields, one wide send button. */

.quote {
  position: fixed;
  inset: 0;
  z-index: var(--z-game);
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 40px);
  background: rgb(var(--ink-rgb) / 0.62);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease-out);
  overflow: auto;
}
.quote[hidden] { display: none; }
.quote.is-on { opacity: 1; }

.quote-card {
  position: relative;
  width: min(100%, 560px);
  padding: clamp(22px, 3.4vw, 34px);
  background: var(--void);
  color: var(--bone);
  border: 1.5px solid rgb(var(--ground-rgb) / 0.45);
  border-radius: var(--r-panel);
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.45);
  transform: translateY(16px) scale(0.98);
  transition: transform var(--dur-4) var(--ease-back);
}
.quote.is-on .quote-card { transform: none; }

.quote-card h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: var(--track-md);
  line-height: 1.05;
  padding-right: 44px;
}
.quote-sub { margin-top: 10px; color: rgb(var(--ground-rgb) / 0.78); font-weight: 600; line-height: 1.45; max-width: 44ch; }

.quote-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 22px;
}
@media (min-width: 520px) { .quote-grid { grid-template-columns: 1fr 1fr; } .quote-wide { grid-column: 1 / -1; } }

.quote-field { display: grid; gap: 8px; }
.quote-field .mono { color: rgb(var(--ground-rgb) / 0.85); font-size: var(--t-mono); letter-spacing: var(--track-mono); text-transform: uppercase; }
.quote-field input,
.quote-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid rgb(var(--ground-rgb) / 0.28);
  background: rgb(var(--ground-rgb) / 0.06);
  color: var(--bone);
  font: inherit;
  font-weight: 600;
  line-height: 1.4;
  transition: border-color var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out);
}
.quote-field textarea { resize: vertical; min-height: 110px; }
.quote-field input::placeholder,
.quote-field textarea::placeholder { color: rgb(var(--ground-rgb) / 0.4); font-weight: 500; }
.quote-field input:focus-visible,
.quote-field textarea:focus-visible { outline: none; border-color: var(--ground); background: rgb(var(--ground-rgb) / 0.1); }
.quote-field.is-bad input, .quote-field.is-bad textarea { border-color: var(--signal-lift); }

.quote-error { margin-top: 12px; color: var(--signal-lift); font-weight: 600; }

.quote-send {
  --btn-bg: var(--ground);
  --btn-fg: var(--ink);
  width: 100%;
  justify-content: center;
  margin-top: 18px;
  padding-block: 1em;
}
.quote-send::after { background: var(--bone); }
.quote-send[disabled] { opacity: 0.6; pointer-events: none; }

.quote-done { margin-top: 18px; font-weight: 700; color: var(--ground); }

.quote-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--bone);
  cursor: pointer;
  transition: transform var(--dur-2) var(--ease-back), background-color var(--dur-2) var(--ease-out);
}
.quote-close:hover { transform: rotate(90deg); background: rgb(var(--ground-rgb) / 0.12); }

/* ---------------- tour interrupt ----------------
   Scrolling during the tour asks rather than silently dropping you. */

.ask {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-dock) + 10);
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgb(var(--ink-rgb) / 0.55);
  backdrop-filter: blur(9px);
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease-out);
}
.ask[hidden] { display: none; }
.ask.is-on { opacity: 1; }

.ask-card {
  width: min(100%, 420px);
  background: var(--bone);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--r-panel);
  box-shadow: 8px 9px 0 0 var(--ink);
  padding: clamp(20px, 3vw, 30px);
  display: grid;
  gap: 16px;
  transform: translateY(14px) scale(0.97);
  transition: transform var(--dur-4) var(--ease-back);
}
.ask.is-on .ask-card { transform: none; }
.ask-card p { font-weight: 700; font-size: clamp(1.02rem, 1.4vw, 1.2rem); line-height: 1.3; }
.ask-row { display: flex; flex-wrap: wrap; gap: 10px; }
