:root {
  --bg: #111822;
  --bg-deep: #0b1017;
  --rail: #171a21;
  --surface: #1b2838;
  --surface-2: #22364b;
  --surface-3: #101923;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(102, 192, 244, 0.45);
  --text: #c7d5e0;
  --text-bright: #ffffff;
  --muted: #8f98a0;
  --accent: #66c0f4;
  --brand-dark: #152b48;
  --brand-light: #66c0f4;
  --accent-soft: rgba(102, 192, 244, 0.13);
  --green: #75a313;
  --green-2: #95c83d;
  --radius: 6px;
  --thumb-radius: 4px;
  --surface-glass: rgba(255, 255, 255, 0.04);
  --field-bg: rgba(255, 255, 255, 0.055);
  --panel-bg: rgba(27, 40, 56, 0.94);
  --panel-strong-bg: rgba(27, 40, 56, 0.92);
  --topbar-bg: rgba(17, 24, 34, 0.88);
  --panel-shadow: 0 22px 60px rgba(0, 0, 0, 0.26);
  --hover-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  --play-from: #75a313;
  --play-to: #4f7a0c;
  --play-hover: #95c83d;
  --play-text: #f8ffe7;
  --body-fade: rgba(17, 24, 34, 0);
  --control-color-scheme: dark;
  color-scheme: dark;
}

html[data-profile-theme="mint"] {
  color-scheme: light;
}

html[data-profile-theme="space"] .featured-panel,
html[data-profile-theme="space"] .game-tile,
html[data-profile-theme="space"] .library-row,
html[data-profile-theme="space"] .profile-hero,
html[data-profile-theme="space"] .info-block,
html[data-profile-theme="space"] .rankings-board,
html[data-profile-theme="space"] .onboarding-card,
html[data-profile-theme="space"] .settings-card,
html[data-profile-theme="space"] .privacy-panel,
html[data-profile-theme="space"] .public-player-hero,
html[data-profile-theme="space"] .public-player-summary div {
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent),
    var(--panel-shadow);
}

html[data-profile-theme="berry"] .nav-button.active,
html[data-profile-theme="berry"] .tab-button.active,
html[data-profile-theme="berry"] .ranking-game-button.active,
html[data-profile-theme="berry"] .rail-game.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 74% 10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 31vw),
    linear-gradient(180deg, color-mix(in srgb, var(--brand-dark) 72%, transparent), var(--body-fade) 360px),
    var(--bg-deep);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

select {
  color-scheme: dark;
}

select option,
select optgroup {
  background: var(--surface);
  color: var(--text-bright);
}

select option:checked {
  background: var(--surface-2);
  color: var(--text-bright);
}

button {
  cursor: pointer;
}

.launcher-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.game-rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  height: 100vh;
  padding: 12px 12px;
  overflow: hidden;
  background: var(--rail);
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 0 0 9px;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.brand-logo {
  display: block;
  width: min(100%, 214px);
  height: auto;
  max-height: 44px;
  object-fit: contain;
  object-position: left center;
  border-radius: var(--radius);
}

.search {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search input {
  width: 100%;
  min-height: 39px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field-bg);
  color: var(--text-bright);
}

.rail-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
}

.rail-title-row {
  display: grid;
  gap: 8px;
}

.rail-title-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.rail-bulk-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.rail-bulk-actions button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-3) 70%, transparent);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1;
}

.rail-bulk-actions button:hover {
  border-color: var(--line-strong);
  background: var(--accent-soft);
  color: var(--text-bright);
}

.rail-bulk-actions button:disabled {
  cursor: default;
  opacity: 0.38;
}

.rail-bulk-actions button:disabled:hover {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-3) 70%, transparent);
  color: var(--muted);
}

