[data-theme] {
  /* Left-edge rail: fixed widths and one permanent row grid */
  --sidebar-width: 17.5rem;
  --sidebar-open-width: var(--sidebar-width);
  --sidebar-inline-pad: calc(0.7rem + var(--gutter));
  --sidebar-collapsed-width: calc((var(--sidebar-inline-pad) * 2) + var(--sidebar-rail-width) + 2px);
  --sidebar-row-gap: calc(0.4rem + var(--gutter));
  --sidebar-active-inset: calc(0.04rem + var(--gutter));
  --theme-radial-a: rgba(59, 140, 255, 0.38);
  --theme-radial-b: rgba(168, 212, 255, 0.22);
  --theme-radial-c: rgba(45, 125, 255, 0.12);
  --theme-orb-a: rgba(59, 140, 255, 0.36);
  --theme-orb-b: rgba(120, 200, 255, 0.3);
}

[data-theme] body {
  background:
    radial-gradient(ellipse 90% 70% at 12% -8%, var(--theme-radial-a), transparent 52%),
    radial-gradient(ellipse 70% 55% at 92% 8%, var(--theme-radial-b), transparent 45%),
    radial-gradient(ellipse 50% 40% at 50% 100%, var(--theme-radial-c), transparent 50%),
    linear-gradient(155deg, var(--bg-0), var(--bg-1) 38%, var(--bg-2));
}

[data-theme] body::before {
  background: var(--theme-orb-a);
  opacity: 0.74;
}

[data-theme] body::after {
  background: var(--theme-orb-b);
  opacity: 0.62;
}

.shell {
  display: flex;
  gap: calc(0.95rem + var(--gutter));
  min-height: 100dvh;
  padding: 0;
}

.shell--sidebar-collapsed {
  gap: calc(0.95rem + var(--gutter));
}

.shell-sidebar {
  display: flex;
  flex-direction: column;
  gap: calc(0.85rem + var(--gutter));
  flex: 0 0 var(--sidebar-width);
  width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  min-height: 100dvh;
  height: 100dvh;
  margin: 0;
  padding: calc(0.95rem + var(--gutter)) var(--sidebar-inline-pad) calc(1.05rem + var(--gutter));
  border-left: 0;
  border-radius: 0 calc(var(--radius-xl) + 0.35rem) calc(var(--radius-xl) + 0.35rem) 0;
  background:
    linear-gradient(180deg, rgba(10, 16, 28, 0.98), rgba(7, 12, 22, 0.95)),
    rgba(6, 10, 18, 0.96);
  box-shadow:
    inset -1px 0 0 rgba(140, 200, 255, 0.16),
    18px 0 42px rgba(0, 0, 0, 0.26);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  overscroll-behavior: contain;
  min-width: 0;
}

.shell-sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.shell--sidebar-collapsed .shell-sidebar {
  flex-basis: var(--sidebar-collapsed-width);
  width: var(--sidebar-collapsed-width);
  max-width: var(--sidebar-collapsed-width);
  margin: 0;
}

.shell-main,
.shell-stage,
.pane-stack,
.sidebar-toggle-row,
.sidebar-block,
.tab-list,
.route-list {
  min-width: 0;
}

.shell-sidebar__row,
.sidebar-toggle-btn,
.tab-card,
.route-link {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: var(--sidebar-row-template);
  align-items: center;
  column-gap: var(--sidebar-row-gap);
}

.shell-sidebar__rail,
.sidebar-toggle-btn__rail,
.tab-card__icon,
.route-link__rail {
  inline-size: var(--sidebar-rail-width);
  min-inline-size: var(--sidebar-rail-width);
  block-size: var(--sidebar-tile);
  min-block-size: var(--sidebar-tile);
  display: grid;
  place-items: center;
  justify-self: start;
  align-self: center;
}

.shell-sidebar__actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: calc(0.35rem + var(--gutter));
  justify-self: end;
}

.shell-sidebar__actions:empty {
  display: none;
}

.shell-sidebar__brand {
  padding: 0;
}

.shell-sidebar__rest,
.sidebar-toggle-btn__label,
.tab-card__body,
.route-link__label {
  width: auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transform-origin: left center;
  will-change: max-width, opacity, transform;
  transition:
    max-width var(--sidebar-rest-ease),
    opacity var(--sidebar-rest-ease),
    transform var(--sidebar-rest-ease),
    visibility 0s linear 0s;
}

.shell--sidebar-collapsed .shell-sidebar__row,
.shell--sidebar-collapsed .sidebar-toggle-btn,
.shell--sidebar-collapsed .tab-card,
.shell--sidebar-collapsed .route-link {
  grid-template-columns: var(--sidebar-row-template);
  justify-content: stretch;
  column-gap: var(--sidebar-row-gap);
}

.shell--sidebar-collapsed .shell-sidebar__actions {
  justify-content: flex-end;
}

