﻿:root {
  --bg: #0b0e0a;
  --bg-2: #16211a;
  --panel: rgba(22, 33, 26, 0.76);
  --panel-solid: #101610;
  --panel-2: rgba(34, 48, 31, 0.82);
  --border: rgba(230, 225, 211, 0.12);
  --border-strong: rgba(201, 169, 89, 0.52);
  --text: #e6e1d3;
  --muted: rgba(230, 225, 211, 0.52);
  --neon: #c9a959;
  --neon-2: #e3c67d;
  --neon-soft: rgba(201, 169, 89, 0.10);
  --neon-glow: 0 0 20px rgba(201, 169, 89, 0.32);
  --danger: #d9564a;
  --warning: #e3c67d;
  --blue: #c7ccd1;
  --bone: #e6e1d3;
  --bone-80: rgba(230, 225, 211, 0.80);
  --bone-62: rgba(230, 225, 211, 0.62);
  --bone-44: rgba(230, 225, 211, 0.44);
  --bone-28: rgba(230, 225, 211, 0.28);
  --gold: #c9a959;
  --gold-hot: #e3c67d;
  --gold-deep: #6b5426;
  --steel: #c7ccd1;
  --steel-hot: #e4e8eb;
  --coral: #d9564a;
  --title: 'Cinzel', 'Times New Roman', serif;
  --display: 'Bebas Neue', 'Oswald', system-ui, sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 18% 0%, rgba(201, 169, 89, 0.10), transparent 24%),
    radial-gradient(circle at 84% 14%, rgba(199, 204, 209, 0.06), transparent 28%),
    linear-gradient(180deg, #11170f 0%, #0b0e0a 45%, #050705 100%);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body {
  overflow-x: hidden;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  border: 1px solid rgba(230, 225, 211, 0.12);
  border-radius: 10px;
  padding: 12px 18px;
  background: rgba(201, 169, 89, 0.08);
  color: var(--text);
  cursor: pointer;
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
button:hover,
.button-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--neon-glow);
}

.button-link {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(230, 225, 211, 0.12);
  border-radius: 10px;
  padding: 12px 18px;
  background: rgba(201, 169, 89, 0.08);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(230, 225, 211, 0.10);
  background: rgba(8, 11, 8, 0.88);
  color: var(--text);
  font-family: var(--sans);
}
input:focus,
textarea:focus,
select:focus {
  outline: 1px solid rgba(201, 169, 89, 0.42);
}
.hidden {
  display: none !important;
}
.app-shell {
  min-height: 100vh;
  position: relative;
  padding-bottom: 120px;
}
.app-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/trex-bg.svg') center/cover no-repeat;
  opacity: 0.05;
  pointer-events: none;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px 28px;
  background: rgba(4, 9, 14, 0.94);
  border-bottom: 1px solid rgba(0, 255, 156, 0.12);
  backdrop-filter: blur(16px);
}
.topbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(0, 255, 156, 0.13);
  border: 1px solid rgba(0, 255, 156, 0.3);
  color: var(--neon);
  font-weight: 900;
  letter-spacing: 0.08em;
}
.brand strong {
  display: block;
  font-size: 1rem;
}
.brand small {
  color: var(--muted);
  font-size: 0.82rem;
}
.top-pill {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 255, 156, 0.12);
  background: rgba(0, 0, 0, 0.22);
}
.top-pill span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.top-pill strong {
  color: var(--text);
  font-size: 0.94rem;
}
.topbar-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.panel-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  padding: 24px 28px 32px;
}
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 89px;
  align-self: start;
  margin-bottom: 0;
}

.panel-shell > .side-panel {
  margin-top: -90px;
}
.glass-panel,
.status-card,
.player-info-card,
.dino-status-card,
.map-card,
.action-group,
.cave-panel,
.history-panel,
.support-panel,
.admin-panel {
  background: rgba(8, 14, 18, 0.92);
  border: 1px solid rgba(0, 255, 156, 0.12);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  padding: 22px;
}
.card-title {
  margin: 0 0 14px;
  color: var(--neon);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.status-list,
.dashboard-summary,
.quick-actions-grid,
.action-grid,
.skin-grid,
.mutation-grid,
.support-grid,
.admin-grid,
.teleport-filters,
.cooldown-list,
.bar-group {
  display: grid;
  gap: 12px;
}
.status-item,
.dashboard-summary div,
.action-card,
.skin-card,
.mutation-card,
.support-card,
.admin-panel-card,
.cooldown-item,
.destination-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.dino-status-card .status-list.compact {
  gap: 8px;
}
.dino-status-card .status-item {
  padding: 10px 12px;
}
.dino-status-card .cache-note {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 10px 0 10px;
}
.bar-group {
  gap: 10px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 12px;
  align-items: center;
}
.bar-row label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}
.bar-row label span {
  color: var(--text);
  font-weight: 700;
}
.bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.bar i {
  width: 0;
  height: 100%;
  display: block;
  border-radius: 999px;
  transition: width 0.25s ease;
}
.status-item {
  justify-content: space-between;
  align-items: center;
}
.status-item span,
.dashboard-summary span,
.action-card small,
.skin-card small,
.mutation-card small,
.support-card span,
.cooldown-item span,
.destination-block span,
.destination-block p {
  color: var(--muted);
  font-size: 0.82rem;
}
.status-item strong,
.dashboard-summary strong,
.action-card strong,
.skin-card strong,
.mutation-card strong,
.support-card strong,
.admin-panel-card strong,
.destination-block strong {
  color: var(--text);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr) minmax(260px, 0.9fr);
  gap: 18px;
}
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 14px;
}
.action-grid,
.skin-grid,
.mutation-grid,
.support-grid,
.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.action-card,
.skin-card,
.mutation-card,
.support-card,
.admin-panel-card {
  min-height: 160px;
}
.action-card button,
.skin-card button,
.mutation-card button,
.support-card button,
.admin-panel-card button {
  margin-top: auto;
}
.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 10px;
}
.tab-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
}
.tab-button.active {
  color: var(--text);
  border-color: var(--neon);
  background: rgba(0, 255, 156, 0.12);
  box-shadow: 0 0 22px rgba(0, 255, 156, 0.18);
}
.tab-button:hover,
.button-link:hover {
  background: rgba(0, 255, 156, 0.08);
}
.voice-tab-link[data-state]:not([data-state="idle"])::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #8fd694;
  box-shadow: 0 0 8px rgba(143, 214, 148, .72);
}
.voice-tab-link[data-state="connecting"]::after {
  background: #e3c67d;
  box-shadow: 0 0 8px rgba(227, 198, 125, .72);
}
.voice-tab-link[data-state="error"]::after {
  background: #d9564a;
  box-shadow: 0 0 8px rgba(217, 86, 74, .72);
}
.section-panel.hidden {
  display: none;
}
.map-card .map-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
}
.gateway-map {
  position: relative;
  min-height: 640px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 156, 0.22);
  background:
    linear-gradient(rgba(2, 7, 11, 0.12), rgba(2, 7, 11, 0.2)),
    #101826;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.32), 0 18px 50px rgba(0,0,0,0.35);
}
.gateway-map::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 54%, rgba(0, 0, 0, 0.34) 100%);
  pointer-events: none;
  z-index: 1;
}
.gateway-map::after {
  content: 'GATEWAY';
  position: absolute;
  left: 24px;
  bottom: 22px;
  z-index: 2;
  font-size: 1.15rem;
  font-weight: 900;
  color: rgba(232, 255, 246, 0.22);
  letter-spacing: 0.34em;
}
.map-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.map-sidebar-card {
  padding: 18px;
  background: rgba(2, 7, 11, 0.95);
  border: 1px solid rgba(0, 255, 156, 0.12);
  border-radius: 20px;
}
.destination-block {
  display: grid;
  gap: 10px;
}
.destination-actions {
  display: grid;
  gap: 12px;
}
.teleport-filters {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.filter-pill {
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(0, 255, 156, 0.07);
  color: var(--text);
  border: 1px solid rgba(0, 255, 156, 0.18);
}
.neon-button {
  background: rgba(0, 255, 156, 0.12);
  border: 1px solid rgba(0, 255, 156, 0.35);
  color: var(--text);
  box-shadow: inset 0 0 8px rgba(0, 255, 156, 0.1);
}
.neon-button:hover,
.button-link:hover {
  background: rgba(0, 255, 156, 0.18);
}
.ghost {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.12);
}
.secondary {
  background: rgba(255, 255, 255, 0.04);
}
.login-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(0, 255, 156, 0.12), transparent 20%),
    radial-gradient(circle at 70% 15%, rgba(0, 255, 156, 0.08), transparent 18%),
    linear-gradient(180deg, rgba(3, 7, 12, 0.95), rgba(1, 3, 6, 0.98));
  overflow: hidden;
  z-index: 50;
}
.login-panel {
  width: min(520px, calc(100vw - 40px));
  padding: 40px 34px;
  text-align: center;
  border: 1px solid rgba(0, 255, 156, 0.16);
  box-shadow: 0 0 56px rgba(0, 255, 156, 0.08);
}
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 22px;
}
.login-brand h1,
.login-brand p {
  margin: 0;
}
.login-brand h1 {
  font-size: 1.7rem;
}
.login-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.98rem;
}
.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(0, 255, 156, 0.12);
  border: 1px solid rgba(0, 255, 156, 0.35);
  color: var(--neon);
  font-size: 1.2rem;
  box-shadow: 0 0 18px rgba(0, 255, 156, 0.2);
}
.login-copy {
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.6;
}
.login-notice {
  margin: 0 auto 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(0, 255, 156, 0.08);
  border: 1px solid rgba(0, 255, 156, 0.18);
  color: #e6ffeb;
  font-size: 0.9rem;
  max-width: 100%;
}
.login-actions {
  display: grid;
  gap: 12px;
}
.login-dev-section {
  margin-top: 24px;
  padding: 18px 16px 14px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(0, 255, 156, 0.12);
}
.dev-divider {
  color: var(--neon);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}
