/* Ten Second Games — homepage hub (8-bit synthwave) */

.hub {
  position: relative;
  z-index: 1;
}

/* ---------- neon tones (cycled across cards) ---------- */
.tone-cyan   { --tone: #00f0ff; --glow: rgba(0, 240, 255, 0.5);  --tint: rgba(0, 240, 255, 0.12);  --ink: #05010d; }
.tone-pink   { --tone: #ff2d95; --glow: rgba(255, 45, 149, 0.5); --tint: rgba(255, 45, 149, 0.12); --ink: #fff; }
.tone-yellow { --tone: #ffe600; --glow: rgba(255, 230, 0, 0.45); --tint: rgba(255, 230, 0, 0.1);   --ink: #05010d; }
.tone-green  { --tone: #39ff14; --glow: rgba(57, 255, 20, 0.45); --tint: rgba(57, 255, 20, 0.1);   --ink: #05010d; }
.tone-purple { --tone: #b026ff; --glow: rgba(176, 38, 255, 0.5); --tint: rgba(176, 38, 255, 0.12); --ink: #fff; }
.tone-orange { --tone: #ff6b00; --glow: rgba(255, 107, 0, 0.5);  --tint: rgba(255, 107, 0, 0.12);  --ink: #05010d; }

/* ---------- horizon + grid floor (anchored to the hero, not the viewport) ---------- */
.scene .gridfloor,
.scene .horizon-glow { display: none; }

.hub-floor {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;               /* hub.js moves this to the hero sub-line */
  height: 760px;
  z-index: -1;
  overflow: hidden;
  clip-path: inset(0);   /* WebKit: overflow:hidden alone won't clip the 3D-transformed grid */
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 30%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0, #000 30%, transparent 100%);
}
.hub-horizon {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  z-index: 2;
  background: #ff1f9e;
  box-shadow:
    0 0 4px 1px #ff2d95,
    0 0 14px 4px rgba(223, 15, 155, 0.8),
    0 0 40px 10px rgba(200, 20, 140, 0.4),
    0 0 90px 24px rgba(176, 38, 255, 0.22);
}
.hub-floor::before {
  /* pink haze that bleeds down from the horizon */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 160px;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(223, 15, 155, 0.32) 0%, rgba(120, 10, 90, 0.16) 35%, transparent 100%);
}
.hub-grid {
  position: absolute;
  left: -60%;
  right: -60%;
  top: 56px;             /* sits well below the glowing line */
  height: 640px;
  background:
    repeating-linear-gradient(to bottom, rgba(255, 45, 149, 0.36) 0 2px, transparent 2px 48px),
    repeating-linear-gradient(to right, rgba(255, 45, 149, 0.3) 0 2px, transparent 2px 88px);
  transform-origin: top center;
  transform: perspective(640px) rotateX(71deg);   /* flatter: reads as a horizon */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 170px);
          mask-image: linear-gradient(to bottom, transparent 0, #000 170px);
  animation: hubgrid 2.4s linear infinite;
}
@keyframes hubgrid {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 48px, 0 0; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 24px 6px;
  touch-action: pan-y;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 24px 36px;
  align-items: start;
}

.hero-copy {
  position: relative;
  text-align: center;
  /* title starts ~9% of the sun's width below the sun's top edge */
  padding: 7.8% 8px 10px;
}
/*
 * Setting sun: the top 35% of a circle, cut flat just above the tagline.
 * Width is 89% of the column; height follows from the 100/35 ratio.
 */
.hero-sun {
  position: absolute;
  left: 50%;
  top: 0;
  width: 89%;
  aspect-ratio: 100 / 35;
  transform: translateX(-50%);
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 16px rgba(255, 110, 40, 0.35)) drop-shadow(0 6px 18px rgba(255, 30, 110, 0.35));
}
.hero-sun::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  /* stops are on the full circle; only the top 35% is visible */
  background: linear-gradient(to bottom,
    #f5e600 0%, #f1e000 1.5%, #ffc30b 4%, #ffb200 7.5%, #ff9a12 13%, #ff8a1c 18%,
    #f0571b 22%, #fe5433 27.5%, #f73e3b 29%, #e13157 31%, #f81751 32.5%, #f5085a 34%, #f5085a 100%);
  -webkit-mask-image:
    linear-gradient(#000 0 22%, transparent 22%),
    repeating-linear-gradient(to bottom, #000 0 17px, transparent 17px 22px);
          mask-image:
    linear-gradient(#000 0 22%, transparent 22%),
    repeating-linear-gradient(to bottom, #000 0 17px, transparent 17px 22px);
}
.hero-copy > :not(.hero-sun) { position: relative; z-index: 1; }

.hero-title {
  font-family: var(--font-pixel);
  font-size: clamp(22px, 3.9vw, 56px);
  line-height: 1.1;
  white-space: nowrap;
  color: #fff;
  text-shadow:
    0 0 6px var(--cyan),
    0 0 20px var(--cyan),
    4px 4px 0 var(--pink),
    8px 8px 0 var(--purple);
  animation: title-flicker 4s linear infinite;
}
.hero-title .l1,
.hero-title .l2 { display: block; }
@keyframes title-flicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: 0.6; }
  98% { opacity: 1; }
  99% { opacity: 0.7; }
}

.hero-tag {
  margin-top: 18px;
  font-family: var(--font-pixel);
  font-size: clamp(11px, 1.5vw, 19px);
  letter-spacing: 1px;
  line-height: 1.5;
  white-space: nowrap;
}
.hero-tag .t1 { color: var(--cyan); text-shadow: 0 0 10px rgba(0, 240, 255, 0.6), 2px 2px 0 #3a1048, 0 0 2px #05010d; }
.hero-tag .t2 { color: var(--orange); text-shadow: 0 0 10px rgba(255, 107, 0, 0.6), 2px 2px 0 #3a1048, 0 0 2px #05010d; }

.hero-sub {
  margin-top: 16px;
  font-family: var(--font-pixel);
  font-size: clamp(7px, 1vw, 11px);
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.8;
  text-shadow: 0 0 6px #05010d, 0 0 2px #05010d, 1px 1px 0 #05010d;
}

/* ----- featured deck ----- */
.hero-deck-wrap {
  position: relative;
  padding: 6px 76px 8px 0;
  --peek: 26px;   /* horizontal step between stacked cards; 3 steps must fit in the right padding */
}
.hero-deck {
  position: relative;
  aspect-ratio: 16 / 9.3;
}
.hero-card {
  position: absolute;
  inset: 0;
  display: block;
  color: inherit;
  text-decoration: none;
  transform-origin: 100% 50%;
  filter: drop-shadow(0 0 10px var(--glow));
  transition:
    transform 0.55s cubic-bezier(0.2, 0.75, 0.2, 1),
    opacity 0.5s ease,
    filter 0.5s ease;
  will-change: transform, opacity;
}
.hero-card[data-pos="0"] { transform: none; opacity: 1; z-index: 5; }
.hero-card[data-pos="1"] {
  transform: translateX(var(--peek)) scale(0.94);
  opacity: 0.9;
  z-index: 4;
  filter: drop-shadow(0 0 6px var(--glow)) brightness(0.7);
  cursor: pointer;
}
.hero-card[data-pos="2"] {
  transform: translateX(calc(var(--peek) * 2)) scale(0.88);
  opacity: 0.75;
  z-index: 3;
  filter: drop-shadow(0 0 4px var(--glow)) brightness(0.5);
  cursor: pointer;
}
.hero-card[data-pos="back"] {
  transform: translateX(calc(var(--peek) * 3)) scale(0.82);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-card.is-leaving {
  transform: translate(-7%, 10%) rotate(-6deg) scale(0.97);
  opacity: 0;
  z-index: 6;
  pointer-events: none;
}
.hero-card.no-anim { transition: none !important; }

.hc {
  --c: 18px;
  --bw: 3px;
  --cut: var(--c);
  height: 100%;
  padding: var(--bw);
  background: var(--tone);
  clip-path: var(--chamfer);
}
.hc-in {
  position: relative;
  height: 100%;
  --cut: calc(var(--c) - var(--bw) * 0.4142);
  clip-path: var(--chamfer);
  background: #05010d;
  overflow: hidden;
}
.hc-in img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.12) contrast(1.04);
}
.hc-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(5, 1, 13, 0.94) 0%, rgba(5, 1, 13, 0.6) 30%, rgba(5, 1, 13, 0) 58%),
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.18) 2px 4px);
}
.hc-copy {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  transition: opacity 0.35s ease;
}
.hero-card:not([data-pos="0"]) .hc-copy { opacity: 0; }
.hc-label {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--yellow);
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(255, 230, 0, 0.5);
}
.hc-title {
  font-family: var(--font-pixel);
  font-size: clamp(14px, 2.1vw, 24px);
  color: var(--yellow);
  letter-spacing: 1px;
  line-height: 1.3;
  margin: 8px 0 14px;
  text-shadow: 0 0 12px rgba(255, 230, 0, 0.55), 3px 3px 0 #7a0040;
}
.hc-play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #05010d;
  background: var(--yellow);
  padding: 11px 30px;
  --cut: 7px;
  clip-path: var(--chamfer);
  transition: background 0.12s;
}
.hero-card:hover .hc-play { background: #fff; }
.play-tri {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 8px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.hero-dots {
  position: absolute;
  right: calc(76px + 24px);
  bottom: calc(8px + 22px);
  z-index: 7;
  display: flex;
  gap: 8px;
}
.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  background: var(--cyan);
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.6);
  cursor: pointer;
}
.hero-dots button.is-on {
  background: var(--yellow);
  box-shadow: 0 0 8px rgba(255, 230, 0, 0.8);
}

.hero-next {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 78px;
  border: 0;
  padding: 0;
  cursor: pointer;
  z-index: 7;
  --c: 9px;
  --bw: 2px;
  --cut: var(--c);
  background: var(--cyan);
  clip-path: var(--chamfer);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-next::before {
  content: '';
  position: absolute;
  inset: var(--bw);
  z-index: -1;
  background: #0b0518;
  --cut: calc(var(--c) - var(--bw) * 0.4142);
  clip-path: var(--chamfer);
}
.hero-next::after {
  content: '';
  width: 14px;
  height: 14px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform: translateX(-3px) rotate(45deg);
}
.hero-next:hover { background: var(--yellow); color: var(--yellow); }

/* ---------- explore ---------- */
.explore {
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 24px 48px;
}

.explore-top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.explore-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-pixel);
  font-size: 13px;
  letter-spacing: 1px;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 0 8px var(--cyan), 0 0 18px rgba(0, 240, 255, 0.4);
}
.explore-title::before {
  content: '';
  width: 5px;
  height: 20px;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
}

