:root {
  color-scheme: dark;
  /* Selected tabs: the primary (Launch) button's cyan with the game's build-ring
     green as the label. The game's TAB_SELECTED_* constants mirror these. */
  --tab-selected-rgb: 0, 229, 255;
  --tab-selected-text: #00ff00;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: #06070a;
  color: #e2e8f0;
  background-image: radial-gradient(circle, rgba(0, 229, 255, 0.22) 1px, transparent 1px);
  background-size: 28px 28px;
  background-attachment: fixed;
}

/* Thaw's ConfigProvider wraps the app in a div painted with the theme's neutral
   background; keep it transparent so the body's dot grid shows through. Thaw
   injects its styles after this sheet, hence the extra `body` specificity. */
body .thaw-config-provider {
  background-color: transparent;
}

.page-container {
  margin: 0 auto;
  max-width: 72rem;
  padding: 2rem;
}

@media (max-width: 40rem) {
  .page-container {
    padding: 1rem;
  }
}

/* Common headers & actions */
.site-header,
.registry-header,
.section-heading,
.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

.registry-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}

.registry-brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.section-label {
  font-size: 0.875rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

nav a:hover {
  text-decoration: underline;
}

/* Buttons */
button,
.button,
.thaw-button {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: #e2e8f0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button:hover,
.button:hover,
.thaw-button:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.45);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
  text-decoration: none;
}

button:active,
.button:active,
.thaw-button:active {
  background: rgba(0, 229, 255, 0.16);
  border-color: #00e5ff;
}

button:disabled,
.thaw-button--disabled {
  cursor: not-allowed;
  opacity: 0.4;
  pointer-events: none;
}

.primary-button,
.thaw-button--primary {
  font-weight: 600 !important;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.25) 0%, rgba(14, 165, 233, 0.15) 100%) !important;
  color: #f0fdf4 !important;
  border: 1px solid rgba(0, 229, 255, 0.55) !important;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2), inset 0 0 6px rgba(0, 229, 255, 0.1) !important;
}

.primary-button:hover,
.thaw-button--primary:hover {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.42) 0%, rgba(14, 165, 233, 0.26) 100%) !important;
  border-color: #00e5ff !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.4), inset 0 0 8px rgba(0, 229, 255, 0.15) !important;
}

.secondary-button,
.thaw-button--secondary,
.thaw-button--subtle {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
}

.secondary-button:hover,
.thaw-button--secondary:hover,
.thaw-button--subtle:hover {
  background: rgba(0, 229, 255, 0.08) !important;
  border-color: rgba(0, 229, 255, 0.4) !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2) !important;
}

/* Splash Page */
.splash-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  gap: 2.25rem;
}

.splash-header h1 {
  color: #00e5ff;
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem 0;
  text-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
}

.splash-header .tagline {
  font-size: 1.125rem;
  opacity: 0.8;
  margin: 0;
  color: #94a3b8;
}

.splash-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.splash-nav .button {
  font-family: inherit;
  font-size: 0.9375rem;
  letter-spacing: 0.03em;
}

/* Forms */
form {
  display: grid;
  gap: 0.6rem;
  max-width: 28rem;
}

input,
textarea {
  font: inherit;
  max-width: 100%;
  padding: 0.45rem;
}

.notice {
  border: 1px solid color-mix(in srgb, CanvasText 35%, transparent);
  border-radius: 0.35rem;
  padding: 1rem;
}

.notice.error {
  border-color: #b42318;
}

.notice.success {
  border-color: #248a3d;
}

/* Full-Screen Game View */
.game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #0b0d13;
}

#autotaxis-canvas {
  width: 100vw;
  height: 100vh;
  display: block;
  outline: none;
  background-color: #0b0d13;
}

/* Game Top Bar / Dropdown */
.game-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.game-top-bar-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 52rem;
  padding: 0.4rem 1.25rem;
  background: rgba(3, 5, 10, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 229, 255, 0.15);
  pointer-events: auto;
}

.game-top-bar-panel::before {
  content: "";
  position: absolute;
  bottom: -1px;
  left: -1px;
  width: 6px;
  height: 6px;
  border-bottom: 2px solid #00e5ff;
  border-left: 2px solid #00e5ff;
}

.game-top-bar-panel::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 6px;
  height: 6px;
  border-bottom: 2px solid #00e5ff;
  border-right: 2px solid #00e5ff;
}

