@font-face {
  font-family: "Orbitron";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/orbitron-400.ttf") format("truetype");
}

@font-face {
  font-family: "Orbitron";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/orbitron-500.ttf") format("truetype");
}

@font-face {
  font-family: "Orbitron";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/orbitron-600.ttf") format("truetype");
}

@font-face {
  font-family: "Orbitron";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/orbitron-700.ttf") format("truetype");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/manrope-400.ttf") format("truetype");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/manrope-500.ttf") format("truetype");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/manrope-600.ttf") format("truetype");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/manrope-700.ttf") format("truetype");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("assets/fonts/manrope-800.ttf") format("truetype");
}

:root {
  --cell-width: 192px;
  --cell-height: 208px;
  --atlas-width: 1536px;
  --atlas-height: 1872px;
  --bg: #e2e8f0;
  --surface: #ffffff;
  --surface-soft: #f4f8fb;
  --ink: #0f172a;
  --muted: #28384d;
  --line: #b8c7d5;
  --electric: #00f0ff;
  --electric-strong: #053b61;
  --soyfki-button-top: #095a99;
  --soyfki-button-bottom: #042e4d;
  --cool-shadow: rgba(0, 240, 255, 0.32);
  --button: #ffffff;
  --focus: #053b61;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  width: 100%;
}

body {
  background:
    linear-gradient(90deg, rgba(0, 240, 255, 0.06) 1px, transparent 1px) center / 96px 100%,
    linear-gradient(135deg, rgba(255, 255, 255, 0.74) 0%, transparent 26%),
    url("assets/ship-panel-background.svg") center / cover no-repeat,
    linear-gradient(180deg, #f8fbfd 0%, var(--bg) 48%, #dce5ee 100%);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-rows: minmax(46px, 7svh) minmax(150px, 38svh) minmax(102px, 18svh) minmax(108px, 21svh) minmax(44px, 5svh);
  gap: clamp(7px, 1.25svh, 13px);
  height: 100svh;
  overflow: hidden;
  padding: clamp(10px, 2svh, 18px) clamp(12px, 3.2vw, 36px);
  max-width: 100vw;
  width: 100vw;
}

.site-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  min-height: 0;
  min-width: 0;
  width: 100%;
}

h1 {
  color: #095a99;
  font-family: "Orbitron", "Manrope", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.55rem, 3.2vw, 2.6rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
  max-width: min(82vw, 760px);
  min-width: 0;
  padding-block: 4px;
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.42);
  white-space: nowrap;
}

.now-playing {
  display: grid;
  gap: 2px;
  justify-items: center;
  max-width: min(90vw, 680px);
  min-width: 0;
  text-align: center;
}

.tool-button:focus-visible,
.like-button:focus-visible,
.animation-card:focus-visible,
.pet-card:focus-visible,
.round-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.now-playing span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#activePetName {
  color: var(--ink);
  font-size: clamp(0.94rem, 1.45vw, 1.12rem);
  font-weight: 800;
}

#activeAnimationName {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.stage {
  align-items: center;
  background:
    linear-gradient(90deg, transparent 0%, rgba(0, 240, 255, 0.24) 6%, color-mix(in srgb, var(--line), var(--electric) 18%) 14%, color-mix(in srgb, var(--line), var(--electric) 18%) 86%, rgba(0, 240, 255, 0.24) 94%, transparent 100%) top / 100% 1px no-repeat,
    linear-gradient(90deg, transparent 0%, rgba(0, 240, 255, 0.2) 6%, color-mix(in srgb, var(--line), var(--electric) 16%) 14%, color-mix(in srgb, var(--line), var(--electric) 16%) 86%, rgba(0, 240, 255, 0.2) 94%, transparent 100%) bottom / 100% 1px no-repeat;
  display: grid;
  justify-items: center;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.stage::before {
  background:
    linear-gradient(90deg, transparent 0%, rgba(0, 240, 255, 0.18) 50%, transparent 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(226, 232, 240, 0.48));
  content: "";
  inset: 0;
  opacity: 0.82;
  pointer-events: none;
  position: absolute;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.08) 2%, rgba(0, 0, 0, 0.45) 6%, #000 14%, #000 86%, rgba(0, 0, 0, 0.45) 94%, rgba(0, 0, 0, 0.08) 98%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.08) 2%, rgba(0, 0, 0, 0.45) 6%, #000 14%, #000 86%, rgba(0, 0, 0, 0.45) 94%, rgba(0, 0, 0, 0.08) 98%, transparent 100%);
  z-index: 0;
}

