/* ─── Font ────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Uncut Sans';
  src: url('/assets/fonts/UncutSans-Medium.woff2') format('woff2'),
       url('/assets/fonts/UncutSans-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ─── Colour tokens ───────────────────────────────────────────────────────── */

:root {
  /* Page background */
  --colour-page-bg: #FFBF00;

  /* Illustration system */
  --colour-illustration-white: #FFFFFF;
  --colour-illustration-light: #B5CDDB;
  --colour-illustration-mid:   #7DA9C3;
  --colour-illustration-base:  #004980;

  /* Ink palette */
  --ink-fluorescent-pink: #FF2989;
  --ink-medium-blue:      #2C29FF;
  --ink-yellow:           #FFBF00;
  --ink-aqua:             #29DBFF;
  --ink-magenta:          #F41EFF;
  --ink-lime:             #BFFF00;
  --ink-green:            #00D652;
  --ink-lavender:         #985DE4;
  --ink-black:            #000000;

  /* Paper colours */
  --colour-slot-interior: #001f38;
  --colour-paper:         #F5F0E8;

  /* Monitor screen positioning (percentages of monitor-wrap)
     monitor-body.png: 1080×1072 | screen-bg.png: 904×712
     Horizontal centre: (1080–904)/2 = 88px → 88/1080 = 8.15%
     Vertical top estimate from design reference: ~83px → 83/1072 = 7.74% */
  --monitor-screen-left:  8.15%;
  --monitor-screen-top:   7.74%;
  --monitor-screen-width: 83.7%;

  /* Dark inner screen inset within screen-bg.png
     Frame ≈ 35px at original size → 35/904 = 3.87% h, 35/712 = 4.92% v */
  --screen-inset-h: 3.9%;
  --screen-inset-v: 4.9%;
}

/* ─── Reset ───────────────────────────────────────────────────────────────── */

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

/* ─── Base ────────────────────────────────────────────────────────────────── */

html {
  height: 100%;
}

body {
  min-height: 100%;
  font-family: 'Uncut Sans', sans-serif;
  font-weight: 500;
  background-color: var(--colour-page-bg);
  color: var(--colour-illustration-light);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* ─── Phase management ────────────────────────────────────────────────────── */

.phase {
  display: none;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 24px;
  gap: 20px;
}

/* Printer phase: always centered, no scrolling */
#phase-printer {
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* Print overlay — darkens + blurs the scene while a pass runs */
.print-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  transition: opacity 0.3s ease;
}

.print-overlay[hidden] {
  display: none;
}

.phase.active {
  display: flex;
}

/* ─── Monitor stage ───────────────────────────────────────────────────────── */

.monitor-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Photo pin (taped photo on the wall) ─────────────────────────────────── */

.photo-pin {
  position: absolute;
  right: calc(100% + 40px);
  top: 50%;
  translate: 0 -50%;
  display: none; /* shown via JS once image is loaded */
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 200px;
}

.photo-pin.visible {
  display: flex;
}

/* Tape strip — sits centred at the top, overlapping the frame */
.photo-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  translate: -50% 0;
  width: 56px;
  height: 22px;
  background: var(--ink-lime);
  opacity: 0.8;
  z-index: 2;
}

/* White border "photo frame" */
.photo-frame {
  background: var(--colour-illustration-white);
  padding: 12px 12px 24px; /* extra bottom padding — classic photo print look */
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.18);
  width: 100%;
}

.photo-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* ─── Monitor wrap ────────────────────────────────────────────────────────── */

.monitor-wrap {
  position: relative;
  width: min(540px, 92vw);
  flex-shrink: 0;
}

.monitor-body {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

/* screen-bg layer: absolutely positioned over the screen opening in the bezel */
.monitor-screen-layer {
  position: absolute;
  left:  var(--monitor-screen-left);
  top:   var(--monitor-screen-top);
  width: var(--monitor-screen-width);
}

.monitor-screen-bg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

/* Interactive dark screen area — drag-drop target */
.monitor-screen {
  position: absolute;
  inset: var(--screen-inset-v) var(--screen-inset-h);
  display: flex;
  flex-direction: column;
  padding: 10% 8% 8%;
  overflow: hidden;
  cursor: default;
}

/* ─── Drag-over overlay ───────────────────────────────────────────────────── */

.drag-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.drag-overlay.visible {
  opacity: 1;
  pointer-events: none;
}

.monitor-screen:has(.drag-overlay.visible) .screen-content {
  opacity: 0.15;
}

.drag-overlay-frame {
  position: absolute;
  inset: 12px;
  border: 4px dotted var(--colour-illustration-white);
  border-radius: 24px;
}

.drag-overlay-text {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  color: var(--colour-illustration-white);
  position: relative;
}

/* ─── Screen content (cross-fades between phases) ─────────────────────────── */

.screen-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  transition: opacity 0.15s ease;
}