.game-top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Groups: leave | stage & build bar | storage, account & more. */
.game-top-bar-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.game-top-bar-divider {
  width: 1px;
  height: 1.25rem;
  margin: 0 0.25rem;
  background: rgba(0, 229, 255, 0.25);
}

/* Narrow screens wrap the groups onto their own rows instead. */
@media (max-width: 640px) {
  .game-top-bar-divider {
    display: none;
  }
}

.game-top-bar .thaw-button {
  gap: 0.35rem;
}

/* Thaw menus (account, more options) in the glass style. */
.thaw-menu {
  background: rgba(4, 6, 12, 0.95) !important;
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 4px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 229, 255, 0.1) !important;
  min-width: 9rem;
}

.thaw-menu-item {
  font-size: 12px;
  color: #e2e8f0 !important;
  border-radius: 3px !important;
}

.thaw-menu-item:hover {
  background: rgba(0, 229, 255, 0.1) !important;
  color: #ffffff !important;
}

/* Status toasts in the glass style. */
.thaw-toast {
  background: rgba(4, 6, 12, 0.95) !important;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 4px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 229, 255, 0.12) !important;
  color: #e2e8f0;
  font-size: 12px;
}

.game-top-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.game-top-bar-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

/* Loading & Error Overlays */
.game-loading-overlay,
.game-error-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background-color: #0b0d13;
  z-index: 50;
  padding: 1.5rem;
  text-align: center;
}

.game-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  text-align: center;
}

.game-loading-text {
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0;
}

.game-loading-subtext {
  font-size: 0.8125rem;
  color: #94a3b8;
  margin: 0;
}

.game-loading-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding: 0.4rem 0.85rem;
  border-radius: 2px;
  background: rgba(2, 4, 8, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.25);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.loading-step {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--fontFamilyMonospace, monospace);
  font-size: 0.6875rem;
  font-weight: 500;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
}

.loading-step .step-num {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fontFamilyMonospace, monospace);
  font-size: 0.625rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.loading-step.active {
  color: #38bdf8;
  font-weight: 600;
}

.loading-step.active .step-num {
  background: rgba(14, 165, 233, 0.35);
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.loading-step.done {
  color: #94a3b8;
}

.loading-step.done .step-num {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.step-line {
  width: 0.75rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease;
}

.step-line.done {
  background: #38bdf8;
}

.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 28rem;
  width: 100%;
  padding: 2rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
  color: #e2e8f0;
}

.game-spinner {
  width: 2.25rem;
  height: 2.25rem;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: game-spin 0.9s linear infinite;
}

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

/* Welcome card: over the game, under the top bar and drawers. */
.welcome-backdrop {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem 1rem;
  background: rgba(0, 0, 0, 0.45);
  overflow-y: auto;
}

.welcome-card {
  box-sizing: border-box;
  max-width: 30rem;
  width: 100%;
  padding: 1.5rem 1.75rem;
  border-radius: 2px;
  border: 1px solid rgba(var(--tab-selected-rgb), 0.35);
  background: rgba(8, 11, 17, 0.96);
  box-shadow: 0 0 24px rgba(var(--tab-selected-rgb), 0.12);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.welcome-card h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #f1f5f9;
}

.welcome-card h3 {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.welcome-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.welcome-goal {
  padding: 0.5rem 0.75rem;
  border-left: 2px solid var(--tab-selected-text);
  background: rgba(255, 255, 255, 0.04);
}

.welcome-controls {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.welcome-controls th,
.welcome-controls td {
  padding: 0.3rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.welcome-controls th {
  padding-right: 1rem;
  font-weight: 400;
}

.welcome-controls kbd {
  font-family: var(--fontFamilyMonospace, monospace);
  font-size: 0.75rem;
  color: rgb(var(--tab-selected-rgb));
}

.welcome-card .welcome-hint {
  font-size: 0.75rem;
  color: #64748b;
}

.welcome-card .thaw-button {
  align-self: flex-end;
}

/* Glass Drawer & Scrim */
.glass-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 110;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.glass-scrim.open {
  opacity: 1;
  pointer-events: auto;
}

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

.glass-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(26rem, 90vw);
  z-index: 120;
  background: rgba(4, 6, 12, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-right: 1px solid rgba(0, 229, 255, 0.25);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 229, 255, 0.08);
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.glass-drawer.build-bar-drawer {
  width: min(48rem, 95vw);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  color: #e2e8f0;
  transition: background 0.15s ease;
  user-select: none;
}

.accordion-header:hover {
  background: rgba(255, 255, 255, 0.08);
}

.compact-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.375rem;
  transition: background 0.15s ease;
}

.compact-item-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.09);
}

/* Allow buttons inside drawers, toolbars, and compact rows to size naturally with flex */
.glass-drawer .thaw-button,
.game-top-bar .thaw-button,
.studio-row .thaw-button,
.glass-creature-card .thaw-button {
  min-width: auto;
}

.compact-btn {
  min-width: auto !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  padding: 3px 10px !important;
  border-radius: 3px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.icon-btn-square {
  min-width: 24px !important;
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  font-size: 13px !important;
  border-radius: 3px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.game-top-bar .thaw-button {
  min-width: auto !important;
  padding: 5px 12px !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em !important;
  border-radius: 3px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

.game-top-bar .thaw-button:hover {
  background: rgba(0, 229, 255, 0.1) !important;
  border-color: rgba(0, 229, 255, 0.45) !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2) !important;
}

.game-top-bar .thaw-button--primary {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.25) 0%, rgba(14, 165, 233, 0.12) 100%) !important;
  border-color: #00e5ff !important;
  color: #00f0ff !important;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25) !important;
}

.studio-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  height: auto;
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.5rem;
  gap: 0.75rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.studio-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.studio-row-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
}

