:root {
  --bg: #0b0e14;
  --bg-card: #121826;
  --bg-input: #0e1420;
  --border: #243044;
  --text: #e8eef7;
  --muted: #8b9bb4;
  --soft: #5c6b84;
  --accent: #66c0f4;
  --accent-dim: rgba(102, 192, 244, 0.14);
  --steam: #1b2838;
  --good: #5cdb8f;
  --good-bg: rgba(92, 219, 143, 0.12);
  --fair: #f0c14b;
  --fair-bg: rgba(240, 193, 75, 0.12);
  --bad: #ff6b6b;
  --bad-bg: rgba(255, 107, 107, 0.12);
  --free: #a78bfa;
  --free-bg: rgba(167, 139, 250, 0.12);
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", Consolas, ui-monospace, monospace;
  --max: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 50% at 50% -30%, rgba(102, 192, 244, 0.18), transparent),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(27, 40, 56, 0.9), transparent);
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 14, 20, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 750;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.logo:hover {
  text-decoration: none;
  color: var(--accent);
}
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(145deg, #66c0f4, #2a475e);
  display: grid;
  place-items: center;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(102, 192, 244, 0.25);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  flex-wrap: wrap;
}
.nav a {
  color: var(--muted);
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

/* Account — top-right Login / My Profile */
.nav-account {
  margin-left: 0.35rem;
  display: flex;
  align-items: center;
}
.nav-login,
.btn-nav-login {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(102, 192, 244, 0.45);
  background: rgba(102, 192, 244, 0.12);
  color: var(--accent) !important;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none !important;
  white-space: nowrap;
}
.nav-login:hover,
.btn-nav-login:hover {
  background: rgba(102, 192, 244, 0.22);
  color: #a5d8ff !important;
}
.nav-account__menu {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.nav-account__profile {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem 0.25rem 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text) !important;
  font-weight: 650;
  font-size: 0.85rem;
  text-decoration: none !important;
  max-width: 11rem;
}
.nav-account__profile:hover {
  border-color: rgba(102, 192, 244, 0.45);
}
.nav-account__av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.nav-account__av--ph {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #66c0f4, #2a475e);
  font-size: 0.75rem;
}
.nav-account__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-account__friends {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--muted) !important;
  text-decoration: none !important;
  white-space: nowrap;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.nav-account__friends:hover {
  color: var(--text) !important;
  border-color: var(--border);
  background: rgba(102, 192, 244, 0.08);
}
.nav-account__logout {
  font-size: 0.8rem;
  color: var(--soft) !important;
  text-decoration: none !important;
  white-space: nowrap;
}
.nav-account__logout:hover {
  color: var(--muted) !important;
}

/* Post-login privacy guidance */
.linked-banner {
  max-width: 640px;
  margin: 0 auto 1.25rem;
  text-align: left;
}
.linked-banner[hidden] {
  display: none !important;
}
.linked-banner__inner {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(240, 193, 75, 0.35);
  background: rgba(240, 193, 75, 0.08);
}
.linked-banner__title {
  margin: 0 0 0.35rem;
  font-weight: 750;
  color: var(--text);
  font-size: 0.95rem;
}
.linked-banner__body {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.linked-banner__actions {
  margin: 0 0 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.linked-banner__actions .btn {
  font-size: 0.85rem;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
}
.linked-banner__hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--soft);
  line-height: 1.4;
}

/* Hero */
.hero {
  padding: 2.75rem 0 1.5rem;
  text-align: center;
}
.hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
  font-weight: 800;
}
.hero h1 span {
  background: linear-gradient(90deg, #66c0f4, #a5d8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub {
  margin: 0 auto 1.75rem;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Search card */
.search-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  text-align: left;
  max-width: 640px;
  margin: 0 auto;
}
.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: stretch;
}
.search-row__grow,
.search-row .suggest-wrap {
  flex: 1 1 220px;
  min-width: 0;
  position: relative;
}
.search-row input[type="text"],
.search-row input[type="search"],
.suggest-wrap > input {
  width: 100%;
  box-sizing: border-box;
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
/* Typeahead popup */
.suggest-wrap {
  position: relative;
  z-index: 20;
}
.suggest-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  max-height: min(340px, 55vh);
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  text-align: left;
}
.suggest-panel[hidden] {
  display: none !important;
}
.suggest-group-label {
  padding: 0.4rem 0.55rem 0.2rem;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.suggest-item {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.5rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.suggest-item:hover,
.suggest-item.is-active {
  background: rgba(102, 192, 244, 0.12);
}
.suggest-item__img {
  width: 48px;
  height: 18px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
}
.suggest-item__img--av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.suggest-item__ph {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(102, 192, 244, 0.1);
  font-size: 0.9rem;
}
.suggest-item__body {
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
}
.suggest-item__name {
  display: block;
  font-size: 0.88rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggest-item__meta {
  display: block;
  font-size: 0.72rem;
  color: var(--soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggest-empty {
  padding: 0.65rem 0.7rem;
  font-size: 0.8rem;
  color: var(--soft);
}
.search-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.search-row select {
  padding: 0.85rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font: inherit;
}
.btn {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: linear-gradient(180deg, #66c0f4, #417a9b);
  color: #0b0e14;
}
.btn-primary:hover {
  opacity: 0.95;
}
.btn-primary:disabled {
  opacity: 0.55;
  cursor: wait;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.search-hint {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--soft);
}
.demo-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: inherit;
  padding: 0;
  text-decoration: underline;
}

/* Status */
.status {
  margin: 1.25rem auto 0;
  max-width: 640px;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  display: none;
}
.status.show {
  display: block;
}
.status.error {
  background: var(--bad-bg);
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: #ffb4b4;
}
.status.loading {
  background: var(--accent-dim);
  border: 1px solid rgba(102, 192, 244, 0.3);
  color: var(--accent);
}
.status.info {
  background: rgba(240, 193, 75, 0.1);
  border: 1px solid rgba(240, 193, 75, 0.3);
  color: var(--fair);
}

/* Results */
#results {
  display: none;
  padding-bottom: 3.5rem;
}
#results.show {
  display: block;
}

.profile-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0 1rem;
  flex-wrap: wrap;
}
.profile-bar__identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: min(100%, 280px);
  flex: 1 1 auto;
}
.profile-bar__identity img,
#player-avatar {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  border: 2px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.profile-bar h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.profile-bar p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Hard gap under lookup form — height cannot collapse like margins */
.hero-gap {
  height: 2.75rem;
  width: 100%;
  flex-shrink: 0;
  pointer-events: none;
}

/* —— Global charts (homepage, pre-lookup) —— */
.global-charts {
  margin: 0 auto 1rem;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  text-align: left;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.hero .search-card {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
}
.hero #status.show {
  margin-top: 1rem;
  margin-bottom: 0;
}
.hero #status:not(.show) {
  display: none;
  margin: 0;
  padding: 0;
  border: none;
  min-height: 0;
}
.global-charts__head {
  margin-bottom: 0.85rem;
}
.global-charts__eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}
.global-charts__title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text);
}
.global-charts__sub {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-soft);
  line-height: 1.4;
}
.global-charts__grid {
  display: grid;
  /* minmax(0,1fr) lets columns shrink so long titles ellipsize instead of stretching */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
  max-width: 100%;
}
@media (max-width: 800px) {
  .global-charts__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.gc-col {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.7rem;
  background: rgba(0, 0, 0, 0.2);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.gc-col__title {
  margin: 0 0 0.15rem;
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gc-col__title--good {
  color: var(--good);
}
.gc-col__title--warn {
  color: var(--warn);
}
.gc-col__hint {
  margin: 0 0 0.55rem;
  font-size: 0.7rem;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
}
.gc-more {
  appearance: none;
  display: block;
  width: 100%;
  margin-top: 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px dashed rgba(102, 192, 244, 0.4);
  background: rgba(102, 192, 244, 0.08);
  color: var(--accent);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
.gc-more:hover {
  background: rgba(102, 192, 244, 0.16);
  border-color: rgba(102, 192, 244, 0.65);
}
.gc-more[hidden] {
  display: none !important;
}
.gc-item {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.gc-item img {
  width: 72px;
  height: 27px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg);
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.gc-item__rank {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  width: 1rem;
  flex-shrink: 0;
}
.gc-item__body {
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
}
.gc-item__name {
  display: block;
  max-width: 100%;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gc-item__name:hover {
  color: var(--accent);
}
.gc-item__meta {
  font-size: 0.68rem;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.gc-bonus {
  margin-top: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(246, 135, 179, 0.25);
  background: rgba(246, 135, 179, 0.06);
}
.gc-bonus__label {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f687b3;
  margin-bottom: 0.45rem;
}
.gc-bonus__row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.gc-bonus__row > div {
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
}
.gc-bonus__row img {
  width: 100px;
  height: 38px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.gc-bonus__name {
  display: block;
  max-width: 100%;
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gc-bonus__name:hover {
  color: var(--accent);
}
.gc-bonus__blurb {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
  /* 2-line clamp so blurbs don't blow the panel either */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gc-bonus__meta {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

/* —— Share panel (compact, matches site theme) —— */
.share-panel {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.share-panel__head {
  margin-bottom: 0.65rem;
}
.share-panel__eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.share-panel__title {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text);
}
.share-panel__sub {
  margin: 0;
  max-width: 40rem;
  font-size: 0.8rem;
  color: var(--text-soft);
  line-height: 1.4;
}
.share-panel__sub strong {
  color: var(--text-muted);
  font-weight: 600;
}
.share-panel__brand {
  color: var(--accent);
  font-weight: 650;
}
.share-panel__body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}
.share-panel__media {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  width: 112px;
  height: 140px;
  flex-shrink: 0;
}
.share-panel__loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: rgba(15, 20, 25, 0.92);
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 600;
  text-align: center;
  padding: 0.35rem;
}
.share-panel__loading[hidden] {
  display: none !important;
}
.share-panel__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.share-panel__img-btn {
  appearance: none;
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  background: transparent;
  position: relative;
}
.share-panel__img-btn:disabled {
  cursor: wait;
}
.share-panel__img-btn img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  /* Always show something; is-ready just brightens */
  opacity: 0.35;
  background: var(--bg-card);
  transition: opacity 0.2s ease;
}
.share-panel__img-btn.is-ready img,
.share-panel__img-btn img[src] {
  opacity: 1;
}
.share-panel__img-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.25rem;
  font-size: 0.6rem;
  font-weight: 650;
  text-align: center;
  color: var(--text);
  background: rgba(15, 20, 25, 0.85);
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.share-panel__img-btn.is-ready:hover .share-panel__img-hint {
  opacity: 1;
}
.share-panel__cta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  flex: 1 1 160px;
}
/* Match existing .btn / site chrome */
.btn-share-primary {
  appearance: none;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.4rem;
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-align: left;
}
.btn-share-primary:hover:not(:disabled) {
  background: rgba(61, 156, 240, 0.2);
  border-color: var(--accent);
  color: var(--text);
  transform: none;
  box-shadow: none;
}
.btn-share-primary:active:not(:disabled) {
  transform: scale(0.98);
}
.btn-share-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-share-primary__hint {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-soft);
  width: 100%;
  margin-left: 1.25rem;
}
.btn-share-primary .btn-share__icon {
  margin-right: 0;
}
.btn-share-secondary {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-share-secondary:hover:not(:disabled) {
  border-color: #3a4a5c;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.btn-share-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-share__icon {
  font-size: 0.9rem;
  line-height: 1;
}
.share-wrap__status {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-soft);
  min-height: 1.1em;
}
.share-wrap__status.is-ok {
  color: var(--good);
}
.share-wrap__status.is-err {
  color: var(--bad);
  background: var(--bad-soft);
  border-radius: 6px;
  padding: 0.25rem 0.4rem;
}
.share-panel__nudge {
  margin: 0.15rem 0 0;
  padding: 0;
  border: none;
  background: none;
  font-size: 0.72rem;
  color: var(--text-soft);
  line-height: 1.4;
}
.share-panel__nudge strong {
  color: var(--accent);
  font-weight: 650;
}
.share-panel__row-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.badge-demo {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: var(--fair-bg);
  color: var(--fair);
  vertical-align: middle;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}
.stat .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--soft);
  font-weight: 650;
}
.stat .value {
  margin-top: 0.35rem;
  font-size: 1.45rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  letter-spacing: -0.02em;
}
.stat .value.accent {
  color: var(--accent);
}
.stat .value.good {
  color: var(--good);
}
.stat .hint {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--soft);
}

.disclaimer {
  font-size: 0.85rem;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
}

.tier-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.tier {
  font-size: 0.8rem;
  font-weight: 650;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}
.tier-great {
  background: var(--good-bg);
  color: var(--good);
}
.tier-good {
  background: var(--accent-dim);
  color: var(--accent);
}
.tier-fair {
  background: var(--fair-bg);
  color: var(--fair);
}
.tier-steep {
  background: var(--bad-bg);
  color: var(--bad);
}
.tier-free {
  background: var(--free-bg);
  color: var(--free);
}

.section-title {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.mini-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.mini-card img {
  width: 100px;
  height: 38px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--steam);
  flex-shrink: 0;
}
.mini-card .meta {
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
}
.mini-card .name {
  font-weight: 650;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.mini-card .name a,
.mini-card .name .game-name-link {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-card .sub {
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Table controls */
.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  margin: 1.5rem 0 0.75rem;
}
.table-toolbar input {
  flex: 1 1 180px;
  max-width: 280px;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font: inherit;
}
.table-toolbar select {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font: inherit;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
}
table.games {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.games th,
.games td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.games th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--soft);
  background: rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  cursor: pointer;
  user-select: none;
}
.games th:hover {
  color: var(--accent);
}
.games tr:last-child td {
  border-bottom: none;
}
.games tr:hover td {
  background: rgba(102, 192, 244, 0.04);
}
.game-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  white-space: normal;
  min-width: 200px;
}
.game-cell img {
  width: 92px;
  height: 35px;
  object-fit: cover;
  border-radius: 5px;
  background: var(--steam);
  flex-shrink: 0;
}
.num {
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}
.pill-great {
  background: var(--good-bg);
  color: var(--good);
}
.pill-good {
  background: var(--accent-dim);
  color: var(--accent);
}
.pill-fair {
  background: var(--fair-bg);
  color: var(--fair);
}
.pill-steep {
  background: var(--bad-bg);
  color: var(--bad);
}
.pill-free {
  background: var(--free-bg);
  color: var(--free);
}
.pill-unknown {
  background: rgba(255, 255, 255, 0.06);
  color: var(--soft);
}

/* Support bar (tips + year wrap) */
.support-bar {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
}
.support-bar__title {
  margin: 0;
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}
.support-bar__hint {
  margin: 0.2rem 0 0.55rem;
  font-size: 0.8rem;
  color: var(--soft);
}
.support-bar__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.support-flash {
  margin: 0.4rem 0;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  font-size: 0.85rem;
  background: rgba(102, 192, 244, 0.1);
  color: var(--text);
}
.support-flash[data-kind="ok"] {
  background: rgba(92, 219, 143, 0.12);
}
.support-flash[data-kind="err"] {
  background: rgba(220, 80, 80, 0.12);
}
.btn-sm {
  padding: 0.35rem 0.7rem !important;
  font-size: 0.8rem !important;
}

/* Unplayed deals */
.deals-panel {
  margin: 1.25rem 0 0.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.deals-panel__title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  color: var(--text);
}
.deals-panel__hint {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--soft);
}
.deals-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.deals-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.deals-item__name {
  color: var(--text);
  font-weight: 600;
  grid-column: 1;
}
.deals-item__meta {
  color: var(--soft);
  font-size: 0.8rem;
  grid-column: 1;
}
.deals-item__links {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  white-space: nowrap;
  font-size: 0.85rem;
}
.deals-item__links a {
  color: var(--accent, #66c0f4);
}
.aff-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05rem 0.25rem;
}
.deals-disclosure {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--soft);
}

/* SEO / crawlable intro (footer-adjacent) */
.seo-blurb {
  padding: 2rem 0 0.5rem;
  max-width: 42rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.seo-blurb h2 {
  color: var(--text);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.seo-blurb p {
  margin: 0;
}

/* PlayWorth Pro */
.nav-pro-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  border-radius: 999px;
  background: linear-gradient(135deg, #f0c14b, #e8a317);
  color: #1a1200;
  vertical-align: middle;
}
.nav-pro-link {
  margin-left: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent, #66c0f4);
  text-decoration: none;
}
.pro-page {
  padding: 2.5rem 0 4rem;
  max-width: 52rem;
}
.pro-lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36rem;
}
.pro-flash {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(102, 192, 244, 0.12);
  border: 1px solid var(--border);
  color: var(--text);
}
.pro-flash[data-kind="ok"] {
  background: rgba(92, 219, 143, 0.12);
}
.pro-flash[data-kind="err"] {
  background: rgba(220, 80, 80, 0.12);
}
.pro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.pro-card {
  padding: 1.5rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card, rgba(255, 255, 255, 0.03));
}
.pro-card--pro {
  border-color: rgba(240, 193, 75, 0.45);
  box-shadow: 0 0 0 1px rgba(240, 193, 75, 0.12);
}
.pro-price {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.pro-price span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}
.pro-price em {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--soft);
  font-weight: 500;
}
.pro-features {
  margin: 1rem 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.55;
}
.pro-features li {
  margin: 0.35rem 0;
}
.pro-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.pro-tax-note,
.pro-active-msg {
  font-size: 0.8rem;
  color: var(--soft);
  margin-top: 0.75rem;
}
.pro-promise {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border: 1px dashed var(--border);
  color: var(--muted);
}
.pro-promise h2 {
  color: var(--text);
  font-size: 1.1rem;
}
.pro-history-section {
  margin-top: 2.5rem;
}
.pro-history-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.pro-history-item__date {
  font-weight: 600;
  color: var(--text);
}
.pro-history-item__stats {
  font-size: 0.9rem;
  color: var(--muted);
}
.pro-compare {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  background: rgba(102, 192, 244, 0.08);
}
.share-hd-badge {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--soft);
  vertical-align: middle;
}

