:root {
  --ui-bg: #080b0a;
  --ui-surface: #101513;
  --ui-surface-raised: #151b18;
  --ui-surface-soft: #0c100f;
  --ui-border: rgba(173, 190, 179, 0.14);
  --ui-border-strong: rgba(173, 190, 179, 0.22);
  --ui-text: #f3f0e7;
  --ui-text-soft: #a2aaa4;
  --ui-gold: #d6b76a;
  --ui-gold-hover: #e2c77d;
  --ui-green: #55d693;
  --ui-radius-sm: 10px;
  --ui-radius: 14px;
  --ui-radius-lg: 16px;
}

html,
body,
#root,
.app-shell {
  color: var(--ui-text);
  background: var(--ui-bg);
}

.app-shell {
  background-image: radial-gradient(circle at 50% -10%, rgba(81, 112, 94, 0.12), transparent 34rem);
}

.site-cover-backdrop {
  background: var(--ui-bg);
}

.site-cover-backdrop::before {
  background:
    linear-gradient(90deg, rgba(8, 11, 10, 0.98), rgba(8, 11, 10, 0.83) 22%, rgba(8, 11, 10, 0.83) 78%, rgba(8, 11, 10, 0.98)),
    linear-gradient(180deg, rgba(8, 11, 10, 0.82), rgba(8, 11, 10, 0.66) 32%, rgba(8, 11, 10, 0.94) 76%, var(--ui-bg));
}

.site-cover-backdrop::after {
  background: radial-gradient(circle at 50% 16%, rgba(214, 183, 106, 0.08), transparent 30rem);
  mix-blend-mode: normal;
}

.site-cover-tile {
  border-color: rgba(255, 255, 255, 0.06);
  opacity: 0.24;
  box-shadow: none;
}

.site-cover-tile img {
  filter: saturate(0.82) contrast(1.02) brightness(0.58);
}

.topbar {
  min-height: 64px;
  padding: 0 28px;
  border-bottom-color: rgba(173, 190, 179, 0.1);
  background: rgba(8, 11, 10, 0.9);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(20px);
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-color: rgba(214, 183, 106, 0.28);
  border-radius: 12px;
  background: #0d1210;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.brand-mark::before {
  border-color: rgba(214, 183, 106, 0.14);
}

.luxury-game-logo {
  width: 34px;
  height: 34px;
}

.brand-lockup {
  gap: 12px;
}

.brand-lockup strong {
  color: #ead99f;
  font-size: 19px;
  font-weight: 850;
  text-shadow: none;
}

.brand-lockup span {
  margin-top: 5px;
  color: #aa9d79;
  border-color: rgba(214, 183, 106, 0.15);
  background: rgba(214, 183, 106, 0.04);
}

.top-actions button,
.free-top-status,
.ghost-action,
.back-button,
.hero-login-button {
  min-height: 40px;
  border-color: var(--ui-border);
  border-radius: var(--ui-radius-sm);
  background: rgba(16, 21, 19, 0.86);
  box-shadow: none;
}

.top-actions button:hover,
.ghost-action:hover,
.back-button:hover,
.hero-login-button:hover {
  border-color: var(--ui-border-strong);
  background: var(--ui-surface-raised);
}

.top-share-button {
  color: #d8c994 !important;
  border-color: var(--ui-border) !important;
  background: rgba(16, 21, 19, 0.86) !important;
}

.free-top-status {
  color: #dce8e0;
}

.page-shell {
  padding: 20px 32px 72px;
}

.library-page {
  max-width: 1540px;
}

.search-hero {
  gap: 10px;
  max-width: 900px;
  margin-bottom: 24px;
  padding: 22px 22px 20px;
}

.search-hero::after {
  display: none;
}

.hero-kicker {
  color: #b9aa82;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.search-hero h1 {
  color: var(--ui-text);
  font-size: clamp(42px, 4vw, 50px);
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 14px 38px rgba(0, 0, 0, 0.35);
}

.search-hero h1 span {
  padding-bottom: 4px;
}

.search-hero h1 span::before,
.search-hero h1 span::after {
  display: none;
}

.hero-title-block p {
  color: var(--ui-text-soft);
  font-size: 13px;
}