.studio-row-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Create/Save + Clear/Discard: keep labels on one line so the row stays compact. */
.studio-actions .thaw-button {
  white-space: nowrap;
}

/* Component description tooltip, portaled into <body> beside the hovered row. */
.component-tooltip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  box-sizing: border-box;
  padding: 0.6rem 0.75rem;
  background: rgba(6, 9, 16, 0.97);
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 0.375rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.45;
}

.component-tooltip-name {
  color: #f1f5f9;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.component-tooltip-param {
  margin-top: 0.4rem;
  color: #64748b;
  font-size: 11px;
}

.studio-btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  height: 22px;
  padding: 0 7px;
  font-size: 10px;
  font-weight: 500;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.12s ease;
  flex-shrink: 0;
  font-family: inherit;
  line-height: 1;
}

.studio-btn-sm:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.studio-btn-sm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.studio-btn-action {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(96, 165, 250, 0.35);
  color: #93c5fd;
}

.studio-btn-action:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.32);
  border-color: rgba(96, 165, 250, 0.6);
  color: #ffffff;
}

.compact-chip-sm {
  font-size: 0.625rem;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.glass-drawer.open {
  transform: translateX(0);
}

.glass-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-drawer-title-group h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
  color: #f8fafc;
}

.glass-drawer-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0.25rem 0 0;
}

.glass-drawer-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.375rem;
  color: #cbd5e1;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.glass-drawer-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.glass-drawer-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.glass-stage-card {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 6, 12, 0.75);
  color: #e2e8f0;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  width: 100%;
}

.glass-stage-card:hover {
  background: rgba(0, 229, 255, 0.06);
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
  transform: translateY(-1px);
}

.glass-stage-card.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.15) 0%, rgba(0, 229, 255, 0.03) 100%);
  border-color: #00e5ff;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.25), inset 0 0 8px rgba(0, 229, 255, 0.1);
}

.stage-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  letter-spacing: 0.05em;
  font-family: monospace;
}

.glass-stage-card.active .stage-badge {
  background: #3b82f6;
  color: #ffffff;
}

.stage-details {
  flex: 1;
  min-width: 0;
}

.stage-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.25;
}

.stage-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.25rem;
  line-height: 1.35;
}

.stage-drawer-toggle.active {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(96, 165, 250, 0.6);
  color: #93c5fd;
}

/* Right-side Glass Drawer */
.glass-drawer.from-right {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid rgba(0, 229, 255, 0.25);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 229, 255, 0.08);
  transform: translateX(100%);
}

.glass-drawer.from-right.open {
  transform: translateX(0);
}

.save-drawer-toggle.active {
  background: rgba(14, 165, 233, 0.25);
  border-color: rgba(56, 189, 248, 0.6);
  color: #7dd3fc;
}