/* Ad slot */
.ad-slot {
  margin: 1.5rem 0;
  padding: 0.85rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  text-align: center;
  color: var(--soft);
  font-size: 0.8rem;
  min-height: 100px;
  overflow: hidden;
}
.ad-slot .ad-label,
.ad-slot > span.ad-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
  color: var(--soft);
}
.ad-placeholder {
  padding: 1.25rem 0.75rem;
  color: var(--soft);
  font-size: 0.85rem;
}
.ad-slot ins.adsbygoogle {
  margin: 0 auto;
}

/* Footer / prose */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0 2.5rem;
  color: var(--soft);
  font-size: 0.85rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}
.site-footer a {
  color: var(--muted);
}

.prose-block {
  max-width: 40rem;
  margin: 3rem auto 0;
  text-align: left;
  color: var(--muted);
  font-size: 0.95rem;
}
.prose-block h2 {
  color: var(--text);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}
.prose-block p {
  margin: 0 0 0.75rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* —— Result tabs —— */
.result-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.25rem 0 1rem;
  padding: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.result-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 650;
  font-size: 0.9rem;
  padding: 0.55rem 0.95rem;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.result-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.result-tab[aria-selected="true"] {
  background: var(--accent-dim);
  color: var(--accent);
}
.tab-panel {
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* —— Charts —— */
.chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}
.chart-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--soft);
}
.chart-toolbar select {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  min-width: 12rem;
}
.chart-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.85rem;
}
@media (max-width: 800px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }
}
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  position: relative;
  min-height: 260px;
}
.chart-card--main {
  min-height: 340px;
}
.chart-card h4 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 650;
}
.chart-card canvas {
  max-width: 100%;
}

