:root {
  --bg: #f0f2ec;
  --board: #e1e8df;
  --surface: #d9e2d8;
  --text: #26332e;
  --muted: #566660;
  --perk-rare: #234f81;
  --perk-epic: #67418d;
  --snake: #4f8f7e;
  --head: #2c6556;
  --food: #b4711a;
  --wall: #768480;
  --enemy: #b5625c;
  --enemy-head: #8f3f3a;
  --on-accent: #f1f5f0;
  --board-grid: rgba(38, 51, 46, 0.07);
  --board-vignette: 0.055;
  --depth-mid: #567684;
  --depth-deep: #665f87;
  --depth-abyss: #765568;
  --snake-eye: #f1f5f0;
  --dpad-size: 4.5rem;
  --board-size: min(calc(100vw - 2rem), max(12rem, calc(100dvh - 19rem)), 32rem);
  box-sizing: border-box;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141a19;
    --board: #1b2321;
    --surface: #25302d;
    --text: #c5d0cb;
    --muted: #82918a;
    --perk-rare: #8fbfff;
    --perk-epic: #d0a9ee;
    --snake: #4f7d72;
    --head: #8cc4b4;
    --food: #d8ad5a;
    --wall: #63726c;
    --enemy: #9c615c;
    --enemy-head: #d6948c;
    --on-accent: #10201b;
    --board-grid: rgba(197, 208, 203, 0.055);
    --board-vignette: 0.11;
    --depth-mid: #365866;
    --depth-deep: #514c70;
    --depth-abyss: #624457;
    --snake-eye: #10201b;
  }
}
:root[data-theme="dark"] {
  --bg: #141a19;
  --board: #1b2321;
  --surface: #25302d;
  --text: #c5d0cb;
  --muted: #82918a;
  --perk-rare: #8fbfff;
  --perk-epic: #d0a9ee;
  --snake: #4f7d72;
  --head: #8cc4b4;
  --food: #d8ad5a;
  --wall: #63726c;
  --enemy: #9c615c;
  --enemy-head: #d6948c;
  --on-accent: #10201b;
  --board-grid: rgba(197, 208, 203, 0.055);
  --board-vignette: 0.11;
  --depth-mid: #365866;
  --depth-deep: #514c70;
  --depth-abyss: #624457;
  --snake-eye: #10201b;
}

/* Frontier visual style */
:root[data-visual-style="frontier"] {
  --bg: #eee7d8;
  --board: #ded2bb;
  --surface: #d3c5aa;
  --text: #382f26;
  --muted: #746655;
  --snake: #7b8f5d;
  --head: #55683d;
  --food: #c98924;
  --wall: #8c7a63;
  --enemy: #b36a49;
  --enemy-head: #84432a;
  --on-accent: #f8f1e3;
  --board-grid: rgba(76, 61, 43, 0.065);
  --board-vignette: 0.055;
  --depth-mid: #9b795a;
  --depth-deep: #755d68;
  --depth-abyss: #654654;
  --snake-eye: #f8f1e3;
}

@media (prefers-color-scheme: dark) {
  :root[data-visual-style="frontier"]:not([data-theme="light"]) {
    --bg: #1b1814;
    --board: #27221b;
    --surface: #332c23;
    --text: #ddd1bc;
    --muted: #9f907a;
    --snake: #72885f;
    --head: #b7cc93;
    --food: #d7a13a;
    --wall: #766956;
    --enemy: #ab654b;
    --enemy-head: #db9578;
    --on-accent: #1a2117;
    --board-grid: rgba(222, 209, 188, 0.055);
    --board-vignette: 0.11;
    --depth-mid: #594736;
    --depth-deep: #514252;
    --depth-abyss: #573b48;
    --snake-eye: #1a2117;
  }
}

:root[data-theme="dark"][data-visual-style="frontier"] {
  --bg: #1b1814;
  --board: #27221b;
  --surface: #332c23;
  --text: #ddd1bc;
  --muted: #9f907a;
  --snake: #72885f;
  --head: #b7cc93;
  --food: #d7a13a;
  --wall: #766956;
  --enemy: #ab654b;
  --enemy-head: #db9578;
  --on-accent: #1a2117;
  --board-grid: rgba(222, 209, 188, 0.055);
  --board-vignette: 0.11;
  --depth-mid: #594736;
  --depth-deep: #514252;
  --depth-abyss: #573b48;
  --snake-eye: #1a2117;
}

/* Amethyst visual style */
:root[data-visual-style="amethyst"] {
  --bg: #f5eefb;
  --board: #e7d9f4;
  --surface: #dacced;
  --text: #352044;
  --muted: #6c507b;
  --perk-rare: #34568b;
  --perk-epic: #843c8a;
  --snake: #9568b9;
  --head: #7345a3;
  --food: #9d6713;
  --wall: #897493;
  --enemy: #b4586c;
  --enemy-head: #82394e;
  --on-accent: #faf5ff;
  --board-grid: rgba(74, 42, 96, 0.065);
  --board-vignette: 0.055;
  --depth-mid: #b99cce;
  --depth-deep: #a784c1;
  --depth-abyss: #9866ae;
  --snake-eye: #faf5ff;
}