.hero-command-panel {
  width: min(100%, 720px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.search-command {
  min-height: 58px;
  padding: 6px 7px 6px 18px;
  border-color: rgba(173, 190, 179, 0.2);
  border-radius: var(--ui-radius);
  background: rgba(16, 21, 19, 0.95);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24), inset 0 1px rgba(255, 255, 255, 0.035);
}

.search-command:focus-within {
  border-color: rgba(214, 183, 106, 0.56);
  box-shadow: 0 0 0 3px rgba(214, 183, 106, 0.1), 0 16px 42px rgba(0, 0, 0, 0.24);
}

.search-command input::placeholder {
  color: #7f8982;
}

.primary-action,
.search-command button,
.detail-resource-list .entry-row > button,
.detail-resource-list .entry-row > .entry-download-link {
  color: #15150f;
  border-color: rgba(255, 240, 193, 0.34);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-gold);
  box-shadow: 0 10px 24px rgba(136, 101, 31, 0.18);
}

.primary-action:hover,
.search-command button:hover,
.detail-resource-list .entry-row > button:hover,
.detail-resource-list .entry-row > .entry-download-link:hover {
  color: #11120e;
  background: var(--ui-gold-hover);
}

.taxonomy-explorer {
  gap: 12px;
  padding: 14px 16px;
  border-color: var(--ui-border);
  border-radius: var(--ui-radius);
  background: rgba(16, 21, 19, 0.9);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(16px);
}

.taxonomy-tabs {
  border-color: var(--ui-border);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-surface-soft);
}

.taxonomy-tabs button {
  min-height: 34px;
  color: var(--ui-text-soft);
}

.taxonomy-tabs button.active {
  color: #16150f;
  background: var(--ui-gold);
}

.taxonomy-chip-list > button,
.taxonomy-expand-button {
  min-height: 34px;
  color: #aeb5b0;
  border-color: var(--ui-border);
  background: rgba(255, 255, 255, 0.025);
}

.taxonomy-chip-list > button:hover,
.taxonomy-chip-list > button:focus-visible,
.taxonomy-chip-list > button.active,
.taxonomy-expand-button:hover,
.taxonomy-expand-button:focus-visible {
  color: #f1dfaa;
  border-color: rgba(214, 183, 106, 0.42);
  background: rgba(214, 183, 106, 0.08);
}

.discovery-layout {
  gap: 20px;
}

.game-grid,
.result-grid-column .game-grid {
  gap: 16px;
}

.game-card {
  border-color: var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--ui-surface);
  box-shadow: none;
}

.game-card:hover,
.game-card:focus-within {
  border-color: rgba(214, 183, 106, 0.34);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  transform: translateY(-2px);
}

.game-card .cover-image,
.game-card .cover-fallback {
  transition: transform 240ms ease, filter 240ms ease;
}

.game-card:hover .cover-image,
.game-card:focus-within .cover-image {
  filter: saturate(1.04) contrast(1.02);
  transform: scale(1.015);
}

.game-card-body {
  gap: 7px;
  padding: 14px 14px 15px;
  border-top-color: rgba(255, 255, 255, 0.055);
  background: var(--ui-surface);
}

.card-title-row h2 {
  color: var(--ui-text);
  font-size: 14px;
  font-weight: 750;
}

.game-card-body p {
  color: #8f9892;
}

.card-title-row svg {
  color: #b3a67f;
}

.game-surprise-card,
.ranking-panel {
  border-color: var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--ui-surface);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.game-surprise-card {
  min-height: 154px;
  background: linear-gradient(145deg, rgba(214, 183, 106, 0.07), transparent 54%), var(--ui-surface-raised);
}

.game-surprise-card::after {
  opacity: 0.45;
}

.ranking-panel {
  position: sticky !important;
  top: 82px !important;
}

.ranking-heading {
  border-bottom-color: rgba(255, 255, 255, 0.055);
}

.ranking-list li + li {
  border-top-color: rgba(255, 255, 255, 0.05);
}

.ranking-number {
  color: var(--ui-gold);
}

.detail-page {
  max-width: 1280px;
}

.detail-breadcrumb,
.taxonomy-breadcrumb {
  color: #737d77;
}

.detail-hero {
  min-height: 284px;
  margin-bottom: 20px;
  border-color: var(--ui-border);
  border-radius: var(--ui-radius-lg);
  background: var(--ui-surface);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.26);
}

