/* Retrova UI refresh — intentionally visual-only.
   Loaded after retrova.css. Do not replace app routes, player styles or cover proportions.
   Guidance: GoogleChrome/modern-web-guidance (responsive-design, fluid-scaling,
   improve-text-layout-and-legibility). */

:root {
  --bg: #070c19;
  --surface: #101b31;
  --line: #354363;
  --text: #f5f8ff;
  --muted: #b6c3dc;
  --cyan: #71e6f4;
  --purple: #b18aff;
}
body {
  background:
    radial-gradient(ellipse 64% 32% at 95% -5%, rgba(110, 69, 217, .19), transparent 78%),
    radial-gradient(ellipse 60% 42% at -10% 26%, rgba(22, 108, 161, .11), transparent 82%),
    var(--bg);
}
main { padding-top: clamp(12px, 1.25vw, 22px); }
/* Keep legal/help links reachable above the floating navigation at the page end. */
.site-footer { padding-bottom: calc(128px + env(safe-area-inset-bottom)); }
h1, h2, h3 { text-wrap: balance; }
.page-title p, .home-greeting p, .empty p { line-height: 1.55; }
.page-title h1 {
  font-size: clamp(1.85rem, 1.55rem + 1.4vw, 2.65rem);
  letter-spacing: -.025em;
  line-height: 1.12;
}
.page-title { gap: 10px; }
.eyebrow { font-weight: 800; letter-spacing: .15em; }

.topbar {
  border-bottom: 1px solid rgba(137, 161, 218, .12);
  background: linear-gradient(180deg, rgba(8, 14, 30, .94), rgba(8, 14, 30, .77));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.brand { min-width: 0; }
.brand img { filter: drop-shadow(0 0 13px rgba(138, 96, 249, .42)); }
.brand > span {
  font-size: clamp(1.2rem, 1.05rem + .85vw, 1.8rem);
  letter-spacing: .105em;
}
.brand small { letter-spacing: .17em; }
.top-actions .icon-button,
.profile-button {
  border-color: rgba(139, 133, 225, .36);
  background: linear-gradient(150deg, #182548, #101a35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .055);
}
.search-wrap {
  margin-block: 12px 18px;
  padding-inline: clamp(16px, 3vw, 32px);
}
.search-wrap input {
  min-height: 48px;
  background: #101b32;
  border-color: #4a5c82;
  border-radius: 14px;
}
.profile-menu {
  border-color: #526491;
  background: #101a30;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .65);
}
.primary {
  background: linear-gradient(110deg, #8745e8, #336dcb 58%, #048da9);
  border-color: rgba(200, 180, 255, .42);
  box-shadow: 0 9px 25px rgba(74, 57, 158, .27);
  font-weight: 750;
}
.primary:focus-visible, .card-open:focus-visible, .console-tile:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.home-greeting {
  margin-top: 6px;
  margin-bottom: 24px;
  padding: clamp(17px, 2.8vw, 27px);
  border: 1px solid rgba(107, 126, 190, .36);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 6%, rgba(142, 79, 235, .17), transparent 40%),
    linear-gradient(115deg, rgba(19, 33, 66, .97), rgba(9, 20, 39, .96));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .16), inset 0 1px rgba(255, 255, 255, .05);
}
.home-greeting h1 {
  font-size: clamp(1.55rem, 1.25rem + 1.1vw, 2.2rem);
  letter-spacing: -.025em;
}
.home-greeting p { color: var(--muted); }
.home-greeting .primary { flex-shrink: 0; }

.hero-track, .hero-slide { border-radius: 22px; }
.hero-track {
  overscroll-behavior-inline: contain;
  scroll-padding-inline: 6px;
}
.hero-slide {
  border-color: rgba(174, 148, 247, .43);
  background: #101831;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035);
}
.hero-copy h1 {
  font-size: clamp(2rem, 1.2rem + 2.3vw, 3.25rem);
  letter-spacing: -.035em;
  line-height: 1.06;
}
.hero-copy p { max-width: 52ch; color: #eff3ff; }
.carousel-controls { gap: 12px; }
.carousel-controls > button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #3b486e;
  border-radius: 14px;
  background: rgba(20, 32, 61, .9);
  color: var(--text);
}

.shelf { margin-top: clamp(27px, 3.4vw, 40px); }
.section-head { min-width: 0; padding-bottom: 5px; }
.section-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: clamp(1.14rem, 1.05rem + .4vw, 1.45rem);
  letter-spacing: -.012em;
}
.section-head h2::before {
  content: "";
  width: 4px;
  height: 1.12em;
  flex: 0 0 4px;
  border-radius: 5px;
  background: linear-gradient(180deg, #a378ff, #50e0f2);
}
.section-head > a { font-weight: 700; }
.card-row, .console-row {
  overscroll-behavior-inline: contain;
  scroll-padding-inline: 14px;
}
.game-card {
  border-color: #3a426a;
  border-radius: 17px;
  box-shadow: 0 12px 27px rgba(0, 0, 0, .18);
}
.game-card:focus-within { border-color: var(--cyan); }
.game-grid .game-card { border-radius: 16px; }
.game-grid .card-open:focus-visible {
  outline-offset: -3px;
  outline-color: #8defff;
}
.card-copy strong { overflow-wrap: anywhere; }
.card-copy small, .card-copy b { line-height: 1.35; }
.console-badge {
  border-color: rgba(188, 209, 255, .32);
  border-radius: 8px;
  background: rgba(6, 12, 29, .88);
}
.console-tile {
  border-color: #35446b;
  border-radius: 19px;
  background:
    radial-gradient(ellipse at 90% 0, rgba(101, 73, 205, .20), transparent 62%),
    linear-gradient(140deg, #13213d, #0b142b);
  box-shadow: inset 0 1px rgba(255, 255, 255, .05);
}
.console-tile strong { line-height: 1.3; }
.console-tile small { color: var(--muted); }

.pills { scrollbar-width: thin; }
.pills button, .store-console-filter {
  min-height: 44px;
  border-radius: 14px;
  border-color: #3a4970;
  background: #111b33;
  color: #d9e2f5;
}
.pills [aria-pressed="true"] {
  border-color: #9172f2;
  color: #ffffff;
  background: linear-gradient(110deg, rgba(113, 71, 213, .45), rgba(24, 106, 148, .30));
  box-shadow: inset 0 1px rgba(255, 255, 255, .10);
}
.library-hero {
  border-radius: 22px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, .2);
}
.library-searchbar label {
  min-width: 0;
  border-color: #425576;
  background: #111e36;
}
.library-searchbar input { min-width: 0; }
.library-section-head h2 { letter-spacing: -.015em; }
.store-showcase {
  border-color: rgba(161, 147, 236, .31);
  border-radius: 21px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .3);
}
.store-preview-media { border-radius: 15px; }
.store-preview-copy h2 { letter-spacing: -.02em; }
.store-preview-actions button { min-height: 44px; }
.store-game-card.is-selected {
  border-color: #96eafb;
  box-shadow: 0 0 0 2px rgba(85, 212, 234, .17), 0 12px 30px rgba(0, 0, 0, .25);
}
.settings-card, .profile-hero, .tool-workspace, .download-card {
  border-color: #3c4b76;
  border-radius: 19px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .15);
}
.settings-card {
  background: linear-gradient(145deg, #182646, #0d182f);
}
.settings-card-copy { min-width: 0; }
.settings-card-copy strong { overflow-wrap: anywhere; }
.empty {
  border-color: #3b4b74;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 50% 0, rgba(91, 63, 185, .2), transparent 65%),
    linear-gradient(140deg, #111e36, #0a1328);
}
#details:not(:has(.port-detail)), .settings-dialog, #importDialog {
  border-color: #4a538a;
  border-radius: 23px;
}
.port-panel {
  border-color: #3b365a;
  border-radius: 19px;
  background: #17192c;
}
.port-release { border-top-color: #38354e; }
.port-asset { background: #212137; }
.port-asset button, .port-primary-actions button { min-height: 44px; }

#navigation {
  border-color: rgba(142, 132, 235, .5);
  border-radius: 23px;
  background: rgba(9, 16, 35, .96);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .5), inset 0 1px rgba(255, 255, 255, .055);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
#navigation a {
  min-height: 57px;
  border-radius: 15px;
  gap: 4px;
  padding: 7px 3px;
  color: #c1cce6;
  font-weight: 650;
}
#navigation a svg { width: 23px; height: 23px; }
#navigation [aria-current="page"] {
  color: #fff;
  background: linear-gradient(125deg, rgba(125, 70, 218, .58), rgba(21, 115, 155, .34));
}
#navigation [aria-current="page"]::after { display: none; }
#navigation a:focus-visible { outline-offset: -2px; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .game-card, .console-tile, .settings-card { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
  .game-card:hover, .console-tile:hover, .settings-card:hover {
    transform: translateY(-3px);
    border-color: #8b7dde;
    box-shadow: 0 17px 34px rgba(0, 0, 0, .3);
  }
}

