/* STBHUB.gg — static companion site */

:root {
  /* Deep indigo night + neon accents */
  --bg-deep: #05060d;
  --bg-aurora: radial-gradient(
      1200px 800px at 10% -10%,
      rgba(99, 102, 241, 0.35),
      transparent 55%
    ),
    radial-gradient(900px 600px at 90% 0%, rgba(236, 72, 153, 0.18), transparent 50%),
    radial-gradient(700px 500px at 50% 100%, rgba(34, 211, 238, 0.12), transparent 45%);
  --bg-panel: rgba(15, 20, 38, 0.75);
  --bg-card: rgba(18, 26, 48, 0.88);
  --border: rgba(148, 163, 184, 0.14);
  --border-glow: rgba(168, 85, 247, 0.28);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-2: #a855f7;
  --accent-3: #f472b6;
  --accent-dim: rgba(34, 211, 238, 0.14);
  --accent-dim-2: rgba(168, 85, 247, 0.12);
  --focus-ring: rgba(34, 211, 238, 0.5);
  --rarity-common: #cbd5e1;
  --rarity-rare: #38bdf8;
  --rarity-epic: #c084fc;
  --rarity-legendary: #fcd34d;
  --rarity-mythic: #dc2626;
  --rarity-secret: #0a0a0a;
  --rarity-eternal: #f87171;
  --rarity-admin: #c084fc;
  --rarity-goat: #006666;
  --rarity-luckyrot: #fbbf24;
  --radius: 10px;
  --font: "Barlow", system-ui, sans-serif;
}

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  background-color: var(--bg-deep);
  background-image: var(--bg-aurora);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(168, 85, 247, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% -5%, black 25%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(12, 16, 32, 0.92) 0%,
    rgba(8, 10, 22, 0.78) 100%
  );
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(168, 85, 247, 0.12);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.75rem max(1.25rem, env(safe-area-inset-right)) 0.75rem max(1.25rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.logo-mark {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.logo-text {
  color: var(--muted);
  font-weight: 600;
}

/* Logo + Fortnite.gg-style “more pages” mega panel */
.site-brand {
  position: relative;
  z-index: 22;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  flex: 0 0 auto;
}

.site-brand__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.2rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  line-height: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-brand__toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.site-brand__chev {
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  transition: transform 0.2s ease;
}

.site-brand:hover .site-brand__chev,
.site-brand:focus-within .site-brand__chev,
.site-brand.site-brand--open .site-brand__chev {
  transform: rotate(180deg);
}

.site-brand:hover .logo,
.site-brand:focus-within .logo {
  transform: scale(1.03);
  filter: brightness(1.08);
}

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

  .site-brand:hover .logo,
  .site-brand:focus-within .logo {
    transform: none;
    filter: none;
  }

  .site-brand__chev {
    transition: none;
  }
}

.nav-mega {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: min(100vw - 2rem, 22rem);
  max-width: 26rem;
  padding: 0.65rem 0.75rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(55, 65, 81, 0.85);
  background: rgba(17, 24, 39, 0.98);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s;
}

.site-brand:hover .nav-mega,
.site-brand:focus-within .nav-mega,
.site-brand.site-brand--open .nav-mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-mega__inner {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.nav-mega__eyebrow {
  margin: 0;
  padding: 0 0.15rem 0.35rem;
  border-bottom: 1px solid rgba(55, 65, 81, 0.9);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
}

.nav-mega__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.65rem;
}

.nav-mega__link.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.42rem 0.55rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e5e7eb;
  text-align: left;
  white-space: nowrap;
}

.nav-mega__link.nav-tab:hover {
  background: rgba(55, 65, 81, 0.65);
  color: #fff;
}

.nav-mega__link.nav-tab.is-active {
  background: rgba(75, 85, 99, 0.85);
  border-color: transparent;
  box-shadow: none;
}

.nav-mega__ico {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.95;
}

@media (max-width: 420px) {
  .nav-mega__grid {
    grid-template-columns: 1fr;
  }

  .nav-mega__link.nav-tab {
    white-space: normal;
  }
}

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

  .site-brand:hover .nav-mega,
  .site-brand:focus-within .nav-mega,
  .site-brand.site-brand--open .nav-mega {
    transform: none;
  }
}

.main-nav {
  display: flex;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.nav-tab--catalog {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
}

/* ——— Header Discord user ——— */
.header-user {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  margin-left: auto;
  z-index: 25;
}

.header-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0.38rem 0.45rem;
  border-radius: 8px;
  color: #5865f2;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.header-discord:hover {
  background: rgba(88, 101, 242, 0.14);
  color: #7289da;
}

.header-discord:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.header-discord__icon {
  display: block;
  transform-origin: center center;
}

.header-discord:hover .header-discord__icon {
  animation: collection-discord-spin 2.2s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .header-discord:hover .header-discord__icon {
    animation: none;
  }
}

.header-user__guest {
  display: flex;
  align-items: center;
}

/* [hidden] must win over display:flex — otherwise Log in stays visible when logged in */
.header-user__guest[hidden],
.header-user__logged[hidden] {
  display: none !important;
}

.header-user__login {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-glow);
  background: rgba(168, 85, 247, 0.12);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.header-user__login:hover {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.35);
}

.header-user__logged {
  position: relative;
}

.header-user__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 20, 38, 0.85);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  max-width: 200px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.header-user__trigger:hover,
.header-user__logged:focus-within .header-user__trigger,
.header-user__logged.header-user__logged--open .header-user__trigger {
  border-color: var(--border-glow);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.15);
}

.header-user__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.header-user__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.header-user__caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
  flex-shrink: 0;
  margin-left: 0.1rem;
}

.header-user__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  padding: 0.5rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(12, 16, 32, 0.98);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s;
}

.header-user__logged:hover .header-user__dropdown,
.header-user__logged:focus-within .header-user__dropdown,
.header-user__logged.header-user__logged--open .header-user__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.header-user__dropdown-head {
  padding: 0.35rem 0.85rem 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}

.header-user__dropdown-title {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.header-user__dropdown-sub {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.header-user__menu-item {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s;
}

.header-user__menu-item:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

@media (max-width: 720px) {
  .header-user {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
    display: flex;
  }

  .main-nav {
    justify-content: flex-start;
  }
}

.nav-tab {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.nav-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-tab.is-active {
  color: var(--text);
  background: linear-gradient(
    135deg,
    var(--accent-dim) 0%,
    var(--accent-dim-2) 100%
  );
  border-color: var(--border-glow);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.12);
}

.site-alerts {
  position: relative;
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  background: linear-gradient(180deg, rgba(5, 8, 18, 0.65) 0%, transparent 100%);
}

.site-alerts[hidden] {
  display: none !important;
}

.site-alert {
  animation: site-alert-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes site-alert-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-alert {
    animation: none;
  }
}

.site-alert__shell {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.75rem max(1.25rem, env(safe-area-inset-left)) 0.8rem max(1.25rem, env(safe-area-inset-right));
  width: 100%;
}

.site-alert__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  margin-top: 0.05rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.site-alert__icon-svg {
  display: block;
  opacity: 0.95;
}

.site-alert__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
}

.site-alert__text {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.site-alert__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.12s ease;
}

.site-alert__cta:hover {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.35);
}

.site-alert__cta:active {
  transform: scale(0.98);
}

.site-alert__cta-chev {
  font-size: 0.85em;
  opacity: 0.85;
  transition: transform 0.15s ease;
}

.site-alert__cta:hover .site-alert__cta-chev {
  transform: translateX(2px);
}

.site-alert__dismiss {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 300;
  opacity: 0.75;
  transition:
    opacity 0.15s ease,
    background 0.15s ease,
    transform 0.12s ease;
}

.site-alert__dismiss:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.3);
}

.site-alert__dismiss:active {
  transform: scale(0.94);
}