.stage-edge-blur {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: linear-gradient(90deg, transparent 0%, rgba(244, 248, 251, 0.42) 5%, rgba(244, 248, 251, 0.24) 12%, transparent 22%, transparent 78%, rgba(244, 248, 251, 0.24) 88%, rgba(244, 248, 251, 0.42) 95%, transparent 100%);
  inset: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.42) 4%, #000 9%, rgba(0, 0, 0, 0.36) 16%, transparent 24%, transparent 76%, rgba(0, 0, 0, 0.36) 84%, #000 91%, rgba(0, 0, 0, 0.42) 96%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.42) 4%, #000 9%, rgba(0, 0, 0, 0.36) 16%, transparent 24%, transparent 76%, rgba(0, 0, 0, 0.36) 84%, #000 91%, rgba(0, 0, 0, 0.42) 96%, transparent 100%);
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.stage::after {
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.78), transparent);
  content: "";
  height: 1px;
  left: 10%;
  opacity: 0.7;
  position: absolute;
  right: 10%;
  top: 50%;
  z-index: 1;
}

.stage-inner {
  display: grid;
  gap: clamp(7px, 1.2svh, 12px);
  min-height: 0;
  min-width: 0;
  place-items: center;
  position: relative;
  width: 100%;
  z-index: 2;
}

.install-bar {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(64px, auto) minmax(0, 1fr) minmax(64px, auto);
  max-width: min(720px, 100%);
  min-width: 0;
  width: 100%;
}

.pet-metrics {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  max-width: min(720px, 100%);
  min-width: 0;
  width: 100%;
}

.like-button,
.metric-line {
  align-items: center;
  border-radius: 9999px;
  display: inline-flex;
  gap: 6px;
  white-space: nowrap;
}

