@font-face {
  font-family: 'Zpix';
  src: url('/zpix.ttf') format('truetype');
  font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; scrollbar-color: var(--accent) #000; scrollbar-width: thin; }

:root {
  --bg: #000;
  --fg: #ffebcd;
  --muted: #d4b99c;
  --accent: #DC7B59;
  --pink: plum;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 80% 10%, rgba(90, 187, 154, 0.16), transparent 28%), var(--bg);
  color: var(--fg);
  font-family: 'Zpix', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
  width: 14px;
  height: 14px;
  border-radius: 0;
}
::-webkit-scrollbar-track {
  background: #000;
  border-radius: 0;
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border: 2px solid #000;
  box-shadow: inset 0 0 0 2px var(--fg);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover { background: var(--pink); }
::-webkit-scrollbar-button,
::-webkit-scrollbar-track-piece,
::-webkit-scrollbar-corner {
  background: #000;
  border-radius: 0;
}

.App { min-height: 100vh; text-align: left; font-size: 19px; }

.terminal-container {
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  padding: 20px clamp(24px, 4vw, 56px);
  padding-bottom: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  position: relative;
  z-index: 1;
}

.terminal-container::-webkit-scrollbar {
  display: none;
}

.pixel-scrollbar {
  position: fixed;
  top: 8px;
  right: 8px;
  bottom: 8px;
  width: 14px;
  background: transparent;
  z-index: 5;
  touch-action: none;
}

.pixel-scrollbar-thumb {
  width: 100%;
  min-height: 28px;
  background: var(--accent);
  border: 2px solid #000;
  box-shadow: inset 0 0 0 2px var(--fg);
  will-change: transform;
}

.logo-turtle {
  position: fixed;
  bottom: 16px;
  right: 18px;
  width: 118px;
  color: var(--accent);
  opacity: 0.9;
  cursor: pointer;
  z-index: 2;
  overflow: visible;
}

.logo-turtle.is-patrolling {
  animation: catPatrol var(--cat-walk-duration, 14s) linear infinite alternate;
}

.logo-turtle.is-typing .logo-turtle-art {
  animation: none;
}

.logo-turtle.is-password-entry .logo-turtle-art {
  animation: none;
}

.logo-turtle.is-typing .pixel-cat-figure,
.logo-turtle.is-password-entry .pixel-cat-figure {
  animation: catBodyTyping 260ms steps(2) infinite;
}

.logo-turtle.is-patrolling.is-typing {
  animation-play-state: paused;
}

.logo-turtle.is-patrolling.is-password-entry {
  animation-play-state: paused;
}

.logo-turtle.is-patrolling.is-loved {
  animation-play-state: paused;
}

.logo-turtle.is-patrolling.is-dancing {
  animation-play-state: paused;
}

.logo-turtle.is-patrolling.is-waiting {
  animation-play-state: paused;
}

.logo-turtle.is-patrolling.is-hovered {
  animation-play-state: paused;
}

.logo-turtle.mikan-hidden {
  opacity: 0;
  pointer-events: none;
}

.logo-turtle.is-typing .pixel-cat-tail {
  animation-duration: 180ms;
}

.logo-turtle.is-password-entry .pixel-cat-tail {
  animation-duration: 180ms;
}

.logo-turtle.is-dancing .logo-turtle-art {
  animation: catDanceHop 360ms steps(2) infinite;
}

.logo-turtle.is-dancing .pixel-cat-figure {
  animation: catDanceBody 360ms steps(2) infinite;
}

.logo-turtle.is-dancing .pixel-cat-tail {
  animation: catDanceTail 180ms steps(2) infinite;
}

.logo-turtle.is-dancing .pixel-cat-legs-front {
  animation: catDanceFrontStep 360ms steps(2) infinite;
}

.logo-turtle.is-dancing .pixel-cat-legs-back {
  animation: catDanceBackStep 360ms steps(2) infinite;
}

.mikan-cat.is-loved .logo-turtle-art {
  animation: mikanCatHappyHop 520ms steps(4) both;
}

.mikan-cat.is-loved .pixel-cat-figure {
  animation: mikanCatHappyBody 260ms steps(2) infinite;
}

.mikan-cat.is-loved .pixel-cat-tail {
  animation: mikanCatHappyTail 130ms steps(2) infinite;
}

.mikan-cat.is-loved::after {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  width: 16px;
  height: 16px;
  background: #f28c28;
  border-radius: 50%;
  box-shadow: -4px 6px 0 #c85d1f, 3px -4px 0 #ffd27a, 6px -8px 0 -2px #65b96f;
  pointer-events: none;
  transform: translateX(-50%);
  animation: mikanCatchPop 520ms steps(5) forwards;
}

.logo-turtle.is-waiting .logo-turtle-art {
  animation: catWaitingWobble 520ms ease-in-out infinite;
}

.logo-turtle.is-waiting .pixel-cat-tail {
  animation-duration: 240ms;
}

.logo-turtle.is-typing .pixel-cat-legs-front,
.logo-turtle.is-typing .pixel-cat-legs-back,
.logo-turtle.is-password-entry .pixel-cat-legs-front,
.logo-turtle.is-password-entry .pixel-cat-legs-back {
  animation-play-state: paused;
}

#output,
.command-area {
  position: relative;
  z-index: 1;
}

.logo-turtle-art {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 14px rgba(220, 123, 89, 0.26));
  animation: turtleBob 2.2s steps(2) infinite;
  shape-rendering: crispEdges;
}

