/* =====================================================================
   VECTARCADE — play-discovery.css
   Styles for the discovery layer added to /play/: the 6-mood front door,
   the Browse Collections heading, and the universal search bar + results.
   Loaded after play.css; neon palette matches the cabinet.
   ===================================================================== */

/* ---------------- Search bar (always visible, both views) ---------------- */
.search-bar {
  position: fixed; top: 9px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; z-index: 45;
  width: min(440px, 42vw); margin: 0; padding: 0; box-sizing: border-box;
}
.search-bar .search-icon {
  position: absolute; left: 14px; font-size: 15px; color: #66e0ff;
  pointer-events: none; text-shadow: 0 0 8px rgba(0, 229, 255, .5);
}
.search-input {
  flex: 1; height: 38px; padding: 0 38px 0 36px;
  background: rgba(5, 0, 16, .72); color: #eef0fb;
  border: 1px solid rgba(0, 255, 238, .35); border-radius: 13px;
  font: 600 14px/1 'Inter', system-ui, -apple-system, sans-serif;
  letter-spacing: .02em; outline: none;
  box-shadow: 0 0 16px rgba(0, 255, 238, .1) inset;
  -webkit-appearance: none; appearance: none;
}
.search-input::placeholder { color: #6c7390; font-weight: 500; }
.search-input:focus {
  border-color: rgba(0, 255, 238, .7);
  box-shadow: 0 0 22px rgba(0, 255, 238, .28);
}
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-clear {
  position: absolute; right: 8px; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 0, 170, .12); color: #ff7ce3;
  border: 1px solid rgba(255, 0, 170, .4); border-radius: 50%;
  font-size: 11px; cursor: pointer;
}