.site-alert--danger {
  color: #fecdd3;
  background: linear-gradient(
    100deg,
    rgba(127, 29, 29, 0.42) 0%,
    rgba(69, 10, 10, 0.35) 45%,
    rgba(30, 8, 12, 0.55) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(254, 202, 202, 0.12),
    inset 4px 0 0 0 rgba(248, 113, 113, 0.85);
  border-bottom: 1px solid rgba(248, 113, 113, 0.12);
}

.site-alert--danger .site-alert__icon {
  background: rgba(185, 28, 28, 0.35);
  color: #fecaca;
}

.site-alert--warning {
  color: #fef3c7;
  background: linear-gradient(
    100deg,
    rgba(146, 64, 14, 0.38) 0%,
    rgba(90, 50, 8, 0.32) 50%,
    rgba(35, 22, 8, 0.52) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(253, 230, 138, 0.1),
    inset 4px 0 0 0 rgba(251, 191, 36, 0.9);
  border-bottom: 1px solid rgba(251, 191, 36, 0.12);
}

.site-alert--warning .site-alert__icon {
  background: rgba(180, 83, 9, 0.35);
  color: #fde68a;
}

.site-alert--info {
  color: #e0f2fe;
  background: linear-gradient(
    100deg,
    rgba(12, 74, 110, 0.4) 0%,
    rgba(8, 47, 73, 0.33) 50%,
    rgba(6, 24, 40, 0.48) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(186, 230, 253, 0.1),
    inset 4px 0 0 0 rgba(56, 189, 248, 0.85);
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}

.site-alert--info .site-alert__icon {
  background: rgba(3, 105, 161, 0.35);
  color: #bae6fd;
}

.site-alerts--home {
  margin: 0 0 1.5rem;
  border-bottom: none;
  background: none;
  z-index: auto;
}

.site-alerts--home .site-alert {
  border-radius: 12px;
  overflow: hidden;
  border-bottom: none;
}

.site-alerts--home .site-alert + .site-alert {
  margin-top: 0.65rem;
}

.site-alerts--home .site-alert__shell {
  max-width: none;
  padding: 0.75rem 0.95rem 0.85rem;
}

.main {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem max(1.25rem, env(safe-area-inset-left)) 4rem max(1.25rem, env(safe-area-inset-right));
  padding-bottom: max(4rem, calc(2rem + env(safe-area-inset-bottom, 0px)));
}

.hero {
  margin-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(
    115deg,
    #f8fafc 0%,
    #e2e8f0 35%,
    #c4b5fd 70%,
    #22d3ee 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.lede {
  margin: 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.lede code {
  font-family: ui-monospace, monospace;
  font-size: 0.88em;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.feature-card {
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--border-glow);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(34, 211, 238, 0.08) inset;
  transform: translateY(-2px);
}

.feature-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.link-btn {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(34, 211, 238, 0.45);
  text-underline-offset: 3px;
  display: inline-block;
}

.link-btn:hover {
  color: #67e8f9;
  text-decoration-color: rgba(103, 232, 249, 0.7);
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.panel-head-text {
  min-width: 0;
}

.panel-sub {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--muted);
  max-width: 42ch;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.toolbar--brainrots .search-wrap--brainrots {
  flex: 1 1 14rem;
  min-width: 0;
}

.toolbar--brainrots .search-input--brainrots {
  width: 100%;
  min-width: 260px;
  max-width: 28rem;
}

.toolbar--brainrots {
  margin-bottom: 1.25rem;
}

.search-input,
.select {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  min-width: 180px;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-input:focus,
.select:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
  border-color: rgba(34, 211, 238, 0.35);
}

.brainrot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.brainrot-catalog {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.brainrots-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.brainrots-tab {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.5rem 0.9rem;
  margin: 0 0 -1px;
  border: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.brainrots-tab:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.45);
}

.brainrots-tab--active {
  color: var(--text);
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.22);
  border-bottom-color: rgba(15, 23, 42, 0.85);
}

.brainrots-tab:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.brainrots-panel-sub {
  margin: 0 0 1rem;
}

.brainrots-rate-content {
  max-width: 52rem;
}

.brainrots-rate-header {
  margin-bottom: 1rem;
}

.brainrots-rate-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brainrots-rate-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.brainrots-rate-note code {
  font-size: 0.82em;
}

.brainrots-rate-intro-list {
  margin: 0 0 1rem 1.1rem;
  padding: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.brainrots-rate-table-wrap {
  margin-top: 0.5rem;
}

.lucky-th-mult {
  text-align: right;
  width: 4rem;
}

.lucky-rate-cell--mult {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.brainrot-rarity-section {
  min-width: 0;
}

.brainrot-rarity-section--boxed {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.2rem;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.55), rgba(12, 16, 32, 0.35));
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.brainrot-rarity-section--boxed h3.brainrot-rarity-heading {
  margin-bottom: 1rem;
}

h3.brainrot-rarity-heading {
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 2.65rem;
  padding: 0.55rem 1rem 0.55rem 0.9rem;
  border-radius: calc(var(--radius) + 2px);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}

.brainrot-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}

.brainrot-card:hover {
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(34, 211, 238, 0.06) inset;
  transform: translateY(-3px);
}

.brainrot-card--link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.brainrot-card__thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(
    145deg,
    rgba(30, 27, 75, 0.9) 0%,
    rgba(15, 23, 42, 0.95) 45%,
    rgba(88, 28, 135, 0.35) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.brainrot-card__thumb.brainrot-thumb.has-img {
  /* Flex centers the square atlas (absolute+left:50% was pinning the frame top-left / past rounded corners). */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
  background: var(--bg-card);
  overflow: hidden;
}

/*
 * List cards use a 16:10 thumb; atlas background % scales X/Y separately → stretched sprites.
 * Map the sheet on a centered square (full thumb height), same idea as detail hero.
 */
.brainrot-card__thumb.has-img .brainrot-thumb__atlas-frame {
  position: relative !important;
  inset: unset !important;
  left: auto !important;
  top: auto !important;
  transform: none;
  flex: 0 0 auto;
  align-self: center;
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
}

.brainrot-card__thumb.has-img .brainrot-thumb__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brainrot-thumb {
  position: relative;
  overflow: hidden;
}

.brainrot-thumb__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
}

/* CSS spritesheet slice (same cell order as game: row-major, left-to-right). */
.brainrot-thumb__sprite {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  z-index: 1;
  pointer-events: none;
}

.brainrot-thumb__atlas {
  z-index: 1;
}

/* Tiled sheet PNG slice via background-size / background-position (row-major index). */
.brainrot-thumb__atlas-slice {
  position: absolute;
  inset: 0;
  display: block;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  z-index: 1;
}

.brainrot-thumb__fallback {
  position: relative;
  z-index: 0;
}

.brainrot-thumb.has-img .brainrot-thumb__fallback {
  visibility: hidden;
}

.brainrot-card__body {
  padding: 1rem;
}

.brainrot-card__name {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.brainrot-card__rarity {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  margin-bottom: 0.65rem;
}

.rarity-common {
  color: var(--rarity-common);
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.rarity-rare {
  color: var(--rarity-rare);
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.28);
}
.rarity-epic {
  color: var(--rarity-epic);
  background: rgba(192, 132, 252, 0.16);
  border: 1px solid rgba(192, 132, 252, 0.3);
}
.rarity-legendary {
  color: var(--rarity-legendary);
  background: rgba(252, 211, 77, 0.14);
  border: 1px solid rgba(252, 211, 77, 0.35);
}
.rarity-mythic {
  color: var(--rarity-mythic);
  background: rgba(220, 38, 38, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.45);
}
.rarity-brainrot-god {
  color: transparent;
  background-image: linear-gradient(
    95deg,
    #ff1744,
    #ff9100,
    #ffea00,
    #00e676,
    #00b0ff,
    #651fff,
    #d500f9,
    #ff1744
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.06);
}
.rarity-secret {
  color: var(--rarity-secret);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.35);
  text-shadow: none;
}
.rarity-eternal {
  color: var(--rarity-eternal);
  background: rgba(153, 27, 27, 0.28);
  border: 1px solid rgba(248, 113, 113, 0.45);
}
.rarity-admin {
  color: #e9d5ff;
  background: rgba(126, 34, 206, 0.32);
  border: 1px solid rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.12);
}
.rarity-goat {
  color: var(--rarity-goat);
  background: rgba(0, 102, 102, 0.12);
  border: 1px solid rgba(0, 102, 102, 0.45);
  text-shadow: 2px 2px 0 #000000;
}
.rarity-luckyrot {
  color: #fffbeb;
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.22),
    rgba(180, 83, 9, 0.18)
  );
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.12);
}

/* Catalog section titles: full-width bars (overrides pill .rarity-* on h3) */
h3.brainrot-rarity-heading.rarity-common {
  color: #e8edf5;
  background: linear-gradient(
    105deg,
    rgba(148, 163, 184, 0.16) 0%,
    rgba(15, 20, 38, 0.72) 52%
  );
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-left: 4px solid var(--rarity-common);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

h3.brainrot-rarity-heading.rarity-rare {
  color: #e0f2fe;
  background: linear-gradient(
    105deg,
    rgba(56, 189, 248, 0.14) 0%,
    rgba(15, 20, 38, 0.75) 55%
  );
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-left: 4px solid var(--rarity-rare);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

h3.brainrot-rarity-heading.rarity-epic {
  color: #f3e8ff;
  background: linear-gradient(
    105deg,
    rgba(192, 132, 252, 0.16) 0%,
    rgba(15, 20, 38, 0.78) 55%
  );
  border: 1px solid rgba(192, 132, 252, 0.32);
  border-left: 4px solid var(--rarity-epic);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

h3.brainrot-rarity-heading.rarity-legendary {
  color: #fffbeb;
  background: linear-gradient(
    105deg,
    rgba(252, 211, 77, 0.14) 0%,
    rgba(15, 20, 38, 0.8) 55%
  );
  border: 1px solid rgba(252, 211, 77, 0.35);
  border-left: 4px solid var(--rarity-legendary);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

h3.brainrot-rarity-heading.rarity-mythic {
  color: #fee2e2;
  background: linear-gradient(
    105deg,
    rgba(220, 38, 38, 0.18) 0%,
    rgba(15, 20, 38, 0.82) 55%
  );
  border: 1px solid rgba(248, 113, 113, 0.38);
  border-left: 4px solid var(--rarity-mythic);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

h3.brainrot-rarity-heading.rarity-brainrot-god {
  position: relative;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  background: linear-gradient(
    125deg,
    rgba(101, 31, 255, 0.2) 0%,
    rgba(15, 20, 38, 0.92) 58%
  );
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding-left: 1.1rem;
  overflow: hidden;
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

h3.brainrot-rarity-heading.rarity-brainrot-god::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: calc(var(--radius) + 2px) 0 0 calc(var(--radius) + 2px);
  background: linear-gradient(
    180deg,
    #ff1744,
    #ff9100,
    #ffea00,
    #00e676,
    #651fff,
    #d500f9
  );
}

h3.brainrot-rarity-heading.rarity-secret {
  color: #f8fafc;
  background: linear-gradient(
    105deg,
    rgba(226, 232, 240, 0.12) 0%,
    rgba(15, 20, 38, 0.88) 55%
  );
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-left: 4px solid #e2e8f0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

h3.brainrot-rarity-heading.rarity-eternal {
  color: #fecaca;
  background: linear-gradient(
    105deg,
    rgba(153, 27, 27, 0.28) 0%,
    rgba(15, 20, 38, 0.82) 55%
  );
  border: 1px solid rgba(248, 113, 113, 0.42);
  border-left: 4px solid var(--rarity-eternal);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

h3.brainrot-rarity-heading.rarity-admin {
  color: #f3e8ff;
  background: linear-gradient(
    105deg,
    rgba(126, 34, 206, 0.28) 0%,
    rgba(15, 20, 38, 0.82) 55%
  );
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-left: 4px solid #c084fc;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(168, 85, 247, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

h3.brainrot-rarity-heading.rarity-goat {
  color: #ccfbf1;
  background: linear-gradient(
    105deg,
    rgba(0, 102, 102, 0.22) 0%,
    rgba(15, 20, 38, 0.82) 55%
  );
  border: 1px solid rgba(0, 102, 102, 0.42);
  border-left: 4px solid var(--rarity-goat);
  text-shadow: none;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

h3.brainrot-rarity-heading.rarity-luckyrot {
  color: #fffbeb;
  background: linear-gradient(
    105deg,
    rgba(251, 191, 36, 0.18) 0%,
    rgba(15, 20, 38, 0.82) 52%
  );
  border: 1px solid rgba(251, 191, 36, 0.38);
  border-left: 4px solid var(--rarity-luckyrot);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    0 0 20px rgba(251, 191, 36, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.brainrot-stats {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.brainrot-stats li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.brainrot-stats strong {
  color: var(--text);
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}

.loading-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.loading-state.is-error {
  color: #fca5a5;
}

/* —— Admin machine (same patterns as Traits / Lucky rots) —— */
.admin-machine-page {
  max-width: 100%;
}

.admin-machine-live-section {
  margin-bottom: 0;
}

.admin-machine-live-section.lucky-section--panel .admin-machine-live {
  margin: 0;
}

/* Live preview card: dark panels like lucky-col--panel + readable type */
.admin-machine-live {
  position: relative;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.admin-machine-live__inner {
  padding: 0;
}

.admin-machine-live__top {
  margin: 0 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.admin-machine-live__phase {
  display: inline-block;
  margin-bottom: 0.55rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.admin-machine-live__phase.is-next {
  background: rgba(34, 211, 238, 0.12);
  color: #5eebf0;
  border: 1px solid rgba(34, 211, 238, 0.28);
}

.admin-machine-live__countdown {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.admin-machine-live__countdown strong {
  color: #5eebf0;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.admin-machine-live__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 560px) {
  .admin-machine-live__body {
    grid-template-columns: 1fr;
  }
}

.admin-machine-live__stat {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: rgba(8, 12, 28, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.admin-machine-live__stat--traits {
  grid-column: 1 / -1;
  background: rgba(15, 23, 42, 0.35);
}

.admin-machine-live__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.admin-machine-live__value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e8edf4;
  line-height: 1.35;
  word-break: break-word;
}

.admin-machine-live__value--brainrot a {
  color: #7dd3fc;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(125, 211, 252, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.admin-machine-live__value--brainrot a:hover {
  color: #bae6fd;
  border-bottom-color: rgba(186, 230, 253, 0.55);
}

.admin-machine-live__value--boost {
  display: flex;
  align-items: stretch;
}

.admin-machine-live__trait-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: flex-start;
  min-height: 2.5rem;
}

.admin-machine-live__icon-slot {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 4.25rem;
  max-width: 6.5rem;
  padding: 0.45rem 0.4rem;
  border-radius: 8px;
  background: rgba(12, 16, 32, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.admin-machine-live__icon-slot--boost {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  min-width: 0;
  max-width: none;
  width: 100%;
  padding: 0.55rem 0.65rem;
}

.admin-machine-live__slot-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}

.admin-machine-live__icon-slot--trait .admin-machine-live__slot-img {
  width: 48px;
  height: 48px;
}

.admin-machine-live__icon-slot.no-img .admin-machine-live__slot-img {
  display: none;
}

.admin-machine-live__icon-slot-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #e8edf4;
  text-align: center;
  line-height: 1.2;
}

.admin-machine-live__icon-slot--boost .admin-machine-live__icon-slot-label {
  font-size: 0.88rem;
  text-align: left;
}

.admin-machine-live__trait-none {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  font-style: italic;
}

.admin-machine-ref + .admin-machine-ref {
  margin-top: 1.5rem;
}

@media (min-width: 900px) {
  .admin-machine-ref-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.stats-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.stat-block--wide {
  grid-column: 1 / -1;
}

.stats-source {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.stat-list--types li span:last-child {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--accent);
}

.stat-block {
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-panel);
}

.stat-block h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}

.stat-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.stat-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.stat-list li:last-child {
  border-bottom: none;
}

.stat-dl {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.stat-dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.95rem;
}

.stat-dl dt {
  margin: 0;
  color: var(--muted);
}

.stat-dl dd {
  margin: 0;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.site-footer {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem max(1.25rem, env(safe-area-inset-left)) max(2rem, env(safe-area-inset-bottom))
    max(1.25rem, env(safe-area-inset-right));
  border-top: 1px solid var(--border);
  box-shadow: 0 -1px 0 rgba(168, 85, 247, 0.08);
}

.site-footer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Brainrot detail (fortnite.gg–style) */
.detail-inner {
  padding-bottom: 2rem;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb__sep {
  margin: 0 0.5rem;
  opacity: 0.45;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.detail-preview {
  min-width: 0;
}

@media (min-width: 900px) {
  .detail-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  }
}

.detail-preview__stage {
  /* Cap width so the card stays ~416×520 (4:5 @ max-height 520), not full grid column — same “old” hero size. */
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  aspect-ratio: 4 / 5;
  max-height: 520px;
  background: linear-gradient(160deg, #1e88e5 0%, #1565c0 45%, #0d47a1 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(4rem, 14vw, 8.5rem);
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

/* Flex + square frame: grid was shrinking the atlas row (tiny icon). Clip to rounded rect. */
.detail-preview__stage.brainrot-thumb.has-img {
  /*
   * Tweak the detail hero (spritesheet slice or <img>). Default nudge is a hair down so pixel art
   * reads visually centered in the 4:5 card. Optional per-brainrot overrides use data-brainrot-slug.
   */
  --detail-icon-nudge-x: 0px;
  --detail-icon-nudge-y: 60px;
  --detail-icon-scale: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  position: relative;
  min-width: 0;
  background: linear-gradient(160deg, #1e88e5 0%, #1565c0 45%, #0d47a1 100%);
  overflow: hidden;
  border-radius: var(--radius);
}

.detail-preview__stage.has-img .brainrot-thumb__atlas-slice {
  transform: translate(var(--detail-icon-nudge-x, 0px), var(--detail-icon-nudge-y, 0px))
    scale(var(--detail-icon-scale, 1));
  transform-origin: center center;
}

.detail-preview__stage.has-img > .brainrot-thumb__img {
  transform: translate(var(--detail-icon-nudge-x, 0px), var(--detail-icon-nudge-y, 0px))
    scale(var(--detail-icon-scale, 1));
  transform-origin: center center;
}

.detail-preview__stage.brainrot-thumb .brainrot-thumb__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-preview__img {
  z-index: 2;
}

.detail-preview__glyph--fallback {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 6px 32px rgba(0, 0, 0, 0.35);
}

.detail-preview__stage.has-img .detail-preview__glyph--fallback {
  visibility: hidden;
}

/*
 * Detail hero is 4:5; atlas uses background-size % on both axes, which maps the sheet to
 * the full rectangle and stretches non-square boxes. Use a centered square frame so pixels stay square.
 */
.detail-preview__stage.has-img .brainrot-thumb__atlas-frame {
  position: relative !important;
  inset: unset !important;
  left: auto !important;
  top: auto !important;
  transform: none;
  align-self: stretch;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  height: auto;
  max-height: 100%;
  box-sizing: border-box;
  z-index: 2;
}

.detail-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.2rem, 2.8vw, 1.65rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.detail-rarity-badge {
  font-size: 0.62rem;
  margin-bottom: 1rem;
}

.detail-tagline {
  font-style: italic;
  color: var(--muted);
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}

.detail-meta {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.detail-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.detail-meta dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.detail-meta dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.detail-meta-hint {
  font-weight: 500;
  font-size: 0.82em;
  color: var(--muted);
}

.detail-carpet-footnote {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 52ch;
}

.detail-audio {
  margin: 1.5rem 0 0;
}

.detail-audio__title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.detail-audio__player {
  width: 100%;
  max-width: 28rem;
  height: 2.5rem;
  border-radius: 8px;
}

.detail-section {
  margin-top: 2rem;
}

.detail-section h2 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.detail-section__lede {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.detail-section__lede code {
  font-size: 0.85em;
  color: var(--accent);
}

.style-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 0.75rem;
}

.style-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-decoration: none;
  color: var(--text);
  font-size: 0.72rem;
  gap: 0.35rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.style-tile:hover {
  border-color: var(--border-glow);
}

.style-tile.is-active {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.08) inset;
}

.style-tile--static {
  cursor: default;
  pointer-events: none;
}

.style-tile--static:hover {
  border-color: var(--border);
}

button.style-tile.style-tile--pick {
  font: inherit;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

button.style-tile.style-tile--pick:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

#detail-income-type-meta:empty {
  display: none;
}

.style-tile__mult {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
}

/* Square cap: width:100% + max-height without max-width made a wide short box → stretched atlas icons. */
.style-tile__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 52px);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  margin-inline: auto;
  margin-bottom: 0.15rem;
  position: relative;
  overflow: hidden;
}

.style-tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
}

.style-tile__media.has-img .style-tile__glyph {
  visibility: hidden;
}

/* Rainbow type: default icon + soft rainbow tint (no types/rainbow/ asset required) */
.style-tile--rainbow .style-tile__rainbow-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: 6px;
  background: linear-gradient(
    118deg,
    rgba(255, 60, 60, 0.32),
    rgba(255, 180, 40, 0.3),
    rgba(255, 240, 80, 0.28),
    rgba(80, 220, 120, 0.3),
    rgba(60, 160, 255, 0.32),
    rgba(160, 90, 255, 0.34),
    rgba(255, 100, 200, 0.3)
  );
}

.style-tile__glyph {
  font-size: 1.75rem;
  line-height: 1;
}

.style-tile__label {
  font-weight: 600;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 0.75rem;
}

.related-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.65rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  text-decoration: none;
  color: var(--text);
  font-size: 0.72rem;
  gap: 0.35rem;
  transition: transform 0.15s, border-color 0.15s;
}

.related-tile:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.related-tile__thumb {
  width: 100%;
  aspect-ratio: 1;
  max-width: 72px;
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.9), rgba(15, 23, 42, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  overflow: hidden;
}

.related-tile__img {
  border-radius: 4px;
}

.related-tile__glyph {
  position: relative;
  z-index: 0;
}

.related-tile__thumb.has-img .related-tile__glyph {
  visibility: hidden;
}

.related-tile__name {
  font-weight: 700;
  font-size: 0.7rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-tile .brainrot-card__rarity {
  margin: 0;
  font-size: 0.52rem;
}

.btn-secondary {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-secondary:hover {
  border-color: var(--border-glow);
}

.btn-primary {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(96, 165, 250, 0.1));
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-primary:hover {
  border-color: var(--border-glow);
}

.wiki-home {
  max-width: 42rem;
  padding-bottom: 2rem;
}

.wiki-home__eyebrow {
  margin-bottom: 0.35rem;
}

.wiki-home__title {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.wiki-home__lede {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.55;
}

.wiki-home__lede em {
  font-style: normal;
  color: var(--text);
}

.wiki-home__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}

.wiki-home__actions .btn-primary,
.wiki-home__actions .btn-secondary {
  margin-top: 0;
}

.wiki-home__panel {
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  margin-bottom: 1.5rem;
}

.wiki-home__panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.wiki-home__panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.wiki-home__join {
  margin: 0 0 1.75rem;
  padding: 1.35rem 1.35rem 1.45rem;
  border-radius: 12px;
  border: 1px solid rgba(88, 101, 242, 0.38);
  background: linear-gradient(
    155deg,
    rgba(88, 101, 242, 0.14) 0%,
    rgba(15, 23, 42, 0.72) 48%,
    rgba(8, 12, 26, 0.9) 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 16px 48px rgba(0, 0, 0, 0.28);
}

.wiki-home__join-title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

.wiki-home__join-lede {
  margin: 0 0 1.1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

.wiki-home__join-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.15rem;
  border-radius: 8px;
  border: 1px solid rgba(88, 101, 242, 0.45);
  background: rgba(88, 101, 242, 0.22);
  color: #e8eafd;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.wiki-home__join-btn:hover {
  border-color: rgba(129, 140, 248, 0.65);
  background: rgba(99, 102, 241, 0.32);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.15);
}

.wiki-home__join-icon {
  flex-shrink: 0;
  opacity: 0.95;
}

.wiki-home__credits {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.wiki-home__credits-line {
  margin: 0 0 0.5rem;
}

.wiki-home__credits-line:last-child {
  margin-bottom: 0;
}

.wiki-home__credits a {
  color: var(--accent);
  text-decoration: none;
}

.wiki-home__credits a:hover {
  text-decoration: underline;
}

.detail-404 {
  margin: 0 0 1rem;
  color: var(--muted);
}

.detail-back {
  margin-top: 1.5rem;
}

/* —— Rebirth —— */
.rebirth-inner {
  max-width: 100%;
}

.rebirth-hero {
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.rebirth-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(115deg, #f8fafc 0%, #e2e8f0 40%, #a78bfa 75%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Shared “Last updated:” line (rebirth hero, brainrots header, brainrot detail) */
.page-last-updated {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.panel-head-text .page-last-updated {
  margin-top: 0.25rem;
  margin-bottom: 0.15rem;
}

.page-last-updated__label {
  color: var(--muted);
  font-weight: 500;
}

.page-last-updated__date {
  color: var(--text);
  font-weight: 700;
}

.page-last-updated--detail {
  margin: 0.5rem 0 0.85rem;
}

.rebirth-hero .page-last-updated {
  margin: 0.4rem 0 0;
}

.rebirth-meta,
.lucky-meta.rebirth-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.rebirth-meta time,
.lucky-meta.rebirth-meta time {
  color: #cbd5e1;
  font-weight: 600;
}

.gadget-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 26, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.gadget-thumb__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.gadget-thumb__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-2);
  z-index: 0;
}

.gadget-thumb.has-img .gadget-thumb__fallback {
  visibility: hidden;
}

.gadget-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.65rem 0.3rem 0.35rem;
  border-radius: 10px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  background: rgba(11, 17, 32, 0.92);
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.gadget-chip:hover {
  border-color: rgba(34, 211, 238, 0.32);
  background: rgba(15, 24, 44, 0.98);
}

.gadget-chip .gadget-thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.gadget-chip .gadget-thumb__img {
  padding: 2px;
  box-sizing: border-box;
}

.gadget-chip .gadget-thumb__fallback {
  font-size: 0.72rem;
}

.gadget-chip__name {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: #f1f5f9;
  letter-spacing: 0.01em;
}

.gadget-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.55rem;
  align-items: flex-start;
}

.rebirth-cell-gadgets .gadget-chip__name {
  max-width: 12rem;
}

.rebirth-card__gadgets {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(6rem, 38%) 1fr;
  gap: 0.35rem 0.75rem;
  align-items: start;
}

.rebirth-card__gadgets dd {
  min-width: 0;
}

.rebirth-table-wrap {
  display: none;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(12, 16, 32, 0.65);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.rebirth-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  line-height: 1.5;
}

.rebirth-table th,
.rebirth-table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  vertical-align: top;
}

.rebirth-table thead th {
  font-weight: 700;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8899aa;
  background: rgba(6, 10, 22, 0.95);
  white-space: nowrap;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.rebirth-table thead tr:first-child .rebirth-th-group {
  text-align: center;
  font-size: 0.65rem;
  letter-spacing: 0.09em;
  padding-top: 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid rgba(148, 163, 184, 0.35);
}

.rebirth-th-group--req {
  border-bottom-color: rgba(251, 191, 36, 0.55) !important;
  color: #fcd34d;
}

.rebirth-th-group--rew {
  border-bottom-color: rgba(52, 211, 153, 0.5) !important;
  color: #6ee7b7;
}

.rebirth-table thead tr:nth-child(2) th {
  padding-top: 0.55rem;
  padding-bottom: 0.65rem;
}

.rebirth-table tbody tr {
  transition: background 0.12s ease;
}

.rebirth-table tbody tr:hover {
  background: rgba(34, 211, 238, 0.05);
}

.rebirth-table tbody tr:last-child th,
.rebirth-table tbody tr:last-child td {
  border-bottom: none;
}

.rebirth-col-level {
  width: 3rem;
  font-weight: 800;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  color: #5eebf0;
  white-space: nowrap;
}

.rebirth-table tbody .rebirth-col-level {
  padding-top: 0.78rem;
}

.rebirth-cell-brainrots {
  min-width: 10rem;
  max-width: 26rem;
  color: #e8edf4;
  line-height: 1.55;
}

.rebirth-brainrot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  align-items: center;
}

.rebirth-brainrot-list li {
  margin: 0;
}

.rebirth-brainrot-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
}

.rebirth-brainrot-chip .spa-brainrot-link__label {
  word-break: break-word;
}

.brainrot-thumb--rebirth-chip {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.9);
}

.brainrot-thumb--rebirth-chip .brainrot-thumb__img,
.brainrot-thumb--rebirth-chip .brainrot-thumb__atlas-slice {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.brainrot-thumb--rebirth-chip .brainrot-thumb__atlas-frame {
  width: 100%;
  height: 100%;
}

.rebirth-cell-gadgets {
  min-width: 13rem;
  max-width: 38rem;
  padding-top: 0.6rem;
  padding-bottom: 0.65rem;
  vertical-align: top;
}

.rebirth-table td:not(.rebirth-col-level):not(.rebirth-cell-gadgets) {
  font-variant-numeric: tabular-nums;
}

.rebirth-cell-brainrots a,
.rebirth-card__dl a {
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.12s ease;
}

a.spa-brainrot-link {
  cursor: pointer;
}

.rebirth-cell-brainrots a:hover,
.rebirth-card__dl a:hover {
  color: #bae6fd;
}

.rebirth-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.rebirth-card {
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: var(--bg-card);
  padding: 1.1rem 1.15rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.rebirth-card:hover {
  border-color: rgba(148, 163, 184, 0.22);
}

.rebirth-card__head {
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.rebirth-card__block {
  margin: 0;
}

.rebirth-card__block-title {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rebirth-card__block--req .rebirth-card__block-title {
  color: #fbbf24;
}

.rebirth-card__block--rew .rebirth-card__block-title {
  color: #34d399;
}

.rebirth-card__divider {
  height: 1px;
  margin: 0.75rem 0;
  border: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(148, 163, 184, 0.35),
    rgba(148, 163, 184, 0.35),
    transparent
  );
}

.rebirth-card__brainrots .rebirth-brainrot-list {
  justify-content: flex-start;
}

.rebirth-card__lvl {
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent);
}

.rebirth-card__dl {
  margin: 0;
  display: grid;
  gap: 0.5rem 1rem;
}

.rebirth-card__dl > div {
  display: grid;
  grid-template-columns: minmax(6rem, 38%) 1fr;
  gap: 0.35rem 0.75rem;
  align-items: start;
  font-size: 0.85rem;
}

.rebirth-card__dl dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
}

.rebirth-card__dl dd {
  margin: 0;
  line-height: 1.4;
  word-break: break-word;
}

@media (min-width: 900px) {
  .rebirth-table-wrap {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: rgba(100, 116, 139, 0.45) rgba(15, 23, 42, 0.5);
    scrollbar-width: thin;
  }

  .rebirth-table-wrap::-webkit-scrollbar {
    height: 8px;
  }

  .rebirth-table-wrap::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 4px;
  }

  .rebirth-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.45);
    border-radius: 4px;
  }

  .rebirth-table-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.55);
  }

  .rebirth-table .rebirth-col-level {
    position: sticky;
    left: 0;
    z-index: 1;
    background: rgba(12, 16, 32, 0.92);
    backdrop-filter: blur(8px);
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.12);
  }

  .rebirth-table thead .rebirth-col-level {
    background: rgba(6, 10, 22, 0.97);
  }

  .rebirth-table tbody tr:hover .rebirth-col-level {
    background: rgba(14, 20, 38, 0.96);
  }

  .rebirth-cards {
    display: none;
  }
}

/* —— Lucky rots —— */
.lucky-inner {
  max-width: 100%;
}

.lucky-section {
  margin-bottom: 2rem;
}

.lucky-section:last-child {
  margin-bottom: 0;
}

.lucky-section--panel {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.lucky-section__header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.lucky-section__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.lucky-section__title-text {
  flex: 1;
  min-width: 0;
}

.brainrot-thumb--section-rot {
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.92);
}

.brainrot-thumb--section-rot:not(.brainrot-thumb--hero-rot) {
  width: 40px;
  height: 40px;
}

.brainrot-thumb--hero-rot {
  width: 48px;
  height: 48px;
}

.brainrot-thumb--section-rot .brainrot-thumb__img,
.brainrot-thumb--section-rot .brainrot-thumb__atlas-slice {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.brainrot-thumb--section-rot .brainrot-thumb__atlas-frame {
  width: 100%;
  height: 100%;
}

.lucky-hero__title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.lucky-hero.rebirth-hero .lucky-hero__title-row h1 {
  margin: 0;
  flex: 1;
  min-width: min(100%, 10rem);
}

.lucky-section__intro {
  margin: 0;
  max-width: 72ch;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

.lucky-footnote {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  max-width: 72ch;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.lucky-triple-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 700px) and (max-width: 1023px) {
  .lucky-triple-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lucky-triple-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 1.1rem;
  }
}

.lucky-col--panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(8, 12, 28, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  overflow: hidden;
}

.lucky-col__top {
  padding: 0.75rem 0.85rem 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  flex-shrink: 0;
}

.lucky-col__count {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.lucky-col__head {
  margin: 0;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lucky-col__head-text {
  display: inline-block;
}

.lucky-col__head.rarity-mythic {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.lucky-col__head.rarity-brainrot-god {
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(192, 132, 252, 0.28);
  box-shadow: none;
  color: #e9d5ff;
}

.lucky-col__head.rarity-brainrot-god .lucky-col__head-text {
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(
    95deg,
    #ff1744,
    #ff9100,
    #ffea00,
    #00e676,
    #00b0ff,
    #651fff,
    #d500f9,
    #ff1744
  );
  -webkit-background-clip: text;
  background-clip: text;
}

.lucky-col__head.rarity-brainrot-god::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.22);
}

.lucky-col__head.rarity-secret {
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.lucky-col__head.rarity-eternal {
  background: rgba(153, 27, 27, 0.28);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.lucky-col__head.rarity-admin {
  background: rgba(91, 33, 182, 0.35);
  color: #e9d5ff;
  border: 1px solid rgba(167, 139, 250, 0.45);
}

.lucky-col__head.rarity-common {
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.lucky-col__head.rarity-rare {
  background: rgba(14, 165, 233, 0.12);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.lucky-col__head.rarity-epic {
  background: rgba(168, 85, 247, 0.14);
  color: #e9d5ff;
  border: 1px solid rgba(192, 132, 252, 0.22);
}

.lucky-col__head.rarity-legendary {
  background: rgba(250, 204, 21, 0.1);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.lucky-col__head.rarity-goat {
  background: rgba(52, 211, 153, 0.12);
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.lucky-table-wrap--panel {
  flex: 1;
  min-height: 0;
  border-radius: 0;
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: none;
}

.lucky-col--panel .lucky-table-wrap--panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.lucky-th-rate {
  width: 5rem;
  text-align: right !important;
}

.lucky-table-wrap,
.traits-table-wrap {
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(12, 16, 32, 0.65);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: rgba(100, 116, 139, 0.45) rgba(15, 23, 42, 0.5);
  scrollbar-width: thin;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.lucky-table,
.traits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  line-height: 1.45;
}

.lucky-table thead th,
.traits-table thead th {
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #8899aa;
  background: rgba(6, 10, 22, 0.95);
  padding: 0.65rem 0.75rem;
  text-align: left;
}

.lucky-table tbody tr,
.traits-table tbody tr {
  transition: background 0.12s ease;
}

.lucky-table tbody tr:hover,
.traits-table tbody tr:hover {
  background: rgba(34, 211, 238, 0.05);
}

.lucky-table td,
.traits-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  vertical-align: top;
}

.lucky-table tbody tr:last-child td,
.traits-table tbody tr:last-child td {
  border-bottom: none;
}

.lucky-name {
  color: #e8edf4;
}

.lucky-name__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.lucky-name__text {
  min-width: 0;
  flex: 1;
}

.brainrot-thumb--lucky-rate {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.92);
}

.brainrot-thumb--lucky-rate .brainrot-thumb__img,
.brainrot-thumb--lucky-rate .brainrot-thumb__atlas-slice {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.brainrot-thumb--lucky-rate .brainrot-thumb__atlas-frame {
  width: 100%;
  height: 100%;
}

.lucky-table td.lucky-name--with-thumb {
  vertical-align: middle;
}

.lucky-name a {
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.12s ease;
}

.lucky-name a:hover {
  color: #bae6fd;
}

.lucky-rate-cell {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.lucky-rate {
  font-weight: 700;
  color: #5eebf0;
}

.lucky-rate__pct {
  font-weight: 600;
  font-size: 0.85em;
  opacity: 0.85;
  margin-left: 0.05em;
}

.lucky-single {
  max-width: 34rem;
}

.lucky-single--panel {
  max-width: 100%;
}

.lucky-col--single {
  max-width: 30rem;
}

/* —— Traits —— */
.traits-inner {
  max-width: 100%;
}

.traits-footnote {
  margin: 1rem 0 0;
  max-width: 72ch;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.traits-table td.traits-icon-cell {
  width: 3.25rem;
  padding: 0.45rem 0.5rem 0.45rem 0.75rem;
  vertical-align: middle;
}

.traits-name-cell {
  color: #e8edf4;
  font-weight: 600;
}

.traits-mult-note {
  margin: 0 0 1rem;
  max-width: 72ch;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

.traits-mult-cell {
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #a5f3fc;
}

.traits-rate-cell--empty {
  color: var(--muted);
  font-weight: 600;
}

/* Traits table: match header + numeric column alignment (shared thead rule is text-align: left). */
.traits-table thead th:nth-child(3),
.traits-table thead th:nth-child(4) {
  text-align: center;
}

.traits-table td.lucky-rate-cell,
.traits-table td.traits-mult-cell {
  text-align: center;
  vertical-align: middle;
}

/* —— Income calculator —— */
.income-inner {
  max-width: min(56rem, 100%);
  margin: 0 auto;
  padding: 0 0 2rem;
}

.income-hero {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.income-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.income-lede {
  margin: 0 0 0.75rem;
  max-width: 62ch;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.income-lede a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.income-lede a:hover {
  text-decoration: underline;
}

.income-formula {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.income-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 900px) {
  .income-layout {
    grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
    gap: 1.5rem;
  }
}

.income-panel {
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(12, 16, 32, 0.55);
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.income-panel--preview {
  text-align: center;
}

.income-preview__label {
  margin: 0 0 0.65rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.income-preview__thumb.brainrot-thumb--income-calc {
  width: 112px;
  height: 112px;
  margin: 0 auto 0.65rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.9);
}

.brainrot-thumb--income-calc .brainrot-thumb__img,
.brainrot-thumb--income-calc .brainrot-thumb__atlas-slice {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.brainrot-thumb--income-calc .brainrot-thumb__atlas-frame {
  width: 100%;
  height: 100%;
}

.income-preview__name {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.income-preview__out {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #a5f3fc;
  font-variant-numeric: tabular-nums;
}

.income-preview__breakdown {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.income-preview__breakdown strong {
  color: #e2e8f0;
  font-weight: 700;
}

.income-preview-traits-wrap {
  margin: 0.65rem 0 0;
}

.income-preview__traits-label {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.income-preview-traits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem 0.5rem;
}

.income-preview-trait-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.55);
  max-width: 100%;
}

.income-preview-trait-thumb {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.85);
}

.income-preview-trait-thumb .gadget-thumb {
  display: block;
  width: 100%;
  height: 100%;
}

.income-preview-trait-thumb .gadget-thumb__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.income-preview-trait-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

.income-preview-trait-name {
  min-width: 0;
}

.income-preview-trait-mult {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: #a5f3fc;
}

.income-save-preview-btn {
  width: 100%;
  margin-top: 0.85rem;
  margin-bottom: 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.income-save-preview-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.income-field {
  display: block;
  margin-bottom: 1rem;
}

.income-field:last-of-type {
  margin-bottom: 0;
}

.income-field__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.income-select {
  width: 100%;
  max-width: none;
  min-width: 0;
  font-size: 16px;
}

.income-field.income-field--brainrot {
  margin-bottom: 1.75rem;
}

.income-brainrot-hint {
  margin: 0 0 0.75rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(148, 163, 184, 0.95);
}

.income-brainrot-hint strong {
  color: #a5b4fc;
  font-weight: 700;
}

.income-brainrot-picker {
  border-radius: 12px;
  border: 1px solid rgba(100, 116, 139, 0.35);
  background: linear-gradient(165deg, rgba(12, 18, 36, 0.95), rgba(8, 12, 26, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 28px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.income-brainrot-search-wrap {
  padding: 0.65rem 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.35);
}

.income-brainrot-filter {
  width: 100%;
  margin: 0;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(15, 23, 42, 0.75);
  padding: 0.55rem 0.75rem;
  color: var(--text);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.income-brainrot-filter::placeholder {
  color: rgba(148, 163, 184, 0.65);
}

.income-brainrot-filter:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.income-brainrot-cap {
  margin: 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(251, 191, 36, 0.95);
  background: rgba(251, 191, 36, 0.06);
  border-bottom: 1px solid rgba(251, 191, 36, 0.12);
}

.income-brainrot-list {
  max-height: min(52vh, 22rem);
  min-height: 8rem;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: rgba(100, 116, 139, 0.5) rgba(15, 23, 42, 0.5);
  scrollbar-width: thin;
  padding: 0.35rem;
}

.income-brainrot-list::-webkit-scrollbar {
  width: 8px;
}

.income-brainrot-list::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.45);
  border-radius: 4px;
}

.income-brainrot-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  margin: 0 0 0.3rem;
  padding: 0.45rem 0.55rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--text);
  background: rgba(15, 23, 42, 0.25);
  border: 1px solid transparent;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

.income-brainrot-row:last-child {
  margin-bottom: 0;
}

.income-brainrot-row:hover {
  background: rgba(34, 211, 238, 0.06);
  border-color: rgba(34, 211, 238, 0.15);
}

.income-brainrot-row--selected {
  background: linear-gradient(105deg, rgba(34, 211, 238, 0.1), rgba(99, 102, 241, 0.08));
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.12);
}

.income-brainrot-row:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.income-brainrot-row__thumb.brainrot-thumb--income-row {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(8, 12, 28, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  position: relative;
}

.income-brainrot-row__thumb.brainrot-thumb--income-row .brainrot-thumb__img,
.income-brainrot-row__thumb.brainrot-thumb--income-row .brainrot-thumb__atlas-slice {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.income-brainrot-row__thumb.brainrot-thumb--income-row .brainrot-thumb__atlas-frame {
  width: 100%;
  height: 100%;
}

.income-brainrot-row__thumb.brainrot-thumb--income-row .brainrot-thumb__fallback {
  font-size: 0.75rem;
}

.income-brainrot-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.income-brainrot-row__name {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
  color: #f1f5f9;
}

.income-brainrot-row__id {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(148, 163, 184, 0.9);
  font-variant-numeric: tabular-nums;
}

.income-brainrot-no-match {
  margin: 0;
  padding: 0.85rem 0.75rem;
  font-size: 0.85rem;
  color: #fbbf24;
  font-weight: 600;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.income-traits-fieldset {
  margin: 1rem 0 0;
  padding: 0.85rem 0.9rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(8, 12, 28, 0.35);
}

.income-traits-fieldset legend {
  padding: 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.income-traits-hint {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(148, 163, 184, 0.85);
}

.income-mult-note {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.income-trait-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.25rem, 1fr));
  gap: 0.45rem 0.65rem;
}

.income-trait-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text);
  transition: border-color 0.12s ease, background 0.12s ease;
}

.income-trait-label:hover {
  border-color: rgba(34, 211, 238, 0.25);
}

.income-trait-label:has(input:checked) {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.06);
}

.income-trait-cb {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.income-trait-thumb {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.85);
}

.income-trait-thumb .gadget-thumb {
  display: block;
  width: 100%;
  height: 100%;
}

.income-trait-thumb .gadget-thumb__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.income-trait-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  line-height: 1.2;
}

.income-trait-mult {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #a5f3fc;
  font-size: 0.78rem;
}

.income-trait-empty {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.income-footnote {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 72ch;
}

@media (max-width: 520px) {
  .income-trait-grid {
    grid-template-columns: repeat(auto-fill, minmax(9.25rem, 1fr));
  }
}

/* —— Llama rots —— */
.llama-inner {
  max-width: 100%;
}

.llama-intro {
  margin: 0 auto 1.25rem;
  padding: 0;
  max-width: 72ch;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

.llama-intro li + li {
  margin-top: 0.35rem;
}

.llama-section {
  margin-top: 2.25rem;
}

.llama-section__title {
  margin: 0 0 0.85rem;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.llama-section--rebirth {
  text-align: center;
}

.llama-section--rebirth .llama-section__title {
  text-align: center;
}

.llama-rebirth-card {
  margin: 0 auto;
  max-width: 26rem;
  width: 100%;
  text-align: left;
}

.llama-rebirth-card .lucky-table-wrap {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.llama-rebirth-table {
  width: 100%;
}

.llama-rebirth-table thead th {
  padding: 0.75rem 1rem;
  text-align: center;
}

.llama-rebirth-table tbody td {
  padding: 0.65rem 1rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #e2e8f0;
}

.llama-rebirth-table tbody tr:nth-child(even) td {
  background: rgba(34, 211, 238, 0.04);
}

.llama-spawn-note,
.llama-codes-note,
.llama-rates-note,
.llama-brain-intro {
  margin: 0 auto 0.85rem;
  max-width: 72ch;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.llama-section--spawn .llama-spawn-note,
.llama-section--brain .llama-rates-note,
.llama-section--brain .llama-brain-intro {
  margin-left: 0;
  margin-right: 0;
}

.llama-codes-note {
  margin-top: 1.5rem;
  font-weight: 600;
  color: #cbd5e1;
}

.llama-interaction-hints {
  margin: 0 0 1rem;
  max-width: 85ch;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}

.llama-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(8, 12, 26, 0.75);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.llama-table-scroll .lucky-table {
  margin: 0;
  min-width: 44rem;
}

.llama-spawn-table thead th {
  text-align: center;
  padding: 0.7rem 0.65rem;
  white-space: nowrap;
}

.llama-spawn-table thead th:first-child {
  text-align: left;
  padding-left: 0.5rem;
  padding-right: 1rem;
}

.llama-spawn-table th[scope="row"] {
  text-align: left;
  font-weight: 700;
  color: #f1f5f9;
  padding: 0.65rem 0.9rem 0.65rem 0.5rem;
  white-space: nowrap;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
}

.llama-spawn-table td {
  text-align: center;
  padding: 0.6rem 0.55rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #5eebf0;
}

.llama-spawn-table tbody tr:nth-child(even) td {
  background: rgba(34, 211, 238, 0.035);
}

.llama-spawn-table tbody tr:hover td {
  background: rgba(34, 211, 238, 0.08);
}

.llama-brain-table thead th {
  padding: 0.7rem 0.65rem;
  text-align: center;
}

.llama-brain-table thead th:first-child {
  text-align: left;
  padding-left: 0.5rem;
  padding-right: 1rem;
  min-width: 11rem;
  position: sticky;
  left: 0;
  z-index: 3;
  background: rgba(6, 10, 22, 0.98);
  box-shadow: 6px 0 14px rgba(0, 0, 0, 0.2);
}

.llama-brain-table tbody td {
  padding: 0.65rem 0.55rem;
  vertical-align: middle;
}

.llama-brain-table tbody td:not(:first-child) {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #7dd3fc;
}

.llama-brain-table tbody tr:nth-child(even) td {
  background: rgba(34, 211, 238, 0.04);
}

.llama-brain-table tbody tr:hover td {
  background: rgba(34, 211, 238, 0.09);
}

.llama-brain-name {
  text-align: left;
  font-weight: 600;
  max-width: 14rem;
  white-space: normal;
  vertical-align: middle;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(11, 17, 32, 0.92);
  box-shadow: 6px 0 14px rgba(0, 0, 0, 0.18);
}

.llama-brain-table tbody th.llama-brain-name {
  padding: 0.65rem 0.9rem 0.65rem 0.5rem;
}

.llama-table-scroll--brain .llama-brain-name {
  position: sticky;
  left: 0;
  z-index: 2;
}

.llama-brain-table tbody tr:nth-child(even) .llama-brain-name {
  background: rgba(15, 23, 42, 0.85);
}

.llama-brain-table tbody tr:hover .llama-brain-name {
  background: rgba(15, 23, 42, 0.95);
}

.llama-cell--empty {
  color: rgba(148, 163, 184, 0.55);
  font-weight: 600;
}

.llama-footer-notes {
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  max-width: 72ch;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.llama-footer-notes p {
  margin: 0 0 0.5rem;
}

.llama-footer-notes p:last-child {
  margin-bottom: 0;
}

/* —— Interactive map (Fortnite.GG-style shell; data in data/map.json) —— */
.main--wide {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

.view-home {
  margin: 0;
  padding: 0;
}

.map-root {
  min-height: calc(100vh - 3.5rem);
  min-height: calc(100dvh - 3.5rem);
}

.map-page-inner {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: calc(100vh - 3.5rem);
  min-height: calc(100dvh - 3.5rem);
  background: rgba(8, 10, 20, 0.92);
  border-top: 1px solid var(--border);
}

.map-page-inner--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 3.5rem);
  min-height: calc(100dvh - 3.5rem);
}

.map-page-loading {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.map-sidebar {
  flex: 0 0 min(22rem, 92vw);
  max-width: 22rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: linear-gradient(180deg, rgba(10, 14, 28, 0.98) 0%, rgba(6, 8, 18, 0.99) 100%);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  transition: margin 0.2s ease, opacity 0.2s ease;
}

.map-page-inner--sidebar-collapsed .map-sidebar {
  flex-basis: 0;
  min-width: 0;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0;
  border: none;
  pointer-events: none;
}

.map-sidebar__head {
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.map-sidebar__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.map-sidebar__sub {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.map-edit-toolbar {
  margin: 0 0 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(15, 23, 42, 0.65);
}

.map-edit-toolbar__hint {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
}

.map-edit-toolbar__hint code {
  font-size: 0.68rem;
  color: var(--accent);
}

.map-edit-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  margin-bottom: 0.55rem;
}

.map-edit-toolbar__label {
  font-size: 0.72rem;
  color: var(--muted);
}

.map-edit-toolbar__select {
  flex: 1;
  min-width: 6rem;
  font: inherit;
  font-size: 0.8rem;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
}

.map-edit-toolbar__btn {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  cursor: pointer;
}

.map-edit-toolbar__btn:hover {
  border-color: rgba(34, 211, 238, 0.45);
}

.map-edit-toolbar__btn--primary {
  width: 100%;
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent);
}

.map-edit-toolbar__btn--primary:hover {
  background: rgba(34, 211, 238, 0.2);
}

body.map-edit-dragging {
  cursor: grabbing;
  user-select: none;
}

.map-marker.map-marker--editable {
  cursor: grab;
  z-index: 2;
}

.map-marker.map-marker--editable:active {
  cursor: grabbing;
  z-index: 4;
}

.map-sidebar__section {
  padding: 0.75rem 0.65rem 1rem;
  flex: 1;
}

.map-sidebar__section-title {
  margin: 0 0 0.5rem;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8899aa;
}

.map-spawn-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.map-spawn-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.4rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.86rem;
  color: #e2e8f0;
  user-select: none;
}

.map-spawn-toggle:hover {
  background: rgba(34, 211, 238, 0.06);
}

.map-spawn-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.map-spawn-toggle__ui {
  flex: 0 0 2.25rem;
  height: 1.15rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  position: relative;
  transition: background 0.15s ease;
}

.map-spawn-toggle__ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.15rem - 4px);
  height: calc(1.15rem - 4px);
  border-radius: 50%;
  background: #f1f5f9;
  transition: transform 0.15s ease;
}

.map-spawn-toggle input:checked + .map-spawn-toggle__ui {
  background: rgba(52, 211, 153, 0.55);
}

.map-spawn-toggle input:checked + .map-spawn-toggle__ui::after {
  transform: translateX(1.05rem);
}

.map-spawn-toggle__icon {
  flex: 0 0 1.5rem;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.map-spawn-toggle__icon--chest::before {
  content: "📦";
}
.map-spawn-toggle__icon--ammo::before {
  content: "🎯";
}
.map-spawn-toggle__icon--pad::before {
  content: "⬆";
}
.map-spawn-toggle__icon--car::before {
  content: "🚗";
}
.map-spawn-toggle__icon--dot::before {
  content: "●";
  font-size: 0.55rem;
  color: var(--accent);
}
.map-spawn-toggle__icon--llamarot::before {
  content: "🦙";
}
.map-spawn-toggle__icon--boxrot::before {
  content: "📦";
}
.map-spawn-toggle__icon--eggrot::before {
  content: "🥚";
}

.map-spawn-toggle__icon--custom {
  overflow: hidden;
  border-radius: 4px;
  background: transparent;
}

.map-spawn-toggle__icon--custom img {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

.map-spawn-toggle__label {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}

.map-stage {
  flex: 1;
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.map-sidebar-collapse {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 1.75rem;
  height: 2.5rem;
  margin-left: -1px;
  border: 1px solid var(--border);
  border-radius: 0 8px 8px 0;
  background: rgba(12, 16, 32, 0.95);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-sidebar-collapse:hover {
  color: var(--accent);
  border-color: rgba(34, 211, 238, 0.35);
}

.map-page-inner--sidebar-collapsed .map-sidebar-collapse {
  left: 0;
}

.map-viewport {
  flex: 1;
  position: relative;
  overflow: auto;
  min-height: 280px;
}

.map-surface {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, rgba(34, 197, 94, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 30%, rgba(56, 189, 248, 0.1), transparent 50%),
    linear-gradient(165deg, #0c1228 0%, #152238 40%, #1a2f42 70%, #0d1829 100%);
  background-color: #0a0f1c;
}

/* Wraps image + markers so % positions map to the image aspect (no stretch vs a tall min-height box). */
.map-surface__frame {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  flex: 0 0 auto;
}

.map-surface__frame--empty {
  width: 100%;
  max-width: 100%;
  min-height: min(72vh, 820px);
  min-height: min(72dvh, 820px);
}

.map-surface__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  vertical-align: top;
  pointer-events: none;
  object-fit: contain;
}

.map-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.95);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  cursor: default;
}

/* Map pin hover card (rect panel, left of pin); no native title tooltip */
.map-marker__hovercard {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.14s ease,
    visibility 0.14s ease;
  z-index: 50;
  max-width: min(240px, 70vw);
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.4));
}

.map-marker:hover,
.map-marker:focus-within {
  z-index: 40;
}

.map-marker:hover .map-marker__hovercard,
.map-marker:focus-within .map-marker__hovercard {
  opacity: 1;
  visibility: visible;
}

/* Pins near the left edge: open hover card to the right so it stays in view */
.map-marker--tip-right .map-marker__hovercard {
  right: auto;
  left: calc(100% + 12px);
}

.map-marker__hovercard-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-width: 7.25rem;
  padding: 0.5rem 0.75rem 0.55rem 0.65rem;
  border-radius: 8px;
  background: linear-gradient(165deg, rgba(24, 32, 58, 0.98) 0%, rgba(12, 16, 30, 0.99) 55%, rgba(8, 10, 22, 1) 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-left: 3px solid var(--accent);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5) inset,
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.map-marker--tip-right .map-marker__hovercard-inner {
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  border-right: 3px solid var(--accent);
  padding: 0.5rem 0.65rem 0.55rem 0.75rem;
}

.map-marker__hovercard-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: none;
  color: #f8fafc;
  line-height: 1.25;
  word-break: break-word;
}

.map-marker__hovercard-sub {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1.2;
}

.map-marker__hovercard-inner--route-start {
  border-left-color: #22c55e;
}

.map-marker__hovercard-inner--route-end {
  border-left-color: #f87171;
}

.map-marker--tip-right .map-marker__hovercard-inner--route-start {
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  border-right: 3px solid #22c55e;
}

.map-marker--tip-right .map-marker__hovercard-inner--route-end {
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  border-right: 3px solid #f87171;
}

/* Start / end of route (not spawn layers) */
.map-marker--route {
  z-index: 18;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}

.map-marker--route-start .map-marker__route-chip {
  background: linear-gradient(180deg, #15803d 0%, #166534 100%);
  border: 1px solid rgba(34, 197, 94, 0.55);
  color: #ecfdf5;
}

.map-marker--route-end .map-marker__route-chip {
  background: linear-gradient(180deg, #b91c1c 0%, #991b1b 100%);
  border: 1px solid rgba(248, 113, 113, 0.5);
  color: #fef2f2;
}

.map-marker__route-chip {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.45rem;
  border-radius: 5px;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.map-route-legend {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
}

.map-route-legend__label {
  color: var(--muted);
  margin-right: 0.25rem;
}

.map-route-legend__chip {
  display: inline-block;
  font-weight: 700;
  font-size: 0.68rem;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
}

.map-route-legend__chip--start {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.map-route-legend__chip--end {
  background: rgba(248, 113, 113, 0.16);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.map-route-legend__sep::before {
  content: "·";
  margin: 0 0.2rem;
  color: var(--muted);
  font-weight: 400;
}

@media (hover: none) {
  .map-marker__hovercard {
    display: none;
  }
}

.map-marker--chest {
  background: #fbbf24;
}
.map-marker--ammo {
  background: #38bdf8;
}
.map-marker--pad {
  background: #a78bfa;
}
.map-marker--car {
  background: #f472b6;
}
.map-marker--dot {
  background: var(--accent);
}
.map-marker--llamarot {
  background: #22d3ee;
}
.map-marker--boxrot {
  background: #fbbf24;
}
.map-marker--eggrot {
  background: #86efac;
}

.map-marker--custom {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.map-marker--custom .map-marker__img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  /* Receive hover so the FF-style card shows (parent still gets drag in edit mode). */
  pointer-events: auto;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
}

@media (max-width: 768px) {
  .map-page-inner {
    flex-direction: column;
    min-height: auto;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }

  .map-sidebar {
    flex: 0 0 auto;
    max-width: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .map-sidebar-collapse {
    display: none;
  }

  .map-viewport {
    min-height: 50vh;
    min-height: 50dvh;
    -webkit-overflow-scrolling: touch;
  }
}

/* —— Phones & small tablets: layout, touch targets, readable tables —— */
@media (max-width: 720px) {
  body {
    background-attachment: scroll;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  /* Primary tabs (Rebirth, Admin, Collection) stay the top row — not under the logo / Browse menu */
  .site-brand {
    align-self: flex-start;
  }

  .main-nav {
    order: -1;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    gap: 0.2rem;
    padding: 0.2rem 0 0.45rem;
    margin: 0 -0.15rem;
  }

  .main-nav::-webkit-scrollbar {
    height: 3px;
  }

  .main-nav::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.45);
    border-radius: 2px;
  }

  .nav-tab {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0.5rem 0.7rem;
    font-size: 0.82rem;
    touch-action: manipulation;
  }

  .site-brand__toggle {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
    touch-action: manipulation;
  }

  /* Brainrots sub-tabs: stacked full-width for reliable touch targets */
  .brainrots-tabbar {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
    border-bottom: none;
  }

  .brainrots-tab {
    margin: 0;
    min-height: 44px;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.55);
    text-align: center;
    font-size: 0.9rem;
    touch-action: manipulation;
  }

  .brainrots-tab--active {
    border-color: rgba(148, 163, 184, 0.45);
    border-bottom-color: rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.92);
  }

  .brainrots-rate-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .collection-matrix__cell--claim,
  .collection-matrix__cell--na {
    padding: 0.42rem 0.35rem;
  }

  .collection-claim {
    width: 1.2rem;
    height: 1.2rem;
  }

  .collection-merge-btn {
    min-height: 44px;
    touch-action: manipulation;
  }

  .header-discord {
    min-width: 44px;
    min-height: 44px;
    padding: 0.55rem 0.5rem;
  }

  .main {
    padding-top: 1.25rem;
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }

  .panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .search-wrap {
    display: block;
    width: 100%;
  }

  .search-input,
  .select {
    width: 100%;
    min-width: 0;
    max-width: none;
    font-size: 16px;
  }

  .toolbar--brainrots .search-input--brainrots {
    min-width: 0;
    max-width: none;
  }

  .brainrot-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-meta > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.65rem 0;
  }

  .detail-meta dd {
    text-align: left;
  }

  .stats-layout {
    grid-template-columns: 1fr;
  }

  .detail-preview__stage {
    max-height: min(520px, 92vh);
  }

  .rebirth-card__dl > div,
  .rebirth-card__gadgets {
    grid-template-columns: 1fr;
  }

  .feature-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) and (min-width: 480px) {
  .brainrot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ——— Codes ——— */
.codes-page {
  width: 100%;
}

.codes-root {
  max-width: min(720px, 100%);
  margin: 0 auto;
  padding: 0 0 2.5rem;
}

.codes-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.codes-hero {
  text-align: center;
  margin-bottom: 0.25rem;
}

.codes-hero__title {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: #f8fafc;
  text-transform: uppercase;
}

.codes-hero__sub {
  margin: 0.35rem 0 0;
  font-size: clamp(0.95rem, 2.8vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(226, 232, 240, 0.92);
}

.codes-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.codes-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.65);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.codes-tab:hover {
  border-color: rgba(148, 163, 184, 0.55);
}

.codes-tab.codes-tab--kind-active[aria-pressed="true"] {
  background: #f8fafc;
  color: #0f172a;
  border-color: #f8fafc;
}

.codes-tab.codes-tab--kind-expired[aria-pressed="true"] {
  background: linear-gradient(165deg, #b91c1c 0%, #991b1b 100%);
  color: #fff7ed;
  border-color: rgba(254, 202, 202, 0.65);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35);
}

.codes-tab__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.codes-tab__icon--clock {
  transform-origin: 12px 12px;
  animation: codes-clock-swing 3s ease-in-out infinite;
}

@keyframes codes-clock-swing {
  0%,
  100% {
    transform: rotate(0deg);
  }

  20% {
    transform: rotate(14deg);
  }

  40% {
    transform: rotate(-8deg);
  }

  60% {
    transform: rotate(10deg);
  }

  80% {
    transform: rotate(-4deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .codes-tab__icon--clock {
    animation: none;
  }
}

.codes-tab__count {
  font-weight: 700;
  opacity: 0.9;
}

.codes-hint {
  margin: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  text-align: center;
  font-size: 0.82rem;
  color: #bae6fd;
  background: rgba(12, 74, 110, 0.45);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.codes-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.codes-card {
  display: grid;
  grid-template-columns: auto 1fr auto minmax(0, 1.2fr);
  align-items: center;
  gap: 0.65rem 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.75rem 1rem;
  text-align: left;
  border-radius: 12px;
  border: 1px solid rgba(71, 85, 105, 0.65);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  font-family: inherit;
  cursor: default;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.codes-card--clickable {
  cursor: pointer;
}

.codes-card--clickable:hover {
  border-color: rgba(56, 189, 248, 0.35);
}

.codes-card--used {
  opacity: 0.55;
}

.codes-card--used .codes-card__code {
  text-decoration: line-through;
}

.codes-card__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.codes-card__dot--active {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.codes-card__dot--expired {
  background: #f87171;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.35);
}

.codes-card__code {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: #f8fafc;
}

.codes-card__badge {
  flex-shrink: 0;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.codes-card__badge--active {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.codes-card__badge--used {
  background: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.codes-card__badge--expired {
  background: rgba(185, 28, 28, 0.35);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.65);
}

.codes-card--expired {
  border-color: rgba(248, 113, 113, 0.35);
}

.codes-card__reward {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(71, 85, 105, 0.5);
}

@media (min-width: 520px) {
  .codes-card {
    grid-template-columns: auto auto auto minmax(0, 1fr);
  }

  .codes-card__reward {
    grid-column: auto;
  }
}

.codes-card__gift {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: #94a3b8;
}

.codes-empty {
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ——— Collection tracker ——— */
.collection-root {
  max-width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 max(1.25rem, env(safe-area-inset-left)) 2.5rem max(1.25rem, env(safe-area-inset-right));
}

.collection-inner {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.collection-inner--gate {
  align-items: center;
  justify-content: center;
  min-height: min(58vh, 28rem);
  padding-top: 0.5rem;
}

.collection-login-gate {
  width: 100%;
  max-width: 26rem;
  padding: 2rem 1.75rem 2.1rem;
  text-align: center;
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: linear-gradient(165deg, rgba(26, 32, 58, 0.96), rgba(12, 16, 32, 0.9));
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.35);
}

.collection-login-gate__icon-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 1.2rem;
  color: #5865f2;
}

@keyframes collection-discord-spin {
  to {
    transform: rotate(360deg);
  }
}

.collection-login-gate__mark {
  display: block;
  shape-rendering: geometricPrecision;
  transform-origin: center center;
  animation: collection-discord-spin 14s linear infinite;
}

.collection-login-gate__title {
  margin: 0 0 0.6rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.22;
  color: var(--text);
}

.collection-login-gate__lede {
  margin: 0 0 1.45rem;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--muted);
}

.collection-login-gate__lede strong {
  color: #c7d2fe;
  font-weight: 600;
}

.collection-login-gate__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  max-width: 20rem;
  margin: 0 auto;
  padding: 0.62rem 1.2rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  text-decoration: none;
  border-radius: 10px;
  background: #5865f2;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.38);
  transition:
    background 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease;
}

.collection-login-gate__btn:hover {
  background: #4752c4;
  color: #fff;
  box-shadow: 0 6px 22px rgba(88, 101, 242, 0.45);
}

.collection-login-gate__btn:active {
  transform: translateY(1px);
}

.collection-login-gate__btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.collection-login-gate__btn-icon {
  flex-shrink: 0;
  color: inherit;
  transform-origin: center center;
}

.collection-login-gate__btn:hover .collection-login-gate__btn-icon {
  animation: collection-discord-spin 2.5s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .collection-login-gate__mark,
  .collection-login-gate__btn:hover .collection-login-gate__btn-icon {
    animation: none;
  }
}

.collection-login-gate__hint {
  margin: 1.2rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(148, 163, 184, 0.88);
}

.collection-hero {
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(22, 28, 52, 0.92), rgba(12, 16, 32, 0.88));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.collection-hero h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.collection-hero > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  max-width: 42rem;
}

.collection-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 0.75rem;
}

.collection-stat {
  color: var(--muted);
}

.collection-stat strong {
  color: var(--accent);
  font-size: 1.1rem;
}

.collection-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.collection-badge--ro {
  border-color: rgba(168, 85, 247, 0.45);
  color: var(--accent-2);
}

.collection-ro-note {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.collection-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1rem 0.75rem;
  align-items: center;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 20, 38, 0.55);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.collection-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-self: start;
  min-width: 0;
}

.collection-toolbar__filters .search-wrap {
  flex: 1 1 200px;
  min-width: 0;
}

.collection-toolbar__search {
  flex: 1 1 100%;
  min-width: 0;
}

.collection-toolbar__filters .search-input {
  width: 100%;
  min-width: 0;
}

.collection-toolbar__selects {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  flex: 1 1 100%;
  min-width: 0;
}

.collection-toolbar__selects .select {
  flex: 1 1 10rem;
  min-width: 8.5rem;
  max-width: 16rem;
}

.collection-toolbar__filter-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.collection-toolbar__share {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  justify-self: center;
  text-align: center;
  grid-column: 2;
  grid-row: 1;
}

.collection-toolbar__balance {
  grid-column: 3;
  min-height: 1px;
}

.collection-share-out {
  font-size: 0.8rem;
  color: var(--accent);
  word-break: break-all;
  max-width: min(100%, 22rem);
  margin: 0;
}

/* Dark card + muted indigo border — matches “Copy share link” reference */
.collection-merge-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.5rem 1.1rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f8fafc;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 10px;
  cursor: pointer;
  background: rgba(22, 30, 52, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.collection-merge-btn:hover {
  background: rgba(28, 38, 62, 0.96);
  border-color: rgba(129, 140, 248, 0.45);
  color: #ffffff;
}

.collection-merge-btn:active {
  background: rgba(18, 26, 44, 0.98);
}

.collection-merge-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.collection-merge-btn[disabled],
.collection-merge-btn[aria-busy="true"] {
  opacity: 0.65;
  cursor: wait;
  pointer-events: none;
}

@media (max-width: 768px) {
  .collection-toolbar {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .collection-toolbar__share {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
    width: 100%;
  }

  .collection-toolbar__balance {
    display: none;
  }

  .collection-toolbar__filters {
    justify-content: stretch;
  }

  .collection-toolbar__selects {
    flex-direction: column;
    align-items: stretch;
  }

  .collection-toolbar__selects .select {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
  }

  .collection-toolbar #collection-share,
  .collection-toolbar #collection-copy-merge {
    width: 100%;
    max-width: 20rem;
  }
}

.collection-h2 {
  margin: 0.35rem 0 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.collection-by-type {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.collection-type-block {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 24, 48, 0.65), rgba(12, 16, 32, 0.55));
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.2);
}

.collection-type-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  margin: 0;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 20, 38, 0.5);
}

.collection-type-head__text {
  cursor: pointer;
  user-select: none;
  flex: 1;
  min-width: 0;
}

.collection-type-head input {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  accent-color: var(--accent-2);
  cursor: pointer;
}

.collection-type-meta {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.collection-matrix-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  padding: 0 0.85rem 0.85rem;
  box-sizing: border-box;
  scrollbar-color: rgba(148, 163, 184, 0.45) rgba(15, 20, 38, 0.6);
  scrollbar-width: auto;
}

.collection-matrix-wrap::-webkit-scrollbar {
  height: 12px;
}

.collection-matrix-wrap::-webkit-scrollbar-track {
  background: rgba(15, 20, 38, 0.65);
  border-radius: 6px;
}

.collection-matrix-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(148, 163, 184, 0.45),
    rgba(100, 116, 139, 0.55)
  );
  border-radius: 6px;
  border: 2px solid rgba(15, 20, 38, 0.65);
}

.collection-matrix-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.65);
}

.collection-matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.collection-matrix thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.collection-matrix thead .collection-matrix__th--name {
  z-index: 4;
}

.collection-matrix__th {
  padding: 0.4rem 0.35rem;
  text-align: center;
  font-weight: 600;
  color: var(--muted);
  background: rgba(15, 20, 38, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.2);
  white-space: nowrap;
  max-width: 5.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collection-matrix__th--name {
  position: sticky;
  left: 0;
  z-index: 3;
  text-align: left;
  min-width: 10rem;
  max-width: 12rem;
  color: var(--text);
}

.collection-matrix__th--mutation {
  max-width: 4.2rem;
  min-width: 2.75rem;
  font-size: 0.68rem;
  line-height: 1.15;
  padding: 0.35rem 0.25rem;
}

/* Per-mutation color hints: header tint + column stripe + checkbox accent (brainrot_types.json slugs) */
.collection-matrix__th--mutation[data-mutation="default"] {
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.18), rgba(15, 20, 38, 0.96));
  color: #f1f5f9;
  box-shadow: inset 0 -3px 0 rgba(148, 163, 184, 0.45);
}
.collection-matrix__cell--claim[data-mutation="default"],
.collection-matrix__cell--na[data-mutation="default"] {
  background: rgba(148, 163, 184, 0.08);
}
.collection-matrix__cell--claim[data-mutation="default"] .collection-claim {
  accent-color: #94a3b8;
}

.collection-matrix__th--mutation[data-mutation="gold"] {
  background: linear-gradient(180deg, rgba(234, 179, 8, 0.2), rgba(15, 20, 38, 0.96));
  color: #fef08a;
  box-shadow: inset 0 -3px 0 rgba(234, 179, 8, 0.55);
}
.collection-matrix__cell--claim[data-mutation="gold"],
.collection-matrix__cell--na[data-mutation="gold"] {
  background: rgba(234, 179, 8, 0.07);
}
.collection-matrix__cell--claim[data-mutation="gold"] .collection-claim {
  accent-color: #eab308;
}

.collection-matrix__th--mutation[data-mutation="diamond"] {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.18), rgba(15, 20, 38, 0.96));
  color: #cffafe;
  box-shadow: inset 0 -3px 0 rgba(34, 211, 238, 0.55);
}
.collection-matrix__cell--claim[data-mutation="diamond"],
.collection-matrix__cell--na[data-mutation="diamond"] {
  background: rgba(34, 211, 238, 0.07);
}
.collection-matrix__cell--claim[data-mutation="diamond"] .collection-claim {
  accent-color: #22d3ee;
}

.collection-matrix__th--mutation[data-mutation="galaxy"] {
  background: linear-gradient(180deg, rgba(192, 132, 252, 0.2), rgba(15, 20, 38, 0.96));
  color: #f3e8ff;
  box-shadow: inset 0 -3px 0 rgba(192, 132, 252, 0.55);
}
.collection-matrix__cell--claim[data-mutation="galaxy"],
.collection-matrix__cell--na[data-mutation="galaxy"] {
  background: rgba(192, 132, 252, 0.08);
}
.collection-matrix__cell--claim[data-mutation="galaxy"] .collection-claim {
  accent-color: #c084fc;
}

.collection-matrix__th--mutation[data-mutation="zombie"] {
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.16), rgba(15, 20, 38, 0.96));
  color: #dcfce7;
  box-shadow: inset 0 -3px 0 rgba(74, 222, 128, 0.5);
}
.collection-matrix__cell--claim[data-mutation="zombie"],
.collection-matrix__cell--na[data-mutation="zombie"] {
  background: rgba(74, 222, 128, 0.07);
}
.collection-matrix__cell--claim[data-mutation="zombie"] .collection-claim {
  accent-color: #4ade80;
}

.collection-matrix__th--mutation[data-mutation="dreamy"] {
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.18), rgba(15, 20, 38, 0.96));
  color: #ede9fe;
  box-shadow: inset 0 -3px 0 rgba(167, 139, 250, 0.5);
}
.collection-matrix__cell--claim[data-mutation="dreamy"],
.collection-matrix__cell--na[data-mutation="dreamy"] {
  background: rgba(167, 139, 250, 0.07);
}
.collection-matrix__cell--claim[data-mutation="dreamy"] .collection-claim {
  accent-color: #a78bfa;
}

.collection-matrix__th--mutation[data-mutation="ice-fire"] {
  background: linear-gradient(180deg, rgba(251, 146, 60, 0.18), rgba(15, 20, 38, 0.96));
  color: #ffedd5;
  box-shadow: inset 0 -3px 0 rgba(251, 146, 60, 0.55);
}
.collection-matrix__cell--claim[data-mutation="ice-fire"],
.collection-matrix__cell--na[data-mutation="ice-fire"] {
  background: rgba(251, 146, 60, 0.07);
}
.collection-matrix__cell--claim[data-mutation="ice-fire"] .collection-claim {
  accent-color: #fb923c;
}

.collection-matrix__th--mutation[data-mutation="carnival"] {
  background: linear-gradient(180deg, rgba(244, 114, 182, 0.18), rgba(15, 20, 38, 0.96));
  color: #fce7f3;
  box-shadow: inset 0 -3px 0 rgba(244, 114, 182, 0.5);
}
.collection-matrix__cell--claim[data-mutation="carnival"],
.collection-matrix__cell--na[data-mutation="carnival"] {
  background: rgba(244, 114, 182, 0.07);
}
.collection-matrix__cell--claim[data-mutation="carnival"] .collection-claim {
  accent-color: #f472b6;
}

.collection-matrix__th--mutation[data-mutation="aqua"] {
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.18), rgba(15, 20, 38, 0.96));
  color: #cffafe;
  box-shadow: inset 0 -3px 0 rgba(6, 182, 212, 0.55);
}
.collection-matrix__cell--claim[data-mutation="aqua"],
.collection-matrix__cell--na[data-mutation="aqua"] {
  background: rgba(6, 182, 212, 0.07);
}
.collection-matrix__cell--claim[data-mutation="aqua"] .collection-claim {
  accent-color: #06b6d4;
}

.collection-matrix__th--mutation[data-mutation="neon"] {
  background: linear-gradient(180deg, rgba(190, 242, 100, 0.14), rgba(15, 20, 38, 0.96));
  color: #ecfccb;
  box-shadow: inset 0 -3px 0 rgba(190, 242, 100, 0.45);
}
.collection-matrix__cell--claim[data-mutation="neon"],
.collection-matrix__cell--na[data-mutation="neon"] {
  background: rgba(190, 242, 100, 0.06);
}
.collection-matrix__cell--claim[data-mutation="neon"] .collection-claim {
  accent-color: #bef264;
}

.collection-matrix__th--mutation[data-mutation="halloween"] {
  background: linear-gradient(180deg, rgba(234, 88, 12, 0.16), rgba(15, 20, 38, 0.96));
  color: #ffedd5;
  box-shadow: inset 0 -3px 0 rgba(234, 88, 12, 0.55);
}
.collection-matrix__cell--claim[data-mutation="halloween"],
.collection-matrix__cell--na[data-mutation="halloween"] {
  background: rgba(234, 88, 12, 0.07);
}
.collection-matrix__cell--claim[data-mutation="halloween"] .collection-claim {
  accent-color: #ea580c;
}

.collection-matrix__th--mutation[data-mutation="rainbow"] {
  background: linear-gradient(180deg, rgba(232, 121, 249, 0.16), rgba(15, 20, 38, 0.96));
  color: #fae8ff;
  box-shadow: inset 0 -3px 0 rgba(232, 121, 249, 0.5);
}
.collection-matrix__cell--claim[data-mutation="rainbow"],
.collection-matrix__cell--na[data-mutation="rainbow"] {
  background: rgba(232, 121, 249, 0.07);
}
.collection-matrix__cell--claim[data-mutation="rainbow"] .collection-claim {
  accent-color: #e879f9;
}

.collection-matrix__th--mutation[data-mutation="chocolate"] {
  background: linear-gradient(180deg, rgba(180, 83, 9, 0.2), rgba(15, 20, 38, 0.96));
  color: #fef3c7;
  box-shadow: inset 0 -3px 0 rgba(180, 83, 9, 0.5);
}
.collection-matrix__cell--claim[data-mutation="chocolate"],
.collection-matrix__cell--na[data-mutation="chocolate"] {
  background: rgba(180, 83, 9, 0.07);
}
.collection-matrix__cell--claim[data-mutation="chocolate"] .collection-claim {
  accent-color: #b45309;
}

.collection-matrix__th--mutation[data-mutation="lovely"] {
  background: linear-gradient(180deg, rgba(251, 113, 133, 0.16), rgba(15, 20, 38, 0.96));
  color: #ffe4e6;
  box-shadow: inset 0 -3px 0 rgba(251, 113, 133, 0.5);
}
.collection-matrix__cell--claim[data-mutation="lovely"],
.collection-matrix__cell--na[data-mutation="lovely"] {
  background: rgba(251, 113, 133, 0.07);
}
.collection-matrix__cell--claim[data-mutation="lovely"] .collection-claim {
  accent-color: #fb7185;
}

.collection-matrix__th--mutation[data-mutation="darkness"] {
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.18), rgba(15, 20, 38, 0.96));
  color: #ede9fe;
  box-shadow: inset 0 -3px 0 rgba(124, 58, 237, 0.55);
}
.collection-matrix__cell--claim[data-mutation="darkness"],
.collection-matrix__cell--na[data-mutation="darkness"] {
  background: rgba(124, 58, 237, 0.07);
}
.collection-matrix__cell--claim[data-mutation="darkness"] .collection-claim {
  accent-color: #7c3aed;
}

.collection-matrix__th--mutation[data-mutation="toxic"] {
  background: linear-gradient(180deg, rgba(163, 230, 53, 0.12), rgba(15, 20, 38, 0.96));
  color: #ecfccb;
  box-shadow: inset 0 -3px 0 rgba(163, 230, 53, 0.45);
}
.collection-matrix__cell--claim[data-mutation="toxic"],
.collection-matrix__cell--na[data-mutation="toxic"] {
  background: rgba(163, 230, 53, 0.06);
}
.collection-matrix__cell--claim[data-mutation="toxic"] .collection-claim {
  accent-color: #a3e635;
}

.collection-matrix__th--mutation[data-mutation="christmas"] {
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.16), rgba(15, 20, 38, 0.96));
  color: #fecaca;
  box-shadow: inset 0 -3px 0 rgba(220, 38, 38, 0.55);
}
.collection-matrix__cell--claim[data-mutation="christmas"],
.collection-matrix__cell--na[data-mutation="christmas"] {
  background: rgba(220, 38, 38, 0.07);
}
.collection-matrix__cell--claim[data-mutation="christmas"] .collection-claim {
  accent-color: #dc2626;
}

.collection-matrix__th--mutation[data-mutation="heaven"] {
  background: linear-gradient(180deg, rgba(147, 197, 253, 0.16), rgba(15, 20, 38, 0.96));
  color: #eff6ff;
  box-shadow: inset 0 -3px 0 rgba(147, 197, 253, 0.5);
}
.collection-matrix__cell--claim[data-mutation="heaven"],
.collection-matrix__cell--na[data-mutation="heaven"] {
  background: rgba(147, 197, 253, 0.07);
}
.collection-matrix__cell--claim[data-mutation="heaven"] .collection-claim {
  accent-color: #93c5fd;
}

.collection-matrix__th--mutation[data-mutation="void"] {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.18), rgba(15, 20, 38, 0.96));
  color: #e0e7ff;
  box-shadow: inset 0 -3px 0 rgba(99, 102, 241, 0.55);
}
.collection-matrix__cell--claim[data-mutation="void"],
.collection-matrix__cell--na[data-mutation="void"] {
  background: rgba(99, 102, 241, 0.07);
}
.collection-matrix__cell--claim[data-mutation="void"] .collection-claim {
  accent-color: #6366f1;
}

.collection-matrix__th--mutation[data-mutation="crystal"] {
  background: linear-gradient(180deg, rgba(103, 232, 249, 0.14), rgba(15, 20, 38, 0.96));
  color: #ecfeff;
  box-shadow: inset 0 -3px 0 rgba(103, 232, 249, 0.5);
}
.collection-matrix__cell--claim[data-mutation="crystal"],
.collection-matrix__cell--na[data-mutation="crystal"] {
  background: rgba(103, 232, 249, 0.07);
}
.collection-matrix__cell--claim[data-mutation="crystal"] .collection-claim {
  accent-color: #67e8f9;
}

.collection-matrix__cell--claim .collection-claim {
  accent-color: #64748b;
}

.collection-matrix th.collection-matrix__mutation--off,
.collection-matrix td.collection-matrix__mutation--off {
  display: none !important;
}

.collection-matrix tbody tr:nth-child(even) {
  background: rgba(148, 163, 184, 0.04);
}

.collection-matrix tbody tr:hover {
  background: rgba(56, 189, 248, 0.06);
}

.collection-matrix__name-cell {
  position: sticky;
  left: 0;
  z-index: 1;
  padding: 0.35rem 0.5rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: var(--bg-card);
  box-shadow: 4px 0 8px -4px rgba(0, 0, 0, 0.35);
  vertical-align: middle;
  max-width: 14rem;
}

.collection-matrix__row:hover .collection-matrix__name-cell {
  background: rgba(15, 23, 42, 0.98);
}

.collection-matrix__name-inner {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.collection-matrix__name-thumb {
  flex-shrink: 0;
  width: 40px;
  min-width: 40px;
  aspect-ratio: 1;
  height: auto;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.75), rgba(15, 23, 42, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
}

.collection-matrix__name-thumb img.collection-matrix__name-fallback-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.collection-matrix__name-glyph {
  font-size: 1.1rem;
  line-height: 1;
  position: relative;
  z-index: 0;
}

.collection-matrix__name-thumb.has-img .collection-matrix__name-glyph {
  visibility: hidden;
}

.collection-matrix__name-text {
  display: block;
  min-width: 0;
  line-height: 1.25;
  word-break: break-word;
}

.collection-matrix__cell {
  padding: 0.25rem;
  text-align: center;
  vertical-align: middle;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(12, 16, 32, 0.35);
}

.collection-matrix__cell--claim {
  text-align: center;
  padding: 0.2rem 0.15rem;
  min-width: 2.1rem;
}

.collection-matrix__cell--na {
  text-align: center;
  vertical-align: middle;
  background: rgba(15, 23, 42, 0.55);
  padding: 0.2rem 0.15rem;
  min-width: 2.1rem;
}

.collection-matrix__na-mark {
  display: inline-block;
  color: rgba(148, 163, 184, 0.22);
  font-size: 0.75rem;
  line-height: 1;
  user-select: none;
}

.collection-claim {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  cursor: pointer;
  vertical-align: middle;
}

.collection-claim:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.collection-rarity-done {
  accent-color: #22d3ee;
}

.collection-rarity-done:checked {
  accent-color: #10b981;
}

.collection-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  padding: 0.55rem 0.6rem 0.65rem;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(12, 16, 32, 0.65);
  cursor: pointer;
  font-size: 0.82rem;
  min-height: 0;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.collection-cell:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.75);
}

.collection-cell__check {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 1;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.collection-cell__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 72px;
  padding: 0.35rem 0.25rem 0;
  margin-top: 0.15rem;
}

.collection-cell__thumb img {
  width: 100%;
  max-width: 96px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
}

.collection-cell__name {
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.collection-cell__rarity {
  align-self: center;
  margin-top: auto;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.collection-cell input,
.collection-card input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (max-width: 900px) {
  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .collection-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.collection-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 0.82rem;
}

.collection-card-thumb img {
  width: 100%;
  height: 72px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
}

.collection-card-name {
  font-weight: 600;
  line-height: 1.2;
}

.btn-compact {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.view-notfound .notfound-root {
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem max(1.25rem, env(safe-area-inset-left)) 3rem max(1.25rem, env(safe-area-inset-right));
}

.notfound-inner {
  text-align: center;
  padding: 2rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-panel);
}

.notfound-inner h1 {
  margin: 0 0 0.5rem;
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.notfound-inner p {
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.notfound-inner code {
  color: var(--accent);
  font-size: 0.9rem;
}

/* --- Site admin (/admin) --- */
.site-admin-view {
  color-scheme: dark;
  position: relative;
  z-index: 1;
}

.site-admin-view .site-admin-root {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.75rem max(1.25rem, env(safe-area-inset-left)) 3.5rem max(1.25rem, env(safe-area-inset-right));
}

.site-admin-inner {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.site-admin-eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.site-admin-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.65rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  background: linear-gradient(120deg, var(--text) 0%, var(--accent) 45%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-admin-hero {
  padding-bottom: 0.15rem;
}

.site-admin-lede {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 54ch;
}

.site-admin-code {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.88em;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.site-admin-surface {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(18, 26, 48, 0.92) 0%, rgba(10, 14, 28, 0.88) 100%);
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.06),
    0 18px 48px rgba(0, 0, 0, 0.35);
  padding: 1.25rem 1.35rem 1.5rem;
  backdrop-filter: blur(12px);
}

.site-admin-surface--narrow {
  max-width: 520px;
  margin: 0 auto;
}

.site-admin-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
  padding: 1.5rem 1.35rem;
}

.site-admin-card--denied h1 {
  margin: 0 0 0.65rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.site-admin-muted {
  color: var(--muted);
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.site-admin-tabs {
  margin: 0 0 1rem;
}

.site-admin-tabs__track {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  gap: 2px;
}

.site-admin-tab {
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1.1rem;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.site-admin-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.site-admin-tab.is-active {
  color: var(--text);
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.12) 0%, rgba(168, 85, 247, 0.1) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.site-admin-banner {
  margin: 0 0 1rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.site-admin-banner--ok {
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.09);
  color: #a7f3d0;
}

.site-admin-banner--err {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
}

.site-admin-panel {
  display: none;
  flex-direction: column;
  gap: 1rem;
}

.site-admin-panel.is-active {
  display: flex;
}

.site-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  align-items: flex-end;
}

.site-admin-toolbar--users {
  align-items: center;
}

.site-admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: min(100%, 220px);
}

.site-admin-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.site-admin-select-wrap {
  position: relative;
}

.site-admin-select-wrap::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -2px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  pointer-events: none;
  opacity: 0.85;
}

.site-admin-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  font: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 2.25rem 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background-color: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.site-admin-select:hover {
  border-color: rgba(168, 85, 247, 0.35);
}

.site-admin-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.site-admin-select option {
  background-color: #0f1426;
  color: #f1f5f9;
}

.site-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.site-admin-btn {
  position: relative;
  min-width: 5.5rem;
}

.site-admin-btn__text {
  display: inline-block;
  transition: opacity 0.15s ease;
}

.site-admin-btn.site-admin-btn--busy {
  pointer-events: none;
}

.site-admin-btn.site-admin-btn--busy .site-admin-btn__text {
  opacity: 0.55;
}

.site-admin-btn.site-admin-btn--busy::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1rem;
  height: 1rem;
  margin: -0.5rem 0 0 -0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: site-admin-spin 0.65s linear infinite;
}

@keyframes site-admin-spin {
  to {
    transform: rotate(360deg);
  }
}

.site-admin-editor-shell {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(3, 6, 18, 0.55);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.site-admin-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.06), rgba(168, 85, 247, 0.05));
  border-bottom: 1px solid var(--border);
}

.site-admin-editor-path {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.8rem;
  color: var(--accent);
  word-break: break-all;
}

.site-admin-editor-meta {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.site-admin-editor-label {
  display: block;
  margin: 0;
  width: 100%;
}

.site-admin-editor {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  padding: 0.9rem 1rem 1.1rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  resize: vertical;
  min-height: 260px;
  max-height: min(70vh, 720px);
}

.site-admin-editor:focus {
  outline: none;
}

.site-admin-editor-shell:focus-within {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 2px rgba(34, 211, 238, 0.2);
}

.site-admin-hint {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

.site-admin-hint code {
  font-size: 0.88em;
  color: var(--accent);
}

.site-admin-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.site-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.site-admin-table th,
.site-admin-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.site-admin-table th {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0, 0, 0, 0.25);
}

.site-admin-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.site-admin-table tr:last-child td {
  border-bottom: none;
}

.site-admin-table__actions {
  width: 8rem;
  text-align: right;
}

.site-admin-table code {
  font-size: 0.82rem;
  color: var(--accent);
}