.search {
  flex: 1 1 200px;
  position: relative;
  min-width: 180px;
  --c: 8px;
  --bw: 2px;
  --cut: var(--c);
  padding: var(--bw);
  background: rgba(255, 255, 255, 0.85);
  clip-path: var(--chamfer);
  transition: background 0.12s;
}
.search:focus-within { background: var(--cyan); }
.search input {
  display: block;
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 0;
  background: #0b0518;
  color: #fff;
  --cut: calc(var(--c) - var(--bw) * 0.4142);
  clip-path: var(--chamfer);
  padding: 0 14px 0 44px;
  font-family: var(--font-body);
  font-size: 21px;
  letter-spacing: 1px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.search input::placeholder { color: var(--dim); }
.search input::-webkit-search-cancel-button { filter: invert(1); }
.search .mag {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  border: 2px solid #fff;
  border-radius: 50%;
  pointer-events: none;
}
.search .mag::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 2px;
  background: #fff;
  right: -7px;
  bottom: -1px;
  transform: rotate(45deg);
}

.explore-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* chamfered chip: outer bg = border, ::before = fill */
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  --c: 9px;
  --bw: 2px;
  --cut: var(--c);
  --chip-line: rgba(255, 255, 255, 0.85);
  --chip-fill: #0b0518;
  background: var(--chip-line);
  clip-path: var(--chamfer);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 0.4px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.12s, background 0.12s;
}
.chip::before {
  content: '';
  position: absolute;
  inset: var(--bw);
  z-index: -1;
  background: var(--chip-fill);
  --cut: calc(var(--c) - var(--bw) * 0.4142);
  clip-path: var(--chamfer);
  transition: background 0.12s;
}
.chip:hover { --chip-line: var(--cyan); color: var(--cyan); }
.chip.is-on {
  --chip-line: var(--yellow);
  --chip-fill: var(--yellow);
  color: #05010d;
}
.chip.is-on:hover { --chip-line: #fff; --chip-fill: #fff; color: #05010d; }
.chip .ico {
  width: 16px;
  height: 16px;
  background: currentColor;
  image-rendering: pixelated;
  flex: 0 0 auto;
}

.chip .ico-addons { -webkit-mask: url('../images/hub/icon-addons.png') center / contain no-repeat; mask: url('../images/hub/icon-addons.png') center / contain no-repeat; }
.chip .ico-spade { -webkit-mask: url('../images/hub/icon-spade.png') center / contain no-repeat; mask: url('../images/hub/icon-spade.png') center / contain no-repeat; }
.chip .ico-heart { -webkit-mask: url('../images/hub/icon-heart-outline.png') center / contain no-repeat; mask: url('../images/hub/icon-heart-outline.png') center / contain no-repeat; }
.chip .ico-game { -webkit-mask: url('../images/hub/icon-gamepad.png') center / contain no-repeat; mask: url('../images/hub/icon-gamepad.png') center / contain no-repeat; }
.chip .ico-chess { -webkit-mask: url('../images/hub/icon-chess.png') center / contain no-repeat; mask: url('../images/hub/icon-chess.png') center / contain no-repeat; }
.chip .ico-flags { -webkit-mask: url('../images/hub/icon-flags.png') center / contain no-repeat; mask: url('../images/hub/icon-flags.png') center / contain no-repeat; }
.chip .ico-puzzle { -webkit-mask: url('../images/hub/icon-puzzle.png') center / contain no-repeat; mask: url('../images/hub/icon-puzzle.png') center / contain no-repeat; }
.chip .ico-castle { -webkit-mask: url('../images/hub/icon-castle.png') center / contain no-repeat; mask: url('../images/hub/icon-castle.png') center / contain no-repeat; }
.chip .ico-ball { -webkit-mask: url('../images/hub/icon-ball.png') center / contain no-repeat; mask: url('../images/hub/icon-ball.png') center / contain no-repeat; }

.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin-top: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 240, 255, 0.55) transparent;
}
.filters::-webkit-scrollbar { height: 6px; }
.filters::-webkit-scrollbar-track { background: transparent; }
.filters::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, 0.45); }
.filters .chip { flex: 0 0 auto; }

