@font-face {
  font-family: "GeistPixelGrid";
  src: url("./games/GeistPixel-Grid.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Funnel Display", var(--font-sans);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --page-bg: #efeeec;
  --canvas-surface: #faf9f7;
  --page-text: #141414;
  --page-muted: rgba(20, 20, 20, 0.66);
  --page-line: rgba(20, 20, 20, 0.14);
  --action: #141414;
  --action-text: #faf9f7;
  --canvas-dot: rgba(39, 37, 29, 0.08);
  --shell: #1a1a1a;
  --shell-edge: #090909;
  --shell-outer: #242424;
  --shell-highlight: rgba(255, 255, 255, 0.05);
  --screen-bg: #090909;
  --screen-edge: #0b0b0b;
  --screen-highlight: rgba(255, 255, 255, 0.06);
  --screen-shadow: rgba(0, 0, 0, 0.24);
  --control-fill: #1a1a1a;
  --control-pressed: #161616;
  --control-edge: #0b0b0b;
  --control-highlight: rgba(255, 255, 255, 0.035);
  --speaker-fill: #161616;
  --speaker-edge: #0a0a0a;
  --speaker-dot: rgba(0, 0, 0, 0.62);
  --speaker-glow: rgba(255, 255, 255, 0.03);
  --icon: rgba(235, 235, 235, 0.94);
  --handle-fill: rgba(0, 0, 0, 0.18);
  --handle-text: rgba(255, 255, 255, 0.7);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #111111;
  --canvas-surface: #171717;
  --page-text: #f4f4f0;
  --page-muted: rgba(244, 244, 240, 0.66);
  --page-line: rgba(244, 244, 240, 0.14);
  --action: #f4f4f0;
  --action-text: #141414;
  --canvas-dot: rgba(255, 255, 255, 0.08);
}

.player[data-theme="light"] {
  --shell: #f5f3f0;
  --shell-edge: #cbc6bf;
  --shell-outer: #ffffff;
  --shell-highlight: rgba(255, 255, 255, 0.78);
  --screen-bg: #d6d1ca;
  --screen-edge: #cfc8c0;
  --screen-highlight: rgba(255, 255, 255, 0.68);
  --screen-shadow: rgba(132, 120, 108, 0.12);
  --control-fill: #efebe5;
  --control-pressed: #e2ddd6;
  --control-edge: #cec7bd;
  --control-highlight: rgba(255, 255, 255, 0.68);
  --speaker-fill: #ebe5dd;
  --speaker-edge: #d4ccc2;
  --speaker-dot: rgba(122, 110, 98, 0.38);
  --speaker-glow: rgba(255, 255, 255, 0.42);
  --icon: #67605a;
  --handle-fill: rgba(116, 104, 92, 0.12);
  --handle-text: rgba(92, 84, 76, 0.78);
}

* {
  box-sizing: border-box;
}

::selection {
  background: rgba(46, 107, 230, 0.22);
}

html,
body {
  min-height: 100%;
}

body {
  position: relative;
  margin: 0;
  background: var(--page-bg);
  color: var(--page-text);
  font-family: var(--font-sans);
  overflow: hidden;
  user-select: none;
}

body.toolbar-open {
  cursor: crosshair;
}

.canvas-filter-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--canvas-surface);
  background-image: radial-gradient(circle, var(--canvas-dot) 1.5px, transparent 1.5px);
  background-position: 0 0;
  background-size: 20px 20px;
  transform: translateZ(0);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.work-feed {
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow: hidden;
  background: var(--page-bg);
  color: var(--page-text);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.985);
  transition:
    opacity 240ms ease,
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-feed.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.work-feed__viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.work-feed__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--page-bg);
  color-scheme: light dark;
}

.work-feed__close {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 10002;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--page-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--page-bg) 72%, var(--page-text));
  color: var(--page-text);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.work-feed__close:hover {
  background: color-mix(in srgb, var(--page-bg) 56%, var(--page-text));
  transform: scale(1.04);
}