.rail-section h2,
.rail-group h3,
.rail-subgroup h4 {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rail-group,
.rail-subgroup {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.rail-group {
  padding-top: 4px;
}

.rail-group + .rail-group {
  margin-top: 7px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.rail-group h3 {
  color: var(--text);
}

.rail-subgroup h4 {
  color: color-mix(in srgb, var(--brand-light) 82%, var(--muted));
  font-size: 0.67rem;
}

.rail-collapse-button {
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
  width: 100%;
  min-height: 28px;
  padding: 4px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-transform: inherit;
}

.rail-collapse-button:hover {
  background: var(--accent-soft);
  color: var(--text-bright);
}

.rail-collapse-button span:not(.rail-collapse-icon) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-collapse-button small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
}

.rail-collapse-icon {
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
  opacity: 0.78;
  transform-origin: 35% 50%;
  transition: transform 120ms ease;
}

.rail-collapse-button[aria-expanded="true"] .rail-collapse-icon {
  transform: rotate(90deg);
}

.rail-subgroup {
  padding-left: 10px;
}

.rail-group-toggle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-3) 70%, transparent);
}

.rail-group-toggle button {
  min-width: 0;
  min-height: 28px;
  padding: 4px 5px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rail-group-toggle button:first-child {
  border-left: 0;
}

.rail-group-toggle button:hover,
.rail-group-toggle button.active {
  background: var(--accent-soft);
  color: var(--text-bright);
}

.rail-games {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
  overscroll-behavior: contain;
}

.rail-game {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.rail-game:hover,
.rail-game.active {
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.rail-thumb {
  display: block;
  height: 42px;
  overflow: hidden;
  border-radius: var(--thumb-radius);
  background: var(--surface-3);
}

.rail-copy {
  min-width: 0;
}

.rail-copy strong,
.rail-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-copy strong {
  color: var(--text-bright);
}

.rail-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.rail-empty {
  margin: 0;
}

.profile {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  flex: 0 0 auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-glass);
}

.profile-clickable {
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.profile-clickable:hover {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface-glass));
  transform: translateY(-1px);
}

.profile-clickable:focus-visible {
  outline: 2px solid var(--brand-light);
  outline-offset: 3px;
}

.login-panel {
  display: grid;
  gap: 7px;
  width: 100%;
}

.login-panel strong {
  color: var(--text-bright);
}

.login-panel span {
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-copy {
  min-width: 0;
  flex: 1 1 calc(100% - 52px);
}

.profile-action-row {
  display: flex;
  flex: 0 0 100%;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 2px;
}

.profile-form {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1 1 190px;
}

.profile-form label {
  display: grid;
  gap: 4px;
}

.profile-form input,
.profile-form select {
  width: 100%;
  min-height: 32px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field-bg);
  color: var(--text-bright);
  font-size: 0.82rem;
}

.profile-form select {
  color-scheme: var(--control-color-scheme);
}

.profile-form-wide {
  gap: 13px;
}

.profile-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.picture-source-picker {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.picture-source-picker legend {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.picture-avatar-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  margin-top: 0;
}

.picture-avatar-option {
  position: relative;
  display: grid;
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  padding: 4px;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--text-bright);
  cursor: pointer;
  overflow: hidden;
}

.picture-avatar-option.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}

.picture-avatar-option.unavailable {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.72;
}

.picture-avatar-option.google-missing {
  opacity: 0.9;
}

.picture-avatar-option img,
.picture-preview-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.picture-avatar-option img {
  max-width: 100%;
  max-height: 100%;
}

.picture-avatar-option img[hidden],
.picture-preview-placeholder[hidden] {
  display: none;
}

.picture-preview-placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-weight: 900;
}

.picture-avatar-option:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 42%, transparent);
  outline-offset: 2px;
  border-color: var(--accent);
}

