:root {
  --bg: #050812;
  --panel: #0b1020;
  --panel-soft: #10172a;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #2dd4bf;
  --accent-soft: rgba(45, 212, 191, 0.16);
  --border: rgba(148, 163, 184, 0.18);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: radial-gradient(circle at top left, rgba(45, 212, 191, 0.16), transparent 34%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 32px;
  background: rgba(5, 8, 18, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #04111e;
  background: linear-gradient(135deg, var(--accent), #7dd3fc);
  box-shadow: 0 0 34px rgba(45, 212, 191, 0.26);
}

.topbar-actions,
.role-sidebar nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.topbar-actions a:hover,
.role-sidebar a:hover { color: var(--accent); }

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto;
}

.hero-card {
  padding: 42px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(16, 23, 42, 0.96), rgba(8, 13, 29, 0.94));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
  letter-spacing: -0.07em;
  line-height: 0.96;
}

h2 { margin-top: 0; letter-spacing: -0.03em; }

p { color: var(--muted); line-height: 1.7; }

.hero-card > p:not(.eyebrow) {
  max-width: 760px;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 700;
}

.button-primary { color: #04111e; background: var(--accent); }

.button-secondary {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.grid-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.grid-preview article {
  min-height: 160px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(16, 23, 42, 0.74);
}

.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.role-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px;
  border-right: 1px solid var(--border);
  background: rgba(5, 8, 18, 0.88);
}

.sidebar-brand { margin-bottom: 32px; }

.role-sidebar nav {
  align-items: stretch;
  flex-direction: column;
}

.role-sidebar nav a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.admin-content { padding: 42px; }

code { color: var(--accent); }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .role-sidebar { position: relative; height: auto; }
}

@media (max-width: 760px) {
  .topbar { padding: 0 18px; }
  .topbar-actions { gap: 12px; }
  .hero-card { padding: 28px; }
  .grid-preview { grid-template-columns: 1fr; }
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

.nav-button {
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.nav-button:hover { color: var(--accent); }

.nav-pill {
  padding: 8px 12px;
  border: 1px solid rgba(45, 212, 191, 0.32);
  border-radius: 999px;
  color: var(--accent) !important;
  background: var(--accent-soft);
}

.sidebar-logout .nav-button {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
}

.auth-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 220px);
}

.auth-card {
  width: min(100%, 560px);
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(16, 23, 42, 0.96), rgba(8, 13, 29, 0.94));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.auth-card-wide { width: min(100%, 760px); }

.auth-card h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label,
.checkbox-field {
  color: var(--text);
  font-weight: 700;
}

.form-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.form-field input:focus {
  border-color: rgba(45, 212, 191, 0.72);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12);
}

.form-field span,
.validation-summary {
  color: #fca5a5;
  font-size: 0.92rem;
}

.validation-summary ul {
  margin: 0;
  padding-left: 18px;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.auth-submit {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.auth-alt,
.auth-note {
  margin-top: 22px;
}

.auth-alt a { color: var(--accent); font-weight: 800; }

@media (max-width: 760px) {
  .form-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 26px; }
}


/* Phase 3 - Public gaming catalog */
.topbar-search {
  flex: 1;
  max-width: 460px;
  margin: 0 24px;
}

.topbar-search input,
.catalog-search input {
  width: 100%;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.topbar-search input:focus,
.catalog-search input:focus {
  border-color: rgba(45, 212, 191, 0.72);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12);
}

.gaming-home {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.category-rail {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(16, 23, 42, 0.72);
}

.category-rail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 52px;
  min-height: 52px;
  padding: 0 14px;
  overflow: hidden;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  transition: width 180ms ease, color 180ms ease, background 180ms ease;
}

.category-rail:hover .category-rail-item,
.category-rail-item:focus-visible {
  width: 180px;
}

.category-rail-item:hover,
.category-rail-item.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.category-icon {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  font-weight: 900;
}

.category-name {
  white-space: nowrap;
  font-weight: 800;
}

.home-content,
.catalog-page,
.game-detail-page {
  display: grid;
  gap: 28px;
}

.hero-gaming {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: center;
}

.hero-stats {
  display: grid;
  gap: 14px;
}

.hero-stats article {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

.hero-stats strong {
  display: block;
  color: var(--accent);
  font-size: 2.2rem;
  line-height: 1;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.92rem;
}

.catalog-section {
  display: grid;
  gap: 16px;
}

.section-heading,
.catalog-header,
.catalog-result-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2,
.catalog-header h1 {
  margin: 0;
}

.section-heading a,
.catalog-result-bar a {
  color: var(--accent);
  font-weight: 800;
}

.mosaic-row,
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.mosaic-row .game-card:nth-child(1),
.mosaic-row .game-card:nth-child(6) {
  grid-column: span 2;
}

.horizontal-scroller {
  position: relative;
}

.game-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  padding-bottom: 6px;
}

.scroll-button {
  position: absolute;
  top: 42%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: rgba(5, 8, 18, 0.86);
  opacity: 0;
  cursor: pointer;
  transition: opacity 180ms ease;
}

.horizontal-scroller:hover .scroll-button { opacity: 1; }
.scroll-left { left: 8px; }
.scroll-right { right: 8px; }

.game-card {
  min-height: 100%;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(16, 23, 42, 0.74);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 212, 191, 0.42);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.game-card > a {
  display: grid;
  height: 100%;
}

.game-thumb {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 170px;
  background:
    radial-gradient(circle at 25% 20%, rgba(45, 212, 191, 0.38), transparent 34%),
    radial-gradient(circle at 80% 80%, rgba(125, 211, 252, 0.28), transparent 32%),
    #080d1d;
}

.game-thumb span {
  font-size: 2.8rem;
  font-weight: 900;
  color: rgba(248, 250, 252, 0.9);
  letter-spacing: -0.08em;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #04111e;
  background: var(--accent);
  font-weight: 900;
}

.game-card-body {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.game-category {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.game-card h3 {
  margin: 0;
  font-size: 1.18rem;
}

.game-card p {
  margin: 0;
  font-size: 0.92rem;
}

.game-meta,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-meta span,
.meta-pills span {
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
}

.category-grid,
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-card,
.category-tabs a {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(16, 23, 42, 0.74);
}

.category-card {
  display: grid;
  min-width: 170px;
  padding: 18px;
}

.category-card span { color: var(--accent); }
.category-card small { color: var(--muted); }

.catalog-header {
  align-items: center;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(16, 23, 42, 0.96), rgba(8, 13, 29, 0.94));
}

.catalog-search {
  display: flex;
  min-width: min(100%, 420px);
  gap: 10px;
}

.catalog-search button { border: 0; cursor: pointer; }

.category-tabs a {
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 800;
}

.category-tabs a.is-active,
.category-tabs a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.category-tabs span { color: var(--muted); }

.catalog-result-bar {
  align-items: center;
  color: var(--muted);
}

.empty-state {
  padding: 42px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(16, 23, 42, 0.74);
}

.game-detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}

.game-detail-cover,
.play-placeholder {
  display: grid;
  place-items: center;
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.36), transparent 34%),
    radial-gradient(circle at 86% 80%, rgba(125, 211, 252, 0.26), transparent 34%),
    rgba(16, 23, 42, 0.9);
}

.game-detail-cover span {
  font-size: 5rem;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.game-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-detail-copy {
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(16, 23, 42, 0.74);
}

.game-detail-copy h1 { font-size: clamp(2.2rem, 5vw, 4.4rem); }

.play-stage {
  --game-toolbar-height: 58px;
  --game-shell-bg: #000;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 28px;
  overflow: hidden;
  background: var(--game-shell-bg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  isolation: isolate;
}

.mobile-game-toolbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--game-toolbar-height);
  padding: 10px 14px;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(5, 8, 18, 0.94), rgba(15, 23, 42, 0.84)),
    rgba(5, 8, 18, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(12px);
}

.mobile-game-toolbar-main,
.mobile-game-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mobile-game-toolbar-main {
  flex: 1 1 auto;
}

.mobile-game-toolbar-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.mobile-game-state {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.22);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mobile-game-title {
  overflow: hidden;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-game-open-outside,
.mobile-game-exit {
  white-space: nowrap;
}

.mobile-game-warning {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 14px;
  color: #fde68a;
  background: rgba(113, 63, 18, 0.28);
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
  font-size: 0.9rem;
  line-height: 1.45;
}

.mobile-game-warning strong {
  color: #fef3c7;
  white-space: nowrap;
}

.mobile-game-warning[hidden] {
  display: none !important;
}

.game-frame-wrap {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 520px;
  min-height: clamp(320px, 64vh, 760px);
  min-height: clamp(320px, 64svh, 760px);
  max-height: min(76vh, 780px);
  max-height: min(76svh, 780px);
  overflow: hidden;
  background: #000;
}

.play-stage.mobile-ratio-16-9 .game-frame-wrap { aspect-ratio: 16 / 9; }
.play-stage.mobile-ratio-4-3 .game-frame-wrap { aspect-ratio: 4 / 3; }
.play-stage.mobile-ratio-1-1 .game-frame-wrap { aspect-ratio: 1 / 1; }
.play-stage.mobile-ratio-9-16 .game-frame-wrap { aspect-ratio: 9 / 16; }

.play-stage iframe,
.game-frame-wrap > iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: #000;
}

.play-placeholder {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 420px;
  min-height: clamp(320px, 64vh, 720px);
  min-height: clamp(320px, 64svh, 720px);
  padding: 34px;
  text-align: center;
}

.play-stage.is-requesting-fullscreen {
  cursor: progress;
}

.play-stage.is-game-mode,
.play-stage.is-mobile-expanded,
.play-stage:fullscreen {
  --game-toolbar-height: 54px;
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100vw;
  width: var(--ag-viewport-width, 100vw);
  height: 100vh;
  height: var(--ag-viewport-height, 100dvh);
  max-width: none;
  max-height: none;
  margin: 0;
  padding:
    env(safe-area-inset-top, 0)
    env(safe-area-inset-right, 0)
    env(safe-area-inset-bottom, 0)
    env(safe-area-inset-left, 0);
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

.play-stage.is-game-mode .mobile-game-toolbar,
.play-stage.is-mobile-expanded .mobile-game-toolbar,
.play-stage:fullscreen .mobile-game-toolbar {
  flex: 0 0 auto;
  min-height: var(--game-toolbar-height);
  padding: 8px max(12px, env(safe-area-inset-right, 0)) 8px max(12px, env(safe-area-inset-left, 0));
  background: rgba(0, 0, 0, 0.88);
}

.play-stage.is-game-mode .mobile-game-warning,
.play-stage.is-mobile-expanded .mobile-game-warning,
.play-stage:fullscreen .mobile-game-warning {
  flex: 0 0 auto;
  padding-inline: max(12px, env(safe-area-inset-left, 0)) max(12px, env(safe-area-inset-right, 0));
}

.play-stage.is-game-mode .game-frame-wrap,
.play-stage.is-mobile-expanded .game-frame-wrap,
.play-stage:fullscreen .game-frame-wrap {
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
}

.play-stage.is-game-mode iframe,
.play-stage.is-mobile-expanded iframe,
.play-stage:fullscreen iframe {
  width: 100%;
  height: 100%;
}

body.is-game-mode-active {
  position: fixed;
  inset-inline: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

body.is-game-mode-active .play-stage.is-game-mode,
body.is-game-mode-active .play-stage.is-mobile-expanded,
body.is-game-mode-active .play-stage:fullscreen {
  touch-action: auto;
}

@media (max-width: 820px) {
  .play-stage {
    border-radius: 22px;
  }

  .mobile-game-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    min-height: auto;
    padding: 10px;
  }

  .mobile-game-toolbar-main,
  .mobile-game-toolbar-actions {
    width: 100%;
  }

  .mobile-game-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-game-toolbar-actions > * {
    justify-content: center;
    width: 100%;
    min-width: 0;
  }

  .mobile-game-open-outside {
    display: none;
  }

  .game-frame-wrap,
  .play-placeholder {
    min-height: min(68vh, 620px);
    min-height: min(68svh, 620px);
  }

  .play-stage.mobile-ratio-9-16 .game-frame-wrap {
    min-height: min(78vh, 760px);
    min-height: min(78svh, 760px);
  }
}

@media (max-width: 640px) {
  .mobile-game-title {
    font-size: 0.9rem;
  }

  .mobile-game-state {
    padding: 5px 8px;
    font-size: 0.72rem;
  }

  .game-frame-wrap,
  .play-placeholder {
    min-height: min(62vh, 560px);
    min-height: min(62svh, 560px);
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .play-stage.is-game-mode .mobile-game-toolbar,
  .play-stage.is-mobile-expanded .mobile-game-toolbar,
  .play-stage:fullscreen .mobile-game-toolbar {
    min-height: 44px;
    padding-block: 6px;
  }

  .play-stage.is-game-mode .mobile-game-warning,
  .play-stage.is-mobile-expanded .mobile-game-warning,
  .play-stage:fullscreen .mobile-game-warning {
    display: none;
  }

  .play-stage.is-game-mode .mobile-game-title,
  .play-stage.is-mobile-expanded .mobile-game-title,
  .play-stage:fullscreen .mobile-game-title {
    display: none;
  }
}

.game-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.game-info-grid article {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(16, 23, 42, 0.74);
}

.trace-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.trace-list div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
}

.trace-list dt { color: var(--muted); }
.trace-list dd { margin: 0; color: var(--text); }

@media (max-width: 1080px) {
  .mosaic-row,
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-gaming,
  .game-detail-hero,
  .game-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 16px 18px; gap: 14px; }
  .topbar-search { order: 3; max-width: none; width: 100%; margin: 0; }
  .gaming-home { grid-template-columns: 1fr; }
  .category-rail { position: relative; top: auto; flex-direction: row; max-height: none; overflow-x: auto; }
  .category-rail:hover .category-rail-item,
  .category-rail-item,
  .category-rail-item:focus-visible { width: auto; }
  .catalog-header,
  .section-heading,
  .catalog-result-bar { align-items: flex-start; flex-direction: column; }
  .catalog-search { width: 100%; }
}

@media (max-width: 620px) {
  .mosaic-row,
  .game-grid { grid-template-columns: 1fr; }
  .catalog-search { flex-direction: column; }
}

/* Phase 4 - Admin catalog management */
.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.admin-page-header h1 {
  font-size: clamp(2rem, 4vw, 3.8rem);
}

.admin-card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(16, 23, 42, 0.74);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.admin-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.admin-table th,
.admin-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.admin-table td > span,
.admin-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.table-actions {
  width: 1%;
  white-space: nowrap;
}

.table-actions .inline-form,
.table-actions a {
  margin-right: 8px;
  margin-bottom: 8px;
}

.button-small {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  cursor: pointer;
  font-size: 0.86rem;
}

.status-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.status-pill.is-good {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.32);
  background: rgba(34, 197, 94, 0.12);
}

.status-pill.is-muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.status-pill.is-accent {
  color: var(--accent);
  border-color: rgba(45, 212, 191, 0.38);
  background: var(--accent-soft);
}

.status-pill.is-info {
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.32);
  background: rgba(59, 130, 246, 0.12);
}

.alert-success,
.alert-error {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
}

.alert-success {
  color: #86efac;
  border: 1px solid rgba(134, 239, 172, 0.32);
  background: rgba(34, 197, 94, 0.12);
}

.alert-error {
  color: #fca5a5;
  border: 1px solid rgba(252, 165, 165, 0.32);
  background: rgba(239, 68, 68, 0.12);
}

.admin-form-card {
  padding: 28px;
}

.admin-form {
  display: grid;
  gap: 20px;
}

.form-section-title {
  margin: 12px 0 0;
  color: var(--accent);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.form-field textarea,
.form-field select {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
  font: inherit;
}

.form-field textarea:focus,
.form-field select:focus {
  border-color: rgba(45, 212, 191, 0.72);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12);
}

