:root {
  --page: #e5e9f3;
  --ink: #162033;
  --muted: #5d6678;
  --line: #9dadc8;
  --line-dark: #45638e;
  --chrome: #244f8f;
  --chrome-dark: #183764;
  --chrome-light: #d9e7ff;
  --accent: #f28c28;
  --accent-soft: #ffe3bf;
  --green: #2e8a62;
  --pink: #c7437a;
  --paper: #ffffff;
  --paper-warm: #fff9ee;
  --shadow: 0 2px 0 rgba(30, 54, 92, 0.16);
  --focus: 0 0 0 3px rgba(242, 140, 40, 0.35);
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  min-width: 320px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(36, 79, 143, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(36, 79, 143, 0.05) 1px, transparent 1px),
    var(--page);
  background-size: 22px 22px;
  font-size: 15px;
  line-height: 1.45;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  color: #fff;
  background: linear-gradient(#3a70bb, var(--chrome));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  cursor: pointer;
  min-height: 34px;
  padding: 0 12px;
}

button:hover,
button:focus-visible {
  background: linear-gradient(#4f82ca, #2f5ea3);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

button.subtle,
.button-link.subtle {
  color: var(--chrome-dark);
  background: #edf4ff;
}

button.warning {
  border-color: #9f5a10;
  background: linear-gradient(#f6a84f, #d87516);
}

a {
  color: #1f5fb4;
}

.button-link {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.app-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: calc(100vw - 24px);
  max-width: 1640px;
  min-height: calc(100vh - 28px);
  margin: 14px auto;
  background: #f7f9fe;
  border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(20, 32, 54, 0.18);
  overflow: hidden;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(320px, 1fr) auto minmax(240px, 330px);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  color: #fff;
  background: linear-gradient(180deg, #326ab0, #1f4b87 58%, #183764);
  border-bottom: 3px solid var(--accent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 40px;
  border: 2px solid #fff;
  border-radius: 6px;
  color: #183764;
  background: linear-gradient(135deg, #ffffff, #ffe3bf);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 26px;
  line-height: 1;
}

.brand-copy small {
  color: #d9e7ff;
}

.header-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}

.header-search label {
  grid-column: 1 / -1;
  color: #dce9ff;
  font-size: 12px;
  font-weight: 700;
}

.header-search input,
.full-input,
.editor-input,
.editor-textarea,
.state-transfer,
select {
  width: 100%;
  border: 1px solid #7e91b4;
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
  padding: 8px 9px;
}

.session-chip {
  min-width: 160px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  text-align: right;
  font-weight: 700;
}

.auth-panel {
  min-width: 0;
  color: #fff;
}

.account-card,
.account-details {
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}

.account-card {
  display: grid;
  gap: 5px;
}

.account-card small,
.account-details small,
.auth-notice {
  color: #dce9ff;
}

.account-details summary {
  cursor: pointer;
  font-weight: 700;
}

.auth-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 6px;
  margin-top: 7px;
}

.auth-form input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 4px;
  padding: 6px;
}

.auth-notice {
  margin: 7px 0 0;
  font-size: 12px;
}

.primary-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 7px 9px 0;
  background: #cfdcf1;
  border-bottom: 1px solid var(--line);
  overflow-x: visible;
}

.tab {
  display: grid;
  place-items: center;
  flex: 1 1 82px;
  min-width: 74px;
  min-height: 34px;
  padding: 0 6px;
  border: 1px solid var(--line-dark);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: #244f8f;
  background: linear-gradient(#eef5ff, #c4d8f5);
  color: #17345d;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.tab:hover,
.tab:focus-visible {
  background: linear-gradient(#ffffff, #d8e7fb);
}

.tab.is-active {
  color: #fff;
  background: linear-gradient(#f5a24c, #db7411);
  border-color: #974f09;
}

.workspace {
  display: grid;
  grid-template-columns: clamp(270px, 18vw, 360px) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  min-height: 0;
  padding: 14px;
}

.left-rail,
.main-stage {
  min-width: 0;
}

.left-rail {
  position: sticky;
  top: 12px;
  align-self: start;
}

.main-stage {
  min-height: calc(100vh - 194px);
}

.chrome-box,
.module,
.profile-hero,
.editor-panel,
.feed-card,
.friend-editor-row,
.music-card,
.profile-post-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.chrome-box {
  margin-bottom: 14px;
  overflow: hidden;
}

.chrome-box h2,
.module-title {
  margin: 0;
  padding: 7px 9px;
  color: #fff;
  background: linear-gradient(#3468aa, var(--chrome));
  border-bottom: 1px solid var(--line-dark);
  font-size: 14px;
}

.field-label {
  display: block;
  margin: 10px 10px 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.chrome-box .full-input {
  width: calc(100% - 20px);
  margin: 0 10px 10px;
}

.directory-list {
  display: grid;
  max-height: min(62vh, 720px);
  overflow: auto;
}

.directory-button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  border: 0;
  border-top: 1px solid #d9e2f4;
  border-radius: 0;
  color: var(--ink);
  background: #fff;
  box-shadow: none;
  text-align: left;
}

.directory-button:hover,
.directory-button.is-active {
  background: var(--accent-soft);
}

.directory-button strong,
.friend-tile strong,
.comment-author strong {
  display: block;
  overflow-wrap: anywhere;
}

.directory-button small,
.muted,
.meta-line {
  color: var(--muted);
}

.tool-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.state-transfer {
  display: block;
  width: calc(100% - 20px);
  min-height: 96px;
  margin: 0 10px 10px;
  resize: vertical;
}

.landing-page {
  display: grid;
  gap: 12px;
}

.welcome-board {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
  gap: 12px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 249, 238, 0.96), rgba(255, 255, 255, 0.92)),
    repeating-linear-gradient(45deg, rgba(199, 67, 122, 0.08) 0 8px, transparent 8px 16px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.welcome-copy {
  padding: 22px;
}

.welcome-kicker {
  color: var(--pink);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.welcome-copy h1 {
  margin: 3px 0 8px;
  font-size: 34px;
  line-height: 1.05;
}

.welcome-copy p {
  max-width: 660px;
  margin: 0;
  color: #303b50;
  font-size: 17px;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.welcome-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-content: stretch;
  border-left: 1px solid #d6e0f0;
  background: rgba(237, 244, 255, 0.82);
}

.welcome-stats div {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 12px 8px;
  text-align: center;
  border-left: 1px solid #d6e0f0;
}

.welcome-stats div:first-child {
  border-left: 0;
}

.welcome-stats strong {
  color: var(--chrome-dark);
  font-size: 27px;
  line-height: 1;
}

.welcome-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.landing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.clubhouse-preview {
  border-color: #b9c8e0;
}

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

.clubhouse-grid article {
  display: grid;
  gap: 5px;
  min-height: 118px;
  padding: 12px;
  border: 1px solid #d7e1f0;
  border-radius: 6px;
  background:
    linear-gradient(180deg, #ffffff, #f3f7ff),
    repeating-linear-gradient(45deg, rgba(36, 79, 143, 0.05) 0 7px, transparent 7px 14px);
}

.clubhouse-grid strong {
  color: var(--chrome-dark);
  font-size: 15px;
}

.clubhouse-grid span {
  color: #303b50;
}

.landing-auth-form {
  display: grid;
  gap: 9px;
}

.landing-auth-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-weight: 700;
}

.landing-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.landing-profile {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 62px;
  color: var(--ink);
  background: #f8fbff;
  text-align: left;
}

.landing-profile:hover,
.landing-profile:focus-visible {
  color: var(--ink);
  background: var(--accent-soft);
}

.landing-profile strong {
  display: block;
  overflow-wrap: anywhere;
}

.landing-profile small {
  color: var(--muted);
}

.omega-home {
  display: grid;
  gap: 12px;
}

.omega-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 12px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(135deg, #fff8ec, #f7fbff),
    repeating-linear-gradient(90deg, rgba(36, 79, 143, 0.055) 0 6px, transparent 6px 12px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.omega-home-copy {
  display: grid;
  gap: 9px;
  align-content: center;
  padding: 18px;
}

.omega-home-copy h1 {
  margin: 0;
  color: var(--chrome-dark);
  font-size: 28px;
  line-height: 1.1;
}

.omega-home-copy p {
  max-width: 680px;
  margin: 0;
  color: #303b50;
  font-size: 15px;
}

.omega-home-actions,
.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.omega-home-actions .button-link,
.omega-home-actions button {
  width: 100%;
}

.omega-home-stats,
.admin-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  background: rgba(237, 244, 255, 0.86);
  border-left: 1px solid #d6e0f0;
}

.omega-home-stats div,
.admin-health-grid div {
  display: grid;
  gap: 3px;
  min-height: 82px;
  padding: 10px;
  border: 1px solid #d4deee;
  border-radius: 6px;
  background: #fff;
}

.omega-home-stats strong,
.admin-health-grid strong {
  color: var(--chrome-dark);
  font-size: 24px;
  line-height: 1;
}

.omega-home-stats span,
.admin-health-grid span {
  color: var(--ink);
  font-weight: 900;
}

.omega-home-stats small,
.admin-health-grid small {
  color: var(--muted);
}

.omega-dashboard-grid,
.admin-dashboard-grid {
  align-items: start;
}

.setup-progress {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.setup-progress strong {
  color: var(--chrome-dark);
}

.setup-progress span {
  display: block;
  height: 10px;
  border: 1px solid #c7d4e8;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--accent) var(--setup-progress), #edf3fb var(--setup-progress));
}

.setup-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.setup-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 48px;
  color: var(--ink);
  background: #f8fbff;
  text-align: left;
}

.setup-item.done {
  border-color: #83b078;
  background: #f0faee;
}

.setup-item span {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  border-radius: 999px;
  color: #fff;
  background: var(--chrome);
  font-size: 11px;
  font-weight: 900;
}

.setup-item.done span {
  background: #2e8a62;
}

.today-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.snapshot-tile {
  display: grid;
  gap: 4px;
  min-height: 74px;
  color: var(--ink);
  background: #f8fbff;
  text-align: left;
}

.snapshot-tile strong {
  color: var(--accent);
  font-size: 24px;
}

.snapshot-tile span {
  color: var(--muted);
  font-weight: 800;
}

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

.omega-launch-card {
  display: grid;
  gap: 7px;
  min-height: 154px;
  padding: 12px;
  border: 1px solid #c7d4e8;
  border-radius: 6px;
  color: var(--ink);
  background:
    linear-gradient(180deg, #ffffff, #f4f7fd),
    repeating-linear-gradient(45deg, rgba(242, 140, 40, 0.06) 0 7px, transparent 7px 14px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.omega-launch-card:hover,
.omega-launch-card:focus-visible {
  color: var(--ink);
  border-color: var(--accent);
  background: #fffaf1;
}

.omega-launch-card span,
.omega-launch-card small {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.omega-launch-card strong {
  color: var(--chrome-dark);
  font-size: 19px;
}

.omega-launch-card p {
  margin: 0;
  color: #303b50;
}

.room-preview-list,
.admin-account-list {
  display: grid;
  gap: 8px;
}

.room-preview-card,
.admin-account-row,
.admin-reset-box,
.admin-account-box {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #c8d5e8;
  border-radius: 6px;
  background: #fff;
}

.room-preview-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.room-preview-card small,
.admin-account-row small {
  display: block;
  color: var(--muted);
}

.admin-account-row {
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
}

.admin-reset-box h3,
.admin-account-box h3 {
  margin: 0;
  color: var(--chrome-dark);
  font-size: 15px;
}

.classic-profile {
  display: grid;
  gap: 12px;
}

.profile-skin {
  position: relative;
  isolation: isolate;
  padding: 12px;
  color: var(--profile-page-text, var(--ink));
  background-color: var(--profile-page-bg, var(--page));
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 24px 24px;
  font-family: var(--profile-body-font, Arial, Helvetica, sans-serif);
}

.profile-skin.skin-mode-flat {
  background-image: none;
}

.profile-skin.skin-mode-spotlight {
  background-image:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--profile-accent, #f28c28) 26%, transparent), transparent 38%),
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

.profile-skin.skin-mode-tile {
  background-image:
    var(--profile-bg-image, none),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.06) 0 8px, transparent 8px 16px);
  background-repeat: repeat;
  background-size: auto, 24px 24px;
}

.profile-skin.skin-mode-cover {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.16)),
    var(--profile-bg-image, none);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.profile-skin.omega-watermark::before {
  content: "Ω";
  position: absolute;
  top: 14px;
  right: 22px;
  z-index: -1;
  color: color-mix(in srgb, var(--profile-accent, #f28c28) 16%, transparent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(120px, 22vw, 340px);
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 0 48px color-mix(in srgb, var(--profile-accent, #f28c28) 26%, transparent);
}

.profile-skin .profile-hero,
.profile-skin .module {
  color: var(--profile-module-text, var(--ink));
  border-color: var(--profile-module-border, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--profile-module-bg, #fff) 94%, white), var(--profile-module-bg, #fff));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 8px 22px rgba(0, 0, 0, 0.16);
}

.profile-skin .profile-hero h1,
.profile-skin .module-title {
  font-family: var(--profile-heading-font, Arial, Helvetica, sans-serif);
}

.profile-skin .module-title {
  color: var(--profile-module-header-text, #fff);
  background:
    linear-gradient(90deg, var(--profile-module-header-bg, var(--chrome)), color-mix(in srgb, var(--profile-module-header-bg, var(--chrome)) 72%, var(--profile-accent, #f28c28)));
  border-color: var(--profile-module-border, var(--line-dark));
}

.profile-skin a,
.profile-skin .button-link.subtle {
  color: var(--profile-link, #1f5fb4);
}

.profile-skin button {
  border-color: var(--profile-module-border, var(--line-dark));
  background: linear-gradient(180deg, color-mix(in srgb, var(--profile-accent, #f28c28) 82%, white), var(--profile-accent, #f28c28));
  color: #080808;
  font-weight: 700;
}

.profile-skin button.subtle,
.profile-skin .button-link.subtle,
.profile-skin .contact-grid button {
  color: var(--profile-module-text, var(--ink));
  background: color-mix(in srgb, var(--profile-module-bg, #fff) 88%, var(--profile-accent, #f28c28));
}

.profile-skin .status-pill {
  border-color: var(--profile-accent, #f28c28);
  background: color-mix(in srgb, var(--profile-accent, #f28c28) 18%, transparent);
}

.mini-heading {
  margin: 12px 0 7px;
  color: var(--profile-module-text, var(--ink));
  font-size: 13px;
}

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

.trophy-badge {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid #d9e2f4;
  border-radius: 6px;
  color: #5b6474;
  background: #f8fbff;
  opacity: 0.72;
}

.trophy-badge.earned {
  color: #17345d;
  background:
    linear-gradient(135deg, rgba(255, 245, 223, 0.98), rgba(255, 255, 255, 0.96)),
    linear-gradient(90deg, rgba(242, 140, 40, 0.16), transparent);
  border-color: #d8b47a;
  opacity: 1;
}

.trophy-badge span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 30px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--chrome), var(--accent));
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
}

.trophy-badge small {
  color: var(--muted);
}

.custom-profile-html {
  overflow-wrap: anywhere;
}

.profile-hero {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 122px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 227, 191, 0.92), rgba(255, 255, 255, 0.94)),
    repeating-linear-gradient(45deg, rgba(36, 79, 143, 0.08) 0 8px, transparent 8px 16px);
}

.profile-hero h1 {
  margin: 0 0 4px;
  font-size: 28px;
  line-height: 1.1;
}

.profile-hero p {
  margin: 0;
}

.hero-actions {
  display: grid;
  gap: 8px;
  min-width: 150px;
}

.profile-layout {
  display: grid;
  grid-template-columns: clamp(280px, 22vw, 420px) minmax(0, 1fr);
  gap: 12px;
}

.module {
  overflow: hidden;
}

.module + .module {
  margin-top: 12px;
}

.module-body {
  padding: 10px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.contact-grid button {
  min-height: 38px;
  color: var(--chrome-dark);
  background: linear-gradient(#ffffff, #dce9ff);
}

.detail-list,
.stats-grid {
  display: grid;
  gap: 7px;
  margin: 0;
}

.detail-row,
.stats-grid div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  padding: 6px;
  background: #f4f7fd;
  border: 1px solid #dbe4f3;
}

.detail-row dt,
.stats-grid span {
  color: var(--muted);
  font-weight: 700;
}

.top-friends-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.friend-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.friend-tile {
  position: relative;
  min-width: 0;
  padding: 7px;
  border: 1px solid #d6e0f0;
  border-radius: 5px;
  background: #fff;
  text-align: center;
}

.friend-tile.rank-1 {
  border-color: #d8a92a;
  box-shadow: inset 0 0 0 2px rgba(216, 169, 42, 0.22);
}

.friend-tile.rank-2 {
  border-color: #9aa8bb;
  box-shadow: inset 0 0 0 2px rgba(154, 168, 187, 0.22);
}

.friend-tile.rank-3 {
  border-color: #b77741;
  box-shadow: inset 0 0 0 2px rgba(183, 119, 65, 0.22);
}

.friend-rank {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  min-height: 22px;
  margin: -2px auto 4px;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--chrome);
  font-size: 11px;
  font-weight: 900;
}

.friend-tile button {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
}

.friend-tile small {
  display: block;
  color: var(--muted);
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 78px;
  aspect-ratio: 1;
  border: 3px solid #fff;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(135deg, #244f8f, #c7437a);
  box-shadow: 0 0 0 1px #7e91b4, 0 2px 8px rgba(0, 0, 0, 0.18);
  font-size: 26px;
  font-weight: 900;
}

.avatar.small {
  width: 38px;
  border-width: 2px;
  border-radius: 5px;
  font-size: 14px;
}

.avatar.large {
  width: 108px;
  font-size: 36px;
}

.avatar.has-photo {
  overflow: hidden;
  background: #fff;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar[data-theme="sunset"] {
  background: linear-gradient(135deg, #d87516, #c7437a);
}

.avatar[data-theme="circuit"] {
  background: linear-gradient(135deg, #1b6b52, #2e8a62);
}

.avatar[data-theme="midnight"] {
  background: linear-gradient(135deg, #162033, #244f8f);
}

.avatar[data-theme="candy"] {
  background: linear-gradient(135deg, #c7437a, #f28c28);
}

.avatar[data-theme="chrome"] {
  background: linear-gradient(135deg, #5d6678, #1f5fb4);
}

.profile-code-frame {
  display: block;
  width: 100%;
  min-height: 320px;
  border: 0;
  background: #fff;
}

.photo-caption {
  margin: 4px 0 8px;
  color: var(--muted);
  font-style: italic;
}

.photo-gallery,
.photo-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.album-stack,
.group-list,
.group-detail,
.thread-replies,
.reply-list {
  display: grid;
  gap: 10px;
}

.album-section {
  padding: 10px;
  border: 1px solid #dbe4f3;
  border-radius: 6px;
  background: #f8fbff;
}

.album-head,
.group-detail-head {
  display: flex;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 9px;
}

.album-head h3,
.thread-replies h4 {
  margin: 0 0 3px;
}

.photo-card,
.photo-editor-card {
  margin: 0;
  border: 1px solid #d6e0f0;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.photo-card.featured {
  border-color: var(--accent);
}

.photo-card img,
.photo-editor-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #edf3fb;
}

.photo-card figcaption,
.photo-editor-card figcaption {
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}

.album-label {
  display: block;
  padding: 0 8px 8px;
}

.photo-editor-card .inline-actions {
  padding: 0 8px 8px;
}

.photo-uploader {
  margin: 4px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
}

.photo-uploader legend {
  padding: 0 4px;
  color: var(--chrome-dark);
  font-weight: 800;
}

.photo-uploader-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.profile-link-box {
  display: grid;
  gap: 8px;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid #dbe4f3;
  border-radius: 6px;
  background: #f8fbff;
}

.notification-card.actionable {
  border-color: var(--accent);
  background: #fffaf1;
}

.notification-card p {
  margin: 2px 0;
  color: var(--muted);
}

.notification-card small {
  color: var(--muted);
}

.alert-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  min-height: 22px;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
}

.feed-card {
  padding: 10px;
}

.threaded-card {
  display: grid;
  gap: 10px;
}

.feed-card + .feed-card,
.comment-row + .comment-row {
  margin-top: 10px;
}

.feed-card h3,
.blog-title {
  margin: 0 0 5px;
  font-size: 18px;
}

.feed-card.unread {
  border-color: var(--accent);
  background: #fffaf1;
}

.comment-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 9px;
  padding: 9px;
  border: 1px solid #dbe4f3;
  background: #f8fbff;
}

.reply-row {
  background: #ffffff;
}

.reply-form {
  margin-top: 0;
}

.compact-empty {
  padding: 12px;
  text-align: left;
}

.comment-form,
.quick-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.profile-post-body {
  display: grid;
  gap: 10px;
}

.profile-post-form {
  margin-top: 0;
}

.profile-post-list {
  display: grid;
  gap: 8px;
}

.profile-post-card {
  display: grid;
  gap: 5px;
  padding: 9px;
  background: #f8fbff;
}

.profile-post-card strong {
  color: var(--chrome-dark);
}

.profile-post-card p {
  margin: 0;
}

.profile-post-card small {
  color: var(--muted);
  font-weight: 700;
}

.quick-form-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.groups-grid {
  align-items: start;
}

.group-card {
  display: block;
  width: 100%;
  min-height: 74px;
  padding: 10px;
  color: var(--ink);
  background: #f8fbff;
  text-align: left;
}

.group-card.is-active,
.group-card:hover,
.group-card:focus-visible {
  color: var(--ink);
  background: var(--accent-soft);
}

.group-card strong,
.group-card small,
.group-card em {
  display: block;
}

.group-card small,
.group-card em {
  color: var(--muted);
}

.member-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.member-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 40px;
  color: var(--ink);
  background: #edf4ff;
}

.member-chip .avatar {
  flex: 0 0 auto;
}

.group-post-form {
  padding: 10px;
  border: 1px solid #dbe4f3;
  border-radius: 6px;
  background: #fffaf1;
}

.feed-stack {
  display: grid;
  gap: 10px;
}

.inline-actions,
.segmented-actions,
.preset-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: 8px;
}

.short-textarea {
  min-height: 96px;
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.editor-panel {
  overflow: hidden;
}

.editor-panel h2 {
  margin: 0;
  padding: 7px 9px;
  color: #fff;
  background: linear-gradient(#2e8a62, #206146);
  font-size: 14px;
}

.editor-panel-body {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.editor-textarea {
  min-height: 170px;
  resize: vertical;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
}

.im-module .module-body {
  padding: 0;
}

.im-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 430px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.im-buddy-list {
  display: grid;
  align-content: start;
  gap: 1px;
  border-right: 1px solid var(--line);
  background: #d7e2f2;
}

.im-buddy-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 9px;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: #f8fbff;
  text-align: left;
}

.im-buddy-row:hover,
.im-buddy-row.is-active {
  color: #ffffff;
  background: linear-gradient(#316eb9, #244f8f);
}

.im-buddy-row small {
  display: block;
  overflow: hidden;
  color: inherit;
  opacity: 0.82;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.im-conversation {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  background: #ffffff;
}

.im-conversation-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #fffaf1;
}

.im-conversation-head small {
  display: block;
  color: var(--muted);
}

.im-transcript {
  display: grid;
  align-content: end;
  gap: 8px;
  max-height: 360px;
  min-height: 250px;
  overflow-y: auto;
  padding: 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.86)),
    var(--paper-grid);
}

.im-bubble {
  max-width: min(72%, 520px);
  padding: 8px 10px;
  border: 1px solid #b9c9e3;
  border-radius: 6px;
  background: #f8fbff;
}

.im-bubble.outgoing {
  justify-self: end;
  border-color: #244f8f;
  color: #ffffff;
  background: linear-gradient(#316eb9, #244f8f);
}

.im-bubble p {
  margin: 4px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.im-meta {
  font-size: 11px;
  font-weight: 800;
  opacity: 0.78;
}

.im-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #eef3fb;
}

.im-compose .editor-textarea {
  min-height: 58px;
  max-height: 120px;
}

.css-textarea {
  min-height: 220px;
}

.profile-theme-editor {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #c8d5e8;
  border-radius: 6px;
  background: #f7faff;
}

.profile-theme-editor legend,
.module-toggles legend,
.song-uploader legend,
.photo-uploader legend {
  font-weight: 700;
}

.theme-preset-row,
.module-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.theme-preset-button {
  display: inline-grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 150px;
  text-align: left;
}

.theme-swatch {
  display: block;
  width: 30px;
  aspect-ratio: 1;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  background:
    linear-gradient(135deg, var(--swatch-bg) 0 45%, var(--swatch-panel) 45% 72%, var(--swatch-accent) 72% 100%);
}

.profile-quest {
  margin-bottom: 12px;
  border-color: #d8b47a;
}

.profile-quest .module-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.quest-meter {
  height: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid #b9c8e0;
  border-radius: 999px;
  background: #eef3fb;
}

.quest-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--pink));
}

.quest-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.quest-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 8px;
  border: 1px solid #d9e2f4;
  border-radius: 6px;
  background: #fff;
}

.quest-item span {
  display: grid;
  place-items: center;
  width: 30px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  background: #7e91b4;
  font-size: 11px;
  font-weight: 900;
}

.quest-item.done {
  border-color: #b8d8c2;
  background: #f4fff6;
}

.quest-item.done span {
  background: var(--green);
}

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

.theme-grid label,
.font-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.color-input {
  width: 100%;
  min-height: 36px;
  padding: 2px;
  border: 1px solid #7e91b4;
  border-radius: 4px;
  background: #fff;
}

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

.module-order-box {
  min-width: 0;
  border: 1px solid #c8d5e8;
  border-radius: 6px;
  background: #f7faff;
  overflow: hidden;
}

.module-order-box h3 {
  margin: 0;
  padding: 7px 9px;
  color: #17345d;
  background: #dce9ff;
  font-size: 13px;
}

.module-order-list {
  display: grid;
  gap: 7px;
  padding: 8px;
}

.module-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid #d9e2f4;
  border-radius: 5px;
  background: #fff;
}

.module-order-row small {
  display: block;
  color: var(--muted);
}

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

.custom-module-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #c8d5e8;
  border-radius: 6px;
  background: #fff;
}

.child-account-panel {
  display: grid;
  gap: 12px;
}

.launch-access-panel {
  display: grid;
  gap: 12px;
}

.launch-access-status,
.invite-code-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #c8d5e8;
  border-radius: 6px;
  background: #fff;
}

.launch-access-status p {
  margin: 0;
}

.invite-code-list {
  display: grid;
  gap: 8px;
}

.invite-code-card strong {
  color: var(--chrome-dark);
  letter-spacing: 0.04em;
}

.invite-code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: end;
}

.child-account-intro,
.child-account-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #c8d5e8;
  border-radius: 6px;
  background: #fff;
}

.child-account-intro {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.child-account-list,
.child-connection-list {
  display: grid;
  gap: 8px;
}

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

.child-account-header h3 {
  margin: 0;
  color: var(--accent);
  font-size: 15px;
}

.child-connection-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 12px;
  align-items: start;
}

.child-safety-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 12px;
  align-items: start;
}

.child-connection-row {
  background: #f8fbff;
}

.friend-editor-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
}

.friend-editor-row + .friend-editor-row {
  margin-top: 8px;
}

.friend-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.status-pill.away {
  background: var(--pink);
}

.module-toggles {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 10px;
  border: 1px solid #dbe4f3;
  border-radius: 5px;
  background: #f8fbff;
}

.song-uploader {
  display: grid;
  gap: 8px;
  margin: 4px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
}

.music-upload-form {
  margin-top: 0;
}

.music-file-drop {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 2px dashed #9dadc8;
  border-radius: 6px;
  color: var(--chrome-dark);
  background: #f8fbff;
  font-weight: 800;
}

.music-file-drop span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.song-uploader legend {
  padding: 0 4px;
  color: var(--chrome-dark);
  font-weight: 800;
}

.song-source-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}

.module-toggles legend {
  color: var(--muted);
  font-weight: 700;
}

.toggle-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.music-player {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dbe4f3;
  background: #f8fbff;
}

.music-player.compact {
  grid-template-columns: 54px minmax(0, 1fr);
}

.music-player.compact button {
  grid-column: 1 / -1;
}

.profile-audio {
  display: block;
  width: 100%;
  margin-top: 8px;
}

.music-source {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.cassette-art {
  display: grid;
  place-items: center;
  width: 64px;
  aspect-ratio: 1;
  border: 2px solid #162033;
  border-radius: 5px;
  color: #fff;
  background:
    linear-gradient(90deg, transparent 34%, rgba(255, 255, 255, 0.22) 34% 66%, transparent 66%),
    linear-gradient(135deg, #244f8f, #c7437a);
  font-weight: 900;
}

.compact .cassette-art {
  width: 48px;
}

.music-bars {
  display: flex;
  gap: 3px;
  align-items: end;
  height: 24px;
  margin-top: 6px;
}

.music-bars span {
  width: 7px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.music-bars span:nth-child(1) { height: 9px; }
.music-bars span:nth-child(2) { height: 19px; }
.music-bars span:nth-child(3) { height: 13px; }
.music-bars span:nth-child(4) { height: 22px; }
.music-bars span:nth-child(5) { height: 15px; }

.music-bars.has-real-track span {
  background: var(--green);
}

.music-grid {
  display: grid;
  gap: 9px;
}

.mixtape-stack {
  display: grid;
  gap: 8px;
}

.mixtape-track {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 9px;
  border: 1px solid #d7e1f0;
  border-radius: 6px;
  background: #ffffff;
}

.mixtape-rank {
  display: grid;
  place-items: center;
  width: 30px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--chrome));
  font-weight: 900;
}

.mixtape-track strong,
.mixtape-track small {
  display: block;
}

.mixtape-track small {
  color: var(--muted);
}

.starter-track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.starter-track-card {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid #d5ddec;
  background: #fffdf7;
}

.starter-track-card strong {
  display: block;
  margin-top: 5px;
  color: #15284c;
  font-size: 15px;
}

.starter-track-card p {
  margin: 6px 0 0;
}

.track-badge {
  display: inline-block;
  padding: 2px 5px;
  border: 1px solid #c49a2c;
  color: #6f4b00;
  background: #fff3c4;
  font-size: 11px;
  font-weight: 700;
}

.template-strip,
.starter-template-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.template-strip {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.starter-template-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.starter-template {
  display: grid;
  gap: 3px;
  min-height: 72px;
  padding: 10px;
  text-align: left;
  color: var(--ink);
  background:
    linear-gradient(180deg, #ffffff, #eef5ff),
    repeating-linear-gradient(45deg, rgba(31, 95, 180, 0.06) 0 6px, transparent 6px 12px);
}

.starter-template small {
  color: var(--muted);
  font-weight: 700;
}

.music-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 9px;
}

.arcade-page {
  display: grid;
  gap: 12px;
}

.arcade-heading {
  padding: 12px;
  border: 1px solid #c49a2c;
  border-radius: 8px;
  color: #ffe9a8;
  background:
    linear-gradient(135deg, rgba(8, 8, 8, 0.96), rgba(29, 19, 4, 0.94)),
    repeating-linear-gradient(90deg, rgba(255, 215, 0, 0.08) 0 1px, transparent 1px 18px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.arcade-heading h2 {
  color: #ffd978;
  font-family: Georgia, "Times New Roman", serif;
}

.arcade-heading small {
  color: #f4d884;
}

.arcade-hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 260px);
  gap: 16px;
  overflow: hidden;
  border: 1px solid #d6a21f;
  border-radius: 8px;
  color: #f9e9b6;
  background:
    linear-gradient(135deg, rgba(3, 3, 3, 0.98), rgba(24, 18, 5, 0.96)),
    linear-gradient(90deg, rgba(255, 215, 0, 0.14), transparent 55%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 20px);
  box-shadow: 0 14px 34px rgba(10, 8, 2, 0.26);
}

.arcade-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 20px;
}

.arcade-kicker {
  color: #00d4ff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.arcade-hero-copy h3 {
  margin: 0;
  color: #ffd978;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

.arcade-hero-copy h3 span,
.arcade-sigil,
.arcade-game-omega {
  font-family: Georgia, "Times New Roman", serif;
}

.arcade-hero-copy p {
  max-width: 720px;
  margin: 0;
  color: #f1dc9a;
  font-size: 16px;
}

.arcade-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 540px;
  border: 1px solid rgba(255, 215, 0, 0.38);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.34);
}

.arcade-stats div {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-left: 1px solid rgba(255, 215, 0, 0.22);
  text-align: center;
}

.arcade-stats div:first-child {
  border-left: 0;
}

.arcade-stats strong {
  color: #ffd978;
  font-size: 26px;
  line-height: 1;
}

.arcade-stats span {
  color: #f4d884;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.arcade-sigil {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: rgba(255, 217, 120, 0.7);
  font-size: clamp(140px, 18vw, 260px);
  font-weight: 900;
  line-height: 0.8;
  text-shadow: 0 0 38px rgba(255, 185, 40, 0.28);
}

.arcade-preview-module {
  overflow: hidden;
  border-color: #d6a21f;
  background: #0b0b0b;
}

.arcade-preview-module .module-title {
  color: #0b0b0b;
  background: linear-gradient(90deg, #ffd978, #b8860b);
  border-color: #8b6a16;
}

.arcade-frame-wrap {
  padding: 0;
  background: #050505;
}

.arcade-frame {
  display: block;
  width: 100%;
  height: clamp(620px, 68vh, 860px);
  border: 0;
  background: #050505;
}

.arcade-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.arcade-game-card {
  display: grid;
  gap: 8px;
  min-height: 236px;
  padding: 13px;
  border: 1px solid rgba(214, 162, 31, 0.55);
  border-radius: 8px;
  color: #f7e7ad;
  background:
    linear-gradient(180deg, rgba(23, 23, 23, 0.98), rgba(7, 7, 7, 0.98)),
    linear-gradient(135deg, rgba(255, 215, 0, 0.11), transparent 64%);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.18);
}

.arcade-game-card.is-active {
  border-color: #00d4ff;
  box-shadow:
    0 0 0 1px rgba(0, 212, 255, 0.36) inset,
    0 8px 22px rgba(0, 0, 0, 0.22);
}

.arcade-game-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #00d4ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.arcade-game-omega {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 217, 120, 0.8);
  border-radius: 50%;
  color: #ffd978;
  background: #070707;
  font-size: 22px;
  line-height: 1;
}

.arcade-game-card h3 {
  margin: 0;
  color: #ffd978;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.arcade-game-card strong {
  color: #f4d884;
  font-size: 13px;
}

.arcade-game-card p {
  margin: 0;
  color: #d7cda8;
}

.arcade-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: end;
  margin-top: auto;
}

.arcade-card-actions button,
.arcade-card-actions .button-link,
.arcade-heading .button-link {
  border-color: #b8860b;
  color: #080808;
  background: linear-gradient(#ffe39b, #c89418);
  font-weight: 800;
}

.arcade-card-actions .button-link.subtle,
.arcade-heading .button-link.subtle,
.arcade-heading button.subtle {
  color: #f8e7a2;
  background: rgba(0, 0, 0, 0.32);
}

.empty-state {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #f8fbff;
  text-align: center;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 0 0 10px;
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
}

.section-heading small {
  color: var(--muted);
}

.notice {
  margin: 0 0 10px;
  padding: 9px 10px;
  border: 1px solid #d8b47a;
  border-radius: 5px;
  color: #593306;
  background: #fff5df;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .site-header,
  .workspace,
  .profile-layout,
  .editor-grid,
  .dashboard-grid,
  .font-grid,
  .module-order-grid,
  .welcome-board,
  .arcade-hero-panel,
  .omega-home-hero,
  .omega-launchpad,
  .landing-grid,
  .clubhouse-grid {
    grid-template-columns: 1fr;
  }

  .arcade-sigil {
    min-height: 80px;
    font-size: 110px;
  }

  .arcade-frame {
    height: 560px;
  }

  .session-chip {
    text-align: left;
  }

  .left-rail {
    position: static;
  }

  .main-stage {
    min-height: 0;
  }

  .welcome-stats {
    border-top: 1px solid #d6e0f0;
    border-left: 0;
  }

  .omega-home-stats,
  .admin-health-grid {
    border-top: 1px solid #d6e0f0;
    border-left: 0;
  }

  .auth-form {
    grid-template-columns: 1fr;
  }

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

  .hero-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }

  .left-rail {
    order: 2;
  }
}

@media (max-width: 760px) {
  button,
  .button-link,
  input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
  select {
    min-height: 42px;
  }

  textarea {
    min-height: 128px;
  }

  .app-shell {
    min-height: 100vh;
  }

  .site-header {
    gap: 10px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-mark {
    width: 42px;
    height: 38px;
    font-size: 27px;
  }

  .brand-copy small {
    line-height: 1.25;
  }

  .session-chip,
  .account-card,
  .account-details {
    text-align: left;
  }

  .primary-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 6px;
  }

  .tab {
    min-width: 0;
    min-height: 42px;
    padding: 8px 6px;
    border-radius: 5px;
    font-size: 12px;
  }

  .workspace {
    gap: 10px;
    padding: 10px;
  }

  .main-stage {
    min-height: 0;
  }

  .directory-list {
    max-height: none;
  }

  .directory-button {
    min-height: 64px;
  }

  .section-heading {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .section-heading > button,
  .section-heading .button-link,
  .section-heading .segmented-actions {
    width: 100%;
  }

  .segmented-actions,
  .inline-actions,
  .preset-strip,
  .template-strip,
  .theme-preset-row,
  .module-order-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .inline-actions button,
  .segmented-actions button,
  .preset-strip button,
  .template-strip button,
  .theme-preset-row button,
  .module-order-actions button,
  .friend-actions button,
  .button-link {
    width: 100%;
  }

	  .comment-form,
	  .reply-form,
	  .quick-form-inline,
	  .child-account-intro,
	  .child-connection-grid,
	  .child-safety-grid,
	  .launch-access-status,
	  .invite-code-card,
	  .photo-uploader-row,
	  .song-source-row,
    .music-upload-grid,
    .profile-post-list,
	  .omega-home-actions,
	  .quick-action-grid,
	  .setup-list,
	  .today-snapshot-grid,
	  .room-preview-card,
    .quest-list {
	    grid-template-columns: 1fr;
  }

  .omega-home-stats,
  .admin-health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .feed-card,
  .module-body,
  .editor-panel-body,
  .profile-theme-editor,
  .song-uploader,
  .music-file-drop,
  .photo-uploader {
    padding: 10px;
  }

  .arcade-page {
    gap: 10px;
  }

  .arcade-heading {
    padding: 10px;
  }

  .arcade-heading .segmented-actions {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .arcade-heading button[data-action="preview-arcade-hub"],
  .arcade-card-actions button[data-action="preview-arcade-game"] {
    display: none;
  }

  .arcade-hero-panel {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .arcade-hero-copy {
    padding: 16px;
  }

  .arcade-hero-copy h3 {
    font-size: clamp(29px, 9vw, 40px);
  }

  .arcade-hero-copy p {
    font-size: 14px;
    line-height: 1.45;
  }

  .arcade-stats {
    max-width: none;
  }

  .arcade-stats div {
    padding: 9px 6px;
  }

  .arcade-stats strong {
    font-size: 22px;
  }

  .arcade-stats span {
    font-size: 9px;
  }

  .arcade-sigil {
    display: none;
  }

  .arcade-preview-module {
    display: none;
  }

  .arcade-game-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .arcade-game-card {
    min-height: 0;
    padding: 12px;
  }

  .arcade-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

  .app-shell {
    width: 100%;
    margin: 0;
    border-left: 0;
    border-right: 0;
  }

  .site-header {
    padding: 9px;
  }

  .brand-copy strong {
    font-size: 22px;
  }

  .header-search,
  .quick-form-inline {
    grid-template-columns: 1fr;
  }

  .header-search button,
  .auth-form button {
    width: 100%;
  }

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

  .workspace {
    padding: 10px;
  }

  .profile-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .welcome-copy {
    padding: 18px;
  }

  .welcome-copy h1 {
    font-size: 28px;
  }

  .profile-hero .avatar {
    margin: 0 auto;
  }

  .hero-actions,
  .friend-grid,
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .friend-grid {
    gap: 7px;
  }

  .profile-code-frame {
    min-height: 340px;
  }

  .detail-row,
	  .stats-grid div,
	  .friend-editor-row,
	  .child-account-header,
	  .notification-card,
  .photo-uploader-row,
  .song-source-row,
  .music-upload-grid,
  .profile-post-card,
  .mixtape-track,
  .music-card,
  .music-player {
    grid-template-columns: 1fr;
  }

  .friend-actions {
    justify-content: stretch;
  }

  .friend-actions button {
    flex: 1 1 72px;
  }

  .music-player,
  .music-card {
    gap: 8px;
  }

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

  .im-buddy-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(175px, 1fr);
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .im-transcript {
    max-height: 300px;
  }
}

@media (max-width: 420px) {
  .hero-actions,
  .friend-grid,
  .contact-grid,
  .segmented-actions,
  .inline-actions,
  .preset-strip,
  .template-strip,
  .theme-preset-row,
  .module-order-actions {
    grid-template-columns: 1fr;
  }

  .comment-row {
    grid-template-columns: 1fr;
  }

  .comment-row .avatar {
    margin-bottom: 2px;
  }

  .module-order-row,
  .friend-editor-row,
  .notification-card {
    grid-template-columns: 1fr;
  }

  .im-compose {
    grid-template-columns: 1fr;
  }

  .im-bubble {
    max-width: 92%;
  }
}