.like-button {
  background: linear-gradient(180deg, #ffffff 0%, #edf5fb 100%);
  border: 1px solid color-mix(in srgb, var(--line), var(--electric) 28%);
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.96), 0 0 12px rgba(0, 240, 255, 0.12);
  color: var(--electric-strong);
  cursor: pointer;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  min-width: 90px;
  padding: 0 13px;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.like-button[aria-pressed="true"] {
  background: linear-gradient(180deg, #095a99 0%, #042e4d 90%);
  border-color: var(--electric);
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.72), 0 0 16px rgba(0, 240, 255, 0.24);
  color: #ffffff;
}

.like-button:hover,
.like-button:focus-visible {
  transform: translateY(-1px);
}

.metric-line {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(184, 199, 213, 0.84);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  margin: 0;
  min-height: 34px;
  padding: 0 11px;
}

.pet-metrics .material-icon {
  height: 17px;
  width: 17px;
}

.install-command {
  align-items: center;
  background: var(--ink);
  border: 1px solid color-mix(in srgb, var(--electric), var(--focus) 68%);
  border-radius: 12px;
  box-shadow:
    inset 1px 1px 2px rgba(255, 255, 255, 0.22),
    inset -1px -1px 2px rgba(0, 0, 0, 0.24),
    0 0 16px rgba(0, 240, 255, 0.13);
  color: var(--bg);
  display: flex;
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  height: 44px;
  min-width: 0;
  overflow: hidden;
  padding: 0 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-button {
  align-items: center;
  background: #3587d2;
  background: linear-gradient(180deg, var(--soyfki-button-top) 0%, var(--soyfki-button-bottom) 80%);
  border: 0;
  border-radius: 9999px;
  box-shadow: inset 0 0 10px 2px #ffffff, 0 8px 24px rgba(4, 46, 77, 0.26);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  height: 44px;
  justify-content: center;
  min-width: 88px;
  outline: none;
  overflow: hidden;
  padding: 0 6px;
  position: relative;
  text-decoration: none;
  transition: box-shadow 300ms ease-in-out, transform 300ms ease-in-out;
  width: clamp(92px, 9vw, 116px);
}

.tool-button::before,
.tool-button::after,
.tool-button-content::before {
  content: "";
  position: absolute;
  pointer-events: none;
}

.tool-button::before {
  background-color: var(--electric);
  border-radius: 100%;
  filter: blur(2px);
  height: 60%;
  left: -3px;
  opacity: .5;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
}

.tool-button::after {
  background-color: var(--electric);
  border-radius: 100%;
  filter: blur(2px);
  height: 60%;
  opacity: .5;
  right: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
}

.tool-button-content {
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  display: inline-flex;
  gap: 6px;
  height: 32px;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  padding: 0 10px;
  position: relative;
  width: 100%;
}

.tool-button-content::before {
  background: #ffffff;
  filter: blur(10px);
  height: 100px;
  left: -100px;
  top: -34px;
  transform: rotate(25deg) translateY(0);
  transition: left 0s;
  width: 18px;
}

.tool-button:hover .tool-button-content::before,
.tool-button:focus-visible .tool-button-content::before {
  left: calc(100% + 100px);
  transition: left 1s cubic-bezier(0.15, 0.85, 0.35, 1.2);
}

.tool-button span,
.tool-button svg {
  position: relative;
  z-index: 1;
}

.tool-button span {
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.tool-button:hover,
.tool-button:focus-visible {
  box-shadow: inset 0 0 10px 2px #ffffff, 0 0 0 3px rgba(0, 240, 255, 0.22), 0 12px 32px rgba(4, 46, 77, 0.3);
  transform: scale(1.1);
}

.sprite-frame {
  display: grid;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
}

.sprite {
  background-position: 0 0;
  background-repeat: no-repeat;
  background-size: var(--atlas-width) var(--atlas-height);
  display: block;
  height: var(--cell-height);
  image-rendering: auto;
  transform-origin: center;
  width: var(--cell-width);
}

.sprite-frame-main {
  --main-scale: 1;
  height: var(--cell-height);
  place-items: start;
  width: var(--cell-width);
}

.sprite-frame-main .sprite {
  transform: scale(var(--main-scale));
  transform-origin: top left;
}

.animation-panel,
.pet-panel {
  min-height: 0;
  min-width: 0;
}

.animation-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.rail-heading {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.78rem;
  font-weight: 720;
  justify-content: space-between;
  letter-spacing: 0;
  margin-bottom: 6px;
  min-height: 16px;
}

.rail-shell {
  min-height: 0;
  min-width: 0;
}

.rail-shell-animation {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}

.animation-rail,
.pet-rail {
  -ms-overflow-style: none;
  display: flex;
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  padding: 1px 28px 5px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  touch-action: pan-x;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}

.animation-rail:not(.is-overflowing) {
  justify-content: center;
}

.pet-rail:not(.is-overflowing) {
  justify-content: center;
}

.animation-rail::-webkit-scrollbar,
.pet-rail::-webkit-scrollbar {
  display: none;
}

.animation-card,
.pet-card {
  align-items: center;
  background: color-mix(in srgb, var(--button), var(--surface-soft) 20%);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  flex: 0 0 auto;
  justify-items: center;
  min-width: 0;
  outline: none;
  scroll-snap-align: center;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.animation-card:hover,
.pet-card:hover,
.animation-card:focus-visible,
.pet-card:focus-visible {
  border-color: color-mix(in srgb, var(--electric), var(--line) 28%);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.16);
  transform: translateY(-1px);
}

.animation-card.is-active,
.pet-card.is-active {
  background: var(--surface);
  border-color: var(--focus);
  box-shadow: 0 0 18px var(--cool-shadow);
}

.animation-card {
  grid-template-rows: 1fr auto;
  height: 100%;
  padding: 7px 7px 8px;
  width: clamp(92px, 10.5vw, 118px);
}

.animation-name,
.pet-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.animation-name {
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 720;
}

.sprite-frame-animation {
  height: 76px;
  width: 70px;
}

.sprite-frame-animation .sprite {
  transform: scale(0.36);
  transform-origin: top left;
}

.pet-panel {
  align-items: center;
  display: grid;
  gap: 9px;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}

.pet-rail {
  height: 100%;
  padding-bottom: 1px;
}

.pet-card {
  grid-template-rows: 1fr auto;
  height: 100%;
  padding: 8px 9px;
  width: clamp(126px, 14vw, 164px);
}

.pet-name {
  font-size: 0.82rem;
  font-weight: 760;
}

.sprite-frame-pet {
  height: 86px;
  width: 80px;
}

.sprite-frame-pet .sprite {
  transform: scale(0.4);
  transform-origin: top left;
}

.round-button {
  align-items: center;
  aspect-ratio: 1;
  background: color-mix(in srgb, var(--button), var(--surface-soft) 18%);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--electric-strong);
  cursor: pointer;
  display: grid;
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  font-weight: 500;
  justify-items: center;
  line-height: 0;
  min-height: 44px;
  min-width: 44px;
  outline: none;
  place-items: center;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.round-button-small {
  height: 44px;
  width: 44px;
}

.material-icon {
  display: block;
  fill: currentColor;
  height: 22px;
  width: 22px;
}

.round-button:hover,
.round-button:focus-visible {
  background: var(--surface);
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.16);
  transform: translateY(-1px);
}

.site-footer {
  align-items: end;
  color: var(--muted);
  display: grid;
  font-size: 0.78rem;
  font-weight: 720;
  justify-items: center;
  line-height: 1;
  min-height: 0;
  min-width: 0;
  bottom: auto;
  position: static;
  white-space: nowrap;
}

.site-footer a {
  align-items: center;
  color: inherit;
  display: inline-flex;
  min-height: 44px;
  outline: none;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--electric-strong);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.site-footer a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 700px) {
  .app-shell {
    gap: clamp(5px, 1svh, 8px);
    grid-template-rows: clamp(36px, 6svh, 44px) minmax(0, 1fr) clamp(78px, 14svh, 96px) clamp(82px, 15svh, 104px) 44px;
    padding-block: clamp(7px, 1.2svh, 10px);
    padding-inline: 10px;
  }

  .animation-card {
    padding: 5px 5px 6px;
    width: 82px;
  }

  .pet-card {
    padding: 6px;
    width: 110px;
  }

  .sprite-frame-animation {
    height: 54px;
    width: 50px;
  }

  .sprite-frame-animation .sprite {
    transform: scale(0.26);
  }

  .sprite-frame-pet {
    height: 62px;
    width: 58px;
  }

  .sprite-frame-pet .sprite {
    transform: scale(0.3);
  }

  .install-bar {
    grid-template-columns: minmax(58px, auto) minmax(0, 1fr) minmax(58px, auto);
  }

  .pet-metrics {
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .app-shell {
    grid-template-rows: clamp(30px, 6svh, 38px) minmax(0, 1fr) clamp(64px, 12svh, 76px) clamp(68px, 13svh, 82px) 44px;
    gap: 5px;
    padding-block: 7px;
  }

  .site-header {
    gap: 10px;
  }

  h1 {
    font-size: clamp(1rem, 5.6vw, 1.35rem);
    max-width: 100%;
  }

  .stage-inner {
    gap: 4px;
  }

  .now-playing {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: center;
  }

  #activePetName {
    font-size: 0.86rem;
  }

  #activeAnimationName {
    font-size: 0.72rem;
  }

  .rail-heading {
    font-size: 0.68rem;
    margin-bottom: 3px;
    min-height: 12px;
  }

  .rail-shell-animation,
  .pet-panel {
    gap: 5px;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .animation-rail,
  .pet-rail {
    gap: 6px;
    padding-inline: 18px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  }

  .animation-card {
    padding: 3px 4px 4px;
    width: 72px;
  }

  .pet-card {
    padding: 4px;
    width: 88px;
  }

  .animation-name {
    font-size: 0.66rem;
  }

  .pet-name {
    font-size: 0.68rem;
  }

  .sprite-frame-animation {
    height: 32px;
    width: 30px;
  }

  .sprite-frame-animation .sprite {
    transform: scale(0.15);
  }

  .sprite-frame-pet {
    height: 42px;
    width: 39px;
  }

  .sprite-frame-pet .sprite {
    transform: scale(0.2);
  }

  .install-command {
    display: none;
  }

  .install-bar {
    grid-template-columns: minmax(92px, 1fr) minmax(92px, 1fr);
    max-width: 220px;
  }

  .like-button,
  .metric-line {
    min-height: 44px;
  }

  .metric-line {
    min-height: 30px;
  }

  .metric-line {
    font-size: 0.72rem;
    padding-inline: 9px;
  }
}

@media (max-height: 650px) {
  .animation-card,
  .pet-card {
    padding-block: 5px;
  }

  .sprite-frame-animation {
    height: 50px;
    width: 46px;
  }

  .sprite-frame-animation .sprite {
    transform: scale(0.24);
    transform-origin: top left;
  }

  .sprite-frame-pet {
    height: 62px;
    width: 58px;
  }

  .sprite-frame-pet .sprite {
    transform: scale(0.3);
    transform-origin: top left;
  }
}

@media (max-height: 560px) {
  .app-shell {
    gap: 4px;
    grid-template-rows: 26px minmax(0, 1fr) 54px 58px 44px;
    padding-block: 6px;
  }

  .stage-inner {
    gap: 4px;
  }

  .now-playing {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: center;
  }

  #activePetName {
    font-size: 0.84rem;
  }

  #activeAnimationName {
    font-size: 0.72rem;
  }

  .rail-heading {
    display: none;
  }

  .animation-rail {
    height: 100%;
  }

  .animation-card,
  .pet-card {
    padding: 3px 4px;
  }

  .animation-name,
  .pet-name {
    font-size: 0.66rem;
    line-height: 1.05;
  }

  .sprite-frame-animation {
    height: 28px;
    width: 26px;
  }

  .sprite-frame-animation .sprite {
    transform: scale(0.135);
    transform-origin: top left;
  }

  .sprite-frame-pet {
    height: 32px;
    width: 30px;
  }

  .sprite-frame-pet .sprite {
    transform: scale(0.155);
    transform-origin: top left;
  }

  .install-bar {
    gap: 6px;
  }

  .pet-metrics {
    gap: 5px;
  }

  .tool-button,
  .install-command {
    height: 44px;
  }

  .round-button {
    min-height: 44px;
  }

  .site-footer {
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) and (max-height: 650px) {
  .app-shell {
    grid-template-rows: 26px minmax(0, 1fr) 54px 58px 44px;
  }

  .rail-heading {
    display: none;
  }

  .animation-rail {
    height: 100%;
  }

  .rail-shell-animation,
  .pet-panel {
    gap: 4px;
  }

  .animation-rail,
  .pet-rail {
    gap: 5px;
    padding-inline: 14px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  }

  .animation-card {
    padding: 3px;
    width: 66px;
  }

  .pet-card {
    padding: 3px;
    width: 80px;
  }

  .sprite-frame-animation {
    height: 28px;
    width: 26px;
  }

  .sprite-frame-animation .sprite {
    transform: scale(0.135);
  }

  .sprite-frame-pet {
    height: 32px;
    width: 30px;
  }

  .sprite-frame-pet .sprite {
    transform: scale(0.155);
  }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 760px) {
  .stage-inner {
    align-content: center;
    column-gap: 8px;
    grid-template-areas:
      "now now"
      "sprite sprite"
      "metrics install";
    grid-template-columns: minmax(0, auto) minmax(136px, 154px);
    justify-content: center;
    row-gap: 4px;
  }

  .now-playing {
    grid-area: now;
  }

  .sprite-frame-main {
    grid-area: sprite;
    justify-self: center;
  }

  .pet-metrics {
    grid-area: metrics;
    justify-self: end;
    max-width: min(480px, calc(100vw - 190px));
  }

  .install-bar {
    grid-area: install;
    grid-template-columns: repeat(2, minmax(64px, 1fr));
    justify-self: start;
    max-width: 154px;
  }

  .install-command {
    display: none;
  }

  .like-button {
    min-width: 78px;
    padding-inline: 10px;
  }

  .metric-line {
    font-size: 0.7rem;
    min-height: 34px;
    padding-inline: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animation-card,
  .pet-card,
  .like-button,
  .tool-button,
  .round-button {
    transition: none;
  }
}