.picture-status {
  min-height: 1rem;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.theme-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.theme-picker legend {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.theme-choice {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 38px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-glass);
  cursor: pointer;
}

.theme-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-choice span {
  width: 22px;
  height: 22px;
  border-radius: max(2px, calc(var(--radius) * 0.9));
  background:
    linear-gradient(135deg, var(--theme-color), var(--theme-dark) 58%),
    var(--theme-dark);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.theme-choice b {
  overflow: hidden;
  color: var(--text-bright);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-choice:has(input:checked) {
  border-color: var(--theme-color);
  background: color-mix(in srgb, var(--theme-color) 16%, transparent);
}

.hand-cursor-picker {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
}

.hand-cursor-picker legend {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.hand-cursor-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-glass);
  color: var(--text-bright);
  font-weight: 800;
  cursor: pointer;
}

.hand-cursor-toggle input {
  width: 17px;
  min-height: 17px;
  accent-color: var(--accent);
}

.hand-skin-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hand-skin-choice {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 64px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-glass);
  cursor: pointer;
}

.hand-skin-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hand-skin-preview {
  display: grid;
  place-items: start center;
  width: 44px;
  height: 50px;
  overflow: hidden;
  border-radius: max(3px, var(--thumb-radius));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.hand-skin-preview img {
  width: 34px;
  max-width: none;
  margin-top: 2px;
}

.hand-skin-choice b {
  overflow: hidden;
  color: var(--text-bright);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hand-skin-choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-error {
  margin: 0;
  color: #ffb4a8;
  font-size: 0.78rem;
}

.profile-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  color: var(--brand-light);
  font-weight: 900;
}

.profile > .profile-avatar {
  width: 42px;
  height: 42px;
  margin-block: -4px;
  font-size: 1.05rem;
}

.profile-picture {
  display: block;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.profile-avatar-preview {
  overflow: hidden;
}

.profile-avatar-preview img {
  width: 100%;
  height: 100%;
}

.profile strong,
.profile span {
  display: block;
}

.profile strong {
  overflow: hidden;
  color: var(--text-bright);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile span {
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-action {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 11%, var(--surface-glass));
  color: var(--brand-light);
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.login-button {
  justify-content: center;
  width: 100%;
  min-height: 38px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 28%, transparent), color-mix(in srgb, var(--play-from) 18%, transparent));
  color: var(--text-bright);
}

.profile-action:hover {
  border-color: var(--line-strong);
}

.profile-action:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.profile-action.unavailable {
  color: var(--muted);
  background: var(--surface-glass);
}

.profile-action.muted-action {
  color: var(--muted);
  background: var(--surface-glass);
}

.danger-button {
  border-color: color-mix(in srgb, #ff8a7a 42%, var(--line));
  color: #ffb4a8;
  background: color-mix(in srgb, #ff5f4d 10%, var(--surface-glass));
}

.danger-button:hover {
  border-color: #ffb4a8;
  background: color-mix(in srgb, #ff5f4d 17%, var(--surface-glass));
}

.main {
  min-width: 0;
  padding: 18px clamp(16px, 2.3vw, 34px) 34px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  margin: -18px calc(clamp(16px, 2.3vw, 34px) * -1) 24px;
  padding: 10px clamp(16px, 2.3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
}

.launcher-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-button,
.secondary-button,
.play-button,
.tab-button,
.ranking-game-button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.nav-button {
  min-height: 38px;
  padding: 8px 13px;
  background: transparent;
  color: var(--text-bright);
  font-weight: 800;
}

.nav-button:hover,
.nav-button.active,
.secondary-button:hover,
.tab-button:hover {
  border-color: var(--line-strong);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.nav-button.active {
  color: var(--brand-light);
}

.secondary-button,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  text-decoration: none;
  white-space: nowrap;
}

.secondary-button {
  background: var(--surface-glass);
}

.play-button {
  background: linear-gradient(135deg, var(--play-from), var(--play-to));
  border-color: color-mix(in srgb, var(--play-hover) 62%, transparent);
  color: var(--play-text);
  font-weight: 900;
  text-transform: uppercase;
}

.play-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--play-hover), var(--play-from));
  box-shadow: 0 10px 20px rgba(31, 224, 158, 0.18);
}

.tile-play-button:hover {
  transform: translateY(-1px);
}

.nav-button:active,
.secondary-button:active,
.play-button:active,
.tile-play-button:active {
  transform: translateY(1px) scale(0.985);
  filter: brightness(0.92);
  transition-duration: 60ms;
}

.secondary-button:disabled:active {
  transform: none;
  filter: grayscale(0.35);
}

.play-button.wide {
  width: 100%;
  margin-top: 4px;
}

.play-button.compact {
  min-height: 36px;
  padding: 8px 12px;
}

.view {
  display: none;
}

.view.visible {
  display: block;
}

.view-heading {
  max-width: 880px;
  margin-bottom: 18px;
}

.view-heading h1 {
  margin: 4px 0 0;
  color: var(--text-bright);
  font-size: clamp(1.7rem, 3.6vw, 3.25rem);
  line-height: 1.05;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.featured-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--brand-dark) 35%, transparent), var(--panel-bg)),
    var(--surface);
  box-shadow: var(--panel-shadow);
}

.featured-art,
.profile-media,
.tile-art,
.library-thumb {
  background: var(--surface-3);
}

.featured-art {
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  contain: paint;
}

.hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-detail {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
  min-width: 0;
  overflow: hidden;
  padding: clamp(20px, 3vw, 38px);
  background: var(--panel-bg);
}

.featured-detail h2 {
  margin: 4px 0 8px;
  color: var(--text-bright);
  font-size: clamp(2.2rem, 5.2vw, 4.7rem);
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.featured-detail p {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

@media (min-width: 1600px) {
  .featured-panel {
    grid-template-columns: minmax(520px, 1fr) minmax(420px, 0.72fr);
  }
}

.featured-actions,
.tag-row,
.tile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--brand-light);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.chip-status {
  border-color: color-mix(in srgb, var(--play-from) 30%, transparent);
  background: color-mix(in srgb, var(--play-from) 9%, transparent);
  color: color-mix(in srgb, var(--play-hover) 84%, var(--text-bright));
}

.chip-meta {
  border-color: color-mix(in srgb, var(--muted) 26%, transparent);
  background: color-mix(in srgb, var(--surface-2) 48%, transparent);
  color: var(--muted);
}

.stat-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.16);
}