.view-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.4px;
}
.view-btns { display: flex; gap: 4px; }
.view-btn {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  padding: 6px;
}
.view-btn:hover { color: var(--cyan); }
.view-btn.is-on { color: var(--yellow); filter: drop-shadow(0 0 4px rgba(255, 230, 0, 0.7)); }
.view-btn svg { display: block; width: 100%; height: 100%; fill: currentColor; }

/* ---------- game cards ---------- */
/*
 * Tracks are minmax(0, 1fr), never bare 1fr: WebKit fed the aspect-ratio
 * thumb's transferred size back into the track's min-content each layout
 * pass, so cards grew wider on every scroll on iOS.
 */
.games {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 16px;
}
.games.is-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.game-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  filter: drop-shadow(0 0 7px var(--glow));
  transition: transform 0.15s steps(3), filter 0.15s;
}
.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-6px);
  filter: drop-shadow(0 0 14px var(--glow));
  color: inherit;
  outline: none;
}
.game-card:hover .game-title,
.game-card:focus-visible .game-title {
  animation: blink 0.5s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* flex-grow instead of height:100% — no percentage heights in the cycle */
.gc {
  --c: 12px;
  --bw: 3px;
  --cut: var(--c);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--bw);
  background: var(--tone);
  clip-path: var(--chamfer);
}
.gc-in {
  --cut: calc(var(--c) - var(--bw) * 0.4142);
  clip-path: var(--chamfer);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #0b0518;
  box-shadow: inset 0 0 26px var(--tint);
}