.work-feed__close svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.idle-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2147483647;
  width: min(210px, calc(100vw - 16px));
  min-height: 44px;
  pointer-events: none;
  opacity: 0;
  --idle-surface: #d5fefe;
  --idle-ink: #053e46;
  transform: translate3d(var(--idle-x, 52vw), var(--idle-y, 42vh), 0);
  transition:
    opacity 180ms ease,
    transform 2600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.idle-cursor.is-touring {
  transition:
    opacity 180ms ease,
    transform 3400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.idle-cursor.is-visible {
  opacity: 1;
}

.idle-cursor__marker {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.1));
}

.idle-cursor__note {
  position: absolute;
  top: 21px;
  left: 22px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: max-content;
  max-width: min(180px, calc(100vw - 34px));
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 2px 8px 8px 8px;
  background: var(--idle-surface);
  color: var(--idle-ink);
  font-family: "DM Sans", "GeistPixelGrid", sans-serif;
  font-size: clamp(11px, 1.8vw, 13px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-align: left;
  font-feature-settings: "ordn" on, "liga" off;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 180ms ease,
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.idle-cursor.has-note .idle-cursor__note {
  opacity: 1;
  transform: translateY(0);
}

html[data-theme="dark"] .idle-cursor__note {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(340px, 1fr);
  align-items: center;
  gap: clamp(44px, 7vw, 112px);
  min-height: 100vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 70px);
  pointer-events: none;
  user-select: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-panel {
  position: relative;
  z-index: 2;
  max-width: min(640px, 100%);
  pointer-events: auto;
}

.hero-image {
  display: block;
  width: min(150px, 34vw);
  aspect-ratio: 1;
  margin: 0 0 24px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 16px 34px rgba(36, 31, 22, 0.13);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  animation: heroImageEnter 420ms var(--ease-out-quint) 40ms forwards;
}

.hero-title {
  display: grid;
  max-width: min(640px, 100%);
  padding-bottom: 0.18em;
  margin: 0;
  color: var(--page-text);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(32px, 4.2vw, 50px);
  font-weight: 680;
  line-height: 1.02;
  letter-spacing: 0;
  overflow: visible;
}

.hero-title__line {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.16em;
  row-gap: 0.02em;
  font-size: clamp(32px, 4.2vw, 50px);
  overflow: visible;
}

.hero-title__line:first-child {
  flex-wrap: nowrap;
}

.hero-title__type {
  display: block;
  max-width: min(640px, 100%);
  text-wrap: balance;
}

.hero-title__type .split-word {
  display: inline-block;
  white-space: nowrap;
}

.split-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.34em);
  animation: splitRise 300ms var(--ease-out-quint) forwards;
}

.hero-title__line:nth-child(1) .split-word:nth-child(1) {
  animation-delay: 260ms;
}

.hero-title__line:nth-child(1) .split-word:nth-child(2) {
  animation-delay: 320ms;
}

.hero-title__line:nth-child(2) .split-word {
  animation-delay: 380ms;
}

.swap-wrap {
  display: inline;
  max-width: 100%;
  min-width: 0;
  min-height: 1.24em;
  padding-bottom: 0.08em;
  overflow: visible;
  font-size: 1em;
  font-weight: 760;
  white-space: normal;
  opacity: 0;
  transform: translateY(0.34em);
  animation: splitRise 320ms var(--ease-out-quint) 440ms forwards;
}

#swapWord {
  display: inline;
  white-space: normal;
  overflow-wrap: normal;
  line-height: 0;
}

.hero-copy {
  max-width: 380px;
  margin: 0px 0 0;
  color: var(--page-muted);
  font-family: var(--font-sans);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.20;
  letter-spacing: 0;
  word-spacing: 0.10em;
  opacity: 0;
  transform: translateY(10px);
  animation: splitRise 280ms var(--ease-out-quint) 560ms forwards;
}

.hero-title,
.hero-copy {
  user-select: text;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
}