.shell--sidebar-collapsed .shell-sidebar__rest,
.shell--sidebar-collapsed .sidebar-toggle-btn__label,
.shell--sidebar-collapsed .tab-card__body,
.shell--sidebar-collapsed .route-link__label {
  width: auto;
  max-width: 0;
  opacity: 0;
  transform: translateX(-0.2rem);
  pointer-events: none;
  visibility: hidden;
  transition:
    max-width var(--sidebar-rest-ease),
    opacity var(--sidebar-rest-ease),
    transform var(--sidebar-rest-ease),
    visibility 0s linear var(--sidebar-rest-ease);
}

.sidebar-block,
.tab-list,
.route-list {
  min-width: 0;
}

.tab-list,
.route-list,
.shell-pane--internal,
.ai-chat__messages {
  scrollbar-width: none;
}

.tab-list::-webkit-scrollbar,
.route-list::-webkit-scrollbar,
.shell-pane--internal::-webkit-scrollbar,
.ai-chat__messages::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.tab-card {
  align-items: center;
}

.tab-card__icon,
.route-link__icon {
  margin: 0;
}

.shell-sidebar__title {
  font-size: 1.34rem;
  letter-spacing: 0.1em;
}

.sidebar-toggle-row {
  padding: 0;
}

.sidebar-toggle-btn {
  min-height: calc(var(--sidebar-tile) + 0.1rem);
  padding: 0 calc(0.2rem + var(--gutter)) 0 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  box-shadow: none;
}

.sidebar-toggle-btn:hover,
.sidebar-toggle-btn:focus-visible {
  transform: none;
  box-shadow: none;
}

.sidebar-block {
  gap: calc(0.5rem + var(--gutter));
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.sidebar-block--tabs,
.shell--sidebar-collapsed .sidebar-block--tabs {
  flex: 1 1 auto;
  min-height: 0;
}

.sidebar-block--links,
.shell--sidebar-collapsed .sidebar-block--links {
  flex: 0 0 auto;
  margin-top: auto;
}

.sidebar-block__header {
  min-height: var(--sidebar-tile);
  padding-right: calc(0.15rem + var(--gutter));
}

.sidebar-block__heading {
  opacity: 0.72;
}

.tab-list,
.route-list {
  gap: calc(0.22rem + var(--gutter));
  padding: 0;
}

.tab-list {
  flex: 0 0 auto;
  min-height: 0;
  max-height: min(18rem, 38vh);
  padding-top: calc(0.25rem + var(--gutter));
}

.tab-card,
.route-link {
  position: relative;
  min-height: calc(var(--sidebar-tile) + 0.15rem);
  padding: 0 calc(0.35rem + var(--gutter)) 0 0;
  border-radius: 0.95rem;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.tab-card::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline: var(--sidebar-active-inset) var(--sidebar-active-inset);
  border-radius: inherit;
  border: 1px solid transparent;
  background: transparent;
  pointer-events: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

.tab-card:hover::before,
.route-link:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.06);
  transform: none;
  box-shadow: none;
}

.tab-card--active {
  background: transparent;
}

.tab-card--active::before {
  background:
    linear-gradient(135deg, rgba(45, 125, 255, 0.18), rgba(88, 160, 255, 0.08)),
    rgba(255, 255, 255, 0.03);
  border-color: rgba(88, 160, 255, 0.24);
}

.tab-card--active:hover::before {
  background:
    linear-gradient(135deg, rgba(45, 125, 255, 0.2), rgba(88, 160, 255, 0.1)),
    rgba(255, 255, 255, 0.04);
  border-color: rgba(88, 160, 255, 0.28);
}

.tab-card__icon,
.route-link__rail,
.sidebar-toggle-btn__rail {
  justify-self: start;
}

.tab-card__close {
  justify-self: end;
}

.shell--sidebar-collapsed .tab-list,
.shell--sidebar-collapsed .route-list {
  width: 100%;
}

.shell-sidebar__rail--action .sidebar-block__action--icon {
  width: var(--sidebar-tile);
  height: var(--sidebar-tile);
  min-width: var(--sidebar-tile);
  min-height: var(--sidebar-tile);
}

.shell--sidebar-collapsed .tab-list:empty {
  display: none;
}

.featured-launch {
  gap: 0.85rem;
}

.featured-launch__body {
  gap: 0.55rem;
  padding: 0.9rem 0.95rem 0.95rem;
}

.featured-launch__title {
  font-size: clamp(1.12rem, 1.45vw, 1.3rem);
}

.featured-launch__meta {
  font-size: 0.9rem;
  line-height: 1.5;
}

.featured-launch__cta {
  margin-top: 0.2rem;
}

.pane-stack {
  height: 100%;
}

.shell-pane,
.shell-pane--frame,
.shell-pane__frame {
  min-height: 100%;
}

.shell-pane--gamelauncher {
  padding: 1rem;
  overflow: hidden;
}

.shell-pane--ai {
  gap: 0;
  padding: 0.65rem 1rem 1rem;
  overflow: hidden;
}