/* ==========================================================================
   Segmented Cyber-Matrix Tabs (Option C)
   ========================================================================== */
.thaw-tab-list {
  position: relative;
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 3px !important;
  background: rgba(4, 6, 12, 0.88) !important;
  border: 1px solid rgba(0, 229, 255, 0.22) !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 1px rgba(0, 229, 255, 0.2) !important;
  border-radius: 4px !important;
  padding: 3px !important;
  margin-bottom: 0.75rem !important;
  overflow: visible !important;
}

/* Corner Reticle Accents */
.thaw-tab-list::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid #00e5ff;
  border-left: 1.5px solid #00e5ff;
  pointer-events: none;
  z-index: 2;
}

.thaw-tab-list::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 6px;
  height: 6px;
  border-bottom: 1.5px solid #00e5ff;
  border-right: 1.5px solid #00e5ff;
  pointer-events: none;
  z-index: 2;
}

.thaw-tab {
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border-radius: 3px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #94a3b8 !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.015em !important;
  padding: 6px 14px !important;
  cursor: pointer !important;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
  overflow: hidden !important;
}

.thaw-tab:hover {
  color: #cbd5e1 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Reset Thaw's default indicator bar */
.thaw-tab::after {
  display: none !important;
}

/* Active Segment */
.thaw-tab--selected,
.thaw-tab--selected:hover {
  background: linear-gradient(135deg, rgba(var(--tab-selected-rgb), 0.25) 0%, rgba(14, 165, 233, 0.15) 100%) !important;
  border: 1px solid rgba(var(--tab-selected-rgb), 0.55) !important;
  color: var(--tab-selected-text) !important;
  box-shadow: 0 0 12px rgba(var(--tab-selected-rgb), 0.2), inset 0 0 6px rgba(var(--tab-selected-rgb), 0.1) !important;
}

.thaw-tab--selected .thaw-tab__content {
  color: var(--tab-selected-text) !important;
  font-weight: 700 !important;
}

.thaw-tab__content {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}

/* Glass Status Banner */
.glass-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  margin: 0.75rem 1rem 0;
  border-radius: 0.375rem;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(14, 165, 233, 0.12);
  color: #bae6fd;
  font-size: 0.75rem;
  line-height: 1.3;
}

.glass-status-dismiss {
  background: transparent;
  border: none;
  color: #7dd3fc;
  cursor: pointer;
  font-size: 0.8125rem;
  padding: 0 0 0 0.5rem;
  line-height: 1;
}

.glass-status-dismiss:hover {
  color: #ffffff;
}

/* Glass Tab Content & Form */
.glass-tab-content {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  width: 100%;
  max-width: 100%;
}

.glass-search-box {
  width: 100%;
}

.glass-card-stack {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  width: 100%;
}

.glass-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 2rem 1rem;
  text-align: center;
  color: #64748b;
  font-size: 0.8125rem;
  width: 100%;
  max-width: 100%;
}

.glass-empty-icon {
  font-size: 2rem;
  margin-bottom: 0.25rem;
  opacity: 0.6;
}

.glass-empty-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #cbd5e1;
  margin: 0;
}

.glass-empty-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
  max-width: 16rem;
  word-break: break-word;
}

.glass-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.glass-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.glass-label {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.01em;
}

.glass-input,
.glass-textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(2, 4, 8, 0.75);
  color: #f8fafc;
  font-family: inherit;
  font-size: 0.8125rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.glass-input:focus,
.glass-textarea:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.25), 0 0 10px rgba(0, 229, 255, 0.2);
}

.thaw-input {
  border-radius: 4px !important;
  background: rgba(2, 4, 8, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  transition: all 0.15s ease !important;
}

.thaw-input:focus-within {
  border-color: #00e5ff !important;
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.25), 0 0 10px rgba(0, 229, 255, 0.2) !important;
}

.thaw-input__input {
  font-family: inherit !important;
  color: #f8fafc !important;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

.glass-textarea {
  resize: vertical;
  min-height: 6rem;
  font-family: monospace;
  font-size: 0.75rem;
}

/* Glass Buttons */
.glass-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(56, 189, 248, 0.5);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.35) 0%, rgba(2, 132, 199, 0.25) 100%);
  color: #f0f9ff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  font-family: inherit;
}