.stat-band div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px;
  border-left: 1px solid var(--line);
}

.stat-band div:first-child {
  border-left: 0;
}

.stat-band strong {
  overflow: hidden;
  color: var(--text-bright);
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.stat-band span {
  color: var(--muted);
  font-size: 0.76rem;
}

.flag-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 14px;
  align-content: center;
  overflow: hidden;
}

.flag-mosaic img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  border: 1px solid var(--line);
  background: var(--surface-glass);
  box-shadow: var(--hover-shadow);
}

.flag-mosaic.showcase {
  padding: clamp(18px, 3vw, 36px);
}

.flag-mosaic.mini,
.flag-mosaic.tiny {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 5px;
}

.flag-mosaic.mini img,
.flag-mosaic.tiny img {
  object-fit: cover;
}

.flag-mosaic.mini img:nth-child(n + 5),
.flag-mosaic.tiny img:nth-child(n + 5) {
  display: none;
}

.letter-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 14px;
  overflow: hidden;
}

.letter-mosaic span {
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(127, 211, 107, 0.1);
  color: var(--text-bright);
  font-size: clamp(1.6rem, 5vw, 5rem);
  font-weight: 950;
  line-height: 1;
  box-shadow: var(--hover-shadow);
}

.letter-mosaic.showcase {
  padding: clamp(18px, 3vw, 36px);
}

.letter-mosaic.mini,
.letter-mosaic.tiny {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 5px;
}

.letter-mosaic.mini span,
.letter-mosaic.tiny span {
  font-size: 1.2rem;
}

.letter-mosaic.mini span:nth-child(n + 5),
.letter-mosaic.tiny span:nth-child(n + 5) {
  display: none;
}

.catalog-section {
  display: grid;
  gap: 12px;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-title-row h2 {
  margin: 0;
  color: var(--text-bright);
}

.section-title-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.game-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.game-tile {
  display: grid;
  grid-template-rows: 145px minmax(0, 1fr);
  min-height: 308px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tile-art {
  min-height: 0;
  overflow: hidden;
}

.game-tile:hover,
.library-row:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--hover-shadow);
}

.tile-copy {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  background: var(--surface);
}

.tile-copy h3,
.library-row h2 {
  margin: 0;
  color: var(--text-bright);
  font-size: 1.05rem;
}

.tile-copy p,
.library-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.tile-play-button {
  justify-self: start;
  margin-top: 2px;
}

.library-list {
  display: grid;
  gap: 10px;
}

