:root {
  color-scheme: dark;
  --ink: #f4f8ff;
  --muted: #8fa3bd;
  --blue: #298dff;
  --blue-bright: #5bdcff;
  --blue-deep: #174dff;
  --navy: #061123;
  --panel: rgba(12, 27, 49, 0.82);
  --panel-solid: #0c1b31;
  --line: rgba(145, 185, 230, 0.16);
  --danger: #ff5d7c;
  --shadow: 0 28px 70px rgba(0, 4, 15, 0.42);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--navy);
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 72% 0%, rgba(24, 98, 185, 0.16), transparent 33rem),
    linear-gradient(135deg, #071427 0%, #040b17 72%);
  color: var(--ink);
  font-family: "Manrope", system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible, label:focus-within {
  outline: 3px solid rgba(91, 220, 255, 0.85);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  transform: translateY(-180%);
  padding: 10px 16px;
  border-radius: 8px;
  background: white;
  color: #071427;
}
.skip-link:focus { transform: translateY(0); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ambient { position: fixed; z-index: 0; pointer-events: none; filter: blur(2px); }
.ambient-one {
  width: 28rem;
  height: 28rem;
  right: -14rem;
  top: 25rem;
  border-radius: 50%;
  background: rgba(32, 115, 255, 0.09);
}
.ambient-two {
  width: 22rem;
  height: 22rem;
  left: 20%;
  bottom: -13rem;
  border-radius: 50%;
  background: rgba(52, 211, 255, 0.06);
}

/* Glass and vignette only: the strong CRT texture is baked into the background art. */
.crt-overlay {
  position: fixed;
  z-index: 9998;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 48%, rgba(0, 8, 18, .08) 72%, rgba(0, 3, 9, .48) 100%);
  box-shadow:
    inset 0 0 125px rgba(0, 3, 10, .72),
    inset 0 0 26px rgba(65, 166, 255, .13);
  backdrop-filter: contrast(1.015) saturate(1.025);
  opacity: .72;
}
.crt-overlay::before {
  content: "";
  position: absolute;
  inset: -20% 0;
  background:
    linear-gradient(180deg, transparent 40%, rgba(125, 221, 255, .14) 49%, rgba(5, 17, 32, .18) 51%, transparent 60%);
  mix-blend-mode: screen;
  animation: crt-scan 5.6s linear infinite;
}
.crt-overlay::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: clamp(18px, 2.2vw, 34px);
  background: linear-gradient(115deg, rgba(255, 255, 255, .055), transparent 18% 77%, rgba(74, 169, 255, .025));
  box-shadow:
    inset 0 0 0 1px rgba(170, 225, 255, .075),
    inset 0 0 46px rgba(36, 144, 255, .1),
    0 0 0 5px rgba(0, 3, 9, .12);
}
body.is-rom-fullscreen .crt-overlay { display: none; }

@keyframes crt-scan {
  from { transform: translateY(-42%); }
  to { transform: translateY(42%); }
}

@keyframes crt-background-jitter {
  0%, 88%, 92%, 100% { transform: translate3d(0, 0, 0) scale(1.025); }
  89% { transform: translate3d(3px, -1px, 0) scale(1.027); }
  90% { transform: translate3d(-5px, 1px, 0) scale(1.028); }
  91% { transform: translate3d(2px, 0, 0) scale(1.026); }
}

@keyframes crt-phosphor-pulse {
  from { opacity: .68; filter: saturate(1.14) contrast(1.1) brightness(.96); }
  to { opacity: .74; filter: saturate(1.22) contrast(1.16) brightness(1.035); }
}

@keyframes crt-sync-roll {
  from { background-position: center -55vh, center 22%; }
  to { background-position: center 155vh, center 22%; }
}

.app-shell { position: relative; z-index: 1; display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 30px 22px;
  border-right: 1px solid var(--line);
  background: rgba(4, 12, 24, 0.72);
  backdrop-filter: blur(20px);
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand > span { font: 700 18px/1 "Space Grotesk", sans-serif; letter-spacing: -0.5px; }
.brand > span > span { color: var(--blue-bright); }
.brand img { filter: drop-shadow(0 8px 17px rgba(34, 134, 255, 0.22)); }

.side-nav { display: grid; gap: 7px; margin-top: 52px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.035); color: var(--ink); }
.nav-item.is-active {
  border-color: rgba(49, 143, 255, 0.2);
  background: linear-gradient(90deg, rgba(40, 136, 255, 0.18), rgba(40, 136, 255, 0.03));
  color: #dcecff;
}
.nav-icon { display: block; width: 21px; height: 21px; object-fit: contain; }

.sidebar-foot {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-top: auto;
  padding: 15px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(17, 37, 65, 0.42);
}
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: 12px; }
.sidebar-foot small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #36e6ad; box-shadow: 0 0 0 5px rgba(54,230,173,.1), 0 0 14px #36e6ad; }

.main-content { min-width: 0; }
#homeView { max-width: 1500px; margin: 0 auto; padding: 0 46px; }

.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 118px; }
.topbar h1 { margin: 3px 0 0; font: 700 28px/1.15 "Space Grotesk", sans-serif; }
.eyebrow { margin: 0; color: #66819f; font-size: 10px; font-weight: 800; letter-spacing: 0.18em; }
.icon-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(13, 29, 52, 0.65);
  font-size: 25px;
  cursor: pointer;
}
.icon-button:hover { border-color: rgba(91,220,255,.5); background: rgba(31, 83, 141, .3); }
.language-button {
  min-width: 44px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(91, 220, 255, .32);
  border-radius: 10px;
  background: rgba(13, 39, 70, .72);
  color: #dff6ff;
  font: 800 10px/1 "Space Grotesk", sans-serif;
  letter-spacing: .12em;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), 0 0 24px rgba(42,151,255,.09);
}
.language-button:hover,
.language-button:focus-visible { border-color: #58d8ff; background: rgba(31, 93, 155, .54); outline: none; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  align-items: center;
  min-height: 510px;
  overflow: hidden;
  border: 1px solid rgba(125, 170, 219, 0.16);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(115deg, rgba(19, 45, 77, 0.94), rgba(5, 16, 32, 0.65)),
    repeating-linear-gradient(90deg, transparent 0 70px, rgba(255,255,255,.012) 71px);
  box-shadow: var(--shadow);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6,17,35,.62), transparent 54%);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 2; padding: 68px 16px 66px 65px; }