.hero-pill {
  display: inline-grid;
  place-items: center;
  position: relative;
  min-width: 122px;
  min-height: 43px;
  padding: 0 17px;
  border: 1px solid var(--action);
  border-radius: 10px;
  background: var(--action);
  color: var(--action-text);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 200ms ease,
    color 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease;
  opacity: 0;
  transform: translateY(10px);
  animation: splitRise 240ms var(--ease-out-quint) forwards;
}

.hero-pill:nth-child(1) {
  animation-delay: 600ms;
}

.hero-pill:nth-child(2) {
  animation-delay: 660ms;
}

.hero-pill:hover,
.hero-pill:focus-visible {
  background: color-mix(in srgb, var(--action) 90%, var(--page-bg));
  border-color: color-mix(in srgb, var(--action) 86%, var(--page-bg));
  box-shadow: 0 14px 28px rgba(25, 22, 17, 0.12);
}

.hero-pill-secondary {
  background: transparent;
  color: var(--page-text);
  border-color: var(--page-line);
}

.hero-pill-secondary:hover,
.hero-pill-secondary:focus-visible {
  background: color-mix(in srgb, var(--page-text) 4%, transparent);
  border-color: var(--action);
}

.hero-pill-secondary .default-label,
.hero-pill .hover-label,
.hero-pill .copied-label {
  grid-area: 1 / 1;
  transition:
    opacity 220ms ease,
    transform 220ms var(--ease-out-quint);
}

.hero-pill-secondary .default-label {
  opacity: 1;
  transform: translateY(0);
}

.hero-pill-secondary .hover-label,
.hero-pill-secondary .copied-label {
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
}

.hero-pill-secondary:hover:not(.is-copied) .default-label,
.hero-pill-secondary:focus-visible:not(.is-copied) .default-label,
.hero-pill-secondary.is-copied .default-label,
.hero-pill-secondary.is-copied .hover-label {
  opacity: 0;
  transform: translateY(-4px);
}

.hero-pill-secondary:hover:not(.is-copied) .hover-label,
.hero-pill-secondary:focus-visible:not(.is-copied) .hover-label,
.hero-pill-secondary.is-copied .copied-label {
  opacity: 1;
  transform: translateY(0);
}

@keyframes splitRise {
  from {
    opacity: 0;
    transform: translateY(0.34em);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroImageEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes widgetEnter {
  from {
    opacity: 0;
    filter: blur(10px);
    scale: 0.97;
  }

  to {
    opacity: 1;
    filter: blur(0);
    scale: 1;
  }
}

@keyframes toolbarEnter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
    scale: 0.94;
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    scale: 1;
  }
}

.player-frame {
  position: relative;
  z-index: 30;
  width: 100%;
  min-height: min(720px, calc(100vh - 56px));
  pointer-events: none;
}

.player {
  position: absolute;
  z-index: 30;
  top: 50%;
  left: 50%;
  width: 340px;
  padding: 26px 14px 14px;
  border-radius: 51px;
  background: linear-gradient(180deg, var(--shell-outer), var(--shell));
  border: 1px solid var(--shell-edge);
  box-shadow:
    inset 0 1px 0 var(--shell-highlight),
    inset 0 -10px 20px rgba(0, 0, 0, 0.16),
    0 16px 28px rgba(0, 0, 0, 0.08);
  transform: translate(-50%, -50%);
  pointer-events: auto;
  contain: layout paint style;
  opacity: 0;
  transition: box-shadow 240ms ease;
  animation: widgetEnter 430ms var(--ease-out-quint) 700ms forwards;
}

.player:hover {
  box-shadow:
    inset 0 1px 0 var(--shell-highlight),
    inset 0 -10px 20px rgba(0, 0, 0, 0.16),
    0 22px 42px rgba(0, 0, 0, 0.13);
}

.annotation-canvas {
  position: fixed;
  inset: 0;
  z-index: 11;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  touch-action: none;
}