.screen-content.fading {
  opacity: 0;
  pointer-events: none;
}

/* ─── Typing cursor ───────────────────────────────────────────────────────── */

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.typing-cursor::after {
  content: '▋';
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s step-start infinite;
  color: var(--colour-illustration-white);
}

/* ─── Upload screen (Phase 1) ─────────────────────────────────────────────── */

.upload-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  gap: 24px;
}

.ascii-logo {
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  line-height: 1.1;
  white-space: pre;
  user-select: none;
  margin-bottom: -12px;
}


.screen-body {
  font-size: 20px;
  line-height: 1.25;
  color: var(--colour-illustration-light);
  width: 100%;
}

/* ─── Screen buttons (shared style) ──────────────────────────────────────── */

.screen-btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--colour-illustration-light);
  background: transparent;
  border: 1px solid var(--colour-illustration-light);
  height: 40px;
  padding: 0 16px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

/* Upload screen: button width */
.upload-screen .screen-btn {
  width: 70%;
}

.screen-btn:hover {
  background-color: var(--colour-illustration-light);
  color: var(--colour-illustration-base);
}

.screen-btn:active {
  transform: scale(0.98);
}

.screen-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── Ink picker screen (Phase 2) ─────────────────────────────────────────── */

.ink-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 16px;
}

.ink-screen-title {
  font-size: 24px;
  line-height: 1.2;
  color: var(--colour-illustration-light);
}

/* 3×3 colour grid — CSS grid with 1px gaps acting as border lines */
.colour-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background-color: var(--colour-illustration-light); /* fills the 1px gaps */
  border: 1px solid var(--colour-illustration-light);
}

.colour-cell {
  background-color: var(--colour-illustration-base);
  display: flex;
  align-items: center;
  padding: 8px;
  gap: 4px;
  cursor: pointer;
  transition: opacity 0.1s ease;
}

.colour-cell:hover {
  opacity: 0.85;
}

/* The ink colour rectangle inside each cell */
.ink-rect {
  flex: 1;
  height: 32px;
  min-width: 0;
  pointer-events: none;
}

/* Selection order number shown inside selected cell */
.cell-number {
  width: 32px;
  font-size: 24px;
  line-height: 32px;
  text-align: center;
  color: var(--colour-illustration-light);
  flex-shrink: 0;
  pointer-events: none;
}

/* Dark paper swatches — lift brightness and use white checkmark */
.colour-cell[data-dark="true"] .ink-rect {
  filter: brightness(2.5);
}

.colour-cell[data-dark="true"] .cell-number {
  color: #ffffff;
}


/* Action buttons row */
.ink-actions {
  display: flex;
  gap: 16px;
  margin-top: auto;
}

.ink-btn-back {
  flex-shrink: 0;
  white-space: nowrap;
}

.ink-btn-print {
  flex: 1;
}

/* ─── Printer phase (Phase 3 & 4) ────────────────────────────────────────── */

/* Outer wrapper: flex row — left tray | body | right tray */
.printer-wrap {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  flex-shrink: 0;
}

/* ── Left input tray (CSS recreation from Figma 133:935) ──────────────────── */

/* Overall tray: aligns with cabinet body bottom */
.printer-tray-left {
  width: 150px;
  height: 144px;
  flex-shrink: 0;
  margin-bottom: 58px; /* above cabinet feet */
  position: relative;
}

/* Tray shelf bar — 16px tall, full width, illustration/light colour */
.tray-shelf {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 16px;
  background: var(--colour-illustration-light);
  pointer-events: none;
}

/* paper-input: 128px wide, stacks bottom-up, flush right above the shelf */
.paper-input {
  position: absolute;
  right: 0;
  bottom: 16px; /* sits on top of the shelf */
  width: 128px;
  height: 120px; /* enough room for max 43 sheets at 2px + 1px gap */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1px;
  pointer-events: none;
  overflow: hidden;
}