.form-field select option {
  color: #0f172a;
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 820px) {
  .admin-page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-content {
    padding: 28px 18px;
  }
}

/* Phase 5 - User administration and player profile base */
.status-pill.is-danger {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.32);
  background: rgba(239, 68, 68, 0.12);
}

.player-profile-hero {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.player-avatar-shell {
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(45, 212, 191, 0.38);
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.26), rgba(125, 211, 252, 0.18));
  box-shadow: 0 0 50px rgba(45, 212, 191, 0.18);
}

.player-avatar-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-avatar-shell span {
  color: var(--accent);
  font-size: 3rem;
  font-weight: 900;
}

.player-meta-pills {
  margin-top: 18px;
}

.player-dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.player-account-card {
  padding: 28px;
}

@media (max-width: 760px) {
  .player-profile-hero,
  .player-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .player-avatar-shell {
    width: 92px;
    height: 92px;
  }
}

/* Phase 6 - User favorites */
.game-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.favorite-toggle-button {
  border: 1px solid var(--border);
  cursor: pointer;
}

.favorite-toggle-button.is-active {
  color: #04111e;
  border-color: transparent;
  background: var(--accent);
}

.favorites-page {
  display: grid;
  gap: 22px;
}

.favorites-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.favorite-card {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(16, 23, 42, 0.74);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.favorite-card:hover {
  transform: translateY(-3px);
  border-color: rgba(45, 212, 191, 0.42);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.favorite-card-link {
  display: grid;
}

.favorite-thumb {
  min-height: 190px;
}

.favorite-card-body {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.favorite-card-body h2 {
  margin: 0;
  font-size: 1.2rem;
}

.favorite-card-body p,
.favorite-card-body small {
  margin: 0;
}

.favorite-remove-form {
  padding: 0 18px 18px;
}

.favorite-remove-form .button-secondary {
  width: 100%;
  border: 1px solid var(--border);
  cursor: pointer;
}

@media (max-width: 1080px) {
  .favorites-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .favorites-grid { grid-template-columns: 1fr; }
}

/* Phase 7 - Game comments and replies */
.comments-panel {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(16, 23, 42, 0.74);
}

.comments-panel .section-heading span {
  color: var(--muted);
  font-weight: 700;
}

.comment-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
}

.comment-form label {
  color: var(--text);
  font-weight: 800;
}

.comment-form textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
  resize: vertical;
  font: inherit;
}

.comment-form textarea:focus {
  border-color: rgba(45, 212, 191, 0.72);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12);
}

.comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.comment-form-footer small {
  color: var(--muted);
}

.comment-login-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
}

.comment-login-callout p {
  margin: 0;
}

.comments-list {
  display: grid;
  gap: 16px;
}

.comment-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(5, 8, 18, 0.34);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comment-header strong,
.comment-header span,
.comment-header small {
  display: block;
}

.comment-header span,
.comment-header small {
  color: var(--muted);
  font-size: 0.84rem;
}

.comment-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(45, 212, 191, 0.32);
  border-radius: 16px;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 900;
}

.comment-body {
  margin: 0;
  white-space: pre-wrap;
}

.comment-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.comment-reaction-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font: inherit;
}

.comment-reaction-button.is-active {
  color: var(--accent);
  border-color: rgba(45, 212, 191, 0.38);
  background: var(--accent-soft);
}

.comment-reaction-button.is-danger-active {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.32);
  background: rgba(239, 68, 68, 0.12);
}

.reply-box {
  width: 100%;
}

.reply-box summary {
  width: fit-content;
  color: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.comment-form-compact {
  margin-top: 12px;
  padding: 14px;
}

.comment-form-compact .button-secondary {
  width: fit-content;
  border: 1px solid var(--border);
  cursor: pointer;
}

.comment-replies {
  display: grid;
  gap: 12px;
  padding-left: 24px;
  border-left: 1px solid rgba(45, 212, 191, 0.24);
}

.comment-card-reply {
  background: rgba(255, 255, 255, 0.028);
}

@media (max-width: 760px) {
  .comments-panel { padding: 18px; }
  .comment-form-footer,
  .comment-login-callout {
    align-items: stretch;
    flex-direction: column;
  }
  .comment-replies { padding-left: 12px; }
}

/* Phase 8 - Friendships */
.friends-page {
  display: grid;
  gap: 24px;
}

.friends-search-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 24px;
  align-items: center;
  padding: 24px;
}

.friends-search-card h2,
.friend-card h3 {
  margin: 0;
}

.friends-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.friends-section {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.friend-card,
.friend-list-row {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
}

.friend-card {
  grid-template-columns: 56px minmax(0, 1fr);
  padding: 18px;
}

.friend-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(45, 212, 191, 0.32);
  border-radius: 18px;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 900;
}

.friend-card-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.friend-card-main p {
  margin: 0;
}

.friend-card-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.friend-card-actions form,
.friend-row-actions form {
  display: inline-flex;
  margin: 0;
}

.friends-list {
  display: grid;
  gap: 12px;
}

.friend-list-row {
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  padding: 14px;
}

.friend-list-row strong,
.friend-list-row span {
  display: block;
}

.friend-list-row span {
  color: var(--muted);
  font-size: 0.9rem;
}

.friend-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 1080px) {
  .friends-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .friends-search-card,
  .friends-columns { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .friends-grid { grid-template-columns: 1fr; }
  .friend-list-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .friend-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* Phase 9 - Private chat */
.chat-page {
  display: grid;
  gap: 24px;
}

.chat-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.chat-friends,
.chat-panel {
  min-height: 620px;
}

.chat-friends {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding: 22px;
}

.chat-sidebar-header,
.chat-conversation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.chat-sidebar-header h2,
.chat-conversation-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.chat-friend-list {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.chat-friend-form {
  margin: 0;
}

.chat-friend-button {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.chat-friend-button:hover,
.chat-friend-button.is-active {
  border-color: rgba(45, 212, 191, 0.42);
  background: var(--accent-soft);
}

.chat-friend-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-friend-copy strong,
.chat-friend-copy small,
.chat-friend-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-friend-copy small,
.chat-friend-copy em {
  color: var(--muted);
  font-size: 0.84rem;
}

.chat-friend-copy em {
  font-style: normal;
}

.chat-unread-badge {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  color: #04111e;
  background: var(--accent);
  font-weight: 900;
  font-size: 0.8rem;
}

.chat-empty-small {
  padding: 20px;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding: 22px;
}

.chat-placeholder {
  display: grid;
  place-content: center;
  min-height: 560px;
  padding: 42px;
  text-align: center;
}

.chat-conversation-header {
  justify-content: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.chat-conversation-header p {
  margin: 4px 0 0;
}

.chat-messages {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  max-height: 62vh;
  overflow-y: auto;
  padding: 8px 4px;
}

.chat-empty-line {
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.chat-message {
  justify-self: start;
  display: grid;
  gap: 5px;
  max-width: min(620px, 86%);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 18px 18px 18px 6px;
  background: rgba(255, 255, 255, 0.04);
}

.chat-message.is-mine {
  justify-self: end;
  border-color: rgba(45, 212, 191, 0.34);
  border-radius: 18px 18px 6px 18px;
  background: rgba(45, 212, 191, 0.14);
}

.chat-message strong {
  color: var(--accent);
  font-size: 0.82rem;
}

.chat-message p {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
}

.chat-message small {
  color: var(--muted);
  font-size: 0.76rem;
}

.chat-send-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.chat-send-form textarea {
  width: 100%;
  min-height: 52px;
  max-height: 160px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  resize: vertical;
  outline: none;
  font: inherit;
}

.chat-send-form textarea:focus {
  border-color: rgba(45, 212, 191, 0.72);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12);
}

.chat-send-form button {
  align-self: end;
  border: 0;
  cursor: pointer;
}

@media (max-width: 980px) {
  .chat-shell {
    grid-template-columns: 1fr;
  }

  .chat-friends,
  .chat-panel {
    min-height: auto;
  }

  .chat-messages {
    max-height: 58vh;
  }
}

@media (max-width: 640px) {
  .chat-friend-button {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .chat-unread-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .chat-send-form {
    grid-template-columns: 1fr;
  }
}

.panel-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(16, 23, 42, 0.74);
}

/* Phase 10 - User notifications */
.notifications-page {
  display: grid;
  gap: 24px;
}

.notifications-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: center;
}

.notification-summary-card {
  display: grid;
  gap: 6px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
}

.notification-summary-card span,
.notification-summary-card small {
  color: var(--muted);
}

.notification-summary-card strong {
  color: var(--accent);
  font-size: 3rem;
  line-height: 1;
}

.notifications-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.notifications-toolbar h2,
.notifications-toolbar p {
  margin: 0;
}

.notifications-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.notifications-list {
  display: grid;
  gap: 14px;
}

.notification-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(16, 23, 42, 0.74);
}

.notification-row.is-unread {
  border-color: rgba(45, 212, 191, 0.42);
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.14), rgba(16, 23, 42, 0.82));
}

.notification-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #04111e;
  background: var(--accent);
  font-weight: 900;
}

.notification-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.notification-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.notification-type,
.notification-unread-dot {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.notification-type {
  color: var(--accent);
  background: var(--accent-soft);
}

.notification-unread-dot {
  color: #04111e;
  background: var(--accent);
}

.notification-copy h2,
.notification-copy p {
  margin: 0;
}

.notification-copy h2 {
  font-size: 1.12rem;
}

.notification-copy small {
  color: var(--muted);
}

.notification-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.notification-action-button {
  border: 0;
  cursor: pointer;
}

@media (max-width: 860px) {
  .notifications-hero,
  .notification-row {
    grid-template-columns: 1fr;
  }

  .notifications-toolbar,
  .notification-row-actions {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .notifications-toolbar {
    flex-direction: column;
  }
}

.status-message {
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 800;
}

.status-message.success {
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.12);
}

.status-message.error {
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.34);
  background: rgba(248, 113, 113, 0.12);
}

/* Phase 11 - Gamification */
.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-section-title h2,
.admin-section-title p {
  margin: 0;
}

.admin-section-title span {
  color: var(--muted);
  font-weight: 800;
}

.gamification-xp-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: start;
}

.compact-form {
  margin: 0;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
}

.rank-row h3,
.rank-row p {
  margin: 0;
}

.rank-row p,
.rank-row small {
  color: var(--muted);
}

.rank-emblem {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #04111e;
  background: var(--rank-color, var(--accent));
  font-weight: 950;
}

.rank-emblem.large {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  font-size: 1.7rem;
}

.compact-rank-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.compact-rank-row {
  grid-template-columns: 52px minmax(0, 1fr) auto;
}

.player-rank-card {
  display: grid;
  gap: 18px;
}

.rank-progress-header,
.rank-progress-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.rank-progress-header h2,
.rank-progress-header p {
  margin: 0;
}

.rank-progress-bar {
  height: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #38bdf8);
}

.rank-progress-footer {
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 980px) {
  .two-columns,
  .gamification-xp-card,
  .rank-row,
  .compact-rank-row,
  .rank-progress-header,
  .rank-progress-footer {
    grid-template-columns: 1fr;
  }

  .rank-progress-header,
  .rank-progress-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Phase 12 - Gameplay XP session */
.gameplay-xp-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 1.25rem;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(15, 23, 42, 0.92));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.gameplay-xp-panel-muted {
  opacity: 0.86;
}

.gameplay-xp-panel h2 {
  margin: 0.15rem 0 0.35rem;
}

.gameplay-xp-panel p {
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
}

.gameplay-xp-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.gameplay-xp-status {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.gameplay-xp-status span {
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.9rem;
  color: rgba(226, 232, 240, 0.88);
  background: rgba(2, 6, 23, 0.32);
  font-size: 0.88rem;
}

.gameplay-xp-note {
  grid-column: 1 / -1;
  color: rgba(148, 163, 184, 0.86);
}

.hidden-form {
  display: none;
}

@media (max-width: 860px) {
  .gameplay-xp-panel {
    grid-template-columns: 1fr;
  }

  .gameplay-xp-actions {
    justify-content: flex-start;
  }

  .gameplay-xp-status {
    grid-template-columns: 1fr;
  }
}

/* Phase 13 - Seasons and ranking */
.season-active-card {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  border: 1px solid rgba(45, 212, 191, 0.28);
  background: linear-gradient(135deg, rgba(8, 17, 38, 0.94), rgba(20, 184, 166, 0.08));
}

.compact-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.compact-stats span {
  display: inline-flex;
  flex-direction: column;
  min-width: 130px;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.compact-stats strong {
  color: #ffffff;
  font-size: 1.05rem;
}

.stacked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: #ffffff;
  background: color-mix(in srgb, var(--rank-color, #2dd4bf) 38%, transparent);
  border: 1px solid color-mix(in srgb, var(--rank-color, #2dd4bf) 70%, transparent);
  font-size: 0.84rem;
}

.current-player-row {
  outline: 1px solid rgba(45, 212, 191, 0.55);
  background: rgba(45, 212, 191, 0.07);
}

.ranking-table td:first-child {
  font-weight: 800;
  color: #2dd4bf;
}

@media (max-width: 860px) {
  .season-active-card {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-stats span {
    min-width: 100%;
  }
}

/* Phase 14 - Daily analytics and real admin dashboard */
.admin-panel {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(16, 23, 42, 0.72);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.inline-actions select {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.95);
}

.alert {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
}

.alert.success {
  color: #86efac;
  border: 1px solid rgba(134, 239, 172, 0.32);
  background: rgba(34, 197, 94, 0.12);
}

.alert.danger {
  color: #fca5a5;
  border: 1px solid rgba(252, 165, 165, 0.32);
  background: rgba(239, 68, 68, 0.12);
}

/* Phase 15 - Monetization management */
.admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.narrow-page {
  max-width: 980px;
}

.form-grid label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.form-grid textarea {
  padding-top: 12px;
  resize: vertical;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: rgba(45, 212, 191, 0.72);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12);
}

.form-grid .full-row {
  grid-column: 1 / -1;
}

.form-checkbox {
  display: flex !important;
  align-items: center;
  grid-auto-flow: column;
  grid-template-columns: auto 1fr;
  justify-content: flex-start;
  gap: 10px !important;
  color: var(--muted) !important;
}

.form-checkbox input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.policy-callout {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(45, 212, 191, 0.26);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(45, 212, 191, 0.08);
}

/* Phase 16 - Legal, cookie consent and safe ad slots */
.footer-with-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-with-links nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-with-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-with-links a:hover {
  color: var(--accent);
}

.safe-ad-slot {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 96px;
  margin: 18px 0;
  padding: 18px;
  border: 1px dashed rgba(45, 212, 191, 0.34);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(8, 18, 38, 0.78));
  overflow: hidden;
}

.safe-ad-label {
  position: absolute;
  top: 10px;
  left: 12px;
  padding: 3px 8px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(2, 6, 23, 0.72);
}

.safe-ad-placeholder {
  display: grid;
  gap: 6px;
  text-align: center;
  color: var(--muted);
}

.safe-ad-placeholder strong {
  color: var(--text);
}

.safe-ad-rendered {
  width: 100%;
  display: grid;
  place-items: center;
}

.ad-consent-open {
  justify-self: center;
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: #042f2e;
  font-weight: 900;
  background: var(--accent);
  cursor: pointer;
}

.cookie-consent {
  position: fixed;
  z-index: 60;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: none;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(45, 212, 191, 0.34);
  border-radius: 22px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.4);
  background: rgba(2, 6, 23, 0.96);
  backdrop-filter: blur(16px);
}

.cookie-consent.is-visible {
  display: grid;
}

.cookie-consent p {
  margin: 6px 0 0;
  color: var(--muted);
}

.cookie-consent-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-consent-actions a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.cookie-consent-actions button {
  border: 0;
  cursor: pointer;
}

.legal-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 0 60px;
}

.legal-page h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 4rem);
}