.dev-fields {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
.login-dev-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dev-output {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  text-align: left;
  max-height: 120px;
  overflow: auto;
}
.hidden {
  display: none !important;
}
.stat-card {
  display: flex;
  flex-direction: column;
}
.cooldown-list,
.cave-actions,
.admin-row {
  display: grid;
  gap: 12px;
}
.cave-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.table-wrapper {
  margin-top: 18px;
}
.table {
  display: grid;
  gap: 10px;
}
.tr {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.tr.header {
  color: var(--neon);
  border-color: rgba(0, 255, 156, 0.15);
}
.empty-state {
  padding: 24px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 18px;
}
.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(1, 3, 6, 0.8);
  z-index: 100;
}
.modal-panel {
  width: min(520px, calc(100vw - 40px));
  background: rgba(8, 14, 18, 0.96);
  border: 1px solid rgba(0, 255, 156, 0.18);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  border-radius: 24px;
  padding: 24px;
}
.modal-header,
.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.modal-body {
  margin: 20px 0;
  color: var(--muted);
}
.modal-copy {
  margin-top: 12px;
}
.admin-output {
  min-height: 180px;
  margin-top: 18px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px;
  overflow-x: auto;
}

.dashboard-output,
.cave-output {
  min-height: 72px;
  max-height: 170px;
  margin-top: 10px;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.76rem;
  white-space: pre-wrap;
  overflow: auto;
}
.status-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 14px 22px;
  border-radius: 999px;
  background: rgba(0, 255, 156, 0.12);
  border: 1px solid rgba(0, 255, 156, 0.2);
  color: var(--text);
  box-shadow: var(--neon-glow);
  z-index: 30;
}
.bar-row {
  display: grid;
  gap: 10px;
}
.bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.bar i {
  width: 0;
  height: 100%;
  display: block;
  border-radius: 999px;
  transition: width 0.25s ease;
}
.health i { background: linear-gradient(90deg, #24ff7b, #00ff9c); }
.hunger i { background: linear-gradient(90deg, #ffc857, #ffcb66); }
.thirst i { background: linear-gradient(90deg, #4db8ff, #66d6ff); }
.stamina i { background: linear-gradient(90deg, #00ff9c, #4bffcf); }
.growth i { background: linear-gradient(90deg, #50ffb5, #00d084); }
.bleed i { background: linear-gradient(90deg, #ff4d4d, #ff2b2b); }
@media (max-width: 1120px) {
  .panel-shell {
    grid-template-columns: 1fr;
  }
  .app-shell::before {
    opacity: 0.03;
  }
  .map-card .map-wrap {
    grid-template-columns: 1fr;
  }
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .side-panel {
    position: static;
    top: auto;
  }
}
@media (max-width: 780px) {
  .section-tabs {
    overflow-x: auto;
    padding-bottom: 0;
  }
  .tab-button {
    flex: 1 0 auto;
  }
  .dashboard-grid,
  .action-grid,
  .skin-grid,
  .mutation-grid,
  .support-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
  .cave-actions {
    grid-template-columns: 1fr;
  }
  .topbar-left {
    gap: 12px;
  }
}

/* Panel layout fixes */
.content-panel {
  min-width: 0;
}
.dashboard-grid > .stat-card {
  min-width: 0;
  overflow: hidden;
}
.quick-actions-grid .neon-button {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}
.cooldown-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cooldown-item {
  min-height: 78px;
}
.dino-status-card .status-list.compact {
  grid-template-columns: 1fr;
}
.dino-status-card .status-item {
  min-height: 66px;
  text-align: center;
}
.dino-status-card .status-item span,
.dino-status-card .status-item strong {
  overflow-wrap: anywhere;
}
.dino-status-card .cache-note,
.dino-status-card .cache-age {
  margin: 12px 0;
  text-align: left;
}
.dino-status-card .bar-group {
  margin-top: 12px;
  gap: 14px;
}
.dino-status-card .bar-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.dino-status-card .bar-row label {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: var(--text);
  font-size: 0.9rem;
}
.dino-status-card .bar {
  width: 100%;
  height: 14px;
}
@media (max-width: 1460px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-grid > .stat-card:last-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 980px) {
  .dashboard-grid,
  .cooldown-list,
  .dino-status-card .status-list.compact {
    grid-template-columns: 1fr;
  }
}
/* Support page single-action layout */
.support-panel .support-grid {
  grid-template-columns: minmax(240px, 420px);
  justify-content: start;
}
.support-panel .support-card {
  min-height: 150px;
}
/* Admin panel tabs */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.admin-tab-panel {
  margin-top: 14px;
}
.admin-teleport-panel {
  display: grid;
  grid-template-columns: minmax(280px, 720px);
  gap: 14px;
}
.admin-teleport-card {
  min-height: auto;
}
.admin-teleport-card span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.admin-teleport-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.admin-teleport-card input,
.admin-teleport-card button {
  margin-top: 10px;
}
@media (max-width: 780px) {
  .admin-teleport-grid {
    grid-template-columns: 1fr;
  }
}
/* Gateway teleport map */
.gateway-land,
.gateway-river,
.gateway-zone {
  position: absolute;
  pointer-events: none;
}
.gateway-land {
  z-index: 2;
  background:
    radial-gradient(circle at 28% 25%, rgba(210, 226, 132, 0.42), transparent 18%),
    radial-gradient(circle at 64% 38%, rgba(126, 182, 84, 0.5), transparent 22%),
    radial-gradient(circle at 48% 72%, rgba(77, 135, 69, 0.48), transparent 24%),
    linear-gradient(135deg, rgba(73, 122, 63, 0.95), rgba(39, 88, 64, 0.96));
  border: 2px solid rgba(240, 255, 210, 0.5);
  box-shadow: inset 0 0 44px rgba(17, 52, 31, 0.75), 0 0 40px rgba(0, 255, 156, 0.08);
}
.land-main {
  left: 22%;
  top: 10%;
  width: 62%;
  height: 78%;
  clip-path: polygon(18% 8%, 31% 3%, 45% 12%, 55% 6%, 72% 12%, 86% 28%, 82% 45%, 92% 58%, 80% 72%, 68% 88%, 49% 83%, 37% 96%, 22% 84%, 10% 69%, 16% 51%, 4% 37%, 14% 25%);
}
.land-south {
  left: 56%;
  top: 76%;
  width: 26%;
  height: 20%;
  clip-path: polygon(14% 26%, 43% 0, 76% 8%, 96% 48%, 70% 83%, 30% 92%, 0 62%);
}
.land-east {
  left: 76%;
  top: 38%;
  width: 14%;
  height: 18%;
  clip-path: polygon(18% 12%, 78% 4%, 100% 48%, 62% 95%, 10% 80%, 0 35%);
}
.gateway-river {
  z-index: 3;
  background: rgba(41, 174, 255, 0.68);
  border: 1px solid rgba(120, 220, 255, 0.72);
  box-shadow: 0 0 12px rgba(41, 174, 255, 0.35);
}
.river-main {
  left: 57%;
  top: 22%;
  width: 5%;
  height: 56%;
  border-radius: 999px;
  transform: rotate(-18deg);
}
.river-north {
  left: 62%;
  top: 19%;
  width: 17%;
  height: 5%;
  border-radius: 999px;
  transform: rotate(16deg);
}
.river-delta {
  left: 58%;
  top: 64%;
  width: 17%;
  height: 12%;
  border-radius: 46% 54% 60% 40%;
  opacity: 0.82;
}
.gateway-zone {
  z-index: 4;
  border-radius: 42% 58% 55% 45%;
  border: 1px solid rgba(0, 255, 156, 0.16);
}
.zone-swamp {
  left: 51%;
  top: 70%;
  width: 18%;
  height: 17%;
  background: rgba(0, 197, 145, 0.28);
}
.zone-highlands {
  left: 37%;
  top: 48%;
  width: 20%;
  height: 15%;
  background: rgba(170, 170, 170, 0.22);
}
.teleport-marker {
  position: absolute;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 150px;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(2, 10, 13, 0.86);
  border: 1px solid rgba(0, 255, 156, 0.5);
  color: var(--text);
  box-shadow: 0 0 18px rgba(0, 255, 156, 0.22);
  transform: translate(-50%, -50%);
  white-space: nowrap;
}
.teleport-marker b {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 12px rgba(0, 255, 156, 0.95);
}
.teleport-marker span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.78rem;
  font-weight: 800;
}
.teleport-marker:hover,
.teleport-marker.selected {
  z-index: 12;
  background: rgba(0, 255, 156, 0.18);
  border-color: rgba(232, 255, 246, 0.85);
  box-shadow: 0 0 24px rgba(0, 255, 156, 0.46);
}
.filter-pill.active {
  color: var(--text);
  border-color: rgba(0, 255, 156, 0.72);
  background: rgba(0, 255, 156, 0.18);
  box-shadow: inset 0 0 12px rgba(0, 255, 156, 0.12);
}
@media (max-width: 780px) {
  .gateway-map {
    min-height: 480px;
  }
  .teleport-marker {
    max-width: 110px;
    padding: 6px 8px;
  }
  .teleport-marker span {
    font-size: 0.72rem;
  }
}


/* Evrima PVP logo */
.site-logo {
  display: block;
  object-fit: contain;
  user-select: none;
  filter: drop-shadow(0 0 18px rgba(125, 255, 0, 0.34));
}
.logo-brand {
  min-width: 250px;
}
.topbar-logo {
  width: 104px;
  height: 66px;
  flex: 0 0 auto;
  border-radius: 10px;
}
.login-brand-logo {
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.login-logo {
  width: min(440px, 92vw);
  height: auto;
  margin: -18px auto -8px;
}
.login-brand-logo p {
  margin: 0;
  color: rgba(232, 255, 246, 0.82);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
@media (max-width: 780px) {
  .topbar-logo {
    width: 86px;
    height: 54px;
  }
  .logo-brand {
    min-width: 0;
  }
  .login-logo {
    width: min(360px, 88vw);
  }
}


/* Calibrated Gateway map from coordinate pack */
.gateway-map {
  background: #101826;
  aspect-ratio: 6144 / 6151;
  min-height: 640px;
}
.gateway-map-img {
  position: absolute;
  z-index: 1;
  display: block;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}
.gateway-map::before {
  z-index: 2;
}
.gateway-map::after {
  display: none;
}
.teleport-marker {
  z-index: 8;
}
.teleport-marker.selected,
.teleport-marker:hover {
  z-index: 12;
}

/* Active cooldown timers */
.active-cooldown-list {
  grid-template-columns: 1fr;
}
.cooldown-empty {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(2, 7, 11, 0.5);
  text-align: center;
}
.active-cooldown-item {
  min-height: 54px;
  justify-content: center;
}
.active-cooldown-item strong {
  color: var(--neon);
  font-size: 1.05rem;
}
/* Dashboard command center */
.dashboard-grid-command-center {
  grid-template-columns: minmax(280px, 0.8fr) minmax(280px, 0.8fr);
  align-items: stretch;
}
.quick-actions-card {
  grid-column: 1 / -1;
}
.quick-action-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
}
.quick-action-group {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.quick-action-group > span {
  color: var(--neon);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.quick-command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.command-button {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border-radius: 14px;
  white-space: nowrap;
}
.danger-command {
  border-color: rgba(255, 77, 77, 0.4);
  background: rgba(255, 77, 77, 0.1);
}
.growth-control-strip {
  display: grid;
  grid-template-columns: 64px minmax(90px, 1fr) repeat(2, minmax(82px, 1fr));
  gap: 10px;
  align-items: stretch;
}
.growth-target-pill {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 46px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(0, 255, 156, 0.14);
}
.growth-target-pill small {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.growth-target-pill strong {
  color: var(--text);
}

/* Mutation creator */
.mutation-builder-panel {
  display: grid;
  gap: 18px;
}
.mutation-header-row,
.mutation-toolbar {
  display: grid;
  gap: 12px;
  align-items: end;
}
.mutation-header-row {
  grid-template-columns: minmax(0, 1fr) auto;
}
.mutation-subtitle {
  margin: -4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.mutation-toolbar {
  grid-template-columns: auto minmax(180px, 260px) auto minmax(220px, 1fr);
}
.mutation-slots,
.mutation-catalog,
.mutation-loadouts {
  display: grid;
  gap: 10px;
}
.mutation-slots {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}
.mutation-slot {
  min-height: 74px;
  border-style: dashed;
  color: var(--muted);
  background: rgba(2, 7, 11, 0.52);
}
.mutation-slot.filled {
  color: var(--text);
  border-style: solid;
  border-color: rgba(0, 255, 156, 0.38);
  background: rgba(0, 255, 156, 0.08);
}
.mutation-catalog {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.mutation-pick {
  min-height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}
.mutation-pick.selected {
  color: var(--text);
  border-color: rgba(0, 255, 156, 0.65);
  background: rgba(0, 255, 156, 0.14);
  box-shadow: inset 0 0 16px rgba(0, 255, 156, 0.08);
}
.mutation-loadout-section {
  display: grid;
  gap: 10px;
}
.mutation-loadouts {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}
.mutation-loadout-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.mutation-loadout-main {
  display: grid;
  gap: 6px;
  text-align: left;
  border-radius: 12px;
  background: rgba(0, 255, 156, 0.07);
}
.mutation-loadout-main span,
.mutation-loadout-main small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.mutation-delete {
  padding: 10px 12px;
  border-radius: 12px;
}
@media (max-width: 1280px) {
  .quick-action-groups,
  .mutation-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mutation-slots,
  .mutation-loadouts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 780px) {
  .dashboard-grid-command-center,
  .quick-action-groups,
  .quick-command-grid,
  .growth-control-strip,
  .mutation-header-row,
  .mutation-toolbar,
  .mutation-slots,
  .mutation-catalog,
  .mutation-loadouts,
  .mutation-loadout-card {
    grid-template-columns: 1fr;
  }
}
/* Compact dashboard quick action toolbar */
.compact-actions-card {
  grid-column: 1 / -1;
  padding: 18px 22px;
}
.quick-actions-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.command-pill {
  min-height: 40px;
  min-width: 68px;
  width: auto;
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}
.icon-pill {
  min-width: 48px;
  width: 48px;
  padding-inline: 8px;
}
.growth-target-mini {
  display: grid;
  place-items: center;
  min-height: 40px;
  min-width: 72px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 156, 0.18);
  background: rgba(0, 0, 0, 0.22);
}
.growth-target-mini span {
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.growth-target-mini strong {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.2;
}
.quick-actions-spacer {
  flex: 1 1 24px;
  min-width: 12px;
}
.compact-actions-card .danger-command {
  border-color: rgba(255, 77, 77, 0.46);
  background: rgba(255, 77, 77, 0.1);
}
@media (max-width: 980px) {
  .quick-actions-spacer {
    display: none;
  }
  .command-pill {
    flex: 1 1 92px;
  }
  .icon-pill {
    flex: 0 0 48px;
  }
}
/* Dashboard vertical command list */
.panel-list-dashboard {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(220px, 300px);
  gap: 18px;
  align-items: start;
}
.dashboard-main-panel {
  min-height: 520px;
}
.panel-command-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(160px, 260px);
  gap: 24px;
  align-items: start;
  justify-content: center;
}
.panel-summary-compact {
  align-content: start;
}
.panel-summary-compact div {
  min-height: 72px;
}
.command-list-panel {
  display: grid;
  gap: 7px;
  width: min(240px, 100%);
  margin: 0 auto;
}
.command-list-button {
  width: 100%;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.1;
}
.mini-command {
  width: 100%;
}
.cooldown-mini-card {
  min-height: 180px;
  padding: 18px;
}
.cooldown-mini-card .active-cooldown-list {
  gap: 8px;
}
.cooldown-mini-card .cooldown-empty {
  padding: 12px;
  font-size: 0.86rem;
}
.cooldown-mini-card .cooldown-item {
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
}
.cooldown-mini-card .cooldown-item span {
  font-size: 0.76rem;
}
.cooldown-mini-card .cooldown-item strong {
  font-size: 0.92rem;
}
@media (max-width: 1180px) {
  .panel-list-dashboard {
    grid-template-columns: 1fr;
  }
  .cooldown-mini-card {
    min-height: auto;
  }
}
@media (max-width: 760px) {
  .panel-command-layout {
    grid-template-columns: 1fr;
  }
  .command-list-panel {
    width: 100%;
  }
}
/* Panel without summary cards */
.dashboard-main-panel .panel-command-layout {
  grid-template-columns: minmax(170px, 260px);
  justify-content: center;
}
.dashboard-main-panel {
  min-height: 420px;
}
/* Final compact command grid */
.panel-list-dashboard {
  grid-template-columns: minmax(560px, 1fr) minmax(220px, 300px);
}
.dashboard-main-panel {
  min-height: 300px;
}
.dashboard-main-panel .panel-command-layout {
  display: block;
  width: 100%;
}
.command-list-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  gap: 9px;
  width: 100%;
  max-width: 900px;
  margin: 0;
  align-items: stretch;
}
.command-list-button {
  min-height: 38px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
}
.skin-grid .effects-card {
  border-color: rgba(0, 255, 156, 0.16);
}
@media (max-width: 1280px) {
  .command-list-panel {
    grid-template-columns: repeat(3, minmax(112px, 1fr));
    max-width: 560px;
  }
}
@media (max-width: 760px) {
  .command-list-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }
}
/* Dashboard command cost badges */
.command-list-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.command-list-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.button-cost {
  flex: 0 0 auto;
  color: rgba(190, 255, 230, 0.82);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(0, 255, 156, 0.16);
}
/* Mutation search feedback */
.mutation-pick.search-match {
  border-color: rgba(0, 255, 156, 0.78);
  background: rgba(0, 255, 156, 0.12);
  box-shadow: 0 0 0 1px rgba(0, 255, 156, 0.16), 0 0 16px rgba(0, 255, 156, 0.12);
}
.mutation-pick mark {
  color: var(--neon);
  background: rgba(0, 255, 156, 0.16);
  border-radius: 5px;
  padding: 0 2px;
}
.mutation-empty {
  grid-column: 1 / -1;
}
/* Active mutation preset */
.mutation-active-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}
.mutation-active-line strong {
  color: var(--neon);
}
.mutation-loadout-card.active-loadout {
  border-color: rgba(0, 255, 156, 0.58);
  background: rgba(0, 255, 156, 0.08);
  box-shadow: 0 0 0 1px rgba(0, 255, 156, 0.12), 0 0 18px rgba(0, 255, 156, 0.10);
}
/* Dashboard action note */
.dashboard-action-note {
  margin: 10px 0 0;
  color: rgba(134, 167, 155, 0.82);
  font-size: 0.72rem;
  text-align: left;
}
/* MySkins / Skin Creator */
.skin-creator-shell {
  display: grid;
  gap: 16px;
  border-color: rgba(255, 77, 77, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 77, 77, 0.08), 0 0 24px rgba(255, 77, 77, 0.08);
}
.skin-header-row,
.skin-toolbar,
.skin-filter-row,
.skin-creator-topline,
.skin-creator-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.skin-title {
  color: #ff5454;
  text-shadow: 0 0 14px rgba(255, 77, 77, 0.45);
  font-size: 28px;
  letter-spacing: 0;
}
.skin-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}
.skin-header-row {
  justify-content: space-between;
}
.skin-toolbar input,
.skin-creator-topline input,
.skin-creator-topline select,
.skin-raw-editor,
.skin-hex-row input,
.skin-rgb-grid input {
  background: rgba(18, 24, 36, 0.86);
  border: 1px solid rgba(75, 99, 130, 0.55);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
}
.skin-toolbar input {
  min-width: min(520px, 100%);
  flex: 1;
}
.skin-danger-accent,
.skin-toggle,
.skin-lock {
  border-color: rgba(255, 77, 77, 0.86) !important;
  color: #ff6969 !important;
}
.skin-toggle,
.skin-lock {
  background: rgba(255, 77, 77, 0.08);
  border: 1px solid rgba(255, 77, 77, 0.78);
  border-radius: 8px;
  min-width: 38px;
  padding: 9px 12px;
  font-weight: 800;
}
.skin-toggle.wide {
  min-width: 82px;
}
.skin-toggle.active,
.skin-danger-accent:hover {
  background: rgba(255, 77, 77, 0.88) !important;
  color: #05070c !important;
}
.skin-viewer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 14px;
  align-items: stretch;
}
.skin-viewer-stage {
  position: relative;
  min-height: 390px;
  border: 1px solid rgba(255, 77, 77, 0.38);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 82%, rgba(255, 77, 77, 0.20), transparent 34%),
    linear-gradient(145deg, rgba(8, 10, 12, 0.98), rgba(18, 20, 21, 0.94) 54%, rgba(30, 16, 14, 0.92));
  box-shadow: inset 0 0 42px rgba(0, 0, 0, 0.58), 0 0 22px rgba(255, 77, 77, 0.08);
}
.skin-viewer-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 77, 77, 0.14), transparent 18%, transparent 82%, rgba(255, 77, 77, 0.12)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.48), transparent 40%);
}
.skin-viewer-stage canvas {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 390px;
}
.skin-viewer-message {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 80%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 77, 77, 0.46);
  border-radius: 8px;
  background: rgba(9, 11, 15, 0.86);
  color: var(--text);
  font-weight: 800;
  text-align: center;
}
.skin-viewer-message:empty,
.skin-viewer-message.hidden {
  display: none;
}
.skin-viewer-controls {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 77, 77, 0.32);
  border-radius: 8px;
  background: rgba(9, 12, 18, 0.76);
}
.skin-viewer-field,
.skin-viewer-check {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-weight: 800;
}
.skin-viewer-field span,
.skin-viewer-check span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.skin-viewer-field select {
  width: 100%;
  min-width: 0;
  background: rgba(18, 24, 36, 0.86);
  border: 1px solid rgba(255, 77, 77, 0.46);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 10px;
}
.skin-viewer-field input[type="range"] {
  width: 100%;
  accent-color: #ff5454;
}
.skin-viewer-check {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
}
.skin-viewer-check input {
  width: 16px;
  height: 16px;
  accent-color: #ff5454;
}
.skin-viewer-segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.skin-viewer-segment button {
  min-height: 34px;
  border: 1px solid rgba(255, 77, 77, 0.52);
  border-radius: 8px;
  background: rgba(255, 77, 77, 0.08);
  color: #ff8585;
  font-weight: 900;
}
.skin-viewer-segment button.active {
  background: rgba(255, 77, 77, 0.86);
  color: #06070b;
}
.skin-creator-panel {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(68, 87, 118, 0.45);
  border-radius: 10px;
  background: rgba(10, 14, 22, 0.72);
}
.skin-creator-topline label,
.skin-filter-row span {
  color: var(--muted);
  font-weight: 800;
}
.skin-creator-topline input[type="range"] {
  min-width: 130px;
  accent-color: #19c7ff;
  padding: 0;
}
.skin-creator-topline select {
  min-width: 230px;
}
.skin-creator-topline #skinNameInput {
  min-width: 190px;
}
.skin-creator-topline #skinPatternInput {
  width: 90px;
}
.skin-parts-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 12px;
}
.skin-part-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(75, 99, 130, 0.38);
  border-radius: 8px;
  background: rgba(16, 22, 33, 0.82);
}
.skin-part-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
}
.skin-part-title strong {
  font-size: 13px;
  color: var(--text);
}
.skin-lock {
  min-width: 34px;
  padding: 5px 8px;
  font-size: 12px;
}
.skin-color-input {
  width: 100%;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 5px;
  background: transparent;
}
.skin-rgb-grid {
  display: grid;
  gap: 4px;
}
.skin-rgb-grid label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  color: var(--text);
  font-weight: 800;
}
.skin-rgb-grid input,
.skin-hex-row input {
  min-width: 0;
  padding: 6px 8px;
}
.skin-hex-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 6px;
  align-items: center;
}
.skin-color-preview {
  height: 32px;
  border: 1px solid rgba(255, 77, 77, 0.8);
  border-radius: 5px;
}
.skin-raw-editor {
  width: 100%;
  min-height: 160px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  resize: vertical;
}
.skin-loadout-section {
  display: grid;
  gap: 12px;
}
.skin-loadout-header {
  text-align: center;
  color: var(--text);
  font-weight: 800;
}
.skin-preset-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 10px;
}
.skin-preset-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 77, 77, 0.34);
  border-radius: 8px;
  background: rgba(25, 30, 42, 0.92);
  color: var(--text);
  text-align: center;
}
.skin-preset-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.skin-preset-card span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}
.skin-preset-card small {
  padding: 6px 7px;
  border: 1px solid rgba(255, 77, 77, 0.76);
  border-radius: 8px;
  color: #ff6969;
}
.skin-preset-card.active-skin,
.skin-preset-card:hover {
  border-color: rgba(255, 77, 77, 0.95);
  background: rgba(255, 77, 77, 0.12);
}
@media (max-width: 1400px) {
  .skin-parts-grid { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
  .skin-preset-list { grid-template-columns: repeat(4, minmax(140px, 1fr)); }
}
@media (max-width: 900px) {
  .skin-viewer-layout { grid-template-columns: 1fr; }
  .skin-viewer-stage,
  .skin-viewer-stage canvas { min-height: 330px; }
  .skin-viewer-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skin-parts-grid,
  .skin-preset-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skin-toolbar input,
  .skin-creator-topline select,
  .skin-creator-topline #skinNameInput { min-width: 100%; }
}
@media (max-width: 560px) {
  .skin-viewer-stage,
  .skin-viewer-stage canvas { min-height: 300px; }
  .skin-viewer-controls { grid-template-columns: 1fr; }
  .skin-parts-grid,
  .skin-preset-list { grid-template-columns: 1fr; }
}

/* Skin studio refresh */
.skin-studio-shell {
  gap: 18px;
}
.skin-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}
.skin-studio-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.skin-studio-side {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.skin-studio-shell .skin-viewer-layout {
  display: block;
}
.skin-studio-shell .skin-viewer-stage {
  min-height: clamp(430px, 56vh, 590px);
  border-color: rgba(201, 169, 89, 0.42);
  background: #0b0e0a;
  isolation: isolate;
}
.skin-studio-shell .skin-viewer-stage::before {
  content: none;
}
.skin-studio-shell .skin-viewer-stage.skin-stage-glitch-mode::after {
  content: none;
}
.skin-studio-shell .skin-viewer-stage canvas {
  z-index: 3;
  min-height: clamp(430px, 56vh, 590px);
}
.skin-stage-bg,
.skin-viewer-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.skin-stage-bg {
  z-index: 1;
  overflow: hidden;
}
.skin-stage-scrim,
.skin-stage-pool,
.skin-stage-grain,
.skin-stage-vignette {
  position: absolute;
  inset: 0;
}
.skin-stage-scrim {
  background:
    radial-gradient(84% 74% at 50% 42%, rgba(48, 60, 42, 0.90) 0%, rgba(14, 19, 13, 0.96) 48%, rgba(6, 8, 6, 1) 88%),
    linear-gradient(180deg, rgba(201, 169, 89, 0.07), rgba(217, 86, 74, 0.035));
}
.skin-stage-pool {
  background: radial-gradient(ellipse 46% 32% at 50% 73%, rgba(217, 86, 74, 0.11), transparent 70%);
}
.skin-stage-grain {
  opacity: 0.18;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.12) 0 1px, transparent 1px 6px);
  mix-blend-mode: overlay;
}
.skin-stage-vignette {
  box-shadow: inset 0 0 160px 42px rgba(0, 0, 0, 0.76);
}
.skin-viewer-stage[data-bg="ink"] .skin-stage-scrim {
  background: radial-gradient(88% 78% at 50% 42%, #1c261d 0%, #101610 46%, #0b0e0a 84%);
}
.skin-viewer-stage[data-bg="ember"] .skin-stage-scrim {
  background: radial-gradient(90% 80% at 50% 42%, #5d2f23 0%, #221410 48%, #080706 88%);
}
.skin-viewer-stage[data-bg="moon"] .skin-stage-scrim {
  background: radial-gradient(88% 78% at 50% 42%, #2b3d3e 0%, #111a1c 50%, #070a0a 88%);
}
.skin-viewer-stage[data-bg="bone"] .skin-stage-scrim {
  background: radial-gradient(94% 84% at 50% 44%, #d3cdbc 0%, #8a8577 48%, #242b22 90%);
}
.skin-viewer-stage[data-bg="custom"] .skin-stage-scrim {
  background: radial-gradient(94% 84% at 50% 44%, var(--skin-stage-custom, #231e12) 0%, rgba(8, 11, 8, 0.86) 76%, #0b0e0a 96%);
}
.skin-viewer-glitch-art {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  transform: scale(1.14);
  background: #0b0e0a;
}
.skin-glitch-mask {
  display: none;
  position: absolute;
  left: 1px;
  right: 1px;
  top: 1px;
  height: 118px;
  z-index: 20;
  pointer-events: none;
  background: linear-gradient(180deg, #080b08 0%, #080b08 68%, rgba(8, 11, 8, 0) 100%);
}
.skin-stage-glitch-mode .skin-glitch-mask {
  display: none;
}
.skin-studio-shell .skin-viewer-message.hidden {
  display: none !important;
}
.skin-studio-shell .skin-viewer-message {
  z-index: 32;
}
.skin-viewer-canvas-muted {
  opacity: 0;
  filter: saturate(0.75) contrast(1.08);
}
.skin-stage-glitch-mode #skinViewerCanvas {
  opacity: 1;
  filter: saturate(1.7) contrast(1.24) hue-rotate(185deg) drop-shadow(0 0 18px rgba(55, 196, 255, 0.36));
}
.skin-stage-glitch-mode .skin-stage-pool {
  background:
    radial-gradient(ellipse 50% 32% at 50% 72%, rgba(30, 205, 255, 0.24), transparent 70%),
    linear-gradient(90deg, transparent 0 18%, rgba(49, 125, 255, 0.08) 22%, transparent 30% 52%, rgba(255, 77, 255, 0.08) 56%, transparent 64%);
}
.skin-stage-glitch-mode .skin-stage-grain {
  opacity: 0.28;
  mix-blend-mode: screen;
}
.skin-viewer-overlay {
  z-index: 30;
}
.skin-vp-corner {
  position: absolute;
  display: block !important;
  width: 34px;
  height: 34px;
  border-color: rgba(201, 169, 89, 0.76);
  background: none !important;
  box-shadow: none !important;
}
.skin-vp-corner-tl { top: 13px; left: 13px; border-top: 1px solid; border-left: 1px solid; }
.skin-vp-corner-tr { top: 13px; right: 13px; border-top: 1px solid; border-right: 1px solid; }
.skin-vp-corner-bl { bottom: 13px; left: 13px; border-bottom: 1px solid; border-left: 1px solid; }
.skin-vp-corner-br { bottom: 13px; right: 13px; border-bottom: 1px solid; border-right: 1px solid; }
.skin-viewer-readout {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 31;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.skin-viewer-readout span {
  display: grid;
  gap: 2px;
  min-width: 88px;
  padding: 8px 10px;
  border: 1px solid rgba(201, 169, 89, 0.28);
  border-radius: 8px;
  background: rgba(7, 9, 8, 0.70);
}
.skin-viewer-readout i {
  color: rgba(224, 218, 202, 0.62);
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
}
.skin-viewer-readout b {
  color: #f2ead3;
  font-size: 12px;
}
.skin-stage-rail {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(201, 169, 89, 0.28);
  border-radius: 8px;
  background: rgba(9, 12, 10, 0.78);
}
.skin-rail-cell,
.skin-viewer-field.compact {
  display: grid;
  gap: 6px;
}
.skin-rail-cell > span,
.skin-stage-rail .skin-viewer-field span,
.skin-stage-rail .skin-viewer-check span {
  color: rgba(224, 218, 202, 0.68);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.skin-bg-swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.skin-bg-swatches button,
.skin-bg-custom {
  width: 25px;
  height: 25px;
  border: 1px solid rgba(224, 218, 202, 0.28);
  border-radius: 50%;
  cursor: pointer;
}
.skin-bg-swatches button.active,
.skin-bg-custom:focus-within {
  border-color: #ff5454;
  box-shadow: 0 0 0 2px rgba(255, 77, 77, 0.18);
}
.skin-bg-swatches [data-skin-bg="studio"] { background: radial-gradient(circle at 34% 26%, #2b3628, #1c261d 54%, #c9a959 190%); }
.skin-bg-swatches [data-skin-bg="ink"] { background: radial-gradient(circle at 34% 30%, #3a4636, #1c261d 60%, #0c100c); }
.skin-bg-swatches [data-skin-bg="ember"] { background: radial-gradient(circle at 34% 30%, #e3c67d, #c95b40 58%, #32100d); }
.skin-bg-swatches [data-skin-bg="moon"] { background: radial-gradient(circle at 34% 30%, #e4e8eb, #7c98a2 58%, #182526); }
.skin-bg-swatches [data-skin-bg="bone"] { background: radial-gradient(circle at 34% 30%, #f4efe2, #e6e1d3 58%, #8a8577); }
.skin-bg-custom {
  position: relative;
  display: inline-block;
  overflow: hidden;
  background: conic-gradient(#c9a959, #e8d094, #c7ccd1, #6ab0e0, #b06ae0, #c9a959);
}
.skin-bg-custom input {
  position: absolute;
  inset: -6px;
  opacity: 0;
  cursor: pointer;
}
.skin-stage-rail .skin-viewer-segment {
  width: 178px;
}
.skin-stage-rail .skin-viewer-field.compact {
  width: 116px;
}
.skin-stage-rail .skin-viewer-field.compact input {
  width: 100%;
}
.skin-creator-panel {
  border-color: rgba(201, 169, 89, 0.30);
  background: rgba(9, 12, 10, 0.72);
}
.skin-deck-row,
.skin-deck-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}
.skin-deck-field {
  display: grid;
  gap: 6px;
  min-width: 150px;
  color: rgba(224, 218, 202, 0.68);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.skin-name-field {
  flex: 1;
  min-width: 230px;
}
.skin-code-field {
  flex: 1 1 260px;
  min-width: 240px;
}
.skin-code-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.skin-code-inline input {
  min-width: 0;
  text-transform: uppercase;
}
.skin-code-inline button {
  min-height: 36px;
  padding: 8px 12px;
  white-space: nowrap;
}
.skin-deck-field input,
.skin-deck-field select,
.skin-ctl-head input,
.skin-viewer-field select {
  background: rgba(12, 16, 18, 0.92);
  border: 1px solid rgba(201, 169, 89, 0.28);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 10px;
}
.skin-chip-seg {
  display: flex;
  gap: 6px;
}
.skin-deck-spacer {
  flex: 1;
}
.skin-ctl-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(201, 169, 89, 0.28);
  border-radius: 8px;
  background: rgba(9, 12, 10, 0.72);
}
.skin-ctl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.skin-ctl-head h3 {
  margin: 0;
  color: #f2ead3;
  font-size: 15px;
  text-transform: uppercase;
}
.skin-ctl-head span {
  color: rgba(224, 218, 202, 0.64);
  font-size: 12px;
  font-weight: 800;
}
.skin-species-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 188px;
  overflow: auto;
}
.skin-species-grid button {
  min-height: 34px;
  border: 1px solid rgba(201, 169, 89, 0.22);
  border-radius: 8px;
  background: rgba(18, 25, 20, 0.70);
  color: rgba(242, 234, 211, 0.84);
  font-weight: 800;
  font-size: 11px;
}
.skin-species-grid button.active,
.skin-species-grid button:hover {
  border-color: rgba(255, 77, 77, 0.82);
  background: rgba(255, 77, 77, 0.14);
  color: #fff0e2;
}
.skin-studio-side .skin-parts-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}
.skin-studio-side .skin-part-card {
  grid-template-columns: minmax(86px, 1fr) 42px minmax(0, 1.35fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(18, 25, 20, 0.64);
  border-color: rgba(201, 169, 89, 0.22);
}
.skin-studio-side .skin-part-title {
  min-height: 0;
}
.skin-studio-side .skin-part-title strong {
  font-size: 12px;
}
.skin-studio-side .skin-lock,
.skin-studio-side .skin-rgb-grid {
  display: none;
}
.skin-studio-side .skin-color-input {
  width: 40px;
  height: 30px;
}
.skin-studio-side .skin-hex-row {
  grid-template-columns: minmax(0, 1fr) 28px;
}
.skin-tuning-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  align-items: center;
  color: rgba(224, 218, 202, 0.70);
  font-size: 12px;
  font-weight: 800;
}
.skin-tuning-row label {
  display: grid;
  gap: 5px;
}
.skin-tuning-row input {
  width: 100%;
  accent-color: #ff5454;
}
.skin-glitch-grid {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}
.skin-glitch-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 8px;
  align-items: center;
  padding: 8px;
  min-height: 68px;
  border: 1px solid rgba(201, 169, 89, 0.24);
  border-radius: 8px;
  background: rgba(18, 25, 20, 0.70);
  color: var(--text);
  text-align: left;
}
.skin-glitch-card:hover,
.skin-glitch-card.active {
  border-color: rgba(255, 77, 77, 0.84);
  background: rgba(255, 77, 77, 0.13);
}
.skin-glitch-card img {
  grid-row: span 2;
  width: 82px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
}
.skin-glitch-card .g-name {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  font-weight: 900;
}
.skin-glitch-card .g-name i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.skin-glitch-card small {
  color: rgba(224, 218, 202, 0.64);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  align-self: start;
}
.skin-studio-side .effects-grid.compact-effects {
  grid-template-columns: 1fr;
  gap: 7px;
}
.skin-studio-side .effect-slider-row {
  padding: 7px 8px;
}
.skin-studio-side .skin-preset-list {
  grid-template-columns: 1fr;
  max-height: 300px;
  overflow: auto;
}
.skin-studio-side .skin-preset-card {
  text-align: left;
}
@media (max-width: 1280px) {
  .skin-studio-grid { grid-template-columns: minmax(0, 1fr); }
  .skin-studio-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .skin-studio-shell .skin-viewer-stage,
  .skin-studio-shell .skin-viewer-stage canvas {
    min-height: 340px;
  }
  .skin-stage-rail,
  .skin-deck-row,
  .skin-deck-actions {
    align-items: stretch;
  }
  .skin-stage-rail .skin-viewer-field.compact,
  .skin-stage-rail .skin-viewer-segment,
  .skin-rail-cell,
  .skin-deck-field,
  .skin-name-field {
    width: 100%;
    min-width: 0;
  }
  .skin-studio-side { grid-template-columns: 1fr; }
  .skin-studio-side .skin-part-card { grid-template-columns: 1fr 42px; }
  .skin-studio-side .skin-hex-row { grid-column: 1 / -1; }
}

/* Skin studio compact pass */
#skinsSection button:focus,
#skinsSection button:focus-visible,
#skinsSection input:focus,
#skinsSection input:focus-visible,
#skinsSection select:focus,
#skinsSection select:focus-visible,
#skinsSection label:focus-within {
  outline: none !important;
  box-shadow: none !important;
}
#skinsSection button:focus-visible,
#skinsSection .skin-part-dot:focus-within {
  border-color: rgba(255, 84, 84, 0.74) !important;
}
.skin-studio-shell {
  gap: 12px;
  padding: 14px;
}
.skin-header-row {
  min-height: 34px;
}
.skin-title {
  font-size: 22px;
  line-height: 1;
}
.skin-studio-grid {
  grid-template-columns: minmax(560px, 1fr) 318px;
  gap: 12px;
}
.skin-studio-main {
  position: sticky;
  top: 74px;
  max-height: calc(100vh - 86px);
  overflow: auto;
  scrollbar-width: thin;
}
.skin-studio-main::-webkit-scrollbar,
.skin-studio-side::-webkit-scrollbar,
.skin-species-grid::-webkit-scrollbar,
.skin-glitch-grid::-webkit-scrollbar,
.skin-preset-list::-webkit-scrollbar {
  width: 6px;
}
.skin-studio-shell .skin-viewer-stage,
.skin-studio-shell .skin-viewer-stage canvas {
  min-height: clamp(360px, 47vh, 500px);
}
.skin-stage-rail {
  gap: 8px;
  padding: 8px;
}
.skin-rail-cell,
.skin-viewer-field.compact {
  gap: 4px;
}
.skin-stage-rail .skin-viewer-field.compact {
  width: 104px;
}
.skin-stage-rail .skin-viewer-segment {
  width: 142px;
}
.skin-viewer-segment button,
.skin-toggle,
.skin-lock,
.skin-danger-accent,
.skin-deck-actions button,
.effects-actions-strip button {
  min-height: 30px;
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 11px;
  line-height: 1;
}
.skin-bg-swatches button,
.skin-bg-custom {
  width: 22px;
  height: 22px;
}
.skin-viewer-readout {
  left: 12px;
  bottom: 12px;
  gap: 6px;
}
.skin-viewer-readout span {
  min-width: 76px;
  padding: 6px 8px;
}
.skin-viewer-readout i {
  font-size: 9px;
}
.skin-viewer-readout b {
  font-size: 11px;
}
.skin-creator-panel,
.skin-ctl-block {
  gap: 8px;
  padding: 10px;
}
.skin-deck-row,
.skin-deck-actions {
  gap: 8px;
}
.skin-deck-field {
  min-width: 114px;
  gap: 4px;
  font-size: 10px;
}
.skin-name-field {
  min-width: 185px;
}
.skin-deck-field input,
.skin-deck-field select,
.skin-ctl-head input,
.skin-viewer-field select {
  min-height: 32px;
  padding: 7px 9px;
  font-size: 12px;
}
.skin-ctl-head h3 {
  font-size: 13px;
}
.skin-ctl-head span {
  font-size: 11px;
}
.skin-species-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  max-height: 150px;
}
.skin-species-grid button {
  min-height: 28px;
  padding: 5px 7px;
  border-radius: 7px;
  font-size: 9px;
}
.skin-studio-side .skin-parts-grid {
  grid-template-columns: repeat(7, minmax(28px, 1fr));
  gap: 6px;
}
.skin-studio-side .skin-part-card.skin-part-dot {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  min-width: 0;
  min-height: 46px;
  padding: 4px 2px;
  border: 0;
  background: transparent;
}
.skin-part-dot .skin-color-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.skin-part-dot .skin-color-preview {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(230, 225, 211, 0.42);
  background: var(--skin-part-color, #000);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.34);
}
.skin-part-dot:hover .skin-color-preview {
  border-color: rgba(255, 84, 84, 0.92);
}
.skin-part-dot strong {
  max-width: 42px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(224, 218, 202, 0.72);
  font-size: 8px;
  line-height: 1.1;
  text-align: center;
}
.skin-tuning-row {
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px;
  gap: 6px;
  font-size: 10px;
}
.skin-glitch-grid {
  gap: 6px;
  max-height: 300px;
}
.skin-glitch-card {
  grid-template-columns: 62px minmax(0, 1fr);
  min-height: 54px;
  padding: 6px;
  gap: 2px 7px;
}
.skin-glitch-card img {
  width: 62px;
  height: 40px;
}
.skin-glitch-card .g-name {
  font-size: 11px;
}
.skin-glitch-card small {
  font-size: 9px;
}
.skin-studio-side .effects-grid.compact-effects {
  gap: 5px;
}
.skin-studio-side .effect-slider-row {
  grid-template-columns: 76px minmax(72px, 1fr) 28px;
  gap: 6px;
  padding: 5px 6px;
  font-size: 10px;
}
.effects-section-title {
  font-size: 13px;
  margin: 0;
}
.effects-actions-strip {
  gap: 6px;
  padding: 8px;
}
.skin-studio-side .skin-preset-list {
  max-height: 210px;
}
.skin-preset-card {
  min-height: 38px;
  padding: 7px 8px;
  font-size: 11px;
}
@media (max-width: 1280px) {
  .skin-studio-main {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .skin-studio-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .skin-studio-shell .skin-viewer-stage,
  .skin-studio-shell .skin-viewer-stage canvas {
    min-height: 328px;
  }
  .skin-stage-rail,
  .skin-deck-row,
  .skin-deck-actions {
    align-items: center;
  }
  .skin-stage-rail #skinViewerResetCamera {
    min-height: 34px;
    align-self: center;
  }
  .skin-studio-side .skin-parts-grid {
    grid-template-columns: repeat(7, minmax(24px, 1fr));
  }
  .skin-part-dot .skin-color-preview {
    width: 25px;
    height: 25px;
  }
}

/* Effects Editor */
.effects-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
  background: rgba(12, 16, 25, 0.86);
  border: 1px solid rgba(255, 77, 77, 0.36);
  box-shadow: inset 0 0 0 1px rgba(255, 77, 77, 0.06);
}
.effects-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.effects-title,
.effects-section-title {
  color: #ff5454;
  text-shadow: 0 0 14px rgba(255, 77, 77, 0.42);
  letter-spacing: 0;
}
.effects-title {
  font-size: 28px;
  margin: 0;
}
.effects-section-title {
  font-size: 22px;
  margin: 4px 0 0;
}
.effects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 12px 20px;
}
.effect-slider-row {
  display: grid;
  grid-template-columns: 120px minmax(90px, 1fr) 32px;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
}
.effect-slider-row input[type="range"] {
  width: 100%;
  accent-color: #ff5454;
  padding: 0;
}
.effect-slider-row strong {
  color: rgba(255, 255, 255, 0.72);
  text-align: right;
}
.effects-actions-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px;
  border: 1px solid rgba(75, 99, 130, 0.28);
  border-radius: 8px;
  background: rgba(12, 16, 25, 0.62);
}
.effects-wide-action {
  min-width: min(390px, 100%);
}
.effects-danger-button {
  border-color: rgba(255, 77, 77, 0.86) !important;
  color: #ff6969 !important;
  background: rgba(255, 77, 77, 0.06) !important;
}
.effects-danger-button:hover {
  background: rgba(255, 77, 77, 0.86) !important;
  color: #05070c !important;
}
@media (max-width: 1200px) {
  .effects-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}
@media (max-width: 700px) {
  .effects-grid { grid-template-columns: 1fr; }
  .effect-slider-row { grid-template-columns: 105px minmax(80px, 1fr) 28px; }
}

/* === Premium UI/UX polish v62 === */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('/assets/fonts/cinzel-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/bebasneue-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/assets/fonts/jetbrainsmono-latin.woff2') format('woff2');
}
:root {
  --accent: var(--neon);
  --accent-2: var(--neon-2);
  --accent-soft: var(--neon-soft);
  --accent-border: var(--border);
  --accent-border-strong: var(--border-strong);
  --accent-glow: var(--neon-glow);
  --glass-bg: linear-gradient(145deg, rgba(10, 18, 22, 0.78), rgba(2, 5, 8, 0.74));
  --glass-bg-strong: linear-gradient(145deg, rgba(13, 23, 27, 0.9), rgba(3, 6, 9, 0.84));
  --glass-highlight: inset 0 1px 0 rgba(255,255,255,0.06), inset 0 -1px 0 rgba(255,255,255,0.02);
  --panel-shadow: 0 24px 70px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255,255,255,0.025);
  --premium-radius: 26px;
  --premium-radius-sm: 16px;
}

:root[data-theme="neon"] {
  --bg: #05070a;
  --bg-2: #06120f;
  --border: rgba(0, 255, 156, 0.24);
  --border-strong: rgba(0, 255, 156, 0.62);
  --neon: #00ff9c;
  --neon-2: #00d084;
  --neon-soft: rgba(0, 255, 156, 0.13);
  --neon-glow: 0 0 26px rgba(0, 255, 156, 0.36);
}

:root[data-theme="ice"] {
  --bg: #030914;
  --bg-2: #071522;
  --border: rgba(111, 222, 255, 0.25);
  --border-strong: rgba(111, 222, 255, 0.68);
  --neon: #6fdeff;
  --neon-2: #2faaf7;
  --neon-soft: rgba(111, 222, 255, 0.14);
  --neon-glow: 0 0 28px rgba(111, 222, 255, 0.36);
  --text: #effbff;
  --muted: #9bb8c6;
}

:root[data-theme="inferno"] {
  --bg: #0d0405;
  --bg-2: #170808;
  --border: rgba(255, 71, 89, 0.25);
  --border-strong: rgba(255, 71, 89, 0.66);
  --neon: #ff4759;
  --neon-2: #ff835c;
  --neon-soft: rgba(255, 71, 89, 0.14);
  --neon-glow: 0 0 28px rgba(255, 71, 89, 0.36);
  --text: #fff2f2;
  --muted: #c49c9e;
}

:root[data-theme="gold"] {
  --bg: #0d0902;
  --bg-2: #171106;
  --border: rgba(255, 200, 87, 0.26);
  --border-strong: rgba(255, 200, 87, 0.7);
  --neon: #ffc857;
  --neon-2: #ffea9c;
  --neon-soft: rgba(255, 200, 87, 0.15);
  --neon-glow: 0 0 28px rgba(255, 200, 87, 0.32);
  --text: #fff8e7;
  --muted: #c5af7b;
}

:root[data-theme="cyber"] {
  --bg: #080512;
  --bg-2: #12091d;
  --border: rgba(191, 98, 255, 0.27);
  --border-strong: rgba(191, 98, 255, 0.7);
  --neon: #bf62ff;
  --neon-2: #ff5bd7;
  --neon-soft: rgba(191, 98, 255, 0.15);
  --neon-glow: 0 0 30px rgba(191, 98, 255, 0.36);
  --text: #fbf4ff;
  --muted: #bda5ce;
}

:root[data-theme="diamond"] {
  --bg: #06080b;
  --bg-2: #0d1118;
  --border: rgba(235, 247, 255, 0.28);
  --border-strong: rgba(235, 247, 255, 0.76);
  --neon: #edf8ff;
  --neon-2: #a6d8ff;
  --neon-soft: rgba(235, 247, 255, 0.12);
  --neon-glow: 0 0 28px rgba(235, 247, 255, 0.28);
  --text: #ffffff;
  --muted: #b7c3ce;
}

html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(circle at 22% 12%, color-mix(in srgb, var(--neon) 18%, transparent), transparent 26%),
    radial-gradient(circle at 78% 28%, rgba(255,255,255,0.035), transparent 28%),
    linear-gradient(180deg, rgba(1,4,6,0.98), var(--bg) 48%, #020305 100%);
  letter-spacing: 0;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 0 42%, rgba(0,0,0,0.48) 100%);
  z-index: 0;
}

button,
.button-link,
select,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
.button-link {
  border-color: color-mix(in srgb, var(--neon) 34%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--neon) 12%, transparent), rgba(255,255,255,0.015));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 22px rgba(0,0,0,0.22);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

button:hover,
.button-link:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: linear-gradient(180deg, color-mix(in srgb, var(--neon) 22%, transparent), rgba(255,255,255,0.025));
  box-shadow: var(--neon-glow), inset 0 1px 0 rgba(255,255,255,0.12);
}

button:active,
.button-link:active {
  transform: translateY(0) scale(0.99);
}

.login-screen {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.36), rgba(0,0,0,0.82)),
    radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--neon) 12%, transparent), transparent 36%),
    url('/trex-bg.svg') center/cover no-repeat,
    #020406;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 26px;
}