.detail-backdrop {
  filter: saturate(0.82) contrast(1.04) brightness(0.78);
}

.detail-hero-content {
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 28px;
  padding: 30px;
}

.detail-hero .cover-image,
.detail-hero .cover-fallback {
  border-color: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.36);
}

.detail-title-block h1 {
  color: var(--ui-text);
  letter-spacing: -0.035em;
}

.detail-title-block p {
  color: #a6afa9;
}

.detail-tags > span,
.detail-tags > button {
  color: #bab6a7;
  border-color: var(--ui-border);
  background: rgba(255, 255, 255, 0.025);
}

.detail-layout {
  grid-template-columns: minmax(0, 1.38fr) minmax(370px, 0.72fr);
  gap: 22px;
}

.detail-primary-column,
.detail-side-stack,
.detail-summary-stack,
.detail-action-stack,
.detail-longform-stack,
.detail-side-media-stack {
  gap: 18px;
}

.detail-primary-column,
.detail-side-stack {
  align-self: start;
  align-content: start;
}

.detail-side-stack {
  align-content: start;
}

.detail-action-stack {
  order: 1;
  position: static;
  top: auto;
  z-index: auto;
}

.detail-side-media-stack {
  order: 2;
}

@media (min-width: 1101px) {
  .detail-side-stack {
    align-self: stretch;
  }

  .detail-action-stack {
    position: sticky;
    top: 84px;
    align-self: start;
    z-index: 2;
  }

  .detail-primary-column > .detail-side-media-stack {
    width: 100%;
    order: 4;
  }

  .detail-desktop-utility-row {
    display: grid;
    order: 2;
    gap: 14px;
  }

  .detail-desktop-utility-row .detail-help-callout,
  .detail-desktop-utility-row .game-share-card {
    width: 100%;
    margin: 0;
  }

  .detail-desktop-utility-row .game-share-card {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
  }

  .detail-desktop-utility-row .game-share-actions {
    align-self: center;
  }
}