.legal-page article {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

.legal-page p {
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 760px) {
  .cookie-consent {
    grid-template-columns: 1fr;
  }

  .cookie-consent-actions {
    justify-content: stretch;
  }
}

/* Phase 17 - Moderation and audit */
.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.admin-summary-grid article {
  border: 1px solid rgba(45, 212, 191, 0.18);
  background: rgba(15, 23, 42, 0.72);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.admin-summary-grid strong {
  display: block;
  font-size: 1.8rem;
  color: #5eead4;
}

.admin-summary-grid span {
  color: rgba(226, 232, 240, 0.78);
}

.moderation-section {
  margin-bottom: 1.5rem;
}

.moderation-list {
  display: grid;
  gap: 1rem;
}

.moderation-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.42);
  border-radius: 18px;
  padding: 1rem;
}

.moderation-card-muted {
  opacity: 0.86;
}

.moderation-card header,
.moderation-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.moderation-card header span,
.moderation-card header small {
  display: block;
  margin-top: 0.25rem;
  color: rgba(226, 232, 240, 0.7);
}

.moderation-inline-notes {
  gap: 0.5rem;
}

.moderation-inline-notes input,
.report-box select,
.report-box textarea {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: #e2e8f0;
  padding: 0.7rem 0.8rem;
}

.button-danger {
  border: 1px solid rgba(248, 113, 113, 0.38);
  background: rgba(127, 29, 29, 0.55);
  color: #fecaca;
}

.report-box {
  margin-top: 0.75rem;
  color: rgba(226, 232, 240, 0.78);
}

.report-box summary {
  cursor: pointer;
  color: #fbbf24;
  font-size: 0.92rem;
}

.report-box form {
  margin-top: 0.75rem;
}


/* Phase 20B - Topbar and sidebar refinement */
.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;
}

html, body {
  overflow-x: clip;
}

.public-app-shell {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  min-height: 100vh;
}

.public-app-main {
  min-width: 0;
}

.public-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 88px;
  height: 100vh;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: rgba(5, 8, 18, 0.94);
  backdrop-filter: blur(22px);
  transition: width 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.public-sidebar:hover,
.public-sidebar:focus-within,
.public-app-shell.is-sidebar-open .public-sidebar {
  width: 288px;
  box-shadow: 26px 0 60px rgba(0, 0, 0, 0.38);
}

.public-sidebar-panel {
  display: grid;
  grid-auto-rows: max-content;
  gap: 18px;
  height: 100%;
  padding: 18px 12px 24px;
}

.public-sidebar-section {
  display: grid;
  gap: 10px;
}

.public-sidebar-section-title {
  margin: 2px 12px 4px;
  color: rgba(248, 250, 252, 0.56);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.public-sidebar:hover .public-sidebar-section-title,
.public-sidebar:focus-within .public-sidebar-section-title,
.public-app-shell.is-sidebar-open .public-sidebar-section-title {
  opacity: 1;
  transform: translateY(0);
}

.public-sidebar-divider {
  height: 1px;
  margin: 0 10px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.22), transparent);
}

.public-sidebar-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 0 12px;
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.public-sidebar-item:hover,
.public-sidebar-item.is-active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.24), rgba(45, 212, 191, 0.08));
}

.public-sidebar-item:hover {
  transform: translateX(2px);
}

.public-sidebar-icon {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.public-sidebar-label,
.public-sidebar-count {
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease;
}

.public-sidebar-label {
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 800;
}

.public-sidebar-count {
  margin-left: auto;
  min-width: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.public-sidebar:hover .public-sidebar-label,
.public-sidebar:hover .public-sidebar-count,
.public-sidebar:focus-within .public-sidebar-label,
.public-sidebar:focus-within .public-sidebar-count,
.public-app-shell.is-sidebar-open .public-sidebar-label,
.public-app-shell.is-sidebar-open .public-sidebar-count {
  opacity: 1;
  visibility: visible;
}

.public-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 24;
  display: none;
  border: 0;
  background: rgba(2, 6, 23, 0.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.public-topbar {
  position: sticky;
  top: 0;
  z-index: 18;
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  gap: 18px;
  min-height: 86px;
  padding: 16px 22px;
  background: rgba(5, 8, 18, 0.88);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.public-menu-button,
.icon-nav-link,
.icon-nav-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 180ms ease, color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.public-menu-button {
  cursor: pointer;
}

.public-menu-button:hover,
.icon-nav-link:hover,
.icon-nav-button:hover {
  transform: translateY(-1px);
  color: var(--accent);
  border-color: rgba(45, 212, 191, 0.38);
  background: rgba(45, 212, 191, 0.08);
}

.public-menu-button svg,
.icon-nav-link svg,
.icon-nav-button svg {
  width: 22px;
  height: 22px;
}

.icon-nav-badge {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(5, 8, 18, 0.88);
  border-radius: 999px;
  background: #f43f5e;
}

.brand {
  gap: 14px;
}

.brand-wordmark {
  font-size: 1.05rem;
  white-space: nowrap;
}

.topbar-search {
  width: 100%;
  max-width: 680px;
  margin: 0;
}

.topbar-search input,
.catalog-search input {
  min-height: 52px;
  padding: 0 20px;
  font-size: 1.02rem;
  background: rgba(255, 255, 255, 0.035);
}

.topbar-actions {
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.topbar-inline-form {
  display: inline-flex;
}

.register-pill {
  min-height: 46px;
  padding: 0 18px;
  font-weight: 800;
}

.page-shell-public,
.public-footer {
  width: min(1500px, calc(100% - 36px));
}

.page-shell-public {
  margin: 26px auto 42px;
}

.public-footer {
  margin-top: 0;
}

.gaming-home {
  display: block;
}

.hero-gaming-compact h1 {
  font-size: clamp(2.5rem, 5vw, 4.8rem);
}

.hero-gaming-compact p:not(.eyebrow) {
  max-width: 820px;
}

.hero-gaming-compact .hero-stats article {
  min-height: 118px;
}

.mosaic-row-home .game-thumb {
  min-height: 200px;
}

.game-card h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 981px) {
  .public-menu-button {
    display: inline-grid;
  }
}

@media (max-width: 1280px) {
  .public-topbar {
    grid-template-columns: auto minmax(220px, 1fr) auto;
  }

  .topbar-actions {
    gap: 8px;
  }

  .register-pill {
    padding: 0 14px;
  }
}

@media (max-width: 980px) {
  .public-app-shell {
    grid-template-columns: 1fr;
  }

  .public-sidebar {
    position: fixed;
    left: 0;
    width: min(320px, calc(100vw - 36px));
    transform: translateX(-108%);
    box-shadow: none;
  }

  .public-sidebar:hover,
  .public-sidebar:focus-within,
  .public-app-shell.is-sidebar-open .public-sidebar {
    width: min(320px, calc(100vw - 36px));
    transform: translateX(0);
  }

  .public-sidebar-panel {
    overflow-y: auto;
  }

  .public-sidebar-section-title,
  .public-sidebar-label,
  .public-sidebar-count {
    opacity: 1;
    visibility: visible;
  }

  .public-sidebar-backdrop {
    display: block;
  }

  .public-app-shell.is-sidebar-open .public-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .public-topbar {
    grid-template-columns: auto 1fr auto;
  }

  .topbar-actions {
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .topbar-actions::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 820px) {
  .topbar {
    flex-wrap: nowrap;
    height: auto;
    gap: 12px;
  }

  .public-topbar {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "left actions"
      "search search";
    align-items: center;
    padding: 14px 16px;
  }

  .topbar-left { grid-area: left; }
  .topbar-search { grid-area: search; max-width: none; }
  .topbar-actions { grid-area: actions; }

  .brand-wordmark {
    font-size: 0.98rem;
  }

  .page-shell-public,
  .public-footer {
    width: min(100%, calc(100% - 24px));
  }

  .hero-gaming-compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .register-pill {
    display: none;
  }

  .brand-wordmark {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .icon-nav-link,
  .icon-nav-button,
  .public-menu-button {
    width: 42px;
    height: 42px;
    border-radius: 16px;
  }

  .topbar-search input,
  .catalog-search input {
    min-height: 48px;
  }
}

/* Phase 20C - Subtle shell corrections, real badges and containment */
@media (min-width: 981px) {
  .public-app-shell {
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-rows: 86px minmax(0, 1fr);
  }

  .public-topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    grid-template-columns: minmax(220px, 320px) minmax(320px, 680px) auto;
    justify-content: stretch;
    min-height: 86px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
  }

  .public-sidebar {
    grid-column: 1;
    grid-row: 2;
    position: sticky;
    top: 86px;
    width: 76px;
    height: calc(100vh - 86px);
    border-top: 0;
    border-right: 1px solid var(--border);
    background: rgba(5, 8, 18, 0.92);
    box-shadow: none;
  }

  .public-app-shell.is-sidebar-open .public-sidebar {
    width: 76px;
    box-shadow: none;
  }

  .public-sidebar:hover,
  .public-sidebar:focus-within {
    width: 286px;
    box-shadow: 24px 0 70px rgba(0, 0, 0, 0.34);
  }

  .public-app-shell.is-sidebar-open .public-sidebar-section-title,
  .public-app-shell.is-sidebar-open .public-sidebar-label,
  .public-app-shell.is-sidebar-open .public-sidebar-count {
    opacity: 0;
    visibility: hidden;
  }

  .public-sidebar:hover .public-sidebar-section-title,
  .public-sidebar:focus-within .public-sidebar-section-title,
  .public-sidebar:hover .public-sidebar-label,
  .public-sidebar:hover .public-sidebar-count,
  .public-sidebar:focus-within .public-sidebar-label,
  .public-sidebar:focus-within .public-sidebar-count {
    opacity: 1;
    visibility: visible;
  }

  .public-app-main {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    overflow: clip;
  }

  .public-sidebar-backdrop {
    display: none !important;
  }
}

.public-app-main,
.page-shell-public,
.home-content,
.catalog-page,
.game-detail-page,
.catalog-section,
.horizontal-scroller,
.mosaic-row,
.game-grid,
.game-strip,
.safe-ad-slot {
  min-width: 0;
  max-width: 100%;
}

.page-shell-public,
.public-footer {
  width: min(1480px, calc(100% - 32px));
}

.safe-ad-slot {
  width: 100%;
  overflow: hidden;
}

.safe-ad-placeholder,
.safe-ad-rendered {
  min-width: 0;
  max-width: 100%;
}

.safe-ad-placeholder strong,
.safe-ad-placeholder span {
  max-width: min(100%, 920px);
  overflow-wrap: anywhere;
}

.icon-nav-badge {
  top: 6px;
  right: 6px;
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid rgba(5, 8, 18, 0.96);
  color: #fff;
  background: #f43f5e;
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
}

.topbar-actions .icon-nav-link,
.topbar-actions .icon-nav-button {
  flex: 0 0 auto;
}

.mosaic-row,
.game-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.mosaic-row .game-card:nth-child(1),
.mosaic-row .game-card:nth-child(6) {
  grid-column: auto;
}

.game-strip {
  grid-auto-columns: minmax(230px, clamp(230px, 24vw, 330px));
  overflow-x: auto;
  overflow-y: hidden;
}

.game-card {
  min-width: 0;
}

.game-card > a,
.game-card-body {
  min-width: 0;
}

.game-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 980px) {
  .public-app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .public-topbar {
    grid-column: 1;
    grid-row: 1;
  }

  .public-app-main {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    overflow: clip;
  }

  .public-sidebar {
    top: 0;
    height: 100vh;
  }

  .public-sidebar-panel {
    overflow-y: auto;
  }
}

@media (max-width: 760px) {
  .page-shell-public,
  .public-footer {
    width: min(100%, calc(100% - 20px));
  }

  .mosaic-row,
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .game-thumb {
    min-height: 128px;
  }

  .game-card-body {
    padding: 12px;
  }

  .game-card p,
  .game-meta {
    display: none;
  }
}

@media (max-width: 430px) {
  .mosaic-row,
  .game-grid {
    grid-template-columns: 1fr;
  }
}


/* Phase 20D - User topbar icons, avatar settings and friendly home preview */
.player-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  padding: 14px clamp(18px, 3vw, 34px);
}

.player-topbar .brand {
  flex: 0 0 auto;
}

.player-topbar-actions {
  margin-left: auto;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.player-topbar-actions::-webkit-scrollbar {
  display: none;
}

.user-page-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 36px auto;
}

.profile-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.avatar-settings-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 30px;
  align-items: center;
}

.avatar-settings-current {
  width: 132px;
  height: 132px;
}

.avatar-settings-card,
.avatar-upload-card {
  display: grid;
  gap: 22px;
  margin-top: 24px;
  padding: 28px;
}

.default-avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 16px;
}

.default-avatar-option {
  margin: 0;
}

.default-avatar-option button {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.default-avatar-option button:hover,
.default-avatar-option.is-selected button {
  transform: translateY(-2px);
  border-color: rgba(45, 212, 191, 0.48);
  background: rgba(45, 212, 191, 0.08);
}

.default-avatar-option img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 20px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.7);
}

.default-avatar-option span {
  color: var(--muted);
  font-weight: 800;
}

.default-avatar-option.is-selected span {
  color: var(--accent);
}

.avatar-upload-form {
  max-width: 520px;
}

.avatar-upload-form input[type="file"] {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.32);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.home-friendly-preview {
  --friendly-pink: #ff7ab6;
  --friendly-yellow: #fde68a;
  --friendly-blue: #7dd3fc;
  --friendly-purple: #a78bfa;
}

.home-friendly-preview .home-content {
  gap: 24px;
}

