/* PARTYBOX home screen and shared navigation. */
body.home-glass {
  --glass-page: #f6f2eb;
  --glass-ink: #2c221a;
  --glass-muted: #6b594a;
  --glass-solid: #fffaf1;
  --glass-material: rgba(255, 250, 243, .77);
  --glass-edge: rgba(255, 255, 255, .86);
  --glass-shadow: 0 7px 20px #4d31131b, 0 1px 2px #4d311323;
  --glass-focus: #865d33;
  background: var(--glass-page);
  color: var(--glass-ink);
}
body.home-glass .ambient { display: none; }
body.home-glass #app {
  max-width: 816px;
  padding-inline: clamp(14px, 4.4vw, 24px);
  padding-bottom: calc(104px + max(env(safe-area-inset-bottom, 0px), var(--safe-bottom, 0px)));
}
body.home-glass .topbar {
  min-height: 58px;
  padding: 8px 0;
  margin: 0 0 10px;
  border: 0;
  gap: 10px;
}
body.home-glass .brand { gap: 9px; min-width: 0; }
body.home-glass .brand b {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  white-space: nowrap;
  color: var(--glass-ink);
}
body.home-glass .brand small { display: none; }
body.home-glass .brand .brand-art {
  width: 39px; height: 39px; flex: 0 0 39px;
  border-radius: 50%;
  padding: 0;
  box-shadow: 0 1px 3px #5332141c;
}
body.home-glass .brand .brand-art img {
  width: 100%; height: 100%; border-radius: inherit; object-fit: cover;
}

body.home-glass #app button.glass-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  padding: 0 14px;
  min-height: 44px;
  min-width: 44px;
  color: var(--glass-ink);
  background: var(--glass-solid);
  box-shadow: var(--glass-shadow), inset 0 1px 1px #fff8;
  font-size: 13px;
  font-weight: 680;
  line-height: 1.15;
  white-space: nowrap;
  transition: transform 150ms ease-out;
}
body.home-glass #app .glass-button svg {
  flex: 0 0 16px;
  height: 16px;
  width: 16px;
}
body.home-glass #app .glass-button:active { transform: scale(.97); }

body.home-glass.simple-home #homeView .home-links { display: none; }
body.home-glass.simple-home #homeView .hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(174px, 48vw, 245px);
  max-width: none;
  aspect-ratio: auto;
  padding: 16px clamp(16px, 5.5vw, 38px) !important;
  margin: 0 0 17px;
  border: 1px solid #e9d8c4;
  border-radius: 25px;
  overflow: hidden;
  background: #f9eee0;
  box-shadow: none;
}
body.home-glass.simple-home #homeView .hero-art {
  display: none;
}
body.home-glass #homeView .glass-hero-photo {
  position: absolute;
  inset: 0 0 0 auto;
  width: 54%;
  z-index: 0;
  background: url('/static/premium/home.jpg') right 58% / auto 167% no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 16%, #000 39%);
  mask-image: linear-gradient(to right, transparent 16%, #000 39%);
}
.home-glass .glass-hero-copy { position: relative; z-index: 1; display: grid; justify-items: start; gap: 13px; }
body.home-glass #homeView .glass-hero-copy h1 {
  margin: 0;
  font: 500 clamp(33px, 9.7vw, 54px)/.99 Georgia, serif;
  letter-spacing: -.06em;
  color: #382317;
}
body.home-glass #app #joinRoom {
  font-size: 13px;
  padding-inline: 13px;
  min-height: 44px;
  background: #fff5e7;
  color: #362216;
  border-color: #fffcf5;
  box-shadow: 0 5px 16px #633d2125, inset 0 1px 1px white;
}

body.home-glass.simple-home #homeView .catalog-content > .section-head {
  min-height: 44px;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 0 9px;
}
body.home-glass #homeView .catalog-content .section-head .kicker,
body.home-glass #homeView #gameCount { display: none; }
body.home-glass #homeView .catalog-content .section-head h2 {
  margin: 0;
  color: var(--glass-ink);
  font: 500 31px/1.12 Georgia, serif;
  letter-spacing: -.045em;
  scroll-margin-top: 14px;
}
body.home-glass #homeView .catalog-options > summary { display: none; }
body.home-glass #homeView .catalog-options { margin: 0; }
body.home-glass #homeView .catalog-options[open] { margin-bottom: 10px; }
body.home-glass #homeView .catalog-options[open] .catalog-tools { display: flex; }
body.home-glass #homeView .catalog-options[open] .tabs-wrap { margin-block: 6px; }