.library-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) minmax(100px, auto) auto;
  gap: 14px;
  align-items: center;
  min-height: 104px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong-bg);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.library-thumb {
  height: 82px;
  overflow: hidden;
  border-radius: var(--thumb-radius);
}

.library-stats {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.library-stats strong {
  color: var(--text-bright);
  font-size: 1.2rem;
}

.library-stats span {
  color: var(--muted);
  font-size: 0.72rem;
}

.game-profile {
  display: grid;
  gap: 14px;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(320px, 0.85fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-bg), color-mix(in srgb, var(--surface-3) 78%, var(--panel-bg)));
}

.profile-media {
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
}

.profile-info-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: clamp(18px, 2.4vw, 30px);
}

.profile-info-panel h1 {
  margin: 0;
  color: var(--text-bright);
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.02;
}

.profile-info-panel p {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

.facts-grid {
  display: grid;
  gap: 7px;
}

.fact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.fact-row span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fact-row strong {
  color: var(--text-bright);
  text-align: right;
}

.profile-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--rail) 84%, transparent);
}

.tab-button {
  min-height: 38px;
  padding: 8px 14px;
  background: transparent;
}

.tab-button.active {
  background: var(--accent-soft);
  border-color: var(--line-strong);
  color: var(--brand-light);
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 14px;
}

.info-block {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong-bg);
}

.main-block {
  grid-row: span 2;
}

.info-block h3 {
  margin: 0 0 12px;
  color: var(--text-bright);
}

.info-block p {
  color: var(--text);
  line-height: 1.58;
}

.info-block ul {
  margin: 0;
  padding-left: 19px;
  color: var(--text);
  line-height: 1.65;
}

.metric-list {
  display: grid;
  gap: 9px;
}

.metric-list.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.metric-list div,
.mode-card {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-glass);
}

.metric-list strong,
.mode-card strong {
  color: var(--text-bright);
  font-size: 1.2rem;
}

.metric-list span,
.mode-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.activity-row,
.score-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  border-top: 1px solid var(--line);
}

.activity-row:first-child,
.score-row:first-child {
  border-top: 0;
}

.activity-row strong,
.score-row strong,
.score-row b {
  color: var(--text-bright);
}

.activity-row span,
.score-row small {
  color: var(--muted);
}

.player-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  color: var(--text);
}

.player-profile-link {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-light);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.player-profile-link:hover {
  color: var(--text-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.player-profile-link:focus-visible,
.clickable-score-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.player-identity span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--brand-light);
  font-size: 0.78rem;
  font-weight: 900;
  object-fit: cover;
}

.deleted-player-avatar {
  background: #050505;
  color: #f8fafc;
  font-size: 0.92rem;
}

.score-row {
  grid-template-columns: 90px minmax(120px, 1fr) 6ch 20ch;
}

.score-row b,
.score-row small {
  text-align: right;
}

.clickable-score-row {
  cursor: pointer;
}

.clickable-score-row:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.clickable-player {
  color: var(--brand-light);
}

.rankings-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
  gap: 14px;
}

.rankings-picker {
  display: grid;
  align-content: start;
  gap: 7px;
}

.ranking-game-button {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 58px;
  padding: 11px 12px;
  background: color-mix(in srgb, var(--rail) 62%, transparent);
  text-align: left;
}

.ranking-game-button:hover,
.ranking-game-button.active {
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.ranking-game-button span {
  color: var(--text-bright);
  font-weight: 900;
}

.ranking-game-button small {
  color: var(--muted);
}

.rankings-board {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong-bg);
}

.rankings-board-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.rankings-board-header h2 {
  margin: 4px 0 2px;
  color: var(--text-bright);
  font-size: 1.8rem;
}

.rankings-board-header span {
  color: var(--muted);
}

.rankings-board-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
}

.public-player-profile {
  display: grid;
  gap: 14px;
}

.public-player-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--player-theme, var(--accent)) 18%, transparent), var(--panel-bg)),
    var(--surface);
}