.home-friendly-preview .hero-gaming-compact {
  position: relative;
  overflow: hidden;
  border-radius: 38px;
  border-color: rgba(125, 211, 252, 0.26);
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 122, 182, 0.26), transparent 28%),
    radial-gradient(circle at 88% 20%, rgba(125, 211, 252, 0.24), transparent 30%),
    radial-gradient(circle at 82% 88%, rgba(253, 230, 138, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(18, 24, 46, 0.96), rgba(9, 16, 34, 0.96));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.home-friendly-preview .hero-gaming-compact::after {
  content: "★";
  position: absolute;
  right: 38px;
  top: 28px;
  color: rgba(253, 230, 138, 0.72);
  font-size: 2.2rem;
  transform: rotate(12deg);
}

.home-friendly-preview .hero-gaming-compact h1 {
  max-width: 980px;
  font-size: clamp(2.4rem, 4.7vw, 4.6rem);
  letter-spacing: -0.06em;
}

.home-friendly-preview .eyebrow {
  color: #5eead4;
}

.home-friendly-preview .button-primary {
  border-radius: 18px;
  background: linear-gradient(135deg, #5eead4, #7dd3fc);
  box-shadow: 0 14px 34px rgba(45, 212, 191, 0.2);
}

.home-friendly-preview .button-secondary {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.home-friendly-preview .catalog-section {
  padding: 4px 0;
}

.home-friendly-preview .section-heading h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.4rem);
}

.home-friendly-preview .game-card {
  border-radius: 28px;
  background: rgba(17, 24, 43, 0.82);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

.home-friendly-preview .game-card:hover {
  transform: translateY(-5px) scale(1.01);
}

.home-friendly-preview .game-thumb {
  min-height: 185px;
  background:
    radial-gradient(circle at 25% 22%, rgba(255, 122, 182, 0.28), transparent 34%),
    radial-gradient(circle at 78% 28%, rgba(125, 211, 252, 0.30), transparent 34%),
    radial-gradient(circle at 70% 88%, rgba(253, 230, 138, 0.22), transparent 32%),
    #0b1224;
}

.home-friendly-preview .game-badge {
  border-radius: 14px;
  background: linear-gradient(135deg, #5eead4, #fde68a);
}

.home-friendly-preview .game-card-body {
  gap: 7px;
}

.home-friendly-preview .game-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-friendly-preview .category-card {
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(125, 211, 252, 0.12), transparent 34%),
    rgba(16, 23, 42, 0.76);
}

.home-friendly-preview .safe-ad-slot {
  margin-block: 10px 22px;
  border-radius: 26px;
  background: rgba(8, 13, 29, 0.68);
}

@media (max-width: 820px) {
  .player-topbar {
    padding: 14px 16px;
  }

  .player-topbar .brand-wordmark {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .user-page-shell {
    width: min(100%, calc(100% - 24px));
    margin: 24px auto;
  }

  .avatar-settings-hero {
    grid-template-columns: 1fr;
  }

  .avatar-settings-current {
    width: 112px;
    height: 112px;
  }
}

@media (max-width: 560px) {
  .player-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .player-topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .default-avatar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Phase 20E - Friendly compact home density pass */
.home-friendly-preview {
  --friendly-card-radius: 22px;
  --friendly-compact-card-width: 166px;
}

.home-friendly-preview .home-content {
  gap: 18px;
}

.home-friendly-preview .safe-ad-slot {
  width: 100%;
  max-width: 100%;
  min-height: 72px;
  margin-block: 4px 16px;
  padding: 14px 18px;
  overflow: hidden;
  border-radius: 22px;
}

.home-friendly-preview .safe-ad-slot > * {
  max-width: 100%;
}

.home-friendly-preview .hero-gaming-compact {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 26px 28px;
  border-radius: 30px;
}

.home-friendly-preview .hero-gaming-compact::after {
  right: 26px;
  top: 20px;
  font-size: 1.6rem;
}

.home-friendly-preview .hero-gaming-compact h1 {
  max-width: 760px;
  font-size: clamp(2.05rem, 3.8vw, 3.8rem);
  letter-spacing: -0.055em;
}

.home-friendly-preview .hero-gaming-compact p:not(.eyebrow) {
  max-width: 720px;
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 0.98rem;
  line-height: 1.55;
}

.home-friendly-preview .hero-actions {
  gap: 10px;
  margin-top: 18px;
}

.home-friendly-preview .button-primary,
.home-friendly-preview .button-secondary {
  min-height: 40px;
  padding-inline: 15px;
  border-radius: 15px;
}

.home-friendly-preview .hero-stats {
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  min-width: 220px;
  gap: 10px;
}

.home-friendly-preview .hero-stats article {
  min-height: auto;
  padding: 14px;
  border-radius: 20px;
}

.home-friendly-preview .hero-stats strong {
  font-size: 1.6rem;
}

.home-friendly-preview .hero-stats span {
  font-size: 0.78rem;
  line-height: 1.25;
}

.home-friendly-preview .section-heading {
  margin-top: 2px;
}

.home-friendly-preview .section-heading h2 {
  font-size: clamp(1.35rem, 2.1vw, 2rem);
}

.home-friendly-preview .eyebrow {
  margin-bottom: 7px;
  font-size: 0.72rem;
}

.home-friendly-preview .mosaic-row,
.home-friendly-preview .game-grid {
  grid-template-columns: repeat(auto-fill, minmax(var(--friendly-compact-card-width), 1fr));
  gap: 14px;
}

.home-friendly-preview .mosaic-row .game-card:nth-child(1),
.home-friendly-preview .mosaic-row .game-card:nth-child(6) {
  grid-column: auto;
}

.home-friendly-preview .mosaic-row-home .game-thumb,
.home-friendly-preview .game-thumb {
  min-height: 0;
  aspect-ratio: 1.28 / 1;
}

.home-friendly-preview .game-strip {
  grid-auto-columns: minmax(156px, 178px);
  gap: 14px;
  padding-bottom: 4px;
}

.home-friendly-preview .game-card {
  border-radius: var(--friendly-card-radius);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.home-friendly-preview .game-card:hover {
  transform: translateY(-3px) scale(1.008);
}

.home-friendly-preview .game-card-body {
  gap: 4px;
  padding: 11px 12px 13px;
}

.home-friendly-preview .game-category {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
}

.home-friendly-preview .game-card h3 {
  min-height: 2.36em;
  font-size: 0.98rem;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.home-friendly-preview .game-card p,
.home-friendly-preview .game-meta {
  display: none;
}

.home-friendly-preview .game-badge {
  left: 10px;
  top: 10px;
  padding: 5px 8px;
  border-radius: 12px;
  font-size: 0.68rem;
}

.home-friendly-preview .game-thumb span {
  font-size: 2.05rem;
}

.home-friendly-preview .category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 12px;
}

.home-friendly-preview .category-card {
  min-width: 0;
  padding: 14px;
  border-radius: 20px;
}

.home-friendly-preview .category-card span {
  font-size: 1.15rem;
}

.home-friendly-preview .category-card strong {
  margin-top: 4px;
  font-size: 0.98rem;
}

.home-friendly-preview .category-card small {
  margin-top: 2px;
  font-size: 0.78rem;
}

@media (max-width: 980px) {
  .home-friendly-preview .hero-gaming-compact {
    grid-template-columns: 1fr;
  }

  .home-friendly-preview .hero-stats {
    max-width: 340px;
  }
}

@media (max-width: 720px) {
  .home-friendly-preview {
    --friendly-compact-card-width: 140px;
  }

  .home-friendly-preview .home-content {
    gap: 16px;
  }

  .home-friendly-preview .hero-gaming-compact {
    padding: 22px;
  }

  .home-friendly-preview .hero-gaming-compact h1 {
    font-size: clamp(1.85rem, 9vw, 3rem);
  }

  .home-friendly-preview .mosaic-row,
  .home-friendly-preview .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .home-friendly-preview .game-strip {
    grid-auto-columns: minmax(138px, 156px);
  }

  .home-friendly-preview .game-card h3 {
    font-size: 0.92rem;
  }
}

@media (max-width: 420px) {
  .home-friendly-preview .hero-actions {
    flex-direction: column;
  }

  .home-friendly-preview .button-primary,
  .home-friendly-preview .button-secondary {
    width: 100%;
  }

  .home-friendly-preview .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Phase 20F - Home mascot XP animation */
.home-mascot-preview .hero-mascot-xp {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  align-items: center;
  gap: 28px;
  padding: 28px;
  overflow: hidden;
}

.home-mascot-preview .hero-copy-stack {
  display: grid;
  gap: 18px;
  align-content: center;
}

.home-mascot-preview .hero-copy-stack h1 {
  max-width: 13ch;
  font-size: clamp(2.45rem, 5vw, 4.25rem);
  line-height: 0.94;
}

.home-mascot-preview .hero-microcopy {
  max-width: 58ch;
  margin: 0;
  color: rgba(226, 232, 240, 0.82);
  font-size: 1rem;
  line-height: 1.65;
}

.home-mascot-preview .hero-xp-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  padding: 12px 16px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.4);
  box-shadow: 0 20px 35px rgba(2, 6, 23, 0.24);
}

.home-mascot-preview .xp-pill-minute,
.home-mascot-preview .xp-pill-value {
  font-weight: 900;
}

.home-mascot-preview .xp-pill-minute {
  color: #fde68a;
}

.home-mascot-preview .xp-pill-separator {
  color: rgba(248, 250, 252, 0.55);
  font-weight: 900;
}

.home-mascot-preview .xp-pill-value {
  color: #5eead4;
}

.home-mascot-preview .hero-mascot-demo {
  display: grid;
  gap: 16px;
}

.home-mascot-preview .mascot-stage-card {
  position: relative;
  min-height: 290px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 122, 182, 0.18), transparent 35%),
    radial-gradient(circle at 80% 20%, rgba(125, 211, 252, 0.22), transparent 32%),
    radial-gradient(circle at 50% 85%, rgba(94, 234, 212, 0.18), transparent 36%),
    rgba(7, 12, 28, 0.72);
  overflow: hidden;
  isolation: isolate;
}

.home-mascot-preview .mascot-stage-glow {
  position: absolute;
  inset: auto;
  left: 50%;
  top: 50%;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.26), rgba(125, 211, 252, 0));
  transform: translate(-50%, -50%);
  animation: mascotPulseGlow 3.2s ease-in-out infinite;
}

.home-mascot-preview .site-mascot-ghost {
  position: relative;
  z-index: 2;
  display: block;
  width: min(100%, 260px);
  margin: 0 auto;
  filter: drop-shadow(0 18px 40px rgba(13, 148, 136, 0.24));
  animation: mascotFloatBob 3.8s ease-in-out infinite;
}

.home-mascot-preview .ghost-aura {
  animation: ghostAuraBlink 2.8s ease-in-out infinite;
}

.home-mascot-preview .ghost-shadow {
  animation: ghostShadowPulse 3.8s ease-in-out infinite;
  transform-origin: center;
}

.home-mascot-preview .ghost-spark {
  transform-origin: center;
  animation: mascotSparkle 2.8s ease-in-out infinite;
}

.home-mascot-preview .spark-b { animation-delay: 0.35s; }
.home-mascot-preview .spark-c { animation-delay: 0.7s; }

.home-mascot-preview .mascot-floating-chip {
  position: absolute;
  z-index: 3;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #eff6ff;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.26);
}

.home-mascot-preview .chip-minute {
  top: 18px;
  left: 26px;
  color: #fde68a;
  animation: chipDriftA 4.2s ease-in-out infinite;
}

.home-mascot-preview .chip-xp {
  right: 26px;
  top: 86px;
  color: #5eead4;
  animation: chipDriftB 3.8s ease-in-out infinite;
}

.home-mascot-preview .chip-level {
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  color: #f9a8d4;
  animation: chipDriftC 4.5s ease-in-out infinite;
}

.home-mascot-preview .hero-level-card {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  background: rgba(9, 14, 28, 0.76);
}

.home-mascot-preview .hero-level-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.92rem;
}

.home-mascot-preview .hero-level-card-top strong {
  color: #5eead4;
  font-size: 0.95rem;
}

.home-mascot-preview .hero-level-rail {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.home-mascot-preview .hero-level-rail span {
  display: block;
  width: 34%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fde68a, #5eead4, #7dd3fc, #c084fc);
  background-size: 220% 100%;
  animation: levelBarFill 3.8s ease-in-out infinite, levelBarShimmer 4s linear infinite;
}

.home-mascot-preview .hero-level-milestones {
  display: flex;
  justify-content: space-between;
  color: rgba(226, 232, 240, 0.64);
  font-size: 0.78rem;
  font-weight: 800;
}

.home-mascot-preview .hero-stats-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-mascot-preview .hero-stats-compact article {
  min-height: 0;
}

@keyframes mascotFloatBob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.02); }
}

@keyframes mascotPulseGlow {
  0%, 100% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.95; }
}

@keyframes ghostAuraBlink {
  0%, 100% { opacity: 0.42; }
  50% { opacity: 0.92; }
}

@keyframes ghostShadowPulse {
  0%, 100% { transform: scaleX(1); opacity: 0.22; }
  50% { transform: scaleX(0.88); opacity: 0.32; }
}

@keyframes mascotSparkle {
  0%, 100% { transform: scale(0.9) rotate(0deg); opacity: 0.65; }
  50% { transform: scale(1.18) rotate(8deg); opacity: 1; }
}

@keyframes chipDriftA {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(6px, -8px); }
}

@keyframes chipDriftB {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-6px, -10px); }
}

@keyframes chipDriftC {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

@keyframes levelBarFill {
  0%, 100% { width: 28%; }
  50% { width: 76%; }
}

@keyframes levelBarShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

@media (max-width: 1120px) {
  .home-mascot-preview .hero-mascot-xp {
    grid-template-columns: 1fr;
  }

  .home-mascot-preview .hero-copy-stack h1 {
    max-width: 12ch;
  }
}

@media (max-width: 720px) {
  .home-mascot-preview .hero-mascot-xp {
    padding: 22px;
    gap: 20px;
  }

  .home-mascot-preview .hero-copy-stack {
    gap: 14px;
  }

  .home-mascot-preview .hero-copy-stack h1 {
    max-width: 10ch;
    font-size: clamp(2.1rem, 9vw, 3.2rem);
  }

  .home-mascot-preview .hero-microcopy {
    font-size: 0.95rem;
  }

  .home-mascot-preview .mascot-stage-card {
    min-height: 250px;
  }

  .home-mascot-preview .chip-minute,
  .home-mascot-preview .chip-xp,
  .home-mascot-preview .chip-level {
    font-size: 0.72rem;
  }
}


/* Phase 20G - Boo mascot with PC gaming showcase */
.home-mascot-gaming-preview .hero-mascot-pc-showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
  align-items: center;
  gap: 24px;
  padding: 24px 26px;
  overflow: hidden;
}

.home-mascot-gaming-preview .hero-copy-minimal {
  gap: 16px;
}

.home-mascot-gaming-preview .hero-copy-minimal h1 {
  max-width: 10ch;
  font-size: clamp(2.4rem, 5vw, 4.1rem);
  line-height: 0.92;
}

.home-mascot-gaming-preview .hero-rule-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.home-mascot-gaming-preview .hero-rule-pill {
  min-width: 132px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(8, 12, 30, 0.6);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.18);
}

.home-mascot-gaming-preview .hero-rule-pill.is-accent {
  border-color: rgba(94, 234, 212, 0.26);
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.18), rgba(8, 12, 30, 0.68));
}

.home-mascot-gaming-preview .hero-rule-pill.is-soft {
  border-color: rgba(192, 132, 252, 0.2);
  background: linear-gradient(180deg, rgba(192, 132, 252, 0.12), rgba(8, 12, 30, 0.68));
}

.home-mascot-gaming-preview .hero-rule-kicker {
  display: block;
  margin-bottom: 6px;
  color: rgba(226, 232, 240, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-mascot-gaming-preview .hero-rule-pill strong {
  display: block;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 900;
}

.home-mascot-gaming-preview .hero-rule-equals {
  color: #fde68a;
  font-size: 1.6rem;
  font-weight: 900;
}

.home-mascot-gaming-preview .hero-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.95rem;
}

.home-mascot-gaming-preview .hero-inline-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.home-mascot-gaming-preview .hero-inline-meta strong {
  color: var(--text);
}

.home-mascot-gaming-preview .hero-mascot-demo-pc {
  display: block;
}

.home-mascot-gaming-preview .mascot-play-scene {
  position: relative;
  min-height: 360px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 16%, rgba(45, 212, 191, 0.18), transparent 26%),
    radial-gradient(circle at 78% 18%, rgba(192, 132, 252, 0.18), transparent 26%),
    radial-gradient(circle at 70% 80%, rgba(125, 211, 252, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(9, 14, 32, 0.92), rgba(5, 8, 22, 0.98));
  overflow: hidden;
  isolation: isolate;
}

.home-mascot-gaming-preview .scene-grid-glow {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.9));
  opacity: 0.5;
}

.home-mascot-gaming-preview .mascot-render-image {
  position: absolute;
  z-index: 2;
  right: 42px;
  top: 20px;
  width: min(100%, 380px);
  filter: drop-shadow(0 20px 50px rgba(45, 212, 191, 0.25));
  transform-origin: center bottom;
  animation: mascotRenderFloat 4s ease-in-out infinite;
}

.home-mascot-gaming-preview .gaming-pc-rig {
  position: absolute;
  z-index: 4;
  left: 56px;
  right: 96px;
  bottom: 34px;
}

.home-mascot-gaming-preview .pc-monitor {
  position: relative;
  width: min(100%, 320px);
}

