/* =====================================================================
   THEME: Ocean / Aquatic Deep-Sea — 深海海洋主题
   Palette: deep navy/teal abyss + turquoise/aqua glow + coral & bio-lume
   accents. Wave shapes, bubble clusters, current ripples, all via pure
   CSS gradients/shapes. No external images/fonts/scripts.
   ===================================================================== */
:root {
  --bg-0: #031321;
  --bg-1: #052235;
  --deep: #01111d;
  --teal: #17e9c9;
  --aqua: #4fd7ff;
  --coral: #ff7a5c;
  --biolume: #b9ffea;
  --ink: #eaf9ff;
  --ink-dim: #9fc4d4;
  --panel: rgba(8, 44, 66, .55);
  --panel-brd: rgba(79, 215, 255, .25);
  --font-mono: 'Courier New', 'Consolas', monospace;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse at 20% 0%, #0a3a54 0%, transparent 55%),
    radial-gradient(ellipse at 90% 20%, #073349 0%, transparent 50%),
    linear-gradient(180deg, #052436 0%, #021926 45%, #010e18 100%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.4;
  padding-bottom: 24px;
  overflow-x: hidden;
  position: relative;
  /* Mobile-frame experience (SPEC §4.3 + user requirement: PC = mobile strictly).
     On PC, content is capped at 480px so the layout is *identical* to a 480px
     phone — no side decoration, no shadow frame, no PC-specific design. The
     area outside the 480px column shows the html background. body::before stays
     full-viewport because it's `position: fixed`. */
  max-width: 480px;
  margin: 0 auto;
}
/* The viewport's empty side area on PC inherits from <html>. Match the page
   background so the 480px content column looks like a strict subset of a
   480px mobile screen, not a phone-shaped island. */
html { background: #021926; }
/* Rising bubbles + light-ray overlay, pure CSS */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(6px 6px at 10% 90%, rgba(185,255,234,.18) 0, transparent 70%),
    radial-gradient(4px 4px at 80% 75%, rgba(79,215,255,.22) 0, transparent 70%),
    radial-gradient(3px 3px at 55% 95%, rgba(255,255,255,.2) 0, transparent 70%),
    radial-gradient(5px 5px at 30% 60%, rgba(79,215,255,.15) 0, transparent 70%),
    radial-gradient(3px 3px at 92% 40%, rgba(185,255,234,.16) 0, transparent 70%);
  opacity: .9;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(115deg, transparent 40%, rgba(79,215,255,.05) 48%, transparent 56%),
    linear-gradient(105deg, transparent 60%, rgba(185,255,234,.04) 68%, transparent 76%);
}
[v-cloak] { display: none; }
a { color: inherit; text-decoration: none; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
::-webkit-scrollbar { display: none; }

/* ===== Top Bar ===== */
.topbar {
  position: static; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(180deg, #04283d 0%, #021c2c 100%);
  border-bottom: 2px solid var(--teal);
  box-shadow: 0 3px 10px rgba(0,0,0,.4), 0 2px 0 rgba(79,215,255,.3);
}
.topbar-logo {
  font-family: var(--font-mono); font-size: 17px; font-weight: 700; letter-spacing: .03em;
  color: var(--biolume);
  text-shadow: 0 0 8px rgba(23,233,201,.7), 0 0 2px var(--aqua);
}
.topbar-search-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 30%, #0d3c56, #052235);
  color: var(--aqua);
  border: 1px solid var(--panel-brd);
  box-shadow: inset 0 0 6px rgba(79,215,255,.25);
}
/* ===== Category Tabs (porthole pills) ===== */
.cat-tabs {
  position: static; top: 60px; z-index: 30;
  background: rgba(2,25,38,.9); border-bottom: 1px solid var(--panel-brd);
  overflow-x: auto; white-space: nowrap;
}
.cat-tabs-inner { display: inline-flex; gap: 8px; padding: 10px 16px; }
.cat-tab {
  flex-shrink: 0; padding: 7px 16px; border-radius: 999px;
  background: linear-gradient(180deg, #0a3448, #062639); color: var(--ink-dim); font-size: 12px; font-weight: 700; font-family: var(--font-mono);
  border: 1px solid var(--panel-brd);
}
.cat-tab.active {
  background: linear-gradient(180deg, var(--teal), #0e9f8a); color: #012019;
  border-color: var(--teal);
  box-shadow: 0 0 10px rgba(23,233,201,.6), 0 0 0 2px rgba(79,215,255,.3) inset;
}
/* ===== Search ===== */
.search-bar-wrap {
  position: static; top: 60px; z-index: 30;
  display: flex; gap: 8px; padding: 10px 16px;
  background: rgba(2,25,38,.92); border-bottom: 1px solid var(--panel-brd);
}
.search-input {
  flex: 1; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--panel-brd);
  background: var(--bg-1); color: var(--ink); font-size: 14px; font-family: var(--font-mono);
}
.search-cancel { font-size: 13px; color: var(--aqua); font-weight: 700; padding: 0 4px; font-family: var(--font-mono); }
/* ===== Loading (bubble spinner) ===== */
.loading-full { display: flex; align-items: center; justify-content: center; padding: 80px 0; }
.loading-ring {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(79,215,255,.2); border-top-color: var(--teal); border-right-color: var(--biolume);
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 12px rgba(23,233,201,.4);
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes glowpulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
/* ===== Section spacing ===== */
section[class$="-sec"] { margin-bottom: 32px; }
/* ===== Section Header ===== */
.sec-hd { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 10px; }
.sec-label {
  font-size: 14px; font-weight: 700; color: var(--ink); font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: .04em;
  border-left: 3px solid var(--teal); padding-left: 8px;
  text-shadow: 0 0 6px rgba(23,233,201,.35);
}
.sec-more { font-size: 11px; color: var(--aqua); font-weight: 700; font-family: var(--font-mono); text-transform: uppercase; }
.sec-cnt { font-size: 12px; color: var(--ink-dim); font-family: var(--font-mono); }
/* ===== Featured ===== */
.featured-sec { padding: 12px 16px 0; }

/* ===== Generic responsive icon grid (Browse Channels porthole + All Games tidal grid) ===== */
.all-grid, .games-grid, .channel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 16px 8px;
}
@media (min-width: 480px) {
  .all-grid, .games-grid, .channel-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 860px) {
  .all-grid, .games-grid, .channel-grid { grid-template-columns: repeat(8, 1fr); }
}
.agcard, .gcard, .channel-card { cursor: pointer; min-width: 0; }
.agcard-img, .gcard-img {
  aspect-ratio: 1/1 !important; width: 100%; height: auto; overflow: hidden;
  border-radius: 10px; border: 1px solid var(--panel-brd); position: relative;
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
}
/* Channel Grid = porthole circular icons */
.channel-img {
  aspect-ratio: 1/1 !important; width: 100%; height: auto; overflow: hidden;
  border-radius: 50% !important; position: relative;
  border: 3px solid #0a3448;
  box-shadow: 0 0 0 2px var(--teal), inset 0 0 10px rgba(0,0,0,.5), 0 4px 10px rgba(0,0,0,.4);
}
.agcard-img img, .gcard-img img, .channel-img img { width: 100%; height: 100%; object-fit: cover; }
.agcard-nm, .gcard-nm, .channel-nm {
  font-size: 11px; margin-top: 5px; text-align: center; color: var(--ink-dim); font-family: var(--font-mono);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.channel-ch {
  position: absolute; top: 3px; left: 3px; font-size: 8px; font-weight: 700; color: var(--deep);
  background: var(--biolume); padding: 1px 5px; border-radius: 999px; font-family: var(--font-mono);
}
/* ===== Load more ===== */
.more-wrap, .loadmore-wrap { display: flex; justify-content: center; padding: 16px; }
.more-btn, .loadmore-btn {
  padding: 10px 24px; border-radius: 999px; background: linear-gradient(180deg, #0a3448, #052235); color: var(--biolume);
  font-size: 12px; font-weight: 700; border: 1px solid var(--teal); font-family: var(--font-mono); text-transform: uppercase;
  box-shadow: 0 0 10px rgba(23,233,201,.25);
}
/* ===== Filter header ===== */
.filter-hdr { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.filter-back { font-size: 12px; color: var(--aqua); font-weight: 700; font-family: var(--font-mono); }
.filter-title { flex: 1; font-size: 15px; font-weight: 700; color: var(--ink); font-family: var(--font-mono); }
.filter-cnt { font-size: 12px; color: var(--ink-dim); font-family: var(--font-mono); }
.empty-msg { text-align: center; padding: 60px 0; color: var(--ink-dim); font-size: 13px; font-family: var(--font-mono); }
/* ===== Footer ===== */
.site-footer { display: flex; justify-content: center; gap: 10px; padding: 24px 16px; font-size: 12px; color: var(--ink-dim); font-family: var(--font-mono); }
/* ===== Back to top (anchor button) ===== */
.totop-btn {
  position: fixed; right: 16px; bottom: 20px; z-index: 50;
  width: 42px; height: 42px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--teal), #0a6656);
  color: var(--deep); font-size: 16px; font-weight: 700;
  border: 1px solid var(--biolume);
  box-shadow: 0 0 14px rgba(23,233,201,.55), 0 4px 10px rgba(0,0,0,.4);
}

/* =====================================================================
   14 SECTION LAYOUTS (all distinct ocean layout mechanics)
   ===================================================================== */

/* Hero — wave-shaped banner */
.feat-split2 {
  display: flex; border-radius: 18px 18px 30px 30px; overflow: hidden; cursor: pointer;
  background: linear-gradient(135deg, #0a3c58, #052235); min-height: 130px; max-height: 180px;
  border: 1px solid var(--panel-brd);
  position: relative;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.feat-split2::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -6px; height: 22px; z-index: 2;
  background:
    radial-gradient(circle at 10px 0, transparent 12px, rgba(5,34,53,.9) 13px) repeat-x;
  background-size: 24px 24px;
}
.feat-split2-body { flex: 1; min-width: 0; padding: 16px; display: flex; flex-direction: column; justify-content: center; gap: 6px; position: relative; z-index: 3; }
.feat-split2-badge { align-self: flex-start; font-size: 10px; font-weight: 700; background: linear-gradient(90deg, var(--teal), var(--aqua)); color: #012019; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; font-family: var(--font-mono); }
.feat-split2-title { font-size: 18px; font-weight: 800; font-family: var(--font-mono); color: var(--ink); text-shadow: 0 0 8px rgba(79,215,255,.35); }
.feat-split2-desc { font-size: 12px; color: var(--ink-dim); }
.feat-split2-img { width: 42%; flex-shrink: 0; }
.feat-split2-img img { width: 100%; height: 100%; object-fit: cover; }

/* 1) Hot Games — bubble cluster (1 big bubble + 4 small bubbles) */
.hotmason { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; padding: 0 16px; grid-template-rows: 150px 150px; }
.hotmason-item { min-width: 0; border-radius: 50%; overflow: hidden; position: relative; cursor: pointer; border: 2px solid var(--panel-brd); box-shadow: 0 0 0 3px rgba(79,215,255,.12), 0 6px 14px rgba(0,0,0,.4); animation: bob 3.4s ease-in-out infinite; max-height: 150px; }
.hotmason-item:nth-child(2) { animation-delay: .3s; }
.hotmason-item:nth-child(3) { animation-delay: .6s; }
.hotmason-item:nth-child(4) { animation-delay: .9s; }
.hotmason-item:nth-child(5) { animation-delay: 1.2s; }
.hotmason-item:first-child { grid-row: span 2; border-radius: 24px; max-height: 308px; /* 2 rows × 150 + 8 gap */ }
.hotmason-img { aspect-ratio: 1/1; max-height: inherit; overflow: hidden; }
.hotmason-img img { width: 100%; height: 100%; object-fit: cover; }
.hotmason-nm {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 8px; font-size: 10px; color: var(--ink); font-family: var(--font-mono);
  background: linear-gradient(transparent, rgba(1,17,29,.9)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
}
.hotmason-rec {
  position: absolute; top: 6px; left: 6px; display: flex; align-items: center; gap: 3px;
  font-size: 9px; font-weight: 700; color: var(--biolume); font-family: var(--font-mono); text-transform: uppercase;
}
.hotmason-rec::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 6px var(--teal); animation: glowpulse 1.4s infinite; }

/* 2) Spotlight Picks — coral-reef card list */
.star-list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.star-item {
  cursor: pointer; padding: 14px 14px 14px 20px; min-width: 0; position: relative;
  background: linear-gradient(120deg, rgba(255,122,92,.08), rgba(8,44,66,.5));
  border: 1px solid rgba(255,122,92,.25); border-radius: 4px 16px 16px 4px;
  border-left: 3px solid var(--coral);
}
.star-bullet { color: var(--coral); margin-right: 6px; font-family: var(--font-mono); }
.star-name { font-size: 14px; font-weight: 700; color: var(--ink); font-family: var(--font-mono); }
.star-cat { font-size: 10px; color: var(--biolume); margin-left: 8px; font-family: var(--font-mono); text-transform: uppercase; }
.star-desc { font-size: 12px; color: var(--ink-dim); margin-top: 4px; margin-left: 18px; }

/* 3) New Releases — tide-pool horizontal scroll */
.tape-row { display: flex; gap: 12px; padding: 4px 16px 14px; overflow-x: auto; }
.tape-card {
  flex: 0 0 118px; width: 118px; min-width: 0; overflow: hidden; cursor: pointer;
  background: var(--panel); border: 1px solid var(--panel-brd);
  border-radius: 50% 50% 12px 12px / 30% 30% 12px 12px;
  padding-bottom: 4px;
  box-shadow: 0 6px 14px rgba(0,0,0,.35);
}
.tape-img { aspect-ratio: 4/3; position: relative; border-radius: 50% 50% 0 0 / 40% 40% 0 0; overflow: hidden; }
.tape-img img { width: 100%; height: 100%; object-fit: cover; }
.tape-badge {
  position: absolute; top: 6px; right: 6px; font-size: 8px; font-weight: 700; color: var(--deep);
  background: var(--biolume); padding: 1px 6px; border-radius: 999px; font-family: var(--font-mono);
}
.tape-nm { font-size: 11px; padding: 6px 8px 2px; color: var(--ink); font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }

/* 4) Browse Channels — porthole circular grid, shares .channel-grid/.channel-card above */

/* 5) Action — treasure-chest ranking podium */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; padding: 12px 16px 6px; }
.podium-item { cursor: pointer; text-align: center; min-width: 0; }
.podium-item.p1 { width: 96px; order: 2; }
.podium-item.p2 { width: 72px; order: 1; }
.podium-item.p3 { width: 72px; order: 3; }
.podium-img {
  border-radius: 10px 10px 4px 4px; overflow: hidden; aspect-ratio: 1/1; position: relative;
  border: 2px solid var(--coral); box-shadow: 0 0 0 2px rgba(255,122,92,.2), 0 6px 14px rgba(0,0,0,.4);
  max-height: 110px;
}
.podium-item.p1 .podium-img { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(23,233,201,.3), 0 0 16px rgba(23,233,201,.35); }
.podium-rank {
  position: absolute; top: 3px; left: 3px; font-size: 10px; font-weight: 700; color: var(--deep);
  background: var(--biolume); padding: 0 6px; border-radius: 999px; font-family: var(--font-mono);
}
.podium-item::before { content: '⚓'; display: block; font-size: 11px; margin-bottom: 2px; opacity: .7; }
.podium-nm { font-size: 11px; margin-top: 5px; font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-dim); }

/* 6) Puzzle — seashell row */
.polaroid-row { display: flex; gap: 16px; padding: 14px 22px 18px; overflow-x: auto; }
.polaroid {
  flex: 0 0 92px; width: 92px; background: linear-gradient(160deg, #0d3c56, #052235);
  padding: 6px 6px 12px; border-radius: 50% 50% 8px 8px; border: 1px solid var(--panel-brd); cursor: pointer;
}
.polaroid-img { aspect-ratio: 1/1; overflow: hidden; border-radius: 50% 50% 6px 6px; }
.polaroid-nm { font-size: 9px; text-align: center; color: var(--ink-dim); margin-top: 4px; font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 7) Kids — tide-pool bubbles (flex-wrap round cards) */
.bubble-wrap { display: flex; gap: 14px; padding: 10px 16px 16px; flex-wrap: wrap; justify-content: center; }
.bubble-card {
  position: relative; flex: 1 1 26%; min-width: 84px; max-width: 110px; border-radius: 50%; padding: 10px; text-align: center; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, rgba(79,215,255,.16), rgba(8,44,66,.6));
  border: 1px solid var(--panel-brd);
  animation: bob 3.2s ease-in-out infinite;
}
.bubble-card:nth-child(2n) { animation-delay: .5s; }
.bubble-card:nth-child(3n) { animation-delay: 1s; }
.bubble-img { border-radius: 50%; overflow: hidden; aspect-ratio: 1/1; }
.bubble-nm { font-size: 10px; margin-top: 4px; font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-dim); }

/* 8) Sports — current-flow zigzag rows */
.zig-list { display: flex; flex-direction: column; gap: 14px; padding: 0 16px; position: relative; }
.zig-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.zig-row.rev { flex-direction: row-reverse; }
.zig-img { width: 70px; height: 70px; border-radius: 40% 60% 60% 40% / 50% 50% 50% 50%; overflow: hidden; flex-shrink: 0; border: 1px solid var(--panel-brd); }
.zig-img img { width: 100%; height: 100%; object-fit: cover; }
.zig-body { flex: 1; min-width: 0; }
.zig-row.rev .zig-body { text-align: right; }
.zig-nm { font-size: 14px; font-weight: 700; font-family: var(--font-mono); color: var(--ink); }
.zig-tag { font-size: 10px; color: var(--biolume); font-family: var(--font-mono); text-transform: uppercase; }
.zig-desc { font-size: 11px; color: var(--ink-dim); margin-top: 3px; }

/* 9) Adventure — deep-trench masonry grid */
.masonry-grid { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 56px; gap: 6px; padding: 0 16px; }
.masonry-item { min-width: 0; max-height: 140px; border-radius: 8px; overflow: hidden; cursor: pointer; position: relative; border: 1px solid var(--panel-brd); box-shadow: 0 4px 10px rgba(0,0,0,.4); }
.masonry-item img { width: 100%; height: 100%; object-fit: cover; }
.masonry-item:nth-child(3n+1) { grid-row: span 2; border-radius: 8px 8px 20px 8px; }
.masonry-nm { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: 10px; color: var(--ink); font-family: var(--font-mono); background: linear-gradient(transparent, rgba(1,17,29,.85)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 10) Racing — submarine banner */
.banner-single {
  position: relative; border-radius: 40px 12px 12px 40px; overflow: hidden; margin: 0 16px; aspect-ratio: 16/8; max-height: 160px; cursor: pointer;
  border: 1px solid var(--panel-brd); box-shadow: 0 8px 20px rgba(0,0,0,.4);
}
.banner-single::before {
  content: ""; position: absolute; top: 8px; left: 14px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(79,215,255,.35); border: 2px solid rgba(255,255,255,.4); z-index: 2;
}
.banner-single img { width: 100%; height: 100%; object-fit: cover; }
.banner-ovl { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; background: linear-gradient(transparent, rgba(1,17,29,.9)); }
.banner-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-bottom: 4px; background: linear-gradient(90deg, var(--teal), var(--aqua)); color: #012019; text-transform: uppercase; font-family: var(--font-mono); }
.banner-title { font-size: 16px; font-weight: 800; color: var(--ink); font-family: var(--font-mono); }
.banner-desc { font-size: 12px; color: var(--ink-dim); margin-top: 4px; }

/* 11) Girl — mermaid-scale list */
.mag-list { display: flex; flex-direction: column; gap: 8px; padding: 0 16px; }
.mag-row {
  display: flex; gap: 12px; cursor: pointer; padding: 12px; align-items: center;
  background: linear-gradient(100deg, rgba(23,233,201,.06), rgba(8,44,66,.5));
  border-radius: 0 20px 20px 0; border-left: 3px solid var(--biolume);
}
.mag-img { width: 58px; height: 58px; border-radius: 50% 50% 50% 4px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--panel-brd); }
.mag-img img { width: 100%; height: 100%; object-fit: cover; }
.mag-body { flex: 1; min-width: 0; }
.mag-nm { font-size: 14px; font-weight: 700; margin-bottom: 2px; font-family: var(--font-mono); color: var(--ink); }
.mag-desc { font-size: 11px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 12) Arcade — anchor-stack fanned cards */
.stack-row { display: flex; padding: 16px 20px 10px; justify-content: center; overflow-x: auto; }
.stack-card {
  width: 72px; flex-shrink: 0; aspect-ratio: 1/1; border-radius: 10px; overflow: hidden; margin-left: -16px;
  box-shadow: 0 6px 16px rgba(0,0,0,.5); cursor: pointer; border: 2px solid var(--bg-0); min-width: 0;
}
.stack-card:first-child { margin-left: 0; }
.stack-card:nth-child(1) { transform: rotate(-7deg); }
.stack-card:nth-child(2) { transform: rotate(4deg); }
.stack-card:nth-child(3) { transform: rotate(-3deg); }
.stack-card:nth-child(4) { transform: rotate(6deg); }
.stack-card:nth-child(5) { transform: rotate(-5deg); }
.stack-card img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Sort Bar (sticky under cat-tabs) ===== */
.sort-bar {
  position: sticky; top: 60px; z-index: 25;
  padding: 8px 16px;
  background: rgba(2, 25, 38, .92);
  border-bottom: 1px solid var(--panel-brd);
  backdrop-filter: blur(6px);
  overflow-x: auto; white-space: nowrap;
}
.sort-bar-inner { display: inline-flex; gap: 6px; max-width: 100%; }
.sort-bar::-webkit-scrollbar { display: none; }
.sort-btn {
  flex-shrink: 0; padding: 6px 12px; border-radius: 999px;
  background: linear-gradient(180deg, #0a3448, #062639);
  color: var(--ink-dim); font-size: 11px; font-weight: 700;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .03em;
  border: 1px solid var(--panel-brd);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.sort-btn:hover { color: var(--biolume); border-color: var(--aqua); }
.sort-btn.active {
  background: linear-gradient(180deg, var(--teal), #0e9f8a);
  color: #012019; border-color: var(--teal);
  box-shadow: 0 0 10px rgba(23, 233, 201, .5), 0 0 0 2px rgba(79, 215, 255, .25) inset;
}
.result-cnt {
  font-size: 11px; color: var(--ink-dim); font-family: var(--font-mono);
  padding: 6px 16px;
}

/* ===== Ad Slot (generic banner container for list.html) ===== */
.ad-slot-list {
  margin: 12px 16px; min-height: 50px;
  border: 1px dashed var(--panel-brd); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 44, 66, .35);
  position: relative; overflow: hidden;
}
.ad-slot-list .ad-label {
  position: absolute; top: 4px; left: 6px;
  font-size: 9px; color: var(--ink-dim);
  font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: .08em; pointer-events: none;
}

/* ===== Small-viewport refinements (≤ 480px viewport) =====
   The body itself is capped at 480px wide, but on phones with viewport
   ≤ 480px the available inner width can be 280-448px. These tweaks shrink
   the decorative sections further so they don't feel cramped. */
@media (max-width: 480px) {
  /* Top bar — smaller logo and padding */
  .topbar { padding: 10px 12px; }
  .topbar-logo { font-size: 15px; }
  /* Category tabs — slightly smaller */
  .cat-tabs-inner { padding: 8px 12px; gap: 6px; }
  .cat-tab { padding: 6px 12px; font-size: 11px; }
  /* Section header — tighter */
  .sec-hd { padding: 14px 12px 8px; }
  /* Section inner padding — slightly tighter */
  .all-grid, .games-grid, .channel-grid { padding: 0 12px 6px; gap: 8px; }
  /* Hot Games — even more compact */
  .hotmason { padding: 0 12px; grid-template-rows: 120px 120px; }
  .hotmason-item { max-height: 120px; }
  .hotmason-item:first-child { max-height: 248px; }
  /* Featured hero */
  .feat-split2 { min-height: 110px; max-height: 150px; }
  .feat-split2-title { font-size: 16px; }
  /* Other 1-col lists */
  .star-list, .tape-row, .polaroid-row, .bubble-wrap, .zig-list, .mag-list, .masonry-grid, .podium, .stack-row { padding-left: 12px; padding-right: 12px; }
  .polaroid { width: 76px; flex: 0 0 76px; }
  .tape-card { flex: 0 0 100px; width: 100px; }
  .bubble-card { min-width: 72px; max-width: 96px; }
  /* Podium — squish tighter */
  .podium { gap: 6px; }
  .podium-item.p1 { width: 84px; }
  .podium-item.p2, .podium-item.p3 { width: 64px; }
  /* Racing banner — keep short */
  .banner-single { margin: 0 12px; max-height: 130px; }
  /* Arcade stack — smaller, still fanned */
  .stack-card { width: 62px; }
  /* Sort bar */
  .sort-bar { padding: 6px 12px; }
  /* Footer / page chrome */
  .site-footer { padding: 20px 12px; font-size: 11px; }
  .totop-btn { right: 12px; bottom: 16px; width: 38px; height: 38px; }
  /* Empty state — smaller padding */
  .empty-msg { padding: 40px 16px; }
  /* Ad slot */
  .ad-slot-list { margin: 10px 12px; }
  /* Result counter */
  .result-cnt { padding: 6px 12px; }
  /* Drawer — slightly narrower on phones */
  .drawer { width: 240px; }
  .drawer-list a { padding: 12px 18px; font-size: 13px; }
}

/* ===== Top-bar Hamburger Button (drawer trigger) ===== */
.topbar-menu-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 30%, #0d3c56, #052235);
  color: var(--aqua);
  border: 1px solid var(--panel-brd);
  box-shadow: inset 0 0 6px rgba(79,215,255,.25);
  flex-shrink: 0;
}
.topbar-menu-btn:hover { color: var(--biolume); border-color: var(--aqua); }

/* ===== Side Drawer Navigation ===== */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(1, 17, 29, .65);
  backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden;
  transition: opacity .22s ease, visibility 0s linear .22s;
}
.drawer-overlay.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.drawer {
  position: fixed; top: 0; left: 0;
  width: 280px; max-width: 86vw; height: 100vh; height: 100dvh;
  background: linear-gradient(180deg, #04283d 0%, #021c2c 100%);
  border-right: 2px solid var(--teal);
  box-shadow: 6px 0 24px rgba(0,0,0,.55);
  z-index: 100;
  transform: translateX(-100%);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.drawer.is-open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--panel-brd);
  background: rgba(0,0,0,.25);
}
.drawer-title {
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  color: var(--biolume); text-transform: uppercase; letter-spacing: .04em;
  text-shadow: 0 0 8px rgba(23,233,201,.5);
}
.drawer-close {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(79,215,255,.1); color: var(--aqua);
  border: 1px solid var(--panel-brd);
  font-size: 18px; line-height: 1;
}
.drawer-close:hover { color: var(--biolume); border-color: var(--aqua); }
.drawer-list { list-style: none; padding: 8px 0; margin: 0; flex: 1; }
.drawer-list a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  color: var(--ink); font-family: var(--font-mono); font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid rgba(79,215,255,.08);
  text-decoration: none;
  transition: background .15s ease, color .15s ease, padding-left .15s ease;
}
.drawer-list a:hover, .drawer-list a:focus {
  background: linear-gradient(90deg, rgba(23,233,201,.12), transparent);
  color: var(--biolume);
  padding-left: 28px;
  outline: none;
}
.drawer-list .drawer-icon {
  font-size: 18px; width: 24px; text-align: center; flex-shrink: 0;
}
.drawer-list .drawer-section {
  padding: 14px 22px 6px;
  font-size: 10px; font-weight: 700; color: var(--ink-dim);
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em;
  border-bottom: 1px solid var(--panel-brd);
}
.drawer-foot {
  padding: 14px 22px;
  font-size: 10px; color: var(--ink-dim); font-family: var(--font-mono);
  text-align: center;
  border-top: 1px solid var(--panel-brd);
  background: rgba(0,0,0,.2);
}
