/* emulator.st — Arcade OS theme ("arcadeos").
   Layout mirrors the owner's concept art: brand top bar with ARCADE OS badge,
   left glass sidebar, featured-game hero with full-bleed artwork, game strip,
   console chips, controller-hints footer. Scoped under
   html[data-theme=arcadeos] + .aos-* so other themes are untouched. */

html[data-theme="arcadeos"] {
  --bg: #05070f;
  --bg-card: #0c1222;
  --bg-panel: #0a0f1c;
  --bg-hover: #141c30;
  --text: #eef3ff;
  --text-dim: #8b98bd;
  --accent: #25f4ee;
  --accent-bright: #7ffdf9;
  --accent-glow: rgba(37, 244, 238, 0.5);
  --accent-soft: rgba(37, 244, 238, 0.12);
  --accent-soft-strong: rgba(37, 244, 238, 0.24);
  --resume-accent-tint: rgba(37, 244, 238, 0.16);
  --topbar-grad-a: rgba(5, 7, 15, 0.97);
  --topbar-grad-b: rgba(5, 7, 15, 0.93);
  --border: rgba(37, 244, 238, 0.28);
  --border-hover: rgba(255, 42, 157, 0.55);
  --aos-purple: #9d4dff;
  --aos-magenta: #ff2a9d;
  --aos-blue: #2a6bff;
}

html[data-theme="arcadeos"] body { background: var(--bg); }

/* ═══ root frame ═══ */
#arcadeOsRoot {
  position: fixed; inset: 0;
  z-index: 9000;
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1200px 700px at 78% 30%, rgba(45, 30, 100, 0.35), transparent 60%),
    radial-gradient(900px 500px at 96% 8%, rgba(42, 107, 255, 0.16), transparent 60%),
    var(--bg);
  user-select: none;
  overflow: hidden;
}
body.aos-active { overflow: hidden; }
body.aos-active > .container,
body.aos-active > .topbar,
body.aos-active > .scanlines,
body.aos-active > footer { visibility: hidden; }

/* ── hero ambient artwork: full-bleed, darkened to the left ── */
.aos-hero-bg { position: absolute; inset: 0; overflow: hidden; }
.aos-bg-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .9s ease;
  /* 2026-10-30 session-55 bg fix: low-res retro art (96..256px covers,
     NES tiles, screenshots-as-art) blown up over a 1440p viewport became
     giant blocky pixels that fought the foreground rows. A strong blur
     (24px) + slight desaturation keeps the ambient-color feeling while
     turning blocks into soft washes; the ::after gradients already
     darken the rest. */
  filter: saturate(0.82) blur(24px) brightness(0.78);
  transform: scale(1.12);   /* hide blur edge bleed */
}
.aos-bg-img.aos-show { opacity: 1; }
.aos-hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 15, 0.96) 0%, rgba(5, 7, 15, 0.82) 34%, rgba(5, 7, 15, 0.28) 68%, rgba(5, 7, 15, 0.55) 100%),
    linear-gradient(0deg, rgba(5, 7, 15, 0.9) 0%, transparent 30%),
    linear-gradient(180deg, rgba(5, 7, 15, 0.75) 0%, transparent 22%);
}
body.aos-no-fx .aos-bg-img { transition: none; }

.aos-frame {
  position: relative;
  display: flex; flex-direction: column;
  height: 100%;
}

