:root {
  color-scheme: dark;
  --page-bg: #0a0a0a;
  --panel-bg: #181818;
  --panel-bg-soft: #1a1a1a;
  --panel-border: #2a2a2a;
  --input-bg: #111111;
  --input-border: #333333;
  --text: #e0e0e0;
  --text-soft: #b9b9b9;
  --muted: #888888;
  --muted-dark: #5f5f5f;
  --accent: #e05050;
  --accent-hover: #ff6b6b;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --radius: 8px;
  --gap: 1rem;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -20%, rgba(224, 80, 80, 0.12), transparent 34rem),
    linear-gradient(180deg, #111111 0%, var(--page-bg) 38rem);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
  background: #101010;
  border: 1px solid var(--panel-border);
}

.brand-name {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
}

.hero {
  margin-bottom: var(--gap);
}

.hero-image {
  min-height: clamp(160px, 31.25vw, 350px);
  aspect-ratio: 16 / 5;
  width: 100%;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.2), rgba(10, 10, 10, 0.68)),
    radial-gradient(circle at 20% 30%, rgba(224, 80, 80, 0.24), transparent 22rem),
    url("images/hero.jpg") center center / cover no-repeat,
    #121212;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.nav-bar {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--gap);
  padding: 0.85rem 1rem;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.nav-bar a {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 140ms ease, transform 140ms ease;
}

.nav-bar a:hover {
  color: var(--accent-hover);
  transform: translateY(-1px);
}

.main-grid {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: var(--gap);
  align-items: start;
}

.right-stack {
  display: grid;
  gap: var(--gap);
}

.card,
.footer-bar {
  background: var(--panel-bg-soft);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 1.5rem;
}

.section-title {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  line-height: 1.35;
  text-transform: uppercase;
}

.server-card {
  min-height: 100%;
}

.server-blurb {
  margin: 0 0 1.5rem;
  max-width: 60ch;
  color: var(--text-soft);
}

.status-list {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  background: #111111;
  border: 1px solid #252525;
  border-radius: 6px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 1rem;
  color: var(--text-soft);
}

.status-parent {
  margin-top: 0.75rem;
  color: var(--text);
  font-weight: 700;
}

.status-parent:first-child {
  margin-top: 0;
}

.status-child {
  padding-left: 1.25rem;
  color: #a9a9a9;
}

.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.account-form {
  display: grid;
  gap: 0.55rem;
}