/* ── Main printer body ─────────────────────────────────────────────────────── */

/* Single relative container: 648px wide, 506px tall (164 controller + 342 cabinet) */
.printer-body {
  position: relative;
  width: 648px;
  height: 506px;
  flex-shrink: 0;
}

/* ── Top controller panel: 624×164px, centred (12px each side) ─────────────── */

.printer-controller-wrap {
  position: absolute;
  top: 0;
  left: 12px;
  width: 624px;
  height: 164px;
  z-index: 2;
}

.printer-controller {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.controller-ui {
  position: absolute;
  inset: 0;
  overflow: visible;
}

/* ── Lower cabinet: 648×342px, sits below controller ───────────────────────── */

.cabinet-lower {
  position: absolute;
  top: 164px;
  left: 0;
  width: 648px;
  height: 342px;
}

.cabinet-lower img.cabinet-img {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  pointer-events: none;
}

/* ── Drum reels: centred in cabinet face, above the feet (58px from bottom) ── */

.drum-reels {
  position: absolute;
  top: 220px; /* below controller + top strip */
  left: 0;
  width: 648px;
  bottom: 58px; /* above feet */
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 24px;
  z-index: 3;
  pointer-events: none;
}

.drum-reel {
  flex: 0 0 180px;
  width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  --reel-dur: 1s;
}

.reel-disc {
  width: 100%;
  display: block;
  user-select: none;
  pointer-events: none;
}

@keyframes spin {
  to { rotate: 360deg; }
}

.drum-reel.is-printing .reel-disc {
  animation: spin linear infinite;
  animation-duration: var(--reel-dur);
}

.drum-reel.is-printing .reel-gear-img {
  animation: spin linear infinite;
  animation-duration: calc(var(--reel-dur) * 4);
}

.reel-label-plate {
  width: 132px;
  height: 40px;
  background: var(--colour-illustration-light);
  border-radius: 100px;
  border: 2px solid var(--colour-illustration-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}

.reel-gear-img {
  height: 32px;
  width: auto;
  display: block;
  pointer-events: none;
  user-select: none;
}

.reel-number {
  font-size: 24px;
  color: var(--colour-illustration-base);
  line-height: 1;
}

/* ── Right output tray (CSS recreation from Figma 133:981) ─────────────────── */

.printer-tray-right {
  position: relative;
  width: 163px;
  height: 96px;
  flex-shrink: 0;
  margin-bottom: 58px;
}

/* Outer frame — light blue background, rounded top-right */
.tray-right-frame {
  position: absolute;
  inset: 0;
  background: var(--colour-illustration-light);
  border-radius: 0 12px 0 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  pointer-events: none;
}

/* Left bolt strip */
.tray-right-bolt-strip {
  width: 22px;
  background: var(--colour-illustration-base);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.tray-bolt {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--colour-illustration-mid);
}

/* Three dark rounded slots */
.tray-right-slots {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
  padding: 8px 8px 0;
}

.tray-slot {
  flex: 1;
  height: 72px;
  background: var(--colour-page-bg);
  border-radius: 6px 6px 0 0;
}

/* Paper strips stack inside the slots from the bottom */
.paper-output {
  position: absolute;
  bottom: 0;
  left: 22px;  /* after bolt strip */
  right: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1px;
  pointer-events: none;
  z-index: 2;
}

/* ── Paper sheets ───────────────────────────────────────────────────────────── */

.paper-sheet {
  width: 100%;
  height: 2px;
  background: var(--colour-illustration-white);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Sheet leaving input tray — slides right and fades */
.paper-sheet.sheet-leaving {
  opacity: 0;
  transform: translateX(12px);
}

/* Sheet arriving in output tray — starts offset left, slides in */
.paper-sheet.sheet-arriving {
  opacity: 0;
  transform: translateX(-12px);
}

.paper-sheet.printed {
  background: var(--sheet-colour, var(--colour-illustration-white));
}

/* ── Controller interactive elements ─────────────────────────────────────────── */

/* Grit knob */
.ctrl-knob {
  position: absolute;
  left: 40px;
  top: 40px;
  width: 100px;
  cursor: pointer;
  user-select: none;
}

.ctrl-knob img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.knob-label {
  display: block;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--colour-illustration-base);
  margin-top: -4px;
  pointer-events: none;
}

/* LCD display */
.ctrl-lcd {
  position: absolute;
  left: 184px;
  top: 48px;
  width: 180px;
  height: 96px;
  background: var(--colour-illustration-base);
  overflow: hidden;
}

/* Display 1 — print status (absolute layout matching Figma) */
.lcd-display1 {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Inner border inset 8px each side */
.lcd-display1::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid var(--colour-illustration-light);
  pointer-events: none;
  z-index: 0;
}

.lcd-row1 {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 14px;
  color: var(--colour-illustration-light);
  white-space: nowrap;
  line-height: 1.1;
}

.lcd-divider {
  position: absolute;
  top: 39px;
  left: 8px;
  right: 8px;
  height: 1px;
  background: var(--colour-illustration-light);
}

.lcd-kaomoji-row {
  position: absolute;
  top: 44px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 16px;
  color: var(--colour-illustration-light);
  white-space: nowrap;
  line-height: 1.1;
}

#lcd-kaomoji {
  flex-shrink: 0;
}

#lcd-print-count {
  font-size: 14px;
}