@media (prefers-color-scheme: dark) {
  :root[data-visual-style="amethyst"]:not([data-theme="light"]) {
    --bg: #171021;
    --board: #241a35;
    --surface: #342548;
    --text: #f2eafc;
    --muted: #b3a0c7;
    --perk-rare: #9ac7ff;
    --perk-epic: #e3a9f0;
    --snake: #936cc4;
    --head: #c2a0f1;
    --food: #efc364;
    --wall: #7e6c92;
    --enemy: #c57582;
    --enemy-head: #eda3ad;
    --on-accent: #20102f;
    --board-grid: rgba(226, 201, 255, 0.06);
    --board-vignette: 0.11;
    --depth-mid: #3e2855;
    --depth-deep: #4c2d62;
    --depth-abyss: #582a58;
    --snake-eye: #20102f;
  }
}

:root[data-theme="dark"][data-visual-style="amethyst"] {
  --bg: #171021;
  --board: #241a35;
  --surface: #342548;
  --text: #f2eafc;
  --muted: #b3a0c7;
  --perk-rare: #9ac7ff;
  --perk-epic: #e3a9f0;
  --snake: #936cc4;
  --head: #c2a0f1;
  --food: #efc364;
  --wall: #7e6c92;
  --enemy: #c57582;
  --enemy-head: #eda3ad;
  --on-accent: #20102f;
  --board-grid: rgba(226, 201, 255, 0.06);
  --board-vignette: 0.11;
  --depth-mid: #3e2855;
  --depth-deep: #4c2d62;
  --depth-abyss: #582a58;
  --snake-eye: #20102f;
}

:root[data-visual-style="amethyst"] .board {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--head) 22%, transparent),
    0 0 1.5rem color-mix(in srgb, var(--head) 6%, transparent);
}
:root[data-visual-style="amethyst"] .mobile-controls .btn {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--head) 18%, transparent),
    0 3px 0 color-mix(in srgb, var(--text) 12%, transparent);
}