/* ═══ top bar ═══ */
.aos-topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 12px 22px;
  background: linear-gradient(180deg, rgba(5,7,15,.9), rgba(5,7,15,.55));
  border-bottom: 1px solid rgba(37, 244, 238, 0.14);
  backdrop-filter: blur(6px);
  position: relative;
  z-index: 9200;   /* above .aos-main content — the acct menu drops out of the bar and overlaps the Top Games row (20261030 z-fix) */
}
.aos-brand { display: flex; align-items: baseline; font-weight: 900; font-size: 1.45rem; letter-spacing: 0.01em; }
.aos-brand-em {
  background: linear-gradient(120deg, var(--accent), var(--aos-blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(37, 244, 238, 0.55));
}
.aos-brand-rest { color: #fff; }
.aos-os-badge {
  background: linear-gradient(120deg, var(--aos-purple), var(--aos-magenta));
  color: #fff;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.22em;
  padding: 6px 14px; border-radius: 8px;
  box-shadow: 0 0 16px rgba(157, 77, 255, 0.45);
}
.aos-tagline { color: var(--text-dim); font-size: 0.7rem; letter-spacing: 0.3em; }
.aos-search { flex: 1; max-width: 420px; margin-left: auto; }
.aos-search input {
  width: 100%;
  background: rgba(12, 18, 34, 0.85);
  border: 1px solid rgba(139, 152, 189, 0.3);
  border-radius: 22px;
  color: var(--text);
  font-size: 0.85rem;
  padding: 9px 18px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.aos-search input::placeholder { color: var(--text-dim); }
.aos-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--accent-soft-strong);
}
.aos-pad-status {
  color: var(--text-dim); font-size: 0.78rem;
  border: 1px solid rgba(139, 152, 189, 0.28);
  border-radius: 18px; padding: 7px 14px; white-space: nowrap;
}

/* ═══ body: sidebar + main ═══ */
.aos-body { flex: 1; display: flex; min-height: 0; }

/* ── sidebar ── */
.aos-sidebar {
  width: 218px; flex: 0 0 218px;
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 12px 12px 14px;
  background: linear-gradient(180deg, rgba(10, 14, 28, 0.82), rgba(8, 10, 20, 0.6));
  border-right: 1px solid rgba(37, 244, 238, 0.22);
  box-shadow: inset -14px 0 30px -22px rgba(37, 244, 238, 0.35);
  overflow-y: auto;
}
.aos-side-item {
  display: flex; align-items: center; gap: 14px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: var(--text-dim);
  font-size: 1rem; font-weight: 600;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all .16s ease;
}
.aos-side-item:hover { color: var(--text); background: rgba(20, 28, 48, 0.6); }
.aos-side-item.is-focus {
  color: #fff;
  background: linear-gradient(90deg, rgba(37, 244, 238, 0.18), transparent);
  border-left-color: var(--accent);
  box-shadow: inset 0 0 22px rgba(37, 244, 238, 0.08);
}
.aos-side-item:focus-visible { outline: 2px solid var(--aos-magenta); outline-offset: -2px; }
.aos-side-ico { font-size: 1.15rem; width: 24px; text-align: center; }
.aos-sidebar-motto {
  margin-top: auto;
  padding: 14px;
  color: rgba(139, 152, 189, 0.4);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  line-height: 1.8;
}

/* ── main column ── */
.aos-main {
  flex: 1;
  min-width: 0;
  display: flex; flex-direction: column;
  padding: 8px 26px 0;
  gap: 10px;
  overflow: hidden;
}

/* ═══ featured hero ═══ */
.aos-hero {
  flex: 0 1 auto;
  min-height: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 10px 8px 4px;
  overflow: visible;
}
.aos-hero .aos-hero-title { font-size: clamp(1.6rem, 4.2vw, 3.4rem); }
.aos-eyebrow {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  margin: 0 0 10px;
}
.aos-hero-title {
  margin: 0 0 10px;
  font-size: clamp(2rem, 5.2vw, 4.2rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: 0.01em;
  max-width: 16ch;
  background: linear-gradient(120deg, #fff 30%, var(--accent-bright) 70%, var(--aos-purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* 2026-10-30 bg-blur fix: stronger dark shadow so the gradient text never
     washes out over a lighter blurred art wash */
  filter: drop-shadow(0 0 26px rgba(37, 244, 238, 0.38)) drop-shadow(0 2px 8px rgba(0,0,0,.9)) drop-shadow(0 6px 20px rgba(0,0,0,.9));
  text-transform: uppercase;
}
.aos-hero-meta {
  margin: 0 0 20px;
  color: #dfe6f5;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.aos-hero-btns { display: flex; gap: 14px; align-items: center; }
.aos-play-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(120deg, #19e3f2, #25f4ee);
  color: #04121a;
  border: none;
  border-radius: 12px;
  padding: 14px 30px;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow: 0 0 26px rgba(37, 244, 238, 0.55);
  transition: transform .15s ease, box-shadow .15s ease;
}
.aos-play-btn:hover { transform: translateY(-1px); box-shadow: 0 0 40px rgba(37, 244, 238, 0.8); }
.aos-play-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.aos-tri { font-size: 0.8rem; }
.aos-ghost-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(12, 18, 34, 0.75);
  border: 1px solid rgba(139, 152, 189, 0.4);
  color: var(--text);
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all .15s ease;
}
.aos-ghost-btn:hover { border-color: var(--accent); box-shadow: 0 0 16px var(--accent-soft-strong); }
.aos-ghost-btn:focus-visible { outline: 2px solid var(--aos-magenta); outline-offset: 2px; }
.aos-fav-btn {
  background: rgba(12, 18, 34, 0.75);
  border: 1px solid rgba(139, 152, 189, 0.4);
  color: var(--text);
  width: 48px; height: 48px;
  border-radius: 12px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all .15s ease;
}
.aos-fav-btn.fav-active { color: var(--aos-magenta); border-color: var(--aos-magenta); box-shadow: 0 0 14px rgba(255, 42, 157, 0.4); }

/* ═══ rows ═══ */
.aos-row-label {
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.38em;
  margin: 2px 4px 0;
}
.aos-strip-wrap { min-height: 0; }
/* Plex-style row: snap to covers, fade the edges, dim the neighbors */
.aos-strip-wrap {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}
.aos-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 12px 4px 10px;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
}
.aos-strip:not(.is-grid):not(.is-long) .aos-cell {
  scroll-snap-align: center;
}
.aos-strip::-webkit-scrollbar { display: none; }
.aos-strip.is-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  overflow-y: auto;
}
.aos-cell {
  position: relative;
  flex: 0 0 auto;
  width: 148px;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(139, 152, 189, 0.28);
  background: #0c1222;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.aos-strip.is-grid .aos-cell { width: auto; }
.aos-cell img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
/* session 58c cover-fit: full artwork visible — landscape/square art letterboxes on the dark card bg instead of cropping */
.aos-cell-fallback {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-size: 2.4rem; color: #26304d;
  background: linear-gradient(150deg, #101a30, #0a0f1e);
}
.aos-strip:not(.is-grid):not(.is-long) .aos-cell:not(.is-center) { opacity: 0.72; }
.aos-cell:hover { transform: translateY(-4px); border-color: rgba(139, 152, 189, 0.6); opacity: 1; }
.aos-cell.is-center {
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.35),
    0 0 26px rgba(255, 42, 157, 0.55),
    0 18px 34px rgba(0, 0, 0, 0.65);
  transform: scale(1.14);
  opacity: 1;
}
.aos-cell-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 8px 6px;
  font-size: 0.68rem;
  color: #e6ecff;
  background: linear-gradient(transparent, rgba(4, 6, 14, 0.94));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aos-empty { grid-column: 1 / -1; color: var(--text-dim); text-align: center; padding: 30px; }

/* ── console chips ── */
.aos-console-row {
  display: flex; gap: 12px;
  overflow-x: auto;
  padding: 6px 4px 14px;
  scrollbar-width: none;
}
.aos-console-row::-webkit-scrollbar { display: none; }
.aos-console {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  background: rgba(12, 18, 34, 0.8);
  border: 2px solid rgba(139, 152, 189, 0.25);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 20px 10px 12px;
  cursor: pointer;
  transition: all .16s ease;
}
.aos-console:hover { border-color: rgba(139, 152, 189, 0.55); transform: translateY(-2px); }
.aos-console.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft-strong), 0 0 22px var(--accent-glow);
}
.aos-console:focus-visible { outline: 2px solid var(--aos-magenta); outline-offset: 2px; }
.aos-console-ico { width: 44px; height: 36px; display: flex; align-items: center; justify-content: center; }
.aos-console-ico svg { width: 100%; height: 100%; }
.aos-console-name { font-size: 0.92rem; font-weight: 800; letter-spacing: 0.06em; }