/* —— Friends —— */
.friends-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}
.friends-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
}
.friends-actions label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.friends-actions select {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  text-transform: none;
  font-weight: 500;
}
.lb-you {
  background: rgba(102, 192, 244, 0.08) !important;
}
.lb-limited {
  opacity: 0.95;
}
.lb-player {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.lb-player img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--steam);
  flex-shrink: 0;
  object-fit: cover;
}
.lb-player__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.lb-player__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.lb-name-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14rem;
  display: inline-block;
}
.lb-name-link:hover {
  color: var(--accent);
}
.lb-muted {
  color: var(--soft);
  font-size: 0.85em;
}
.lb-limited-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(240, 193, 75, 0.15);
  border: 1px solid rgba(240, 193, 75, 0.35);
  color: var(--fair);
  white-space: nowrap;
}
.lb-presence-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 650;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(102, 192, 244, 0.12);
  border: 1px solid rgba(102, 192, 244, 0.3);
  color: var(--accent);
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-presence-badge--soft {
  color: var(--muted);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}
.lb-you-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
}

/* —— Categories —— */
.category-block {
  margin: 0.5rem 0 1rem;
}
.category-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--soft);
  margin-bottom: 0.45rem;
}
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.cat-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cat-chip:hover {
  color: var(--text);
  border-color: #3a4a5c;
}
.cat-chip[aria-pressed="true"] {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.cat-chip .count {
  opacity: 0.75;
  font-weight: 600;
  margin-left: 0.25rem;
}
.kind-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}
.kind-f2p {
  background: var(--free-bg);
  color: var(--free);
}
.kind-paid {
  background: var(--accent-dim);
  color: var(--accent);
}
.kind-dlc {
  background: var(--fair-bg);
  color: var(--fair);
}
.kind-other {
  background: rgba(255, 255, 255, 0.06);
  color: var(--soft);
}