.home-mascot-gaming-preview .pc-monitor-bezel {
  position: relative;
  padding: 12px;
  border: 2px solid rgba(125, 211, 252, 0.28);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.4);
}

.home-mascot-gaming-preview .pc-screen-glow {
  position: absolute;
  inset: 10px;
  border-radius: 14px;
  background: radial-gradient(circle at center, rgba(94, 234, 212, 0.16), rgba(94, 234, 212, 0));
  animation: pcScreenPulse 2.8s ease-in-out infinite;
}

.home-mascot-gaming-preview .pc-screen-content {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 132px;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(94, 234, 212, 0.15), transparent 48%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.95));
}

.home-mascot-gaming-preview .pc-screen-content::before,
.home-mascot-gaming-preview .pc-screen-content::after {
  content: "";
  position: absolute;
  inset: auto;
  width: 160px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.85), transparent);
  animation: pcSweep 2.2s linear infinite;
}

.home-mascot-gaming-preview .pc-screen-content::before {
  top: 34px;
}

.home-mascot-gaming-preview .pc-screen-content::after {
  top: 84px;
  animation-delay: 1.1s;
}

.home-mascot-gaming-preview .pc-screen-content span {
  position: relative;
  z-index: 2;
  color: #f8fafc;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(94, 234, 212, 0.4);
}

.home-mascot-gaming-preview .pc-monitor-stand {
  width: 96px;
  height: 12px;
  margin: 12px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(71, 85, 105, 0.9), rgba(30, 41, 59, 1));
  box-shadow: 0 10px 18px rgba(2, 6, 23, 0.22);
}

.home-mascot-gaming-preview .pc-desk-line {
  width: 100%;
  height: 8px;
  margin-top: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(125, 211, 252, 0.15), rgba(94, 234, 212, 0.5), rgba(192, 132, 252, 0.2));
}

.home-mascot-gaming-preview .pc-spark {
  position: absolute;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.95);
  box-shadow: 0 0 16px rgba(94, 234, 212, 0.85);
  animation: pcSparkBurst 2.4s linear infinite;
}

.home-mascot-gaming-preview .spark-one {
  top: 22px;
  right: -12px;
  width: 10px;
  height: 10px;
}

.home-mascot-gaming-preview .spark-two {
  top: 44px;
  right: -24px;
  width: 6px;
  height: 6px;
  animation-delay: 0.6s;
}

.home-mascot-gaming-preview .spark-three {
  top: 60px;
  right: -8px;
  width: 7px;
  height: 7px;
  animation-delay: 1.1s;
}

.home-mascot-gaming-preview .spark-four {
  top: 30px;
  right: -34px;
  width: 5px;
  height: 5px;
  animation-delay: 1.7s;
}

.home-mascot-gaming-preview .xp-burst {
  position: absolute;
  z-index: 5;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.22);
}

.home-mascot-gaming-preview .xp-burst-a {
  top: 36px;
  left: 30px;
  color: #5eead4;
  animation: burstFloatA 4s ease-in-out infinite;
}

.home-mascot-gaming-preview .xp-burst-b {
  top: 88px;
  left: 82px;
  color: #fde68a;
  animation: burstFloatB 4.6s ease-in-out infinite;
}

.home-mascot-gaming-preview .xp-burst-c {
  right: 40px;
  bottom: 118px;
  color: #f9a8d4;
  animation: burstFloatC 3.8s ease-in-out infinite;
}

@keyframes mascotRenderFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1.5deg); }
}

@keyframes pcScreenPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes pcSweep {
  0% { transform: translateX(-180px); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(280px); opacity: 0; }
}

@keyframes pcSparkBurst {
  0% { transform: translate(0, 0) scale(0.7); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(20px, -18px) scale(1.2); opacity: 0; }
}

@keyframes burstFloatA {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes burstFloatB {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes burstFloatC {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@media (max-width: 1160px) {
  .home-mascot-gaming-preview .hero-mascot-pc-showcase {
    grid-template-columns: 1fr;
  }

  .home-mascot-gaming-preview .hero-copy-minimal h1 {
    max-width: 12ch;
  }

  .home-mascot-gaming-preview .mascot-render-image {
    right: 28px;
    width: min(100%, 340px);
  }

  .home-mascot-gaming-preview .gaming-pc-rig {
    left: 28px;
    right: 82px;
  }
}

@media (max-width: 760px) {
  .home-mascot-gaming-preview .hero-mascot-pc-showcase {
    padding: 22px;
  }

  .home-mascot-gaming-preview .hero-copy-minimal h1 {
    font-size: clamp(2.1rem, 8vw, 3.2rem);
  }

  .home-mascot-gaming-preview .hero-rule-pill {
    min-width: 118px;
  }

  .home-mascot-gaming-preview .mascot-play-scene {
    min-height: 320px;
  }

  .home-mascot-gaming-preview .mascot-render-image {
    right: 10px;
    top: 8px;
    width: min(100%, 290px);
  }

  .home-mascot-gaming-preview .gaming-pc-rig {
    left: 16px;
    right: 36px;
    bottom: 22px;
  }

  .home-mascot-gaming-preview .pc-monitor {
    width: min(100%, 260px);
  }

  .home-mascot-gaming-preview .pc-screen-content {
    min-height: 112px;
  }

  .home-mascot-gaming-preview .xp-burst-b {
    left: 48px;
  }

  .home-mascot-gaming-preview .xp-burst-c {
    right: 20px;
    bottom: 102px;
  }
}


/* Phase 20H - CrazyGames-inspired subtle public category rail */
@media (min-width: 981px) {
  .public-app-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .public-sidebar {
    z-index: 32;
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    overflow: visible;
    border-right: 1px solid rgba(148, 163, 184, 0.12);
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    transition: none;
  }

  .public-sidebar:hover,
  .public-sidebar:focus-within,
  .public-app-shell.is-sidebar-open .public-sidebar {
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    box-shadow: none;
  }

  .public-sidebar-panel {
    position: sticky;
    top: 0;
    width: 88px;
    height: 100vh;
    padding: 14px 0 18px;
    overflow-x: hidden;
    overflow-y: auto;
    background:
      linear-gradient(180deg, rgba(10, 13, 25, 0.98), rgba(5, 8, 18, 0.98)),
      var(--bg);
    border-right: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(45, 212, 191, 0.36) transparent;
    transition: width 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
  }

  .public-sidebar:hover .public-sidebar-panel,
  .public-sidebar:focus-within .public-sidebar-panel {
    width: 272px;
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 18px 0 44px rgba(2, 6, 23, 0.36);
  }

  .public-app-shell.is-sidebar-open .public-sidebar-panel {
    width: 88px;
    box-shadow: none;
  }
}

.public-sidebar-panel::-webkit-scrollbar {
  width: 6px;
}

.public-sidebar-panel::-webkit-scrollbar-track {
  background: transparent;
}

.public-sidebar-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.28);
}

.public-sidebar-nav {
  display: grid;
  gap: 12px;
  min-width: 272px;
}

.public-sidebar-section {
  display: grid;
  gap: 8px;
  padding: 0 12px;
}

.public-sidebar-section-primary {
  padding-top: 2px;
}

.public-sidebar-section-title {
  width: 220px;
  margin: 10px 0 2px;
  padding-left: 66px;
  color: rgba(226, 232, 240, 0.52);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.public-sidebar:hover .public-sidebar-section-title,
.public-sidebar:focus-within .public-sidebar-section-title,
.is-public-sidebar-open .public-sidebar-section-title {
  opacity: 1;
  transform: translateX(0);
}

.public-sidebar-divider {
  width: 54px;
  height: 1px;
  margin: 8px 17px;
  background: rgba(148, 163, 184, 0.16);
  transition: width 160ms ease, margin 160ms ease;
}

.public-sidebar:hover .public-sidebar-divider,
.public-sidebar:focus-within .public-sidebar-divider,
.is-public-sidebar-open .public-sidebar-divider {
  width: 216px;
  margin-inline: 28px;
}

.public-sidebar-item {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 248px;
  min-height: 52px;
  padding: 0 12px;
  border-radius: 16px;
  color: rgba(203, 213, 225, 0.9);
  background: transparent;
  isolation: isolate;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.public-sidebar-item:hover {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.08);
  transform: translateX(2px);
}

.public-sidebar-item.is-active {
  color: #ffffff;
  background: transparent;
}

.public-sidebar-active-marker {
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, #7c3aed, #2dd4bf);
  opacity: 0;
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.34);
}

.public-sidebar-item.is-active .public-sidebar-active-marker {
  opacity: 1;
}

.public-sidebar-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  color: #9ca3ff;
  background: rgba(15, 23, 42, 0.76);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 10px 24px rgba(2, 6, 23, 0.12);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.public-sidebar-item:hover .public-sidebar-icon,
.public-sidebar-item.is-active .public-sidebar-icon {
  color: #5eead4;
  border-color: rgba(45, 212, 191, 0.18);
  background: rgba(45, 212, 191, 0.10);
}

.public-sidebar-label {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.98rem;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.public-sidebar-count {
  min-width: 30px;
  padding: 4px 8px;
  border-radius: 999px;
  color: rgba(226, 232, 240, 0.82);
  background: rgba(148, 163, 184, 0.10);
  font-size: 0.75rem;
  font-weight: 900;
  text-align: center;
}

@media (min-width: 981px) {
  .public-sidebar-label,
  .public-sidebar-count {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-8px);
    transition: opacity 130ms ease, transform 130ms ease, visibility 130ms ease;
  }

  .public-sidebar:hover .public-sidebar-label,
  .public-sidebar:hover .public-sidebar-count,
  .public-sidebar:focus-within .public-sidebar-label,
  .public-sidebar:focus-within .public-sidebar-count {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }
}

.page-shell-public {
  max-width: calc(100vw - 88px - 36px);
  overflow-x: clip;
}

.home-content,
.catalog-page,
.game-detail-page {
  min-width: 0;
  max-width: 100%;
}

.home-friendly-preview .safe-ad-slot,
.safe-ad-slot {
  max-width: 100%;
  overflow: hidden;
}

.home-friendly-preview .mosaic-row,
.home-friendly-preview .game-grid,
.home-friendly-preview .game-strip,
.mosaic-row,
.game-grid,
.game-strip {
  max-width: 100%;
}

@media (max-width: 980px) {
  .public-app-shell {
    grid-template-columns: 1fr;
  }

  .public-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(314px, calc(100vw - 34px));
    min-width: 0;
    max-width: none;
    height: 100vh;
    overflow: hidden;
    transform: translateX(-108%);
    border-right: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(5, 8, 18, 0.98);
    box-shadow: none;
    transition: transform 210ms ease, box-shadow 210ms ease;
  }

  .public-app-shell.is-sidebar-open .public-sidebar {
    transform: translateX(0);
    box-shadow: 22px 0 54px rgba(2, 6, 23, 0.42);
  }

  .public-sidebar-panel {
    width: 100%;
    height: 100%;
    padding: 16px 0 22px;
    overflow-y: auto;
    overflow-x: hidden;
    background: transparent;
    border-right: 0;
  }

  .public-sidebar-nav {
    min-width: 0;
  }

  .public-sidebar-section {
    padding: 0 14px;
  }

  .public-sidebar-item {
    width: 100%;
  }

  .public-sidebar-section-title,
  .public-sidebar-label,
  .public-sidebar-count {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .public-sidebar-section-title {
    width: auto;
    padding-left: 62px;
  }

  .public-sidebar-divider {
    width: auto;
    margin-inline: 26px;
  }

  .page-shell-public {
    max-width: none;
  }
}

@media (max-width: 620px) {
  .public-sidebar-item {
    min-height: 50px;
    grid-template-columns: 46px minmax(0, 1fr) auto;
  }

  .public-sidebar-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }
}

/* Phase 20I - Global friendly public polish, category banners and lower-friction copy */
:root {
  --friendly-surface: rgba(12, 18, 38, 0.78);
  --friendly-surface-strong: rgba(17, 24, 48, 0.9);
  --friendly-border: rgba(148, 163, 184, 0.14);
  --friendly-radius: 28px;
  --friendly-card-radius: 22px;
}

body {
  background:
    radial-gradient(circle at 10% 0%, rgba(45, 212, 191, 0.16), transparent 30%),
    radial-gradient(circle at 90% 12%, rgba(129, 140, 248, 0.12), transparent 28%),
    var(--bg);
}

.topbar,
.public-topbar,
.player-topbar {
  background: rgba(5, 8, 18, 0.9);
}

.icon-nav-link:first-child {
  color: #5eead4;
}

.friendly-content-page,
.catalog-page,
.game-detail-page,
.auth-page,
.user-page-shell > *,
.admin-content > * {
  --local-card-bg: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(9, 14, 29, 0.88));
}

.catalog-page,
.game-detail-page {
  overflow: clip;
}

.catalog-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 190px;
  padding: 28px 32px;
  border: 1px solid var(--friendly-border);
  border-radius: 34px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 18%, rgba(45, 212, 191, 0.18), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(125, 211, 252, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(13, 20, 43, 0.95), rgba(6, 10, 24, 0.96));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
  isolation: isolate;
}

.catalog-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(110deg, rgba(255,255,255,0.06), transparent 32%),
    radial-gradient(circle at 75% 70%, rgba(45, 212, 191, 0.08), transparent 38%);
}

.catalog-banner-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.catalog-banner-copy h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.94;
}

.catalog-banner-copy p:not(.eyebrow) {
  max-width: 48ch;
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
  font-size: 1rem;
}

.catalog-banner-art {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(140px, 20vw, 230px);
  aspect-ratio: 1;
}

.catalog-banner-icon {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 34px;
  color: #07111f;
  background: linear-gradient(135deg, #5eead4, #7dd3fc, #c084fc);
  font-size: 3.6rem;
  font-weight: 900;
  box-shadow: 0 24px 60px rgba(45, 212, 191, 0.24);
  transform: rotate(-4deg);
}

.catalog-banner-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
  opacity: 0.82;
}

.catalog-banner-orb.orb-a {
  width: 52px;
  height: 52px;
  right: 16px;
  top: 28px;
  background: rgba(253, 230, 138, 0.36);
}

.catalog-banner-orb.orb-b {
  width: 38px;
  height: 38px;
  left: 18px;
  bottom: 26px;
  background: rgba(249, 168, 212, 0.32);
}

.catalog-banner-action,
.catalog-banner-accion {
  background:
    radial-gradient(circle at 18% 24%, rgba(251, 146, 60, 0.2), transparent 28%),
    radial-gradient(circle at 84% 20%, rgba(239, 68, 68, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(27, 18, 29, 0.96), rgba(8, 12, 28, 0.96));
}

.catalog-banner-arcade {
  background:
    radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.2), transparent 30%),
    radial-gradient(circle at 84% 22%, rgba(192, 132, 252, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(12, 22, 38, 0.96), rgba(7, 11, 26, 0.96));
}