.login-panel {
  width: min(520px, calc(100vw - 34px));
  padding: clamp(26px, 4vw, 42px);
  border-radius: 32px;
  text-align: center;
  box-shadow: 0 34px 110px rgba(0,0,0,0.55), var(--neon-glow);
  animation: panelEntrance 520ms cubic-bezier(.2,.9,.2,1) both;
}

.login-logo {
  width: min(220px, 54vw);
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--neon) 42%, transparent));
}

.login-copy {
  color: var(--muted);
  line-height: 1.7;
  margin: 18px auto 24px;
  max-width: 34rem;
}

.login-actions,
.login-dev-actions,
.visual-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.visual-controls {
  margin-top: 14px;
}

.topbar-visual-controls {
  margin-top: 0;
  justify-content: flex-end;
}

.language-select {
  width: auto;
  min-width: 86px;
  height: 42px;
  padding: 8px 30px 8px 12px;
  border-radius: 10px;
  border-color: rgba(201, 169, 89, 0.38);
  background: rgba(8, 11, 8, 0.9);
  color: var(--text);
  font-family: var(--display);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.language-select:hover {
  border-color: rgba(201, 169, 89, 0.62);
  box-shadow: 0 0 18px rgba(201, 169, 89, 0.14);
}

.theme-picker {
  min-width: 180px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-picker select {
  height: 42px;
  padding: 8px 38px 8px 12px;
  border-radius: 14px;
  border-color: var(--border);
  background: rgba(4, 9, 12, 0.74);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.sound-toggle {
  min-height: 42px;
  white-space: nowrap;
}

.sound-toggle.sound-off {
  opacity: 0.72;
  border-color: rgba(255,255,255,0.12);
  color: var(--muted);
}

.app-shell,
.topbar,
.panel-shell,
.section-content,
.modal {
  position: relative;
  z-index: 1;
}

.app-shell::before {
  opacity: 0.075;
  mix-blend-mode: screen;
}

.topbar {
  background: rgba(2, 6, 9, 0.72);
  border-bottom: 1px solid color-mix(in srgb, var(--neon) 18%, transparent);
  box-shadow: 0 18px 54px rgba(0,0,0,0.32);
  backdrop-filter: blur(24px) saturate(142%);
}

.brand,
.top-pill,
.glass-panel,
.status-card,
.login-panel,
.modal-panel,
.map-sidebar-card,
.dino-status-card,
.stat-card {
  background: var(--glass-bg);
  border-color: color-mix(in srgb, var(--neon) 22%, transparent);
  box-shadow: var(--panel-shadow), var(--glass-highlight);
  backdrop-filter: blur(24px) saturate(136%);
}

.glass-panel,
.status-card,
.login-panel,
.modal-panel,
.map-sidebar-card,
.stat-card,
.side-panel {
  border-radius: var(--premium-radius);
}

.top-pill,
.status-item,
.cooldown-list > *,
.panel-metric,
.admin-card,
.form-card,
.skin-preset-card,
.mutation-card,
.cave-card,
.history-card {
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
  border-color: color-mix(in srgb, var(--neon) 13%, rgba(255,255,255,0.05));
}

.top-pill strong,
.card-title,
.status-item strong,
#pointsTop {
  text-shadow: 0 0 18px color-mix(in srgb, var(--neon) 28%, transparent);
}

#topServerStatus {
  position: relative;
}

#topServerStatus:not(:empty) {
  animation: onlinePulse 2.6s ease-in-out infinite;
}