/* —— Beyond Steam BETA —— */
.accounts-beta-pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(246, 135, 179, 0.25), rgba(102, 192, 244, 0.25));
  border: 1px solid rgba(246, 135, 179, 0.4);
  color: #f9a8d4;
  margin: 0 0 0.5rem;
}
.beyond-steam-bar {
  border-bottom: 1px solid var(--border);
  background: rgba(246, 135, 179, 0.05);
  padding: 0.65rem 0;
  margin-bottom: 0.5rem;
}
.beyond-steam-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.beyond-steam-bar__text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.beyond-steam-bar__hint {
  color: var(--soft);
  font-size: 0.8rem;
}
.beyond-steam-bar__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.beyond-steam-bar__note {
  margin: 0.35rem auto 0;
  font-size: 0.75rem;
  color: var(--fair);
  line-height: 1.4;
}
.beta-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
}
.beta-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.beta-toggle__ui {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  position: relative;
  transition: background 0.15s;
}
.beta-toggle__ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.15s, background 0.15s;
}
.beta-toggle input:checked + .beta-toggle__ui {
  background: rgba(102, 192, 244, 0.35);
  border-color: rgba(102, 192, 244, 0.55);
}
.beta-toggle input:checked + .beta-toggle__ui::after {
  transform: translateX(18px);
  background: var(--accent);
}
.beta-toggle__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  min-width: 1.5rem;
}
.btn-sm {
  padding: 0.4rem 0.75rem !important;
  font-size: 0.8rem !important;
}
.plat-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.2rem;
  align-items: center;
}
.plat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--plat, #66c0f4) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--plat, #66c0f4) 45%, transparent);
  color: var(--text);
  white-space: nowrap;
}
.plat-badge--lg {
  font-size: 0.72rem;
  padding: 0.35rem 0.5rem;
  min-width: 2.5rem;
}
.ext-limited-tag {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(240, 193, 75, 0.12);
  border: 1px solid rgba(240, 193, 75, 0.3);
  color: var(--fair);
}
.game-cell__text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.game-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.row-external {
  background: rgba(246, 135, 179, 0.04);
}