.catalog-banner-puzzle {
  background:
    radial-gradient(circle at 16% 22%, rgba(125, 211, 252, 0.2), transparent 31%),
    radial-gradient(circle at 82% 20%, rgba(45, 212, 191, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(8, 18, 34, 0.96), rgba(6, 10, 24, 0.96));
}

.catalog-banner-multiplayer {
  background:
    radial-gradient(circle at 18% 22%, rgba(167, 139, 250, 0.22), transparent 32%),
    radial-gradient(circle at 86% 26%, rgba(94, 234, 212, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(17, 16, 39, 0.96), rgba(6, 10, 24, 0.96));
}

.catalog-banner-racing,
.catalog-banner-carreras,
.catalog-banner-cars {
  background:
    radial-gradient(circle at 18% 22%, rgba(248, 113, 113, 0.18), transparent 30%),
    radial-gradient(circle at 86% 24%, rgba(250, 204, 21, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(29, 20, 22, 0.96), rgba(6, 10, 24, 0.96));
}

.catalog-search-inline {
  width: min(100%, 720px);
  margin: 0;
}

.compact-category-tabs {
  overflow-x: auto;
  flex-wrap: nowrap;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.compact-category-tabs a {
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.catalog-result-bar-compact {
  padding: 0 4px;
  color: rgba(226, 232, 240, 0.68);
  font-weight: 800;
}

.friendly-game-grid,
.game-grid,
.mosaic-row {
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
  gap: 14px;
}

.mosaic-row .game-card:nth-child(1),
.mosaic-row .game-card:nth-child(6) {
  grid-column: auto;
}

.game-strip {
  grid-auto-columns: minmax(150px, 176px);
}

.game-card {
  border-radius: var(--friendly-card-radius);
  background:
    radial-gradient(circle at 26% 18%, rgba(45, 212, 191, 0.12), transparent 30%),
    rgba(15, 23, 42, 0.74);
}

.game-card > a {
  display: grid;
  grid-template-rows: auto 1fr;
}

.game-thumb {
  min-height: 128px;
  aspect-ratio: 1.12 / 1;
}

.game-thumb span:not(.game-play-overlay) {
  font-size: 2.2rem;
}

.game-play-overlay {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #06111f;
  background: rgba(94, 234, 212, 0.94);
  font-size: 0.78rem;
  font-weight: 900;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.game-card:hover .game-play-overlay {
  opacity: 1;
  transform: translateY(0);
}

.game-badge {
  padding: 6px 10px;
  background: linear-gradient(135deg, #bef264, #fde68a);
}

.game-card-body {
  gap: 6px;
  padding: 12px 13px 14px;
}

.game-category {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.game-card h3 {
  font-size: 0.98rem;
  line-height: 1.14;
}

.game-card p,
.game-meta {
  display: none !important;
}

.safe-ad-slot-compact,
.safe-ad-slot {
  max-width: 100%;
  min-height: 82px;
  padding: 12px 16px;
  border-radius: 26px;
  overflow: hidden;
}

.safe-ad-slot-compact .safe-ad-placeholder,
.safe-ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-height: 58px;
  text-align: center;
}

.safe-ad-slot-compact .safe-ad-placeholder strong,
.safe-ad-placeholder strong {
  font-size: 0.95rem;
}

.safe-ad-slot-compact .safe-ad-placeholder span,
.safe-ad-placeholder span {
  font-size: 0.88rem;
}

.game-detail-hero-friendly {
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
}

.game-detail-hero-friendly .game-detail-cover {
  min-height: 240px;
}

.game-detail-hero-friendly .game-detail-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  background:
    radial-gradient(circle at 18% 22%, rgba(45, 212, 191, 0.14), transparent 32%),
    rgba(15, 23, 42, 0.74);
}

.game-detail-hero-friendly .game-detail-copy h1 {
  max-width: 13ch;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.gameplay-xp-panel,
.game-info-grid article,
.comments-panel,
.empty-state,
.comment-form,
.comment-card,
.comment-login-callout {
  border-radius: 26px;
  background: var(--local-card-bg, rgba(15, 23, 42, 0.74));
}

.game-info-grid-friendly article p,
.comments-panel p,
.comment-body {
  line-height: 1.55;
}

.footer-with-links {
  opacity: 0.82;
}

.footer-with-links > span {
  font-size: 0.82rem;
}

@media (max-width: 1080px) {
  .catalog-banner,
  .game-detail-hero-friendly {
    grid-template-columns: 1fr;
  }

  .catalog-banner-art {
    display: none;
  }
}

@media (max-width: 720px) {
  .catalog-banner {
    min-height: 150px;
    padding: 22px;
    border-radius: 28px;
  }

  .catalog-banner-copy h1,
  .game-detail-hero-friendly .game-detail-copy h1 {
    font-size: clamp(2rem, 9vw, 3.2rem);
  }

  .friendly-game-grid,
  .game-grid,
  .mosaic-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .game-strip {
    grid-auto-columns: minmax(138px, 154px);
  }

  .game-thumb {
    min-height: 112px;
  }

  .game-card-body {
    padding: 10px 11px 12px;
  }

  .game-card h3 {
    font-size: 0.92rem;
  }

  .safe-ad-slot-compact,
  .safe-ad-slot {
    min-height: 72px;
    border-radius: 22px;
  }
}


/* Phase 20J - Public ad structure for catalog, category, search and game detail */
.catalog-page-with-ads {
  gap: 18px;
}

.catalog-primary-ad,
.catalog-bottom-ad {
  min-width: 0;
}

.catalog-primary-ad .safe-ad-slot,
.catalog-bottom-ad .safe-ad-slot,
.catalog-inline-ad-break .safe-ad-slot {
  min-height: 86px;
  margin: 0;
  border-style: solid;
  background:
    radial-gradient(circle at 18% 20%, rgba(45, 212, 191, 0.12), transparent 28%),
    rgba(9, 14, 28, 0.76);
}

.catalog-results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.catalog-results-main {
  min-width: 0;
}

.catalog-grid-with-ad-breaks {
  align-items: stretch;
}

.catalog-inline-ad-break {
  grid-column: 1 / -1;
  min-width: 0;
}

.catalog-side-ad,
.game-detail-side-ad {
  position: sticky;
  top: 112px;
  min-width: 0;
}

.catalog-side-ad .safe-ad-slot,
.game-detail-side-ad .safe-ad-slot {
  min-height: 280px;
}

.catalog-side-ad .safe-ad-placeholder,
.game-detail-side-ad .safe-ad-placeholder {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
}

.game-detail-play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.game-detail-play-layout .play-stage {
  min-width: 0;
}

.friendly-content-page .safe-ad-slot-compact .safe-ad-placeholder {
  padding: 16px 20px;
}

.friendly-content-page .safe-ad-placeholder strong,
.game-detail-page .safe-ad-placeholder strong {
  font-size: 0.98rem;
}

.friendly-content-page .safe-ad-placeholder span,
.game-detail-page .safe-ad-placeholder span {
  font-size: 0.86rem;
}

@media (max-width: 1180px) {
  .catalog-results-layout,
  .game-detail-play-layout {
    grid-template-columns: 1fr;
  }

  .catalog-side-ad,
  .game-detail-side-ad {
    position: static;
  }

  .catalog-side-ad .safe-ad-slot,
  .game-detail-side-ad .safe-ad-slot {
    min-height: 86px;
  }

  .catalog-side-ad .safe-ad-placeholder,
  .game-detail-side-ad .safe-ad-placeholder {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .catalog-primary-ad .safe-ad-slot,
  .catalog-bottom-ad .safe-ad-slot,
  .catalog-inline-ad-break .safe-ad-slot,
  .catalog-side-ad .safe-ad-slot,
  .game-detail-side-ad .safe-ad-slot {
    min-height: 72px;
  }

  .catalog-results-layout,
  .game-detail-play-layout {
    gap: 14px;
  }
}

/* Phase 20P - Public player avatars in social surfaces */
.friend-avatar.has-image,
.notification-icon.has-image {
  padding: 0;
  overflow: hidden;
  color: transparent;
  background: rgba(255, 255, 255, 0.04);
}

.friend-avatar img,
.notification-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.chat-friend-button .friend-avatar.has-image,
.chat-conversation-header .friend-avatar.has-image,
.friend-card .friend-avatar.has-image,
.friend-list-row .friend-avatar.has-image {
  box-shadow: 0 12px 30px rgba(45, 212, 191, 0.12);
}

/* Phase 21A - Chat image attachments */
.chat-message .chat-image-link {
  display: block;
  max-width: min(360px, 76vw);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.26);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.22);
}

.chat-image-preview {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.chat-send-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.chat-composer-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  min-height: 56px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
}

.chat-send-form .chat-composer-box textarea {
  min-height: 42px;
  padding: 10px 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
}

.chat-send-form .chat-composer-box textarea:focus {
  box-shadow: none;
}

.chat-image-picker {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 15px;
  color: var(--accent);
  background: rgba(45, 212, 191, 0.09);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.chat-image-picker:hover {
  transform: translateY(-1px);
  border-color: rgba(45, 212, 191, 0.46);
  background: rgba(45, 212, 191, 0.16);
}

.chat-image-picker svg {
  width: 20px;
  height: 20px;
}

.chat-image-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.chat-selected-image {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 18px;
  background: rgba(45, 212, 191, 0.08);
}

.chat-selected-image[hidden] {
  display: none;
}

.chat-selected-image img {
  width: 64px;
  height: 50px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(2, 6, 23, 0.28);
}

.chat-selected-image strong,
.chat-selected-image small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-selected-image small {
  color: var(--muted);
}

.chat-selected-image button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

@media (max-width: 640px) {
  .chat-send-form {
    grid-template-columns: 1fr;
  }

  .chat-message .chat-image-link {
    max-width: min(300px, 84vw);
  }
}


/* Phase 02 - iframe provider security hints */
.field-hint {
  display: block;
  margin-top: 0.35rem;
  color: rgba(226, 232, 240, 0.68);
  font-size: 0.85rem;
  line-height: 1.35;
}

/* Phase 03 - Chat moderation and safe reporting */
.chat-message-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.chat-report-form {
  margin: 0;
}

.chat-report-button {
  border: 0;
  background: transparent;
  color: rgba(148, 163, 184, 0.8);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0;
  transition: color 160ms ease, opacity 160ms ease;
}

.chat-report-button:hover,
.chat-report-button:focus-visible {
  color: #fca5a5;
  outline: none;
}

.chat-message.is-mine .chat-message-footer {
  justify-content: flex-end;
}

.moderation-actions .button-danger {
  white-space: nowrap;
}


/* Production branding pass - Boo mascot favicon, user brand and profile avatar in topbar */
.user-brand {
  gap: 12px;
  min-width: 0;
}

.user-brand-mascot {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 18px;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.2), transparent 28%),
    rgba(45, 212, 191, 0.1);
  box-shadow: 0 0 34px rgba(45, 212, 191, 0.18);
}

.user-brand-mascot img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.25));
}

.user-brand-wordmark {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  line-height: 0.92;
  letter-spacing: -0.055em;
  font-weight: 950;
}

.user-brand-word {
  display: block;
  font-size: clamp(1.08rem, 2vw, 1.34rem);
  white-space: nowrap;
}

.user-brand-word-primary {
  color: #ffffff;
}

.user-brand-word-accent {
  color: var(--accent);
}

.profile-avatar-nav-link {
  overflow: hidden;
  padding: 3px;
}

.profile-avatar-nav-link:hover .topbar-profile-avatar {
  transform: scale(1.04);
}

.topbar-profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  object-fit: cover;
  background: rgba(45, 212, 191, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease;
}

@media (max-width: 820px) {
  .user-brand-mascot {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .user-brand-mascot img {
    width: 46px;
    height: 46px;
  }

  .user-brand-word {
    font-size: 1rem;
  }
}

@media (max-width: 560px) {
  .user-brand-wordmark {
    display: none;
  }
}


/* Patch - Public Boo brand and safer sidebar scroll */
.public-brand {
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.public-brand-mascot {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 18px;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.2), transparent 28%),
    rgba(45, 212, 191, 0.1);
  box-shadow: 0 0 34px rgba(45, 212, 191, 0.18);
}

.public-brand-mascot img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.25));
}

.public-brand-wordmark {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  line-height: 0.92;
  letter-spacing: -0.055em;
  font-weight: 950;
}

.public-brand-word {
  display: block;
  font-size: clamp(1.08rem, 2vw, 1.34rem);
  white-space: nowrap;
}

.public-brand-word-primary {
  color: #ffffff;
}

.public-brand-word-accent {
  color: var(--accent);
}

@media (min-width: 981px) {
  .public-topbar {
    grid-template-columns: minmax(292px, 360px) minmax(280px, 680px) auto;
  }

  .public-topbar .topbar-left {
    min-width: 292px;
  }

  .public-sidebar {
    top: 86px;
    height: calc(100vh - 86px);
  }

  .public-sidebar-panel {
    position: relative;
    top: auto;
    height: calc(100vh - 86px);
    max-height: calc(100vh - 86px);
    box-sizing: border-box;
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }

  .public-sidebar-nav {
    padding-bottom: 52px;
  }
}

@media (max-width: 980px) {
  .public-sidebar-panel {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }

  .public-sidebar-nav {
    padding-bottom: 52px;
  }
}

@media (max-width: 820px) {
  .public-brand-mascot {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .public-brand-mascot img {
    width: 46px;
    height: 46px;
  }

  .public-brand-word {
    font-size: 1rem;
  }
}

@media (max-width: 560px) {
  .public-brand-wordmark {
    display: none;
  }

  .public-topbar .topbar-left {
    gap: 10px;
  }
}

/* Patch - Professional Premium membership screen */
.membership-page {
  --premium-gold: #fde68a;
  --premium-pink: #f9a8d4;
  --premium-purple: #a78bfa;
  --premium-blue: #7dd3fc;
  --premium-card: rgba(10, 16, 34, 0.78);
  --premium-card-strong: rgba(15, 23, 42, 0.92);
  display: grid;
  gap: 24px;
  padding-bottom: 36px;
}

.membership-alert {
  margin: 0;
}

.membership-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 28px;
  align-items: center;
  min-height: 520px;
  padding: clamp(28px, 4vw, 56px);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 34px;
  background:
    radial-gradient(circle at 10% 15%, rgba(45, 212, 191, 0.2), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(167, 139, 250, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(13, 20, 43, 0.98), rgba(5, 8, 18, 0.96));
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.42);
  overflow: hidden;
  isolation: isolate;
}

.membership-hero::before {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 26px;
  pointer-events: none;
}

.membership-hero-copy {
  display: grid;
  gap: 18px;
  max-width: 760px;
}

.membership-hero h1 {
  max-width: 11ch;
  font-size: clamp(3.15rem, 6.8vw, 6.15rem);
  line-height: 0.9;
  letter-spacing: -0.085em;
}

.membership-hero-lead {
  max-width: 68ch;
  margin: 0;
  color: rgba(191, 219, 254, 0.86);
  font-size: clamp(1rem, 1.35vw, 1.15rem);
}

.membership-status-pills,
.membership-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.membership-status-pills span,
.membership-status-medallion,
.membership-plan-current,
.membership-plan-ribbon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: rgba(191, 219, 254, 0.9);
  background: rgba(15, 23, 42, 0.62);
  font-size: 0.88rem;
  font-weight: 700;
}

.membership-status-pills .premium-state-pill.active,
.membership-status-medallion.is-premium {
  border-color: rgba(253, 230, 138, 0.38);
  color: #fff7ed;
  background: linear-gradient(135deg, rgba(253, 230, 138, 0.22), rgba(249, 168, 212, 0.14));
}

.membership-primary-action,
.membership-secondary-action,
.membership-portal-button,
.membership-buy-button {
  min-height: 48px;
  border-radius: 17px;
  border: 0;
  cursor: pointer;
  font-weight: 900;
}

.membership-primary-action,
.membership-buy-button {
  color: #031019;
  background: linear-gradient(135deg, #5eead4, #7dd3fc);
  box-shadow: 0 16px 36px rgba(45, 212, 191, 0.22);
}

.membership-secondary-action,
.membership-portal-button {
  color: rgba(248, 250, 252, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.055);
}

.membership-inline-form,
.membership-portal-form,
.membership-checkout-form {
  margin: 0;
}

.membership-hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 390px;
}

.membership-visual-glow {
  position: absolute;
  width: min(74%, 360px);
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(94, 234, 212, 0.3), rgba(125, 211, 252, 0.16) 45%, transparent 72%);
  filter: blur(4px);
}

.membership-boo {
  position: relative;
  z-index: 2;
  width: min(100%, 430px);
  max-height: 360px;
  object-fit: contain;
  filter: drop-shadow(0 26px 52px rgba(45, 212, 191, 0.2));
  animation: membershipBooFloat 4.2s ease-in-out infinite;
}