.section-tabs {
  gap: 10px;
  padding: 0 2px 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab-button {
  position: relative;
  overflow: hidden;
  min-width: max-content;
  background: rgba(0,0,0,0.28);
}

.tab-button::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 8px;
  height: 2px;
  border-radius: 99px;
  background: var(--neon);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 180ms ease, transform 180ms ease;
  box-shadow: var(--neon-glow);
}

.tab-button.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.section-panel:not(.hidden) {
  animation: sectionFade 260ms ease both;
}

.side-panel,
.content-panel {
  animation: panelEntrance 460ms cubic-bezier(.2,.9,.2,1) both;
}

.dino-status-card .status-list.compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.cache-note,
.cache-age {
  color: var(--muted);
}

.bar {
  height: 13px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}

.bar i {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  transition: width 420ms cubic-bezier(.2,.9,.2,1), filter 260ms ease, background 260ms ease;
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--neon) 38%, transparent));
}

.bar.health i { background: linear-gradient(90deg, #ff3155, #ff6a8a); }
.bar.hunger i { background: linear-gradient(90deg, #ffb02e, #ffe07a); }
.bar.thirst i { background: linear-gradient(90deg, #2bbdff, #7ce9ff); }
.bar.stamina i { background: linear-gradient(90deg, #c25cff, #ff76dc); }
.bar.growth i { background: linear-gradient(90deg, #63e47a, #b3ff77); }
.bar.bleed i { background: linear-gradient(90deg, #d70a0a, #ff4747); }

.command-list-panel {
  align-content: start;
}

.command-list-button,
.neon-button {
  border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--neon) 18%, transparent), rgba(0,0,0,0.16));
  border-color: color-mix(in srgb, var(--neon) 44%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 16px 34px rgba(0,0,0,0.22);
}

.command-list-button:hover,
.neon-button:hover {
  transform: translateY(-2px) scale(1.01);
}

.danger-command,
button.danger,
.danger-button {
  border-color: rgba(255, 77, 77, 0.62) !important;
  background: linear-gradient(180deg, rgba(255, 77, 77, 0.18), rgba(60, 0, 0, 0.18)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 16px 34px rgba(255,0,0,0.08) !important;
}

.dashboard-action-note {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0;
  opacity: 0.9;
}

.cooldown-mini-card {
  min-height: 180px;
}

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

.cooldown-empty {
  color: var(--muted);
  text-align: center;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  background: rgba(0,0,0,0.2);
}

.gateway-map {
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--neon) 28%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035), 0 28px 80px rgba(0,0,0,0.32);
}

.teleport-marker {
  transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--neon) 38%, transparent));
}

.teleport-marker b {
  background: var(--neon);
  box-shadow: 0 0 16px color-mix(in srgb, var(--neon) 92%, transparent), 0 0 28px color-mix(in srgb, var(--neon) 45%, transparent);
  animation: markerPulse 2.2s ease-in-out infinite;
}

.teleport-marker:hover,
.teleport-marker.selected {
  transform: translate(-50%, -50%) scale(1.08);
}

.teleport-marker span {
  background: rgba(2, 5, 8, 0.78);
  border: 1px solid color-mix(in srgb, var(--neon) 36%, transparent);
  border-radius: 999px;
  padding: 4px 8px;
  backdrop-filter: blur(14px);
}

.filter-pill.active,
.filter-pill:hover {
  background: color-mix(in srgb, var(--neon) 19%, rgba(0,0,0,0.22));
  border-color: var(--border-strong);
  box-shadow: var(--neon-glow);
}

.modal:not(.hidden) .modal-panel {
  animation: modalPop 210ms cubic-bezier(.2,.9,.2,1) both;
}

.modal-panel {
  background: var(--glass-bg-strong);
  border-color: var(--border-strong);
}

.skin-preset-card,
.mutation-card,
.admin-card,
.cave-card,
.history-card,
.stat-card,
.map-sidebar-card {
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.skin-preset-card:hover,
.mutation-card:hover,
.admin-card:hover,
.cave-card:hover,
.history-card:hover,
.stat-card:hover,
.map-sidebar-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--panel-shadow), var(--neon-glow);
}

.loading,
.skeleton,
.cache-age:empty,
.cache-note:empty {
  background: linear-gradient(90deg, rgba(255,255,255,0.04), color-mix(in srgb, var(--neon) 11%, transparent), rgba(255,255,255,0.04));
  background-size: 240% 100%;
  animation: skeletonSweep 1.8s ease-in-out infinite;
}

@keyframes panelEntrance {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sectionFade {
  from { opacity: 0; transform: translateY(8px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes onlinePulse {
  0%, 100% { text-shadow: 0 0 10px color-mix(in srgb, var(--neon) 22%, transparent); }
  50% { text-shadow: 0 0 24px color-mix(in srgb, var(--neon) 68%, transparent); }
}

@keyframes markerPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 14px color-mix(in srgb, var(--neon) 80%, transparent); }
  50% { transform: scale(1.28); box-shadow: 0 0 30px color-mix(in srgb, var(--neon) 70%, transparent); }
}

@keyframes modalPop {
  from { opacity: 0; transform: translateY(10px) scale(0.965); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes skeletonSweep {
  0% { background-position: 180% 0; }
  100% { background-position: -80% 0; }
}

@media (max-width: 1180px) {
  .topbar {
    align-items: flex-start;
  }
  .topbar-actions {
    align-items: flex-end;
    flex-wrap: wrap;
  }
  .topbar-visual-controls {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .topbar {
    padding: 16px;
  }
  .panel-shell {
    padding: 16px;
  }
  .theme-picker {
    min-width: 150px;
  }
  .visual-controls {
    width: 100%;
  }
  .sound-toggle {
    flex: 1 1 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* === Valle de Titanes inspired visual restyle === */
:root {
  --bg: #0a0d09;
  --bg-2: #11170f;
  --panel: rgba(18, 22, 16, 0.88);
  --panel-solid: #11150f;
  --panel-2: #1b1e1a;
  --border: rgba(201, 169, 89, 0.24);
  --border-strong: rgba(227, 198, 125, 0.68);
  --text: #e6e1d3;
  --muted: #a9ad9f;
  --neon: #c9a959;
  --neon-2: #e3c67d;
  --neon-soft: rgba(201, 169, 89, 0.13);
  --neon-glow: 0 0 26px rgba(201, 169, 89, 0.26);
  --stone: #34372f;
  --stone-lit: #54574f;
  --moss: #46503c;
  --leaf: #7fd08a;
  --danger: #d9564a;
  --warning: #e3c67d;
  --blue: #c7ccd1;
  --accent: var(--neon);
  --accent-2: var(--neon-2);
  --accent-soft: var(--neon-soft);
  --accent-border: var(--border);
  --accent-border-strong: var(--border-strong);
  --accent-glow: var(--neon-glow);
  --glass-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, rgba(27, 30, 26, 0.86), rgba(9, 13, 9, 0.82));
  --glass-bg-strong:
    linear-gradient(180deg, rgba(227, 198, 125, 0.08), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, rgba(28, 31, 26, 0.96), rgba(8, 11, 8, 0.92));
  --glass-highlight: inset 0 1px 0 rgba(230, 225, 211, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.34);
  --panel-shadow: 0 22px 62px rgba(0, 0, 0, 0.46), 0 1px 0 rgba(230, 225, 211, 0.035);
  --premium-radius: 12px;
  --premium-radius-sm: 8px;
}

:root[data-theme="neon"],
:root[data-theme="gold"] {
  --bg: #0a0d09;
  --bg-2: #11170f;
  --border: rgba(201, 169, 89, 0.26);
  --border-strong: rgba(227, 198, 125, 0.7);
  --neon: #c9a959;
  --neon-2: #e3c67d;
  --neon-soft: rgba(201, 169, 89, 0.14);
  --neon-glow: 0 0 26px rgba(201, 169, 89, 0.28);
  --text: #e6e1d3;
  --muted: #a9ad9f;
}

:root[data-theme="ice"],
:root[data-theme="diamond"] {
  --bg: #0a0d09;
  --bg-2: #151a15;
  --border: rgba(199, 204, 209, 0.24);
  --border-strong: rgba(228, 232, 235, 0.62);
  --neon: #c7ccd1;
  --neon-2: #e4e8eb;
  --neon-soft: rgba(199, 204, 209, 0.12);
  --neon-glow: 0 0 24px rgba(199, 204, 209, 0.22);
  --text: #eef1f3;
  --muted: #a9ad9f;
}

:root[data-theme="inferno"] {
  --bg: #0d0907;
  --bg-2: #19120d;
  --border: rgba(217, 86, 74, 0.26);
  --border-strong: rgba(227, 122, 103, 0.68);
  --neon: #d9564a;
  --neon-2: #e3c67d;
  --neon-soft: rgba(217, 86, 74, 0.13);
  --neon-glow: 0 0 26px rgba(217, 86, 74, 0.24);
  --text: #eaded1;
  --muted: #b3a090;
}

:root[data-theme="cyber"] {
  --bg: #0b0e0a;
  --bg-2: #161b12;
  --border: rgba(127, 208, 138, 0.24);
  --border-strong: rgba(143, 214, 148, 0.62);
  --neon: #7fd08a;
  --neon-2: #e3c67d;
  --neon-soft: rgba(127, 208, 138, 0.12);
  --neon-glow: 0 0 24px rgba(127, 208, 138, 0.2);
  --text: #e6e1d3;
  --muted: #a9ad9f;
}

html,
body {
  background:
    linear-gradient(180deg, rgba(8, 10, 7, 0.44), rgba(8, 10, 7, 0.94)),
    radial-gradient(circle at 22% 10%, rgba(127, 208, 138, 0.11), transparent 30%),
    radial-gradient(circle at 78% 18%, rgba(201, 169, 89, 0.12), transparent 28%),
    linear-gradient(180deg, #0a0d09 0%, #12170f 46%, #070907 100%);
  color: var(--text);
}

body {
  letter-spacing: 0;
}

body::before {
  background:
    linear-gradient(90deg, rgba(230, 225, 211, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(230, 225, 211, 0.018) 1px, transparent 1px),
    radial-gradient(circle at center, transparent 0 46%, rgba(0, 0, 0, 0.58) 100%);
  background-size: 96px 96px, 96px 96px, auto;
  opacity: 0.72;
}

.app-shell::before {
  background:
    linear-gradient(180deg, rgba(10, 13, 9, 0.18), rgba(10, 13, 9, 0.86)),
    url('/trex-bg.svg') center 18%/cover no-repeat;
  opacity: 0.11;
  mix-blend-mode: soft-light;
}

.login-screen {
  background:
    linear-gradient(180deg, rgba(10, 13, 9, 0.18), rgba(7, 9, 7, 0.88)),
    radial-gradient(circle at 50% 14%, rgba(227, 198, 125, 0.18), transparent 34%),
    radial-gradient(circle at 18% 86%, rgba(70, 80, 60, 0.34), transparent 34%),
    url('/trex-bg.svg') center/cover no-repeat,
    #0a0d09;
}

.login-panel,
.topbar,
.brand,
.top-pill,
.glass-panel,
.status-card,
.player-info-card,
.dino-status-card,
.map-card,
.action-group,
.cave-panel,
.history-panel,
.support-panel,
.admin-panel,
.map-sidebar-card,
.modal-panel,
.stat-card {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--premium-radius);
  box-shadow: var(--panel-shadow), var(--glass-highlight);
  backdrop-filter: blur(18px) saturate(122%);
}

.topbar {
  background:
    linear-gradient(180deg, rgba(35, 38, 32, 0.9), rgba(10, 13, 9, 0.78));
  border-bottom-color: rgba(227, 198, 125, 0.22);
}

.brand {
  padding: 8px 12px;
}

.brand strong,
.login-brand-logo p,
.card-title,
.skin-title,
.effects-title,
.effects-section-title {
  color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8), 0 0 18px rgba(201, 169, 89, 0.18);
}

.brand small,
.top-pill span,
.status-item span,
.dashboard-summary span,
.action-card small,
.skin-card small,
.mutation-card small,
.support-card span,
.cooldown-item span,
.destination-block span,
.destination-block p,
.cache-note,
.cache-age,
.login-copy,
.dashboard-action-note,
.skin-subtitle,
.mutation-subtitle {
  color: var(--muted);
  letter-spacing: 0;
}

.card-title {
  border-bottom: 1px solid rgba(201, 169, 89, 0.18);
  padding-bottom: 10px;
  text-transform: none;
}

button,
.button-link,
.tab-button,
.filter-pill,
input,
textarea,
select {
  border-radius: var(--premium-radius-sm);
  letter-spacing: 0;
}

button,
.button-link {
  color: var(--text);
  border-color: rgba(201, 169, 89, 0.38);
  background:
    linear-gradient(180deg, rgba(227, 198, 125, 0.16), rgba(122, 95, 20, 0.12)),
    rgba(12, 16, 12, 0.74);
  box-shadow: inset 0 1px 0 rgba(230, 225, 211, 0.08), 0 10px 26px rgba(0, 0, 0, 0.28);
}

button:hover,
.button-link:hover,
.neon-button:hover,
.command-list-button:hover {
  border-color: var(--border-strong);
  background:
    linear-gradient(180deg, rgba(227, 198, 125, 0.24), rgba(122, 95, 20, 0.2)),
    rgba(18, 22, 16, 0.9);
  box-shadow: 0 0 28px rgba(201, 169, 89, 0.22), inset 0 1px 0 rgba(230, 225, 211, 0.12);
}

.neon-button,
.command-list-button {
  border-color: rgba(201, 169, 89, 0.52);
  background:
    linear-gradient(180deg, rgba(227, 198, 125, 0.2), rgba(107, 84, 38, 0.2)),
    linear-gradient(180deg, rgba(27, 30, 26, 0.92), rgba(10, 13, 9, 0.88));
}

.ghost,
.secondary,
.tab-button,
.filter-pill {
  background: rgba(12, 16, 12, 0.62);
  border-color: rgba(230, 225, 211, 0.13);
  color: var(--muted);
}

.tab-button.active,
.filter-pill.active {
  color: var(--text);
  border-color: rgba(227, 198, 125, 0.68);
  background:
    linear-gradient(180deg, rgba(201, 169, 89, 0.2), rgba(70, 80, 60, 0.22)),
    rgba(18, 22, 16, 0.86);
  box-shadow: inset 0 -2px 0 rgba(227, 198, 125, 0.78), 0 14px 32px rgba(0, 0, 0, 0.26);
}

.tab-button::after {
  background: var(--neon-2);
  box-shadow: 0 0 18px rgba(227, 198, 125, 0.32);
}

input,
textarea,
select,
.skin-toolbar input,
.skin-creator-topline input,
.skin-creator-topline select,
.skin-raw-editor,
.skin-hex-row input,
.skin-rgb-grid input {
  color: var(--text);
  border-color: rgba(230, 225, 211, 0.14);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(255, 255, 255, 0.02)),
    rgba(12, 16, 12, 0.82);
}

input:focus,
textarea:focus,
select:focus {
  outline: 1px solid rgba(227, 198, 125, 0.46);
  border-color: rgba(227, 198, 125, 0.58);
}

.status-item,
.dashboard-summary div,
.action-card,
.skin-card,
.mutation-card,
.support-card,
.admin-panel-card,
.cooldown-item,
.destination-block,
.skin-part-card,
.skin-preset-card,
.effects-actions-strip,
.cooldown-empty,
.tr,
.admin-output,
.dev-output {
  background:
    linear-gradient(180deg, rgba(84, 87, 79, 0.15), rgba(0, 0, 0, 0.16)),
    rgba(13, 16, 12, 0.74);
  border-color: rgba(230, 225, 211, 0.1);
  border-radius: var(--premium-radius-sm);
}

.status-item strong,
.dashboard-summary strong,
.action-card strong,
.skin-card strong,
.mutation-card strong,
.support-card strong,
.admin-panel-card strong,
.destination-block strong,
.top-pill strong,
#pointsTop {
  color: var(--text);
  text-shadow: 0 0 16px rgba(201, 169, 89, 0.16);
}

.site-logo {
  filter: drop-shadow(0 0 22px rgba(201, 169, 89, 0.28)) drop-shadow(0 10px 22px rgba(0, 0, 0, 0.5));
}

.login-logo {
  width: min(380px, 84vw);
}

.topbar-logo {
  width: 96px;
  height: 60px;
}

.theme-picker select {
  border-radius: var(--premium-radius-sm);
  background: rgba(12, 16, 12, 0.86);
}

.bar {
  background: rgba(230, 225, 211, 0.08);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.62);
}

.bar i {
  filter: drop-shadow(0 0 8px rgba(201, 169, 89, 0.22));
}

.bar.health i { background: linear-gradient(90deg, #7fd08a, #d8cf9a); }
.bar.hunger i { background: linear-gradient(90deg, #c9a959, #e3c67d); }
.bar.thirst i { background: linear-gradient(90deg, #6f767c, #c7ccd1); }
.bar.stamina i { background: linear-gradient(90deg, #46503c, #8fd694); }
.bar.growth i { background: linear-gradient(90deg, #7a5f14, #e0c46a); }
.bar.bleed i { background: linear-gradient(90deg, #8f2f28, #d9564a); }

.gateway-map {
  border-color: rgba(227, 198, 125, 0.34);
  background:
    linear-gradient(180deg, rgba(10, 13, 9, 0.12), rgba(10, 13, 9, 0.34)),
    #101410;
  box-shadow: inset 0 0 0 1px rgba(230, 225, 211, 0.05), inset 0 0 90px rgba(0, 0, 0, 0.36), 0 28px 78px rgba(0, 0, 0, 0.38);
}

.gateway-map::after {
  color: rgba(230, 225, 211, 0.22);
  letter-spacing: 0;
}

.teleport-marker {
  border-color: rgba(227, 198, 125, 0.62);
  background: rgba(10, 13, 9, 0.88);
  box-shadow: 0 0 20px rgba(201, 169, 89, 0.22);
}

.teleport-marker b {
  background: var(--leaf);
  box-shadow: 0 0 16px rgba(127, 208, 138, 0.84), 0 0 28px rgba(201, 169, 89, 0.24);
}

.teleport-marker span {
  background: rgba(10, 13, 9, 0.82);
  border-color: rgba(227, 198, 125, 0.42);
}

.skin-danger-accent,
.skin-toggle,
.skin-lock,
.effects-danger-button {
  border-color: rgba(217, 86, 74, 0.72) !important;
  color: #e1786b !important;
}

.skin-toggle.active,
.skin-danger-accent:hover,
.effects-danger-button:hover {
  background: rgba(217, 86, 74, 0.82) !important;
  color: #0a0d09 !important;
}

.status-banner,
.login-notice {
  background: rgba(20, 24, 15, 0.92);
  border-color: rgba(227, 198, 125, 0.42);
  color: var(--text);
  box-shadow: 0 0 30px rgba(201, 169, 89, 0.2);
}

.modal {
  background: rgba(5, 7, 5, 0.82);
}

.modal-panel {
  background: var(--glass-bg-strong);
}

@media (max-width: 820px) {
  .topbar,
  .panel-shell {
    padding: 14px;
  }

  .login-logo {
    width: min(320px, 82vw);
  }
}

/* === Valle typography, card scale and interaction pass === */
:root {
  --font-body: Inter, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  --font-title: Cinzel, "Palatino Linotype", Palatino, Georgia, serif;
  --font-control: "Bebas Neue", "Bahnschrift Condensed", "Arial Narrow", "Segoe UI", Arial, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, "Courier New", monospace;
  --card-radius: 8px;
  --card-pad: 20px;
  --control-h: 48px;
  --card-border: rgba(227, 198, 125, 0.26);
  --card-border-hover: rgba(227, 198, 125, 0.64);
  --slab-bg:
    linear-gradient(180deg, rgba(230, 225, 211, 0.055), rgba(230, 225, 211, 0.012) 34%, rgba(0, 0, 0, 0.16)),
    linear-gradient(135deg, rgba(52, 55, 47, 0.88), rgba(17, 20, 15, 0.88));
  --slab-bg-deep:
    linear-gradient(180deg, rgba(227, 198, 125, 0.08), rgba(0, 0, 0, 0.08) 42%, rgba(0, 0, 0, 0.24)),
    linear-gradient(135deg, rgba(35, 38, 31, 0.94), rgba(10, 13, 9, 0.94));
}

html,
body,
button,
input,
textarea,
select {
  font-family: var(--font-body);
}

body,
button,
.button-link,
.theme-picker,
.login-brand-logo p,
.card-title,
.tab-button {
  letter-spacing: 0;
}

.brand strong,
.login-brand-logo p,
.card-title,
.skin-title,
.effects-title,
.effects-section-title,
.modal-header strong,
.skin-loadout-header {
  font-family: var(--font-title);
  font-weight: 700;
}

.brand strong {
  font-size: 1.08rem;
}

.brand small {
  font-size: 0.82rem;
}

.login-brand-logo p {
  font-size: 1.03rem;
  text-transform: none;
}

.card-title {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 16px;
  font-size: 1.02rem;
  line-height: 1.2;
}

.skin-title,
.effects-title {
  font-size: 1.45rem;
  line-height: 1.15;
}

button,
.button-link,
.tab-button,
.filter-pill,
.command-list-button,
.neon-button,
.skin-toggle,
.skin-lock {
  min-height: var(--control-h);
  font-family: var(--font-control);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  border-radius: var(--card-radius);
}

input,
textarea,
select {
  min-height: 44px;
  border-radius: var(--card-radius);
}

.theme-picker {
  font-family: var(--font-control);
  font-size: 0.78rem;
}

.theme-picker select {
  font-family: var(--font-body);
  font-size: 0.92rem;
  text-transform: none;
}

.topbar {
  padding: 16px 22px;
}

.topbar-left,
.topbar-actions {
  gap: 12px;
}

.brand,
.top-pill {
  min-height: 64px;
}

.top-pill {
  min-width: 132px;
  justify-content: center;
  padding: 10px 14px;
}

.top-pill span {
  font-family: var(--font-control);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.top-pill strong {
  font-family: var(--font-title);
  font-size: 1.02rem;
}

.panel-shell {
  gap: 22px;
  padding-top: 22px;
}

.side-panel {
  gap: 14px;
}

.glass-panel,
.status-card,
.player-info-card,
.dino-status-card,
.map-card,
.action-group,
.cave-panel,
.history-panel,
.support-panel,
.admin-panel,
.map-sidebar-card,
.modal-panel,
.stat-card {
  position: relative;
  overflow: hidden;
  padding: var(--card-pad);
  border-radius: var(--card-radius);
  background: var(--slab-bg);
  border-color: var(--card-border);
}

.glass-panel::before,
.status-card::before,
.player-info-card::before,
.dino-status-card::before,
.map-card::before,
.action-group::before,
.cave-panel::before,
.history-panel::before,
.support-panel::before,
.admin-panel::before,
.map-sidebar-card::before,
.modal-panel::before,
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(230, 225, 211, 0.12), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.18)),
    linear-gradient(180deg, rgba(230, 225, 211, 0.08), transparent 22%, rgba(0, 0, 0, 0.12));
  opacity: 0.56;
}

.glass-panel > *,
.status-card > *,
.player-info-card > *,
.dino-status-card > *,
.map-card > *,
.action-group > *,
.cave-panel > *,
.history-panel > *,
.support-panel > *,
.admin-panel > *,
.map-sidebar-card > *,
.modal-panel > *,
.stat-card > * {
  position: relative;
  z-index: 1;
}

.stat-card,
.map-sidebar-card,
.support-card,
.admin-panel-card,
.mutation-card,
.skin-card,
.skin-preset-card,
.action-card,
.cooldown-item,
.status-item,
.destination-block {
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.stat-card:hover,
.map-sidebar-card:hover,
.support-card:hover,
.admin-panel-card:hover,
.mutation-card:hover,
.skin-card:hover,
.skin-preset-card:hover,
.action-card:hover,
.cooldown-item:hover,
.status-item:hover,
.destination-block:hover {
  transform: translateY(-3px);
  border-color: var(--card-border-hover);
  background: var(--slab-bg-deep);
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.46), 0 0 28px rgba(201, 169, 89, 0.18);
}

.status-item,
.dashboard-summary div,
.action-card,
.skin-card,
.mutation-card,
.support-card,
.admin-panel-card,
.cooldown-item,
.destination-block,
.skin-part-card,
.skin-preset-card,
.effects-actions-strip,
.cooldown-empty,
.tr {
  min-height: 76px;
  padding: 14px;
  border-radius: var(--card-radius);
}

.status-item {
  justify-content: center;
}

.dino-status-card {
  min-height: 520px;
}

.live-dino-preview-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  max-height: none;
  min-height: 0;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(201, 169, 89, 0.18);
  border-radius: var(--card-radius);
  background:
    radial-gradient(circle at 50% 20%, rgba(201, 169, 89, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(20, 27, 18, 0.92), rgba(5, 7, 6, 0.96));
  box-shadow: inset 0 1px 0 rgba(230, 225, 211, 0.06), 0 20px 54px rgba(0, 0, 0, 0.36);
}

.live-dino-preview-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(230, 225, 211, 0.12), transparent 20%, transparent 80%, rgba(0, 0, 0, 0.24)),
    radial-gradient(circle at 50% 82%, rgba(201, 169, 89, 0.16), transparent 38%);
  opacity: 0.72;
}

.live-dino-preview-card > * {
  position: relative;
  z-index: 1;
}

.live-dino-preview-head {
  display: none;
  gap: 3px;
  min-width: 0;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(201, 169, 89, 0.18);
}

.live-dino-preview-head span {
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.live-dino-preview-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-family: var(--title);
  font-size: 1.04rem;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-dino-preview-stage {
  position: relative;
  width: min(100%, 286px);
  aspect-ratio: 1 / 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 10px;
  background: radial-gradient(ellipse at 50% 76%, rgba(201, 169, 89, 0.18), transparent 46%);
}

.live-dino-preview-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.live-dino-preview-message {
  position: absolute;
  inset: auto 12px 12px;
  padding: 8px 9px;
  border: 1px solid rgba(201, 169, 89, 0.16);
  border-radius: 8px;
  background: rgba(4, 6, 5, 0.76);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
  text-align: center;
}

.live-dino-preview-message.hidden {
  display: none;
}

.dino-live-card {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 510px;
}

.dino-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(201, 169, 89, 0.18);
  padding-bottom: 8px;
}

.dino-live-head .card-title {
  margin: 0;
  border-bottom: 0;
  padding-bottom: 0;
}

.dino-live-chip {
  flex: 0 0 auto;
  padding: 5px 9px 4px;
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 89, 0.28);
  background: rgba(0, 0, 0, 0.24);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dino-live-chip.live {
  color: #8fd694;
  border-color: rgba(143, 214, 148, 0.44);
  background: rgba(143, 214, 148, 0.1);
}

.dino-live-chip.stale {
  color: var(--warning);
  border-color: rgba(227, 198, 125, 0.4);
  background: rgba(227, 198, 125, 0.1);
}

.dino-live-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(201, 169, 89, 0.16);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.dino-live-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.dino-live-main span,
.dino-live-main small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
}

.dino-live-main strong {
  color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.08rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-transform: none;
}

.dino-growth-ring {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background:
    conic-gradient(var(--neon-2) var(--growth), rgba(230, 225, 211, 0.12) 0),
    rgba(0, 0, 0, 0.26);
  box-shadow: inset 0 0 0 1px rgba(201, 169, 89, 0.16), 0 0 18px rgba(201, 169, 89, 0.12);
}

.dino-growth-ring-core {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  align-content: center;
  background: rgba(7, 9, 7, 0.94);
  border: 1px solid rgba(201, 169, 89, 0.2);
  text-align: center;
}

.dino-growth-ring-core strong {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1;
}

.dino-growth-ring-core span {
  color: var(--muted);
  font-size: 0.56rem;
  line-height: 1;
  margin-top: 4px;
  text-transform: uppercase;
}

.dino-live-card .bar-row {
  grid-template-columns: 1fr;
  gap: 4px;
}

.dino-live-card .cache-note {
  margin: 3px 0 0;
  font-size: 0.8rem;
}

.dino-live-card .cache-age {
  display: none;
}

.dino-live-card .bar-row label {
  width: 100%;
  color: var(--text);
}

.dino-live-card .bar {
  width: 100%;
  height: 12px;
  border: 1px solid rgba(230, 225, 211, 0.08);
  background: rgba(0, 0, 0, 0.3);
}

.dino-live-card .bar i {
  background: var(--neon-2);
}

.dino-live-card .bar.health i { background: #d9564a; }
.dino-live-card .bar.hunger i { background: #e3c67d; }
.dino-live-card .bar.thirst i { background: #5f96f7; }
.dino-live-card .bar.stamina i { background: #8fd694; }
.dino-live-card .bar.growth i { background: #c9a959; }
.dino-live-card .bar.bleed i { background: #e2564f; }
.dino-live-card .bar.fracture i { background: #54e3a3; }

.dino-live-card .optional-stat.hidden {
  display: none;
}

.dino-live-card .muted-stat {
  opacity: 0.54;
}

.dino-live-card .low-stat label span {
  color: var(--danger);
}

.dino-status-card .status-item {
  min-height: 72px;
}

.dino-status-card .bar-group {
  gap: 12px;
}

.bar-row label {
  min-height: 22px;
  font-size: 0.88rem;
}

.bar {
  height: 15px;
}

.dashboard-grid {
  gap: 18px;
}

.dashboard-main-panel,
.cooldown-mini-card {
  min-height: 260px;
}

.command-list-panel {
  gap: 10px;
}

.command-list-button {
  min-height: 54px;
  padding: 10px 12px;
}

.command-list-button span {
  font-size: 1rem;
}

.command-list-button .button-cost {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: none;
}

.section-tabs {
  gap: 8px;
  padding-bottom: 14px;
}

.tab-button {
  min-height: 50px;
  padding: 13px 18px;
  font-size: 0.96rem;
}

.tab-button::after {
  left: 12px;
  right: 12px;
  bottom: 7px;
}

.map-card .map-wrap {
  gap: 18px;
}

.gateway-map {
  border-radius: var(--card-radius);
  min-height: 680px;
}

.map-sidebar {
  gap: 14px;
}

.map-sidebar-card {
  min-height: 170px;
}

.destination-actions {
  gap: 10px;
}

.teleport-filters {
  gap: 9px;
}

.filter-pill {
  min-height: 44px;
  padding: 10px 12px;
  font-size: 0.86rem;
}

.teleport-marker {
  border-radius: var(--card-radius);
}

.teleport-marker span {
  border-radius: var(--card-radius);
  font-family: var(--font-control);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.support-panel .support-grid,
.admin-grid,
.mutation-catalog,
.mutation-loadouts,
.skin-preset-list {
  gap: 12px;
}

.support-card,
.admin-panel-card,
.mutation-card,
.skin-card {
  min-height: 178px;
}

.admin-panel-card button,
.support-card button,
.support-card .button-link,
.mutation-card button,
.skin-card button,
.action-card button {
  width: 100%;
}

.skin-creator-shell,
.mutation-builder-panel,
.effects-panel,
.cave-panel,
.support-panel,
.admin-panel {
  min-height: 260px;
}

.skin-toolbar,
.mutation-toolbar,
.skin-filter-row,
.skin-creator-topline,
.effects-actions-strip {
  gap: 10px;
}

.skin-part-card {
  min-height: 184px;
}

.skin-preset-card {
  min-height: 66px;
}

.admin-output,
.dev-output,
.skin-raw-editor {
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.login-panel {
  min-height: 440px;
  padding: 34px;
}

.login-actions .button-link,
.login-actions button {
  min-width: 190px;
}

.login-copy {
  font-size: 1rem;
}

button:active,
.button-link:active,
.tab-button:active,
.filter-pill:active,
.teleport-marker:active {
  transform: translateY(0) scale(0.985);
}

@media (max-width: 1120px) {
  .dino-status-card {
    min-height: auto;
  }

  .gateway-map {
    min-height: 560px;
  }
}

@media (max-width: 780px) {
  :root {
    --card-pad: 16px;
    --control-h: 46px;
  }

  .top-pill {
    min-width: 0;
    flex: 1 1 132px;
  }

  .command-list-button {
    min-height: 50px;
  }

  .gateway-map {
    min-height: 460px;
  }

  .login-actions .button-link,
  .login-actions button {
    min-width: 100%;
  }
}

/* === Topbar cleanup and uniform cards === */
.topbar {
  align-items: center;
}

.topbar-left {
  flex: 1 1 auto;
}

.topbar-actions {
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
}

.topbar-visual-controls {
  width: auto !important;
  margin-top: 0;
  justify-content: flex-end;
}

.login-visual-controls {
  justify-content: center;
}

.sound-toggle {
  min-width: 132px;
}

.brand,
.top-pill {
  height: 68px;
}

.top-pill {
  align-items: flex-start;
}

.dashboard-grid,
.quick-actions-grid,
.action-grid,
.skin-grid,
.mutation-grid,
.support-grid,
.admin-grid,
.skin-preset-list,
.mutation-loadouts,
.mutation-catalog,
.cooldown-list,
.active-cooldown-list {
  align-items: stretch;
}

.action-grid,
.skin-grid,
.mutation-grid,
.support-grid,
.admin-grid,
.skin-preset-list,
.mutation-loadouts,
.mutation-catalog {
  grid-auto-rows: 1fr;
}

.dashboard-grid > .stat-card,
.quick-actions-grid > *,
.action-card,
.skin-card,
.mutation-card,
.support-card,
.admin-panel-card,
.skin-preset-card,
.cooldown-item,
.destination-block,
.map-sidebar-card {
  height: 100%;
}

.action-card,
.skin-card,
.mutation-card,
.support-card,
.admin-panel-card,
.skin-preset-card,
.cooldown-item,
.destination-block {
  display: flex;
  flex-direction: column;
}

.action-card,
.skin-card,
.mutation-card,
.support-card,
.admin-panel-card {
  min-height: 188px;
}

.skin-preset-card {
  min-height: 76px;
}

.cooldown-item,
.destination-block,
.status-item {
  min-height: 82px;
}

.action-card strong,
.skin-card strong,
.mutation-card strong,
.support-card strong,
.admin-panel-card strong,
.destination-block strong {
  min-height: 24px;
}

.action-card small,
.skin-card small,
.mutation-card small,
.support-card span,
.admin-panel-card span,
.destination-block span,
.destination-block p {
  line-height: 1.45;
}

.action-card button,
.skin-card button,
.mutation-card button,
.support-card button,
.support-card .button-link,
.admin-panel-card button,
.destination-actions button {
  margin-top: auto;
}

.support-panel .support-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
}

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

.map-sidebar-card {
  display: flex;
  flex-direction: column;
}

.destination-block {
  flex: 1 1 auto;
}

.destination-actions {
  margin-top: 12px;
}

.table,
.tr {
  width: 100%;
}

@media (max-width: 1180px) {
  .topbar {
    align-items: stretch;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 780px) {
  .brand,
  .top-pill {
    height: auto;
    min-height: 64px;
  }

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

  .topbar-actions > button,
  .topbar-visual-controls,
  .sound-toggle {
    flex: 1 1 auto;
  }
}

/* Keep navigation/cards from clipping when hovered inside tight rows. */
.section-tabs {
  padding-top: 6px;
}

.section-tabs .tab-button:hover,
.section-tabs .tab-button.active:hover,
.skin-toolbar button:hover,
.skin-filter-row button:hover {
  transform: none;
}

.section-tabs .tab-button,
.skin-toolbar button,
.skin-filter-row button {
  will-change: auto;
}

.skin-creator-shell,
.mutation-builder-panel,
.admin-panel,
.support-panel,
.cave-panel,
.map-card {
  overflow: visible;
}

/* === Sound icon, logout danger state and non-blocking toast === */
.sound-toggle {
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.22rem;
  line-height: 1;
}

.sound-toggle.sound-off {
  opacity: 0.82;
  filter: grayscale(0.35);
}

#logoutBtn {
  border-color: rgba(217, 86, 74, 0.38);
}

#logoutBtn:hover,
#logoutBtn:focus-visible {
  color: #fff2ed;
  border-color: rgba(217, 86, 74, 0.82);
  background:
    linear-gradient(180deg, rgba(217, 86, 74, 0.34), rgba(90, 20, 16, 0.44)),
    rgba(31, 10, 8, 0.94);
  box-shadow: 0 0 26px rgba(217, 86, 74, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#logoutBtn:active {
  background:
    linear-gradient(180deg, rgba(217, 86, 74, 0.54), rgba(90, 20, 16, 0.58)),
    rgba(31, 10, 8, 0.98);
}

.status-banner {
  left: auto;
  right: 18px;
  bottom: 18px;
  transform: none;
  max-width: min(360px, calc(100vw - 36px));
  padding: 10px 14px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0.94;
  font-size: 0.86rem;
}

@media (max-width: 780px) {
  .sound-toggle {
    flex: 0 0 48px;
    min-width: 48px;
  }

  .status-banner {
    right: 10px;
    bottom: 10px;
    max-width: calc(100vw - 20px);
  }
}

/* === Valle de Titanes asset pass === */
.login-screen {
  background:
    linear-gradient(90deg, rgba(5, 7, 5, 0.72), rgba(5, 7, 5, 0.2) 42%, rgba(5, 7, 5, 0.76)),
    linear-gradient(180deg, rgba(5, 7, 5, 0.08), rgba(5, 7, 5, 0.78)),
    url('/trex-bg.jpeg?v=valle-assets-1') center center/cover no-repeat,
    #0a0d09;
}

.app-shell::before {
  background:
    linear-gradient(180deg, rgba(10, 13, 9, 0.5), rgba(10, 13, 9, 0.9)),
    url('/trex-bg.jpeg?v=valle-assets-1') center top/cover no-repeat;
  opacity: 0.18;
  mix-blend-mode: normal;
}

.login-panel {
  background:
    linear-gradient(180deg, rgba(230, 225, 211, 0.045), rgba(0, 0, 0, 0.18)),
    rgba(10, 13, 9, 0.68);
  border-color: rgba(227, 198, 125, 0.34);
}

.login-logo {
  width: min(300px, 70vw);
  filter: drop-shadow(0 0 26px rgba(227, 198, 125, 0.2)) drop-shadow(0 16px 26px rgba(0, 0, 0, 0.74));
}

.topbar-logo {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  object-fit: contain;
}

.brand {
  min-width: 280px;
}

.brand strong {
  font-size: 1.2rem;
}

@media (max-width: 780px) {
  .login-screen {
    background-position: center top;
  }

  .login-logo {
    width: min(240px, 66vw);
  }

  .topbar-logo {
    width: 62px;
    height: 62px;
  }

  .brand {
    min-width: 0;
  }
}

/* === Updated Gateway map layout === */
.teleport-map-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1024px) 320px;
  gap: 18px;
  align-items: start;
  justify-content: center;
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
}

.gateway-map {
  position: relative;
  width: 100%;
  max-width: 1024px;
  aspect-ratio: 1 / 1;
  min-height: 0;
  height: auto;
  max-height: none;
  background: #04070a;
}

.gateway-map-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  transition: opacity 0.18s ease, filter 0.18s ease;
}

.teleport-map-wrap .gateway-map::before,
.teleport-map-wrap .gateway-map::after {
  display: none;
}

body.teleport-section-active .content-panel {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 0;
}

body.teleport-section-active .side-panel {
  align-self: start;
}

#teleportSection {
  padding: 0;
}

.teleport-map-wrap .gateway-map {
  overflow: visible;
}

.teleport-map-wrap .teleport-marker {
  position: absolute;
  z-index: 20;
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  max-height: 30px;
  aspect-ratio: 1 / 1;
  max-width: none;
  padding: 0;
  box-sizing: border-box;
  border-radius: 50%;
  display: grid;
  align-items: center;
  justify-content: center;
  place-items: center;
  border: 2px solid rgba(255, 208, 196, 0.88);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 228, 220, 0.55), transparent 28%),
    linear-gradient(145deg, #d43b2f, #7f1210);
  color: #fff5ef;
  box-shadow: 0 0 0 2px rgba(61, 9, 8, 0.82), 0 0 18px rgba(205, 45, 35, 0.52);
  transform: translate(-50%, -50%);
  overflow: visible;
}

.map-options-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  gap: 4px;
  width: 100%;
  min-height: 0;
  height: 325px;
  max-height: 325px;
  overflow-y: auto;
  padding: 12px 13px;
  border-color: rgba(255, 72, 64, 0.88);
  border-radius: 8px;
  background: rgba(10, 12, 15, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 72, 64, 0.08), 0 16px 34px rgba(0, 0, 0, 0.34);
}

.map-options-card:hover {
  transform: none;
}

.map-options-card::before {
  display: none;
}

.map-options-card > * {
  position: relative;
  z-index: 1;
}

.map-options-title {
  width: 100%;
  margin: 0 0 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(255, 72, 64, 0.42);
  color: rgba(246, 238, 226, 0.96);
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

.map-options-card label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 23px;
  color: rgba(246, 238, 226, 0.94);
  font-family: var(--font-control);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: left;
  border-radius: 6px;
  padding: 2px 5px;
  transition: background 140ms ease, color 140ms ease;
}

.map-options-card label:hover {
  background: rgba(255, 72, 64, 0.12);
  color: #fff4ef;
}

.map-options-card input[type="checkbox"] {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  accent-color: #ff5a52;
  margin: 0;
}

.map-options-card input[type="checkbox"]:focus,
.map-options-card input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: none;
}

.map-options-card label:focus-within {
  background: transparent;
}

.admin-locked {
  opacity: 0.62;
}

.gateway-overlays,
.gateway-layer-svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gateway-overlays {
  z-index: 6;
}

.gateway-layer-svg {
  z-index: 7;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.gateway-zone-circle,
.gateway-layer-point,
.gateway-player-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.gateway-zone-circle {
  border-radius: 50%;
  opacity: 0.78;
  mix-blend-mode: screen;
}

.gateway-zone-poly {
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  opacity: 0.72;
}

.migration-zone {
  border: 1px solid rgba(255, 180, 80, 0.8);
  background: radial-gradient(circle, rgba(255, 160, 54, 0.25), rgba(255, 76, 54, 0.05) 58%, transparent 72%);
  filter: drop-shadow(0 0 10px rgba(255, 126, 46, 0.36));
  fill: rgba(255, 150, 52, 0.18);
  stroke: rgba(255, 181, 83, 0.78);
}

.patrol-zone {
  border: 1px solid rgba(91, 160, 255, 0.75);
  background: radial-gradient(circle, rgba(78, 141, 255, 0.18), rgba(38, 89, 180, 0.05) 58%, transparent 72%);
  filter: drop-shadow(0 0 9px rgba(83, 140, 255, 0.32));
  fill: rgba(72, 130, 250, 0.14);
  stroke: rgba(100, 170, 255, 0.76);
}

.sanctuary-point,
.gateway-layer-point.sanctuary-point {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(217, 255, 194, 0.86);
  background: radial-gradient(circle, #9df06e 0 26%, rgba(85, 171, 67, 0.26) 27% 100%);
  box-shadow: 0 0 14px rgba(125, 245, 92, 0.52);
}

.arena-zone {
  border: 1px solid rgba(255, 230, 150, 0.78);
  background: radial-gradient(circle, rgba(255, 215, 105, 0.2), rgba(255, 115, 52, 0.05) 58%, transparent 72%);
  filter: drop-shadow(0 0 9px rgba(255, 190, 78, 0.34));
}

.heat-zone {
  border: 0;
  background:
    radial-gradient(circle,
      rgba(255, 246, 194, var(--heat-core, 0.58)) 0 9%,
      rgba(255, 90, 70, var(--heat-alpha, 0.46)) 28%,
      rgba(184, 50, 255, var(--heat-glow, 0.3)) 49%,
      transparent 74%);
  filter: blur(2px) drop-shadow(0 0 16px rgba(255, 68, 82, var(--heat-glow, 0.34)));
  mix-blend-mode: screen;
  opacity: 0.88;
}

.gateway-player-marker {
  z-index: 18;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: #53e7ff;
  color: #061014;
  display: grid;
  place-items: center;
  font-family: var(--font-control);
  font-size: 0.64rem;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(83, 231, 255, 0.58);
}

.gateway-player-marker.following {
  outline: 2px solid rgba(83, 231, 255, 0.26);
  outline-offset: 4px;
}

.gateway-player-marker::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -13px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 12px solid #fff3a8;
  filter: drop-shadow(0 0 4px rgba(255, 220, 103, 0.85));
  transform: translateX(-50%) rotate(var(--player-yaw, 0deg));
  transform-origin: 50% 23px;
}

.teleport-map-wrap .teleport-marker b {
  display: none;
}

.teleport-map-wrap .teleport-marker span,
.teleport-map-wrap .teleport-marker .tp-dot-label {
  position: static;
  display: block;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  transform: none;
  backdrop-filter: none;
  font-family: var(--font-control);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

.teleport-map-wrap .teleport-marker:hover,
.teleport-map-wrap .teleport-marker.selected {
  transform: translate(-50%, -50%) scale(1.12);
  border-color: rgba(255, 239, 224, 0.98);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 242, 230, 0.75), transparent 30%),
    linear-gradient(145deg, #f04a39, #9e1713);
  box-shadow: 0 0 0 3px rgba(72, 11, 10, 0.88), 0 0 26px rgba(240, 74, 57, 0.72);
}

.teleport-map-wrap .teleport-marker:active {
  transform: translate(-50%, -50%) scale(1.04);
}

.teleport-selection-card.hidden {
  display: none;
}

.teleport-selection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.teleport-selection-head strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.teleport-selection-close {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 90, 78, 0.48);
  background: rgba(122, 18, 16, 0.74);
  color: #fff5ef;
  font-weight: 900;
  line-height: 1;
}

.teleport-selection-close:hover {
  background: rgba(190, 34, 28, 0.95);
  border-color: rgba(255, 214, 201, 0.88);
}

.teleport-point-popup {
  position: absolute;
  z-index: 30;
  width: min(246px, 72vw);
  transform: translate(-50%, calc(-100% - 18px));
  border: 1px solid rgba(255, 78, 70, 0.86);
  border-radius: 12px;
  background: rgba(10, 14, 22, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.52), 0 0 24px rgba(215, 52, 48, 0.22);
  color: var(--text);
  overflow: visible;
}

.teleport-point-popup::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 14px;
  height: 14px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(10, 14, 22, 0.96);
  border-right: 1px solid rgba(255, 78, 70, 0.86);
  border-bottom: 1px solid rgba(255, 78, 70, 0.86);
}

.teleport-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255, 78, 70, 0.58);
}

.teleport-popup-head strong {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--text);
}

.teleport-popup-close {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(246, 238, 226, 0.88);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.teleport-popup-close:hover {
  background: rgba(255, 78, 70, 0.18);
  color: #fff5ef;
}

.teleport-popup-action {
  display: block;
  width: fit-content;
  min-height: 0;
  margin: 12px auto 14px;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: #ff5a52;
  color: #0b0e12;
  font-weight: 900;
  line-height: 1.1;
  box-shadow: none;
}

.teleport-popup-action:hover {
  background: #ff746d;
}

@media (max-width: 1120px) {
  .teleport-map-wrap {
    grid-template-columns: 1fr;
  }

  .map-sidebar {
    max-width: 1024px;
    width: 100%;
    margin: 0 auto;
  }

  .gateway-map {
    width: min(100%, 1024px);
  }
}

@media (max-width: 780px) {
  .gateway-map {
    width: 100%;
  }
}

/* Valle global visual pass */
.glass-panel,
.stat-card,
.action-card,
.cooldown-mini-card,
.destination-block,
.map-options-card,
.skin-creator-shell,
.skin-creator-panel,
.skin-ctl-block,
.mutation-builder-panel,
.cave-panel,
.support-card,
.admin-panel-card,
.modal-card {
  border-radius: 10px;
  border-color: rgba(230, 225, 211, 0.12);
  background:
    linear-gradient(180deg, rgba(34, 48, 31, 0.74), rgba(11, 14, 10, 0.90)),
    radial-gradient(circle at 18% 0%, rgba(201, 169, 89, 0.10), transparent 36%);
  box-shadow: inset 0 1px 0 rgba(230, 225, 211, 0.05), 0 24px 70px rgba(0, 0, 0, 0.34);
}
.glass-panel:hover,
.stat-card:hover,
.action-card:hover,
.destination-block:hover,
.skin-ctl-block:hover,
.support-card:hover,
.admin-panel-card:hover {
  border-color: rgba(201, 169, 89, 0.32);
}
.card-title,
.skin-title,
.effects-title,
.mutation-title,
.section-panel h2,
.login-copy h1,
.brand strong {
  font-family: var(--title);
  letter-spacing: 0.02em;
  color: var(--steel-hot);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.86), 0 0 18px rgba(201, 169, 89, 0.14);
}
.brand span,
.status-item span,
.stat-row label,
.skin-ctl-head h3,
.skin-deck-field span,
.skin-rail-cell > span,
.effects-section-title,
.map-sidebar-card h3 {
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tab-button,
.filter-pill,
.neon-button,
.ghost,
.secondary,
.primary,
.button-link,
.command-list-button,
.skin-toggle,
.skin-danger-accent,
.teleport-popup-action,
.teleport-popup-close,
.skin-viewer-segment button,
.skin-species-grid button,
.skin-glitch-card,
.skin-preset-card {
  font-family: var(--display);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 8px;
}
.neon-button,
.primary,
.button-link.primary,
.tab-button.active,
.filter-pill.active,
.skin-toggle.active,
.skin-viewer-segment button.active {
  border-color: rgba(201, 169, 89, 0.72);
  color: #14180f !important;
  background: linear-gradient(180deg, #e3c67d, #c9a959 58%, #6b5426) !important;
  box-shadow: 0 0 22px rgba(201, 169, 89, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.ghost,
.secondary,
.tab-button,
.filter-pill,
.skin-danger-accent,
.skin-toggle,
.skin-viewer-segment button,
.skin-species-grid button,
.skin-glitch-card,
.skin-preset-card {
  border-color: rgba(230, 225, 211, 0.13) !important;
  color: rgba(230, 225, 211, 0.78) !important;
  background: rgba(8, 11, 8, 0.58) !important;
}
.ghost:hover,
.secondary:hover,
.tab-button:hover,
.filter-pill:hover,
.skin-danger-accent:hover,
.skin-toggle:hover,
.skin-viewer-segment button:hover,
.skin-species-grid button:hover,
.skin-glitch-card:hover,
.skin-preset-card:hover {
  border-color: rgba(201, 169, 89, 0.48) !important;
  color: #e6e1d3 !important;
  background: rgba(201, 169, 89, 0.10) !important;
  box-shadow: 0 0 18px rgba(201, 169, 89, 0.16);
}
.danger-command,
#logoutBtn,
#deleteSkinBtn:hover,
.teleport-selection-close:hover,
.teleport-popup-close:hover {
  border-color: rgba(217, 86, 74, 0.70) !important;
}
.danger-command:hover,
#logoutBtn:hover,
#deleteSkinBtn:hover {
  color: #ffd3cf !important;
  background: rgba(217, 86, 74, 0.16) !important;
  box-shadow: 0 0 20px rgba(217, 86, 74, 0.22) !important;
}
.topbar {
  background: rgba(11, 14, 10, 0.92);
  border-bottom-color: rgba(230, 225, 211, 0.10);
}
.brand-mark {
  border-radius: 50%;
  background: radial-gradient(circle at 34% 24%, rgba(201, 169, 89, 0.30), rgba(11, 14, 10, 0.92) 68%);
  border-color: rgba(201, 169, 89, 0.42);
  color: var(--gold-hot);
  box-shadow: 0 0 20px rgba(201, 169, 89, 0.24);
}
.app-shell::before {
  opacity: 0.11;
  filter: saturate(0.92) contrast(1.04);
}
.bar-fill,
.stat-fill,
.cooldown-fill,
.progress-fill {
  background: linear-gradient(90deg, #8fd694, #c9a959);
}
input[type="range"],
input[type="checkbox"] {
  accent-color: #d9564a;
}
button:focus,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
label:focus-within {
  outline: none;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: rgba(201, 169, 89, 0.48) !important;
}
.skin-studio-main {
  position: static !important;
  max-height: none !important;
  overflow: visible !important;
  scrollbar-width: auto !important;
}
.skin-studio-main::-webkit-scrollbar {
  width: initial;
}
.skin-studio-grid {
  align-items: start;
}
.skin-studio-shell .skin-viewer-stage,
.skin-studio-shell .skin-viewer-stage canvas {
  touch-action: pan-y pinch-zoom;
}

/* Readability pass */
body {
  font-size: 15.5px;
}
.card-title,
.skin-title,
.effects-title,
.mutation-title,
.section-panel h2,
.login-copy h1 {
  font-size: clamp(1.28rem, 1.7vw, 1.72rem);
  line-height: 1.18;
}
.brand strong {
  font-size: 1.08rem;
}
.brand span,
.status-item span,
.stat-row label,
.skin-ctl-head h3,
.skin-deck-field span,
.skin-rail-cell > span,
.effects-section-title,
.map-sidebar-card h3 {
  letter-spacing: 0.045em;
}
.tab-button,
.filter-pill,
.neon-button,
.ghost,
.secondary,
.primary,
.button-link,
.command-list-button,
.skin-toggle,
.skin-danger-accent,
.teleport-popup-action,
.teleport-popup-close,
.skin-viewer-segment button,
.skin-species-grid button,
.skin-glitch-card,
.skin-preset-card {
  letter-spacing: 0.035em;
  font-size: 1rem;
}
.tab-button,
.filter-pill {
  font-size: 1.04rem;
}
.command-list-button {
  min-height: 52px;
  font-size: 1.12rem;
}
.command-list-button span {
  font-size: 1.12rem;
}
.button-cost {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0;
}
.status-item span,
.status-item strong,
.stat-row label,
.stat-row span,
.map-point-meta span,
.teleport-selection-meta span,
.skin-viewer-readout b,
.skin-viewer-readout i {
  font-size: 0.9rem;
}
.skin-ctl-head h3 {
  font-size: 1.05rem;
}
.skin-ctl-head span {
  font-size: 0.92rem;
}
.skin-deck-field,
.skin-rail-cell > span,
.skin-stage-rail .skin-viewer-field span,
.skin-stage-rail .skin-viewer-check span {
  font-size: 0.82rem;
}
.skin-deck-field input,
.skin-deck-field select,
.skin-ctl-head input,
.skin-viewer-field select {
  font-size: 0.95rem;
}
.skin-species-grid button {
  min-height: 32px;
  font-size: 0.86rem;
}
.skin-part-dot strong {
  max-width: 54px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0;
}
.skin-tuning-row {
  font-size: 0.84rem;
}
.skin-glitch-card .g-name {
  font-size: 0.92rem;
}
.skin-glitch-card small {
  font-size: 0.78rem;
}
.skin-preset-card {
  font-size: 0.95rem;
}
.skin-viewer-readout span {
  min-width: 96px;
}
.skin-viewer-readout i {
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
@media (max-width: 760px) {
  body {
    font-size: 15px;
  }
  .tab-button,
  .filter-pill,
  .neon-button,
  .ghost,
  .secondary,
  .primary,
  .button-link,
  .command-list-button,
  .skin-toggle,
  .skin-danger-accent,
  .skin-viewer-segment button,
  .skin-species-grid button {
    font-size: 0.96rem;
  }
  .skin-part-dot strong {
    font-size: 0.62rem;
  }
}

/* Skin editor label fix */
.skin-studio-side .skin-parts-grid {
  grid-template-columns: repeat(4, minmax(54px, 1fr));
  gap: 10px 8px;
}
.skin-studio-side .skin-part-card.skin-part-dot {
  min-height: 62px;
  gap: 5px;
}
.skin-part-dot .skin-color-preview {
  width: 32px;
  height: 32px;
}
.skin-part-dot strong {
  max-width: 68px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  font-size: 0.72rem;
  line-height: 1.1;
}
.skin-species-grid button,
.skin-glitch-card .g-name,
.skin-preset-card strong {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: 0.01em;
}
.skin-deck-actions button,
.effects-actions-strip button,
.skin-stage-rail button,
#refreshSkinsBtn {
  min-height: 34px;
  font-size: 1rem;
}
.skin-deck-actions {
  align-items: center;
}
.skin-viewer-readout b {
  font-family: var(--sans);
  font-weight: 800;
}
.skin-stage-rail .skin-viewer-field span,
.skin-stage-rail .skin-viewer-check span,
.skin-rail-cell > span,
.skin-deck-field span {
  color: rgba(230, 225, 211, 0.78);
  font-size: 0.9rem;
}
.skin-species-grid button {
  font-size: 0.94rem;
}
.skin-part-dot strong {
  font-size: 0.76rem;
}
.skin-deck-actions button {
  padding-left: 12px;
  padding-right: 12px;
}
.skin-species-grid {
  max-height: 178px;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 169, 89, 0.54) rgba(8, 11, 8, 0.54);
}
.skin-species-grid::-webkit-scrollbar {
  width: 7px;
  height: 0;
}
.skin-species-grid::-webkit-scrollbar-track {
  background: rgba(8, 11, 8, 0.54);
  border-radius: 999px;
}
.skin-species-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(227, 198, 125, 0.82), rgba(107, 84, 38, 0.88));
  border: 2px solid rgba(8, 11, 8, 0.84);
  border-radius: 999px;
}
.skin-species-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #e3c67d, #c9a959);
}
.skin-studio-side {
  overflow: visible !important;
}
.admin-panel-card select {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(226, 68, 70, 0.42);
  border-radius: 7px;
  background: rgba(8, 10, 10, 0.84);
  color: var(--text);
  font: 700 0.92rem var(--sans);
}
@media (max-width: 760px) {
  .skin-studio-side .skin-parts-grid {
    grid-template-columns: repeat(4, minmax(48px, 1fr));
  }
  .skin-part-dot strong {
    max-width: 62px;
    font-size: 0.72rem;
  }
}

.admin-output.dashboard-output,
.admin-output.cave-output {
  min-height: 72px;
  max-height: 170px;
  margin-top: 10px;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.76rem;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow: auto;
}

@media (min-width: 1121px) {
  body.teleport-section-active .panel-shell > .side-panel {
    min-height: var(--live-side-target-height, auto);
  }

  body.teleport-section-active .dino-live-card {
    flex: 1 1 auto;
    height: auto;
    min-height: 462px;
    max-height: none;
    overflow: visible;
  }

  body.teleport-section-active .dino-live-card .bar-group {
    gap: 8px;
  }

  body.teleport-section-active .dino-live-card .bar-row {
    gap: 3px;
  }

  body.teleport-section-active .dino-live-card .bar-row label {
    min-height: 18px;
  }

  body.teleport-section-active .dino-live-card .bar {
    height: 10px;
  }
}