.pin-canvas {
  position: fixed;
  inset: 0;
  z-index: 14;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  touch-action: none;
}

body.toolbar-open .annotation-canvas {
  pointer-events: auto;
}

.toolbar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  border: 1px solid var(--page-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--canvas-surface) 90%, transparent);
  backdrop-filter: blur(12px);
  box-shadow:
    0 12px 34px rgba(36, 31, 22, 0.18),
    0 2px 6px rgba(36, 31, 22, 0.08);
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
  animation: toolbarEnter 300ms var(--ease-out-quint) 680ms forwards;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  user-select: none;
  scale: 0.94;
  animation-delay: 780ms;
}

.tool-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--page-text);
  cursor: pointer;
  transition:
    background 120ms ease,
    color 120ms ease,
    transform 120ms ease;
}

.tool-btn:hover {
  background: color-mix(in srgb, var(--page-text) 8%, transparent);
}

.tool-btn:active {
  transform: translateY(1px);
}

.tool-btn.active {
  background: var(--tool-color, #20201d);
  color: var(--tool-ink, #fff);
}

.tool-btn svg {
  display: block;
  width: 22px;
  height: 22px;
}

.hero-pill:focus-visible,
.tool-btn:focus-visible,
.control:focus-visible,
.work-feed__close:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--action) 45%, transparent);
  outline-offset: 2px;
}

.tool-sep {
  width: 1px;
  height: 24px;
  margin: 0 3px;
  background: var(--page-line);
}

.sticky-note,
.text-box {
  position: fixed;
  z-index: 12;
  color: rgba(13, 1, 40, 0.72);
  font-family: "DM Sans", "GeistPixelGrid", sans-serif;
  pointer-events: auto;
  touch-action: none;
  user-select: text;
}

.sticky-note.is-selected,
.text-box.is-selected,
.sticky-note.is-drag-ready,
.text-box.is-drag-ready {
  cursor: text;
}

.sticky-note.is-dragging,
.text-box.is-dragging {
  cursor: grabbing;
}

body.annotation-dragging,
body.annotation-dragging .sticky-note,
body.annotation-dragging .text-box {
  cursor: grabbing;
  user-select: none;
}

.sticky-note {
  width: 148px;
  min-height: 108px;
  padding: 10px 12px;
  border: 0;
  border-radius: 3px;
  box-shadow: 2px 3px 12px rgba(29, 25, 16, 0.14);
  font-size: 13px;
  line-height: 1.5;
  outline: none;
  resize: none;
}

.sticky-note.is-selected,
.text-box.is-selected {
  box-shadow:
    2px 3px 12px rgba(29, 25, 16, 0.14),
    0 0 0 1px rgba(146, 139, 128, 0.32);
}

.text-box {
  min-width: 88px;
  min-height: 32px;
  padding: 4px 8px;
  border: 1.5px dashed #928b80;
  border-radius: 2px;
  background: transparent;
  font-size: 16px;
  line-height: 1.35;
  outline: none;
  resize: none;
}

.annotation-canvas.is-selecting {
  cursor: grab;
}

.player::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 45px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  pointer-events: none;
}

.resize-handle {
  position: absolute;
  top: 8px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  z-index: 3;
  touch-action: none;
  transition: opacity 200ms ease;
}

.resize-handle::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: var(--handle-fill);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.resize-handle-left {
  left: 10px;
  cursor: nwse-resize;
  opacity: 0;
}

.resize-handle-right {
  right: 10px;
  cursor: nesw-resize;
  opacity: 0;
}

.player:hover .resize-handle-left,
.player:hover .resize-handle-right {
  opacity: 0.5;
}

.drag-handle {
  position: absolute;
  top: 6px;
  left: 34px;
  right: 34px;
  width: auto;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: grab;
  touch-action: none;
}

.drag-handle:active,
.drag-handle.is-dragging {
  cursor: grabbing;
}

.drag-handle::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 92px;
  height: 8px;
  border-radius: 999px;
  background: var(--handle-fill);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateX(-50%);
}