.detail-section,
.entry-list,
.detail-resource-list {
  border-color: var(--ui-border);
  border-radius: var(--ui-radius);
  background: rgba(16, 21, 19, 0.94);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.detail-section {
  padding: 20px;
}

.detail-section h3,
.entry-heading h3 {
  color: var(--ui-text);
}

.detail-section p,
.article-content-blocks {
  color: #b4bbb6;
  line-height: 1.82;
}

.detail-resource-list {
  gap: 16px;
  padding: 18px;
  border-color: rgba(214, 183, 106, 0.3);
  background: linear-gradient(180deg, rgba(214, 183, 106, 0.035), transparent 28%), var(--ui-surface);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.detail-resource-list > .entry-heading {
  order: 1;
}

.detail-resource-list > .detail-help-callout {
  order: 2;
}

.detail-resource-list > .detail-resource-grid {
  order: 3;
}

.detail-resource-list > .game-share-card {
  order: 4;
}

.game-share-card {
  padding: 15px;
  border-color: var(--ui-border);
  border-radius: 12px;
  background: var(--ui-surface-raised);
  box-shadow: none;
}

.game-share-card::after {
  display: none;
}

.game-share-kicker {
  color: #bca866;
}

.game-share-copy strong {
  color: var(--ui-text);
}

.game-share-copy p {
  color: var(--ui-text-soft);
}

.game-share-primary {
  min-height: 42px;
  color: #15150f;
  border: 0;
  border-radius: var(--ui-radius-sm);
  background: var(--ui-gold);
  box-shadow: none;
}

.entry-heading-copy p,
.entry-row span,
.detail-help-callout-copy span {
  color: var(--ui-text-soft);
}

.detail-help-callout {
  border-color: var(--ui-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.detail-resource-grid {
  gap: 9px;
}

.detail-resource-list .entry-row {
  min-height: 66px;
  padding: 9px 10px;
  border-color: var(--ui-border);
  border-radius: 12px;
  background: var(--ui-surface-soft);
}

.detail-resource-list .entry-row:hover {
  border-color: rgba(214, 183, 106, 0.28);
  background: var(--ui-surface-raised);
}

.detail-resource-list .entry-row > button,
.detail-resource-list .entry-row > .entry-download-link {
  min-height: 40px;
  padding-inline: 14px;
  font-size: 12px;
  font-weight: 800;
}

.entry-icon {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #f4f6f4;
}

.ui-intro-toggle,
.mobile-resource-dock {
  display: none;
}

@media (min-width: 1101px) and (max-width: 1366px) {
  .detail-page {
    max-width: 1180px;
  }

  .detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(350px, 0.75fr);
  }

  .detail-primary-column,
  .detail-side-stack {
    display: grid;
  }

  .detail-summary-stack,
  .detail-action-stack,
  .detail-longform-stack,
  .detail-side-media-stack {
    width: auto;
  }
}

@media (max-width: 1100px) {
  .ranking-panel {
    position: static !important;
    top: auto !important;
  }

  .detail-action-stack {
    order: 1;
    position: static;
  }

  .detail-summary-stack {
    order: 2;
  }

  .detail-longform-stack {
    order: 3;
  }

  .detail-side-media-stack {
    order: 4;
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 60px;
    padding: 8px 12px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .luxury-game-logo {
    width: 30px;
    height: 30px;
  }

  .page-shell {
    padding: 10px 12px 64px;
  }

  .search-hero {
    gap: 9px;
    margin-bottom: 18px;
    padding: 12px 2px 15px;
  }

  .search-hero h1 {
    font-size: 36px;
  }

  .hero-title-block p {
    max-width: 300px;
    font-size: 12px;
  }

  .search-command {
    min-height: 56px;
    padding-left: 15px;
  }

  .search-command button {
    width: 58px;
    min-width: 58px;
  }

  .taxonomy-explorer {
    padding: 11px;
    border-radius: 12px;
  }

  .taxonomy-chip-list > button,
  .taxonomy-expand-button {
    min-height: 36px;
  }

  .game-grid,
  .result-grid-column .game-grid {
    gap: 10px;
  }

  .game-card {
    border-radius: 12px;
  }

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

  .card-title-row h2 {
    font-size: 13px;
  }

  .detail-page {
    padding-inline: 10px;
    padding-bottom: 104px;
  }

  .detail-hero {
    border-radius: 14px;
  }

  .detail-hero-content {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .detail-title-block h1 {
    font-size: clamp(23px, 7vw, 30px);
  }

  .detail-section,
  .entry-list.detail-resource-list {
    padding: 14px;
    border-radius: 12px;
  }

  .detail-resource-list {
    gap: 13px;
  }

  .detail-resource-list .entry-row {
    min-height: 62px;
  }

  .detail-summary-stack .detail-section.ui-intro-collapsible p {
    position: relative;
    max-height: 8.8em;
    overflow: hidden;
  }

  .detail-summary-stack .detail-section.ui-intro-collapsible:not(.is-expanded)::after {
    position: absolute;
    right: 14px;
    bottom: 54px;
    left: 14px;
    height: 64px;
    content: "";
    pointer-events: none;
    background: linear-gradient(180deg, transparent, var(--ui-surface) 84%);
  }

  .detail-summary-stack .detail-section.ui-intro-collapsible {
    position: relative;
  }

  .detail-summary-stack .detail-section.ui-intro-collapsible.is-expanded p {
    max-height: none;
  }

  .ui-intro-toggle {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    margin-top: 12px;
    color: #d9c586;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
  }

  .mobile-resource-dock {
    position: fixed;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    z-index: 80;
    display: block;
    padding: 8px;
    border: 1px solid rgba(214, 183, 106, 0.24);
    border-radius: 15px;
    background: rgba(12, 16, 15, 0.94);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(18px);
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .mobile-resource-dock.is-resource-visible {
    pointer-events: none;
    opacity: 0;
    transform: translateY(18px);
  }

  .mobile-resource-dock button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 50px;
    padding: 0 17px;
    color: #15150f;
    font: inherit;
    font-size: 14px;
    font-weight: 850;
    border: 0;
    border-radius: 11px;
    background: var(--ui-gold);
  }

  .mobile-resource-dock button small {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.7;
  }
}

@media (max-width: 420px) {
  .detail-resource-list .entry-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .detail-resource-list .entry-row > button,
  .detail-resource-list .entry-row > .entry-download-link {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-card,
  .game-card .cover-image,
  .mobile-resource-dock {
    transition: none;
  }
}