.glass-btn-primary:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.55) 0%, rgba(2, 132, 199, 0.45) 100%);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
}

.glass-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  line-height: 1;
}

.glass-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.4);
}

.glass-btn-icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.75rem;
  line-height: 1;
}

.glass-btn-icon-only:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Glass Creature Card */
.glass-creature-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.15s ease;
}

.glass-creature-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(56, 189, 248, 0.3);
}

.glass-creature-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.glass-creature-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f1f5f9;
}

.glass-creature-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: #94a3b8;
}

.glass-creature-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

/* Glass Note Box */
.glass-note-box {
  padding: 0.75rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(56, 189, 248, 0.2);
  background: rgba(14, 165, 233, 0.06);
  color: #93c5fd;
  font-size: 0.75rem;
  line-height: 1.4;
}

/* Glass Drawer Auth Bar */
.glass-drawer-auth-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-status-indicator {
  display: flex;
  align-items: center;
}

.auth-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.auth-badge.authenticated {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.auth-badge.guest {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #94a3b8;
}

.auth-btn-sm {
  font-size: 0.6875rem;
  padding: 0.3rem 0.65rem;
  border-radius: 0.375rem;
  cursor: pointer;
}

/* Dedicated Auth Page */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  background: radial-gradient(circle at 50% 20%, rgba(14, 165, 233, 0.12) 0%, rgba(3, 7, 18, 0.95) 75%);
  box-sizing: border-box;
}

.auth-card-container {
  width: 100%;
  max-width: 26rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.auth-logo-badge {
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
  padding: 0.2rem 0.65rem;
  border-radius: 3px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  text-transform: uppercase;
}

.auth-header h2 {
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f8fafc;
  margin: 0 0 0.35rem;
}

.auth-subtitle {
  font-family: inherit;
  font-size: 0.8125rem;
  color: #94a3b8;
  margin: 0;
  max-width: 24rem;
  line-height: 1.4;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  background: rgba(4, 6, 12, 0.92) !important;
  border: 1px solid rgba(0, 229, 255, 0.25) !important;
  border-radius: 4px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 229, 255, 0.12), inset 0 0 1px rgba(0, 229, 255, 0.3) !important;
  overflow: visible !important;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 8px;
  height: 8px;
  border-top: 2px solid #00e5ff;
  border-left: 2px solid #00e5ff;
  pointer-events: none;
}

.auth-card::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-bottom: 2px solid #00e5ff;
  border-right: 2px solid #00e5ff;
  pointer-events: none;
}

.auth-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
  font-size: 0.9rem;
}

.auth-links a,
.auth-footer a {
  color: #00e5ff;
  text-decoration: none;
}

.auth-links a:hover,
.auth-footer a:hover {
  text-decoration: underline;
}

.auth-discord-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: none;
  border-radius: 4px;
  background: #5865f2;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.auth-discord-button:hover:not(:disabled) {
  background: #4752c4;
}

.auth-discord-button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

/* thaw message bars are single-line by default; wrap inside the card. */
.auth-body .thaw-message-bar {
  white-space: normal;
}

.auth-instructions {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.auth-code-input input {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 1.4rem;
  letter-spacing: 0.4em;
  text-align: center;
}

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
}

/* Build Bar drawer: slot strip, bundle library, bundle editor. */
.build-bar-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.35rem 0;
}

.build-bar-section,
.bundle-library,
.bundle-editor {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.build-bar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 28px;
}

.build-slot-strip {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.35rem;
}

@media (max-width: 640px) {
  .build-slot-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.build-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.3rem;
  min-height: 4rem;
  padding: 0.4rem 0.35rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(4, 6, 12, 0.75);
  color: #e2e8f0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.build-slot:hover {
  background: rgba(0, 229, 255, 0.06);
  border-color: rgba(0, 229, 255, 0.35);
}

.build-slot.empty {
  border-style: dashed;
  color: #64748b;
}

.build-slot.selected,
.build-slot.drop-target {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.15) 0%, rgba(0, 229, 255, 0.03) 100%);
  border-color: #00e5ff;
  border-style: solid;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.25), inset 0 0 8px rgba(0, 229, 255, 0.1);
}

.build-slot-key {
  font-family: var(--fontFamilyMonospace, monospace);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.05rem 0.35rem;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.build-slot.selected .build-slot-key {
  background: #00e5ff;
  color: #03050a;
}

.build-slot-name {
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}

.build-bar-selection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 28px;
}