.screen {
  position: relative;
  width: 100%;
  aspect-ratio: 400 / 573;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid var(--screen-edge);
  background: linear-gradient(180deg, color-mix(in srgb, var(--screen-bg) 92%, white), var(--screen-bg));
  box-shadow:
    inset 0 1px 0 var(--screen-highlight),
    inset 0 -10px 16px var(--screen-shadow),
    0 1px 0 rgba(255, 255, 255, 0.03);
}

.game-stage {
  position: absolute;
  inset: 2px;
  overflow: hidden;
  border-radius: 27px;
}

.game-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 573px;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%) scale(var(--game-scale, 1));
  transform-origin: center center;
  color-scheme: light dark;
}

.speaker-bar {
  height: 24px;
  margin-top: 10px;
  border-radius: 4px;
  border: 1px solid var(--speaker-edge);
  background:
    linear-gradient(180deg, var(--speaker-glow), transparent 45%),
    radial-gradient(circle at 1px 1px, var(--speaker-dot) 0 0.72px, transparent 0.84px) 0 0 / 6px 6px,
    var(--speaker-fill);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    inset 0 -6px 10px rgba(0, 0, 0, 0.12);
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.control {
  position: relative;
  height: 84px;
  appearance: none;
  border: 1px solid var(--control-edge);
  background: linear-gradient(180deg, color-mix(in srgb, var(--control-fill) 92%, white), var(--control-fill));
  color: var(--icon);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 var(--control-highlight),
    inset 0 -8px 18px rgba(0, 0, 0, 0.08);
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.control-prev {
  border-radius: 8px 8px 8px 38px;
}

.control-next {
  border-radius: 8px 8px 38px 8px;
}

.control:active,
.control.is-pressed {
  transform: translateY(1px);
  background: var(--control-pressed);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.control svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

@media (prefers-reduced-motion: reduce) {
  .hero-image,
  .split-word,
  .swap-wrap,
  .hero-copy,
  .hero-pill,
  .player,
  .toolbar {
    opacity: 1;
    animation: none;
    transform: none;
    filter: none;
  }

  .toolbar {
    transform: translateX(-50%);
  }

  .control {
    transition: none;
  }

  .idle-cursor {
    display: none;
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .stage {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 24px;
    min-height: 100vh;
    padding-inline: clamp(18px, 5vw, 42px);
  }

  .hero-panel {
    max-width: 760px;
    padding-top: 12px;
  }

  .hero-title {
    max-width: min(570px, 100%);
  }

  .player-frame {
    min-height: 660px;
    margin-top: 42px;
  }

  .player {
    width: min(370px, calc(100vw - 48px));
  }
}

@media (max-width: 700px) {
  body {
    overflow: hidden;
  }

  body::after {
    display: none;
  }

  body::before {
    background-size: 24px 24px;
  }

  .stage {
    display: block;
    min-height: 100svh;
    width: 100vw;
    max-width: none;
    padding: 0;
  }

  .hero-panel,
  .toolbar,
  .annotation-canvas,
  .pin-canvas {
    display: none;
  }

  .player-frame {
    width: 100vw;
    min-height: 100svh;
    margin: 0;
  }

  .player {
    top: 50% !important;
    left: 50% !important;
    width: min(390px, calc(100vw - 16px), calc((100svh - 24px) * 0.56));
    transform: translate(-50%, -50%) !important;
    animation-delay: 160ms;
  }

  .screen,
  .work-feed__close,
  .toolbar {
    backdrop-filter: none;
  }
}

@media (max-width: 420px) {
  .player {
    left: 50%;
    width: min(390px, calc(100vw - 16px), calc((100svh - 24px) * 0.56));
  }

  .drag-handle {
    left: 30px;
    right: 30px;
  }
}

@media (max-width: 560px) {
  .toolbar {
    bottom: 12px;
    gap: 1px;
    padding: 5px;
  }

  .tool-btn {
    width: 38px;
    height: 38px;
  }
}