.public-player-hero.theme-ocean { --player-theme: #66c0f4; }
.public-player-hero.theme-forest { --player-theme: #7fd36b; }
.public-player-hero.theme-sunset { --player-theme: #ffb35c; }
.public-player-hero.theme-berry { --player-theme: #d87cff; }
.public-player-hero.theme-mint { --player-theme: #6ff2c2; }
.public-player-hero.theme-space { --player-theme: #a6b3ff; }

.public-player-avatar {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--player-theme, var(--accent)) 72%, white);
  border-radius: 50%;
  background: color-mix(in srgb, var(--player-theme, var(--accent)) 18%, transparent);
  color: var(--text-bright);
  font-size: 2rem;
  font-weight: 950;
  object-fit: cover;
}

.public-player-title {
  min-width: 0;
}

.public-player-title h1 {
  margin: 4px 0 6px;
  overflow: hidden;
  color: var(--text-bright);
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-player-title p {
  margin: 0;
  color: var(--text);
}

.public-player-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.public-player-summary div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong-bg);
}

.public-player-summary strong {
  color: var(--text-bright);
  font-size: 1.5rem;
}

.public-player-summary span {
  color: var(--muted);
  font-size: 0.78rem;
}

.player-rank-table {
  display: grid;
}

.player-rank-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 90px 110px minmax(110px, auto);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 9px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.player-rank-row:first-child {
  border-top: 0;
}

.player-rank-row:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

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

.player-rank-row strong,
.player-rank-row b {
  color: var(--text-bright);
}

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

.player-rank-row span {
  min-width: 0;
}

.player-rank-row span:first-child {
  display: grid;
  gap: 3px;
}

.player-rank-row span:first-child strong,
.player-rank-row span:first-child small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.onboarding-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
}

.settings-page {
  display: grid;
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}

.onboarding-intro,
.settings-page-header {
  display: grid;
  gap: 12px;
}

.onboarding-intro {
  padding-top: 20px;
}

.settings-page-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.settings-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.onboarding-intro h1,
.settings-page-header h1 {
  margin: 0;
  color: var(--text-bright);
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
}

.settings-page-header h1 {
  font-size: clamp(2.1rem, 4.3vw, 4rem);
  line-height: 1.08;
  margin-bottom: 6px;
}

.onboarding-intro p,
.settings-page-header p {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

.settings-page-header .secondary-button,
.settings-header-actions {
  justify-self: start;
}

.onboarding-card,
.settings-card {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), color-mix(in srgb, var(--play-from) 8%, transparent)),
    var(--panel-bg);
  box-shadow: var(--panel-shadow);
}

.onboarding-panel .privacy-panel {
  grid-column: 1 / -1;
}

.privacy-panel {
  display: grid;
  gap: 14px;
  padding: clamp(16px, 2.4vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong-bg);
}

.privacy-panel h2,
.privacy-actions-card h2 {
  margin: 0;
  color: var(--text-bright);
  font-size: 1.35rem;
}

.privacy-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.privacy-section {
  display: grid;
  align-content: start;
  gap: 6px;
}

.privacy-section h3 {
  margin: 0;
  color: var(--text-bright);
  font-size: 0.92rem;
}

.privacy-section p,
.privacy-actions-card p {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.55;
}

.privacy-panel-compact .privacy-sections {
  grid-template-columns: 1fr;
}

.privacy-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.onboarding-card .profile-avatar,
.settings-card .profile-avatar {
  width: 68px;
  height: 68px;
  font-size: 1.45rem;
}

.admin-page {
  display: grid;
  gap: 18px;
}

.admin-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-bg);
  box-shadow: var(--panel-shadow);
}

.admin-table {
  display: grid;
  min-width: 980px;
}

.admin-panel {
  overflow-x: auto;
}

.admin-table-head,
.admin-user-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.08fr) minmax(190px, 0.94fr) minmax(118px, 0.38fr) minmax(190px, 0.82fr) minmax(250px, 0.98fr);
  column-gap: 24px;
  row-gap: 12px;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}

.admin-table-head > span,
.admin-user-row > span {
  min-width: 0;
}