.hero-kicker { color: #72baf0; font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.hero-kicker span { display: inline-block; width: 23px; height: 1px; margin: 0 8px 3px 0; background: #49d9ff; }
.hero h2 { margin: 16px 0 18px; font: 700 clamp(48px, 5.2vw, 79px)/.93 "Space Grotesk", sans-serif; letter-spacing: -4px; }
.hero h2 em { color: #55c8ff; font-style: normal; }
.hero-description { max-width: 520px; color: #a9b9cc; font-size: 15px; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 47px;
  padding: 0 21px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button-primary { background: linear-gradient(135deg, #36a5ff, #1b5cff); box-shadow: 0 10px 30px rgba(21, 92, 255, .28); }
.button-secondary { border-color: rgba(75, 162, 255, .3); background: rgba(35, 112, 199, .18); }
.button-ghost { border-color: var(--line); background: rgba(255,255,255,.035); }
.button-danger { background: rgba(255, 73, 113, .15); border-color: rgba(255,93,124,.4); color: #ff9bb0; }
.privacy-note { margin: 22px 0 0; color: #71869f; font-size: 10px; font-weight: 700; letter-spacing: .05em; }
.privacy-note span { color: #41dcff; margin-right: 5px; }

.hero-console { position: relative; align-self: stretch; min-height: 510px; perspective: 900px; }
.console-glow { position: absolute; width: 420px; height: 420px; left: 12%; top: 9%; border-radius: 50%; background: rgba(31, 134, 255, .2); filter: blur(70px); }
.official-logo { position:absolute;z-index:2;width:min(610px,112%);max-height:92%;right:-2%;top:50%;object-fit:contain;filter:drop-shadow(0 30px 40px rgba(0,0,0,.42));transform:translateY(-50%) rotate(1deg); }
.console-screen {
  position: absolute;
  width: min(500px, 90%);
  aspect-ratio: 1.52;
  left: 4%;
  top: 12%;
  overflow: hidden;
  border: 9px solid #101f34;
  border-radius: 27px;
  background: #071625;
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 0 0 2px rgba(123, 188, 255, .18);
  transform: rotateY(-7deg) rotateZ(-2deg);
}
.screen-grid { position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(rgba(65,151,255,.08) 1px,transparent 1px), linear-gradient(90deg,rgba(65,151,255,.08) 1px,transparent 1px); background-size: 24px 24px; }
.pixel-scene { position: absolute; inset: 0; background: linear-gradient(#06192d 0 58%, #0a2441 58%); }
.pixel-moon { position: absolute; width: 62px; height: 62px; right: 52px; top: 42px; border-radius: 50%; background: #65dbff; box-shadow: 0 0 38px rgba(76,204,255,.55); }
.pixel-star { position: absolute; width: 5px; height: 5px; background: #87e6ff; box-shadow: 0 0 10px #48bfff; }
.star-one { top: 24%; left: 18%; }.star-two { top: 17%; left: 47%; }.star-three { top: 37%; left: 34%; }
.pixel-landscape { position: absolute; left: -5%; width: 110%; clip-path: polygon(0 60%, 10% 35%, 20% 63%, 34% 24%, 46% 68%, 60% 40%, 74% 70%, 90% 28%, 100% 58%, 100% 100%, 0 100%); }
.landscape-back { bottom: 18%; height: 48%; background: #123c64; opacity: .8; }
.landscape-front { bottom: 0; height: 40%; background: #0d2a48; }
.pixel-runner { position: absolute; z-index: 2; left: 48%; bottom: 18%; width: 19px; height: 29px; border: 5px solid #56d9ff; border-radius: 3px; box-shadow: 0 0 16px rgba(66,211,255,.6); }
.screen-label { position: absolute; z-index: 3; left: 18px; bottom: 13px; color: #6adfff; font: 700 9px/1 "Space Grotesk"; letter-spacing: .14em; }
.console-detail { position: absolute; left: 13%; top: 73%; width: 68%; display: flex; justify-content: space-between; align-items: center; transform: rotate(-2deg); }
.dpad { position: relative; width: 56px; height: 56px; }
.dpad::before, .dpad::after { content: ""; position: absolute; border-radius: 5px; background: #152a45; box-shadow: inset 0 0 0 1px #284661; }
.dpad::before { width: 20px; height: 56px; left: 18px; }.dpad::after { width: 56px; height: 20px; top: 18px; }
.speaker { display: flex; gap: 6px; transform: rotate(-25deg); }.speaker i { width: 3px; height: 26px; border-radius: 4px; background: #18304e; }
.face-buttons { display: flex; gap: 12px; transform: rotate(-13deg); }.face-buttons b { display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#173152;color:#62dfff;box-shadow: inset 0 0 0 2px #264c78;font-size:11px; }

.library-section { padding: 82px 0 90px; scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin: 7px 0 0; font: 700 36px/1.1 "Space Grotesk"; letter-spacing: -1.5px; }
.library-toolbar { display: flex; justify-content: space-between; gap: 18px; margin: 29px 0 25px; }
.filter-group { display: flex; gap: 7px; }
.filter-chip { min-height: 39px; padding: 0 17px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,.02); color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; }
.filter-chip.is-active { border-color: rgba(68, 173, 255, .38); background: rgba(45, 132, 242, .2); color: #dcecff; }
.search-box { display: flex; align-items: center; gap: 8px; width: min(300px, 100%); min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(9,22,40,.7); color: #69829f; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-box input::placeholder { color: #617793; }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 18px; }
.game-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(150deg, rgba(19,42,72,.88), rgba(6,17,32,.88)); box-shadow: 0 18px 45px rgba(0,0,0,.16); }
.game-cover { position: relative; display: grid; place-items: center; min-height: 156px; background: radial-gradient(circle, rgba(45,141,255,.26), transparent 58%), linear-gradient(135deg,#0a1d35,#07101f); }
.game-cover::after { content:""; position:absolute; inset:0; opacity:.18; background-image:linear-gradient(rgba(104,180,255,.2) 1px,transparent 1px),linear-gradient(90deg,rgba(104,180,255,.2) 1px,transparent 1px); background-size:18px 18px; }
.game-cover img { z-index: 1; width: 64px; filter: drop-shadow(0 15px 24px rgba(25,113,255,.35)); }
.game-system-badge { position: absolute; z-index: 2; top: 12px; left: 12px; padding: 6px 8px; border: 1px solid rgba(99,211,255,.3); border-radius: 7px; background: rgba(5,16,31,.72); color:#6cddff; font-size:9px; font-weight:800; letter-spacing:.09em; }
.game-info { padding: 16px; }
.game-info h3 { overflow:hidden; margin:0; font:700 16px/1.25 "Space Grotesk"; text-overflow:ellipsis; white-space:nowrap; }
.game-info p { margin:6px 0 14px; color:var(--muted); font-size:10px; }
.game-actions { display:flex; gap:8px; }
.game-actions .button { min-height:38px; flex:1; padding:0 10px; }
.game-delete { display:grid;place-items:center;width:38px;border:1px solid var(--line);border-radius:10px;background:transparent;color:#8195ad;cursor:pointer; }
.game-delete img { width:18px;height:18px;opacity:.68; }
.game-delete:hover { border-color:rgba(255,93,124,.42); color:#ff8aa3; }

.empty-library { display: grid; place-items: center; min-height: 330px; padding: 48px 20px; border: 1px dashed rgba(110,154,202,.22); border-radius: var(--radius-md); background: rgba(10,24,43,.38); text-align: center; }
.empty-library[hidden] { display: none; }
.empty-icon { display:grid;place-items:center;width:86px;height:86px;border-radius:25px;background:rgba(36,118,220,.12);box-shadow:inset 0 0 0 1px rgba(73,167,255,.16);transform:rotate(-4deg); }
.empty-icon img { transform:rotate(4deg); }
.empty-library h3 { margin:19px 0 7px; font:700 20px/1.2 "Space Grotesk"; }
.empty-library p { margin:0 0 20px; color:var(--muted); font-size:12px; }
.empty-library small { margin-top:14px; color:#657b95; font-size:9px; }

.page-footer { display:flex;align-items:center;justify-content:space-between;gap:20px;padding:28px 0 35px;border-top:1px solid var(--line);color:#627792;font-size:10px;letter-spacing:.04em; }
.page-footer a { color: #82badf; }
.brand-small img { width:30px; }.brand-small > span { font-size:13px; }

.mobile-nav { display:none; }

.import-dialog { width:min(560px, calc(100% - 30px)); padding:0; border:1px solid rgba(119,175,234,.23); border-radius:24px; background:#0b192c; color:var(--ink); box-shadow:0 40px 100px rgba(0,0,0,.65); }
.import-dialog::backdrop { background:rgba(1,6,14,.76); backdrop-filter:blur(8px); }
.dialog-shell { position:relative; padding:38px; }
.dialog-close { position:absolute;right:18px;top:16px;width:36px;height:36px;border:1px solid var(--line);border-radius:50%;background:transparent;color:#8ba0ba;font-size:22px;cursor:pointer; }
.dialog-mark { display:grid;place-items:center;width:64px;height:64px;margin-bottom:20px;border-radius:18px;background:rgba(35,118,229,.13); }
.dialog-shell h2 { margin:7px 0 8px;font:700 29px/1.1 "Space Grotesk";letter-spacing:-1px; }
.dialog-intro { margin:0 0 22px;color:var(--muted);font-size:12px; }
.drop-zone { display:grid;place-items:center;min-height:210px;padding:25px;border:1px dashed rgba(93,173,255,.38);border-radius:17px;background:rgba(36,112,204,.06);cursor:pointer;text-align:center; }
.drop-zone.is-dragging { border-color:#55d8ff;background:rgba(36,145,255,.13); }
.drop-icon { display:grid;place-items:center;width:48px;height:48px;margin-bottom:13px;border-radius:50%;background:rgba(41,140,255,.16);color:#5cdcff;font-size:25px; }
.drop-zone strong { font-size:14px; }.drop-zone > span:not(.drop-icon) { margin-top:5px;color:var(--muted);font-size:11px; }.drop-zone small { margin-top:14px;color:#637994;font-size:9px; }
.file-preview { display:flex;align-items:center;gap:12px;padding:14px;border:1px solid rgba(81,172,255,.3);border-radius:14px;background:rgba(37,122,229,.1); }
.file-preview[hidden] { display:none; }
.file-system { display:grid;place-items:center;width:52px;height:44px;border-radius:9px;background:#102e50;color:#62dcff;font-size:8px;font-weight:800;text-align:center; }
.file-preview div { min-width:0;flex:1; }.file-preview strong,.file-preview small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-preview strong{font-size:12px}.file-preview small{margin-top:3px;color:var(--muted);font-size:9px}.file-preview button{border:0;background:transparent;color:#8296af;font-size:21px;cursor:pointer}
.form-error { min-height:18px;margin:9px 0 0;color:#ff9bb0;font-size:11px; }
.dialog-actions { display:flex;justify-content:flex-end;gap:10px;margin-top:21px; }

.confirm-layer { position:fixed;z-index:80;inset:0;display:grid;place-items:center;padding:20px;background:rgba(1,6,14,.8);backdrop-filter:blur(8px); }
.confirm-layer[hidden] { display:none; }
.confirm-card { width:min(410px,100%);padding:33px;border:1px solid var(--line);border-radius:22px;background:#0b192c;box-shadow:var(--shadow);text-align:center; }
.confirm-icon { display:grid;place-items:center;width:56px;height:56px;margin:0 auto 17px;border-radius:50%;background:rgba(255,93,124,.1);color:#ff8fa7;font:700 23px/1 "Space Grotesk"; }
.confirm-card h2 { margin:0;font:700 23px/1.2 "Space Grotesk"; }.confirm-card p{margin:10px 0 24px;color:var(--muted);font-size:12px;line-height:1.6}.confirm-card>div{display:flex;justify-content:center;gap:10px}

.toast { position:fixed;z-index:100;right:22px;bottom:22px;max-width:380px;padding:14px 18px;border:1px solid rgba(89,184,255,.28);border-radius:12px;background:#10243d;color:#eaf5ff;font-size:12px;font-weight:700;box-shadow:0 18px 50px rgba(0,0,0,.45);opacity:0;transform:translateY(18px);pointer-events:none;transition:.25s ease; }
.toast.is-visible { opacity:1;transform:translateY(0); }

.player-view { min-height:100vh;padding:28px 36px 50px; }
.player-header { display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:20px;max-width:1300px;margin:0 auto 24px; }
.back-button { justify-self:start;min-height:44px;padding:0 15px;border:1px solid var(--line);border-radius:11px;background:rgba(255,255,255,.035);cursor:pointer; }
.player-title-wrap { text-align:center; }.player-title-wrap h1{margin:4px 0 0;font:700 23px/1.1 "Space Grotesk"}
.live-pill { justify-self:end;display:flex;align-items:center;gap:7px;color:#92a5bb;font-size:9px;font-weight:800;letter-spacing:.1em}.live-pill i{width:7px;height:7px;border-radius:50%;background:#43e0b0;box-shadow:0 0 12px #43e0b0}
.player-stage { position:relative;display:grid;place-items:center;width:min(1200px,100%);aspect-ratio:16/9;margin:auto;overflow:hidden;border:1px solid rgba(99,170,238,.22);border-radius:22px;background:#020711;box-shadow:0 35px 90px rgba(0,0,0,.5); }
.player-stage canvas,.player-stage iframe { width:100%;height:100%;border:0; }
.player-loading { position:absolute;inset:0;display:grid;place-content:center;justify-items:center;gap:10px;background:#040b16;text-align:center}.player-loading[hidden]{display:none}.player-loading strong{margin-top:8px}.player-loading small{color:var(--muted)}
.loading-mark { animation:pulse 1.4s ease-in-out infinite; }
.player-controls { display:flex;align-items:center;justify-content:center;gap:28px;max-width:1200px;margin:23px auto 0;color:var(--muted);font-size:11px; }
.control-help { display:flex;align-items:center;gap:5px}.control-help span{margin-left:6px}.control-help kbd{display:grid;place-items:center;width:26px;height:26px;border:1px solid var(--line);border-radius:6px;background:#102039;color:#b9d7f4;font-family:inherit;box-shadow:0 2px 0 #020712}
.touch-pad { display:none;grid-template-columns:repeat(3,42px);grid-template-rows:repeat(2,42px);gap:4px}.touch-pad button{border:1px solid var(--line);border-radius:9px;background:#10213a}.touch-pad [data-direction="up"]{grid-column:2}.touch-pad [data-direction="left"]{grid-column:1}.touch-pad [data-direction="down"]{grid-column:2}.touch-pad [data-direction="right"]{grid-column:3}

@keyframes pulse { 0%,100%{transform:scale(.94);opacity:.75}50%{transform:scale(1.06);opacity:1} }

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 90px 1fr; }
  .sidebar { align-items:center;padding-inline:15px; }
  .brand > span,.nav-item:not(.is-active)::after,.nav-item{font-size:0}.nav-item{justify-content:center;width:52px;padding:0}.nav-item .nav-icon{font-size:21px}.sidebar-foot{padding:13px}.sidebar-foot div{display:none}
  #homeView { padding:0 28px; }
  .hero-copy { padding-left:42px; }.hero h2{font-size:54px}
}

@media (max-width: 780px) {
  body { padding-bottom:74px; }
  .app-shell { display:block; }
  .sidebar { display:none; }
  #homeView { padding:0 17px; }
  .topbar { min-height:88px; }.topbar h1{font-size:22px}
  .hero { display:block;min-height:auto; }
  .hero-copy { padding:44px 26px 32px; }.hero h2{font-size:clamp(46px,14vw,62px);letter-spacing:-3px}.hero-description{font-size:13px}
  .hero-console { min-height:340px; }.official-logo{width:94%;right:3%;max-height:96%}.console-screen{left:7%;top:3%;width:86%}.console-detail{top:72%;left:16%}
  .library-section { padding:62px 0 72px; }
  .section-heading { align-items:center; }.section-heading h2{font-size:29px}.section-heading .button{padding:0 14px;font-size:11px}
  .library-toolbar { align-items:stretch;flex-direction:column; }.filter-group{overflow:auto;padding-bottom:2px}.filter-chip{white-space:nowrap}.search-box{width:100%}
  .game-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.game-cover{min-height:124px}.game-info{padding:13px}.game-actions{align-items:stretch}.game-actions .button{font-size:11px}
  .page-footer { flex-direction:column;text-align:center; }
  .mobile-nav { position:fixed;z-index:60;right:10px;bottom:9px;left:10px;display:grid;grid-template-columns:repeat(3,1fr);height:62px;padding:6px;border:1px solid rgba(117,173,229,.2);border-radius:18px;background:rgba(7,17,32,.92);box-shadow:0 15px 40px rgba(0,0,0,.45);backdrop-filter:blur(20px) }
  .mobile-nav button{display:grid;place-items:center;gap:2px;border:0;border-radius:12px;background:transparent;color:#7790ab;font-size:9px;font-weight:700}.mobile-nav button img{width:19px;height:19px}.mobile-nav button.is-active{background:rgba(47,136,242,.14);color:#69ceff}
  .dialog-shell{padding:30px 21px}.dialog-actions .button{flex:1;padding:0 11px}
  .player-view{padding:17px 12px 30px}.player-header{grid-template-columns:auto 1fr}.player-title-wrap{text-align:right}.live-pill{display:none}.back-button{font-size:11px}.player-stage{border-radius:14px}.player-controls{flex-direction:column;gap:12px}.control-help{display:none}.touch-pad{display:grid}.player-controls p{margin:0;text-align:center}
}

@media (max-width: 470px) {
  .hero-actions { display:grid; }.hero-actions .button{width:100%}.hero-console{min-height:290px}.console-detail{display:none}
  .section-heading .button span{display:none}.section-heading .button{min-height:42px}
  .game-grid { grid-template-columns:1fr; }.game-cover{min-height:150px}
  .dialog-actions { flex-direction:column-reverse; }
}

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

@media (prefers-reduced-motion: reduce) {
  .crt-overlay::before { animation: none; }
  body::before,
  body::after { animation: none !important; }
}

/* Console home — v0.4.1 */
.app-shell {
  display: block;
  padding-top: 88px;
}

.sidebar.console-bar {
  position: fixed;
  z-index: 70;
  top: 0;
  right: 0;
  left: 0;
  height: 88px;
  flex-direction: row;
  align-items: center;
  gap: 34px;
  padding: 13px clamp(24px, 4vw, 66px);
  border: 0;
  border-bottom: 1px solid rgba(116, 174, 230, .15);
  background: linear-gradient(180deg, rgba(3, 10, 21, .96), rgba(5, 14, 27, .82));
  box-shadow: 0 16px 44px rgba(0, 5, 15, .3);
  backdrop-filter: blur(24px);
}

.console-bar .brand { flex: 0 0 auto; }
.brand-cartridge { width: 64px; height: 50px; object-fit: contain; }
.console-bar .side-nav { display: flex; gap: 8px; margin: 0; }
.console-bar .nav-item {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 13px;
  transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.console-bar .nav-item.is-active {
  border-color: rgba(82, 177, 255, .5);
  background: linear-gradient(135deg, #147dd9, #0758bd);
  box-shadow: 0 0 0 1px rgba(110, 208, 255, .12), 0 0 28px rgba(25, 132, 255, .32);
  color: #fff;
}
.console-bar .sidebar-foot {
  margin: 0 0 0 auto;
  padding: 10px 14px;
  background: rgba(15, 34, 59, .48);
}

#homeView { max-width: 1580px; padding: 0 clamp(24px, 4vw, 66px); }
.topbar { min-height: 116px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.account-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(99, 187, 255, .22);
  border-radius: 999px;
  background: rgba(15, 47, 82, .54);
  color: #d9edff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.account-button:hover { border-color: rgba(91,220,255,.55); background: rgba(31, 93, 155, .42); }
.account-orb { color: #667b91; font-size: 9px; text-shadow: none; }
.account-button.is-connected .account-orb { color: #35e5ad; text-shadow: 0 0 12px #35e5ad; }
.version-pill {
  padding: 9px 12px;
  border: 1px solid rgba(102, 181, 255, .19);
  border-radius: 99px;
  background: rgba(14, 37, 66, .48);
  color: #7893b0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
}

.hero {
  min-height: 560px;
  padding-bottom: 54px;
  background:
    radial-gradient(circle at 77% 43%, rgba(31, 133, 255, .29), transparent 27rem),
    linear-gradient(107deg, rgba(12, 34, 61, .98) 0%, rgba(4, 14, 27, .82) 58%, rgba(6, 18, 35, .96) 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 64%, rgba(1, 6, 15, .58)),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(255,255,255,.011) 80px);
}
.hero-copy { padding: 62px 16px 58px 65px; }
.hero-console { min-height: 500px; }
.official-logo {
  width: min(670px, 116%);
  right: -2%;
  filter: drop-shadow(0 34px 55px rgba(0,0,0,.5)) drop-shadow(0 0 35px rgba(38,138,255,.12));
}
.controller-key, .console-command-strip b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #54d1ff;
  color: #031121;
  font: 800 10px/1 "Space Grotesk", sans-serif;
  box-shadow: 0 0 14px rgba(70, 200, 255, .35);
}
.controller-key-blue { background: #216dff; color: white; }
.console-command-strip {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 25px;
  min-height: 54px;
  padding: 0 28px;
  border-top: 1px solid rgba(132, 186, 236, .13);
  background: rgba(2, 9, 19, .74);
  color: #a6b9cd;
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(14px);
}
.console-command-strip span { display: flex; align-items: center; gap: 7px; }
.console-command-strip b { width: 19px; height: 19px; font-size: 8px; }
.console-command-strip .network-ready { margin-left: auto; }
.network-ready i { width: 7px; height: 7px; border-radius: 50%; background: #39e6ae; box-shadow: 0 0 12px #39e6ae; }

.console-rail { padding: 70px 0 8px; }
.rail-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.rail-heading h2 { margin: 7px 0 0; font: 700 31px/1.1 "Space Grotesk", sans-serif; letter-spacing: -1.3px; }
.rail-heading > span { display: flex; align-items: center; gap: 7px; color: #6f87a3; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.rail-heading b { display: grid; place-items: center; min-width: 25px; height: 19px; padding: 0 5px; border: 1px solid var(--line); border-radius: 5px; background: #10213a; color: #adc7df; font-size: 8px; }
.tile-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 12px 5px 27px;
  scroll-snap-type: x mandatory;
  scrollbar-color: rgba(65, 158, 255, .35) transparent;
}
.console-tile {
  position: relative;
  flex: 0 0 240px;
  min-height: 230px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 24px;
  background: #0b1b31;
  box-shadow: 0 18px 44px rgba(0,0,0,.26);
  cursor: pointer;
  scroll-snap-align: start;
  text-align: left;
  transform-origin: center bottom;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, filter .2s ease;
}
.console-tile:first-child { flex-basis: 335px; }
.console-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(2,8,17,.2) 52%, rgba(2,8,17,.94)); }
.console-tile:hover, .console-tile:focus-visible, .console-tile.is-selected {
  border-color: #31a8ff;
  box-shadow: 0 0 0 4px rgba(49, 168, 255, .12), 0 0 34px rgba(23, 133, 255, .43), 0 25px 55px rgba(0,0,0,.4);
  transform: translateY(-6px) scale(1.025);
  filter: saturate(1.12);
}
.tile-demo { background: radial-gradient(circle at 55% 28%, #174f89, #071425 68%); }
.tile-nes { background: radial-gradient(circle at 70% 16%, rgba(255,73,92,.6), transparent 40%), linear-gradient(145deg,#48101b,#110710); }
.tile-gb { background: radial-gradient(circle at 76% 18%, rgba(92,228,190,.55), transparent 42%), linear-gradient(145deg,#12433c,#071817); }
.tile-import { background: radial-gradient(circle at 72% 20%, rgba(90,110,255,.5), transparent 42%), linear-gradient(145deg,#1c1d55,#090b22); }
.tile-art { position: absolute; inset: -8px 0 48px; display: grid; place-items: center; }
.tile-art img { width: 185px; height: auto; filter: drop-shadow(0 22px 27px rgba(0,0,0,.52)) drop-shadow(0 0 26px rgba(55,155,255,.2)); }
.tile-monogram { position: absolute; right: 20px; top: 12px; color: rgba(255,255,255,.2); font: 800 112px/1 "Space Grotesk"; letter-spacing: -9px; }
.tile-plus { position: absolute; right: 29px; top: 19px; color: rgba(255,255,255,.32); font: 300 90px/1 system-ui; }
.tile-copy { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; padding: 24px 22px 20px; }
.tile-copy small { margin-bottom: 6px; color: #70cfff; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.tile-copy strong { overflow: hidden; font: 700 18px/1.15 "Space Grotesk"; text-overflow: ellipsis; white-space: nowrap; }
.tile-copy em { margin-top: 5px; color: #8da2bb; font-size: 10px; font-style: normal; }

.library-section { padding-top: 68px; scroll-margin-top: 96px; }
.game-grid {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 9px 5px 31px;
  scroll-snap-type: x mandatory;
}
.game-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.game-card:hover, .game-card:focus-within {
  border-color: #319eff;
  box-shadow: 0 0 0 3px rgba(49,158,255,.1), 0 0 31px rgba(28,125,255,.29), 0 25px 50px rgba(0,0,0,.32);
  transform: translateY(-5px) scale(1.02);
}
.empty-library { min-height: 285px; }

@media (max-width: 1080px) {
  .app-shell { padding-top: 80px; }
  .sidebar.console-bar { height: 80px; padding-inline: 25px; }
  .console-bar .brand > span { display: none; }
  .console-bar .nav-item { width: auto; padding: 0 13px; font-size: 11px; }
  .console-bar .sidebar-foot div { display: block; }
  .hero { grid-template-columns: 1.05fr .95fr; }
  .official-logo { width: 108%; }
}

@media (max-width: 780px) {
  body { padding-top: 68px; padding-bottom: 74px; }
  .app-shell { padding-top: 0; }
  .sidebar.console-bar { display: flex; height: 68px; padding: 8px 17px; }
  .console-bar .brand { margin: 0 auto; }
  .brand-cartridge { width: 58px; height: 44px; }
  .console-bar .side-nav, .console-bar .sidebar-foot { display: none; }
  .topbar-actions .version-pill { display: none; }
  .hero { padding-bottom: 52px; }
  .hero-copy { padding: 40px 25px 25px; }
  .hero-console { min-height: 330px; }
  .console-command-strip { gap: 15px; overflow-x: auto; padding-inline: 17px; white-space: nowrap; }
  .console-command-strip .network-ready { display: none; }
  .console-rail { padding-top: 50px; }
  .rail-heading h2 { font-size: 27px; }
  .rail-heading > span { display: none; }
  .tile-track { margin-inline: -17px; padding-inline: 21px; }
  .console-tile { flex-basis: 210px; min-height: 205px; }
  .console-tile:first-child { flex-basis: 285px; }
  .tile-art img { width: 158px; }
  .game-grid { margin-inline: -17px; padding-inline: 21px; }
  .game-card { flex-basis: 225px; }
}

@media (max-width: 470px) {
  .topbar h1 { font-size: 19px; }
  .official-logo { width: 100%; right: 0; }
  .console-tile:first-child { flex-basis: 258px; }
}

/* Retro crossover console home — v0.4.2 */
body::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: -2%;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 8, 18, .04), rgba(2, 8, 18, .7) 78%, #030914),
    url("backgrounds/romstata-original-arcade-crt.png") center top / cover no-repeat;
  opacity: .72;
  filter: saturate(1.18) contrast(1.14);
  will-change: transform, opacity, filter;
  animation:
    crt-background-jitter 6.2s steps(1, end) infinite,
    crt-phosphor-pulse .16s steps(2, end) infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0 42%, rgba(88, 214, 255, .14) 49%, rgba(0, 5, 14, .3) 52%, transparent 61%) center -55vh / 100% 64vh no-repeat,
    radial-gradient(circle at 50% 22%, transparent 0 23rem, rgba(2, 8, 18, .42) 54rem) center 22% / 100% 100% no-repeat;
  animation: crt-sync-roll 4.8s linear infinite;
}

body.is-rom-fullscreen::before,
body.is-rom-fullscreen::after { animation: none; }

.main-content { position: relative; }

.hero {
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(3, 11, 24, .94) 0%, rgba(4, 13, 27, .72) 40%, rgba(4, 13, 27, .18) 72%, rgba(3, 10, 21, .5) 100%),
    url("backgrounds/romstata-original-arcade-crt.png") center 42% / cover no-repeat;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(125, 196, 255, .08);
}

.hero::before {
  background:
    radial-gradient(circle at 72% 42%, rgba(44, 151, 255, .21), transparent 22rem),
    linear-gradient(90deg, rgba(2, 9, 20, .52), transparent 72%);
}

.hero::after {
  background:
    linear-gradient(180deg, rgba(1, 6, 14, .04) 48%, rgba(1, 6, 15, .82)),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(255,255,255,.011) 80px);
}

.hero-console::before {
  content: "";
  position: absolute;
  inset: 5% -5% 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 99, 212, .13), transparent 68%);
  backdrop-filter: blur(1px);
}

.official-logo {
  width: min(570px, 106%);
  opacity: .94;
}

.tile-snes {
  background: radial-gradient(circle at 70% 16%, rgba(151, 100, 255, .58), transparent 42%), linear-gradient(145deg,#2c184e,#0c0818);
}

.tile-sega {
  background: radial-gradient(circle at 72% 13%, rgba(50, 149, 255, .62), transparent 44%), linear-gradient(145deg,#0d3765,#06111f);
}

.tile-art-system {
  inset: -26px -18px 48px;
}

.tile-art-system img {
  width: 226px;
  max-height: 172px;
  object-fit: contain;
  filter: drop-shadow(0 22px 27px rgba(0,0,0,.58)) drop-shadow(0 0 24px rgba(76,172,255,.2));
}

.console-tile:hover .tile-art-system img,
.console-tile:focus-visible .tile-art-system img {
  transform: translateY(-3px) scale(1.035);
}

.tile-art-system img {
  transition: transform .24s ease;
}

.library-section {
  margin-top: 35px;
  padding-right: clamp(15px, 2vw, 30px);
  padding-left: clamp(15px, 2vw, 30px);
  border: 1px solid rgba(112, 181, 241, .1);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(5, 15, 29, .82), rgba(3, 10, 21, .91));
  box-shadow: 0 26px 70px rgba(0,0,0,.22);
  backdrop-filter: blur(18px);
}

@media (max-width: 780px) {
  body::before {
    background-position: 39% top;
    opacity: .36;
  }
  .hero {
    background-position: 43% center;
  }
  .hero-copy {
    background: linear-gradient(90deg, rgba(3,10,22,.86), rgba(3,10,22,.36));
  }
  .tile-art-system img { width: 196px; max-height: 150px; }
  .library-section { margin-inline: -5px; padding-inline: 16px; }
}

/* Player profiles and library tools — v0.5.0 */
.recent-section {
  padding: 60px 0 5px;
}
.recent-section[hidden] { display: none; }
.recent-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 12px 5px 30px;
  scroll-snap-type: x mandatory;
}
.game-card-compact {
  flex: 0 0 218px;
  scroll-snap-align: start;
}
.game-card-compact .game-cover { min-height: 128px; }
.game-card-compact .game-info { padding: 13px; }

.game-cover {
  overflow: hidden;
}
.game-cover .game-cover-placeholder {
  z-index: 1;
  width: 64px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 15px 24px rgba(25,113,255,.35));
}
.game-cover .game-cover-art {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}
.game-cover:has(.game-cover-art)::after {
  z-index: 2;
  opacity: .24;
  background: linear-gradient(180deg, transparent 52%, rgba(2,8,18,.88));
}
.favorite-button,
.cover-button {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(151, 194, 235, .24);
  border-radius: 50%;
  background: rgba(4, 13, 26, .74);
  color: #8fa5be;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.favorite-button { top: 10px; right: 10px; font-size: 18px; }
.cover-button { right: 10px; bottom: 10px; font-size: 14px; }
.favorite-button:hover,
.cover-button:hover { border-color: #59cfff; color: #e9f8ff; }
.favorite-button.is-favorite {
  border-color: rgba(255, 211, 77, .55);
  color: #ffd34d;
  box-shadow: 0 0 18px rgba(255, 199, 45, .25);
}

.controller-orb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #50647b;
}
.controller-status-card.is-connected .controller-orb {
  background: #39e6ae;
  box-shadow: 0 0 12px rgba(57,230,174,.7);
}

.settings-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100vh - 30px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(119,175,234,.23);
  border-radius: 24px;
  background: #09182b;
  color: var(--ink);
  box-shadow: 0 40px 100px rgba(0,0,0,.7);
}
.settings-dialog::backdrop {
  background: rgba(1,6,14,.8);
  backdrop-filter: blur(9px);
}
.settings-shell { position: relative; padding: 38px; }
.settings-shell h2 {
  margin: 7px 0 8px;
  font: 700 30px/1.1 "Space Grotesk";
  letter-spacing: -1px;
}
.controller-status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  padding: 15px 17px;
  border: 1px solid rgba(82, 170, 255, .2);
  border-radius: 14px;
  background: rgba(32, 107, 197, .09);
}
.controller-status-card .controller-orb { flex: 0 0 auto; }
.controller-status-card strong,
.controller-status-card small { display: block; }
.controller-status-card strong { font-size: 12px; }
.controller-status-card small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.native-tools-note {
  padding: 17px;
  border: 1px solid rgba(119, 175, 234, .13);
  border-radius: 14px;
  background: rgba(255,255,255,.022);
}
.native-tools-note strong { font: 700 13px/1.2 "Space Grotesk"; }
.native-tools-note p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.cloud-status-card {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 22px 0 16px;
  padding: 16px 17px;
  border: 1px solid rgba(82, 170, 255, .2);
  border-radius: 14px;
  background: rgba(32, 107, 197, .09);
}
.cloud-status-card.is-connected { border-color: rgba(54, 230, 173, .28); background: rgba(26, 139, 103, .09); }
.cloud-status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #61768c; }
.cloud-status-card.is-connected .cloud-status-dot { background: #36e6ad; box-shadow: 0 0 14px rgba(54,230,173,.8); }
.cloud-status-card strong, .cloud-status-card small { display: block; }
.cloud-status-card strong { font-size: 13px; }
.cloud-status-card small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.cloud-explainer { padding: 17px; border: 1px solid rgba(119, 175, 234, .13); border-radius: 14px; background: rgba(255,255,255,.022); }
.cloud-explainer strong { font: 700 13px/1.2 "Space Grotesk"; }
.cloud-explainer ul { margin: 10px 0 0; padding-left: 19px; color: var(--muted); font-size: 10px; line-height: 1.8; }
.account-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 17px; }
.account-fields[hidden] { display: none; }
.account-fields label { display: grid; gap: 7px; color: #8da4bb; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.account-fields input { width: 100%; min-height: 43px; padding: 0 12px; border: 1px solid rgba(122,183,239,.2); border-radius: 10px; background: rgba(3,12,25,.72); color: var(--ink); }
.terms-check { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; color: #aabdd0; font-size: 10px; line-height: 1.55; cursor: pointer; }
.terms-check input { width: 17px; height: 17px; margin: 0; accent-color: #2997ff; }
.terms-check a { color: #70d7ff; }
.account-actions { flex-wrap: wrap; }
.account-dialog .form-error { min-height: 16px; margin: 9px 0 0; }

@media (max-width: 780px) {
  .recent-track { margin-inline: -17px; padding-inline: 21px; }
  .settings-shell { padding: 31px 19px 24px; }
  .settings-actions .button { width: 100%; }
  .account-button { width: 42px; justify-content: center; padding: 0; }
  .account-button span:last-child { display: none; }
  .account-fields { grid-template-columns: 1fr; }
}

/* Included homebrew catalog — v0.6.0 */
.catalog-section {
  margin-top: 76px;
  scroll-margin-top: 96px;
}
.catalog-spotlight {
  overflow: hidden;
  padding: clamp(24px, 3.5vw, 44px);
  border: 1px solid rgba(92, 184, 255, .18);
  border-radius: 30px;
  background:
    radial-gradient(circle at 90% 0, rgba(33, 142, 255, .22), transparent 31rem),
    linear-gradient(145deg, rgba(11, 29, 54, .96), rgba(3, 11, 23, .94));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .35), inset 0 1px rgba(255,255,255,.03);
}
.catalog-heading { align-items: end; margin-bottom: 25px; }
.catalog-heading h2 { margin-bottom: 8px; }
.catalog-intro { max-width: 640px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.catalog-count {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid rgba(83, 199, 255, .24);
  border-radius: 999px;
  background: rgba(21, 108, 197, .13);
  color: #8cddff;
  font: 700 10px/1 "Space Grotesk";
  letter-spacing: .08em;
  text-transform: uppercase;
}
.featured-catalog {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 8px 5px 27px;
  scroll-snap-type: x mandatory;
}
.featured-catalog[hidden] { display: none; }
.catalog-browser {
  margin-top: 27px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(112, 181, 241, .1);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(5, 15, 29, .88), rgba(3, 10, 21, .94));
  box-shadow: 0 26px 70px rgba(0,0,0,.22);
  backdrop-filter: blur(18px);
}
.catalog-browser-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 23px; }
.catalog-browser-heading h3 { margin: 5px 0 0; font: 700 28px/1.1 "Space Grotesk"; }
.catalog-search { width: min(320px, 100%); }
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}
.catalog-card {
  --catalog-a: #195da8;
  --catalog-b: #07182b;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(122, 183, 239, .15);
  border-radius: 19px;
  background: rgba(7, 20, 37, .94);
  box-shadow: 0 18px 45px rgba(0,0,0,.2);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.catalog-card[data-tone="1"] { --catalog-a: #6c3ee8; --catalog-b: #171030; }
.catalog-card[data-tone="2"] { --catalog-a: #e24c69; --catalog-b: #32101b; }
.catalog-card[data-tone="3"] { --catalog-a: #12a985; --catalog-b: #082a27; }
.catalog-card[data-tone="4"] { --catalog-a: #d9862e; --catalog-b: #30200c; }
.catalog-card[data-tone="5"] { --catalog-a: #167fd0; --catalog-b: #09203a; }
.catalog-card:hover,
.catalog-card:focus-within {
  border-color: #39baff;
  box-shadow: 0 0 0 3px rgba(49, 174, 255, .1), 0 0 34px rgba(30, 139, 255, .25), 0 26px 52px rgba(0,0,0,.34);
  transform: translateY(-5px);
}
.catalog-card-featured {
  flex: 0 0 270px;
  scroll-snap-align: start;
}
.catalog-art {
  position: relative;
  isolation: isolate;
  display: grid;
  place-content: center;
  min-height: 158px;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 28%, color-mix(in srgb, var(--catalog-a) 78%, white), transparent 22%),
    linear-gradient(145deg, var(--catalog-a), var(--catalog-b) 72%);
}
.catalog-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -30%;
  background:
    repeating-linear-gradient(45deg, transparent 0 24px, rgba(255,255,255,.055) 25px 26px),
    radial-gradient(circle, rgba(255,255,255,.15) 0 1px, transparent 2px) 0 0 / 24px 24px;
  transform: rotate(-7deg);
}
.catalog-scanlines { position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(2,7,15,.13) 4px); }
.catalog-art strong {
  color: white;
  font: 800 55px/1 "Space Grotesk";
  letter-spacing: -.08em;
  text-shadow: 0 6px 0 rgba(0,0,0,.17), 0 0 28px rgba(255,255,255,.18);
}
.catalog-art small { position: absolute; right: 12px; bottom: 10px; color: rgba(255,255,255,.68); font: 700 8px/1 "Space Grotesk"; letter-spacing: .12em; }
.catalog-card-copy { padding: 16px; }
.catalog-tags { display: flex; gap: 6px; }
.catalog-tags span { padding: 5px 7px; border-radius: 6px; background: rgba(72, 164, 255, .12); color: #82d8ff; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.catalog-card-copy h3 { overflow: hidden; margin: 10px 0 5px; font: 700 16px/1.22 "Space Grotesk"; text-overflow: ellipsis; white-space: nowrap; }
.catalog-card-copy p { margin: 0; color: var(--muted); font-size: 9px; }
.catalog-actions { display: grid; grid-template-columns: 1fr 39px; gap: 9px; margin-top: 15px; }
.catalog-actions .button { min-height: 39px; padding: 0 13px; font-size: 10px; }
.catalog-add { border: 1px solid rgba(122, 188, 246, .2); border-radius: 10px; background: rgba(255,255,255,.035); color: #a9cae6; font-size: 20px; cursor: pointer; }
.catalog-add:hover { border-color: #55cfff; background: rgba(47, 157, 255, .15); color: white; }
.catalog-empty { display: grid; place-items: center; min-height: 190px; color: var(--muted); text-align: center; }
.catalog-empty[hidden] { display: none; }
.catalog-empty strong { color: var(--ink); font: 700 18px/1.2 "Space Grotesk"; }
.catalog-empty span { margin-top: -55px; font-size: 11px; }

@media (max-width: 780px) {
  .catalog-section { margin-top: 56px; }
  .catalog-spotlight,
  .catalog-browser { margin-inline: -5px; padding: 23px 17px; border-radius: 22px; }
  .catalog-heading,
  .catalog-browser-heading { align-items: stretch; flex-direction: column; }
  .catalog-heading { gap: 15px; }
  .catalog-count { align-self: flex-start; }
  .featured-catalog { margin-inline: -17px; padding-inline: 21px; }
  .catalog-card-featured { flex-basis: 240px; }
  .catalog-search { width: 100%; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .catalog-art { min-height: 125px; }
  .catalog-art strong { font-size: 42px; }
  .catalog-card-copy { padding: 13px; }
  .catalog-card-copy h3 { font-size: 14px; }
}

@media (max-width: 470px) {
  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-art { min-height: 145px; }
  .mobile-nav button { min-width: 0; }
}