/* ---------------- Search results overlay ---------------- */
.search-results {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: 56px; width: min(560px, calc(100vw - 32px));
  max-height: 60vh; overflow-y: auto; z-index: 60;
  background: rgba(8, 2, 22, .96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 255, 238, .32); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 0 24px rgba(0, 255, 238, .14);
  padding: 6px;
}
.search-results.show { animation: srIn .16s ease; }
@keyframes srIn { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
.sr-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 12px; background: transparent; border: 0; border-radius: 10px;
  cursor: pointer; text-align: left; color: #eef0fb;
  font: 600 13px/1 'Inter', system-ui, sans-serif;
}
.sr-row.hi, .sr-row:hover { background: rgba(0, 255, 238, .1); }
.sr-title { font-weight: 800; letter-spacing: .04em; color: #fff; margin-right: 2px; }
.sr-pill {
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 20px;
  background: rgba(102, 224, 255, .12); color: #9fe6ff; border: 1px solid rgba(102, 224, 255, .25);
  white-space: nowrap;
}
.sr-mood { color: #c79bff; background: rgba(176, 38, 255, .14); border-color: rgba(176, 38, 255, .3); }
.sr-mood.mood-rush { color: #ff9bd0; background: rgba(255, 0, 170, .14); border-color: rgba(255, 0, 170, .3); }
.sr-mood.mood-relax, .sr-mood.mood-drift { color: #8ff5e6; background: rgba(0, 255, 238, .12); border-color: rgba(0, 255, 238, .3); }
.sr-mood.mood-compete { color: #ffd98a; background: rgba(255, 170, 0, .14); border-color: rgba(255, 170, 0, .32); }
.sr-meta { margin-left: auto; font-size: 11px; font-weight: 500; color: #8389a8; letter-spacing: .04em; white-space: nowrap; }
/* Elevated results — a little living art thumbnail + accent edge per row */
.sr-row { --accent: #00e5ff; }
.sr-art {
  flex: 0 0 auto; width: 46px; height: 30px; border-radius: 6px; overflow: hidden; position: relative;
  background: #06010f; border: 1px solid color-mix(in srgb, var(--accent) 32%, rgba(255,255,255,.08));
}
.sr-canvas { width: 100%; height: 100%; display: block; }
.sr-row.hi, .sr-row:hover { box-shadow: inset 3px 0 0 var(--accent); }
/* Designed empty state ("no signal") */
.sr-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; text-align: center; }
.sr-empty-glyph { font-size: 34px; color: #00ffee; opacity: .5; text-shadow: 0 0 16px rgba(0,255,238,.4); }
.sr-empty-title { font: 800 14px/1 'Inter', system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #cfe9ff; }
.sr-empty-sub { font: 500 12px/1.4 'Inter', system-ui, sans-serif; color: #8389a8; }

/* ---------------- Search scope: front door + ALL GAMES only ----------------
   Search belongs on the collections front door and the flat ALL GAMES
   gallery — the two screens where you're scanning the whole catalogue.
   The cabinet (view-games) and the per-mood destination (view-collection)
   are already curated and carry their own back affordances, so the universal
   search just crowds them there. Hide the bar and any open results overlay. */
body.view-games .search-bar,
body.view-games .search-results,
body.view-collection .search-bar,
body.view-collection .search-results { display: none !important; }

/* ---------------- Mood front door (collections view) ---------------- */
.mood-select {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  max-width: 920px; margin: 6px auto 22px; padding: 0 16px; width: 100%; box-sizing: border-box;
}
.mood-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 16px 16px 14px; cursor: pointer; text-align: left;
  background: linear-gradient(160deg, rgba(0, 255, 238, .06), rgba(176, 38, 255, .05));
  border: 1px solid rgba(0, 255, 238, .25); border-radius: 16px; color: #eef0fb;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.mood-card:hover, .mood-card:focus-visible {
  transform: translateY(-2px); border-color: rgba(0, 255, 238, .6);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .4), 0 0 20px rgba(0, 255, 238, .18); outline: none;
}
.mood-icon { font-size: 22px; color: #00ffee; text-shadow: 0 0 12px rgba(0, 255, 238, .6); }
.mood-name { font: 900 19px/1 'Anton', Impact, sans-serif; letter-spacing: .06em; color: #fff; }
.mood-tag { font-size: 11.5px; color: #9aa0bd; letter-spacing: .02em; }
.mood-count { font-size: 10px; font-weight: 700; letter-spacing: .14em; color: #66e0ff; text-transform: uppercase; margin-top: 2px; }
.mood-card.mood-rush { background: linear-gradient(160deg, rgba(255, 0, 170, .08), rgba(255, 23, 68, .05)); border-color: rgba(255, 0, 170, .28); }
.mood-card.mood-rush .mood-icon { color: #ff4fb0; text-shadow: 0 0 12px rgba(255, 0, 170, .6); }
.mood-card.mood-compete { background: linear-gradient(160deg, rgba(255, 170, 0, .08), rgba(255, 140, 0, .05)); border-color: rgba(255, 170, 0, .3); }
.mood-card.mood-compete .mood-icon { color: #ffb340; text-shadow: 0 0 12px rgba(255, 170, 0, .6); }
.mood-card.mood-challenge { background: linear-gradient(160deg, rgba(176, 38, 255, .1), rgba(255, 0, 170, .05)); border-color: rgba(176, 38, 255, .32); }
.mood-card.mood-challenge .mood-icon { color: #c479ff; }

/* Extra top margin separates the Browse Collections block from the mood
   front door + daily banner so the two zones don't feel squeezed together. */
.browse-head { max-width: 920px; margin: 22px auto 10px; padding: 0 18px; width: 100%; box-sizing: border-box; }
.browse-eyebrow { font-size: 11px; letter-spacing: .4em; text-transform: uppercase; color: #66e0ff; font-weight: 700; }

/* ---------------- Browse Collections — neon glyph art + accents ----------------
   The collection cards reuse play.css .collection-card but with a glyph
   instead of bespoke SVG art; give each a colour accent + centered glyph. */
.collection-card[data-bucket^="col:"] { --zone-accent: #00ffee; --zone-glow: rgba(0, 255, 238, .5); }
.collection-card[data-bucket="col:Arcade"]   { --zone-accent: #00e5ff; --zone-glow: rgba(0, 229, 255, .5); }
.collection-card[data-bucket="col:Action"]   { --zone-accent: #ff1744; --zone-glow: rgba(255, 23, 68, .5); }
.collection-card[data-bucket="col:Racing"]   { --zone-accent: #ffd400; --zone-glow: rgba(255, 212, 0, .5); }
.collection-card[data-bucket="col:Memory"]   { --zone-accent: #ff00aa; --zone-glow: rgba(255, 0, 170, .5); }
.collection-card[data-bucket="col:Board"]     { --zone-accent: #ffd400; --zone-glow: rgba(255, 212, 0, .5); }
.collection-card[data-bucket="col:Skill"]    { --zone-accent: #b026ff; --zone-glow: rgba(176, 38, 255, .5); }
.collection-card[data-bucket="col:Strategy"] { --zone-accent: #66ff33; --zone-glow: rgba(102, 255, 51, .5); }
.collection-card[data-bucket="col:Zen"]      { --zone-accent: #44ffdd; --zone-glow: rgba(68, 255, 221, .5); }
.collection-card[data-bucket="col:Word"]     { --zone-accent: #ff8c00; --zone-glow: rgba(255, 140, 0, .5); }
.collection-card[data-bucket^="col:"] .coll-glyph {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font-size: 44px; line-height: 1; color: var(--zone-accent, #00ffee);
  text-shadow: 0 0 20px var(--zone-glow, rgba(0, 255, 238, .5));
  background:
    radial-gradient(circle at 50% 45%, var(--zone-glow, rgba(0, 255, 238, .18)) 0%, transparent 62%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 14px);
}

/* On narrower viewports the top bar is crowded — drop the search to a
   full-width bar just under the header. */
@media (max-width: 860px) {
  .search-bar { top: 54px; width: calc(100vw - 24px); }
  .search-results { top: 100px; }
  /* The search bar drops to a full-width fixed bar tucked under the header.
     On the ALL GAMES gallery that would sit on top of the heading + back
     button, so reserve space for it above the gallery header. */
  body.view-gallery .gallery-head { padding-top: 50px; }
}
@media (max-width: 640px) {
  .mood-select { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sr-meta { display: none; }
}

/* ============================================================
   ALL GAMES gallery — a flat A–Z visual grid of every game.
   A "show me everything" door that sits ALONGSIDE the curated
   moods (never above them). Reached from the front-door
   "Explore all games" link or the rail "ALL GAMES" bucket.
   ============================================================ */

/* Front-door CTA, placed under the collection grid so the curated
   states of mind stay the headline. */
.explore-all-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 12px; margin: 26px auto 4px; padding: 0 18px; width: 100%;
  max-width: 920px; box-sizing: border-box;
}
.explore-all-prompt { font-size: 13px; color: #9aa0bd; letter-spacing: .02em; }
.explore-all {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 10px 18px; border-radius: 999px; color: #eef0fb;
  font: 700 12px/1 'Inter', system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase;
  background: linear-gradient(160deg, rgba(0, 255, 238, .10), rgba(176, 38, 255, .08));
  border: 1px solid rgba(0, 255, 238, .4);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.explore-all:hover, .explore-all:focus-visible {
  transform: translateY(-2px); border-color: rgba(0, 255, 238, .8); outline: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .4), 0 0 18px rgba(0, 255, 238, .25);
}
.explore-all .ea-icon { font-size: 15px; color: #00ffee; text-shadow: 0 0 10px rgba(0, 255, 238, .6); }

/* ---------------- Context collections (browse by situation) ----------------
   Sits between the moods and the genre collections. Each card answers a
   "what's the moment?" question rather than naming a genre. */
.context-head { max-width: 920px; margin: 18px auto 10px; padding: 0 18px; width: 100%; box-sizing: border-box; }
.context-row {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 920px; width: 100%; margin: 0 auto 6px; padding: 0 16px; box-sizing: border-box;
}
.context-card {
  display: flex; align-items: center; gap: 14px; cursor: pointer; text-align: left;
  padding: 14px 16px; border-radius: 14px; color: #eef0fb;
  background: linear-gradient(160deg, rgba(176, 38, 255, .10), rgba(0, 255, 238, .05));
  border: 1px solid rgba(176, 38, 255, .28);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.context-card:hover, .context-card:focus-visible {
  transform: translateY(-2px); outline: none;
  border-color: rgba(176, 38, 255, .6);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .4), 0 0 20px rgba(176, 38, 255, .2);
}
.context-icon {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #c479ff; text-shadow: 0 0 12px rgba(176, 38, 255, .6);
  background: rgba(176, 38, 255, .12); border: 1px solid rgba(176, 38, 255, .28);
}
.context-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.context-name { font: 800 15px/1.1 'Anton', Impact, sans-serif; letter-spacing: .03em; color: #fff; }
.context-tag { font-size: 11.5px; color: #9aa0bd; letter-spacing: .01em; }
.context-count {
  margin-left: auto; flex: 0 0 auto; font: 700 11px/1 'Inter', system-ui, sans-serif;
  letter-spacing: .08em; color: #c479ff;
}

@media (max-width: 640px) {
  .context-row { grid-template-columns: 1fr; }
}

/* Rail "ALL GAMES" bucket — set off from the mood buckets by a divider. */
.bucket.bucket-all {
  margin-top: 10px; padding-top: 12px;
  border-top: 1px solid var(--line, rgba(255, 255, 255, .08));
}

/* View plumbing: slot the gallery into the same .play-app grid as the
   collections front door, and hide the cabinet chrome while it's up. */
.gallery-view { display: none; grid-area: gallery; }
body.view-gallery .gallery-view { display: flex; flex-direction: column; min-height: 0; }
body.view-gallery .play-app {
  grid-template-rows: 60px 1fr;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "top" "gallery";
}
body.view-gallery .play-marquee,
body.view-gallery .app-main,
body.view-gallery .app-carousel,
body.view-gallery .app-status,
body.view-gallery .collections-view { display: none !important; }

/* Header row: back button · title · live count */
.gallery-head {
  display: flex; align-items: center; gap: 16px;
  max-width: 1760px; width: 100%; margin: 0 auto; box-sizing: border-box;
  padding: 18px 24px 12px;
}
.gallery-heading { display: flex; flex-direction: column; gap: 2px; }
.gallery-eyebrow { font-size: 11px; letter-spacing: .4em; text-transform: uppercase; color: #66e0ff; font-weight: 700; }
.gallery-title { margin: 0; font: 900 26px/1 'Anton', Impact, sans-serif; letter-spacing: .06em; color: #fff; }
.gallery-count { margin-left: auto; white-space: nowrap; font: 700 12px/1 'Inter', system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #8389a8; }
.gallery-back {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; cursor: pointer;
  padding: 8px 14px; border-radius: 8px;
  font: 700 11px/1 'Inter', system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase;
  color: #cfe9ff; background: rgba(0, 255, 238, .06);
  border: 1px solid rgba(0, 255, 238, .3);
  transition: border-color .14s ease, box-shadow .14s ease, color .14s ease;
}
.gallery-back:hover, .gallery-back:focus-visible {
  color: #fff; border-color: rgba(0, 255, 238, .7); outline: none;
  box-shadow: 0 0 16px rgba(0, 255, 238, .25);
}

/* Scrollable responsive art-card grid */
.gallery-grid {
  flex: 1; min-height: 0; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  display: grid; gap: 18px; align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  /* Explicit row height — a ratio/fixed-height media contributes 0 to a grid
     auto-row's intrinsic size in Chromium, collapsing rows; a concrete row
     keeps every card whole and perfectly aligned. Kept in step with
     .art-media height + .art-info below at each breakpoint. */
  grid-auto-rows: 214px;
  max-width: 1760px; width: 100%; margin: 0 auto; box-sizing: border-box;
  padding: 6px 24px 34px;
}
.gallery-grid::-webkit-scrollbar { width: 8px; }
.gallery-grid::-webkit-scrollbar-thumb { background: var(--line-2, rgba(255, 255, 255, .15)); border-radius: 4px; }

/* Name tile — a compact clickable chip showing just the game name. */
.gallery-card {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 12px 30px; overflow: hidden; text-align: center;
  border-radius: 8px; text-decoration: none; cursor: pointer;
  background: linear-gradient(160deg, var(--bg-2, #0c0c1a), var(--bg-1, #06060f));
  border: 1.5px solid var(--line-2, rgba(255, 255, 255, .12));
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.gallery-card:hover, .gallery-card:focus-visible {
  transform: translateY(-3px); outline: none;
  border-color: var(--cyan, #00ffee);
  box-shadow: 0 0 0 1px var(--cyan, #00ffee), 0 0 20px rgba(0, 255, 238, .35), 0 10px 22px rgba(0, 0, 0, .5);
}
.gallery-card .g-title { font-family: var(--f-pixel, 'VT323', monospace); font-size: 18px; letter-spacing: .05em; line-height: 1.1; color: #eef0fb; }
.gallery-card:hover .g-title, .gallery-card:focus-visible .g-title { color: var(--cyan, #00ffee); }

/* Favorite star — appears on hover, stays lit when faved */
.gallery-card .g-star {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  width: 26px; height: 26px; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; color: rgba(255, 255, 255, .5);
  background: rgba(0, 0, 0, .5); border: 1px solid rgba(255, 255, 255, .12);
  opacity: 0; transition: opacity .14s ease, color .14s ease, transform .14s ease;
}
.gallery-card:hover .g-star, .gallery-card:focus-within .g-star { opacity: 1; }
.gallery-card .g-star:hover { color: #ffd400; transform: scale(1.1); }
.gallery-card.fav .g-star { opacity: 1; color: #ffd400; text-shadow: 0 0 10px rgba(255, 212, 0, .6); border-color: rgba(255, 212, 0, .4); }

@media (max-width: 640px) {
  .gallery-head { padding: 14px 16px 8px; }
  .gallery-title { font-size: 21px; }
  .explore-all-row { flex-direction: column; gap: 8px; }
}

/* Honour reduced-motion: kill the tile lift/scale transitions. */
@media (prefers-reduced-motion: reduce) {
  .gallery-card, .explore-all { transition: none; }
  .gallery-card:hover, .gallery-card:focus-visible { transform: none; }
  .fav-chip { transition: none; }
  .fav-chip:hover, .fav-chip:focus-visible { transform: none; }
}

/* ============================================================
   Favourites strip — prominent band on the collections front
   door. Hidden until the player has starred a game.
   ============================================================ */
.fav-strip {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 920px; width: 100%; margin: 4px auto 22px; padding: 16px 18px;
  box-sizing: border-box; border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 212, 0, .08), rgba(255, 140, 0, .04));
  border: 1px solid rgba(255, 212, 0, .3);
  box-shadow: 0 0 22px rgba(255, 212, 0, .08);
}
.fav-strip[hidden] { display: none; }
.fav-head { display: flex; align-items: baseline; gap: 10px; }
.fav-eyebrow {
  font: 800 13px/1 'Inter', system-ui, sans-serif; letter-spacing: .16em;
  text-transform: uppercase; color: #ffd400; text-shadow: 0 0 12px rgba(255, 212, 0, .5);
}
.fav-count {
  margin-left: auto; font: 700 10px/1 'Inter', system-ui, sans-serif;
  letter-spacing: .14em; text-transform: uppercase; color: #b9a766;
}
.fav-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.fav-chip {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 10px 30px 10px 14px; overflow: hidden; text-align: center;
  border-radius: 8px; text-decoration: none; cursor: pointer;
  background: linear-gradient(160deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .15));
  border: 1.5px solid rgba(255, 212, 0, .28);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.fav-chip:hover, .fav-chip:focus-visible {
  transform: translateY(-3px); outline: none;
  border-color: #ffd400; box-shadow: 0 0 16px rgba(255, 212, 0, .35), 0 8px 18px rgba(0, 0, 0, .5);
}
.fav-chip-title { font-family: var(--f-pixel, 'VT323', monospace); font-size: 17px; letter-spacing: .05em; line-height: 1.1; color: #eef0fb; }
.fav-chip:hover .fav-chip-title, .fav-chip:focus-visible .fav-chip-title { color: #ffd400; }
.fav-chip-star {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 2;
  font-size: 13px; line-height: 1; color: #ffd400;
  background: transparent; border: 0;
  text-shadow: 0 0 8px rgba(255, 212, 0, .5);
  transition: transform .14s ease, color .14s ease;
}
.fav-chip-star:hover { transform: translateY(-50%) scale(1.2); color: #fff; }

@media (max-width: 640px) {
  .fav-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* ============================================================
   COLLECTION DESTINATION — themed per-mood landing (hero + rows).
   Shown when body.view-collection is set. Slots into the same
   .play-app grid as the gallery; --coll-accent themes the hero.
   ============================================================ */
.collection-view { display: none; grid-area: gallery; }
body.view-collection .collection-view { display: flex; flex-direction: column; min-height: 0; }
body.view-collection .play-app {
  grid-template-rows: 60px 1fr;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "top" "gallery";
}
body.view-collection .play-marquee,
body.view-collection .app-main,
body.view-collection .app-carousel,
body.view-collection .app-status,
body.view-collection .collections-view { display: none !important; }

/* Hero — the "arrival". Themed by --coll-accent (set per-mood in JS). */
.collection-hero {
  --coll-accent: #00ffee;
  position: relative; flex: 0 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  grid-template-areas: "back back" "body spot";
  gap: 6px 24px; align-items: center;
  max-width: 1760px; width: 100%; margin: 0 auto; box-sizing: border-box;
  padding: 14px 24px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--coll-accent) 28%, transparent);
  background:
    radial-gradient(800px 280px at 18% 0%, color-mix(in srgb, var(--coll-accent) 14%, transparent), transparent 65%),
    linear-gradient(160deg, rgba(10,5,24,.5), rgba(5,0,16,.2));
}
.collection-back {
  grid-area: back; justify-self: start; position: relative; top: 0; left: 0;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 7px 13px; border-radius: 8px;
  font: 700 11px/1 'Inter', system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase;
  color: #cfe9ff; background: rgba(0,0,0,.35);
  border: 1px solid color-mix(in srgb, var(--coll-accent) 35%, transparent);
  transition: border-color .14s ease, box-shadow .14s ease, color .14s ease;
}
.collection-back:hover, .collection-back:focus-visible {
  color: #fff; outline: none;
  border-color: var(--coll-accent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--coll-accent) 30%, transparent);
}
.collection-hero-body { grid-area: body; padding-top: 4px; min-width: 0; }
.collection-spotlight { grid-area: spot; }
.collection-eyebrow {
  margin: 0 0 6px; font: 700 11px/1 'Inter', system-ui, sans-serif;
  letter-spacing: .4em; text-transform: uppercase;
  color: var(--coll-accent); text-shadow: 0 0 12px color-mix(in srgb, var(--coll-accent) 55%, transparent);
}
.collection-title-xl {
  margin: 0; font: 900 clamp(34px, 6vw, 58px)/0.95 'Anton', Impact, sans-serif;
  letter-spacing: .04em; color: #fff;
  text-shadow: 0 0 30px color-mix(in srgb, var(--coll-accent) 35%, transparent);
}
.collection-sub { margin: 8px 0 0; font-size: 14px; color: #9aa0bd; letter-spacing: .01em; }

/* Spotlight — featured game, big preview + Play. */
.collection-spotlight { min-width: 0; }
.spotlight-card {
  display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: stretch;
  text-decoration: none; cursor: pointer; overflow: hidden;
  border-radius: 12px; padding: 10px;
  background: linear-gradient(160deg, rgba(0,0,0,.4), rgba(0,0,0,.15));
  border: 1.5px solid color-mix(in srgb, var(--coll-accent) 40%, transparent);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.spotlight-card:hover, .spotlight-card:focus-visible {
  transform: translateY(-3px); outline: none; border-color: var(--coll-accent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--coll-accent) 30%, transparent), 0 12px 26px rgba(0,0,0,.55);
}
.spotlight-thumb { position: relative; border-radius: 8px; overflow: hidden; background: rgba(0,0,0,.4); aspect-ratio: 3 / 2; }
.spotlight-thumb svg { width: 100%; height: 100%; display: block; }
.spotlight-info { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; padding-right: 6px; }
.spotlight-tag { font: 700 10px/1 'Inter', system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--coll-accent); }
.spotlight-name { font: 900 20px/1 'Anton', Impact, sans-serif; letter-spacing: .03em; color: #fff; }
.spotlight-hook { font-size: 12px; line-height: 1.4; color: #9aa0bd; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spotlight-play { margin-top: 4px; font: 800 11px/1 'Inter', system-ui, sans-serif; letter-spacing: .14em; color: var(--coll-accent); }

/* Rows — the Netflix scroll. Width matches the hero (1760px) so the hero
   text, spotlight and rails share one left edge instead of two grids. */
.collection-rows { flex: 1; min-height: 0; overflow-y: auto; max-width: 1760px; width: 100%; margin: 0 auto; box-sizing: border-box; padding: 16px 24px 28px; }
.collection-rows::-webkit-scrollbar { width: 8px; }
.collection-rows::-webkit-scrollbar-thumb { background: var(--line-2, rgba(255,255,255,.15)); border-radius: 4px; }
.coll-row { margin-bottom: 22px; }
.coll-row-head {
  --row-accent: #00ffee;
  margin: 0 0 10px; font: 800 13px/1 'Inter', system-ui, sans-serif;
  letter-spacing: .16em; text-transform: uppercase; color: #eef0fb;
  border-left: 3px solid var(--row-accent); padding-left: 10px;
}
.coll-row-track {
  display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden;
  /* No visible scrollbar — chevrons + edge fades + touch momentum are the
     affordance; the raw bar read as a broken white slab under each rail. */
  scrollbar-width: none; padding: 4px 2px 10px; scroll-snap-type: x proximity;
}
.coll-row-track::-webkit-scrollbar { display: none; }
.row-card {
  position: relative; flex: 0 0 184px; scroll-snap-align: start;
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 8px; text-decoration: none; cursor: pointer;
  background: linear-gradient(160deg, var(--bg-2, #0c0c1a), var(--bg-1, #06060f));
  border: 1.5px solid var(--line-2, rgba(255,255,255,.12));
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.row-card:hover, .row-card:focus-visible {
  transform: translateY(-4px); outline: none; border-color: var(--cyan, #00ffee);
  box-shadow: 0 0 0 1px var(--cyan, #00ffee), 0 0 22px rgba(0,255,238,.35), 0 12px 24px rgba(0,0,0,.5);
}
.row-thumb { position: relative; height: 116px; overflow: hidden; background: rgba(0,0,0,.4); }
.row-thumb svg { width: 100%; height: 100%; display: block; }
.row-meta { display: flex; flex-direction: column; gap: 3px; padding: 7px 9px 8px; background: rgba(0,0,0,.55); border-top: 1px solid var(--line, rgba(255,255,255,.08)); }
.row-title { font-family: var(--f-pixel, 'VT323', monospace); font-size: 15px; letter-spacing: .04em; line-height: 1.05; color: #eef0fb; }
.row-card:hover .row-title, .row-card:focus-visible .row-title { color: var(--cyan, #00ffee); }
.row-tags { display: flex; align-items: center; gap: 6px; }
.row-time { font: 700 9px/1 'Inter', system-ui, sans-serif; letter-spacing: .08em; color: #66e0ff; }
.row-diff { font: 600 9px/1 'Inter', system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #7d83a3; }
.row-card-star {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  width: 24px; height: 24px; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1; color: rgba(255,255,255,.5);
  background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.12);
  opacity: 0; transition: opacity .14s ease, color .14s ease, transform .14s ease;
}
.row-card:hover .row-card-star, .row-card:focus-within .row-card-star { opacity: 1; }
.row-card-star:hover { color: #ffd400; transform: scale(1.1); }
.row-card.fav .row-card-star { opacity: 1; color: #ffd400; text-shadow: 0 0 10px rgba(255,212,0,.6); border-color: rgba(255,212,0,.4); }

@media (max-width: 760px) {
  .collection-hero { grid-template-columns: 1fr; grid-template-areas: "back" "body"; gap: 8px; }
  .collection-spotlight { display: none; }
}
@media (max-width: 640px) {
  .row-card { flex: 0 0 150px; }
  .row-thumb { height: 96px; }
  .collection-rows { padding: 12px 14px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .row-card, .spotlight-card { transition: none; }
  .row-card:hover, .row-card:focus-visible, .spotlight-card:hover { transform: none; }
}

/* ============================================================
   SENSORY IDENTITY — each arcade is a PLACE, not paint. Motion
   personality + density keyed off [data-motion]/[data-mood] set
   by renderCollection. The hero's themed glow animates differently
   per room; card density/shape shift the room's rhythm.
   ============================================================ */

/* Hero ambient glow layer — a pseudo-element that each motion brings to life
   differently. Sits behind the hero content, tinted by --coll-accent. */
.collection-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(620px 220px at 22% 18%,
    color-mix(in srgb, var(--coll-accent) 22%, transparent), transparent 70%);
  opacity: .9;
}
.collection-hero > * { position: relative; z-index: 1; }

/* STILL (Focus) — almost frozen. A barely-there settle, then nothing. */
.collection-view[data-motion="still"] .collection-hero::before { animation: senseStill 9s ease-out 1 both; }
@keyframes senseStill { 0% { opacity: 0; transform: scale(1.04); } 100% { opacity: .9; transform: scale(1); } }

/* BREATHE (Drift) — slow, hypnotic inhale/exhale. */
.collection-view[data-motion="breathe"] .collection-hero::before { animation: senseBreathe 7s ease-in-out infinite; }
@keyframes senseBreathe { 0%,100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
.collection-view[data-motion="breathe"] .collection-title-xl { animation: senseBreatheText 7s ease-in-out infinite; }
@keyframes senseBreatheText { 0%,100% { text-shadow: 0 0 22px color-mix(in srgb, var(--coll-accent) 30%, transparent); } 50% { text-shadow: 0 0 46px color-mix(in srgb, var(--coll-accent) 55%, transparent); } }

/* SOFT (Relax) — gentle warm swell, slower than breathe, never sharp. */
.collection-view[data-motion="soft"] .collection-hero::before { animation: senseSoft 11s ease-in-out infinite; }
@keyframes senseSoft { 0%,100% { opacity: .7; } 50% { opacity: 1; } }

/* PULSE (Rush) — fast, twitchy strobe on a tight beat. */
.collection-view[data-motion="pulse"] .collection-hero::before { animation: sensePulse 1.6s steps(2, end) infinite; }
@keyframes sensePulse { 0%,100% { opacity: .65; } 50% { opacity: 1; } }
.collection-view[data-motion="pulse"] .collection-title-xl { animation: sensePulseText 1.6s ease-in-out infinite; }
@keyframes sensePulseText { 0%,100% { transform: translateX(0); } 50% { transform: translateX(1.5px); } }

/* LOOM (Challenge) — heavy, slow, weighty. Darkens then bears down. */
.collection-view[data-motion="loom"] .collection-hero::before { animation: senseLoom 5.5s ease-in-out infinite; }
@keyframes senseLoom { 0%,100% { opacity: .5; transform: scale(1.01); } 50% { opacity: .95; transform: scale(1.05); } }
.collection-view[data-motion="loom"] .collection-hero { box-shadow: inset 0 -60px 80px -40px rgba(0,0,0,.6); }

/* SHARP (Compete) — crisp, scoreboard energy. Quick clean flashes. */
.collection-view[data-motion="sharp"] .collection-hero::before { animation: senseSharp 2.8s ease-out infinite; }
@keyframes senseSharp { 0% { opacity: 1; } 20% { opacity: .6; } 100% { opacity: .85; } }

/* DENSITY / SHAPE — the room's rhythm. Relax breathes (big, round, airy);
   Rush is tight and sharp; Challenge is weighty; Focus spacious & minimal. */
.collection-view[data-mood="Relax"] .coll-row-track,
.collection-view[data-mood="Drift"] .coll-row-track { gap: 20px; }
.collection-view[data-mood="Relax"] .row-card,
.collection-view[data-mood="Drift"] .row-card { flex: 0 0 210px; border-radius: 14px; }
.collection-view[data-mood="Relax"] .row-thumb,
.collection-view[data-mood="Drift"] .row-thumb { height: 132px; }
.collection-view[data-mood="Relax"] .coll-row,
.collection-view[data-mood="Drift"] .coll-row { margin-bottom: 30px; }

.collection-view[data-mood="Rush"] .coll-row-track,
.collection-view[data-mood="Compete"] .coll-row-track { gap: 10px; }
.collection-view[data-mood="Rush"] .row-card,
.collection-view[data-mood="Compete"] .row-card { flex: 0 0 168px; border-radius: 5px; }
.collection-view[data-mood="Rush"] .row-card:hover { transform: translateY(-4px) scale(1.02); }

.collection-view[data-mood="Challenge"] .row-card { flex: 0 0 196px; }
.collection-view[data-mood="Challenge"] .row-thumb { height: 124px; }

.collection-view[data-mood="Focus"] .coll-row { margin-bottom: 28px; }
.collection-view[data-mood="Focus"] .coll-row-head { letter-spacing: .22em; }

/* Reduced motion: kill every sensory animation; keep the static theming. */
@media (prefers-reduced-motion: reduce) {
  .collection-hero::before,
  .collection-view .collection-title-xl { animation: none !important; }
}

/* ============================================================
   LIVING ART CARDS — the shared game-tile language used by the
   ALL GAMES wall and (Stage 2) the collection rails. Each card
   carries a procedural canvas thumbnail (static frame, lazily
   hydrated) with a per-slug --accent neon edge; the focused/hovered
   card animates and drives the ambient wall lighting.
   ============================================================ */
.art-card {
  --accent: #00e5ff;
  position: relative; display: block;
  border-radius: 12px; overflow: hidden; text-decoration: none; cursor: pointer;
  background: linear-gradient(165deg, rgba(18,12,34,.92), rgba(8,4,20,.94));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, rgba(255,255,255,.07));
  box-shadow: 0 6px 20px rgba(0,0,0,.42);
  transition: transform .24s cubic-bezier(.22,1,.36,1),
              box-shadow .24s ease, border-color .18s ease;
  outline: none;
}
.art-media {
  /* Concrete height — a percentage/aspect ratio contributes 0 to a CSS-grid
     auto-row's intrinsic size (rows would collapse); a fixed height keeps the
     grid rows honest while the absolutely-positioned canvas fills the box. */
  position: relative; display: block; width: 100%; height: 150px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 18%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 68%),
    #06010f;
}
.art-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  opacity: 0; transition: opacity .35s ease;
}
.art-card.art-ready .art-canvas { opacity: 1; }

/* Premium skeleton shimmer until the art is painted */
.art-skeleton {
  position: absolute; inset: 0; opacity: 1; transition: opacity .3s ease;
  background: linear-gradient(100deg,
    rgba(255,255,255,.015) 28%,
    color-mix(in srgb, var(--accent) 12%, rgba(255,255,255,.06)) 50%,
    rgba(255,255,255,.015) 72%);
  background-size: 220% 100%; animation: artShimmer 1.25s linear infinite;
}
.art-card.art-ready .art-skeleton { opacity: 0; }
@keyframes artShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Subtle CRT scanline over the art */
.art-scan {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,.16) 2px 3px);
  mix-blend-mode: multiply;
}
/* Accent bloom on hover/focus/live */
.art-sheen {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s ease;
  background: radial-gradient(72% 62% at 50% 32%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 72%);
  mix-blend-mode: screen;
}

.art-info {
  display: flex; flex-direction: column; gap: 5px; padding: 9px 11px 11px;
  background: linear-gradient(180deg, rgba(6,3,16,.35), rgba(6,3,16,.78));
  border-top: 1px solid color-mix(in srgb, var(--accent) 16%, rgba(255,255,255,.06));
}
.art-title {
  font-family: var(--f-pixel, 'VT323', monospace); font-size: 18px; line-height: 1.05;
  letter-spacing: .03em; color: #eef0fb;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.art-card:hover .art-title,
.art-card:focus-visible .art-title,
.art-card.art-live .art-title { color: var(--accent); }
.art-tags { display: flex; gap: 5px; overflow: hidden; min-height: 15px; }
.art-chip {
  font: 600 9px/1 var(--f-body, sans-serif); letter-spacing: .1em; text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 72%, #cfe9ff);
  padding: 3px 6px; border-radius: 999px; white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.art-card:hover,
.art-card:focus-visible,
.art-card.art-live {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px var(--accent),
    0 0 26px color-mix(in srgb, var(--accent) 42%, transparent),
    0 16px 34px rgba(0,0,0,.55);
}
.art-card:hover .art-sheen,
.art-card:focus-visible .art-sheen,
.art-card.art-live .art-sheen { opacity: 1; }
.art-card:focus-visible { outline: 2px solid var(--cyan, #00ffee); outline-offset: 2px; }
.art-card:active { transform: translateY(-2px) scale(.985); }
/* Selection (live/focused) reads distinct from a plain hover via an accent underline */
.art-card.art-live::after,
.art-card:focus-visible::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 4;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
}

/* Favorite star */
.art-star {
  position: absolute; top: 7px; right: 7px; z-index: 5;
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; color: rgba(255,255,255,.55);
  background: rgba(4,2,12,.5); border: 1px solid rgba(255,255,255,.14);
  opacity: 0; transition: opacity .16s ease, color .16s ease, transform .16s ease;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.art-card:hover .art-star,
.art-card:focus-within .art-star,
.art-card.art-live .art-star { opacity: 1; }
.art-star:hover { color: #ffd400; transform: scale(1.12); }
.art-card.fav .art-star { opacity: 1; color: #ffd400; text-shadow: 0 0 10px rgba(255,212,0,.6); border-color: rgba(255,212,0,.45); }

/* NEW badge */
.art-badge-new {
  position: absolute; top: 8px; left: 8px; z-index: 5;
  font: 800 9px/1 var(--f-body, sans-serif); letter-spacing: .14em; text-transform: uppercase;
  color: #050010; background: var(--accent); padding: 4px 7px; border-radius: 6px;
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 60%, transparent);
}

/* Coarse pointers: no hover — keep the star reachable + ≥40px tap target */
@media (hover: none) {
  .art-star { opacity: .92; width: 40px; height: 40px; font-size: 16px; }
}

/* Ultrawide — widen the wall + grow columns so it never reads as empty */
@media (min-width: 2200px) {
  .gallery-grid { max-width: 2160px; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 22px; grid-auto-rows: 232px; }
  .gallery-head, .gallery-filters { max-width: 2160px; }
  .art-media { height: 168px; }
}

/* Mobile portrait — 2-col art cards, NO clipped labels (the #1 audit gap) */
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 6px 14px 26px; grid-auto-rows: 174px; }
  .art-media { height: 112px; }
  .art-title { font-size: 16px; }
  .art-info { padding: 8px 9px 10px; gap: 4px; }
  .art-star { opacity: .92; }
}
@media (max-width: 360px) {
  .gallery-grid { gap: 10px; }
  .art-title { font-size: 15px; }
}
/* Mobile landscape / short viewports — compress vertical chrome */
@media (max-height: 500px) {
  .gallery-head { padding: 10px 18px 6px; }
  .gallery-eyebrow { display: none; }
  .gallery-filters { padding: 0 18px 8px; }
  .art-media { height: 104px; }
  .gallery-grid { grid-auto-rows: 166px; }
}

/* ---------------- Mood filter chips (ALL GAMES) ---------------- */
.gallery-filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  max-width: 1760px; width: 100%; margin: 0 auto; box-sizing: border-box;
  padding: 2px 24px 12px;
}
.gfilter {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; cursor: pointer;
  font: 700 11px/1 var(--f-body, sans-serif); letter-spacing: .1em; text-transform: uppercase;
  color: #b8c4e0; padding: 8px 13px; border-radius: 999px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.12);
  transition: border-color .14s ease, color .14s ease, background .14s ease, box-shadow .14s ease;
}
.gfilter .gfilter-n { font-size: 10px; color: #7d83a3; }
.gfilter:hover, .gfilter:focus-visible { color: #fff; border-color: rgba(0,255,238,.5); outline: none; }
.gfilter.active { color: #050010; background: var(--cyan, #00ffee); border-color: var(--cyan, #00ffee); box-shadow: 0 0 16px rgba(0,255,238,.4); }
.gfilter.active .gfilter-n { color: rgba(5,0,16,.7); }
.gfilter.mood-rush.active { background: #ff2da0; border-color: #ff2da0; box-shadow: 0 0 16px rgba(255,45,160,.42); }
.gfilter.mood-drift.active, .gfilter.mood-relax.active { background: #b026ff; border-color: #b026ff; box-shadow: 0 0 16px rgba(176,38,255,.42); }
.gfilter.mood-challenge.active { background: #c479ff; border-color: #c479ff; box-shadow: 0 0 16px rgba(196,121,255,.42); }
.gfilter.mood-compete.active { background: #ffb340; border-color: #ffb340; box-shadow: 0 0 16px rgba(255,179,64,.42); }
@media (max-width: 600px) {
  .gallery-filters { flex-wrap: nowrap; overflow-x: auto; padding: 2px 14px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .gallery-filters::-webkit-scrollbar { display: none; }
  .gfilter { flex: 0 0 auto; }
}

/* ---------------- Designed empty state ("no signal") ---------------- */
.wall-empty {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; padding: 60px 20px; text-align: center; color: #8389a8;
}
.wall-empty-glyph { font-size: 46px; color: var(--cyan, #00ffee); opacity: .55; text-shadow: 0 0 20px rgba(0,255,238,.4); }
.wall-empty-title { margin: 0; font: 800 16px/1 var(--f-body, sans-serif); letter-spacing: .14em; text-transform: uppercase; color: #cfe9ff; }
.wall-empty-sub { margin: 0; font-size: 13px; }

/* ============================================================
   COLLECTION RAILS (Stage 2) — Netflix-style mood rows of living art
   cards with chevron paging (desktop) + momentum/snap (touch) + edge
   fades, plus a cinematic hero spotlight whose art animates live.
   ============================================================ */
.coll-row-viewport { position: relative; }
.coll-row-track {
  scroll-snap-type: x proximity;
  scroll-padding-left: 4px;
  -webkit-overflow-scrolling: touch;
  /* Edge fade so cards dissolve into the rail rather than hard-cut */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
}
.coll-row-viewport.at-start .coll-row-track {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
}
.coll-row-viewport.at-end .coll-row-track {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 100%);
}
.coll-row-viewport.no-overflow .coll-row-track { -webkit-mask-image: none; mask-image: none; }
.coll-row-track .art-card { flex: 0 0 202px; scroll-snap-align: start; }
.coll-row-track .art-card .art-media { height: 128px; }

/* Chevron paging — desktop affordance, hidden on touch + at the ends */
.row-chevron {
  position: absolute; top: 0; bottom: 0; z-index: 6; width: 46px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border: 0; color: #eef0fb; font-size: 26px; line-height: 1;
  opacity: 0; transition: opacity .16s ease, background .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.row-chevron-l { left: -6px; background: linear-gradient(90deg, rgba(5,0,16,.92), transparent); }
.row-chevron-r { right: -6px; background: linear-gradient(270deg, rgba(5,0,16,.92), transparent); }
.coll-row-viewport:hover .row-chevron { opacity: .85; }
.row-chevron:hover { opacity: 1; color: var(--cyan, #00ffee); text-shadow: 0 0 12px rgba(0,255,238,.6); }
.coll-row-viewport.at-start .row-chevron-l,
.coll-row-viewport.at-end .row-chevron-r,
.coll-row-viewport.no-overflow .row-chevron { opacity: 0 !important; pointer-events: none; }
@media (hover: none) { .row-chevron { display: none; } }

/* Rail density per room mood (the sensory identity, art-card edition) */
.collection-view[data-mood="Relax"] .coll-row-track .art-card,
.collection-view[data-mood="Drift"] .coll-row-track .art-card { flex: 0 0 224px; border-radius: 14px; }
.collection-view[data-mood="Relax"] .coll-row-track .art-card .art-media,
.collection-view[data-mood="Drift"] .coll-row-track .art-card .art-media { height: 142px; }
.collection-view[data-mood="Rush"] .coll-row-track .art-card,
.collection-view[data-mood="Compete"] .coll-row-track .art-card { flex: 0 0 186px; }

/* Hero spotlight — big live art on top, brief below */
.spotlight-card { display: block; padding: 0; overflow: hidden; }
.spotlight-media { height: 190px; }
.spotlight-info { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.spotlight-tag { font: 700 10px/1 var(--f-body, sans-serif); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.spotlight-name { font: 900 22px/1 'Anton', Impact, sans-serif; letter-spacing: .03em; color: #fff; }
.spotlight-hook { font-size: 12.5px; line-height: 1.45; color: #9aa0bd; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spotlight-play { margin-top: 4px; font: 800 11px/1 var(--f-body, sans-serif); letter-spacing: .14em; color: var(--accent); }

@media (max-width: 640px) {
  .coll-row-track .art-card { flex: 0 0 160px; }
  .coll-row-track .art-card .art-media { height: 100px; }
}
/* Short landscape — compress the hero so a rail peeks below it */
@media (max-height: 500px) {
  .collection-hero { padding: 10px 24px 12px; }
  .collection-title-xl { font-size: clamp(26px, 6vw, 40px); }
  .collection-sub { display: none; }
  .spotlight-media { height: 148px; }
  .collection-eyebrow { margin-bottom: 3px; }
}

/* ============================================================
   DYNAMIC AMBIENT LIGHTING — soft radial glows behind the wall that
   take the hue of the focused/selected card. --wall-accent is set by
   play.js; @property lets it interpolate for a smooth hue transition.
   ============================================================ */
@property --wall-accent { syntax: '<color>'; inherits: true; initial-value: #00e5ff; }
:root { --wall-accent: #00e5ff; transition: --wall-accent 500ms ease; }
.wall-lights {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  transition: opacity .6s ease;
  background:
    radial-gradient(1200px 720px at 16% 6%, color-mix(in srgb, var(--wall-accent) 15%, transparent), transparent 58%),
    radial-gradient(1000px 820px at 88% 102%, color-mix(in srgb, var(--wall-accent) 11%, transparent), transparent 60%);
}
body.view-gallery .wall-lights,
body.view-collection .wall-lights { opacity: 1; }

/* ============================================================
   CONTEXT HINT BAR — keyboard glyphs by default; swaps to gamepad
   prompts when a controller connects. Shown only in the art-card views.
   ============================================================ */
.wall-hints {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: none; align-items: center; gap: 20px; pointer-events: none;
  padding: 10px 24px calc(10px + env(safe-area-inset-bottom, 0));
  background: linear-gradient(180deg, transparent, rgba(5,0,16,.92) 55%);
  font: 700 11px/1 var(--f-body, sans-serif); letter-spacing: .12em; text-transform: uppercase; color: #8389a8;
}
body.view-gallery .wall-hints,
body.view-collection .wall-hints { display: flex; }
.wh-grp { display: inline-flex; align-items: center; gap: 7px; }
.wh-key {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px;
  padding: 0 6px; border-radius: 5px; color: #dfe8ff; font-weight: 700;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16);
}
body.has-gamepad .wh-key {
  background: color-mix(in srgb, var(--cyan, #00ffee) 14%, transparent);
  border-color: color-mix(in srgb, var(--cyan, #00ffee) 42%, transparent); color: #bff6ff;
}
.wh-attract { margin-left: auto; color: var(--amber, #ffd400); opacity: 0; text-shadow: 0 0 8px rgba(255,212,0,.5); transition: opacity .3s ease; }
body.attract-on .wh-attract { opacity: 1; animation: attract-blink 1.6s ease-in-out infinite; }
@keyframes attract-blink { 0%, 100% { opacity: 1; } 55% { opacity: .35; } }
/* Keep the last row clear of the bar */
body.view-gallery .gallery-grid { padding-bottom: 56px; }
body.view-collection .collection-rows { padding-bottom: 56px; }
/* Touch without a pad: keyboard hints are noise — hide them */
@media (hover: none) { body:not(.has-gamepad) .wall-hints { display: none; } }
@media (max-width: 600px) { .wall-hints { gap: 12px; font-size: 10px; padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0)); } .wh-attract { display: none; } }

/* ============================================================
   PAGE POWER-ON — a one-shot CRT power-up flash on first paint.
   ============================================================ */
.power-on {
  position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: 0;
  transform-origin: center; background: rgba(0,255,238,0);
  animation: powerOn 720ms cubic-bezier(.22,1,.36,1) both;
}
@keyframes powerOn {
  0%   { opacity: 1; transform: scaleY(.004); background: #bff9ff; }
  22%  { opacity: 1; transform: scaleY(1);    background: rgba(0,255,238,.26); }
  100% { opacity: 0; transform: scaleY(1);    background: rgba(0,255,238,0); }
}

/* Reduced motion — static art, no shimmer, no lift/parallax, no hue drift */
@media (prefers-reduced-motion: reduce) {
  .art-card, .art-canvas, .art-skeleton, .art-sheen, .wall-lights, .row-chevron { transition: none !important; }
  .art-skeleton { animation: none !important; opacity: 0 !important; }
  .art-card:hover, .art-card:focus-visible, .art-card.art-live { transform: none; }
  :root { transition: none !important; }
  .power-on { animation: none !important; opacity: 0 !important; }
  body.attract-on .wh-attract { animation: none !important; }
}
