.reference-art {
  display: block;
  inline-size: 100%;
  aspect-ratio: var(--art-ratio);
  background-image: url("assets/home-reference.png");
  background-repeat: no-repeat;
  background-size: var(--art-size);
  background-position: var(--art-position);
}

.showcase-cover {
  inline-size: min(100%, 216px);
  margin: 0 auto 14px;
  border-radius: 8px;
}

html:has(body[data-page="home"]) {
  scroll-padding-block: 12px 96px;
}

body[data-page="home"] {
  --bg: #15120d;
  --surface: #24211c;
  --surface2: #2c281e;
  --gold: #f1d183;
  --home-gold-muted: #beac85;
  --home-rule: #453e31;
  --home-gutter: clamp(9px, 2.7vw, 16px);
  --home-gold-fill: linear-gradient(180deg, #c39844, #f9e6a6 52%, #ab8645);
  background: #0d0c09;
  color: #faf0db;
}

body[data-page="home"] .app {
  background: var(--bg);
  padding-block-end: calc(80px + env(safe-area-inset-bottom));
}

body[data-page="home"] .topbar {
  min-block-size: clamp(43px, 12.5vw, 65px);
  padding: 0 var(--home-gutter) 0 calc(var(--home-gutter) * 2.65);
  background: #24211e;
  gap: 8px;
}

.home-brand {
  inline-size: clamp(70px, 19.75vw, 104px);
  flex: none;
}

body[data-page="home"] .top-actions {
  gap: clamp(2px, 2.1vw, 14px);
  justify-content: end;
}

body[data-page="home"] .login-link {
  padding-inline: 6px;
  line-height: 42px;
  color: var(--home-gold-muted);
  font-size: clamp(.82rem, 3.6vw, 1rem);
  white-space: nowrap;
}

body[data-page="home"] .top-actions .button {
  min-block-size: 32px;
  padding-inline: clamp(10px, 3.3vw, 18px);
  border-color: #e2c174;
  border-radius: 6px;
  background: var(--home-gold-fill);
  color: #201708;
  font-size: clamp(.82rem, 3.6vw, 1rem);
  white-space: nowrap;
}

body[data-page="home"] .top-actions .icon-button {
  min-inline-size: clamp(30px, 7.3vw, 42px);
  min-block-size: 42px;
}

body[data-page="home"] .top-actions .reference-art {
  inline-size: clamp(19px, 5.8vw, 30px);
}

body[data-page="home"] .announcement {
  block-size: auto;
  min-block-size: 27px;
  gap: 8px;
  margin: 6px var(--home-gutter) 8px;
  padding: 3px 14px;
  border-radius: 100px;
  background: #24211e;
}

body[data-page="home"] .announcement .reference-art {
  inline-size: 24px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent url("assets/home-reference.png") var(--art-position) / var(--art-size) no-repeat;
}

body[data-page="home"] .announcement > span:last-child {
  min-inline-size: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #c9c2bb;
  font-size: clamp(.75rem, 3.5vw, 1.02rem);
}

body[data-page="home"] .hero {
  margin: 0 var(--home-gutter) clamp(20px, 5.5vw, 29px);
  aspect-ratio: auto;
  border: 0;
  border-radius: 6px;
  overflow: clip;
}

body[data-page="home"] .category-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(3px, 1.2vw, 8px);
  margin: 0 var(--home-gutter) 3px;
  padding: 3px;
  border: 0;
  border-radius: 7px;
  background: #2b271a;
}

body[data-page="home"] .category {
  min-block-size: clamp(46px, 12.4vw, 65px);
  padding: 1px 0;
  gap: 1px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #1b180f;
  color: #dcc596;
  font-size: clamp(.75rem, 3.55vw, 1rem);
  line-height: 1.15;
  white-space: nowrap;
}

body[data-page="home"] .category .reference-art {
  inline-size: auto;
  block-size: clamp(20px, 6.4vw, 34px);
}

body[data-page="home"] .category[aria-current] {
  border-color: #c18c44;
  box-shadow: inset 0 0 6px #d28a3b;
  color: #fff5e5;
  font-weight: 700;
}

.home-games {
  margin-inline: var(--home-gutter);
}

body[data-page="home"] .home-tabs {
  margin: 0 2px clamp(18px, 6.1vw, 32px);
  border-color: var(--home-rule);
}

body[data-page="home"] .home-tabs button {
  color: var(--home-gold-muted);
  font-size: clamp(.875rem, 4.2vw, 1.2rem);
  padding-block: .58em .69em;
}

body[data-page="home"] .home-tabs button.active {
  color: var(--gold);
}

body[data-page="home"] .home-tabs button.active::after {
  inset-inline: 36%;
  background: var(--home-gold-fill);
}

body[data-page="home"] .game-grid {
  gap: clamp(10px, 2.8vw, 16px) clamp(4px, 1.25vw, 8px);
}

body[data-page="home"] .game-cover {
  border: 0;
  border-radius: clamp(9px, 3.2vw, 16px);
  overflow: clip;
}

body[data-page="home"] .game-card p {
  margin-block: 2px 0;
  font-size: clamp(.65rem, 3vw, .92rem);
  color: var(--home-gold-muted);
}

body[data-page="home"] .favorite {
  inset-block-start: 1px;
  inset-inline-end: 1px;
  inline-size: clamp(17px, 22%, 28px);
  block-size: auto;
  aspect-ratio: 1;
  background: #fffbeb;
}

body[data-page="home"] .favorite::before {
  content: "";
  position: absolute;
  inset: -4px;
}