.account-form h3 {
  margin: 0 0 0.25rem;
  color: var(--text);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-form label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.optional {
  color: var(--muted-dark);
  font-weight: 600;
  letter-spacing: 0.08em;
}

input {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.5rem 0.65rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 4px;
  color: var(--text);
  font: inherit;
}

input:hover,
input:focus {
  border-color: #464646;
}

button {
  width: 100%;
  min-height: 2.45rem;
  margin-top: 0.25rem;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  background: #242424;
  border: 1px solid #383838;
  border-radius: 4px;
  color: var(--text);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

button:hover {
  background: #2a1a1a;
  border-color: rgba(224, 80, 80, 0.65);
  color: var(--accent-hover);
}

.leaderboard-list {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.leaderboard-list li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  padding: 0.25rem 0;
  color: var(--text-soft);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.leaderboard-list li:last-child {
  border-bottom: 0;
}

.rank {
  color: var(--muted);
}

.footer-bar {
  margin-top: var(--gap);
  padding: 1.25rem 1rem;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 140ms ease;
}

.social-links a:hover {
  color: var(--accent-hover);
}

.social-links img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

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

@media (max-width: 900px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .site-shell {
    width: min(100% - 1rem, 1120px);
  }

  .site-header {
    min-height: 4.5rem;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .main-grid {
    grid-template-columns: 1fr;
  }

  .nav-bar {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    border-radius: var(--radius);
  }

  .card {
    padding: 1.15rem;
  }

  .status-list {
    padding: 0.85rem;
    font-size: 0.86rem;
  }

  .status-row {
    gap: 0.75rem;
  }
}

.account-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(24, 24, 24, 0.88);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.account-indicator a:hover {
  color: var(--accent-hover);
}

.status-dot,
.ready-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0.75rem rgba(224, 80, 80, 0.35);
}

.account-indicator--guest .status-dot {
  background: #777777;
  box-shadow: none;
}

.hero--slim .hero-image {
  min-height: clamp(110px, 18vw, 220px);
  aspect-ratio: 16 / 4;
}

.form-note,
.card-copy,
.fine-print {
  margin: 0;
  color: var(--text-soft);
}

.form-note {
  font-size: 0.78rem;
  line-height: 1.45;
}

.fine-print {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.small-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 0.35rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.small-link:hover {
  color: var(--accent-hover);
}

.account-layout {
  display: grid;
  gap: var(--gap);
}

.account-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 1.5rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.account-hero-card h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: 0.03em;
}

.account-hero-card p:last-child {
  margin: 0;
  max-width: 68ch;
  color: var(--text-soft);
}

.status-badges {
  display: grid;
  gap: 0.45rem;
  justify-items: end;
}

.badge {
  display: inline-flex;
  justify-content: center;
  min-width: 12rem;
  padding: 0.4rem 0.65rem;
  background: #111111;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.badge--ok {
  color: #d7f4d2;
  border-color: rgba(126, 210, 117, 0.5);
}

.badge--warn {
  color: #ffd2d2;
  border-color: rgba(224, 80, 80, 0.58);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}

.dashboard-wide {
  grid-column: 1 / -1;
}

.single-form {
  margin-top: 1rem;
  max-width: 28rem;
}

.setup-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-list li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.setup-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.setup-list span {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.setup-list strong,
.setup-list em {
  display: block;
}

.setup-list strong {
  color: var(--text);
}

.setup-list em {
  margin-top: 0.15rem;
  color: var(--muted);
  font-style: normal;
  font-size: 0.84rem;
}

.region-list,
.platform-status-list,
.account-summary {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.region-row,
.platform-status-list div,
.account-summary div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.region-row:last-child,
.platform-status-list div:last-child,
.account-summary div:last-child {
  border-bottom: 0;
}

.region-row span,
.platform-status-list span,
.account-summary dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.region-row strong,
.platform-status-list strong,
.account-summary dd {
  margin: 0;
  color: var(--text-soft);
  font-weight: 700;
}

.account-summary dd {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.ready-dot {
  width: 0.45rem;
  height: 0.45rem;
  background: #7ed275;
  box-shadow: 0 0 0.75rem rgba(126, 210, 117, 0.35);
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  margin: 1rem 0 0;
  padding: 0;
  border: 0;
}

.platform-panel {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  background: #111111;
  border: 1px solid #252525;
  border-radius: 6px;
}

.platform-panel h3 {
  margin: 0 0 0.1rem;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.platform-panel label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.locked-card fieldset[disabled] {
  opacity: 0.42;
}

@media (max-width: 900px) {
  .account-hero-card,
  .dashboard-grid,
  .platform-grid {
    grid-template-columns: 1fr;
  }

  .status-badges {
    justify-items: start;
  }

  .badge {
    min-width: 0;
  }
}

@media (max-width: 700px) {
  .site-header {
    align-items: flex-start;
    gap: 0.75rem;
    flex-direction: column;
  }

  .account-indicator {
    width: 100%;
    justify-content: center;
  }
}

/* v3 account-core prototype additions */
.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;
}

.brand-logo--text {
  display: inline-grid;
  place-items: center;
  color: var(--accent-hover);
  font-weight: 900;
  letter-spacing: 0;
}

.site-header--accountline {
  gap: 1rem;
}

.top-account-form {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(8rem, 1fr) auto auto;
  gap: 0.5rem;
  align-items: center;
  width: min(100%, 39rem);
}

.top-account-form input {
  min-height: 2.15rem;
  font-size: 0.85rem;
}

.button-compact,
.top-account-form button {
  width: auto;
  min-height: 2.15rem;
  margin: 0;
  padding: 0.45rem 0.75rem;
  white-space: nowrap;
}

.button-secondary {
  background: #151515;
}

.top-account-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(24, 24, 24, 0.88);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.top-account-status a:hover {
  color: var(--accent-hover);
}

.main-grid--home {
  grid-template-columns: 60fr 40fr;
}

.quick-account-card .small-link {
  margin-top: 1rem;
}

.dashboard-grid--account {
  grid-template-columns: 1fr 1fr;
}

.account-summary--large div {
  padding: 0.8rem 0;
}

.region-list--sync strong {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.45fr);
  gap: var(--gap);
  align-items: start;
}

.callout-box,
.warning-box {
  padding: 1rem;
  background: #111111;
  border: 1px solid #252525;
  border-radius: 6px;
}

.callout-box h3 {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.callout-box p,
.warning-box {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.key-management-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 1rem;
}

.platform-panel--status {
  align-content: start;
}

.linked-state {
  margin: 0 0 0.35rem;
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 700;
}

.linked-state--empty {
  color: var(--muted);
}

.mini-form,
.danger-zone {
  display: grid;
  gap: 0.55rem;
}

.danger-zone {
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
}

.danger-zone p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.button-danger {
  background: #2a1111;
  border-color: rgba(224, 80, 80, 0.5);
  color: #ffd2d2;
}

.button-danger:hover {
  background: #3a1515;
  border-color: var(--accent-hover);
  color: #ffffff;
}

.warning-box {
  margin-top: 1rem;
  border-color: rgba(224, 80, 80, 0.4);
}

@media (max-width: 980px) {
  .site-header--accountline {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-account-form {
    width: 100%;
  }

  .key-management-grid,
  .split-panel,
  .dashboard-grid--account,
  .main-grid--home {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .top-account-form {
    grid-template-columns: 1fr 1fr;
  }

  .top-account-form input {
    grid-column: 1 / -1;
  }

  .button-compact,
  .top-account-form button {
    width: 100%;
  }
}


.pending-panel {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
  padding: 1rem;
  background: #111111;
  border: 1px solid #252525;
  border-radius: 6px;
}

.pending-panel h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pending-panel p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.pending-pill {
  display: inline-flex;
  width: fit-content;
  margin-top: 0.2rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(224, 80, 80, 0.55);
  border-radius: 999px;
  color: #ffd2d2;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* v4 account dashboard layout */
.save-sync-card {
  max-width: none;
}

.region-list--wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.region-list--wide .region-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  padding: 0.85rem;
  background: #111111;
  border: 1px solid #252525;
  border-radius: 6px;
}

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

select {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.5rem 0.65rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 4px;
  color: var(--text);
  font: inherit;
}

select:hover,
select:focus {
  border-color: #464646;
}

.key-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.key-row {
  display: grid;
  gap: 0.9rem;
  align-content: space-between;
  min-height: 12rem;
  padding: 1rem;
  background: #111111;
  border: 1px solid #252525;
  border-radius: 6px;
}

.key-row h3 {
  margin: 0 0 0.25rem;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.key-row p {
  margin: 0;
  color: var(--text-soft);
}

.key-meta {
  margin-top: 0.25rem !important;
  color: var(--muted) !important;
  font-size: 0.82rem;
}

.key-row .button-danger {
  width: 100%;
  margin: 0;
}

@media (max-width: 980px) {
  .region-list--wide,
  .dashboard-grid--setup {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .key-list {
    grid-template-columns: 1fr;
  }

  .key-row .button-danger {
    width: 100%;
  }
}

/* v9 account setup alignment */
.dashboard-grid--setup {
  align-items: stretch;
  grid-template-rows: auto minmax(8rem, 1fr);
}

.dashboard-grid--setup > .setup-card--bb {
  grid-column: 1;
  grid-row: 1;
}

.dashboard-grid--setup > .setup-card--xbox {
  grid-column: 1;
  grid-row: 2;
}

.dashboard-grid--setup > .setup-card--register {
  grid-column: 2;
  grid-row: 1 / 3;
}

.setup-card {
  min-width: 0;
}

.setup-card--bb,
.setup-card--register,
.setup-card--xbox {
  align-content: start;
}

.setup-card--xbox {
  min-height: 8rem;
}

.setup-card--xbox .pending-pill {
  margin-top: 0.35rem;
}

@media (max-width: 980px) {
  .dashboard-grid--setup {
    grid-template-rows: none;
  }

  .dashboard-grid--setup > .setup-card--bb,
  .dashboard-grid--setup > .setup-card--xbox,
  .dashboard-grid--setup > .setup-card--register {
    grid-column: auto;
    grid-row: auto;
  }
}

.bb-account-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.bb-account-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.bb-account-form input {
  width: 100%;
}

.auth-message,
.bb-message {
  min-height: 1rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.auth-message.is-error,
.bb-message.is-error {
  color: #ffb4b4;
}

.auth-message.is-ok,
.bb-message.is-ok {
  color: #a8f0c6;
}

/* live V2 key profile UI */
.key-status-message {
  min-height: 1.2rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.key-status-message[data-kind="ok"] {
  color: #d7f4d2;
}

.key-status-message[data-kind="warn"] {
  color: #ffd2d2;
}

.key-status-message[data-kind="pending"] {
  color: var(--text-soft);
}

.key-sync-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  align-items: center;
  margin-top: 1rem;
  padding: 0.75rem 0.85rem;
  background: #111111;
  border: 1px solid #252525;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.key-sync-summary strong {
  color: var(--text-soft);
}

.sync-pill {
  display: inline-flex;
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
}

.sync-pill--current {
  color: #d7f4d2;
  border-color: rgba(126, 210, 117, 0.5);
}

.sync-pill--pending {
  color: #ffd2d2;
  border-color: rgba(224, 80, 80, 0.58);
}

.key-row--empty {
  min-height: 7rem;
}

.key-list--empty {
  grid-template-columns: 1fr;
}

button[disabled] {
  cursor: wait;
  opacity: 0.58;
}

/* account status pill highlights */
.pso-status-good {
  color: #d7f4d2 !important;
  border-color: rgba(105, 215, 105, 0.82) !important;
  background: rgba(59, 132, 58, 0.14) !important;
  box-shadow: inset 0 0 0 1px rgba(105, 215, 105, 0.14) !important;
}

.pso-status-warn {
  color: #ffd2d2 !important;
  border-color: rgba(224, 80, 80, 0.74) !important;
  background: rgba(120, 30, 30, 0.18) !important;
}

/* force exact ready/online account pills green */
body .pso-status-good.pso-status-good,
body button.pso-status-good.pso-status-good,
body a.pso-status-good.pso-status-good,
body span.pso-status-good.pso-status-good,
body div.pso-status-good.pso-status-good {
  color: #d7f4d2 !important;
  border-color: rgba(105, 215, 105, 0.82) !important;
  background: rgba(59, 132, 58, 0.14) !important;
  box-shadow: inset 0 0 0 1px rgba(105, 215, 105, 0.14) !important;
}

/* local-syncer save sync panel */
.pending-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.4rem;
  border-radius: 999px;
  background: #e05050;
  box-shadow: 0 0 0 3px rgba(224, 80, 80, 0.14);
}

.save-sync-state--good {
  color: #d7f4d2;
}

.save-sync-state--warn {
  color: #ffd2d2;
}

.save-sync-message {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.save-sync-message[data-status="current"] {
  color: #d7f4d2;
}

.save-sync-message[data-status="pending"],
.save-sync-message[data-status="unknown"] {
  color: #ffd2d2;
}

/* force account dashboard good pills to filled green */
.pso-status-good,
.status-pill.pso-status-good,
.badge.pso-status-good,
.account-status .pso-status-good,
.dashboard-status .pso-status-good {
  color: #d7f4d2 !important;
  border-color: rgba(105, 215, 105, 0.82) !important;
  background: rgba(59, 132, 58, 0.22) !important;
  box-shadow:
    inset 0 0 0 1px rgba(105, 215, 105, 0.18),
    0 0 0 1px rgba(105, 215, 105, 0.10) !important;
}

/* cleaner two-row header registration form */
.top-account-form.is-register {
  display: grid;
  grid-template-columns: minmax(8.5rem, 10rem) minmax(10rem, 12rem) minmax(11rem, 13rem);
  gap: 0.5rem;
  align-items: center;
  justify-content: end;
}

.top-account-form.is-register .top-account-actions {
  grid-column: 2 / 4;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.top-account-form.is-register .auth-message {
  grid-column: 1 / 4;
  justify-self: start;
}

.top-account-form.is-register .top-account-actions .button-compact {
  min-width: 9rem;
}

.top-account-form.is-register .top-account-actions [data-action="cancel-register"] {
  min-width: 7rem;
}

@media (max-width: 900px) {
  .top-account-form.is-register {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .top-account-form.is-register .top-account-actions,
  .top-account-form.is-register .auth-message {
    grid-column: 1;
  }

  .top-account-form.is-register .top-account-actions {
    justify-content: stretch;
  }

  .top-account-form.is-register .top-account-actions .button-compact {
    flex: 1;
  }
}

/* footer legal/license text */
.footer-legal {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

.footer-legal p {
  margin: 0.2rem 0;
}

.footer-legal a {
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--accent);
}

/* account email summary/update */
.account-email-summary {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.account-email-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  align-items: baseline;
}

.account-email-label {
  color: var(--muted);
}

.account-email-line strong {
  color: var(--text-soft);
}

.account-email-state {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-email-state.is-verified {
  color: #d7f4d2;
}

.account-email-state.is-pending {
  color: #ffd2d2;
}

.link-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.link-button:hover,
.link-button:focus-visible {
  color: var(--accent);
}

.account-email-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.account-email-form input {
  min-width: min(22rem, 100%);
}

.account-email-message {
  min-height: 1.2rem;
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
}

.account-email-message.is-ok {
  color: #d7f4d2;
}

.account-email-message.is-error {
  color: #ffd2d2;
}

.account-email-message a {
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* clean account hero controls */
.account-email-summary {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.account-control-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  align-items: baseline;
}

.account-control-label {
  color: var(--muted);
}

.account-control-line strong {
  color: var(--text-soft);
}

.account-email-state {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-email-state.is-verified {
  color: #d7f4d2;
}

.account-email-state.is-pending {
  color: #ffd2d2;
}

.inline-link,
button.inline-link,
.account-control-line button.inline-link {
  appearance: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text-soft) !important;
  cursor: pointer;
  padding: 0 !important;
  min-width: 0 !important;
  width: auto !important;
  height: auto !important;
  font: inherit;
  font-size: 0.82rem;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.inline-link:hover,
.inline-link:focus-visible {
  color: var(--accent) !important;
}

.account-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.16);
}

.account-inline-form[hidden] {
  display: none !important;
}

.account-inline-form input {
  min-width: min(18rem, 100%);
}

.account-password-form input {
  min-width: min(13rem, 100%);
}

.account-control-message {
  min-height: 1.2rem;
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
}

.account-control-message.is-ok {
  color: #d7f4d2;
}

.account-control-message.is-error {
  color: #ffd2d2;
}

.account-control-message a {
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* registered key access-key reveal */
.key-secret-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: baseline;
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.key-secret-value {
  color: var(--text-soft);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 0.12rem 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.04em;
}

/* per-key reveal error/status */
.key-card-message {
  margin: 0.55rem 0 0;
  min-height: 1rem;
  font-size: 0.82rem;
}

.key-card-message.is-error {
  color: #ffd2d2;
}

.key-card-message.is-ok {
  color: #d7f4d2;
}

/* account setup layout: BB + key sync left, V2/V3 + Xbox right */
.dashboard-grid--setup {
  grid-template-areas:
    "bb register"
    "key-sync xbox";
  align-items: start;
}

.dashboard-grid--setup .setup-card--bb {
  grid-area: bb;
}

.dashboard-grid--setup .setup-card--key-sync {
  grid-area: key-sync;
}

.dashboard-grid--setup .setup-card--register {
  grid-area: register;
}

.dashboard-grid--setup .setup-card--xbox {
  grid-area: xbox;
}

.key-sync-summary--panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  min-height: 4rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.key-sync-summary--panel strong {
  color: var(--text-soft);
}

@media (max-width: 900px) {
  .dashboard-grid--setup {
    grid-template-areas:
      "bb"
      "key-sync"
      "register"
      "xbox";
  }
}

/* align V2/V3 registration card with Blue Burst card */
.dashboard-grid--setup .setup-card--register {
  margin-top: 0.9rem;
}

@media (max-width: 900px) {
  .dashboard-grid--setup .setup-card--register {
    margin-top: 0;
  }
}

/* equal height BB and V2/V3 cards */
.dashboard-grid--setup {
  align-items: stretch;
}

.dashboard-grid--setup .setup-card--bb,
.dashboard-grid--setup .setup-card--register {
  height: 100%;
}

.dashboard-grid--setup .setup-card--register {
  margin-top: 0;
}

/* Blue Burst card cleanup */
.setup-card--bb .eyebrow {
  color: var(--muted);
}

.setup-card--bb h2,
.setup-card--bb .badge,
.setup-card--bb .bb-status,
.setup-card--bb .bb-status-badge {
  display: none !important;
}

/* placeholder data pages */
.page-placeholder-layout {
  gap: 1rem;
}

.page-title-card {
  min-height: unset;
}

.placeholder-control-card,
.placeholder-results-card {
  width: 100%;
}

.blank-data-box {
  min-height: 22rem;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.16);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 2rem;
}

.placeholder-form [hidden] {
  display: none !important;
}

/* fixed placeholder pages using normal site shell */
.placeholder-control-card,
.placeholder-results-card {
  width: 100%;
}

.blank-data-box {
  min-height: 18rem;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.16);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 2rem;
}

.placeholder-form [hidden] {
  display: none !important;
}


/* homepage server status touch-up */
.server-status-card .site-intro {
  margin: 0 0 1.35rem;
  color: var(--text);
  line-height: 1.65;
}

.status-list {
  margin-top: 1.25rem;
}

.status-server {
  margin-top: 1.2rem;
  color: var(--text);
  font-family: var(--mono);
  font-weight: 900;
}

.status-server:first-child {
  margin-top: 0;
}

.status-label {
  margin: 0.25rem 0 0.4rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-ship {
  padding-top: 0.25rem;
  font-family: var(--mono);
  font-weight: 900;
}

.status-ship--solo {
  justify-content: flex-start;
}

.status-child {
  padding-left: 1.15rem;
  color: var(--muted);
}

/* public placeholder pages */
.placeholder-layout {
  display: grid;
  gap: var(--gap);
}

.placeholder-form {
  display: grid;
  gap: 0.65rem;
  max-width: 24rem;
}

.placeholder-form label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.placeholder-form [hidden] {
  display: none !important;
}

.blank-data-box {
  min-height: 18rem;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.16);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 2rem;
}

/* Bestiary: keep the results card at page width and scroll the table horizontally when it's too wide (e.g. the "All" view). Touches width/scroll only — no colors, fonts, spacing, or layout of the table. */
.placeholder-results-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  contain: inline-size;
}

#bestiary-placeholder .drops-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