.lcd-val {
  color: var(--colour-page-bg);
}

.lcd-progress-bar {
  position: absolute;
  top: 67px;
  left: 16px;
  font-size: 12px;
  color: var(--colour-illustration-light);
  white-space: nowrap;
  letter-spacing: 0;
  line-height: 1.1;
}

/* Numpad */
.ctrl-numpad-wrap {
  position: absolute;
  left: 420px;
  top: 38px;
  width: 86px;
  height: 110px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.numpad-display {
  background: var(--colour-illustration-base);
  border: 1px solid var(--colour-illustration-mid);
  padding: 2px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--colour-illustration-light);
  white-space: nowrap;
}

.numpad-val {
  color: var(--colour-page-bg);
}

.numpad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  flex: 1;
}

.numpad-key {
  background: var(--colour-illustration-mid);
  color: var(--colour-illustration-base);
  font-family: inherit;
  font-weight: 500;
  font-size: 10px;
  border: none;
  cursor: pointer;
  transition: background-color 0.08s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  aspect-ratio: 1;
}

.numpad-key:not(.empty):hover {
  background: var(--colour-illustration-light);
}

.numpad-key:not(.empty):active {
  transform: scale(0.88);
  background: var(--colour-illustration-base);
  color: var(--colour-illustration-light);
}

.numpad-key.empty {
  background: transparent;
  cursor: default;
  pointer-events: none;
}

/* Toggle switch */
.ctrl-toggle {
  position: absolute;
  left: 540px;
  top: 24px;
  height: 120px;
  width: auto;
  cursor: pointer;
  user-select: none;
}

.toggle-shake {
  animation: toggle-shake 0.45s ease;
}

@keyframes toggle-shake {
  0%   { transform: translateX(0); }
  15%  { transform: translateX(-6px) rotate(-4deg); }
  35%  { transform: translateX(6px)  rotate(4deg); }
  55%  { transform: translateX(-4px) rotate(-2deg); }
  75%  { transform: translateX(4px)  rotate(2deg); }
  100% { transform: translateX(0); }
}


/* ── Printer scene — relative container so stack can overlay ─────────────────── */

.printer-scene {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}

/* ── Paper exit slot — the mouth at the bottom-right of the cabinet ────────────── */

/* Positioned at the right side of the cabinet face, just above the feet.
   The slot-lip elements form a dark inset bar; sheets emerge from behind it. */
.paper-exit-slot {
  position: absolute;
  right: 20px;
  bottom: 62px; /* just above the cabinet feet */
  width: 160px;
  z-index: 10;
  pointer-events: none;
}

.slot-lip {
  height: 5px;
  background: var(--colour-illustration-base);
  border-radius: 2px;
}

.slot-lip--top {
  box-shadow: 0 -2px 0 var(--colour-illustration-mid);
}

.slot-lip--bottom {
  box-shadow: 0 2px 0 var(--colour-illustration-mid);
}

.slot-opening {
  height: 6px;
  background: var(--colour-slot-interior);
}

/* ── Paper stack — overlays the printer, sheets grow upward from bottom ───────── */