.game-thumb {
  position: relative;
  margin: 9px 9px 0;
  min-width: 0;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.22);
}
.game-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15) contrast(1.05);
}
.game-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.22) 2px 4px);
}
.game-thumb .placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--purple);
  text-shadow: 0 0 14px var(--purple);
  background: radial-gradient(ellipse at center, #1a0a2a 0%, #000 80%);
}

.fav {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  padding: 0;
  --cut: 6px;
  clip-path: var(--chamfer);
  background: rgba(5, 1, 13, 0.72);
  cursor: pointer;
  z-index: 2;
}
.fav:hover { background: rgba(5, 1, 13, 0.92); }
.fav .ico {
  display: block;
  width: 15px;
  height: 15px;
  margin: 0 auto;
  background: #fff;
  -webkit-mask: url('../images/hub/icon-heart-outline.png') center / contain no-repeat;
          mask: url('../images/hub/icon-heart-outline.png') center / contain no-repeat;
}
.fav.is-on .ico {
  background: var(--pink);
  -webkit-mask-image: url('../images/hub/icon-heart.png');
          mask-image: url('../images/hub/icon-heart.png');
  filter: drop-shadow(0 0 4px var(--pink));
}

.game-body { padding: 12px 11px 10px; }
.game-title {
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: 0.5px;
  line-height: 1.45;
  margin-bottom: 6px;
  color: var(--tone);
  text-shadow: 0 0 10px var(--glow);
}
.game-meta {
  font-size: 17px;
  color: #d8d0f0;
  letter-spacing: 0.5px;
  line-height: 1.25;
}
.game-meta .cat { color: #fff; }

.game-play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: auto 9px 9px;
  padding: 9px 0;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--ink);
  background: var(--tone);
  --cut: 6px;
  clip-path: var(--chamfer);
}
.game-play .play-tri {
  border-left-width: 7px;
  border-top-width: 4.5px;
  border-bottom-width: 4.5px;
}