html { height: 100%; overflow: auto; scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  display: flex;
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
.app { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin: auto; padding: 1rem; }
.hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0.375rem;
  width: var(--board-size);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 0.35rem;
}
.stat {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 0.2rem 0.1rem;
}
.stat .label {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.045em;
  line-height: 1.1;
  text-transform: uppercase;
}
.stat .value {
  margin-top: 0.12rem;
  font-size: 1.35rem;
  font-weight: 750;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat:nth-child(2) {
  background: transparent;
}
.stat:nth-child(2) .label {
  color: color-mix(in srgb, var(--food) 72%, var(--muted));
}
.stat:nth-child(2) .value {
  color: color-mix(in srgb, var(--food) 82%, var(--text));
}
.label { font-size: 0.8125rem; color: var(--muted); }
.value { font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.board {
  position: relative;
  width: var(--board-size);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--board);
  touch-action: none;
  user-select: none;
}
canvas { display: block; width: 100%; height: 100%; }
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-content: safe center;
  gap: 0.5rem;
  padding: 1.5rem;
  overflow: auto;
  text-align: center;
  background: color-mix(in srgb, var(--board) 82%, transparent);
}
.overlay[hidden] { display: none; }
.choices { display: flex; flex-direction: column; gap: 0.625rem; width: 100%; }
.choices[hidden] { display: none; }
.badge { display: grid; flex: none; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--board); color: var(--head); }
.badge .icon { width: 1.25rem; height: 1.25rem; }
.choice {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 0.875rem;
  width: 100%;
  padding: 0.75rem 0.875rem;
  border-radius: 1rem;
  text-align: left;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.12);
  transition: transform 0.15s, background-color 0.15s;
  animation: card-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--i) * 90ms);
}
.choice-text { display: flex; flex-direction: column; }
.choice .label { color: inherit; opacity: 0.85; }
.choice[data-rarity] {
  --perk-accent: var(--text);
  border: 1px solid color-mix(in srgb, var(--perk-accent) 55%, var(--surface));
}
.choice[data-rarity="rare"] { --perk-accent: var(--perk-rare); }
.choice[data-rarity="epic"] { --perk-accent: var(--perk-epic); }
.choice-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.5rem; }
.perk-rarity {
  color: var(--perk-accent);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.choice:active { transform: scale(0.98); }
.choice.is-chosen { animation: card-chosen 0.32s ease forwards; }
.choice.is-dismissed { animation: card-out 0.3s ease forwards; }
@media (hover: hover) { .choice:hover { transform: translateY(-2px); } }
@keyframes card-in { from { opacity: 0; transform: translateY(1rem) scale(0.96); } }
@keyframes card-chosen { to { transform: scale(1.04); box-shadow: 0 0 0 2px var(--head), 0 8px 22px rgb(0 0 0 / 0.2); } }
@keyframes card-out { to { opacity: 0; transform: translateY(0.5rem) scale(0.96); } }
@media (prefers-reduced-motion: reduce) { .choice, .choice.is-chosen, .choice.is-dismissed { animation: none; transition: none; } }
.overlay h1 { margin: 0; font-size: 1.75rem; }
.overlay p { margin: 0 0 0.75rem; color: var(--muted); }
.overlay.floor-intro h1 {
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: floor-title-in 0.52s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.overlay.floor-intro #hint {
  animation: floor-hint-in 0.52s ease 0.12s both;
}
@keyframes floor-title-in {
  from { opacity: 0; transform: translateY(0.65rem) scale(0.94); letter-spacing: 0.18em; }
}
@keyframes floor-hint-in {
  from { opacity: 0; transform: translateY(0.4rem); }
}
@media (prefers-reduced-motion: reduce) {
  .overlay.floor-intro h1,
  .overlay.floor-intro #hint { animation: none; }
}
.btn {
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: background-color 0.15s, filter 0.15s, transform 0.1s;
}
.btn:disabled { opacity: 0.5; cursor: default; }
@media (hover: hover) { .btn:hover:not(:disabled) { filter: brightness(1.08); } }
.btn.is-pressed:not(:disabled) { transform: scale(0.96); filter: brightness(0.92); }
.toggle.is-pressed .switch { filter: brightness(0.92); }
.btn-primary { background: var(--head); color: var(--on-accent); font-weight: 600; }
.btn:focus-visible { outline: 3px solid var(--head); outline-offset: 2px; }
.mobile-controls {
  display: none;
  position: relative;
  justify-content: center;
  width: min(calc(100vw - 2rem), 32rem);
  touch-action: none;
  user-select: none;
}
.dpad {
  display: grid;
  grid-template-columns: repeat(3, var(--dpad-size));
  grid-template-rows: repeat(2, var(--dpad-size));
  gap: 0.75rem;
}
.dpad .btn { padding: 0; font-size: 1.5rem; transition: background-color 0.08s, transform 0.08s; }
.dpad .direction-icon { width: 1.5rem; height: 1.5rem; fill: currentColor; vertical-align: middle; }
.mobile-controls .btn.is-pressed { transform: none; }
.dpad .btn.is-pressed { background: var(--head); color: var(--on-accent); }
.dpad [data-direction="up"] { grid-column: 2; }
.mobile-controls .fire-btn {
  position: absolute;
  top: 0;
  right: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  gap: 0.2rem;
  padding: 0;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.mobile-controls .fire-btn[hidden] { display: none; }
.fire-charge { display: flex; align-items: center; gap: 0.25rem; }
.mobile-controls .fire-btn .icon {
  width: 1.35rem;
  height: 1.35rem;
  filter: drop-shadow(0 0 0.18rem rgba(0, 0, 0, 0.18));
}
.dpad [data-direction="left"] { grid-row: 2; grid-column: 1; }
.dpad [data-direction="down"] { grid-row: 2; grid-column: 2; }
.dpad [data-direction="right"] { grid-row: 2; grid-column: 3; }
@media (pointer: coarse) {
  :root {
    --dpad-size: min(4.5rem, calc((100vw - 3.5rem) / 3));
  }
  .app { gap: 0.5rem; padding-block: 0.5rem; }
  .mobile-controls { display: flex; }
}
.effects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  width: var(--board-size);
  min-height: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.effect {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.65rem;
  padding: 0.125rem 0.625rem;
  border: 1px solid color-mix(in srgb, var(--text) 7%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  font-size: 0.8125rem;
  line-height: 1;
  animation: effect-chip-in 0.24s ease both;
}
.effect .icon {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--head);
}
.effect.is-muted {
  opacity: 0.52;
}
.effect.effect-revive {
  border-color: color-mix(in srgb, var(--head) 38%, transparent);
  background: color-mix(in srgb, var(--head) 16%, var(--surface));
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--head) 8%, transparent);
}
.effect.effect-revive .icon {
  color: color-mix(in srgb, var(--head) 88%, white);
}
@keyframes effect-chip-in {
  from { opacity: 0; transform: translateY(0.2rem) scale(0.96); }
}
@media (prefers-reduced-motion: reduce) {
  .effect { animation: none; }
}
.icon { flex: none; width: 1rem; height: 1rem; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.icon-revive { --icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill-rule='evenodd'%20d='M12%202L20%205V11C20%2016%2016.5%2020.5%2012%2022C7.5%2020.5%204%2016%204%2011V5Z%20M11%208H13V11H16V13H13V16H11V13H8V11H11Z'/%3E%3C/svg%3E"); }
.icon-smash { --icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill-rule='evenodd'%20d='M3.15%2019.15L12.15%2010.15L13.85%2011.85L4.85%2020.85Z%20M20.9%2010.2L17.2%2013.9L10.1%206.8L13.8%203.1Z'/%3E%3C/svg%3E"); }

.icon-gun { --icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M4%209H12.5L14.2%207.2C14.5%206.9%2014.9%206.7%2015.3%206.7H20.3C20.7%206.7%2021%207%2021%207.4V11.6C21%2012%2020.7%2012.3%2020.3%2012.3H16.2L14.4%2014.4C14.1%2014.7%2013.7%2014.9%2013.3%2014.9H11.7L11.1%2018.1C11%2018.6%2010.6%2019%2010.1%2019H8.2C7.7%2019%207.3%2018.5%207.4%2018L7.9%2014.9H6.1C4.9%2014.9%204%2014%204%2012.8Z'/%3E%3Crect%20x='15.4'%20y='8.1'%20width='3.3'%20height='1.4'%20rx='0.4'/%3E%3C/svg%3E"); }
.icon-slow { --icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill-rule='evenodd'%20d='M2%2017C2%2012.5%205.5%209%2010%209S18%2012.5%2018%2017Z%20M20.5%2011.5A2.5%202.5%200%201%200%2020.5%2016.5A2.5%202.5%200%201%200%2020.5%2011.5Z%20M4%2018H7V21H4Z%20M12%2018H15V21H12Z'/%3E%3C/svg%3E"); }
.icon-fast { --icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill-rule='evenodd'%20d='M13%202L4%2014H10L9%2022L20%209.5H14Z'/%3E%3C/svg%3E"); }
.icon-blobs { --icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill-rule='evenodd'%20d='M12%203A9%209%200%201%200%2012%2021A9%209%200%201%200%2012%203Z%20M8.5%207.5A1.75%201.75%200%201%200%208.5%2011A1.75%201.75%200%201%200%208.5%207.5Z'/%3E%3C/svg%3E"); }
.icon-bonus { --icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill-rule='evenodd'%20d='M12%202A10%2010%200%201%200%2012%2022A10%2010%200%201%200%2012%202Z%20M12%206A6%206%200%201%201%2012%2018A6%206%200%201%201%2012%206Z%20M12%2010.5A1.5%201.5%200%201%200%2012%2013.5A1.5%201.5%200%201%200%2012%2010.5Z'/%3E%3C/svg%3E"); }
.icon-quota { --icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill-rule='evenodd'%20d='M5%203H7V21H5Z%20M7%204H19L16%208.5L19%2013H7Z'/%3E%3C/svg%3E"); }
.icon-walls { --icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill-rule='evenodd'%20d='M2%203H11V8H2Z%20M13%203H22V8H13Z%20M2%2010H6V15H2Z%20M8%2010H16V15H8Z%20M18%2010H22V15H18Z%20M2%2017H11V22H2Z%20M13%2017H22V22H13Z'/%3E%3C/svg%3E"); }
.icon-choices { --icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill-rule='evenodd'%20d='M3%205C6%203.8%209%203.8%2011.2%205V18.5C9%2017.3%206%2017.3%203%2018.5Z%20M12.8%205C15%203.8%2018%203.8%2021%205V18.5C18%2017.3%2015%2017.3%2012.8%2018.5Z'/%3E%3C/svg%3E"); }
.icon-lean { --icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill-rule='evenodd'%20d='M2%2012C6%205%2015%204%2022%2012C15%2020%206%2019%202%2012Z'/%3E%3C/svg%3E"); }
/* SNEK_MENU_V6 */
.menu {
  --cell: 2.25rem;
  --rule: color-mix(in srgb, var(--text) 16%, transparent);
  --edge: color-mix(in srgb, var(--text) 26%, transparent);
  --play-edge: color-mix(in srgb, var(--head) 55%, #000);
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  padding:
    calc(1.5rem + env(safe-area-inset-top, 0px))
    calc(1.5rem + env(safe-area-inset-right, 0px))
    calc(1.25rem + env(safe-area-inset-bottom, 0px))
    calc(1.5rem + env(safe-area-inset-left, 0px));
  background: var(--bg);
  animation: menu-in 0.5s ease backwards;
}
.menu[hidden] { display: none; }
.menu::before {
  content: "";
  position: fixed;
  inset: calc(var(--cell) * -1);
  background:
    linear-gradient(color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px) 0 0 / var(--cell) var(--cell),
    linear-gradient(90deg, color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px) 0 0 / var(--cell) var(--cell);
  pointer-events: none;
  animation: menu-drift 9s linear infinite;
}
.menu-content {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  margin-block: auto;
}
.menu h1 {
  display: flex;
  margin: 0;
  font-size: clamp(4rem, 21vw, 6.5rem);
  font-weight: 780;
  line-height: 0.9;
  letter-spacing: -0.06em;
}
.menu h1 span {
  display: inline-block;
  animation:
    menu-drop 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) backwards,
    menu-wave 7s ease-in-out infinite;
  animation-delay: calc(var(--i) * 80ms), calc(1.6s + var(--i) * 110ms);
}
.menu-tagline {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}
.menu-rise {
  animation: menu-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--d, 0) * 1ms);
}
.menu-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.menu-stats {
  display: flex;
  margin: 1.75rem 0 0;
  padding: 1rem 0;
  border-block: 1px solid var(--rule);
}
.menu-stat { flex: 1; margin: 0; }
.menu-stat + .menu-stat { padding-left: 1.25rem; border-left: 1px solid var(--rule); }
.menu-stat dt {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.8125rem;
}
.menu-stat dd { margin: 0.25rem 0 0; }
.menu-count {
  display: block;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.menu-blob-dot {
  width: 0.65em;
  height: 0.65em;
  margin-right: 0.45em;
  border-radius: 50%;
  background: var(--food);
  animation: menu-pulse 2.2s ease-in-out infinite;
}
.menu-play.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 5rem;
  margin-top: 1.5rem;
  padding: 0 1.5rem;
  border: 2px solid var(--play-edge);
  border-radius: 1rem;
  background: var(--head);
  color: var(--on-accent);
  box-shadow: 0 6px 0 var(--play-edge);
  text-align: left;
  transition: transform 0.12s, box-shadow 0.12s, filter 0.15s;
  animation: menu-pop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 650ms backwards;
}
@media (hover: hover) {
  .menu-play.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 0 var(--play-edge); }
}
.menu-play.btn.is-pressed:not(:disabled) {
  transform: translateY(5px);
  box-shadow: 0 1px 0 var(--play-edge);
  filter: none;
}
.menu-play.btn:focus-visible { outline: 2px solid color-mix(in srgb, var(--text) 65%, transparent); outline-offset: 5px; }
.menu-play-copy { display: flex; flex-direction: column; gap: 0.125rem; }
.menu-play-copy > :first-child { font-size: 1.5rem; font-weight: 750; line-height: 1.1; }
.menu-play-subtitle { font-size: 0.8125rem; opacity: 0.8; }
.menu-play-arrow {
  width: 1.75rem;
  height: 1.75rem;
  animation: menu-nudge 2.4s ease-in-out 1.6s infinite;
}
.menu-run { display: none; position: absolute; inset: 0; pointer-events: none; }
@supports (offset-path: inset(0 round 1px)) {
  .menu-run { display: block; }
}
.menu-run i {
  --n: 7;
  position: absolute;
  top: 0;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 0.15rem;
  background: var(--on-accent);
  opacity: calc(1 - var(--i) * 0.11);
  offset-path: inset(0.55rem round 0.6rem);
  offset-anchor: center;
  offset-rotate: 0deg;
  animation: menu-run 8s linear infinite;
  animation-delay: calc((var(--n) - var(--i)) * -0.11s);
}
.menu-run i:first-child { width: 0.7rem; height: 0.7rem; background: var(--food); opacity: 1; }
.menu-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
  margin-top: 1.5rem;
}
.menu-tile.btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 5.25rem;
  padding: 0.75rem 0.5rem;
  border: 2px solid var(--edge);
  border-radius: 0.875rem;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 0 var(--edge);
  font-size: 0.9375rem;
  font-weight: 640;
  transition: transform 0.12s, box-shadow 0.12s, background-color 0.15s;
}
.menu-tile svg {
  width: 1.6rem;
  height: 1.6rem;
  color: var(--head);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@media (hover: hover) {
  .menu-tile.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 0 var(--edge); }
  .menu-tile.btn:hover svg { transform: rotate(-10deg) scale(1.15); }
}
.menu-tile.btn.is-pressed:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--edge);
  filter: none;
}
.menu-tile.btn:focus-visible { outline: 3px solid var(--head); outline-offset: 3px; }
.menu-links { display: grid; gap: 0.625rem; margin-top: 1rem; }
.menu-wide.btn {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 0.875rem;
  width: 100%;
  min-height: 4.25rem;
  padding: 0.625rem 1rem;
  border: 2px solid var(--edge);
  border-radius: 0.875rem;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 0 var(--edge);
  text-align: left;
  transition: transform 0.12s, box-shadow 0.12s, background-color 0.15s;
}
.menu-wide[hidden] { display: none; }
.menu-wide-owner.btn { border-style: dashed; }
.menu-wide svg {
  width: 1.6rem;
  height: 1.6rem;
  color: var(--head);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.menu-wide-copy { display: flex; flex-direction: column; min-width: 0; font-size: 1rem; font-weight: 640; }
.menu-wide-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (hover: hover) {
  .menu-wide.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 0 var(--edge); }
  .menu-wide.btn:hover svg { transform: rotate(-10deg) scale(1.15); }
}
.menu-wide.btn.is-pressed:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--edge);
  filter: none;
}
.menu-wide.btn:focus-visible { outline: 3px solid var(--head); outline-offset: 3px; }
.menu-footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  width: min(100%, 28rem);
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
}
.menu-version { font-variant-numeric: tabular-nums; }
.menu-changelog.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0 0.625rem;
  border: 2px solid var(--edge);
  border-radius: 0.625rem;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 3px 0 var(--edge);
  font-size: 0.8125rem;
  font-weight: 640;
  white-space: nowrap;
  transition: transform 0.12s, box-shadow 0.12s, background-color 0.15s;
}
.menu-changelog svg { width: 1rem; height: 1rem; color: var(--head); }
@media (hover: hover) {
  .menu-changelog.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 0 var(--edge); }
}
.menu-changelog.btn.is-pressed:not(:disabled) { transform: translateY(3px); box-shadow: none; filter: none; }
@media (prefers-reduced-motion: reduce) {
  .menu-changelog.btn { transition: none; }
}
@media (max-height: 700px) {
  .menu h1 { font-size: 4rem; }
  .menu-stats { margin-top: 1rem; padding: 0.75rem 0; }
  .menu-play.btn { margin-top: 1rem; min-height: 4.25rem; }
  .menu-tiles { margin-top: 1rem; }
}
@keyframes menu-drift { to { transform: translate(var(--cell), var(--cell)); } }
@keyframes menu-drop { from { opacity: 0; transform: translateY(-0.7em) rotate(-8deg) scale(0.9); } }
@keyframes menu-wave {
  0%, 30%, 100% { transform: translateY(0); }
  10% { transform: translateY(-0.11em); }
  20% { transform: translateY(0.04em); }
}
@keyframes menu-rise { from { opacity: 0; transform: translateY(1rem); } }
@keyframes menu-pop { from { opacity: 0; transform: scale(0.9) translateY(0.75rem); } }
@keyframes menu-pulse { 50% { transform: scale(1.3); } }
@keyframes menu-nudge { 0%, 55%, 100% { transform: translateX(0); } 25% { transform: translateX(0.4rem); } }
@keyframes menu-run { to { offset-distance: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .menu::before, .menu *, .menu *::before { animation: none !important; }
  .menu-run { display: none; }
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  padding: 0.625rem 1rem;
  border-radius: 999px;
  background: var(--head);
  color: var(--on-accent);
  font-size: 0.9rem;
  transform: translateX(-50%);
}
.toast[hidden] { display: none; }
.panel#themes { box-sizing: border-box; }
.theme-heading {
  margin: 1rem 0 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.theme-heading:first-of-type { margin-top: 0; }
.theme-options { display: flex; flex-direction: column; gap: 0.5rem; }
.theme-options .btn { width: 100%; }
.theme-options .btn[aria-pressed="true"] { background: var(--head); color: var(--on-accent); font-weight: 600; }

.skin-options {
  display: grid;
  gap: 0.5rem;
}
.skin-option.btn {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  text-align: left;
}
.skin-option[aria-pressed="true"] {
  box-shadow: inset 0 0 0 2px var(--head);
}
.skin-option[hidden] {
  display: none;
}
.skin-swatch {
  width: 3.5rem;
  height: 1.6rem;
  border-radius: 999px;
}
.skin-swatch-default {
  background: linear-gradient(90deg, var(--snake), var(--head));
}
.skin-swatch-galaxy {
  background:
    radial-gradient(circle at 22% 30%, #e5efff 0 0.5px, transparent 1px),
    radial-gradient(circle at 72% 65%, #fff0d8 0 0.7px, transparent 1.2px),
    radial-gradient(circle at 46% 72%, #cfdbff 0 0.4px, transparent 0.9px),
    radial-gradient(ellipse at 44% 52%, #eee0d5 0%, #9b8dbb 9%, transparent 35%),
    radial-gradient(ellipse at 70% 30%, #714782 0%, transparent 45%),
    radial-gradient(ellipse at 22% 65%, #344d98 0%, transparent 45%),
    linear-gradient(110deg, #080d24, #1b204c, #241237, #090f2c);
  background-size: 180% 140%;
  box-shadow: 0 0 0.6rem rgb(128 115 220 / 0.3);
  animation: galaxy-swatch-scroll 8s ease-in-out infinite alternate;
}
.skin-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
@keyframes galaxy-swatch-scroll {
  to { background-position: 100% 65%; }
}
@media (prefers-reduced-motion: reduce) {
  .skin-swatch-galaxy { animation: none; }
}
.credit {
  position: absolute;
  right: calc(1.5rem + env(safe-area-inset-right, 0px));
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.375rem;
  color: var(--muted);
  font-size: 0.875rem;
}
.version {
  position: absolute;
  left: calc(1.5rem + env(safe-area-inset-left, 0px));
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(0.75rem); } }
@media (prefers-reduced-motion: reduce) { .menu { animation: none; } }
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr 2.75rem;
  gap: 0.25rem;
  width: 100%;
}
.actions .btn {
  min-width: 0;
  min-height: 2.65rem;
  padding: 0 0.45rem;
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  font-size: 0.9rem;
  font-weight: 620;
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 3%, transparent);
}
.actions #pause:not(:disabled) {
  border-color: color-mix(in srgb, var(--head) 26%, transparent);
  background: color-mix(in srgb, var(--head) 10%, var(--surface));
}
.actions #open-shop {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}
.icon-btn {
  width: auto;
  padding: 0;
  font-size: 1.2rem;
}
.panel {
  width: min(22rem, calc(100vw - 2rem));
  padding: 1.5rem;
  border: 0;
  border-radius: 1rem;
  background: var(--bg);
  color: var(--text);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
}
.panel::backdrop { background: rgb(0 0 0 / 0.45); }
.panel h2 { margin: 0 0 1rem; font-size: 1.25rem; }
.panel > .btn { width: 100%; margin-top: 1.25rem; }
.changelog-panel { box-sizing: border-box; max-height: min(36rem, calc(100dvh - 2rem)); overflow: hidden; }
.changelog-panel[open] { display: flex; flex-direction: column; gap: 1rem; }
.changelog-header { flex: none; }
.changelog-header h2 { margin-bottom: 0.25rem; }
.changelog-history {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.125rem 0.5rem 0.125rem 0.125rem;
}
.changelog-history:focus-visible { outline: 2px solid var(--head); outline-offset: 2px; border-radius: 0.5rem; }
.changelog-entry + .changelog-entry {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
}
.changelog-entry h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.changelog-entry ul { margin: 0; padding-left: 1.1rem; font-size: 0.875rem; line-height: 1.55; }
.changelog-entry li + li { margin-top: 0.35rem; }
.changelog-latest {
  padding: 0.125rem 0.5rem;
  border: 1px solid color-mix(in srgb, var(--head) 30%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--head) 10%, transparent);
  color: var(--head);
  font-size: 0.6875rem;
  font-weight: 600;
}
.changelog-panel > .btn { flex: none; margin-top: 0; }
.balance { margin: 0 0 1rem; color: var(--muted); }
.items {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--text) 9%, transparent);
  border-radius: 0.875rem;
  background: color-mix(in srgb, var(--surface) 42%, transparent);
  transition: border-color 0.18s, background-color 0.18s, transform 0.18s;
}
.item > .badge {
  width: 2.75rem;
  height: 2.75rem;
  background: color-mix(in srgb, var(--board) 82%, var(--surface));
}
.item .btn {
  flex: none;
  min-width: 7.25rem;
}
.item-details {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}
.item-details > strong {
  font-size: 0.975rem;
}
.item-details > .label:last-child {
  width: max-content;
  margin-top: 0.3rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--head) 11%, transparent);
  color: var(--head);
  font-size: 0.72rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 25rem) {
  .item {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .item .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}
.item.is-purchased {
  animation: shop-purchase-card 0.46s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.item.is-purchased > .badge {
  animation: shop-purchase-icon 0.46s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.item.is-purchased .item-details > .label:last-child {
  animation: shop-owned-pulse 0.46s ease;
}
@keyframes shop-purchase-card {
  35% {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--head) 48%, transparent);
    background: color-mix(in srgb, var(--head) 10%, var(--surface));
  }
}
@keyframes shop-purchase-icon {
  45% { transform: scale(1.16) rotate(-6deg); }
}
@keyframes shop-owned-pulse {
  45% {
    transform: scale(1.1);
    background: color-mix(in srgb, var(--head) 24%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .item.is-purchased,
  .item.is-purchased > .badge,
  .item.is-purchased .item-details > .label:last-child {
    animation: none;
  }
}
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; }
.toggle-text { display: flex; flex-direction: column; }
.switch:disabled { opacity: 0.5; cursor: default; }
.toggle + .toggle { margin-top: 1rem; }
.switch {
  appearance: none;
  flex: none;
  position: relative;
  width: 3rem;
  height: 1.75rem;
  margin: 0;
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  transition: background-color 0.15s;
}
.switch::before {
  content: "";
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.15s, background-color 0.15s;
}
.switch:checked { background: var(--head); }
.switch:checked::before { background: var(--on-accent); transform: translateX(1.25rem); }
.switch:focus-visible { outline: 3px solid var(--head); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .btn, .dpad .btn, .switch, .switch::before { transition: none; } }

/* SNEK_DEVTOOLS_V1 */
.dev-banner {
  position: fixed;
  top: calc(0.5rem + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 30;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--head);
  border-radius: 0.35rem;
  background: var(--bg);
  color: var(--head);
  font: 700 0.75rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
  transform: translateX(-50%);
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.24);
}
.dev-banner[hidden] { display: none; }
.dev-panel {
  width: min(34rem, calc(100vw - 1rem));
  padding: 0.75rem;
  border: 1px solid var(--muted);
  border-radius: 0.45rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.dev-panel h2 { margin: 0; font-size: 1rem; }
.dev-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: -0.25rem -0.25rem 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.3rem;
  background: var(--surface);
}
.dev-owner {
  flex: none;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--head);
  border-radius: 0.25rem;
  color: var(--head);
  font-size: 0.7rem;
  font-weight: 700;
}
.dev-note {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
}
.dev-section {
  margin: 0.5rem 0;
  border: 1px solid var(--surface);
  border-radius: 0.35rem;
  background: color-mix(in srgb, var(--surface) 35%, transparent);
}
.dev-section > summary {
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  font-weight: 700;
}
.dev-section-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0 0.65rem 0.7rem;
}
.dev-field {
  display: grid;
  grid-template-columns: minmax(6rem, 1fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 0.65rem;
  font-size: 0.8rem;
}
.dev-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--muted);
  border-radius: 0.3rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.dev-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
}
.dev-mini {
  min-height: 2.35rem;
  padding: 0 0.7rem;
  border-radius: 0.3rem;
  font-family: inherit;
}
.dev-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2rem;
  font-size: 0.8rem;
}
.dev-check input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--head);
}
.dev-player-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
}
.dev-player-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem;
  border: 1px solid var(--surface);
  border-radius: 0.3rem;
  background: var(--surface);
}
.dev-player-stat strong {
  color: var(--head);
  font-size: 1.25rem;
}
.dev-player-stat span {
  color: var(--muted);
  font-size: 0.7rem;
}