body.home-glass.simple-home #homeView #catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px;
}
body.home-glass #homeView #catalog .empty-state,
body.home-glass #homeView #catalog .loading { grid-column: 1 / -1; }
body.home-glass.simple-home #homeView #catalog .card-wrap {
  position: relative;
  min-width: 0;
  display: block;
  border-radius: 18px;
  background: #fffaf4;
  box-shadow: inset 0 0 0 1px #e7dbcd;
}
body.home-glass.simple-home #homeView #catalog .card-wrap:has(> .card:active) {
  background: #eee2cf;
}
body.home-glass.simple-home #homeView #catalog .card-wrap > button.card {
  display: grid;
  grid-template: auto 1fr / minmax(0, 1fr);
  gap: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  color: var(--glass-ink);
  padding: 0;
  border: 0;
  border-radius: inherit;
  overflow: hidden;
  text-align: left;
  background: transparent;
  box-shadow: none;
}
body.home-glass.simple-home #homeView #catalog .card-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 0;
  background-color: #f7ecdd;
  background-position: center 50%;
  background-size: cover;
}
body.home-glass.simple-home #homeView #catalog .card-body {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  padding: 9px 12px 11px;
}
body.home-glass #homeView #catalog .card-body > b {
  margin: 0;
  color: var(--glass-ink);
  font-size: clamp(15px, 4.5vw, 19px);
  line-height: 1.14;
  font-weight: 700;
  overflow-wrap: normal;
}
body.home-glass #homeView #catalog .card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 4px;
  color: var(--glass-muted);
  font-size: 11px;
  line-height: 1.25;
}
body.home-glass #homeView #catalog .card-meta span { white-space: nowrap; }
body.home-glass #homeView #catalog .card-arrow { display: none; }
body.home-glass #homeView #catalog .favorite-star {
  position: absolute;
  inset: 1px 1px auto auto;
  transform: none;
  place-items: center;
  display: grid;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: #493326;
}
body.home-glass #homeView #catalog .favorite-star::before {
  content: '';
  grid-area: 1 / 1;
  width: 29px; height: 29px;
  border-radius: 50%;
  background: #fff9ec;
  box-shadow: 0 1px 4px #5e331526;
}
body.home-glass #homeView #catalog .favorite-star svg { grid-area: 1 / 1; width: 15px; height: 15px; z-index: 1; }
body.home-glass #homeView #catalog .favorite-star[aria-pressed="true"] svg { fill: #71472e; }

body.home-glass.simple-home #bottomNav:not(.hidden) {
  position: fixed;
  display: grid;
  bottom: calc(9px + max(env(safe-area-inset-bottom, 0px), var(--safe-bottom, 0px))) !important;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 26px), 430px) !important;
  padding: 4px;
  gap: 4px;
  border-radius: 999px;
  border: 1px solid var(--glass-edge);
  background: var(--glass-solid);
  box-shadow: 0 8px 26px #3e261b26, inset 0 1px 2px #fff9;
}
body.home-glass #bottomNav button.bottom-nav-btn {
  border-radius: 999px;
  min-height: 51px;
  padding: 5px 3px;
  box-shadow: none;
  font-size: 11px;
  font-weight: 630;
  color: var(--glass-muted);
  background: transparent;
}
body.home-glass #bottomNav button.bottom-nav-btn.active {
  background: #eadbc8;
  box-shadow: inset 0 1px 1px #68441d17;
  color: var(--glass-ink);
}
body.home-glass #bottomNav button .nav-mark,
body.home-glass #bottomNav button.active .nav-mark {
  width: 20px; height: 19px;
  border: 0;
  background: none;
  box-shadow: none;
}
body.home-glass #bottomNav button .nav-mark svg { width: 19px; height: 19px; }
body.home-glass :is(.glass-button, .bottom-nav-btn, .card, .favorite-star):focus-visible {
  outline: 2px solid var(--glass-focus);
  outline-offset: -3px;
  z-index: 2;
}
.glass-skip {
  position: fixed;
  top: 10px;
  left: 14px;
  z-index: 100;
  padding: 12px;
  transform: translateY(calc(-100% - 20px));
  background: var(--glass-solid);
  color: var(--glass-ink);
  border-radius: 14px;
}
.glass-skip:focus { transform: none; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body.home-glass.simple-home #bottomNav:not(.hidden),
  body.home-glass #app #joinRoom {
    background: var(--glass-material);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
    backdrop-filter: blur(14px) saturate(1.15);
  }
}
@media (min-width: 660px) {
  body.home-glass.simple-home #homeView #catalog { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  body.home-glass #homeView .glass-hero-photo {
    width: min(54%, 270px);
    background-size: auto 183%;
    background-position: right 60%;
  }
}
@media (max-width: 340px) {
  body.home-glass #homeView .glass-hero-photo { background-size: auto 156%; }
  body.home-glass #app #addGroup { font-size: 12px; padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  body.home-glass #app .glass-button { transition: none; }
  body.home-glass #app .glass-button:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  body.home-glass.simple-home #bottomNav:not(.hidden),
  body.home-glass #app #joinRoom {
    background: var(--glass-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
