:root {
  --ink: #182033;
  --paper: #fff9ed;
  --paper-soft: #fff1d6;
  --line: #243047;
  --mint: #35d7a8;
  --sky: #69c8ff;
  --berry: #e95b88;
  --lemon: #ffd85a;
  --violet: #8f78ff;
  --leaf: #75c96b;
  --shadow: 5px 5px 0 rgba(24, 32, 51, 0.88);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(90deg, rgba(36, 48, 71, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(36, 48, 71, 0.06) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--lemon);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  inset: 12px auto auto 12px;
  z-index: 50;
  transform: translateY(-140%);
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  background: var(--lemon);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--line);
}

.skip-link:focus {
  transform: translateY(0);
}

.cabinet-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid var(--line);
  padding: 12px clamp(16px, 4vw, 34px);
  background: rgba(255, 249, 237, 0.94);
  backdrop-filter: blur(12px);
}

.brand-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 6px 12px;
  background: var(--mint);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--line);
}

.topbar-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 6px 9px;
  color: #3c475d;
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.topbar-nav a:hover {
  border-color: var(--line);
  background: #ffffff;
}

.cabinet-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.catalog-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: end;
  gap: 22px;
  margin-bottom: 18px;
}

.intro-copy {
  min-width: 0;
  max-width: 100%;
}