.games.is-list .gc-in {
  flex-direction: row;
  align-items: stretch;
}
.games.is-list .game-thumb {
  width: 260px;
  flex: 0 0 260px;
  aspect-ratio: auto;
  min-height: 130px;
  margin: 9px;
}
.games.is-list .game-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px;
}
.games.is-list .game-play {
  margin: auto 14px auto 0;
  padding: 12px 20px;
  align-self: center;
}

.games-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--purple);
  text-shadow: 0 0 10px var(--purple);
  line-height: 1.7;
}

/* ---------- shop panel (Add-ons Depot) ---------- */
.hub-shop {
  display: none;
  margin: 22px 0 8px;
  scroll-margin-top: calc(var(--nav-h) + 16px);
  border: 2px solid #5a2a78;
  background:
    linear-gradient(180deg, rgba(40, 8, 48, 0.55) 0%, rgba(8, 4, 20, 0.92) 28%),
    rgba(8, 4, 20, 0.92);
  box-shadow:
    0 0 0 1px rgba(255, 45, 149, 0.18),
    0 0 28px rgba(176, 38, 255, 0.22),
    inset 0 0 40px rgba(0, 0, 0, 0.35);
  padding: 20px 16px 16px;
}
.hub-shop.open { display: block; }
.hub-shop-head {
  font-family: var(--font-pixel);
  font-size: clamp(12px, 2.2vw, 16px);
  color: var(--pink);
  text-align: center;
  letter-spacing: 3px;
  text-shadow: 0 0 10px rgba(255, 45, 149, 0.55);
  margin-bottom: 6px;
}
.hub-shop-sub {
  text-align: center;
  font-size: 18px;
  color: #8a82a8;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.hub-shop-credits {
  text-align: center;
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--yellow);
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(255, 230, 0, 0.4);
  margin-bottom: 8px;
}
.hub-shop-msg {
  text-align: center;
  min-height: 22px;
  font-size: 18px;
  color: var(--yellow);
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.shop-aisles { display: flex; flex-direction: column; gap: 22px; }
.shop-aisle {
  border: 1px solid #3d3658;
  background: rgba(0, 0, 0, 0.28);
  padding: 0 12px 14px;
}
.shop-aisle-head {
  position: relative;
  margin: 0 -12px 14px;
  min-height: 132px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid #3d3658;
}
.shop-aisle-thumb { position: absolute; inset: 0; background: #000; }
.shop-aisle-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: saturate(1.2) contrast(1.06);
}
.shop-aisle-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(8, 4, 20, 0.9) 0%, rgba(8, 4, 20, 0.2) 42%, rgba(8, 4, 20, 0) 70%),
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.16) 2px 4px);
  pointer-events: none;
}
.shop-aisle-copy { position: relative; z-index: 1; padding: 14px 16px 12px; }
.shop-aisle-name {
  font-family: var(--font-pixel);
  font-size: clamp(12px, 2vw, 16px);
  color: #fff;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.45), 2px 2px 0 #3a1048;
  margin-bottom: 4px;
}
.shop-aisle-tag { font-size: 18px; color: #d8d0f0; letter-spacing: 1px; text-shadow: 0 1px 0 #000; }
.shop-aisle-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.shop-card {
  border: 1px solid #4a4268;
  background: rgba(0, 0, 0, 0.45);
  padding: 0 0 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  transition: transform 0.15s steps(3), box-shadow 0.15s, border-color 0.15s;
}
.shop-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.22);
}
.shop-card.owned { border-color: #2f6b4a; }
.shop-card.owned:hover { border-color: #4ad080; box-shadow: 0 0 14px rgba(74, 208, 128, 0.2); }
.shop-card-stage {
  position: relative;
  background: #000;
  border-bottom: 1px solid #3d3658;
  overflow: hidden;
}
.shop-card-stage canvas,
.shop-card-stage img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
}
.shop-card-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.22) 2px 4px);
  pointer-events: none;
}
.shop-card-stamp {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 1px;
  color: #7dcea0;
  border: 2px solid #7dcea0;
  background: rgba(8, 24, 16, 0.72);
  padding: 4px 6px;
  transform: rotate(8deg);
}
.shop-card .sn {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: #fff;
  line-height: 1.45;
  letter-spacing: 1px;
  padding: 10px 10px 0;
}
.shop-card .sd {
  font-size: 16px;
  color: #8a82a8;
  line-height: 1.3;
  flex: 1;
  padding: 0 10px;
}
.shop-card .sp {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--yellow);
  letter-spacing: 1px;
  padding: 2px 10px 0;
}
.shop-card button {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 1px;
  border: 1px solid var(--cyan);
  background: transparent;
  color: var(--cyan);
  padding: 8px 6px;
  margin: 0 10px;
  cursor: pointer;
}
.shop-card button:hover:not(:disabled) { color: #fff; border-color: #fff; }
.shop-card button:disabled {
  border-color: #3d3658;
  color: #6f6790;
  cursor: default;
}
.shop-card.owned button { border-color: #2f6b4a; color: #7dcea0; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .games { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .view-toggle span { display: none; }
}
@media (max-width: 920px) {
  .hero { padding-top: 12px; }
  .hero-inner { grid-template-columns: 1fr; gap: 18px; }
  .hero-copy { padding: 5.5% 8px 12px; }
  .hero-sun { width: 62%; }
  .hero-deck-wrap { max-width: 620px; margin: 0 auto; width: 100%; }
}
@media (max-width: 820px) {
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .games.is-list .game-thumb { width: 180px; flex-basis: 180px; min-height: 110px; }
}

@media (max-width: 560px) {
  .explore { padding: 8px 14px 24px; }
  .hero { padding: 10px 14px 28px; }
  .hero-copy { padding: 8% 8px 12px; }
  .hero-title { font-size: clamp(20px, 8.4vw, 34px); }
  .hero-sun { width: 89%; }
  .hero-sun::before {
    -webkit-mask-image:
      linear-gradient(#000 0 22%, transparent 22%),
      repeating-linear-gradient(to bottom, #000 0 11px, transparent 11px 15px);
            mask-image:
      linear-gradient(#000 0 22%, transparent 22%),
      repeating-linear-gradient(to bottom, #000 0 11px, transparent 11px 15px);
  }
  .hub-floor { height: 520px; }
  .hero-deck-wrap { padding: 10px 54px 8px 0; --peek: 16px; }
  .hero-deck { aspect-ratio: 16 / 9; }
  .hero-next { width: 36px; height: 62px; }
  .hero-dots { right: calc(54px + 16px); bottom: calc(8px + 14px); }
  .hc { --c: 12px; }
  .hc-copy { left: 16px; right: 16px; bottom: 14px; }
  .hc-play { padding: 9px 18px; font-size: 9px; }
  .games { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .games.is-list .gc-in { flex-direction: column; }
  .games.is-list .game-thumb { width: auto; flex-basis: auto; aspect-ratio: 16 / 9; margin: 9px 9px 0; }
  .games.is-list .game-play { margin: auto 9px 9px; padding: 9px 0; align-self: stretch; }
  .filters { gap: 6px; }
  .chip { height: 36px; font-size: 8px; padding: 0 12px; }
  .explore-title { font-size: 11px; }
  .shop-aisle-head { min-height: 96px; }
  .shop-aisle-items { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-card, .hc-copy, .game-card { transition: none; }
  .hero-title { animation: none; }
  .hub-grid { animation: none; }
  .game-card:hover .game-title { animation: none; }
}