.membership-floating-card {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: rgba(248, 250, 252, 0.94);
  background: rgba(10, 16, 34, 0.7);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.28);
  font-size: 0.84rem;
}

.membership-floating-card span {
  color: var(--premium-gold);
}

.membership-floating-card-top {
  top: 18%;
  right: 4%;
}

.membership-floating-card-bottom {
  left: 4%;
  bottom: 18%;
}

.membership-current-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.membership-current-card,
.membership-benefits-panel,
.membership-plans-section,
.membership-trust-strip {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: var(--premium-card);
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.26);
}

.membership-current-card {
  padding: 28px;
}

.membership-card-header-row,
.membership-plans-heading,
.membership-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.membership-current-card h2,
.membership-section-heading h2,
.membership-plans-heading h2 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(1.65rem, 2.6vw, 2.55rem);
  letter-spacing: -0.055em;
}

.membership-current-card p,
.membership-section-heading p,
.membership-plans-heading p {
  margin-bottom: 0;
}

.membership-billing-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.membership-billing-list div {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.membership-billing-list dt {
  color: rgba(148, 163, 184, 0.88);
  font-weight: 700;
}

.membership-billing-list dd {
  margin: 0;
  color: #f8fafc;
  font-weight: 800;
}

.membership-portal-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.membership-muted-note,
.membership-portal-form small {
  display: block;
  color: rgba(191, 219, 254, 0.72);
  line-height: 1.5;
}

.membership-benefits-panel,
.membership-plans-section {
  display: grid;
  gap: 22px;
  padding: 28px;
}

.membership-benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.membership-benefits-grid article {
  min-height: 188px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 23px;
  background:
    radial-gradient(circle at 16% 0%, rgba(45, 212, 191, 0.11), transparent 36%),
    rgba(15, 23, 42, 0.56);
}

.membership-benefits-grid strong,
.membership-trust-strip strong {
  color: #f8fafc;
  font-size: 1rem;
}

.membership-benefits-grid article > span:last-child,
.membership-trust-strip span {
  color: rgba(191, 219, 254, 0.78);
  line-height: 1.55;
}

.membership-benefit-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #06101f;
  background: linear-gradient(135deg, #5eead4, #a78bfa);
  box-shadow: 0 12px 24px rgba(45, 212, 191, 0.16);
  font-weight: 950;
}

.membership-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.membership-plan-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(7, 12, 28, 0.94));
  box-shadow: 0 22px 54px rgba(2, 6, 23, 0.28);
  overflow: hidden;
}

.membership-plan-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 86% 4%, rgba(45, 212, 191, 0.16), transparent 30%);
}

.membership-plan-card.is-highlighted {
  border-color: rgba(94, 234, 212, 0.34);
  background:
    radial-gradient(circle at 88% 0%, rgba(45, 212, 191, 0.17), transparent 34%),
    linear-gradient(180deg, rgba(16, 30, 50, 0.95), rgba(8, 12, 28, 0.96));
}

.membership-plan-top,
.membership-price-row,
.membership-benefits-summary,
.membership-plan-features,
.membership-checkout-form,
.membership-plan-card .membership-muted-note {
  position: relative;
  z-index: 1;
}

.membership-plan-card h3 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  letter-spacing: -0.06em;
}

.membership-plan-card p {
  margin-bottom: 0;
}

.membership-plan-ribbon,
.membership-plan-current {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  min-height: 30px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.membership-plan-current {
  right: auto;
  left: 18px;
  color: #06101f;
  background: #5eead4;
}

.membership-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.membership-price-row strong {
  color: #f8fafc;
  font-size: clamp(2.35rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.membership-price-row span {
  color: rgba(191, 219, 254, 0.78);
  font-size: 1rem;
  font-weight: 800;
}

.membership-benefits-summary {
  padding: 13px 15px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 18px;
  color: rgba(209, 250, 229, 0.92);
  background: rgba(45, 212, 191, 0.08);
}

.membership-plan-features {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.membership-plan-features li {
  position: relative;
  padding-left: 30px;
  color: rgba(226, 232, 240, 0.86);
  line-height: 1.45;
}

.membership-plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #04111e;
  background: #5eead4;
  font-size: 0.78rem;
  font-weight: 950;
}

.membership-buy-button {
  width: 100%;
}

.membership-buy-button:disabled {
  cursor: not-allowed;
  opacity: 0.74;
  color: rgba(226, 232, 240, 0.8);
  background: rgba(148, 163, 184, 0.16);
  box-shadow: none;
}

.membership-trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.membership-trust-strip article {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.membership-empty-state {
  padding: 28px;
}

@keyframes membershipBooFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

@media (max-width: 1180px) {
  .membership-hero,
  .membership-current-grid {
    grid-template-columns: 1fr;
  }

  .membership-hero-visual {
    min-height: 320px;
  }

  .membership-hero h1 {
    max-width: 13ch;
  }
}

@media (max-width: 980px) {
  .membership-benefits-grid,
  .membership-trust-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .membership-plan-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .membership-page {
    gap: 18px;
  }

  .membership-hero,
  .membership-current-card,
  .membership-benefits-panel,
  .membership-plans-section {
    border-radius: 24px;
    padding: 22px;
  }

  .membership-hero h1 {
    font-size: clamp(2.45rem, 13vw, 4rem);
  }

  .membership-hero-visual {
    min-height: 250px;
  }

  .membership-boo {
    max-height: 250px;
  }

  .membership-floating-card {
    display: none;
  }

  .membership-card-header-row,
  .membership-plans-heading,
  .membership-section-heading {
    flex-direction: column;
  }

  .membership-benefits-grid,
  .membership-trust-strip {
    grid-template-columns: 1fr;
  }

  .membership-billing-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}


/* Patch fix - Boo thought showcase without PC rig.
   Scoped only to the home hero scene; does not modify public/user layouts. */
.home-mascot-gaming-preview .mascot-play-scene-thoughts {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 24px;
}

.home-mascot-gaming-preview .mascot-play-scene-thoughts .scene-grid-glow {
  opacity: 0.42;
}

.home-mascot-gaming-preview .mascot-play-scene-thoughts .mascot-render-image-thinking {
  position: absolute;
  z-index: 4;
  right: 58px;
  bottom: 8px;
  top: auto;
  width: min(62%, 360px);
  max-height: 310px;
  object-fit: contain;
  filter: drop-shadow(0 24px 50px rgba(45, 212, 191, 0.28));
  transform-origin: center bottom;
  animation: booGentleFloat 5.4s ease-in-out infinite;
}

.home-mascot-gaming-preview .mascot-play-scene-thoughts .mascot-thought-cluster {
  position: absolute;
  z-index: 7;
  top: 42px;
  left: 40px;
  right: auto;
  width: min(54%, 360px);
  pointer-events: none;
}

.home-mascot-gaming-preview .mascot-play-scene-thoughts .mascot-thought-bubble {
  position: relative;
  min-height: 138px;
  padding: 26px 28px;
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 18%, rgba(94, 234, 212, 0.20), transparent 28%),
    radial-gradient(circle at 86% 20%, rgba(192, 132, 252, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.94));
  box-shadow:
    0 26px 52px rgba(2, 6, 23, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  overflow: visible;
}

.home-mascot-gaming-preview .mascot-play-scene-thoughts .mascot-thought-bubble::after {
  content: "";
  position: absolute;
  right: 54px;
  bottom: -16px;
  width: 30px;
  height: 30px;
  border-right: 1px solid rgba(125, 211, 252, 0.28);
  border-bottom: 1px solid rgba(125, 211, 252, 0.28);
  background: rgba(239, 246, 255, 0.96);
  transform: rotate(40deg);
}

.home-mascot-gaming-preview .mascot-play-scene-thoughts .thought-orb {
  position: absolute;
  z-index: 8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(125, 211, 252, 0.26);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.24);
  animation: thoughtOrbFloat 4.2s ease-in-out infinite;
}

.home-mascot-gaming-preview .mascot-play-scene-thoughts .orb-one {
  right: 58px;
  bottom: -38px;
  width: 18px;
  height: 18px;
}

.home-mascot-gaming-preview .mascot-play-scene-thoughts .orb-two {
  right: 82px;
  bottom: -12px;
  width: 13px;
  height: 13px;
  animation-delay: 0.35s;
}

.home-mascot-gaming-preview .mascot-play-scene-thoughts .orb-three {
  right: 106px;
  bottom: 10px;
  width: 9px;
  height: 9px;
  animation-delay: 0.7s;
}

.home-mascot-gaming-preview .mascot-play-scene-thoughts .mascot-thought-message {
  position: absolute;
  inset: 22px 26px;
  display: grid;
  place-items: center;
  color: #0f172a;
  text-align: center;
  font-size: clamp(0.92rem, 1.2vw, 1.08rem);
  font-weight: 900;
  line-height: 1.36;
  letter-spacing: -0.015em;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  animation: mascotThoughtCycle 12s ease-in-out infinite;
}

.home-mascot-gaming-preview .mascot-play-scene-thoughts .mascot-thought-message.message-two {
  animation-delay: 4s;
}

.home-mascot-gaming-preview .mascot-play-scene-thoughts .mascot-thought-message.message-three {
  animation-delay: 8s;
}

@keyframes booGentleFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-14px) rotate(1.2deg); }
}

@keyframes thoughtOrbFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes mascotThoughtCycle {
  0%, 8% { opacity: 0; transform: translateY(10px) scale(0.98); }
  12%, 29% { opacity: 1; transform: translateY(0) scale(1); }
  34%, 100% { opacity: 0; transform: translateY(-6px) scale(1.01); }
}

@media (max-width: 1160px) {
  .home-mascot-gaming-preview .mascot-play-scene-thoughts .mascot-render-image-thinking {
    right: 30px;
    width: min(58%, 320px);
  }

  .home-mascot-gaming-preview .mascot-play-scene-thoughts .mascot-thought-cluster {
    top: 34px;
    left: 28px;
    width: min(58%, 330px);
  }
}

@media (max-width: 760px) {
  .home-mascot-gaming-preview .mascot-play-scene-thoughts {
    min-height: 350px;
    padding: 18px;
  }

  .home-mascot-gaming-preview .mascot-play-scene-thoughts .mascot-render-image-thinking {
    right: 50%;
    bottom: 0;
    width: min(92%, 270px);
    transform: translateX(50%);
    animation: booGentleFloatMobile 5.4s ease-in-out infinite;
  }

  .home-mascot-gaming-preview .mascot-play-scene-thoughts .mascot-thought-cluster {
    top: 18px;
    left: 50%;
    width: min(calc(100% - 28px), 330px);
    transform: translateX(-50%);
  }

  .home-mascot-gaming-preview .mascot-play-scene-thoughts .mascot-thought-bubble {
    min-height: 118px;
    padding: 22px 20px;
    border-radius: 24px;
  }

  .home-mascot-gaming-preview .mascot-play-scene-thoughts .mascot-thought-message {
    inset: 18px 20px;
    font-size: 0.9rem;
  }
}

@keyframes booGentleFloatMobile {
  0%, 100% { transform: translateX(50%) translateY(0) rotate(-1deg); }
  50% { transform: translateX(50%) translateY(-12px) rotate(1.2deg); }
}


/* Patch - Admin/SuperAdmin compact rail + stable topbar
   Scope is intentionally limited to _AdminLayout classes. */
.admin-body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 0% 0%, rgba(45, 212, 191, 0.14), transparent 34%),
    radial-gradient(circle at 96% 0%, rgba(192, 132, 252, 0.08), transparent 30%),
    var(--bg);
}

.admin-shell-v3 {
  display: grid !important;
  grid-template-columns: 88px minmax(0, 1fr) !important;
  min-height: 100vh;
  width: 100%;
}

.admin-sidebar-v3 {
  position: sticky !important;
  top: 0;
  z-index: 45;
  width: 88px !important;
  height: 100dvh;
  padding: 22px 0 14px !important;
  overflow: hidden;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  background:
    radial-gradient(circle at 38px 76px, rgba(45, 212, 191, 0.16), transparent 80px),
    rgba(5, 8, 18, 0.96) !important;
  box-shadow: 16px 0 38px rgba(2, 6, 23, 0.22);
  transition: width 190ms ease, box-shadow 190ms ease;
}

.admin-sidebar-v3:hover,
.admin-sidebar-v3:focus-within,
.admin-shell-v3.is-admin-sidebar-open .admin-sidebar-v3 {
  width: 292px !important;
  box-shadow: 24px 0 70px rgba(2, 6, 23, 0.5);
}

.admin-sidebar-brand-v3 {
  display: flex !important;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  margin: 0 16px 18px !important;
  padding: 0 !important;
  overflow: hidden;
  white-space: nowrap;
}

.admin-brand-mark {
  flex: 0 0 58px;
  width: 58px !important;
  height: 58px !important;
  border-radius: 20px !important;
  font-size: 1.1rem;
  font-weight: 900;
}

.admin-brand-copy {
  display: grid;
  line-height: 1;
  min-width: 0;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.admin-brand-copy strong,
.admin-brand-copy span {
  display: block;
  color: #f8fafc;
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.admin-brand-copy span {
  margin-top: 3px;
  color: var(--accent);
}

.admin-sidebar-v3:hover .admin-brand-copy,
.admin-sidebar-v3:focus-within .admin-brand-copy,
.admin-shell-v3.is-admin-sidebar-open .admin-brand-copy {
  opacity: 1;
  transform: translateX(0);
}

.admin-nav-v3 {
  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  gap: 10px !important;
  height: calc(100dvh - 112px);
  max-height: calc(100dvh - 112px);
  margin: 0 !important;
  padding: 8px 16px 72px !important;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(45, 212, 191, 0.72) rgba(15, 23, 42, 0.72);
}

.admin-nav-v3::-webkit-scrollbar {
  width: 8px;
}

.admin-nav-v3::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
}

.admin-nav-v3::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.85), rgba(125, 211, 252, 0.55));
  border-radius: 999px;
}

.admin-nav-v3 .admin-nav-section {
  margin: 20px 0 8px !important;
  padding: 0 10px;
  color: rgba(226, 232, 240, 0.62);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 160ms ease, max-height 160ms ease;
}

.admin-sidebar-v3:hover .admin-nav-section,
.admin-sidebar-v3:focus-within .admin-nav-section,
.admin-shell-v3.is-admin-sidebar-open .admin-nav-section {
  opacity: 1;
  max-height: 34px;
}