.paper-stack {
  position: absolute;
  /* Anchor to the bottom-centre of the printer scene */
  bottom: 40px;
  left: 50%;
  translate: -50% 0;
  width: min(440px, 75vw);
  height: 0; /* expands as sheets settle */
  pointer-events: none;
  z-index: 200;
}


/* Individual sheet in the stack */
.stack-sheet {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 100%;

  /* Settled: offset applied via CSS vars, anchored at bottom */
  transform: translateX(-50%) translateX(var(--sheet-x, 0px)) translateY(var(--sheet-y, 0px)) rotate(var(--sheet-rot, 0deg));
  transform-origin: bottom center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              opacity   0.2s ease;

  box-shadow: 2px 4px 16px rgba(0, 0, 0, 0.22);
  background: var(--colour-paper);
}

/* Emerging: sheet starts above (sliding down from the printer body) */
.stack-sheet.emerging {
  transform: translateX(-50%) translateY(-120px) rotate(0deg);
  opacity: 0;
}

.stack-sheet.settled {
  opacity: 1;
}

.stack-sheet-img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}


/* ── Pass confirm overlay ────────────────────────────────────────────────────── */

.pass-confirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transform: translateY(18px);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.3s,
              opacity   0.7s ease 0.3s;
  opacity: 0;
}

#confirm-group[style*="opacity: 1"] .pass-confirm {
  transform: translateY(0);
  opacity: 1;
}

.pass-confirm[hidden] {
  display: none;
}

.pass-confirm-label {
  font-size: 24px;
  font-weight: 700;
  color: var(--colour-illustration-base);
  letter-spacing: normal;
  text-transform: none;
}

.pass-confirm .screen-btn {
  padding: 0 32px;
  color: var(--colour-illustration-base);
  border-color: var(--colour-illustration-base);
}

.pass-confirm .screen-btn:hover {
  background-color: var(--colour-illustration-base);
  color: var(--colour-illustration-white);
}

/* ─── Loupe ───────────────────────────────────────────────────────────────── */

.loupe {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  z-index: 300;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: opacity 0.12s ease;
}

.loupe.visible {
  opacity: 1;
}

/* ─── Result phase (Phase 5) ──────────────────────────────────────────────── */

.result-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: min(520px, 92vw);
}

#result-canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 10% solid var(--colour-illustration-white);
  box-shadow: 2px 4px 16px rgba(0, 0, 0, 0.22);
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.result-actions .screen-btn {
  flex: 1;
  min-width: 120px;
}

.result-btn {
  color: var(--colour-illustration-base);
  border-color: var(--colour-illustration-base);
}

.result-btn:hover {
  background-color: var(--colour-illustration-base);
  color: var(--colour-illustration-white);
}

/* ─── Header & Footer ─────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--colour-illustration-base);
  text-align: center;
  pointer-events: none;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--colour-illustration-base);
  text-align: center;
  pointer-events: none;
  z-index: 10;
}

.footer-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  pointer-events: auto;
}

.footer-link:hover {
  opacity: 0.7;
}

/* ─── Celebration ─────────────────────────────────────────────────────────── */

/* Full-page yellow flash */
.celebrate-flash {
  position: fixed;
  inset: 0;
  background: var(--ink-yellow);
  opacity: 0;
  pointer-events: none;
  z-index: 9998;
  transition: opacity 0.25s ease-in-out;
}

.celebrate-flash.visible {
  opacity: 0.8;
}

/* Confetti sits above everything */
.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* Page shake */
@keyframes page-shake {
  0%   { translate: 0 0; }
  15%  { translate: -8px -4px; }
  30%  { translate: 8px 4px; }
  45%  { translate: -6px 3px; }
  60%  { translate: 6px -3px; }
  75%  { translate: -3px 2px; }
  90%  { translate: 3px -2px; }
  100% { translate: 0 0; }
}

body.page-shake {
  animation: page-shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* ─── Mobile wall ─────────────────────────────────────────────────────────── */

.mobile-wall {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--colour-page-bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 32px;
}

.mobile-wall-monitor {
  width: 180px;
  opacity: 0.6;
}

.mobile-wall-text {
  font-family: 'Uncut Sans', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  color: var(--colour-illustration-base);
  text-align: center;
}

@media (max-width: 1023px) {
  .mobile-wall {
    display: flex;
  }
}