.pixel-cat-scene {
  transform-box: fill-box;
  transform-origin: center;
}

.pixel-cat-figure {
  transform-box: fill-box;
  transform-origin: center;
}

.logo-turtle.is-facing-right .pixel-cat-scene {
  transform: scaleX(-1);
}

.pixel-cat-body,
.pixel-cat-tail,
.pixel-cat-legs {
  fill: #d06f4e;
}

.pixel-cat-laptop {
  opacity: 0;
}

.logo-turtle.is-typing .pixel-cat-laptop {
  opacity: 1;
}

.logo-turtle.is-password-entry .pixel-cat-laptop {
  opacity: 1;
}

.pixel-cat-laptop-frame { fill: #ffebcd; }
.pixel-cat-laptop-screen { fill: #1f1714; }
.pixel-cat-laptop-keyboard { fill: #ffebcd; }
.pixel-cat-laptop-glow { fill: #dc7b59; }

.logo-turtle.is-typing .pixel-cat-laptop-glow {
  animation: laptopGlow 260ms steps(2) infinite;
}

.logo-turtle.is-password-entry .pixel-cat-laptop-glow {
  animation: laptopGlow 260ms steps(2) infinite;
}

.logo-turtle.is-hovered:not(.is-typing) .pixel-cat-legs-front,
.logo-turtle.is-hovered:not(.is-typing) .pixel-cat-legs-back,
.logo-turtle.is-loved:not(.is-typing):not(.mikan-cat) .pixel-cat-legs-front,
.logo-turtle.is-loved:not(.is-typing):not(.mikan-cat) .pixel-cat-legs-back {
  animation-play-state: paused;
}

.pixel-cat-tail {
  transform-box: fill-box;
  transform-origin: left center;
  animation: catTailWag 1.4s steps(2) infinite;
}

.pixel-cat-legs-front {
  animation: catFrontStep 1.8s steps(2) infinite;
}

.pixel-cat-legs-back {
  animation: catBackStep 1.8s steps(2) infinite;
}

.pixel-cat-eyes {
  transform-box: fill-box;
  transform-origin: center;
}

.pixel-cat-eye { fill: #ffebcd; }

.pixel-cat-blink {
  fill: #d06f4e;
  visibility: hidden;
  animation: catBlink 3.6s steps(1) infinite;
}

.pixel-cat-cover {
  display: none;
  fill: #d06f4e;
}

.pixel-heart {
  position: absolute;
  width: 18px;
  height: 18px;
  color: #ff8a8a;
  pointer-events: none;
  z-index: 3;
  animation: pixelHeartFloat 1.15s steps(6) forwards;
}

.pixel-heart svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
  shape-rendering: crispEdges;
}

.mikan-game {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.12));
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

.mikan-scoreboard,
.mikan-hint {
  position: fixed;
  right: clamp(28px, 4vw, 56px);
  border: 2px solid var(--fg);
  background: #000;
  color: var(--fg);
  box-shadow: -6px 6px 0 var(--accent);
}

.mikan-scoreboard {
  top: 14px;
  padding: 8px 12px;
  color: #ffd27a;
}

.mikan-score {
  color: var(--accent);
}

.mikan-hint {
  top: 64px;
  max-width: min(520px, calc(100vw - 28px));
  padding: 6px 10px;
  color: var(--muted);
  font-size: 0.84em;
  text-align: right;
}

.mikan-fruit {
  position: fixed;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 0 10px rgba(255, 149, 45, 0.42));
  will-change: transform;
}

.mikan-fruit svg {
  display: block;
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}

.pixel-mikan-body { fill: #f28c28; }
.pixel-mikan-shade { fill: #c85d1f; }
.pixel-mikan-spark { fill: #ffd27a; }
.pixel-mikan-leaf { fill: #65b96f; }

.mikan-cat {
  top: auto;
  right: auto;
  bottom: 24px;
  left: 0;
  width: 128px;
  opacity: 1;
  z-index: 21;
  cursor: default;
  will-change: transform;
}

.mikan-cat .logo-turtle-art {
  filter: drop-shadow(0 0 18px rgba(220, 123, 89, 0.46));
  image-rendering: pixelated;
}

.logo-turtle.is-typing .pixel-cat-eyes {
  animation: none;
}

.logo-turtle.is-typing:not(.is-covering-eyes) .pixel-cat-eye {
  animation: none;
  fill: #ffebcd;
}

.logo-turtle.is-typing:not(.is-covering-eyes) .pixel-cat-blink {
  animation: none;
  visibility: hidden;
}

.logo-turtle.is-covering-eyes .pixel-cat-figure {
  display: none;
}

.logo-turtle.is-covering-eyes .pixel-cat-cover {
  display: block;
}

#output > div:not(:first-child), .command-input { margin-top: 20px; }

.command-area {
  padding: 8px 0 24px;
}

.command-input { display: flex; align-items: center; gap: 8px; }
.ownerTerminal, .command-link { color: var(--accent); }
.command-link { cursor: pointer; text-decoration: none; }
.command-field {
  flex: 1;
  min-width: 0;
  height: 30px;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--fg);
  caret-color: var(--fg);
  font: inherit;
}

.suggestions-container {
  max-width: 860px;
  max-height: var(--suggestions-height, 520px);
  margin-top: 10px;
  border-top: 1px solid rgba(255, 235, 205, 0.28);
  border-bottom: 1px solid rgba(255, 235, 205, 0.28);
  padding: 8px 0;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 260ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease-out, transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), padding 260ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 180ms ease-out, margin-top 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.suggestions-container.suggestions-collapsed {
  max-height: 0;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}
.suggestions-container.suggestions-reserved {
  visibility: hidden;
  pointer-events: none;
}

.suggestions-container::after {
  content: '';
  display: block;
  height: 14px;
}

.suggestion-item {
  display: grid;
  grid-template-columns: minmax(160px, 260px) 1fr;
  gap: 18px;
  padding: 3px 0;
  color: var(--muted);
}

.suggestion-command { color: var(--fg); }
.suggestion-item.selected .suggestion-command { color: var(--accent); font-weight: 800; }
.suggestion-item.selected .suggestion-description { color: var(--fg); }

pre { white-space: pre-wrap; color: var(--accent); line-height: 1.2; }
#terminal-title {
  display: inline-block;
  max-width: 100%;
  font-size: clamp(12px, 3.7vw, 19px);
  line-height: 1.15;
  white-space: pre;
}
.line { line-height: 1.55; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.ok { color: var(--accent); }
.warn { color: #ffcc66; }
.error { color: #ff8a8a; }
.mikan-currency {
  display: inline-flex;
  width: 1em;
  height: 1em;
  margin-right: 0.18em;
  vertical-align: -0.12em;
}
.mikan-currency svg {
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}
.mikan-currency .pixel-mikan-body { fill: #f28c28; }
.mikan-currency .pixel-mikan-shade { fill: #c85d1f; }
.mikan-currency .pixel-mikan-spark { fill: #ffd27a; }
.mikan-currency .pixel-mikan-leaf { fill: #65b96f; }
.mikan-price-icons {
  position: relative;
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.22em;
  vertical-align: -0.12em;
}
.mikan-price-fruit {
  position: absolute;
  width: 0.95em;
  height: 0.95em;
}
.mikan-price-fruit svg {
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}
.mikan-price-fruit .pixel-mikan-body { fill: #f28c28; }
.mikan-price-fruit .pixel-mikan-shade { fill: #c85d1f; }
.mikan-price-fruit .pixel-mikan-spark { fill: #ffd27a; }
.mikan-price-fruit .pixel-mikan-leaf { fill: #65b96f; }
.mikan-price-fruit:nth-child(2n) .pixel-mikan-body { fill: #ff9d2e; }
.mikan-price-fruit:nth-child(2n) .pixel-mikan-shade { fill: #d86a22; }
.mikan-price-fruit:nth-child(3n) .pixel-mikan-body { fill: #e97822; }
.mikan-price-fruit:nth-child(3n) .pixel-mikan-spark { fill: #ffe08a; }
.mikan-price-fruit:nth-child(4n) .pixel-mikan-leaf { fill: #4fa65a; }
.mikan-price-icons.is-single .mikan-price-fruit-1 { left: 0; top: 0; }
.mikan-price-icons.is-count {
  width: 2.45em;
  height: 1.65em;
  vertical-align: -0.38em;
}
.mikan-price-icons.is-count .mikan-price-fruit { width: 0.78em; height: 0.78em; }
.mikan-price-icons.is-count .mikan-price-fruit-1 { left: 0; top: 0.78em; }
.mikan-price-icons.is-count .mikan-price-fruit-2 { left: 0.48em; top: 0.78em; }
.mikan-price-icons.is-count .mikan-price-fruit-3 { left: 0.96em; top: 0.78em; }
.mikan-price-icons.is-count .mikan-price-fruit-4 { left: 1.44em; top: 0.78em; }
.mikan-price-icons.is-count .mikan-price-fruit-5 { left: 0.24em; top: 0.38em; }
.mikan-price-icons.is-count .mikan-price-fruit-6 { left: 0.72em; top: 0.38em; }
.mikan-price-icons.is-count .mikan-price-fruit-7 { left: 1.2em; top: 0.38em; }
.mikan-price-icons.is-count .mikan-price-fruit-8 { left: 0.48em; top: -0.02em; }
.mikan-price-icons.is-count .mikan-price-fruit-9 { left: 0.96em; top: -0.02em; }
.mikan-price-icons.is-count.has-1 { width: 0.9em; }
.mikan-price-icons.is-count.has-2 { width: 1.35em; }
.mikan-price-icons.is-count.has-3,
.mikan-price-icons.is-count.has-5 { width: 1.8em; }
.mikan-price-unit {
  position: absolute;
  display: block;
}
.mikan-price-unit svg {
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}
.mikan-price-unit .pixel-crate-fruit,
.mikan-price-unit .pixel-cart-fruit { fill: #f28c28; }
.mikan-price-unit .pixel-crate-leaf { fill: #65b96f; }
.mikan-price-unit .pixel-crate-box { fill: #b86b3d; }
.mikan-price-unit .pixel-crate-line { fill: #6f3f28; }
.mikan-price-unit .pixel-cart-bed { fill: #7fb3d5; }
.mikan-price-unit .pixel-cart-handle { fill: #d4b99c; }
.mikan-price-unit .pixel-cart-wheel { fill: #2f2f2f; }
.mikan-price-icons.is-crate {
  width: 3.25em;
  height: 2em;
  vertical-align: -0.5em;
}
.mikan-price-icons.is-crate .mikan-price-unit { width: 1.25em; height: 0.9em; }
.mikan-price-icons.is-crate .mikan-price-unit-1 { left: 0; top: 1em; }
.mikan-price-icons.is-crate .mikan-price-unit-2 { left: 1em; top: 1em; }
.mikan-price-icons.is-crate .mikan-price-unit-3 { left: 2em; top: 1em; }
.mikan-price-icons.is-crate .mikan-price-unit-4 { left: 0.5em; top: 0.48em; }
.mikan-price-icons.is-crate .mikan-price-unit-5 { left: 1.5em; top: 0.48em; }
.mikan-price-icons.is-crate .mikan-price-unit-6 { left: 1em; top: -0.04em; }
.mikan-price-icons.is-crate .mikan-price-unit-7 { left: 0; top: -0.04em; transform: scale(0.9); }
.mikan-price-icons.is-crate .mikan-price-unit-8 { left: 2em; top: -0.04em; transform: scale(0.9); }
.mikan-price-icons.is-crate .mikan-price-unit-9 { left: 1em; top: -0.54em; transform: scale(0.82); }
.mikan-price-icons.is-cart {
  width: 3.6em;
  height: 1.8em;
  vertical-align: -0.5em;
}
.mikan-price-icons.is-cart .mikan-price-unit { width: 1.7em; height: 1.1em; }
.mikan-price-icons.is-cart .mikan-price-unit-1 { left: 0; top: 0.66em; }
.mikan-price-icons.is-cart .mikan-price-unit-2 { left: 1.18em; top: 0.42em; }
.mikan-price-icons.is-cart .mikan-price-unit-3 { left: 0.62em; top: -0.02em; transform: scale(0.92); }
.mikan-price-icons.is-stack {
  width: 1.55em;
  height: 1.25em;
  vertical-align: -0.22em;
}
.mikan-price-icons.is-stack .mikan-price-fruit-1 { left: 0.08em; top: 0.36em; transform: rotate(-5deg); }
.mikan-price-icons.is-stack .mikan-price-fruit-2 { left: 0.56em; top: 0.36em; transform: rotate(5deg); }
.mikan-price-icons.is-stack .mikan-price-fruit-3 { left: 0.32em; top: -0.04em; transform: scale(0.92); }
.mikan-price-icons.is-mountain {
  width: 2.35em;
  height: 1.55em;
  vertical-align: -0.38em;
}
.mikan-price-icons.is-mountain .mikan-price-fruit { width: 0.9em; height: 0.9em; }
.mikan-price-icons.is-mountain .mikan-price-fruit-1 { left: 0; top: 0.68em; transform: rotate(-8deg); }
.mikan-price-icons.is-mountain .mikan-price-fruit-2 { left: 0.48em; top: 0.68em; transform: rotate(3deg); }
.mikan-price-icons.is-mountain .mikan-price-fruit-3 { left: 0.96em; top: 0.68em; transform: rotate(-2deg); }
.mikan-price-icons.is-mountain .mikan-price-fruit-4 { left: 1.44em; top: 0.68em; transform: rotate(8deg); }
.mikan-price-icons.is-mountain .mikan-price-fruit-5 { left: 0.32em; top: 0.28em; transform: scale(0.94) rotate(5deg); }
.mikan-price-icons.is-mountain .mikan-price-fruit-6 { left: 0.82em; top: 0.24em; transform: scale(0.94) rotate(-5deg); }
.mikan-price-icons.is-mountain .mikan-price-fruit-7 { left: 0.58em; top: -0.1em; transform: scale(0.86); }
.rgb-animation { animation: rgbAnimation 10s infinite linear; }
.spinner {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  vertical-align: -0.1em;
  animation: spinnerRotate 700ms linear infinite;
}
.spinner.is-stopped {
  animation-play-state: paused;
  opacity: 0.55;
}

.panel {
  display: inline-block;
  max-width: 920px;
  margin-top: 8px;
  padding: 16px;
  border: 2px solid var(--fg);
  background: rgba(255, 235, 205, 0.06);
  box-shadow: 10px 10px 0 var(--accent), 20px 20px 0 var(--pink);
}

.panel-title { color: var(--accent); font-weight: 800; margin-bottom: 8px; }
.panel-output-line {
  animation: panelLineIn 140ms ease-out both;
}
.panel-output-line + .panel-output-line,
.panel-output-footer {
  margin-top: 4px;
}
.price-table-wrap {
  max-width: min(100%, 86vw);
  overflow-x: auto;
  padding-bottom: 4px;
}
.price-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
.price-table th,
.price-table td {
  padding: 4px 12px 4px 0;
  text-align: left;
  vertical-align: top;
}
.price-table th {
  color: var(--accent);
  font-weight: 800;
  border-bottom: 2px solid var(--fg);
}
.price-table td {
  border-bottom: 1px solid rgba(255, 235, 205, 0.2);
}
.price-table th:first-child,
.price-table td:first-child {
  min-width: 220px;
}
.token-box { user-select: all; color: #000; background: var(--fg); padding: 10px; margin-top: 8px; overflow-wrap: anywhere; }
.copy-row { display: flex; align-items: stretch; gap: 8px; margin-top: 8px; }
.copy-row .token-box { flex: 1; margin-top: 0; }
.copy-button {
  border: 2px solid var(--fg);
  background: #000;
  color: var(--fg);
  font: inherit;
  padding: 6px 10px;
  cursor: pointer;
}
.copy-button:hover { color: #000; background: var(--accent); }
.turnstile-slot { margin-top: 10px; min-height: 65px; }
.turnstile-panel {
  position: relative;
  transform-origin: center;
  overflow: hidden;
}
.turnstile-panel::before,
.turnstile-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--fg);
  background: rgba(255, 235, 205, 0.08);
  pointer-events: none;
  opacity: 0;
}
.turnstile-panel.is-shattering {
  pointer-events: none;
  animation: turnstileShatter 760ms steps(8) forwards;
}
.turnstile-panel.is-shattering::before {
  opacity: 1;
  clip-path: polygon(0 0, 48% 0, 38% 42%, 0 54%);
  animation: turnstileShardLeft 760ms steps(8) forwards;
}
.turnstile-panel.is-shattering::after {
  opacity: 1;
  clip-path: polygon(50% 0, 100% 0, 100% 62%, 42% 44%);
  animation: turnstileShardRight 760ms steps(8) forwards;
}
.turnstile-shard {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--pink);
  box-shadow: 6px 0 0 #ffb3d9, 0 6px 0 #ffd7ea, -6px 0 0 var(--accent);
  pointer-events: none;
  opacity: 0;
  z-index: 2;
}
.turnstile-panel.is-shattering .turnstile-shard {
  animation: turnstileDust 760ms steps(8) var(--d, 0ms) forwards;
}

@keyframes rgbAnimation {
  0% { color: #ffb3ba; }
  33% { color: #baffc9; }
  66% { color: #bae1ff; }
  100% { color: #ffb3ba; }
}

@keyframes spinnerRotate {
  to { transform: rotate(360deg); }
}

@keyframes panelLineIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes turnstileShatter {
  0% { opacity: 1; transform: translate(0, 0) scale(1); filter: none; }
  24% { transform: translate(1px, -1px) scale(1.01); filter: contrast(1.2) saturate(1.2); }
  54% { opacity: 0.42; transform: translate(0, 5px) scale(0.98); filter: contrast(1.5) saturate(1.6); }
  100% { opacity: 0; transform: translate(0, 14px) scale(0.94); filter: blur(1px); }
}

@keyframes turnstileShardLeft {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  20% { opacity: 0.45; }
  100% { transform: translate(-18px, 18px) rotate(-5deg); opacity: 0; }
}

@keyframes turnstileShardRight {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  20% { opacity: 0.45; }
  100% { transform: translate(18px, 20px) rotate(5deg); opacity: 0; }
}

@keyframes turnstileDust {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.6); }
  18% { opacity: 1; }
  68% { opacity: 0.85; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 18px)) rotate(var(--r)) scale(0.45); }
}

@keyframes turtleBob {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(1px, -1px); }
}

@keyframes catTyping {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(0, 2px); }
}

@keyframes catBodyTyping {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(1px, 2px) rotate(-3deg); }
}

@keyframes catWaitingWobble {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-1px, 0) rotate(-3deg); }
  50% { transform: translate(0, -1px) rotate(0deg); }
  75% { transform: translate(1px, 0) rotate(3deg); }
}

@keyframes catBlink {
  0%, 76%, 100% { visibility: hidden; }
  80%, 88% { visibility: visible; }
}

@keyframes catTailWag {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(0, -1px); }
}

@keyframes catFrontStep {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}

@keyframes catBackStep {
  0%, 100% { transform: translateY(-1px); }
  50% { transform: translateY(0); }
}

@keyframes catDanceHop {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(0, -5px); }
}

@keyframes catDanceBody {
  0%, 100% { transform: translate(-1px, 0) rotate(-5deg); }
  50% { transform: translate(1px, 0) rotate(5deg); }
}

@keyframes catDanceTail {
  0%, 100% { transform: translate(0, -1px); }
  50% { transform: translate(0, 2px); }
}

@keyframes catDanceFrontStep {
  0%, 100% { transform: translate(0, -2px); }
  50% { transform: translate(1px, 1px); }
}

@keyframes catDanceBackStep {
  0%, 100% { transform: translate(1px, 1px); }
  50% { transform: translate(0, -2px); }
}

@keyframes mikanCatHappyHop {
  0%, 100% { transform: translate(0, 0) scale(1); }
  35% { transform: translate(0, -12px) scale(1.05, 0.95); }
  70% { transform: translate(0, -3px) scale(0.98, 1.04); }
}

@keyframes mikanCatHappyBody {
  0%, 100% { transform: translate(-1px, 0) rotate(-4deg); }
  50% { transform: translate(1px, -1px) rotate(4deg); }
}

@keyframes mikanCatHappyTail {
  0%, 100% { transform: translate(0, -2px) rotate(-10deg); }
  50% { transform: translate(0, 2px) rotate(12deg); }
}

@keyframes mikanCatchPop {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.35); }
  35% { opacity: 1; transform: translate(-50%, -12px) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -34px) scale(0.85); }
}

@keyframes laptopGlow {
  0%, 100% { fill: #dc7b59; }
  50% { fill: #ffebcd; }
}

@keyframes pixelHeartFloat {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  70% { opacity: 1; transform: translate(var(--heart-drift, 0px), -42px) scale(1.15); }
  100% { opacity: 0; transform: translate(var(--heart-drift, 0px), -58px) scale(0.85); }
}

@keyframes catPatrol {
  from { transform: translateX(0); }
  to { transform: translateX(calc(var(--cat-walk-distance, 0px) * -1)); }
}

@media screen and (max-width: 768px) {
  .App, .command-field { font-size: 17px; }
  .terminal-container { padding: 14px 18px; }
  .logo-turtle { width: 82px; right: 10px; bottom: 10px; opacity: 0.55; }
  .mikan-cat { width: 96px; bottom: 18px; opacity: 1; }
  .mikan-scoreboard { top: 10px; }
  .mikan-hint { top: 58px; }
  #output > div:not(:first-child), .command-input { margin-top: 10px; }
  .panel { box-shadow: 4px 4px 0 var(--accent), 8px 8px 0 var(--pink); }
  .suggestion-item { grid-template-columns: 1fr; gap: 2px; }
}