.build-bar-hint {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.35;
}

.build-bar-empty {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  margin: 0.5rem 0;
}

.bundle-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.bundle-row {
  cursor: grab;
}

.bundle-row:active {
  cursor: grabbing;
}

.bundle-row-name {
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
}

.bundle-editor-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f1f5f9;
}

/* Save / Cancel stay in view while the component list scrolls by. */
.bundle-editor-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 0.5rem;
  z-index: 1;
  padding: 0.75rem 0;
  background: #04060c;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Structure explorer (/structures, /structures/:id) */
.explorer {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.explorer-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.explorer-heading h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #f8fafc;
}

.explorer-subtitle {
  margin: 0.35rem 0 0;
  color: #94a3b8;
  font-size: 0.875rem;
}

.explorer-search {
  flex: 0 1 20rem;
  min-width: min(100%, 16rem);
}

.explorer-search .thaw-input {
  width: 100%;
}

.explorer-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1rem;
}

.explorer-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 20, 0.85);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.explorer-card:hover,
.explorer-card:focus-visible {
  border-color: rgba(0, 229, 255, 0.45);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.15);
  transform: translateY(-1px);
  outline: none;
}

.explorer-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, rgba(0, 229, 255, 0.06), transparent 70%), #080a0f;
}

.explorer-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.explorer-preview-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(148, 163, 184, 0.35);
}

.explorer-card-preview {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.explorer-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  padding: 0.75rem 0.875rem 0.875rem;
}

.explorer-card-title,
.explorer-card-author {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explorer-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f1f5f9;
}

.explorer-card-author {
  font-size: 0.8125rem;
  color: #cbd5e1;
}

.explorer-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.explorer-discriminator {
  color: #64748b;
}

.explorer-author.anonymous {
  color: #94a3b8;
  font-style: italic;
}

.explorer-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 3rem 1rem;
  text-align: center;
  color: #64748b;
}

.explorer-state.error {
  color: #f87171;
}

.explorer-state-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #cbd5e1;
}

.explorer-state-subtitle {
  margin: 0;
  max-width: 28rem;
  font-size: 0.875rem;
  color: #94a3b8;
  overflow-wrap: anywhere;
}

.explorer-state .thaw-button,
.explorer-state .button {
  margin-top: 0.5rem;
}

.explorer-load-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0 1rem;
}

.explorer-inline-error {
  margin: 0;
  font-size: 0.8125rem;
  color: #f87171;
}

.explorer-back {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: #94a3b8;
  text-decoration: none;
}

.explorer-back:hover {
  color: #e2e8f0;
}

.explorer-detail {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(16rem, 2fr);
  align-items: start;
  gap: 2rem;
}

@media (max-width: 52rem) {
  .explorer-detail {
    grid-template-columns: minmax(0, 1fr);
  }
}

.explorer-detail-preview .explorer-preview {
  aspect-ratio: 1 / 1;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.explorer-detail-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.explorer-detail-title {
  margin: 0;
  font-size: 1.75rem;
  color: #f8fafc;
  overflow-wrap: anywhere;
}

.explorer-detail-byline {
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
  color: #94a3b8;
}

.explorer-detail-byline .explorer-author {
  color: #e2e8f0;
}

.explorer-detail-description {
  margin: 0;
  line-height: 1.55;
  color: #cbd5e1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.explorer-detail-description.empty {
  color: #64748b;
  font-style: italic;
}

.explorer-sandbox {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.explorer-sandbox-button {
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  font-size: 0.9375rem;
}

.explorer-sandbox-caption {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.explorer-revisions h3 {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}

.explorer-revisions ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 20rem;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.explorer-revision {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name date"
    "meta date";
  gap: 0.15rem 0.75rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  text-align: left;
}

.explorer-revision.active {
  border-color: rgba(0, 229, 255, 0.55);
  background: rgba(0, 229, 255, 0.1);
}

.explorer-revision-name {
  grid-area: name;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #f1f5f9;
}

.explorer-revision-meta {
  grid-area: meta;
  font-size: 0.75rem;
  color: #94a3b8;
}

.explorer-revision-date {
  grid-area: date;
  align-self: center;
  font-size: 0.75rem;
  color: #94a3b8;
}
