:root {
  --bg: #0b0b0c;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-2: rgba(255, 255, 255, 0.06);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.66);
  --muted-2: rgba(255, 255, 255, 0.45);
  --stroke: rgba(255, 255, 255, 0.08);
  --shadow: 0 10px 20px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --radius-sm: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --content-pad: 16px;
  --topbar-h: 48px;
  --accent: #27c7ff;
  --accent-2: #b83bff;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  background: #0a0a0b;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
  color: inherit;
}

.app {
  min-height: 100%;
  display: grid;
  grid-template-rows: calc(var(--topbar-h) + var(--safe-top)) 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(6px + var(--safe-top)) var(--content-pad) 4px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  background: rgba(10, 10, 11, 0.96);
}

.topbar__left,
.topbar__right,
.topbar__center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar__center {
  justify-content: center;
}

.topbar__right {
  justify-content: flex-end;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 17.5px;
}

.avatarbtn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.avatarbtn svg {
  width: 15px;
  height: 15px;
}

.chevbtn {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.chevbtn svg {
  width: 14px;
  height: 14px;
}

.iconbtn {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.iconbtn--ghost {
  opacity: 0.9;
}

.pillbtn {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.pillbtn svg {
  width: 16px;
  height: 16px;
  opacity: 0.95;
}

.is-hidden {
  display: none !important;
}

.iconbtn svg {
  width: 17px;
  height: 17px;
}

.content {
  padding: 6px 0 22px;
  overflow-x: hidden;
}

.section {
  padding: 0 var(--content-pad) 12px;
}

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 6px;
}

.section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
}

.section__title small {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-2);
}

.pill {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.92);
  padding: 4px 10px 4px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.pill__chev {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
}

.pill__chev svg {
  width: 11px;
  height: 11px;
}

.rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar {
  display: none;
}

.card {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 150px;
  height: 112px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
}

.card--outline {
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.card--hero {
  width: 182px;
  height: 220px;
}

.card--banner {
  width: 100%;
  height: 240px;
}

.card--triple {
  width: 100%;
  height: 230px;
}

.card__photo,
.card__fallback,
.card__stack {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.card__photo {
  object-fit: cover;
}

.card__stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

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

.card__fallback {
  background:
    linear-gradient(160deg, hsla(var(--h, 210), var(--s, 85%), var(--l, 55%), 0.95), transparent 55%),
    radial-gradient(900px 360px at 20% 0%, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.6), transparent 55%);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0) 60%);
}

.card__inset {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

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

.card--effect .card__label {
  left: 14px;
  bottom: 12px;
  font-size: 14px;
}

.effect__circle {
  position: absolute;
  left: 16px;
  bottom: 46px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

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

.effect__arrow {
  position: absolute;
  left: 56px;
  bottom: 98px;
  width: 48px;
  height: 32px;
  z-index: 2;
}

.card--banner::after {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 55%);
}

.card--triple::after {
  background: none;
}

.card__label {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 9px;
  font-weight: 800;
  line-height: 1.15;
  font-size: 12.8px;
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.7);
  z-index: 2;
}

.badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(57, 207, 102, 0.9);
  color: #07220f;
  z-index: 2;
}

.subhead {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.subhead__title {
  font-size: 16px;
  font-weight: 800;
}

.subhead__meta {
  font-size: 12px;
  color: var(--muted-2);
}

.hero {
  padding: 2px var(--content-pad) 12px;
}

.hero__rail .card__label {
  bottom: 12px;
  font-size: 13.5px;
}

.section__banner {
  padding-bottom: 6px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 16px);
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 10px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 650;
  font-size: 13px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.toast.is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: none;
  }
}