/* ═══ controller hints footer ═══ */
.aos-hintsbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px 12px;
  background: linear-gradient(0deg, rgba(5, 7, 15, 0.95), rgba(5, 7, 15, 0.6));
  border-top: 1px solid rgba(37, 244, 238, 0.12);
}
.aos-hints { display: flex; gap: 26px; flex-wrap: wrap; }
.aos-hint {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--text-dim);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.aos-cap {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 0 6px;
}
.aos-cap-a { background: #2ecc71; color: #062b12; box-shadow: 0 0 10px rgba(46, 204, 113, 0.6); }
.aos-cap-b { background: #e74c3c; color: #2b0603; box-shadow: 0 0 10px rgba(231, 76, 60, 0.6); }
.aos-cap-lb, .aos-cap-rb { background: rgba(139, 152, 189, 0.25); color: var(--text); border-radius: 6px; }
.aos-cap-y { background: #f1c40f; color: #2b2202; box-shadow: 0 0 10px rgba(241, 196, 15, 0.5); }
.aos-cap-st { background: rgba(139, 152, 189, 0.25); color: var(--text); border-radius: 6px; }
.aos-conn {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--text-dim);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em;
}
.aos-conn-dot { width: 9px; height: 9px; border-radius: 50%; background: #3a4560; }
.aos-conn-dot.on { background: #2ecc71; box-shadow: 0 0 10px rgba(46, 204, 113, 0.8); }

/* ═══ modal ═══ */
.aos-modal {
  position: fixed; inset: 0;
  z-index: 9300;   /* above the topbar (9200) — modals open over everything incl. the acct menu */
  display: flex; align-items: center; justify-content: center;
  background: rgba(3, 5, 12, 0.8);
  backdrop-filter: blur(10px);
}
.aos-modal[hidden] { display: none; }
.aos-d-panel {
  position: relative;
  display: flex; gap: 28px;
  width: min(880px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
  background: linear-gradient(160deg, rgba(14, 20, 38, 0.97), rgba(8, 12, 24, 0.97));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 0 44px rgba(37, 244, 238, 0.18), 0 30px 80px rgba(0, 0, 0, 0.7);
  padding: 26px;
  animation: aos-modal-in .22s ease;
}
@keyframes aos-modal-in {
  from { transform: translateY(14px) scale(0.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.aos-d-art {
  width: min(240px, 34vw);
  aspect-ratio: 3 / 4;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #05070f;
  flex: 0 0 auto;
  align-self: flex-start;
}
.aos-d-noart { display: flex; align-items: center; justify-content: center; font-size: 3.4rem; color: #26304d; }
.aos-d-info { flex: 1; min-width: 0; }
.aos-d-info h2 { margin: 0 0 6px; font-size: 1.6rem; }
.aos-d-meta { color: var(--accent-bright); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 14px; }
.aos-d-desc { color: var(--text-dim); line-height: 1.55; font-size: 0.92rem; margin: 0 0 20px; max-height: 34vh; overflow-y: auto; }
.aos-d-btns { display: flex; gap: 12px; }
.aos-d-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: 1px solid rgba(139, 152, 189, 0.35);
  color: var(--text-dim);
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 1rem; cursor: pointer;
}
.aos-d-close:hover { color: #fff; border-color: var(--aos-magenta); }
.aos-d-search { flex-direction: column; gap: 14px; width: min(560px, 92vw); }
.aos-search-input {
  width: 100%;
  background: rgba(5, 8, 16, 0.9);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1.05rem;
  padding: 13px 16px;
  outline: none;
}
.aos-hint-line { color: var(--text-dim); font-size: 0.74rem; letter-spacing: 0.1em; margin: 0; }
.aos-set-row {
  display: flex; align-items: center; gap: 10px;
  color: var(--text);
  font-size: 0.92rem;
  padding: 8px 0;
  cursor: pointer;
}

/* ═══ account cluster (top bar) + sidebar site links ═══ */
.aos-acct { display: flex; align-items: center; gap: 10px; position: relative; margin-left: 4px; }
.aos-acct-sm { padding: 9px 18px; font-size: 0.78rem; border-radius: 10px; text-decoration: none; letter-spacing: 0.12em; }
.aos-acct-pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(12, 18, 34, 0.8);
  border: 1px solid rgba(139, 152, 189, 0.35);
  color: var(--text);
  border-radius: 22px;
  padding: 7px 14px 7px 8px;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.aos-acct-pill:hover, .aos-acct-pill[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--accent-soft-strong);
}
.aos-acct-pending { color: var(--text-dim); }
.aos-acct-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--aos-purple, #9d4dff), var(--aos-magenta, #ff2a9d));
  color: #fff; font-size: 0.8rem; font-weight: 900;
  box-shadow: 0 0 10px rgba(157, 77, 255, 0.5);
}
.aos-acct-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aos-acct-caret { color: var(--text-dim); font-size: 0.7rem; }
.aos-acct-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 230px;
  background: linear-gradient(160deg, rgba(14, 20, 38, 0.98), rgba(8, 12, 24, 0.98));
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 0 30px rgba(37, 244, 238, 0.16), 0 24px 60px rgba(0, 0, 0, 0.65);
  padding: 10px;
  z-index: 9050;
  animation: aos-modal-in .16s ease;
}
.aos-acct-menu[hidden] { display: none; }
.aos-acct-hello {
  color: var(--text-dim); font-size: 0.62rem; font-weight: 800;
  letter-spacing: 0.3em; margin: 4px 6px 8px;
}
.aos-acct-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  background: none; border: none;
  color: var(--text);
  font-size: 0.88rem; font-weight: 600;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
  text-decoration: none;
  text-align: left;
  transition: background .14s ease, color .14s ease;
}
.aos-acct-item:hover { background: rgba(37, 244, 238, 0.1); color: #fff; }
.aos-acct-item.is-focus,
.aos-acct-item.is-focus:hover {
  background: rgba(37, 244, 238, 0.14); color: #fff;
  outline: 1px solid rgba(37, 244, 238, 0.45);
  outline-offset: -1px;
}
.aos-acct-admin { color: #ffd166; }
.aos-acct-admin:hover, .aos-acct-admin.is-focus { background: rgba(255, 209, 102, 0.1); color: #ffe3a0; }
.aos-acct-badge {
  background: linear-gradient(135deg, var(--aos-magenta), var(--aos-purple));
  color: #fff; font-size: 0.6rem; font-weight: 800;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}
.aos-acct-logout { color: #ff7ab0; }
.aos-acct-logout:hover { background: rgba(255, 42, 157, 0.12); color: #ffc4de; }

/* sidebar groups + nav links */
.aos-side-divider {
  color: rgba(139, 152, 189, 0.55);
  font-size: 0.6rem; font-weight: 800;
  letter-spacing: 0.34em;
  padding: 14px 14px 4px;
}
.aos-side-item .aos-side-ico { font-size: 1rem; }
.aos-side-item[data-id="discover"] .aos-side-label { letter-spacing: 0.04em; }

/* settings modal: theme picker */
.aos-set-head {
  color: var(--text-dim); font-size: 0.62rem; font-weight: 800;
  letter-spacing: 0.3em;
  margin: 14px 0 8px; padding-top: 12px;
  border-top: 1px solid rgba(139, 152, 189, 0.18);
}
.aos-set-group {
  color: rgba(139, 152, 189, 0.6);
  font-size: 0.58rem; font-weight: 800; letter-spacing: 0.26em;
  margin: 8px 0 5px;
}
.aos-theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 7px; }
.aos-theme-grid .aos-set-group { grid-column: 1 / -1; margin: 8px 0 2px; }
.aos-theme-btn {
  background: rgba(12, 18, 34, 0.85);
  border: 1px solid rgba(139, 152, 189, 0.3);
  color: var(--text);
  border-radius: 9px;
  padding: 9px 8px;
  font-size: 0.78rem; font-weight: 700;
  cursor: pointer;
  transition: all .14s ease;
}
.aos-theme-btn:hover { border-color: var(--accent); box-shadow: 0 0 12px var(--accent-soft-strong); }
.aos-theme-btn.is-active {
  border-color: var(--aos-magenta);
  color: var(--aos-magenta);
  box-shadow: 0 0 12px rgba(255, 42, 157, 0.35);
  cursor: default;
}
.aos-d-wl.wl-active { color: var(--aos-magenta); border-color: var(--aos-magenta); }

/* PC Classics modal list */
.aos-wc-item { width: 100%; justify-content: flex-start; text-align: left; }

/* ═══ responsive additions for account cluster ═══ */
@media (max-width: 900px) {
  .aos-acct-name { display: none; }
  .aos-acct-pill { padding: 7px 8px; }
}
@media (max-width: 640px) {
  .aos-acct-sm { padding: 8px 12px; font-size: 0.72rem; }
  .aos-acct-menu { position: fixed; top: auto; right: 10px; left: 10px; min-width: 0; }
}

/* ── label rows (TOP GAMES / BROWSE GAMES) + VIEW ALL ── */
.aos-label-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 2px 4px 0;
}
.aos-viewall {
  background: rgba(12, 18, 34, 0.8);
  border: 1px solid rgba(139, 152, 189, 0.3);
  color: var(--text-dim);
  border-radius: 14px;
  padding: 4px 14px;
  font-size: 0.62rem; font-weight: 800;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: all .14s ease;
}
.aos-viewall:hover {
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-soft-strong);
}

/* ── Top Games ranked poster row ── */
.aos-top {
  display: flex; gap: 14px;
  overflow-x: auto;
  padding: 10px 4px 12px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.aos-top::-webkit-scrollbar { display: none; }
.aos-top-card {
  position: relative;
  flex: 0 0 auto;
  width: 118px;
  background: none; border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  scroll-snap-align: center;
}
.aos-top-thumb {
  position: relative;
  display: block;
  width: 118px; aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(139, 152, 189, 0.25);
  background: #0c1222;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.aos-top-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  z-index: 1;
}
.aos-top-thumb .aos-cell-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #26304d;
  background: linear-gradient(150deg, #101a30, #0a0f1e);
  z-index: 0;
}
.aos-top-rank {
  position: absolute;
  top: 7px; left: 7px;
  z-index: 2;
  background: linear-gradient(120deg, var(--aos-purple, #9d4dff), var(--aos-magenta, #ff2a9d));
  color: #fff;
  font-size: 0.6rem; font-weight: 900;
  letter-spacing: 0.06em;
  border-radius: 7px;
  padding: 2px 7px;
  box-shadow: 0 0 10px rgba(157, 77, 255, 0.5);
}
.aos-top-name {
  display: block;
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 0.66rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aos-top-card:hover .aos-top-thumb {
  transform: translateY(-4px) scale(1.04);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}
.aos-top-card:hover .aos-top-name { color: #fff; }
.aos-top-card.is-focus .aos-top-thumb {
  border-color: var(--aos-magenta);
  box-shadow: 0 0 0 2px rgba(255, 42, 157, 0.45), 0 0 24px rgba(255, 42, 157, 0.4);
}
.aos-top-card.is-focus .aos-top-name { color: #fff; }

/* ── genre chips (library views) ── */
.aos-genre-row {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 2px 4px 6px;
  scrollbar-width: none;
  flex: 0 0 auto;
}
.aos-genre-row::-webkit-scrollbar { display: none; }
.aos-genre {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(12, 18, 34, 0.8);
  border: 1px solid rgba(139, 152, 189, 0.28);
  color: var(--text-dim);
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .14s ease;
}
.aos-genre:hover { border-color: var(--accent); color: var(--text); box-shadow: 0 0 10px var(--accent-soft-strong); }
.aos-genre.is-active {
  border-color: var(--aos-magenta);
  color: #ff7ab0;
  background: rgba(255, 42, 157, 0.08);
  box-shadow: 0 0 14px rgba(255, 42, 157, 0.3);
}
.aos-genre-n {
  background: rgba(139, 152, 189, 0.15);
  color: var(--text-dim);
  border-radius: 9px;
  padding: 1px 7px;
  font-size: 0.62rem;
}
.aos-genre.is-active .aos-genre-n { color: #ff7ab0; background: rgba(255, 42, 157, 0.16); }

/* ── long-form library list (vertical rows) ── */
.aos-strip.is-long {
  display: block;
  overflow-y: auto;
  padding: 4px 2px 12px;
  scroll-behavior: smooth;
}
.aos-row {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  max-width: 980px;
  margin: 0 auto 8px;
  padding: 6px 14px 6px 6px;
  background: rgba(12, 18, 34, 0.72);
  border: 1px solid rgba(139, 152, 189, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease, transform .14s ease;
}
.aos-row:hover {
  border-color: rgba(139, 152, 189, 0.45);
  background: rgba(16, 24, 44, 0.85);
  transform: translateX(2px);
}
.aos-row.is-center {
  border-color: var(--aos-magenta);
  background: linear-gradient(90deg, rgba(255, 42, 157, 0.10), rgba(12, 18, 34, 0.8) 55%);
  box-shadow: 0 0 0 1px rgba(255, 42, 157, 0.35), 0 0 22px rgba(255, 42, 157, 0.28);
}
.aos-row-thumb {
  position: relative;
  flex: 0 0 52px;
  width: 52px; height: 68px;
  border-radius: 8px;
  overflow: hidden;
  background: #0c1222;
  border: 1px solid rgba(139, 152, 189, 0.25);
}
.aos-row-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  z-index: 1;
}
.aos-row-thumb .aos-cell-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #26304d;
  background: linear-gradient(150deg, #101a30, #0a0f1e);
  z-index: 0;
}
.aos-row-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.aos-row-title {
  color: var(--text);
  font-size: 0.95rem; font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aos-row.is-center .aos-row-title { color: #fff; text-shadow: 0 0 12px rgba(255, 42, 157, 0.35); }
.aos-row-meta {
  color: var(--text-dim);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aos-row-genre {
  color: var(--accent-bright);
}
.aos-row-go {
  flex: 0 0 auto;
  color: rgba(139, 152, 189, 0.5);
  font-size: 0.85rem;
  transition: color .14s ease;
}
.aos-row.is-center .aos-row-go, .aos-row:hover .aos-row-go { color: var(--accent); }

/* ═══ Plex-style preplay modal ═══ */
.aos-d-stack {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 4px;
}
.aos-d-backdrop {
  position: absolute; inset: -40px;
  background-size: cover;
  z-index: 0;
}
.aos-d-backdrop img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(26px) saturate(1.2) brightness(0.5);
  transform: scale(1.15);
}
.aos-d-backdrop::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4, 6, 13, 0.55), rgba(4, 6, 13, 0.88));
}
.aos-d-panel.aos-d-plex {
  position: relative;
  z-index: 1;
  width: min(980px, 94vw);
  background: linear-gradient(160deg, rgba(14, 20, 38, 0.94), rgba(8, 12, 24, 0.96));
  box-shadow: 0 0 60px rgba(37, 244, 238, 0.16), 0 40px 90px rgba(0, 0, 0, 0.75);
}
.aos-d-plex .aos-d-art {
  width: min(250px, 30vw);
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(37, 244, 238, 0.2), 0 18px 44px rgba(0, 0, 0, 0.65);
  transition: transform .3s ease;
}
.aos-d-plex .aos-d-info h2 {
  font-size: 1.9rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  background: linear-gradient(120deg, #fff 40%, var(--accent-bright));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(37, 244, 238, 0.3));
}
.aos-d-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 14px; }
.aos-d-chip {
  display: inline-flex; align-items: center;
  background: rgba(12, 18, 34, 0.85);
  border: 1px solid rgba(139, 152, 189, 0.3);
  color: var(--text-dim);
  border-radius: 14px;
  padding: 4px 12px;
  font-size: 0.68rem; font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.aos-d-chip-sys { color: var(--accent-bright); border-color: rgba(37, 244, 238, 0.4); background: rgba(37, 244, 238, 0.08); }
.aos-d-chip-genre { color: #ff7ab0; border-color: rgba(255, 42, 157, 0.4); background: rgba(255, 42, 157, 0.08); }
.aos-d-play {
  flex: 0 0 auto;
  width: 76px; height: 76px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #19e3f2, #25f4ee);
  color: #04121a;
  font-size: 1.7rem;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px rgba(37, 244, 238, 0.55), inset 0 2px 0 rgba(255, 255, 255, 0.4);
  transition: transform .15s ease, box-shadow .15s ease;
}
.aos-d-play:hover {
  transform: scale(1.06);
  box-shadow: 0 0 44px rgba(37, 244, 238, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.4);
}
.aos-d-play:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.aos-d-btns { display: flex; gap: 12px; align-items: center; }

/* more-like-this poster row */
.aos-d-more {
  position: relative;
  z-index: 1;
  width: min(980px, 94vw);
  margin-top: 12px;
  background: linear-gradient(160deg, rgba(14, 20, 38, 0.9), rgba(8, 12, 24, 0.92));
  border: 1px solid rgba(37, 244, 238, 0.2);
  border-radius: 14px;
  padding: 16px 18px;
  animation: aos-modal-in .22s ease;
}
.aos-d-more-label {
  color: var(--text-dim);
  font-size: 0.62rem; font-weight: 800;
  letter-spacing: 0.3em;
  margin: 0 0 10px;
}
.aos-d-more-row {
  display: flex; gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 244, 238, 0.3) transparent;
}
.aos-d-more-item {
  flex: 0 0 92px;
  background: none; border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.aos-d-more-thumb {
  position: relative;
  display: block;
  width: 92px; height: 122px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(139, 152, 189, 0.25);
  background: #0c1222;
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.aos-d-more-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  z-index: 1;
}
.aos-d-more-thumb .aos-cell-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #26304d;
  background: linear-gradient(150deg, #101a30, #0a0f1e);
  z-index: 0;
}
.aos-d-more-item:hover .aos-d-more-thumb {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(37, 244, 238, 0.35);
  transform: translateY(-3px);
}
.aos-d-more-name {
  display: block;
  margin-top: 5px;
  color: var(--text-dim);
  font-size: 0.62rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aos-d-more-item:hover .aos-d-more-name { color: #fff; }

/* ═══ Arcade OS 3D variant (body.aos-3d): perspective cover-flow ═══ */
body.aos-3d .aos-strip:not(.is-grid):not(.is-long) {
  padding: 26px 4px 34px;
}
body.aos-3d .aos-cell {
  transition: transform .3s cubic-bezier(.2,.7,.3,1), border-color .2s ease, box-shadow .3s ease;
  transform-origin: 50% 60%;
}
/* per-cell perspective: each cover shows its own vanishing point —
   the classic cover-flow read (a shared perspective flattens the
   middle of a wide strip) */
body.aos-3d .aos-cell:not(.is-center) {
  transform: perspective(900px) rotateY(44deg) scale(0.88);
}
body.aos-3d .aos-cell:nth-child(odd):not(.is-center) { transform: perspective(900px) rotateY(-44deg) scale(0.88); }
body.aos-3d .aos-cell.is-center {
  transform: scale(1.26);
  border-color: var(--aos-magenta);
  box-shadow:
    0 0 0 2px rgba(255, 42, 157, 0.5),
    0 0 34px rgba(255, 42, 157, 0.5),
    0 30px 50px rgba(0, 0, 0, 0.65);
  z-index: 2;
}
body.aos-3d .aos-cell.is-center img {
  -webkit-box-reflect: below 6px linear-gradient(transparent 62%, rgba(0, 0, 0, 0.28));
}
body.aos-3d .aos-cell:hover:not(.is-center) {
  transform: perspective(900px) rotateY(28deg) scale(0.95);
}
body.aos-3d .aos-cell:nth-child(odd):hover:not(.is-center) {
  transform: perspective(900px) rotateY(-28deg) scale(0.95);
}
body.aos-3d .aos-d-plex .aos-d-art {
  transform: rotateY(-14deg);
  box-shadow: 22px 24px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(37, 244, 238, 0.2);
}
body.aos-3d .aos-d-more-item:hover .aos-d-more-thumb {
  transform: translateY(-4px) rotateX(8deg);
}
body.aos-3d .aos-row.is-center { transform: translateX(6px); }
@media (max-width: 640px) {
  body.aos-3d .aos-cell:not(.is-center) { transform: rotateY(20deg) scale(0.9); }
  body.aos-3d .aos-cell:nth-child(odd):not(.is-center) { transform: rotateY(-20deg) scale(0.9); }
  body.aos-3d .aos-cell.is-center { transform: scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  body.aos-3d .aos-cell,
  body.aos-3d .aos-cell.is-center,
  body.aos-3d .aos-d-plex .aos-d-art { transform: none; transition: none; }
}

/* ═══ toast ═══ */
.aos-toast {
  position: fixed;
  left: 50%; bottom: 76px;
  transform: translateX(-50%);
  z-index: 9400;   /* above modal too — toasts must never be swallowed */
  background: rgba(8, 12, 24, 0.95);
  border: 1px solid var(--accent);
  color: var(--text);
  border-radius: 24px;
  padding: 10px 22px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  box-shadow: 0 0 22px var(--accent-glow);
}

/* ═══ attract mode ═══ */
body.aos-attract .aos-topbar,
body.aos-attract .aos-sidebar,
body.aos-attract .aos-row-label,
body.aos-attract .aos-label-row,
body.aos-attract #aosTopWrap,
body.aos-attract .aos-console-row,
body.aos-attract .aos-hintsbar { opacity: 0.07; transition: opacity 1.2s ease; }

/* ═══ effects off ═══ */
body.aos-no-fx .aos-play-btn { box-shadow: none; }
body.aos-no-fx .aos-bg-img { transition: none; }
body.aos-no-fx .aos-hero-title { filter: none; background: none; color: #fff; -webkit-text-fill-color: #fff; }

/* ═══ responsive ═══ */
@media (max-width: 1100px) {
  .aos-tagline { display: none; }
}
@media (max-width: 900px) {
  .aos-sidebar { width: 74px; flex-basis: 74px; padding: 12px 8px; }
  .aos-side-label, .aos-sidebar-motto { display: none; }
  .aos-side-item { justify-content: center; padding: 12px 8px; }
  .aos-hero-title { font-size: clamp(1.6rem, 6vw, 2.6rem); }
  .aos-main { padding: 6px 14px 0; }
  .aos-pad-status { display: none; }
}
@media (max-width: 640px) {
  .aos-topbar { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .aos-search { max-width: none; order: 5; flex-basis: 100%; }
  .aos-cell { width: 118px; }
  .aos-d-panel { flex-direction: column; align-items: center; padding: 18px; }
  .aos-d-art { width: min(200px, 56vw); }
  .aos-hints { gap: 12px; }
  .aos-hint:nth-child(n+4) { display: none; }
}
@media (min-width: 1800px) {
  .aos-cell { width: 190px; }
  .aos-hero-title { font-size: 5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .aos-cell, .aos-console, .aos-play-btn, .aos-ghost-btn, .aos-side-item { transition: none; }
  .aos-d-panel { animation: none; }
  .aos-strip { scroll-behavior: auto; }
}

/* ── library loading / error states ── */
.aos-loading {
  display: flex; align-items: center; gap: 14px;
  color: var(--text-dim);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.22em;
  padding: 40px 10px;
  flex-direction: column;
}
.aos-spinner {
  width: 34px; height: 34px;
  border: 3px solid rgba(37, 244, 238, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: aos-spin .9s linear infinite;
}
@keyframes aos-spin { to { transform: rotate(360deg); } }
.aos-load-fail { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .aos-spinner { animation-duration: 1.6s; } }

/* ═══ short viewports (phone landscape): compact rows + scrollable main ═══ */
@media (max-height: 500px) {
  .aos-main { overflow-y: auto; }
  .aos-strip-wrap, .aos-console-row { flex-shrink: 0; }
  .aos-genre-row { flex-shrink: 0; }
  /* hero must size to its CONTENT here — flex:1 + overflow clips the title */
  .aos-hero { flex: 0 0 auto; overflow: visible; }
  .aos-topbar { padding: 6px 16px; }
  .aos-brand { font-size: 1.05rem; }
  .aos-search input { padding: 5px 14px; font-size: 0.78rem; }
  .aos-os-badge { font-size: 0.6rem; padding: 4px 10px; }
  .aos-main { padding: 4px 16px 0; gap: 4px; }
  .aos-hero { padding: 0 6px; }
  .aos-eyebrow { display: none; }
  .aos-hero-title { font-size: clamp(1.1rem, 4.5vh, 1.7rem); margin-bottom: 4px; }
  .aos-hero-meta { margin-bottom: 8px; font-size: 0.8rem; }
  .aos-hero-btns { gap: 8px; }
  .aos-play-btn, .aos-ghost-btn { padding: 7px 16px; font-size: 0.76rem; border-radius: 9px; }
  .aos-fav-btn { width: 36px; height: 36px; font-size: 0.95rem; }
  .aos-row-label { font-size: 0.58rem; letter-spacing: 0.3em; }
  .aos-strip { gap: 10px; padding: 8px 2px 6px; }
  .aos-cell { width: 106px; }
  .aos-cell-label { font-size: 0.56rem; padding: 10px 5px 4px; }
  .aos-console { padding: 5px 12px 5px 6px; gap: 8px; }
  .aos-console-ico { width: 30px; height: 24px; }
  .aos-console-name { font-size: 0.74rem; }
  .aos-console-row { padding-bottom: 8px; }
  .aos-hintsbar { padding: 5px 14px 7px; }
  .aos-hint { font-size: 0.6rem; gap: 6px; }
  .aos-cap { min-width: 20px; height: 20px; font-size: 0.56rem; }
  .aos-hints { gap: 14px; }
}

/* ── Plex poster-wall treatment for the library grid ── */
.aos-main.aos-wall .aos-hero { display: none; }
.aos-main.aos-wall { padding-top: 12px; }
.aos-main.aos-wall .aos-strip-wrap { flex: 1 1 0; min-height: 0; display: flex; }
.aos-strip.is-grid {
  gap: 12px 10px;
  padding: 6px 2px 18px;
}
.aos-strip.is-grid .aos-cell {
  width: auto;
  aspect-ratio: 3 / 4;
  margin-bottom: 30px;
  border-radius: 8px;
  border-color: rgba(20, 28, 48, 0.9);
  opacity: 0.82;
  overflow: visible;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.aos-strip.is-grid .aos-cell img { border-radius: 8px; }
.aos-strip.is-grid .aos-cell .aos-cell-label {
  position: absolute;
  top: 100%; left: 2px; right: 2px; bottom: auto;
  padding: 6px 2px 0;
  background: none;
  color: var(--text-dim);
  font-size: 0.66rem;
  text-align: center;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aos-strip.is-grid .aos-cell:hover {
  opacity: 1;
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.6);
  z-index: 3;
}
.aos-strip.is-grid .aos-cell.is-center {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft-strong), 0 0 20px var(--accent-glow);
  opacity: 1;
  transform: none;
}

/* cell layering: fallback always behind, img covers it, label on top */
.aos-cell .aos-cell-fallback {
  position: absolute; inset: 0;
  z-index: 0;
}
.aos-cell img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  z-index: 1;
}
.aos-cell .aos-cell-label { z-index: 2; }

/* iOS notch / android gesture-bar safe areas */
.aos-topbar { padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
.aos-hintsbar { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
.aos-sidebar { padding-top: calc(18px + env(safe-area-inset-top, 0px)); }

/* hero title: never overflow the hero on tiny screens */
.aos-hero-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── session 57 Homebrew milestone: mode indicator badge on the
   sidebar Homebrew & Extras row (shows when contentMode ≠ retail) ── */
.aos-side-badge {
  margin-left: auto;
  padding: 2px 6px;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #0a0a14;
  background: linear-gradient(135deg, var(--aos-magenta, #ff2a9d), var(--aos-purple, #9d4dff));
  border-radius: 6px;
}

/* ── session 58: library-content mode picker (Homebrew 2nd activation) ── */
.aos-mode-item {
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
  width: 100%;
  text-align: left;
  background: rgba(12, 18, 34, 0.8);
  border: 1px solid rgba(139, 152, 189, 0.28);
  border-radius: 12px;
  padding: 12px 46px 12px 16px;
  cursor: pointer;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.aos-mode-item:hover, .aos-mode-item.is-focus {
  border-color: var(--aos-magenta, #ff2a9d);
  box-shadow: 0 0 14px rgba(255, 42, 157, 0.35);
}
.aos-mode-label {
  font-size: 0.92rem; font-weight: 800; letter-spacing: 0.08em;
  color: var(--text, #e8ecff); text-transform: uppercase;
}
.aos-mode-desc { font-size: 0.72rem; color: rgba(139, 152, 189, 0.9); }
.aos-mode-n {
  position: absolute; right: 16px; top: 14px;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--text-dim, #8b98bd);
}
.aos-mode-cur {
  position: absolute; right: 16px; bottom: 12px;
  font-size: 0.52rem; font-weight: 800; letter-spacing: 0.18em;
  color: #0a0a14;
  background: linear-gradient(135deg, #ff2a9d, #9d4dff);
  border-radius: 5px; padding: 2px 7px;
}


/* == session 58c cover-fit polish: letterbox gutters look intentional == */
/* cards already sit on #0c1222; deepen with a soft vertical sheen so
   landscape and square art read as framed posters */
.aos-cell, .aos-top-thumb, .aos-row-thumb, .aos-d-more-thumb {
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(37, 244, 238, 0.05), transparent 60%),
    linear-gradient(180deg, #0d1526, #0a0f1e 70%, #080d18);
}

/* ── Halo Unified destination panel (2026-11-02, session: subsystem P6) ── */
.aos-halo-panel { text-align: center; max-width: 640px; }
.aos-halo-row { display: flex; gap: 18px; align-items: center; text-align: left;
  margin: 14px 0 18px; }
.aos-halo-art { width: 148px; flex: 0 0 148px; border-radius: 10px; border: 1px solid rgba(34,211,238,.35);
  box-shadow: 0 0 24px rgba(34,211,238,.18); }
.aos-halo-blurb { color: var(--aos-muted, #9ca3af); font-size: 13.5px; line-height: 1.5; }
.aos-halo-count { font-size: 14px; color: #22d3ee; margin: 6px 0 12px; }
.aos-halo-item { display: block; width: 100%; margin: 8px 0; }
.aos-halo-item.aos-primary { background: linear-gradient(90deg, #22d3ee, #818cf8); color: #06090f;
  border-color: transparent; font-weight: 700; }