.admin-user-row > span:nth-child(2),
.admin-user-row > span:nth-child(4),
.admin-user-row > span:nth-child(5) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-table-head {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-user-row:last-child {
  border-bottom: 0;
}

.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-user-profile-button {
  justify-content: flex-start;
}

.admin-user-cell strong,
.admin-user-profile-button strong {
  overflow: hidden;
  color: var(--text-bright);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-role-select {
  width: 112px;
  max-width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field-bg);
  color: var(--text-bright);
}

.admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.admin-dashboard-sections {
  display: grid;
  gap: 18px;
}

.admin-dashboard-section {
  display: grid;
  gap: 12px;
}

.admin-dashboard-section + .admin-dashboard-section {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.admin-dashboard-section-header {
  display: grid;
  gap: 4px;
}

.admin-dashboard-section-header h2 {
  margin: 0;
  color: var(--text-bright);
  font-size: 1.05rem;
  line-height: 1.2;
}

.admin-dashboard-section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-dashboard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-live-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field-bg);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.admin-live-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--play-from);
}

.secondary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.admin-metric {
  display: grid;
  gap: 4px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-glass);
}

.admin-metric strong {
  color: var(--text-bright);
  font-size: 1.7rem;
  line-height: 1;
}

.admin-metric span {
  color: var(--text);
  font-weight: 800;
}

.admin-metric small,
.admin-inline-status {
  color: var(--muted);
}

.admin-core-usage {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.admin-core-usage-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

.admin-core-usage-header strong {
  color: var(--text-bright);
}

.admin-core-usage-header span {
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-core-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px 12px;
}

.admin-core-row {
  display: grid;
  grid-template-columns: 32px 1fr 48px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-core-row strong {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1;
  text-align: right;
}

.admin-core-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--field-bg);
}

.admin-core-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.admin-chart-wrap {
  min-height: 260px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-glass);
}

.admin-dashboard-chart {
  display: block;
  width: 100%;
  height: 260px;
}

.admin-chart-tabs {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field-bg);
}

.admin-chart-tab {
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: calc(var(--radius) - 1px);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.admin-chart-tab.is-active {
  background: var(--surface-2);
  color: var(--text-bright);
}

.admin-chart-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-chart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field-bg);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.admin-chart-toggle input {
  width: 14px;
  height: 14px;
  accent-color: var(--series-color);
}

.admin-chart-toggle i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--series-color);
}

.admin-inline-status {
  margin: 12px 0 0;
}

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

.info-page {
  display: grid;
  gap: 28px;
  padding-bottom: 28px;
}

.info-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.38fr);
  gap: 18px;
  align-items: stretch;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, transparent), transparent 52%),
    var(--panel-bg);
  box-shadow: var(--panel-shadow);
}

.info-hero-copy {
  max-width: 940px;
}

.info-hero h1,
.info-section h2 {
  margin: 5px 0 0;
  color: var(--text-bright);
  line-height: 1.04;
}

.info-hero h1 {
  font-size: clamp(2.2rem, 5.4vw, 5rem);
}

.info-hero p,
.info-block p,
.subject-outfit-copy p,
.founder-card p {
  color: var(--text);
  line-height: 1.6;
}

.info-hero-copy p {
  max-width: 780px;
  margin: 16px 0 0;
  font-size: 1.05rem;
}

.info-hero-aside {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-glass);
}

.info-hero-aside strong {
  color: var(--text-bright);
  font-size: 1.25rem;
}

.info-hero-aside span,
.subject-outfit-meta span,
.outfit-gallery-item figcaption span,
.founder-card strong {
  color: var(--muted);
  line-height: 1.45;
}

.info-section {
  display: grid;
  gap: 14px;
}

.info-section h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.4rem);
}

.subject-learning-list {
  display: grid;
  gap: 18px;
}

.subject-learning-card {
  display: grid;
  grid-template-columns: minmax(320px, 0.44fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-bg);
  box-shadow: var(--hover-shadow);
}

.subject-learning-card.text-only {
  grid-template-columns: 1fr;
}

.subject-learning-image {
  min-width: 0;
  overflow: hidden;
  background: var(--surface-3);
}

.subject-learning-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
}

.subject-learning-copy {
  display: grid;
  gap: 13px;
  min-width: 0;
  padding: clamp(18px, 3vw, 34px);
}