.kicker {
  margin: 0 0 8px;
  color: #526078;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.25rem, 8vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.intro-lead {
  max-width: 760px;
  margin: 16px 0 0;
  color: #44506a;
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.catalog-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.catalog-stats div {
  min-width: 0;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 12px 10px;
  background: #ffffff;
  box-shadow: 3px 3px 0 var(--line);
}

.catalog-stats dt {
  color: #657188;
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.catalog-stats dd {
  margin: 2px 0 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 900;
}

.catalog-toolbar {
  position: sticky;
  top: 64px;
  z-index: 12;
  margin: 0 0 18px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 249, 237, 0.96);
  box-shadow: 4px 4px 0 rgba(24, 32, 51, 0.8);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.filter-button {
  min-height: 38px;
  max-width: 100%;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 7px 12px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.1;
}

.filter-button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0 var(--line);
}

.filter-button.is-active {
  background: var(--line);
  color: #ffffff;
  box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.18);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.loading-copy,
.error-copy,
.empty-copy {
  grid-column: 1 / -1;
  border: 2px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 18px;
  background: #ffffff;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.game-card {
  --accent: var(--mint);
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.game-card[data-status="prototype-next"] {
  box-shadow: 5px 5px 0 var(--line), inset 0 0 0 4px rgba(53, 215, 168, 0.16);
}

.game-card[data-status="playable"] {
  box-shadow: 5px 5px 0 var(--line), inset 0 0 0 4px rgba(255, 216, 90, 0.32);
}

.preview-frame {
  position: relative;
  border-bottom: 2px solid var(--line);
  background: var(--accent);
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.preview-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  image-rendering: pixelated;
}

.preview-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(24, 32, 51, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(24, 32, 51, 0.08) 1px, transparent 1px);
  background-size: 12px 12px;
  opacity: 0.6;
  pointer-events: none;
}

.preview-stage::after {
  content: "";
  position: absolute;
  inset: auto 12px 10px;
  height: 8px;
  border: 2px solid rgba(24, 32, 51, 0.14);
  border-radius: 999px;
  background: rgba(24, 32, 51, 0.08);
}

.scene-piece,
.scene-piece::before,
.scene-piece::after {
  position: absolute;
  display: block;
}

.game-card-body {
  min-width: 0;
  max-width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  overflow: hidden;
}

.card-meta {
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.engine-pill,
.tag-pill {
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.game-title {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 1.16rem;
  line-height: 1.24;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.game-summary,
.twist-copy,
.next-step {
  max-width: 100%;
  margin: 0;
  color: #46516a;
  font-size: 0.94rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: keep-all;
}

.twist-copy strong,
.next-step strong {
  color: var(--ink);
}

.pill-row {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.engine-pill {
  background: #ffffff;
}

.tag-pill {
  border-color: rgba(36, 48, 71, 0.45);
  background: rgba(36, 48, 71, 0.05);
  color: #526078;
}

.card-actions {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.card-actions[hidden] {
  display: none;
}

.like-button {
  min-height: 28px;
  width: auto;
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 2px 2px 0 var(--line);
}

.like-button:hover {
  transform: translate(-1px, -1px);
}

.like-button.is-liked,
.like-button:disabled {
  background: #ffe4ef;
  cursor: default;
  transform: none;
}

.like-button:disabled {
  opacity: 1;
}

.like-mark {
  color: var(--berry);
  font-size: 1rem;
  line-height: 1;
}

.like-count {
  min-width: 1ch;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: right;
}

.play-actions {
  margin-top: auto;
}

.play-link {
  min-height: 40px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  background: var(--accent);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 950;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--line);
}

.play-link:hover {
  transform: translate(-1px, -1px);
}

.card-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.card-link:hover {
  background: var(--accent);
}

.cabinet-footer {
  border-top: 2px solid var(--line);
  padding: 20px clamp(16px, 4vw, 34px) 28px;
  background: #ffffff;
  color: #526078;
  font-size: 0.92rem;
}

.cabinet-footer p {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.cabinet-footer a {
  font-weight: 850;
}

.preview-sparkle-oracle {
  background: linear-gradient(180deg, #e9fff8 0%, #fff4bf 100%);
}

.preview-sparkle-oracle.book-start {
  background: linear-gradient(180deg, #e9fff8 0%, #fff2df 100%);
}

.preview-sparkle-oracle.book-half {
  background: linear-gradient(180deg, #e9f4ff 0%, #f6edff 54%, #fff4bf 100%);
}

.preview-sparkle-oracle.book-full {
  background: linear-gradient(180deg, #243047 0%, #5dddc5 52%, #fff4bf 100%);
}

.preview-sparkle-oracle .mochi {
  left: 41%;
  bottom: 24%;
  width: 54px;
  height: 46px;
  border: 3px solid var(--line);
  border-radius: 7px 7px 18px 18px;
  background: #a7f1dd;
  animation: mochiPulse 1.6s ease-in-out infinite;
}

.preview-sparkle-oracle .mochi::before {
  content: "";
  left: 14px;
  top: 13px;
  width: 8px;
  height: 8px;
  background: var(--line);
  box-shadow: 18px 0 0 var(--line);
}

.preview-sparkle-oracle .mochi::after {
  content: "";
  left: 21px;
  top: 26px;
  width: 12px;
  height: 4px;
  background: #ffffff;
}

.preview-sparkle-oracle .sparkle {
  width: 8px;
  height: 8px;
  background: var(--lemon);
  box-shadow: 0 0 0 3px rgba(255, 216, 90, 0.35);
  animation: sparklePop 1.4s steps(2) infinite;
}

.preview-sparkle-oracle .sparkle.one {
  left: 28%;
  top: 22%;
}

.preview-sparkle-oracle .sparkle.two {
  right: 24%;
  top: 28%;
  animation-delay: 0.35s;
}

.preview-sparkle-oracle .sparkle.three {
  left: 58%;
  top: 14%;
  background: var(--berry);
  animation-delay: 0.7s;
}

.preview-sparkle-oracle .fortune-card {
  right: 14%;
  bottom: 24%;
  width: 30px;
  height: 40px;
  border: 3px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  transform: rotate(8deg);
  animation: cardFlip 4s steps(1) infinite;
}

.preview-sparkle-oracle.book-half .fortune-card,
.preview-sparkle-oracle.book-full .fortune-card {
  background: linear-gradient(135deg, #ffffff 0 44%, var(--lemon) 45% 58%, #ffffff 59%);
}

.preview-sparkle-oracle.book-full .sparkle {
  box-shadow: 0 0 0 5px rgba(255, 216, 90, 0.45);
}

.preview-sparkle-oracle.set-bakery .fortune-card {
  border-color: var(--lemon);
  background: linear-gradient(135deg, #ffffff 0 36%, var(--lemon) 37% 52%, #ffffff 53%);
}

.preview-sparkle-oracle.set-sky .fortune-card {
  box-shadow: -8px -8px 0 -3px var(--sky);
}

.preview-sparkle-oracle.set-dream .fortune-card::after {
  content: "";
  left: 7px;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--violet);
  box-shadow: 9px 9px 0 var(--berry);
}

.preview-sparkle-oracle.preset-score .mochi {
  background: #c9f6d9;
  box-shadow: inset 0 -7px 0 rgba(233, 91, 136, 0.34);
}

.preview-sparkle-oracle.preset-card .fortune-card {
  transform: rotate(-6deg);
  animation-duration: 3s;
}

.preview-sparkle-oracle.preset-starlight .sparkle {
  background: var(--sky);
  box-shadow: 0 0 0 4px rgba(105, 200, 255, 0.38);
}

.preview-sparkle-oracle .candidate-signal {
  top: 14%;
  right: 12%;
  display: none;
  width: 10px;
  height: 10px;
  border: 2px solid var(--line);
  background: var(--lemon);
}

.preview-sparkle-oracle.candidate-spark .candidate-signal {
  display: block;
}

.preview-sparkle-oracle.candidate-warm .candidate-signal {
  box-shadow: -10px 10px 0 -2px var(--mint);
}

.preview-sparkle-oracle.candidate-hot .candidate-signal {
  animation: sparklePop 1.2s steps(2) infinite;
  box-shadow: -10px 10px 0 -2px var(--mint), -20px 20px 0 -2px var(--berry);
}

.preview-sparkle-oracle.liked-by-user .candidate-signal {
  background: var(--berry);
  transform: rotate(45deg);
}

.preview-sparkle-oracle .decor-crown,
.preview-sparkle-oracle .decor-lamp,
.preview-sparkle-oracle .decor-curtain,
.preview-sparkle-oracle .decor-smile {
  display: none;
}

.preview-sparkle-oracle.has-lamp .decor-lamp {
  left: 18%;
  top: 13%;
  display: block;
  width: 16px;
  height: 22px;
  border: 3px solid var(--line);
  border-radius: 8px 8px 4px 4px;
  background: var(--lemon);
  box-shadow: 0 0 0 8px rgba(255, 216, 90, 0.22);
  animation: sparklePop 1.7s steps(2) infinite;
}

.preview-sparkle-oracle.has-curtain .decor-curtain {
  top: 0;
  bottom: 0;
  display: block;
  width: 26px;
  background: rgba(143, 120, 255, 0.42);
}

.preview-sparkle-oracle.has-curtain .decor-curtain.left {
  left: 0;
}

.preview-sparkle-oracle.has-curtain .decor-curtain.right {
  right: 0;
}

.preview-sparkle-oracle.has-crown .decor-crown {
  left: calc(41% + 15px);
  bottom: calc(24% + 44px);
  display: block;
  width: 28px;
  height: 14px;
  border: 2px solid var(--line);
  background: var(--sky);
}

.preview-sparkle-oracle.has-crown .decor-crown::before {
  content: "";
  left: 4px;
  top: -10px;
  width: 6px;
  height: 10px;
  background: var(--sky);
  box-shadow: 8px -4px 0 var(--sky), 16px 0 0 var(--sky);
}

.preview-sparkle-oracle.has-smile .decor-smile {
  left: calc(41% + 17px);
  bottom: calc(24% + 16px);
  display: block;
  width: 20px;
  height: 4px;
  background: var(--line);
  box-shadow: -14px -7px 0 #ff9a6c, 14px -7px 0 #ff9a6c;
}

.preview-pudding-race {
  background: linear-gradient(180deg, #dff8ff 0%, #ffe8c7 100%);
}

.preview-pudding-race .track {
  inset: 18% 12%;
  border: 14px solid #ffffff;
  border-radius: 42px;
  box-shadow: inset 0 0 0 3px var(--line), 0 0 0 3px var(--line);
}

.preview-pudding-race .gate {
  width: 12px;
  height: 42px;
  border: 2px solid var(--line);
  background: var(--lemon);
}

.preview-pudding-race .gate.one {
  left: 25%;
  top: 20%;
}

.preview-pudding-race .gate.two {
  right: 24%;
  bottom: 21%;
  background: var(--berry);
}

.preview-pudding-race .kart {
  left: 22%;
  top: 54%;
  width: 30px;
  height: 22px;
  border: 3px solid var(--line);
  border-radius: 6px 6px 12px 12px;
  background: #ffd66e;
  animation: puddingLap 4.6s linear infinite;
}

.preview-bakery-defense {
  background: linear-gradient(180deg, #fef3da 0%, #dbf8df 100%);
}

.preview-bakery-defense .bakery {
  left: 36%;
  top: 34%;
  width: 64px;
  height: 46px;
  border: 3px solid var(--line);
  background: #f5b764;
}

.preview-bakery-defense .bakery::before {
  content: "";
  left: -5px;
  top: -18px;
  width: 74px;
  height: 18px;
  border: 3px solid var(--line);
  background: repeating-linear-gradient(90deg, #fff 0 12px, #e95b88 12px 24px);
}

.preview-bakery-defense .hero {
  left: 47%;
  bottom: 18%;
  width: 24px;
  height: 24px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: #a7f1dd;
  animation: heroBob 1.4s ease-in-out infinite;
}

.preview-bakery-defense .bubble {
  width: 13px;
  height: 13px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  animation: bubbleShot 1.6s linear infinite;
}

.preview-bakery-defense .bubble.b1 {
  left: 51%;
  bottom: 28%;
}

.preview-bakery-defense .bubble.b2 {
  left: 50%;
  bottom: 28%;
  animation-delay: 0.7s;
}

.preview-bakery-defense .crate {
  right: 17%;
  bottom: 23%;
  width: 28px;
  height: 24px;
  border: 3px solid var(--line);
  background: #b88b5d;
}

.preview-konpeito-swarm {
  background: linear-gradient(180deg, #f8e8ff 0%, #d9fbff 100%);
}

.preview-konpeito-swarm .beacon {
  left: 46%;
  top: 39%;
  width: 24px;
  height: 24px;
  border: 3px solid var(--line);
  background: var(--lemon);
  transform: rotate(45deg);
  animation: beaconPulse 1.2s steps(2) infinite;
}

.preview-konpeito-swarm .candy {
  width: 15px;
  height: 15px;
  border: 2px solid var(--line);
  background: var(--berry);
  transform: rotate(45deg);
  animation: swarmOrbit 3.8s ease-in-out infinite;
}

.preview-konpeito-swarm .c1 { left: 20%; top: 26%; animation-delay: 0s; }
.preview-konpeito-swarm .c2 { left: 31%; top: 55%; animation-delay: 0.2s; background: var(--mint); }
.preview-konpeito-swarm .c3 { right: 30%; top: 21%; animation-delay: 0.4s; background: var(--sky); }
.preview-konpeito-swarm .c4 { right: 18%; top: 53%; animation-delay: 0.6s; background: var(--lemon); }
.preview-konpeito-swarm .c5 { left: 18%; bottom: 18%; animation-delay: 0.8s; background: var(--violet); }
.preview-konpeito-swarm .c6 { right: 42%; bottom: 16%; animation-delay: 1s; background: #ff9a6c; }
.preview-konpeito-swarm .c7 { left: 52%; top: 19%; animation-delay: 1.2s; background: #ffffff; }

.preview-rocket-delivery {
  background: linear-gradient(180deg, #1f2a54 0%, #79d7ff 100%);
}

.preview-rocket-delivery .rocket {
  left: 18%;
  bottom: 20%;
  width: 26px;
  height: 38px;
  border: 3px solid var(--line);
  border-radius: 12px 12px 5px 5px;
  background: #ffffff;
  animation: rocketPath 4s ease-in-out infinite;
}

.preview-rocket-delivery .rocket::before {
  content: "";
  left: 7px;
  top: 6px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--line);
  background: var(--sky);
}

.preview-rocket-delivery .rocket::after {
  content: "";
  left: 6px;
  bottom: -12px;
  width: 10px;
  height: 10px;
  background: var(--lemon);
  box-shadow: 0 8px 0 #ff8a4a;
}

.preview-rocket-delivery .mail-star {
  width: 12px;
  height: 12px;
  background: var(--lemon);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 2% 35%, 39% 35%);
}

.preview-rocket-delivery .mail-star.a { left: 36%; top: 22%; }
.preview-rocket-delivery .mail-star.b { right: 29%; top: 34%; animation: sparklePop 1.4s steps(2) infinite; }

.preview-rocket-delivery .mailbox {
  right: 16%;
  bottom: 20%;
  width: 38px;
  height: 28px;
  border: 3px solid var(--line);
  background: #f0758f;
}

.preview-marshmallow-sling {
  background: linear-gradient(180deg, #dff6ff 0%, #ffe9ca 100%);
}

.preview-marshmallow-sling .sling {
  left: 18%;
  bottom: 18%;
  width: 34px;
  height: 58px;
  border-left: 6px solid #7d5334;
  border-right: 6px solid #7d5334;
  border-bottom: 6px solid #7d5334;
  border-radius: 0 0 14px 14px;
}

.preview-marshmallow-sling .band {
  left: 20%;
  bottom: 46%;
  width: 70px;
  height: 4px;
  background: var(--line);
  transform: rotate(-17deg);
  transform-origin: left center;
}

.preview-marshmallow-sling .mallow {
  left: 22%;
  bottom: 43%;
  width: 24px;
  height: 24px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  animation: mallowArc 5s ease-in-out infinite;
}

.preview-marshmallow-sling .block {
  right: 18%;
  width: 32px;
  height: 24px;
  border: 3px solid var(--line);
  background: #c89157;
  animation: blockWobble 5s ease-in-out infinite;
}

.preview-marshmallow-sling .b1 { bottom: 18%; }
.preview-marshmallow-sling .b2 { bottom: 42px; right: 24%; background: #f0b96f; animation-delay: 0.1s; }
.preview-marshmallow-sling .b3 { bottom: 66px; right: 19%; background: #8fd6a3; animation-delay: 0.2s; }

.preview-biscuit-fleet {
  background: linear-gradient(180deg, #c9f6ff 0%, #7bd1da 100%);
}

.preview-biscuit-fleet .sea-route {
  left: 12%;
  right: 12%;
  top: 48%;
  height: 6px;
  background: repeating-linear-gradient(90deg, #ffffff 0 18px, transparent 18px 28px);
}

.preview-biscuit-fleet .base,
.preview-biscuit-fleet .jam {
  bottom: 22%;
  width: 44px;
  height: 44px;
  border: 3px solid var(--line);
  border-radius: 50%;
}

.preview-biscuit-fleet .base {
  left: 12%;
  background: #dfaa66;
}

.preview-biscuit-fleet .jam {
  right: 12%;
  background: #e95b88;
}

.preview-biscuit-fleet .fleet {
  top: 48%;
  width: 20px;
  height: 14px;
  border: 2px solid var(--line);
  background: #fff5c2;
  animation: fleetSail 4.2s linear infinite;
}

.preview-biscuit-fleet .f1 { left: 22%; }
.preview-biscuit-fleet .f2 { left: 28%; animation-delay: 0.55s; background: #ffffff; }
.preview-biscuit-fleet .f3 { left: 18%; animation-delay: 1.1s; background: var(--lemon); }

.preview-color-garden {
  background: linear-gradient(180deg, #d8fff0 0%, #fff6c5 100%);
}

.garden-grid {
  position: absolute;
  left: 22%;
  top: 17%;
  display: grid;
  grid-template-columns: repeat(4, 24px);
  gap: 5px;
  padding: 8px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.garden-grid span {
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  background: var(--leaf);
}

.garden-grid span:nth-child(11) {
  background: #8fe36a;
  animation: oddBloom 1.3s steps(2) infinite;
}

.preview-color-garden .drop {
  right: 18%;
  top: 18%;
  width: 16px;
  height: 22px;
  border: 2px solid var(--line);
  border-radius: 50% 50% 50% 0;
  background: var(--sky);
  transform: rotate(-45deg);
  animation: dropFall 2s ease-in infinite;
}

.preview-jelly-bricks {
  background: linear-gradient(180deg, #f6edff 0%, #d8fff4 100%);
}

.brick-grid {
  position: absolute;
  left: 16%;
  right: 16%;
  top: 18%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.brick-grid span {
  height: 18px;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: var(--berry);
}

.brick-grid span:nth-child(3n) { background: var(--lemon); }
.brick-grid span:nth-child(4n) { background: var(--mint); }

.preview-jelly-bricks .sugar-ball {
  left: 48%;
  top: 54%;
  width: 16px;
  height: 16px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  animation: ballBounce 2.2s linear infinite;
}

.preview-jelly-bricks .paddle {
  left: 38%;
  bottom: 18%;
  width: 72px;
  height: 14px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: #ff9a6c;
  animation: paddleSlide 2.2s ease-in-out infinite;
}

.preview-switchyard {
  background: linear-gradient(180deg, #efffe0 0%, #ffe2d0 100%);
}

.preview-switchyard .rail {
  height: 8px;
  border: 2px solid var(--line);
  background: #9f8b65;
}

.preview-switchyard .r1 {
  left: 18%;
  right: 18%;
  top: 46%;
}

.preview-switchyard .r2 {
  left: 46%;
  top: 29%;
  width: 8px;
  height: 64px;
}

.preview-switchyard .r3 {
  left: 51%;
  top: 41%;
  width: 78px;
  transform: rotate(-28deg);
}

.preview-switchyard .switch {
  left: 47%;
  top: 42%;
  width: 22px;
  height: 22px;
  border: 3px solid var(--line);
  background: var(--lemon);
  animation: switchTick 2s steps(2) infinite;
}

.preview-switchyard .gift {
  left: 18%;
  top: 38%;
  width: 26px;
  height: 24px;
  border: 3px solid var(--line);
  background: var(--berry);
  animation: giftRide 4.8s linear infinite;
}

.preview-lunchbox-tapper {
  background: linear-gradient(180deg, #fff2df 0%, #e9ffed 100%);
}

.lunchbox {
  position: absolute;
  left: 25%;
  top: 20%;
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 6px;
  border: 4px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #ffffff;
}

.lunchbox span {
  height: 30px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: #f7d27a;
  animation: lunchFlash 2.4s steps(1) infinite;
}

.lunchbox span:nth-child(2) { background: #8fd6a3; animation-delay: 0.4s; }
.lunchbox span:nth-child(3) { background: #ff9a6c; animation-delay: 0.8s; }
.lunchbox span:nth-child(4) { background: #ffffff; animation-delay: 1.2s; }
.lunchbox span:nth-child(5) { background: #f0758f; animation-delay: 1.6s; }
.lunchbox span:nth-child(6) { background: #93d8ff; animation-delay: 2s; }

.preview-lunchbox-tapper .tap-spark {
  right: 23%;
  bottom: 24%;
  width: 16px;
  height: 16px;
  background: var(--lemon);
  transform: rotate(45deg);
  animation: sparklePop 1.2s steps(2) infinite;
}

.preview-moon-runner {
  background: linear-gradient(180deg, #24315f 0%, #6dd7cf 100%);
}

.preview-moon-runner .moon {
  right: 18%;
  top: 17%;
  width: 32px;
  height: 32px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: #fff4a8;
}

.preview-moon-runner .platform {
  height: 12px;
  border: 3px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
}

.preview-moon-runner .p1 { left: 14%; bottom: 24%; width: 78px; }
.preview-moon-runner .p2 { left: 45%; bottom: 36%; width: 62px; }
.preview-moon-runner .p3 { right: 12%; bottom: 26%; width: 74px; }

.preview-moon-runner .runner {
  left: 18%;
  bottom: 36%;
  width: 22px;
  height: 28px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: var(--mint);
  animation: runnerJump 3.4s ease-in-out infinite;
}

.preview-moon-runner .letter {
  left: 58%;
  top: 35%;
  width: 20px;
  height: 14px;
  border: 2px solid var(--line);
  background: #ffffff;
  animation: letterBlink 1.5s steps(2) infinite;
}

@keyframes mochiPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.04); }
}

@keyframes sparklePop {
  0%, 100% { opacity: 0.25; transform: scale(0.7) rotate(0deg); }
  45% { opacity: 1; transform: scale(1.25) rotate(45deg); }
}

@keyframes cardFlip {
  0%, 49% { background: #ffffff; }
  50%, 100% { background: var(--lemon); }
}

@keyframes puddingLap {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(120px, -55px) rotate(18deg); }
  50% { transform: translate(175px, 0) rotate(160deg); }
  75% { transform: translate(72px, 48px) rotate(205deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

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

@keyframes bubbleShot {
  0% { opacity: 0; transform: translate(0, 0) scale(0.8); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(74px, -45px) scale(1.15); }
}

@keyframes beaconPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 216, 90, 0.45); }
  50% { box-shadow: 0 0 0 13px rgba(255, 216, 90, 0.12); }
}

@keyframes swarmOrbit {
  0%, 100% { transform: translate(0, 0) rotate(45deg); }
  40% { transform: translate(22px, 9px) rotate(90deg); }
  75% { transform: translate(-10px, -16px) rotate(135deg); }
}

@keyframes rocketPath {
  0% { transform: translate(0, 0) rotate(24deg); }
  45% { transform: translate(110px, -58px) rotate(60deg); }
  70% { transform: translate(172px, -5px) rotate(100deg); }
  100% { transform: translate(0, 0) rotate(24deg); }
}

@keyframes mallowArc {
  0%, 16% { transform: translate(0, 0); }
  50% { transform: translate(130px, -68px); }
  70% { transform: translate(178px, -2px); }
  100% { transform: translate(0, 0); }
}

@keyframes blockWobble {
  0%, 56%, 100% { transform: rotate(0deg); }
  66% { transform: rotate(9deg) translateX(6px); }
  76% { transform: rotate(-5deg) translateX(-3px); }
}

@keyframes fleetSail {
  0% { transform: translateX(0); }
  100% { transform: translateX(150px); }
}

@keyframes oddBloom {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0); }
  50% { box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.72); }
}

@keyframes dropFall {
  0% { opacity: 0; transform: translateY(-22px) rotate(-45deg); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(86px) rotate(-45deg); }
}

@keyframes ballBounce {
  0% { transform: translate(-60px, 36px); }
  25% { transform: translate(26px, -34px); }
  50% { transform: translate(76px, 34px); }
  75% { transform: translate(-10px, -22px); }
  100% { transform: translate(-60px, 36px); }
}

@keyframes paddleSlide {
  0%, 100% { transform: translateX(-30px); }
  50% { transform: translateX(42px); }
}

@keyframes switchTick {
  0%, 49% { transform: rotate(0deg); }
  50%, 100% { transform: rotate(45deg); }
}

@keyframes giftRide {
  0% { transform: translate(0, 0); }
  45% { transform: translate(92px, 0); }
  70% { transform: translate(132px, -35px); }
  100% { transform: translate(0, 0); }
}

@keyframes lunchFlash {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}

@keyframes runnerJump {
  0% { transform: translate(0, 0); }
  30% { transform: translate(86px, -46px); }
  55% { transform: translate(145px, -22px); }
  78% { transform: translate(204px, 3px); }
  100% { transform: translate(0, 0); }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 820px) {
  .cabinet-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .catalog-intro {
    grid-template-columns: 1fr;
  }

  .catalog-toolbar {
    top: 114px;
  }
}

@media (max-width: 560px) {
  .cabinet-shell {
    width: calc(100% - 20px);
    max-width: 1180px;
    padding-top: 20px;
  }

  .catalog-stats {
    grid-template-columns: 1fr;
  }

  .catalog-toolbar {
    position: static;
  }

  .game-grid {
    grid-template-columns: 1fr;
    justify-items: start;
    overflow: hidden;
  }

  .game-card {
    justify-self: start;
    width: min(340px, calc(100vw - 34px));
    max-width: min(340px, calc(100vw - 34px));
  }

  .game-card-body {
    gap: 10px;
    padding: 12px;
  }

  .card-meta {
    gap: 6px;
  }

  .like-button {
    padding: 4px 7px;
  }

  .game-summary,
  .twist-copy,
  .next-step {
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .intro-lead,
  .game-title {
    font-size: 1.08rem;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .topbar-nav {
    justify-content: flex-start;
  }

  .filter-button {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    text-align: center;
  }
}