.shell-pane--active.shell-pane--ai {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.ai-layout {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.prompt-list {
  gap: 0.75rem;
}

.prompt-list--composer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.prompt-chip {
  padding: 0.72rem 0.95rem 0.78rem;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  font-size: 0.88rem;
  line-height: 1.2;
}

.prompt-chip:hover,
.prompt-chip:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(88, 160, 255, 0.3);
  box-shadow: 0 12px 28px rgba(10, 18, 30, 0.24);
}

.ai-chat {
  min-height: min(48rem, calc(100dvh - 7.5rem));
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 0;
  overflow: hidden;
  border-radius: calc(var(--radius-xl) - 0.15rem);
  background:
    linear-gradient(180deg, rgba(11, 15, 21, 0.985), rgba(9, 12, 18, 0.995)),
    rgba(8, 11, 16, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 26px 48px rgba(0, 0, 0, 0.26);
}

.ai-chat__messages {
  gap: 1.15rem;
  padding: 1.45rem 1.25rem 1rem;
  scroll-padding-bottom: 2rem;
}

.ai-message {
  width: min(48rem, 100%);
  padding: 0;
  border: 0;
  background: transparent;
  margin-inline: auto;
}

.ai-message--assistant {
  align-self: stretch;
}

.ai-message--assistant .ai-message__body {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.ai-message--user {
  align-self: flex-end;
  width: min(42rem, 86%);
  margin-right: 0;
}

.ai-message--user .ai-message__body {
  background:
    linear-gradient(135deg, rgba(45, 125, 255, 0.28), rgba(88, 160, 255, 0.16)),
    rgba(22, 34, 52, 0.88);
  border: 1px solid rgba(88, 160, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ai-message__label {
  margin-bottom: 0.45rem;
  padding-inline: 0.1rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(159, 176, 200, 0.72);
}

.ai-message__body {
  padding: 1rem 0.25rem 0.2rem;
  border-radius: 1.3rem;
  line-height: 1.72;
}

.ai-message--assistant .ai-message__body {
  border-top-left-radius: 0.6rem;
}

.ai-message--user .ai-message__body {
  padding: 1rem 1.05rem 1rem;
  border-top-right-radius: 0.6rem;
}

.ai-message__body p:first-child,
.ai-message__body ul:first-child,
.ai-message__body pre:first-child {
  margin-top: 0;
}

.ai-message__body p:last-child,
.ai-message__body ul:last-child,
.ai-message__body pre:last-child {
  margin-bottom: 0;
}

.ai-message__body pre {
  background: rgba(3, 8, 14, 0.76);
}

.ai-chat__composer {
  display: grid;
  gap: 0.85rem;
  padding: 0.95rem 1rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(15, 20, 29, 0.98), rgba(10, 14, 21, 0.99)),
    rgba(10, 14, 21, 0.96);
}

.ai-chat__form {
  position: relative;
  width: min(48rem, 100%);
  margin: 0 auto;
  padding: 0;
  background: transparent;
}

.ai-chat__input {
  --ai-input-max-height: 176px;
  width: 100%;
  min-height: 3.35rem;
  max-height: var(--ai-input-max-height);
  padding: 0.92rem 4.35rem 0.92rem 1.08rem;
  resize: none;
  overflow-y: hidden;
  line-height: 1.5;
  border-radius: 1.55rem;
  background:
    linear-gradient(180deg, rgba(34, 40, 49, 0.98), rgba(27, 32, 40, 0.98)),
    rgba(28, 33, 41, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 28px rgba(0, 0, 0, 0.2);
}

.ai-chat__input::placeholder {
  color: rgba(159, 176, 200, 0.56);
}

.ai-chat__actions {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ai-chat__send {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border-radius: 999px;
  font-size: 0;
  background: linear-gradient(145deg, rgba(88, 160, 255, 0.95), rgba(45, 125, 255, 0.95));
  border-color: rgba(120, 185, 255, 0.42);
  box-shadow: 0 16px 30px rgba(45, 125, 255, 0.18);
}

.ai-chat__send-icon {
  width: 1rem;
  height: 1rem;
  stroke-width: 2.2;
}

.shell-pane--account,
.shell-pane--chat {
  display: none;
}

.shell-pane--internal.shell-pane--account,
.shell-pane--internal.shell-pane--chat {
  min-height: 0;
  overflow: hidden;
  padding: 0.75rem clamp(1rem, 3.5vw, 2.5rem) 1rem;
}

.shell-pane--active.shell-pane--account,
.shell-pane--active.shell-pane--chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Discord-style step wizards (account + chat) */
.pane-wizard {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0.65rem;
}

.pane-wizard__header {
  flex: 0 0 auto;
  margin-inline: clamp(0.25rem, 1.5vw, 0.75rem);
}

.pane-wizard__status {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pane-wizard__track {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  margin-inline: clamp(0.5rem, 2vw, 1.25rem);
}

.pane-wizard__step {
  display: none;
  height: 100%;
  min-height: 0;
  animation: pane-wizard-fade 220ms ease;
}

.pane-wizard__step.is-active {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@keyframes pane-wizard-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pane-wizard__step-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.35rem 0.15rem 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pane-wizard__step-body--stack {
  justify-content: flex-start;
  gap: 1rem;
}

.pane-wizard__step-body--threads .chat-sidebar {
  flex: 1;
  min-height: min(34rem, 64dvh);
  max-height: min(54rem, calc(100dvh - 10.5rem));
  overflow-y: auto;
}

.pane-wizard__step-body--room .chat-room {
  flex: 1;
  min-height: min(30rem, 58dvh);
  max-height: min(62rem, calc(100dvh - 9.5rem));
}

.pane-wizard__eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: rgba(159, 176, 200, 0.72);
  margin: 0 0 0.5rem;
}

.pane-wizard__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.15;
  font-weight: 700;
}

.pane-wizard__lede {
  margin: 0;
  max-width: 32rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.pane-wizard__footer {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem clamp(0.5rem, 2vw, 1rem) 0.15rem;
  margin-inline: clamp(0.5rem, 2vw, 1.25rem);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pane-wizard__dots {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.pane-wizard__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.pane-wizard__dot.is-active {
  background: rgba(88, 160, 255, 0.95);
  transform: scale(1.15);
}

.pane-wizard__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  max-width: 28rem;
}

.pane-wizard__nav .toolbar-button[hidden] {
  display: none;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.account-card {
  min-height: 0;
}

.pane-wizard__step-body .account-card {
  min-height: 12rem;
}

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

.account-summary,
.account-saves,
.account-metrics,
.account-quick-actions,
.chat-session {
  margin-top: 1rem;
}

.account-summary__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 1.15rem;
  background:
    linear-gradient(135deg, rgba(45, 125, 255, 0.15), rgba(17, 26, 38, 0.58)),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(88, 160, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 20px 40px rgba(5, 11, 18, 0.2);
}

.account-summary__identity {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.account-summary__eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(159, 176, 200, 0.76);
}

.account-summary__identity strong {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.15;
}

.account-summary__identity span {
  color: var(--muted);
  font-size: 0.88rem;
}

.account-summary__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.account-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.8rem;
}

.account-metric-card {
  display: grid;
  gap: 0.38rem;
  padding: 0.9rem 0.95rem 0.95rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.account-metric-card__label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(159, 176, 200, 0.72);
}

.account-metric-card__value {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.1;
}

.account-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.account-save-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.account-save-card + .account-save-card {
  margin-top: 0.7rem;
}

.account-save-card__content {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.account-save-card__content span {
  color: var(--muted);
  font-size: 0.84rem;
}

.chat-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
  gap: 1rem;
  min-height: min(48rem, calc(100dvh - 7.5rem));
}

.chat-sidebar,
.chat-room {
  min-height: 0;
}

.chat-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-session-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1.05rem 1.1rem;
  border-radius: 1.15rem;
  background:
    linear-gradient(135deg, rgba(45, 125, 255, 0.12), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(88, 160, 255, 0.16);
}

.chat-session-card__identity {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.chat-session-card__identity strong {
  font-size: 0.98rem;
  line-height: 1.15;
}

.chat-session-card__identity span {
  color: var(--muted);
  font-size: 0.82rem;
}

.chat-create-form {
  display: grid;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-thread-list,
.chat-room-catalog,
.chat-request-list {
  display: grid;
  gap: 0.7rem;
}

.chat-thread-card,
.chat-room-card,
.chat-request-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.chat-thread-card {
  text-align: left;
}

.chat-thread-card__content {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  text-align: left;
}

.chat-thread-card strong,
.chat-room-card strong,
.chat-request-card strong {
  display: block;
  font-size: 0.94rem;
}

.chat-thread-card span,
.chat-room-card span,
.chat-request-card span,
.chat-room-catalog__title {
  color: var(--muted);
  font-size: 0.82rem;
}

.chat-thread-card--active {
  border-color: rgba(88, 160, 255, 0.42);
  background: linear-gradient(135deg, rgba(59, 140, 255, 0.2), rgba(59, 140, 255, 0.08));
}

.chat-thread-card__badge {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 0.32rem 0.58rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(152, 196, 255, 0.94);
  background: rgba(45, 125, 255, 0.14);
  border: 1px solid rgba(88, 160, 255, 0.22);
}

.chat-room-card__content {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.chat-request-card__content {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.chat-request-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.chat-room-card__joined {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(134, 222, 177, 0.96);
}

.chat-room {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 0;
  overflow: hidden;
}

.chat-room__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem 1.1rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-room__title-wrap {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.chat-room__header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex: 0 0 auto;
}

.chat-room__title {
  font-size: 1.02rem;
}

.chat-room__meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.chat-room__messages {
  display: grid;
  gap: 0.95rem;
  align-content: start;
  overflow: auto;
  padding: 1.2rem 1.25rem;
}

.chat-message {
  display: grid;
  gap: 0.25rem;
  max-width: min(100%, 40rem);
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-message--own {
  margin-left: auto;
  background:
    linear-gradient(135deg, rgba(45, 125, 255, 0.24), rgba(88, 160, 255, 0.1)),
    rgba(18, 31, 49, 0.88);
  border-color: rgba(88, 160, 255, 0.26);
}

.chat-message--own .chat-message__meta {
  color: rgba(188, 214, 255, 0.8);
}

.chat-message__meta {
  color: var(--muted);
  font-size: 0.76rem;
}

.chat-message__body {
  white-space: pre-wrap;
  line-height: 1.55;
}

.chat-room__composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
  padding: 1rem 1.1rem 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-room__input {
  min-height: 4.25rem;
}

.chat-room__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.chat-room__counter {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.empty-state--compact {
  min-height: 4.5rem;
}

/* Chat thread / room catalog hints: two clear sentences with periods */
.empty-state--stacked strong,
.empty-state--stacked span {
  display: block;
}

.empty-state--stacked strong {
  color: var(--text);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.empty-state--stacked span {
  line-height: 1.5;
}

.game-launcher__cloud-status {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.game-launcher {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.game-launcher__stage {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: calc(var(--radius-xl) - 0.15rem);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 9, 15, 0.75);
  box-shadow:
    inset 0 0 0 1px rgba(142, 189, 255, 0.06),
    0 12px 40px rgba(0, 0, 0, 0.35);
}

.game-launcher__viewport {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: rgba(4, 9, 15, 0.9);
}

.game-launcher__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.85rem 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(12, 20, 30, 0.96), rgba(8, 14, 22, 0.98)),
    rgba(6, 11, 18, 0.95);
}

.game-launcher__bar-start {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 0.45rem;
  row-gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
}

.game-launcher__bar-title {
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.25;
}

.game-launcher__bar-author {
  font-size: clamp(0.88rem, 1.15vw, 1rem);
  font-weight: 500;
  color: var(--muted);
  line-height: 1.25;
}

.game-launcher__bar-sep {
  color: rgba(159, 176, 200, 0.55);
  font-weight: 500;
  white-space: nowrap;
}

.game-launcher__bar-hint {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
}

.game-launcher__bar-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.game-launcher__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 999px;
  box-shadow: none;
  white-space: nowrap;
}

.game-launcher__back {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.game-launcher__back:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(88, 160, 255, 0.35);
  transform: none;
}

.game-launcher__fullscreen-btn {
  gap: 0.45rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  background: rgba(59, 140, 255, 0.2);
  border: 1px solid rgba(88, 160, 255, 0.45);
}

.game-launcher__fullscreen-btn:hover:not(:disabled) {
  background: rgba(59, 140, 255, 0.3);
  border-color: rgba(120, 185, 255, 0.55);
  transform: none;
}

.game-launcher__fullscreen-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.game-launcher__fullscreen-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.game-launcher__frame {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: #0b131b;
}

.empty-state--launcher {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
  padding: 2rem;
  text-align: center;
}

[data-theme="default"] {
  --theme-radial-a: rgba(59, 140, 255, 0.38);
  --theme-radial-b: rgba(168, 212, 255, 0.22);
  --theme-radial-c: rgba(45, 125, 255, 0.14);
  --theme-orb-a: rgba(59, 140, 255, 0.36);
  --theme-orb-b: rgba(120, 200, 255, 0.3);
}

[data-theme="color-wash"] {
  --bg-0: #130d23;
  --bg-1: #22163a;
  --bg-2: #4a2a74;
  --panel: rgba(24, 16, 39, 0.84);
  --panel-soft: rgba(36, 22, 56, 0.72);
  --accent: #7c6cff;
  --accent-strong: #a898ff;
  --accent-cool: #d0c8ff;
  --accent-cool-soft: rgba(124, 108, 255, 0.32);
  --theme-radial-a: rgba(124, 108, 255, 0.42);
  --theme-radial-b: rgba(208, 200, 255, 0.22);
  --theme-radial-c: rgba(127, 255, 243, 0.16);
  --theme-orb-a: rgba(124, 108, 255, 0.4);
  --theme-orb-b: rgba(170, 238, 255, 0.28);
}

[data-theme="miami"] {
  --bg-0: #14051c;
  --bg-1: #220a30;
  --bg-2: #321045;
  --panel: rgba(22, 10, 31, 0.84);
  --panel-soft: rgba(29, 13, 41, 0.72);
  --accent: #ff5c9d;
  --accent-strong: #ffaa3d;
  --accent-cool: #5cfffb;
  --accent-cool-soft: rgba(92, 255, 251, 0.3);
  --theme-radial-a: rgba(255, 92, 157, 0.42);
  --theme-radial-b: rgba(255, 170, 61, 0.2);
  --theme-radial-c: rgba(92, 255, 251, 0.18);
  --theme-orb-a: rgba(255, 92, 157, 0.38);
  --theme-orb-b: rgba(92, 255, 251, 0.28);
}

[data-theme="rainbow"] {
  --bg-0: #1e1007;
  --bg-1: #31140d;
  --bg-2: #16253f;
  --panel: rgba(24, 16, 18, 0.82);
  --panel-soft: rgba(33, 20, 26, 0.7);
  --accent: #ff5340;
  --accent-strong: #ffe14a;
  --accent-cool: #3dffc8;
  --accent-cool-soft: rgba(255, 225, 74, 0.28);
  --theme-radial-a: rgba(255, 83, 64, 0.38);
  --theme-radial-b: rgba(255, 225, 74, 0.24);
  --theme-radial-c: rgba(61, 255, 200, 0.18);
  --theme-orb-a: linear-gradient(135deg, rgba(255, 83, 64, 0.8), rgba(255, 225, 74, 0.45));
  --theme-orb-b: linear-gradient(135deg, rgba(61, 255, 200, 0.68), rgba(79, 141, 255, 0.5));
}

[data-theme="aurora"] {
  --bg-0: #031510;
  --bg-1: #062820;
  --bg-2: #0a3d30;
  --panel: rgba(7, 22, 18, 0.84);
  --panel-soft: rgba(9, 30, 24, 0.72);
  --accent: #2ef5a8;
  --accent-strong: #9dffe8;
  --accent-cool: #b8fff0;
  --accent-cool-soft: rgba(46, 245, 168, 0.3);
  --theme-radial-a: rgba(46, 245, 168, 0.38);
  --theme-radial-b: rgba(157, 255, 232, 0.24);
  --theme-radial-c: rgba(95, 255, 210, 0.16);
  --theme-orb-a: rgba(46, 245, 168, 0.34);
  --theme-orb-b: rgba(184, 255, 240, 0.28);
}

[data-theme="sunset"] {
  --bg-0: #180509;
  --bg-1: #2f0c14;
  --bg-2: #48121c;
  --panel: rgba(25, 11, 15, 0.84);
  --panel-soft: rgba(37, 14, 20, 0.72);
  --accent: #ff6a38;
  --accent-strong: #ffc24a;
  --accent-cool: #ffe0b8;
  --accent-cool-soft: rgba(255, 98, 56, 0.3);
  --theme-radial-a: rgba(255, 106, 56, 0.4);
  --theme-radial-b: rgba(255, 194, 74, 0.22);
  --theme-radial-c: rgba(255, 224, 184, 0.14);
  --theme-orb-a: rgba(255, 106, 56, 0.38);
  --theme-orb-b: rgba(255, 194, 74, 0.26);
}

[data-theme="forest"] {
  --bg-0: #051208;
  --bg-1: #0c2214;
  --bg-2: #143520;
  --panel: rgba(10, 20, 14, 0.84);
  --panel-soft: rgba(16, 29, 20, 0.72);
  --accent: #3dff7a;
  --accent-strong: #9affb0;
  --accent-cool: #c8ffd8;
  --accent-cool-soft: rgba(61, 255, 122, 0.28);
  --theme-radial-a: rgba(61, 255, 122, 0.34);
  --theme-radial-b: rgba(154, 255, 176, 0.2);
  --theme-radial-c: rgba(200, 255, 216, 0.14);
  --theme-orb-a: rgba(61, 255, 122, 0.3);
  --theme-orb-b: rgba(154, 255, 176, 0.22);
}

[data-theme="oceanic"] {
  --bg-0: #020d18;
  --bg-1: #051c2e;
  --bg-2: #0a2d4a;
  --panel: rgba(6, 18, 30, 0.84);
  --panel-soft: rgba(9, 26, 40, 0.72);
  --accent: #2eb0ff;
  --accent-strong: #7ad8ff;
  --accent-cool: #b8f0ff;
  --accent-cool-soft: rgba(46, 176, 255, 0.3);
  --theme-radial-a: rgba(46, 176, 255, 0.4);
  --theme-radial-b: rgba(122, 216, 255, 0.24);
  --theme-radial-c: rgba(184, 240, 255, 0.16);
  --theme-orb-a: rgba(46, 176, 255, 0.36);
  --theme-orb-b: rgba(122, 216, 255, 0.26);
}

[data-theme="graphite"] {
  --bg-0: #080808;
  --bg-1: #101218;
  --bg-2: #181b22;
  --panel: rgba(17, 18, 21, 0.84);
  --panel-soft: rgba(24, 25, 28, 0.72);
  --line: rgba(180, 198, 230, 0.2);
  --line-strong: rgba(200, 215, 245, 0.38);
  --text: #f5f6fa;
  --muted: #b4bac8;
  --accent: #d4dcf0;
  --accent-strong: #ffffff;
  --accent-cool: #eef2ff;
  --accent-cool-soft: rgba(180, 200, 255, 0.22);
  --theme-radial-a: rgba(212, 220, 240, 0.16);
  --theme-radial-b: rgba(255, 255, 255, 0.08);
  --theme-radial-c: rgba(120, 132, 150, 0.08);
  --theme-orb-a: rgba(180, 190, 210, 0.18);
  --theme-orb-b: rgba(255, 255, 255, 0.08);
}

[data-theme="arctic"] {
  --bg-0: #051220;
  --bg-1: #0a2238;
  --bg-2: #123a58;
  --panel: rgba(10, 21, 34, 0.84);
  --panel-soft: rgba(14, 29, 45, 0.72);
  --accent: #5ab8ff;
  --accent-strong: #c4f2ff;
  --accent-cool: #e8fcff;
  --accent-cool-soft: rgba(90, 184, 255, 0.3);
  --theme-radial-a: rgba(90, 184, 255, 0.38);
  --theme-radial-b: rgba(196, 242, 255, 0.22);
  --theme-radial-c: rgba(232, 252, 255, 0.14);
  --theme-orb-a: rgba(90, 184, 255, 0.34);
  --theme-orb-b: rgba(196, 242, 255, 0.24);
}

[data-theme="ember"] {
  --bg-0: #140503;
  --bg-1: #280a06;
  --bg-2: #3d1009;
  --panel: rgba(23, 11, 8, 0.84);
  --panel-soft: rgba(34, 16, 12, 0.72);
  --accent: #ff5724;
  --accent-strong: #ffb04a;
  --accent-cool: #ffe0b0;
  --accent-cool-soft: rgba(255, 87, 36, 0.3);
  --theme-radial-a: rgba(255, 87, 36, 0.42);
  --theme-radial-b: rgba(255, 176, 74, 0.24);
  --theme-radial-c: rgba(255, 224, 176, 0.14);
  --theme-orb-a: rgba(255, 87, 36, 0.38);
  --theme-orb-b: rgba(255, 176, 74, 0.26);
}

[data-theme="neon"] {
  --bg-0: #0a0518;
  --bg-1: #180a2e;
  --bg-2: #281048;
  --panel: rgba(12, 8, 22, 0.84);
  --panel-soft: rgba(19, 12, 35, 0.72);
  --accent: #9b6cff;
  --accent-strong: #48fff8;
  --accent-cool: #b8fffc;
  --accent-cool-soft: rgba(72, 255, 248, 0.32);
  --theme-radial-a: rgba(155, 108, 255, 0.42);
  --theme-radial-b: rgba(72, 255, 248, 0.22);
  --theme-radial-c: rgba(184, 255, 252, 0.16);
  --theme-orb-a: rgba(155, 108, 255, 0.36);
  --theme-orb-b: rgba(72, 255, 248, 0.28);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(1rem + var(--gutter, 5px));
}

.settings-card {
  display: flex;
  flex-direction: column;
  gap: calc(1rem + var(--gutter, 5px));
}

.theme-grid,
.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(0.75rem + var(--gutter, 5px));
}

.theme-chip,
.preset-chip {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: calc(0.85rem + var(--gutter, 5px)) calc(0.95rem + var(--gutter, 5px));
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.theme-chip {
  display: grid;
  gap: 0.8rem;
}

.theme-chip:hover,
.preset-chip:hover,
.theme-chip:focus-visible,
.preset-chip:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(88, 160, 255, 0.42);
  box-shadow: 0 12px 24px rgba(45, 125, 255, 0.18);
}

.theme-chip--active {
  border-color: rgba(88, 160, 255, 0.55);
  background:
    linear-gradient(135deg, rgba(45, 125, 255, 0.2), rgba(88, 160, 255, 0.12)),
    rgba(255, 255, 255, 0.04);
}

.theme-chip__preview {
  display: grid;
  align-items: end;
  min-height: 4.6rem;
  padding: 0.7rem;
  border-radius: calc(var(--radius-md) - 0.25rem);
  background: var(--theme-preview);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 30px rgba(0, 0, 0, 0.22);
}

.theme-chip__swatches {
  display: inline-flex;
  gap: 0.45rem;
}

.theme-chip__swatch {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: var(--theme-swatch);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24);
}

.theme-chip__content {
  display: grid;
  gap: 0;
}

.theme-chip__name,
.preset-chip__title {
  display: block;
  font-weight: 700;
}

.preset-chip__meta,
.settings-preview__meta,
.settings-field__hint {
  display: block;
  margin-top: calc(0.25rem + var(--gutter, 5px));
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.settings-form {
  display: grid;
  gap: calc(0.9rem + var(--gutter, 5px));
}

.settings-field {
  display: grid;
  gap: calc(0.45rem + var(--gutter, 5px));
}

.settings-field__label,
.settings-preview__label {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-cool);
}

.settings-field__input {
  width: 100%;
  min-width: 0;
  padding: calc(0.8rem + var(--gutter, 5px)) calc(0.95rem + var(--gutter, 5px));
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  outline: none;
}

.settings-field__input:focus {
  border-color: rgba(88, 160, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(88, 160, 255, 0.14);
}

.settings-field--segmented {
  gap: 0.6rem;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.4rem;
  border-radius: calc(var(--radius-md) + 0.15rem);
  background:
    linear-gradient(180deg, rgba(9, 17, 28, 0.92), rgba(14, 24, 38, 0.88)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.segmented-control__option {
  position: relative;
  display: block;
  min-width: 0;
}

.segmented-control__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.segmented-control__button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: calc(var(--radius-md) - 0.05rem);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.segmented-control__option:hover .segmented-control__button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.08);
}

.segmented-control__input:checked + .segmented-control__button {
  color: #f5f9ff;
  background:
    linear-gradient(135deg, rgba(45, 125, 255, 0.3), rgba(88, 160, 255, 0.12)),
    rgba(255, 255, 255, 0.05);
  border-color: rgba(88, 160, 255, 0.34);
  box-shadow:
    0 10px 24px rgba(12, 24, 42, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.segmented-control__input:focus-visible + .segmented-control__button {
  border-color: rgba(88, 160, 255, 0.52);
  box-shadow:
    0 0 0 4px rgba(88, 160, 255, 0.14),
    0 10px 24px rgba(12, 24, 42, 0.28);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: calc(0.7rem + var(--gutter, 5px));
}

.settings-actions--stacked {
  flex-direction: column;
}

.settings-preview {
  padding: calc(1rem + var(--gutter, 5px));
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-preview__value {
  margin-top: calc(0.35rem + var(--gutter, 5px));
  font-weight: 700;
  font-size: 1rem;
}

.settings-cloak-divider {
  margin-top: calc(0.35rem + var(--gutter, 5px));
  padding-top: calc(1rem + var(--gutter, 5px));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-cloak-launch {
  display: grid;
  gap: calc(0.65rem + var(--gutter, 5px));
}

.settings-cloak-launch .settings-field__label {
  margin-bottom: 0;
}

.settings-cloak-launch .settings-field__hint {
  margin-top: 0;
}

/* Mini browser chrome: favicon + title + theme (settings right column) */
.settings-appearance-preview {
  flex: 1;
  min-height: 0;
}

.settings-appearance-preview__window {
  border-radius: calc(var(--radius-lg, 1.25rem) + 0.15rem);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 10, 16, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 40px rgba(0, 0, 0, 0.35);
}

.settings-appearance-preview__titlebar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-appearance-preview__traffic {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.settings-appearance-preview__tabstrip {
  padding: 0.5rem 0.65rem 0;
  background: linear-gradient(180deg, rgba(18, 24, 34, 0.98), rgba(12, 16, 24, 0.96));
}

.settings-appearance-preview__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.45rem 0.75rem 0.55rem;
  border-radius: 0.65rem 0.65rem 0 0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.settings-appearance-preview__favicon {
  flex: 0 0 auto;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 0.2rem;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
}

.settings-appearance-preview__tab-title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.settings-appearance-preview__page {
  padding: 1rem 1rem 1.15rem;
  background: rgba(8, 11, 17, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  min-height: 6.5rem;
}

.settings-appearance-preview__theme-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.settings-appearance-preview__theme-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-cool);
}

.settings-appearance-preview__theme-value {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.settings-appearance-preview__favicon-url {
  margin: 0.65rem 0 0;
  word-break: break-all;
}

@media (max-width: 1100px) {
  .shell,
  .shell--sidebar-collapsed {
    flex-direction: row;
    align-items: stretch;
  }

  .shell-sidebar {
    flex: 0 0 var(--sidebar-width);
    width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    min-height: 100dvh;
    height: 100dvh;
    margin: 0;
  }

  .shell--sidebar-collapsed .shell-sidebar {
    flex: 0 0 var(--sidebar-collapsed-width);
    width: var(--sidebar-collapsed-width);
    max-width: var(--sidebar-collapsed-width);
    min-height: 100dvh;
    height: 100dvh;
    margin: 0;
    --sidebar-inline-pad: calc(0.7rem + var(--gutter));
  }

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

  .settings-card--appearance-preview {
    grid-column: 1 / -1;
  }

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

  .ai-chat {
    min-height: min(38rem, calc(100dvh - 11rem));
  }

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

  .game-launcher__bar-end {
    margin-left: 0;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .settings-grid,
  .account-grid,
  .theme-grid,
  .preset-grid {
    grid-template-columns: 1fr;
  }

  .shell {
    gap: calc(0.7rem + var(--gutter));
  }

  .shell-pane--ai {
    padding: 0.8rem;
  }

  .featured-launch__thumb {
    margin-inline: auto;
    max-width: min(18rem, 100%);
  }

  .ai-chat__messages {
    padding: 1rem 0.85rem 0.9rem;
  }

  .ai-chat__composer {
    padding: 0.85rem 0.8rem 0.9rem;
  }

  .ai-chat__actions {
    right: 0.7rem;
  }

  .ai-message--user {
    width: min(100%, 92%);
  }

  .account-summary__hero,
  .chat-session-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .account-summary__actions {
    justify-content: flex-start;
  }

  .shell-pane--gamelauncher {
    padding: 0.8rem;
  }

  .chat-room__composer {
    grid-template-columns: 1fr;
  }

  .chat-room__actions {
    justify-content: flex-end;
  }
}