body[data-page="home"] .favorite.selected {
  background: #f2cf80;
  outline: 1px solid #8c6027;
}

body[data-page="home"] .favorite .icon {
  inline-size: 70%;
  block-size: 70%;
  filter: brightness(.55) sepia(1) saturate(2);
}

body[data-page="home"] .favorite.selected .icon {
  filter: brightness(.35) sepia(1) saturate(4);
}

body[data-page="home"] .game-load-more {
  place-self: center;
  min-block-size: 44px;
  padding-inline: 4px;
  color: var(--home-gold-muted);
}

body[data-page="home"] .home-floor {
  padding: 0;
  margin: clamp(23px, 7.6vw, 40px) var(--home-gutter) 0;
  scroll-margin-block-start: 0;
}

body[data-page="home"] .home-games + .home-floor {
  margin-block-start: clamp(20px, 6.8vw, 33px);
}

body[data-page="home"] .home-floor .section-title {
  inline-size: fit-content;
  min-inline-size: 35%;
  padding-inline-end: 24px;
  margin-block-end: clamp(9px, 2.75vw, 16px);
  gap: 3px;
  background: linear-gradient(90deg, #37280f00 11%, #7d5e28 39%, #37280f00 100%) center / 100% 48% no-repeat;
  color: #fff8ed;
  font-size: clamp(.95rem, 4.3vw, 1.28rem);
  font-weight: 600;
}

.floor-icon {
  inline-size: clamp(18px, 5vw, 27px);
  flex: none;
}

body[data-page="home"] .home-floor .provider-grid,
.home-more-providers .provider-grid {
  gap: clamp(8px, 2.2vw, 13px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-page="home"] .home-provider {
  border: 0;
  border-radius: 6px;
  overflow: clip;
  box-shadow: none;
}

.home-more-providers {
  margin: 22px var(--home-gutter) 0;
  color: var(--home-gold-muted);
}

.home-more-providers summary {
  cursor: pointer;
  padding-block: 6px;
}

.home-more-providers[open] .provider-grid {
  margin-block: 8px;
}

.home-footer {
  margin: 17px var(--home-gutter) 0;
  color: var(--home-gold-muted);
  font-size: clamp(.75rem, 3.5vw, .975rem);
}

.home-footer-columns {
  display: grid;
  grid-template-columns: .96fr 1.04fr;
  gap: 10px;
}

.home-footer h2 {
  font-size: inherit;
  font-weight: 600;
}

.home-footer-columns h2::after {
  content: "";
  display: block;
  inline-size: 2.8em;
  block-size: 3px;
  margin-block: .22em .53em;
  border-radius: 4px;
  background: var(--home-gold-fill);
}

.home-footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.home-footer-links.game-links {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-footer-links a {
  padding-block: 3px;
}

.home-support-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-block: 15px;
  padding-block: 16px;
  border-block: 1px solid var(--home-rule);
}

.home-support-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-block-size: 33px;
  border-radius: 6px;
  background: var(--surface2);
}

.home-support-links .reference-art {
  inline-size: 15px;
  flex: none;
  mix-blend-mode: lighten;
}

.home-footer-about {
  font-size: .79em;
  line-height: 1.85;
}

.home-footer-about small {
  display: block;
  margin-block-start: 15px;
  padding-block-start: 10px;
  border-block-start: 1px solid var(--home-rule);
  color: inherit;
}

body[data-page="home"] .home-bottom {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  min-block-size: 56px;
  padding: 3px 0 max(5px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--home-rule);
  border-radius: 10px 10px 0 0;
  background: radial-gradient(ellipse at 9% 0%, #4c351b, transparent 28%), #25211c;
  backdrop-filter: none;
}

body[data-page="home"] .home-bottom a {
  justify-content: center;
  align-self: stretch;
  min-inline-size: 0;
  min-block-size: 44px;
  gap: 1px;
  line-height: 1.2;
  color: var(--home-gold-muted);
  font-size: clamp(.7rem, 3.35vw, .95rem);
  white-space: nowrap;
}

body[data-page="home"] .home-bottom .reference-art,
body[data-page="home"] .home-bottom .icon {
  inline-size: clamp(18px, 5.6vw, 27px);
  mix-blend-mode: lighten;
}

body[data-page="home"] .home-bottom .icon {
  block-size: clamp(18px, 5.6vw, 27px);
}

body[data-page="home"] .home-bottom .home-nav-current {
  --nav-home-size: clamp(60px, 17.5vw, 86px);
  place-self: end center;
  inline-size: var(--nav-home-size);
  block-size: var(--nav-home-size);
  margin-block-start: -25px;
  padding: 4px;
  border: 1px solid #c49e55;
  border-radius: 50%;
  background: var(--home-gold-fill);
  box-shadow: 0 0 0 3px #15120d, 0 4px 7px #0008;
  color: #171208;
  font-size: clamp(.86rem, 3.9vw, 1.1rem);
  font-weight: 750;
}

body[data-page="home"] .home-nav-current .reference-art {
  inline-size: clamp(20px, 6.2vw, 32px);
  mix-blend-mode: multiply;
}

@media (forced-colors: active) {
  body[data-page="home"] .home-tabs button.active {
    border-block-end: 2px solid Highlight;
  }

  body[data-page="home"] .category[aria-current],
  body[data-page="home"] .home-nav-current {
    border: 2px solid Highlight;
  }
}

.game-preview > .reference-art {
  inline-size: 65px;
  flex: none;
  border-radius: 7px;
}

.game-stage > .reference-art:not(.showcase-cover) {
  inline-size: min(100%, 130px);
  margin-inline: auto;
  border-radius: 9px;
}