/* Accounts page */
.accounts-page {
  padding: 2rem 0 4rem;
  max-width: 52rem;
}
.accounts-page h1 {
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
}
.accounts-lead {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 1.5rem;
  max-width: 40rem;
}
.accounts-gate {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  text-align: center;
}
.accounts-card {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  margin-bottom: 1rem;
}
.accounts-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.accounts-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.platform-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 2px solid var(--plat, var(--accent));
}
.platform-card__top {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}
.platform-card__titles {
  flex: 1;
  min-width: 0;
}
.platform-card__titles h3 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
}
.platform-card__status {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--soft);
  white-space: nowrap;
}
.platform-card__status.is-on {
  color: var(--good);
}
.platform-card__caps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  font-size: 0.72rem;
  color: var(--soft);
  margin-bottom: 0.55rem;
}
.platform-card__form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.link-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.link-field input,
.link-field select {
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font: inherit;
}
.platform-card__actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.title-track-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.title-track-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}
.title-track-list .search-hint {
  flex: 1 1 100%;
  margin: 0;
}

/* —— Game profile —— */
.game-hero {
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-top: 0.5rem;
}
@media (max-width: 700px) {
  .game-hero {
    grid-template-columns: 1fr;
  }
}
.game-hero__img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--steam);
  aspect-ratio: 460 / 215;
  object-fit: cover;
}
.game-hero__body h2 {
  margin: 0.25rem 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: -0.03em;
}
.game-hero__meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 650;
}
.game-hero__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 50ch;
}
.game-name-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-name-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}
/* Games table: keep long titles inside the cell */
.game-cell {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.game-cell .game-name-link {
  display: block;
  min-width: 0;
}
.search-results {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 280px;
  overflow-y: auto;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.search-result:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.search-result img {
  border-radius: 3px;
  background: var(--steam);
}
.search-result__id {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--soft);
  font-variant-numeric: tabular-nums;
}
.break-even__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
}
.break-even__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}
.break-even__card .label {
  font-size: 0.75rem;
  color: var(--soft);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.break-even__card .value {
  margin-top: 0.35rem;
  font-size: 1.25rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.you-vs {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(102, 192, 244, 0.05);
}
.results__verdict--ok {
  background: var(--fair-bg);
  color: var(--fair);
}
.results__verdict--unknown {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}
.results__verdict--free {
  background: var(--free-bg);
  color: var(--free);
}