@media (max-width: 700px) {
  main { padding-inline: 20px; padding-bottom: calc(138px + env(safe-area-inset-bottom)); }
  .site-footer { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  .topbar { gap: 8px; padding: 13px 16px 11px; }
  .brand { gap: 8px; }
  .brand img { width: 39px; height: 39px; }
  .brand > span { font-size: 1.25rem; letter-spacing: .075em; }
  .brand small { font-size: .5rem; letter-spacing: .11em; }
  .home-greeting { padding: 17px; margin-block: 8px 19px; border-radius: 19px; gap: 13px; }
  .home-greeting h1 { font-size: 1.5rem; }
  .home-greeting .primary { min-height: 44px; padding: 10px 15px; }
  .hero-slide, .hero-track { border-radius: 18px; }
  .hero-slide { min-height: 340px; }
  .hero-copy { max-width: 96%; padding: 28px 20px 22px; }
  .hero-copy h1 { font-size: clamp(1.65rem, 1.3rem + 1.5vw, 2.1rem); }
  .hero-copy p { font-size: .83rem; }
  .section-head h2 { font-size: 1.12rem; }
  .card-row { gap: 12px; }
  .game-card, .game-grid .game-card { border-radius: 14px; }
  .console-tile { border-radius: 16px; }
  .store-showcase { border-radius: 18px; }
  .store-preview-media { border-radius: 12px; }
  .port-panel { border-radius: 17px; }
  #navigation { border-radius: 21px; padding-inline: 5px; }
  #navigation a { min-height: 56px; font-size: .72rem; gap: 3px; }
  #navigation a svg { width: 22px; height: 22px; }
}
@media (max-width: 360px) {
  .topbar { padding-inline: 11px; }
  .brand img { width: 35px; height: 35px; }
  .brand > span { font-size: 1.12rem; letter-spacing: .045em; }
  .brand small { font-size: .46rem; letter-spacing: .06em; }
  .top-actions { gap: 6px; }
  .home-greeting .primary { width: 100%; }
  #navigation a { font-size: .67rem; }
}
@media (prefers-reduced-motion: reduce) {
  .game-card, .console-tile, .settings-card { transition: none; transform: none; }
}
@supports not (backdrop-filter: blur(1px)) {
  .topbar, #navigation { background: #0c152b; }
}