.dev-warning {
  margin: 0.65rem 0;
  padding: 0.6rem;
  border-left: 3px solid var(--head);
  background: var(--surface);
  font-size: 0.75rem;
}
.dev-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.dev-actions .btn {
  margin: 0;
  border-radius: 0.3rem;
}

/* SNEK_REPLAY_INSPECTOR_V1 */
.dev-replay-select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--muted);
  border-radius: 0.3rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.dev-replay-output {
  min-height: 7rem;
  max-height: 18rem;
  margin: 0;
  padding: 0.65rem;
  overflow: auto;
  border: 1px solid var(--surface);
  border-radius: 0.3rem;
  background: var(--surface);
  color: var(--text);
  font: 0.72rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.dev-replay-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.dev-replay-buttons .btn {
  min-height: 2.35rem;
  border-radius: 0.3rem;
  font-family: inherit;
}
.dev-test-button {
  width: 100%;
  min-height: 2.55rem;
  margin: 0;
  border-radius: 0.3rem;
  font-family: inherit;
}

/* SNEK_REPLAY_PLAYBACK_V1 */
.dev-playback-button {
  width: 100%;
  min-height: 2.6rem;
  border-radius: 0.3rem;
  font-family: inherit;
}
.dev-playback-panel {
  width: min(38rem, calc(100vw - 0.75rem));
  max-height: calc(100dvh - 0.75rem);
  padding: 0.75rem;
  border: 1px solid var(--muted);
  border-radius: 0.45rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.dev-playback-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}
.dev-playback-stat {
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--surface);
  border-radius: 0.3rem;
  background: var(--surface);
  text-align: center;
}
.dev-playback-stat strong,
.dev-playback-stat span {
  display: block;
}
.dev-playback-stat span {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.68rem;
}
.dev-playback-canvas {
  display: block;
  width: min(100%, 32rem);
  aspect-ratio: 1;
  margin: 0 auto 0.6rem;
  border-radius: 0.45rem;
  background: var(--board);
  touch-action: none;
}
.dev-playback-message {
  min-height: 1.3rem;
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}
.dev-playback-seek {
  width: 100%;
  margin: 0 0 0.6rem;
  accent-color: var(--head);
}
.dev-playback-controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
}
.dev-playback-controls .btn {
  min-height: 2.5rem;
  padding: 0 0.35rem;
  border-radius: 0.3rem;
  font-family: inherit;
  font-size: 0.78rem;
}
.dev-playback-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  margin-top: 0.6rem;
}
.dev-playback-speed {
  width: 100%;
  min-height: 2.5rem;
  padding: 0 0.5rem;
  border: 1px solid var(--muted);
  border-radius: 0.3rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.dev-playback-footer .btn {
  min-height: 2.5rem;
  border-radius: 0.3rem;
  font-family: inherit;
}