.subject-learning-copy h3,
.subject-learning-copy h4 {
  margin: 0;
  color: var(--text-bright);
}

.subject-learning-copy h3 {
  font-size: clamp(1.55rem, 2.6vw, 2.45rem);
}

.subject-learning-copy h4 {
  margin-top: 4px;
  font-size: 0.86rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.subject-learning-copy p,
.subject-learning-copy li {
  color: var(--text);
  line-height: 1.64;
}

.subject-learning-copy p,
.subject-learning-copy ul {
  margin: 0;
}

.subject-learning-copy ul {
  display: grid;
  gap: 8px;
  padding-left: 1.1rem;
}

.subject-outfit-grid {
  display: grid;
  gap: 14px;
}

.subject-outfit-card {
  display: grid;
  grid-template-columns: minmax(320px, 0.58fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-bg);
  box-shadow: var(--hover-shadow);
}

.subject-outfit-image {
  min-width: 0;
  overflow: hidden;
  background: var(--surface-3);
}

.subject-outfit-image img,
.outfit-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.subject-outfit-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
  padding: clamp(18px, 3vw, 32px);
}

.subject-outfit-copy h3,
.founder-card h3 {
  margin: 0;
  color: var(--text-bright);
}

.subject-outfit-copy h3 {
  font-size: clamp(1.45rem, 2.5vw, 2.25rem);
}

.subject-outfit-copy p {
  margin: 0;
}

.subject-outfit-meta {
  display: grid;
  gap: 5px;
}

.outfit-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.outfit-gallery-item {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-bg);
}

.outfit-gallery-item img {
  aspect-ratio: 16 / 9;
}

.outfit-gallery-item figcaption {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.outfit-gallery-item figcaption strong {
  color: var(--text-bright);
}

.info-explainer-grid,
.founder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.founder-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-bg);
}

.founder-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--text-bright);
  font-size: 1.4rem;
  font-weight: 900;
}

.founder-card p,
.founder-card strong {
  display: block;
  margin: 5px 0 0;
}

@media (max-width: 1380px) {
  .featured-panel {
    grid-template-columns: 1fr;
  }

  .featured-detail h2 {
    font-size: clamp(2.1rem, 6vw, 4rem);
  }
}

@media (max-width: 1020px) {
  .featured-panel,
  .profile-hero,
  .profile-grid,
  .onboarding-panel,
  .info-hero,
  .subject-learning-card,
  .subject-outfit-card,
  .info-explainer-grid,
  .founder-grid,
  .privacy-sections {
    grid-template-columns: 1fr;
  }

  .library-row {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .library-stats,
  .library-row .play-button {
    justify-self: start;
  }

  .metric-list.three {
    grid-template-columns: 1fr;
  }

  .outfit-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .settings-page-header {
    grid-template-columns: 1fr;
  }

  .launcher-shell {
    grid-template-columns: 1fr;
  }

  .game-rail {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    height: auto;
    max-height: none;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .search,
  .rail-section {
    display: none;
  }

  .rail-games {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .brand {
    min-height: 44px;
    padding: 0;
    border-bottom: 0;
  }

  .brand-logo {
    max-width: 170px;
    max-height: 38px;
  }

  .profile {
    margin-top: 0;
    max-width: min(46vw, 220px);
    padding: 8px;
  }

  .profile > .profile-avatar {
    width: 34px;
    height: 34px;
    margin-block: 0;
  }

  .profile-copy span,
  .profile-action-row,
  .login-panel span {
    display: none;
  }

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

  .launcher-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-button[data-view="home"] {
    display: none;
  }

  .featured-panel {
    display: none;
  }

  .stat-band,
  .rankings-layout,
  .public-player-hero,
  .public-player-summary,
  .profile-field-grid {
    grid-template-columns: 1fr;
  }

  .theme-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .outfit-gallery {
    grid-template-columns: 1fr;
  }

  .info-hero {
    padding: 20px;
  }

  .info-hero h1 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .admin-metric-grid {
    grid-template-columns: 1fr;
  }

  .stat-band div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .stat-band div:first-child {
    border-top: 0;
  }

  .score-row,
  .activity-row,
  .player-rank-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 0;
  }
}