.admin-nav-v3 a {
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  width: 56px;
  min-height: 62px;
  padding: 4px 0 !important;
  border: 1px solid rgba(148, 163, 184, 0.10);
  border-radius: 20px !important;
  color: rgba(226, 232, 240, 0.72);
  background: rgba(15, 23, 42, 0.58) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  overflow: hidden;
  white-space: nowrap;
  transition: width 180ms ease, color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.admin-sidebar-v3:hover .admin-nav-v3 a,
.admin-sidebar-v3:focus-within .admin-nav-v3 a,
.admin-shell-v3.is-admin-sidebar-open .admin-nav-v3 a {
  width: 244px;
  padding-right: 16px !important;
}

.admin-nav-v3 a:hover,
.admin-nav-v3 a:focus-visible {
  color: var(--text);
  border-color: rgba(45, 212, 191, 0.35);
  background:
    radial-gradient(circle at 28px 50%, rgba(45, 212, 191, 0.16), transparent 34px),
    rgba(16, 23, 42, 0.88) !important;
  transform: translateX(2px);
}

.admin-nav-v3 .nav-icon {
  display: grid;
  place-items: center;
  width: 54px;
  min-width: 54px;
  font-size: 1.06rem;
  line-height: 1;
  color: var(--accent);
}

.admin-nav-v3 .sidebar-label:not(.admin-nav-section) {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  font-size: 1rem;
  font-weight: 800;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.admin-sidebar-v3:hover .admin-nav-v3 .sidebar-label:not(.admin-nav-section),
.admin-sidebar-v3:focus-within .admin-nav-v3 .sidebar-label:not(.admin-nav-section),
.admin-shell-v3.is-admin-sidebar-open .admin-nav-v3 .sidebar-label:not(.admin-nav-section) {
  opacity: 1;
  transform: translateX(0);
}

.admin-main-v3 {
  min-width: 0;
  width: 100%;
}

.admin-topbar-v3 {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  padding: 14px 24px 14px 30px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background:
    radial-gradient(circle at 0% 50%, rgba(45, 212, 191, 0.10), transparent 28%),
    rgba(5, 8, 18, 0.88);
  backdrop-filter: blur(18px);
}

.admin-topbar-title-v3 {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-topbar-title-v3 span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.admin-topbar-title-v3 strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(1.08rem, 2vw, 1.5rem);
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-topbar-actions-v3 {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  margin-left: auto;
  color: rgba(226, 232, 240, 0.76);
}

.admin-topbar-link,
.admin-current-user-v3,
.admin-logout-button {
  min-height: 46px;
  border-radius: 18px !important;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  background: rgba(15, 23, 42, 0.64) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.admin-topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: rgba(226, 232, 240, 0.8);
  font-weight: 800;
}

.admin-topbar-link:hover,
.admin-topbar-link:focus-visible {
  color: var(--accent);
  border-color: rgba(45, 212, 191, 0.34) !important;
}

.admin-current-user-v3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(30vw, 340px);
  padding: 0 14px 0 8px;
  color: rgba(226, 232, 240, 0.82);
  font-weight: 800;
  overflow: hidden;
}

.admin-current-user-v3 > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-dot {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  color: #04111e;
  background: linear-gradient(135deg, var(--accent), #7dd3fc);
  font-size: 0.9rem;
  font-weight: 950;
}

.admin-logout-form {
  flex: 0 0 auto;
}

.admin-logout-button {
  padding: 0 18px !important;
  color: var(--text) !important;
  cursor: pointer;
}

.admin-logout-button:hover,
.admin-logout-button:focus-visible {
  border-color: rgba(248, 113, 113, 0.34) !important;
  color: #fecaca !important;
}

.admin-content-v3 {
  min-width: 0;
  padding: 32px clamp(18px, 3vw, 42px) 54px !important;
}

.admin-mobile-menu-button {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 80;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.36);
  cursor: pointer;
}

@media (max-width: 1160px) {
  .admin-topbar-v3 {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-topbar-actions-v3 {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .admin-current-user-v3 {
    max-width: 360px;
  }
}

@media (max-width: 980px) {
  .admin-mobile-menu-button {
    display: grid;
    place-items: center;
  }

  .admin-shell-v3 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .admin-sidebar-v3 {
    position: fixed !important;
    inset: 0 auto 0 0;
    width: 292px !important;
    max-width: min(86vw, 292px);
    transform: translateX(-105%);
    transition: transform 190ms ease, box-shadow 190ms ease;
  }

  .admin-shell-v3.is-admin-sidebar-open .admin-sidebar-v3 {
    transform: translateX(0);
  }

  .admin-sidebar-v3 .admin-brand-copy,
  .admin-sidebar-v3 .admin-nav-section,
  .admin-sidebar-v3 .admin-nav-v3 .sidebar-label:not(.admin-nav-section) {
    opacity: 1;
    transform: none;
    max-height: none;
  }

  .admin-sidebar-v3 .admin-nav-v3 a {
    width: 244px;
    padding-right: 16px !important;
  }

  .admin-topbar-v3 {
    padding-left: 78px;
  }

  .admin-content-v3 {
    padding-inline: 16px !important;
  }
}

@media (max-width: 680px) {
  .admin-topbar-link strong {
    display: none;
  }

  .admin-topbar-link {
    width: 46px;
    justify-content: center;
    padding-inline: 0;
  }

  .admin-current-user-v3 {
    max-width: 220px;
  }
}

/* Production legal/cookie readiness */
.cookie-consent {
  max-width: 1180px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) auto;
}

.cookie-consent-copy strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 1rem;
}

.cookie-inline-link {
  margin-top: 8px;
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.cookie-preferences {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.cookie-preferences[hidden] {
  display: none;
}

.cookie-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.cookie-option input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--accent);
}

.cookie-option strong {
  display: block;
  color: var(--text);
}

.cookie-option small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.cookie-option.is-required {
  opacity: 0.86;
}

.legal-page-rich {
  font-size: 1rem;
}

.legal-updated {
  margin-top: -6px;
  color: rgba(148, 163, 184, 0.82);
  font-size: 0.95rem;
}

.legal-callout {
  margin: 22px 0;
  padding: 18px 20px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 22px;
  color: rgba(226, 232, 240, 0.88);
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.12), rgba(124, 58, 237, 0.08));
}

.legal-page a {
  color: var(--accent);
  font-weight: 800;
}

.legal-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.65;
}

.legal-list strong {
  color: rgba(248, 250, 252, 0.96);
}

.legal-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 14px;
}

.legal-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  color: var(--muted);
  overflow: hidden;
  border-radius: 18px;
}

.legal-table th,
.legal-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  color: var(--text);
  background: rgba(45, 212, 191, 0.09);
}

.legal-table tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 760px) {
  .cookie-consent {
    grid-template-columns: 1fr;
  }

  .cookie-consent-actions {
    align-items: stretch;
  }

  .cookie-consent-actions a,
  .cookie-consent-actions button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .cookie-preferences {
    grid-template-columns: 1fr;
  }
}


.safe-ad-rendered,
.amedagames-adsense-unit {
  display: block;
  width: 100%;
  max-width: 100%;
}

.safe-ad-rendered {
  min-width: 0;
  overflow: hidden;
}

.safe-ad-slot[data-ad-mode="configured"] .safe-ad-rendered {
  min-height: 58px;
}

.safe-ad-slot[data-ad-mode="configured"] .safe-ad-label {
  z-index: 2;
}

/* Phase PreviewHoverVideo - hover video previews for public game cards */
.game-card.has-preview-video .game-thumb {
  overflow: hidden;
  isolation: isolate;
}

.game-preview-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity 180ms ease, transform 420ms ease;
  pointer-events: none;
  background: #080d1d;
}

.game-card.is-preview-playing .game-preview-video {
  opacity: 1;
  transform: scale(1);
}

.game-card.has-preview-video .game-thumb::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  height: 46%;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(3, 7, 18, 0.82));
  transition: opacity 180ms ease;
}

.game-card.is-preview-playing .game-thumb::after {
  opacity: 1;
}

.game-card.has-preview-video .game-thumb img,
.game-card.has-preview-video .game-thumb > span:not(.game-play-overlay):not(.game-preview-chip) {
  position: relative;
  z-index: 0;
}

.game-card .game-badge,
.game-card .game-device-badge,
.game-card .game-play-overlay,
.game-card .game-preview-chip {
  z-index: 3;
}

.game-thumb .game-preview-chip {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  color: rgba(226, 232, 240, 0.92);
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(10px);
  font-size: 0.68rem !important;
  font-weight: 900;
  letter-spacing: 0.08em !important;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0.88;
}

.game-card.is-preview-playing .game-preview-chip {
  color: #06111f;
  background: rgba(94, 234, 212, 0.92);
}

.game-card.is-preview-unavailable .game-preview-chip {
  display: none;
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .game-preview-video,
  .game-preview-chip {
    display: none;
  }
}

/* Phase GameplayShellRecovery - keep hover previews without regressing fullscreen gameplay */
html,
body {
  overflow-x: hidden;
}

.play-stage.is-game-mode,
.play-stage.is-mobile-expanded,
.play-stage:fullscreen {
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  align-content: stretch !important;
  justify-content: stretch !important;
  min-width: 0 !important;
  min-height: 0 !important;
  width: 100vw !important;
  width: var(--ag-viewport-width, 100vw) !important;
  height: 100vh !important;
  height: var(--ag-viewport-height, 100dvh) !important;
  max-width: none !important;
  max-height: none !important;
  overflow: hidden !important;
}

.play-stage.is-game-mode .mobile-game-toolbar,
.play-stage.is-mobile-expanded .mobile-game-toolbar,
.play-stage:fullscreen .mobile-game-toolbar {
  grid-row: 1;
  min-height: 0;
}

.play-stage.is-game-mode .mobile-game-warning,
.play-stage.is-mobile-expanded .mobile-game-warning,
.play-stage:fullscreen .mobile-game-warning {
  grid-row: 2;
  min-height: 0;
}

.play-stage.is-game-mode .mobile-game-warning[hidden],
.play-stage.is-mobile-expanded .mobile-game-warning[hidden],
.play-stage:fullscreen .mobile-game-warning[hidden] {
  display: none !important;
}

.play-stage.is-game-mode .game-frame-wrap,
.play-stage.is-mobile-expanded .game-frame-wrap,
.play-stage:fullscreen .game-frame-wrap {
  grid-row: 3;
  position: relative !important;
  display: block !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
  background: #000 !important;
}

.play-stage.is-game-mode .game-frame-wrap > iframe,
.play-stage.is-mobile-expanded .game-frame-wrap > iframe,
.play-stage:fullscreen .game-frame-wrap > iframe {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  border: 0 !important;
  background: #000 !important;
}

@supports (height: 100dvh) {
  .play-stage.is-game-mode,
  .play-stage.is-mobile-expanded,
  .play-stage:fullscreen {
    height: 100dvh !important;
    height: var(--ag-viewport-height, 100dvh) !important;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .play-stage.is-game-mode,
  .play-stage.is-mobile-expanded,
  .play-stage:fullscreen {
    grid-template-rows: auto minmax(0, 1fr) !important;
  }

  .play-stage.is-game-mode .mobile-game-warning,
  .play-stage.is-mobile-expanded .mobile-game-warning,
  .play-stage:fullscreen .mobile-game-warning {
    display: none !important;
  }

  .play-stage.is-game-mode .game-frame-wrap,
  .play-stage.is-mobile-expanded .game-frame-wrap,
  .play-stage:fullscreen .game-frame-wrap {
    grid-row: 2;
  }
}


/* Phase 21B - Player profile UI correction and public profile layout
   Scope: player/profile pages only. Does not modify game cards, previews, ads or gameplay shell. */
.player-profile-page,
.public-player-profile-page,
.avatar-settings-page {
  display: grid;
  gap: 22px;
}

.player-profile-card,
.public-player-profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 30px;
  overflow: hidden;
}

.player-avatar-stage {
  position: relative;
  width: fit-content;
}

.player-avatar-shell-large {
  width: 132px;
  height: 132px;
  border-radius: 36px;
}

.avatar-edit-button {
  position: absolute;
  right: -8px;
  bottom: -8px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(45, 212, 191, 0.34);
  border-radius: 14px;
  color: #04111e;
  background: linear-gradient(135deg, #5eead4, #7dd3fc);
  box-shadow: 0 12px 28px rgba(45, 212, 191, 0.24);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  z-index: 3;
}

.avatar-edit-button:hover {
  transform: translateY(-1px);
}

.avatar-file-trigger {
  margin: 0;
}

.player-profile-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.player-profile-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.player-profile-heading h1 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(2.3rem, 5.2vw, 5rem);
  letter-spacing: -0.07em;
  line-height: 0.92;
  overflow-wrap: anywhere;
}

.player-identity-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.player-profile-bio {
  max-width: 980px;
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.65;
}

.player-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.player-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, 0.9fr);
  gap: 22px;
  align-items: stretch;
}

.player-content-grid-bottom {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
}

.compact-profile-card {
  padding: 26px;
  overflow: hidden;
}

.compact-title-row {
  align-items: flex-start;
  gap: 14px;
}

.compact-title-row h2,
.compact-title-row p,
.profile-summary-card h2,
.profile-summary-card p {
  margin: 0;
}

.compact-player-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.player-stats-grid {
  display: grid;
}

.player-stat-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.player-stat-card strong {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 950;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.player-stat-card span {
  color: var(--muted);
  font-weight: 700;
}

.hero-level-card strong {
  color: #5eead4;
}

.membership-status-cluster,
.profile-chip-list,
.summary-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-chip-list span,
.summary-chip-list span {
  display: inline-flex;
  align-items: center;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 40px !important;
  aspect-ratio: auto !important;
  padding: 9px 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.15;
}

.profile-summary-card {
  display: grid;
  gap: 18px;
  align-content: start;
}

.profile-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-fact {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.028);
}

.profile-fact span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.profile-fact strong {
  min-width: 0;
  color: var(--text);
  font-size: clamp(0.98rem, 1.6vw, 1.1rem);
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: normal;
}

.avatar-settings-grid {
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
}

.compact-upload-form,
.compact-cosmetic-form {
  max-width: none;
}

.compact-cosmetic-form {
  display: grid;
  gap: 18px;
}

.compact-cosmetic-form label {
  display: grid;
  gap: 8px;
}

.player-link {
  color: inherit;
  text-decoration: none;
}

.player-link:hover {
  color: var(--accent);
}

.player-link.subtle {
  color: var(--muted);
}

.player-link.subtle:hover {
  color: var(--accent);
}

.public-player-profile-page {
  width: min(1380px, calc(100% - 32px));
}

.public-player-profile-page .profile-summary-card,
.player-profile-page .profile-summary-card {
  min-width: 0;
}

.public-player-profile-page .player-content-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(380px, 0.75fr);
}

@media (max-width: 1180px) {
  .player-content-grid,
  .player-content-grid-bottom,
  .avatar-settings-grid,
  .public-player-profile-page .player-content-grid {
    grid-template-columns: 1fr;
  }

  .compact-player-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .player-profile-card,
  .public-player-profile-card {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .player-avatar-shell-large {
    width: 110px;
    height: 110px;
    border-radius: 30px;
  }

  .player-profile-heading h1 {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .player-profile-actions,
  .membership-status-cluster,
  .profile-chip-list,
  .summary-chip-list {
    width: 100%;
  }

  .profile-facts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .player-profile-page,
  .public-player-profile-page,
  .avatar-settings-page {
    gap: 18px;
  }

  .player-profile-card,
  .public-player-profile-card,
  .compact-profile-card {
    padding: 20px;
  }

  .compact-player-stats {
    grid-template-columns: 1fr;
  }

  .player-stat-card {
    padding: 14px 16px;
  }

  .avatar-edit-button {
    right: -6px;
    bottom: -6px;
    width: 38px;
    height: 38px;
  }
}

.admin-filter-panel {
  margin: 18px 0 20px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.38);
}

.admin-filter-panel .form-grid {
  display: grid;
  gap: 16px;
}

.admin-filter-panel .two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted-text, #94a3b8);
  font-weight: 800;
}

.admin-filter-panel input,
.admin-filter-panel select {
  width: 100%;
}

.muted-text {
  color: var(--muted-text, #94a3b8);
}

.catalog-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.pagination-link,
.pagination-ellipsis {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-color, #f8fafc);
  font-weight: 900;
  text-decoration: none;
}

.pagination-link.is-active {
  border-color: rgba(45, 212, 191, 0.75);
  color: #2dd4bf;
  background: rgba(20, 184, 166, 0.14);
}

.pagination-link.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.pagination-ellipsis {
  min-width: 28px;
  border-color: transparent;
  background: transparent;
  color: var(--muted-text, #94a3b8);
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 22px;
  color: var(--muted-text, #94a3b8);
}

.empty-state strong {
  color: var(--text-color, #f8fafc);
}

@media (max-width: 760px) {
  .admin-filter-panel .two-columns {
    grid-template-columns: 1fr;
  }
}
