:root {
  color-scheme: dark;
  --bg: #0d1015;
  --bg-deep: #090b0f;
  --surface: #151920;
  --surface-2: #1b2028;
  --surface-3: #202630;
  --surface-hover: #252c36;
  --border: #303944;
  --border-strong: #44505f;
  --text: #f5f8fb;
  --muted: #9ba8b7;
  --muted-2: #748293;
  --cyan: #4cc9f0;
  --cyan-strong: #75dcfb;
  --green: #2cb67d;
  --green-soft: #6ed6a9;
  --amber: #f4bd50;
  --red: #ef6576;
  --violet: #a68af5;
  --blue: #639bff;
  --topbar-height: 68px;
  --sidebar-width: 276px;
  --shadow: 0 18px 45px rgba(0, 0, 0, .28);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, .2);
  --radius: 8px;
  --radius-small: 6px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg-deep);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(76, 201, 240, .025), transparent 260px),
    var(--bg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 32px 32px;
}

body.sidebar-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
label,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
strong {
  letter-spacing: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 32px;
  line-height: 1.16;
}

h2 {
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.25;
}

h3 {
  margin-bottom: 7px;
  font-size: 15px;
}

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

hr {
  height: 1px;
  margin: 22px 0;
  border: 0;
  background: var(--border);
}

::selection {
  color: #061014;
  background: var(--cyan);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .02);
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 8px;
  background: #3d4652;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: #566273;
  background-clip: padding-box;
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text);
  background: #0b0e13;
  transition: opacity .32s ease, visibility .32s ease;
}

.boot-screen.ready {
  visibility: hidden;
  opacity: 0;
}

.boot-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 4px;
  border: 1px solid rgba(76, 201, 240, .45);
  border-radius: var(--radius);
  color: #071117;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 14px 34px rgba(76, 201, 240, .15);
  font-size: 22px;
}

.boot-screen strong {
  font-size: 17px;
}

.boot-screen > span {
  color: var(--muted);
  font-size: 12px;
}

.boot-track {
  width: min(280px, 70vw);
  height: 3px;
  margin-top: 9px;
  overflow: hidden;
  background: #202731;
}

.boot-track span {
  display: block;
  width: 36%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  animation: boot-slide 1.1s ease-in-out infinite;
}

@keyframes boot-slide {
  from { transform: translateX(-110%); }
  to { transform: translateX(390%); }
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 16, 21, .94);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .22);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  min-width: 242px;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid rgba(76, 201, 240, .42);
  border-radius: var(--radius);
  color: #071116;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 8px 22px rgba(76, 201, 240, .14);
}

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

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

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

.brand-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.project-name-control {
  position: relative;
  width: min(410px, 35vw);
}

.project-name-control span {
  position: absolute;
  top: 5px;
  left: 11px;
  z-index: 1;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-name-control input {
  width: 100%;
  height: 44px;
  padding: 17px 11px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  outline: 0;
  color: var(--text);
  background: var(--surface);
  font-weight: 700;
}

.project-name-control input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(76, 201, 240, .1);
}

.top-status {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.status-light {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--muted-2);
}

.top-status[data-tone="ready"] .status-light {
  background: var(--green);
  box-shadow: 0 0 10px rgba(44, 182, 125, .55);
}

.top-status[data-tone="busy"] .status-light {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(244, 189, 80, .45);
}

.top-status[data-tone="error"] .status-light {
  background: var(--red);
  box-shadow: 0 0 10px rgba(239, 101, 118, .45);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.button,
.icon-button,
.text-button,
.sidebar-link,
.workspace-nav-item,
.segmented-control button,
.tab-strip button,
.filter-chips button,
.file-filters button,
.preset-row button,
.vehicle-family-grid button,
.export-option-grid button,
.roadmap-list button {
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease, opacity .16s ease;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
  color: var(--text);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.button:hover,
.icon-button:hover {
  border-color: var(--cyan);
  background: var(--surface-hover);
}

.button:active,
.icon-button:active,
.roadmap-list button:active,
.export-option-grid button:active {
  transform: translateY(1px);
}

.button:disabled,
.icon-button:disabled,
.export-option-grid button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.button-primary {
  border-color: transparent;
  color: #061116;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 10px 26px rgba(76, 201, 240, .12);
}

.button-primary:hover {
  border-color: transparent;
  color: #020608;
  background: linear-gradient(135deg, var(--cyan-strong), var(--green-soft));
}

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

.button-danger {
  border-color: rgba(239, 101, 118, .42);
  color: #ffd9df;
  background: rgba(239, 101, 118, .1);
}

.button-danger:hover {
  border-color: var(--red);
  background: rgba(239, 101, 118, .18);
}

.button.compact {
  min-height: 36px;
  padding: 7px 11px;
}

.button.large {
  min-height: 48px;
  padding-inline: 20px;
  font-size: 13px;
}

.button.full-width {
  width: 100%;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  color: var(--text);
  background: var(--surface);
}

.icon-button.small {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.icon-button.active {
  border-color: rgba(76, 201, 240, .55);
  color: var(--cyan);
  background: rgba(76, 201, 240, .1);
}

.mobile-nav-button {
  display: none;
}

.text-button {
  padding: 3px 0;
  border: 0;
  color: var(--cyan);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

.text-button:hover {
  color: var(--cyan-strong);
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input,
.drop-zone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.app-layout {
  display: grid;
  min-height: calc(100vh - var(--topbar-height));
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.workspace-sidebar {
  position: sticky;
  top: var(--topbar-height);
  z-index: 60;
  display: flex;
  height: calc(100vh - var(--topbar-height));
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: #10141a;
}

.project-meter {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(76, 201, 240, .055), rgba(44, 182, 125, .035));
}

.meter-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.meter-copy strong {
  color: var(--cyan);
}

.meter-track {
  height: 4px;
  margin: 9px 0 10px;
  overflow: hidden;
  background: #28303a;
}

.meter-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transition: width .35s ease;
}

.project-meter p {
  margin: 0;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.45;
}

.workspace-nav {
  min-height: 0;
  padding: 9px;
  overflow-y: auto;
}

.nav-phase {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 13px 8px 7px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.nav-phase:first-child {
  margin-top: 3px;
}

.phase-number {
  display: grid;
  width: 22px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 8px;
}

.workspace-nav-item {
  display: grid;
  width: 100%;
  min-height: 38px;
  grid-template-columns: 23px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
}

.workspace-nav-item i {
  color: #8594a5;
  text-align: center;
}

.workspace-nav-item b {
  min-width: 20px;
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 800;
  text-align: center;
}

.workspace-nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .035);
}

.workspace-nav-item.active {
  border-color: rgba(76, 201, 240, .28);
  color: var(--text);
  background: linear-gradient(90deg, rgba(76, 201, 240, .12), rgba(44, 182, 125, .045));
}

.workspace-nav-item.active i {
  color: var(--cyan);
}

.workspace-nav-item.active b {
  border-color: rgba(76, 201, 240, .35);
  color: var(--cyan);
}

.workspace-nav-item.export-nav {
  margin-top: 5px;
  border-color: rgba(44, 182, 125, .25);
  color: #caefe0;
  background: rgba(44, 182, 125, .06);
}

.sidebar-footer {
  display: grid;
  gap: 3px;
  margin-top: auto;
  padding: 9px;
  border-top: 1px solid var(--border);
}

.sidebar-link {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
}

.sidebar-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.sidebar-backdrop {
  display: none;
}

.workspace-main {
  width: 100%;
  min-width: 0;
  padding: 26px clamp(18px, 2.5vw, 38px) 64px;
}

.workspace-view {
  display: none;
  width: min(1540px, 100%);
  margin: 0 auto;
  animation: view-in .2s ease;
}

.workspace-view.active {
  display: block;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.page-heading > div:first-child {
  max-width: 850px;
}

.page-heading h1 {
  margin: 4px 0 9px;
}

.page-heading p {
  max-width: 820px;
  margin: 0;
  font-size: 13px;
}

.overview-heading {
  min-height: 168px;
  align-items: center;
  padding: 25px 28px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius);
  background:
    linear-gradient(115deg, rgba(76, 201, 240, .08), transparent 45%),
    linear-gradient(300deg, rgba(44, 182, 125, .055), transparent 40%),
    #141920;
  box-shadow: var(--shadow-soft);
}

.overview-heading h1 {
  max-width: 760px;
  font-size: 35px;
}

.overview-heading p {
  max-width: 760px;
  font-size: 13px;
}

.compact-heading {
  min-height: 90px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.eyebrow,
.section-kicker {
  display: block;
  color: var(--cyan);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.context-chip,
.readiness-badge,
.live-value,
.field-note,
.export-readiness {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  color: var(--muted);
  background: var(--surface);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.live-value {
  border-color: rgba(76, 201, 240, .32);
  color: var(--cyan);
  background: rgba(76, 201, 240, .07);
  font-family: var(--mono);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.metric {
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--border);
}

.metric:last-child {
  border-right: 0;
}

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

.metric span {
  margin-bottom: 5px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  font-size: 20px;
}

.metric small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
  gap: 18px;
}

.section-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.build-roadmap,
.activity-panel,
.setup-main,
.setup-summary-panel,
.settings-layout > .section-panel,
.editor-stack > .section-panel,
.sticky-inspector,
.mod-queue-panel,
.installed-mods-panel,
.types-table-panel,
.economy-actions-panel,
.record-browser,
.record-editor,
.vehicle-builder-layout > .section-panel,
.npc-event-band,
.tab-panel > .section-panel,
.tab-panel .editor-layout > .section-panel,
.player-system-grid > .section-panel,
.diagnostics-panel,
.change-plan-panel,
.install-checklist {
  padding: 19px;
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-title-row h2 {
  margin: 3px 0 0;
}

.roadmap-list {
  display: grid;
  gap: 5px;
}

.roadmap-list button {
  display: grid;
  width: 100%;
  min-height: 59px;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  color: var(--text);
  background: rgba(255, 255, 255, .025);
  text-align: left;
}

.roadmap-list button:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.roadmap-index {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
  color: var(--cyan);
  font-size: 9px;
  font-weight: 900;
}

.roadmap-list button strong,
.roadmap-list button small {
  display: block;
}

.roadmap-list button strong {
  font-size: 12px;
}

.roadmap-list button small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.roadmap-list button > i {
  color: var(--muted-2);
  font-size: 9px;
}

.activity-panel {
  min-height: 425px;
}

.activity-list {
  display: grid;
  max-height: 360px;
  gap: 5px;
  overflow: auto;
}

.activity-entry {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.activity-entry > i {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: var(--radius-small);
  color: var(--cyan);
  background: rgba(76, 201, 240, .09);
  font-size: 10px;
}

.activity-entry strong,
.activity-entry small {
  display: block;
}

.activity-entry strong {
  font-size: 10px;
}

.activity-entry small,
.activity-entry time {
  color: var(--muted-2);
  font-size: 8px;
}

.capability-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  box-shadow: var(--shadow-soft);
}

.capability-band > div {
  display: grid;
  min-height: 124px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-content: center;
  gap: 5px 11px;
  padding: 17px;
  background: var(--surface);
}

.capability-band i {
  grid-row: 1 / span 2;
  color: var(--green-soft);
  font-size: 17px;
}

.capability-band strong {
  font-size: 11px;
}

.capability-band span {
  color: var(--muted);
  font-size: 9px;
}

.setup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

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

.map-choice {
  position: relative;
  min-width: 0;
  aspect-ratio: 1.55 / 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
  text-align: left;
}

.map-choice::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 8, 12, .12), rgba(5, 8, 12, .92));
}

.map-choice:hover {
  border-color: var(--border-strong);
}

.map-choice.selected {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(76, 201, 240, .11);
}

.map-choice img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.7) contrast(1.04);
  transition: filter .18s ease, transform .18s ease;
}

.map-choice:hover img,
.map-choice.selected img {
  filter: saturate(1) contrast(1.02);
  transform: scale(1.02);
}

.map-choice-overlay {
  position: absolute;
  right: 13px;
  bottom: 12px;
  left: 13px;
  z-index: 2;
}

.map-choice-overlay small,
.map-choice-overlay strong,
.map-choice-overlay em {
  display: block;
}

.map-choice-overlay small {
  color: #c3d1df;
  font-size: 8px;
  font-weight: 800;
}

.map-choice-overlay strong {
  margin-top: 2px;
  font-size: 16px;
}

.map-choice-overlay em {
  overflow: hidden;
  margin-top: 2px;
  color: #aab8c7;
  font-family: var(--mono);
  font-size: 7px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-choice > i {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  color: var(--cyan);
  font-size: 17px;
  opacity: 0;
}

.map-choice.selected > i {
  opacity: 1;
}

.form-grid {
  display: grid;
  gap: 13px;
}

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

.form-grid.three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.four-column {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid.gap-large {
  gap: 20px;
}

.span-two {
  grid-column: span 2;
}

.span-three {
  grid-column: span 3;
}

.span-four {
  grid-column: span 4;
}

.control-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.control-group legend,
.field > span {
  display: block;
  margin-bottom: 6px;
  color: #dce5ed;
  font-size: 10px;
  font-weight: 800;
}

.field > span small {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 500;
}

.control-help,
.panel-copy {
  margin: 7px 0 0;
  color: var(--muted-2);
  font-size: 9px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--bg-deep);
}

.segmented-control button {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.segmented-control button:hover {
  color: var(--text);
}

.segmented-control button.active {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-3);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
}

.segmented-control button.active i {
  color: var(--cyan);
}

.source-upload {
  margin-top: 20px;
}

.drop-zone {
  position: relative;
  display: flex;
  min-height: 144px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, .018);
  cursor: pointer;
  text-align: center;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--cyan);
  background: rgba(76, 201, 240, .05);
}

.drop-zone > i {
  margin-bottom: 5px;
  color: var(--cyan);
  font-size: 23px;
}

.drop-zone strong {
  color: var(--text);
  font-size: 12px;
}

.drop-zone span {
  color: var(--muted);
  font-size: 9px;
}

.selected-file {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}

.initialization-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.initialization-copy strong,
.initialization-copy span {
  display: block;
}

.initialization-copy strong {
  font-size: 12px;
}

.initialization-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.load-progress {
  position: relative;
  height: 28px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--bg-deep);
}

.load-progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(76, 201, 240, .35), rgba(44, 182, 125, .35));
  transition: width .2s ease;
}

.load-progress small {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 8px;
  font-weight: 700;
}

.setup-summary-panel {
  position: sticky;
  top: calc(var(--topbar-height) + 22px);
}

.check-list,
.impact-list {
  display: grid;
  gap: 8px;
}

.check-list > div,
.impact-list > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.check-list > div:last-child,
.impact-list > div:last-child {
  border-bottom: 0;
}

.check-list i,
.impact-list i {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: var(--radius-small);
  color: var(--green-soft);
  background: rgba(44, 182, 125, .09);
  font-size: 9px;
}

.check-list strong,
.check-list small,
.impact-list strong,
.impact-list small {
  display: block;
}

.check-list strong,
.impact-list strong {
  font-size: 10px;
}

.check-list small,
.impact-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.notice {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  margin-top: 16px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  color: var(--muted);
  font-size: 9px;
}

.notice-info {
  border-color: rgba(76, 201, 240, .28);
  background: rgba(76, 201, 240, .055);
}

.notice-info i {
  color: var(--cyan);
}

.notice-warning {
  border-color: rgba(244, 189, 80, .3);
  background: rgba(244, 189, 80, .06);
}

.notice-warning i {
  color: var(--amber);
}

.settings-layout,
.editor-stack {
  display: grid;
  gap: 16px;
}

.field {
  display: block;
  min-width: 0;
}

.field input,
.field select,
.field textarea,
.search-field input,
.code-editor,
.weather-state-grid input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  outline: 0;
  color: var(--text);
  background: var(--bg-deep);
}

.field input,
.field select,
.search-field input,
.weather-state-grid input {
  height: 39px;
  padding: 8px 10px;
}

.field textarea {
  min-height: 80px;
  padding: 10px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.55;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-field input:focus,
.code-editor:focus,
.weather-state-grid input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(76, 201, 240, .09);
}

select {
  color-scheme: dark;
}

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

.toggle-row {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, .018);
  cursor: pointer;
}

.toggle-row:hover {
  border-color: var(--border-strong);
}

.toggle-row span {
  min-width: 0;
}

.toggle-row strong,
.toggle-row small {
  display: block;
}

.toggle-row strong {
  font-size: 10px;
}

.toggle-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.toggle-row > input,
.inline-toggle > input {
  position: absolute;
  pointer-events: none;
  opacity: 0;
}

.toggle-row > i,
.inline-toggle > i {
  position: relative;
  display: block;
  width: 36px;
  height: 20px;
  flex: 0 0 36px;
  border: 1px solid #4a5563;
  border-radius: 12px;
  background: #262d36;
  transition: background .16s ease, border-color .16s ease;
}

.toggle-row > i::after,
.inline-toggle > i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #9aa6b3;
  transition: transform .16s ease, background .16s ease;
}

.toggle-row > input:checked + i,
.inline-toggle > input:checked + i {
  border-color: var(--green);
  background: rgba(44, 182, 125, .23);
}

.toggle-row > input:checked + i::after,
.inline-toggle > input:checked + i::after {
  transform: translateX(16px);
  background: var(--green-soft);
}

.toggle-row.standalone-toggle {
  margin: 10px 0;
}

.inline-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.calculated-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--border);
}

.calculated-values > div {
  padding: 10px;
  background: var(--bg-deep);
}

.calculated-values span,
.calculated-values strong {
  display: block;
}

.calculated-values span {
  color: var(--muted-2);
  font-size: 8px;
}

.calculated-values strong {
  margin-top: 3px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-layout {
  display: grid;
  gap: 16px;
  align-items: start;
}

.editor-layout.with-inspector {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.sticky-inspector {
  position: sticky;
  top: calc(var(--topbar-height) + 22px);
}

.compact-toggles .toggle-row {
  min-height: 52px;
}

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

.preset-row button {
  display: grid;
  min-height: 68px;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  color: var(--text);
  background: var(--bg-deep);
  text-align: left;
}

.preset-row button:hover {
  border-color: var(--cyan);
  background: rgba(76, 201, 240, .05);
}

.preset-row button > i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: var(--radius-small);
  color: var(--cyan);
  background: rgba(76, 201, 240, .08);
}

.preset-row strong,
.preset-row small {
  display: block;
}

.preset-row strong {
  font-size: 10px;
}

.preset-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.bulk-drop-band {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(400px, .65fr);
  gap: 14px;
  margin-bottom: 16px;
}

.drop-zone.horizontal {
  min-height: 104px;
  flex-direction: row;
  justify-content: flex-start;
  gap: 14px;
  padding: 16px 20px;
  text-align: left;
}

.drop-zone.horizontal > i {
  margin: 0;
  font-size: 25px;
}

.drop-zone.horizontal span {
  flex: 1;
}

.drop-zone.horizontal span strong,
.drop-zone.horizontal span small {
  display: block;
}

.drop-zone.horizontal span small {
  margin-top: 3px;
}

.drop-zone.horizontal em {
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
  color: var(--text);
  background: var(--surface-2);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.bulk-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}

.bulk-stats > div {
  display: flex;
  min-height: 51px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  background: var(--surface);
}

.bulk-stats span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.bulk-stats strong {
  color: var(--cyan);
  font-size: 16px;
}

.mods-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
  gap: 16px;
  align-items: start;
}

.installed-mods-panel {
  position: sticky;
  top: calc(var(--topbar-height) + 20px);
}

.data-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  color: var(--text);
  font-size: 9px;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--muted-2);
  background: #11151b;
  font-size: 8px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
  color: var(--muted);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, .025);
}

.data-table input,
.data-table select {
  min-width: 72px;
  height: 31px;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: 0;
  color: var(--text);
  background: var(--bg-deep);
  font-size: 9px;
}

.data-table .filename-cell {
  min-width: 160px;
  color: var(--text);
  font-weight: 700;
}

.data-table .mini-action {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface-2);
  cursor: pointer;
}

.empty-table-row td {
  height: 120px;
  color: var(--muted-2);
  text-align: center;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.status-tag.success {
  border-color: rgba(44, 182, 125, .35);
  color: var(--green-soft);
  background: rgba(44, 182, 125, .07);
}

.status-tag.warning {
  border-color: rgba(244, 189, 80, .35);
  color: var(--amber);
  background: rgba(244, 189, 80, .07);
}

.status-tag.error {
  border-color: rgba(239, 101, 118, .35);
  color: #ffadb8;
  background: rgba(239, 101, 118, .07);
}

.installed-list {
  display: grid;
  max-height: 520px;
  gap: 6px;
  overflow: auto;
}

.installed-entry {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--bg-deep);
}

.installed-entry > i {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 4px;
  color: var(--cyan);
  background: rgba(76, 201, 240, .08);
}

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

.installed-entry strong {
  font-size: 9px;
}

.installed-entry small {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 7px;
}

.installed-entry-actions {
  display: flex;
  gap: 3px;
}

.installed-entry-actions button {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface-2);
  cursor: pointer;
  font-size: 8px;
}

.notice-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}

.notice-band > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  padding: 13px;
  background: var(--surface);
}

.notice-band i {
  color: var(--green-soft);
}

.notice-band strong,
.notice-band span {
  display: block;
}

.notice-band strong {
  margin-bottom: 3px;
  color: var(--text);
  font-size: 9px;
}

.notice-band span {
  color: var(--muted);
  font-size: 8px;
}

.map-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: stretch;
}

.map-stage-panel,
.map-controls-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.map-toolbar {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
}

.compact-segments {
  display: flex;
  width: auto;
  overflow-x: auto;
}

.compact-segments button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.map-icon-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.map-canvas-wrap {
  position: relative;
  height: min(690px, calc(100vh - 230px));
  min-height: 500px;
  overflow: hidden;
  background: #080a0d;
  touch-action: none;
}

#spawnMapCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: rgba(8, 10, 13, .8);
  font-size: 11px;
}

.map-loading.hidden {
  display: none;
}

.map-coordinate-readout,
.map-hint {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-small);
  background: rgba(7, 9, 12, .84);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
  backdrop-filter: blur(8px);
}

.map-coordinate-readout {
  top: 12px;
  right: 12px;
  padding: 7px 9px;
  text-align: right;
}

.map-coordinate-readout span,
.map-coordinate-readout strong {
  display: block;
}

.map-coordinate-readout span {
  color: var(--cyan);
  font-size: 8px;
  font-weight: 900;
}

.map-coordinate-readout strong {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 10px;
}

.map-hint {
  bottom: 12px;
  left: 12px;
  padding: 7px 9px;
  color: #c8d2dc;
  font-size: 8px;
}

.map-controls-panel {
  display: flex;
  height: min(744px, calc(100vh - 176px));
  min-height: 554px;
  flex-direction: column;
  padding: 15px;
}

.map-mode-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
}

.mode-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(44, 182, 125, .45);
}

.map-mode-heading small,
.map-mode-heading strong {
  display: block;
}

.map-mode-heading small {
  color: var(--muted-2);
  font-size: 8px;
  text-transform: uppercase;
}

.map-mode-heading strong {
  margin-top: 2px;
  font-size: 12px;
}

.mode-config {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.compact-form-grid {
  gap: 8px;
}

.compact-form-grid .field input,
.compact-form-grid .field select {
  height: 34px;
  font-size: 9px;
}

.placed-points-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0 9px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.placed-points-header strong {
  color: var(--cyan);
}

.placed-points-list {
  min-height: 0;
  overflow: auto;
}

.point-entry {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 3px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.point-entry > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.point-entry strong,
.point-entry small {
  display: block;
}

.point-entry strong {
  font-family: var(--mono);
  font-size: 9px;
}

.point-entry small {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 7px;
}

.point-entry button {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface-2);
  cursor: pointer;
  font-size: 8px;
}

.empty-state {
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 20px;
  color: var(--muted-2);
  text-align: center;
}

.empty-state.compact-empty {
  min-height: 120px;
}

.empty-state i {
  margin-bottom: 3px;
  color: #647183;
  font-size: 20px;
}

.empty-state strong {
  color: var(--muted);
  font-size: 10px;
}

.empty-state span {
  max-width: 260px;
  font-size: 8px;
}

.economy-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  margin-bottom: 14px;
  padding: 12px;
}

.search-field {
  position: relative;
  display: block;
  min-width: 0;
  flex: 1;
}

.search-field i {
  position: absolute;
  top: 50%;
  left: 11px;
  z-index: 1;
  color: var(--muted-2);
  font-size: 10px;
  transform: translateY(-50%);
}

.search-field input {
  padding-left: 31px;
}

.compact-field {
  width: 150px;
  flex: 0 0 150px;
}

.compact-field > span {
  margin-bottom: 4px;
  font-size: 8px;
}

.compact-field select {
  height: 36px;
  font-size: 9px;
}

.economy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 14px;
  align-items: start;
}

.types-table-panel {
  min-width: 0;
}

.tall-table {
  max-height: 650px;
}

.editable-table th:first-child {
  min-width: 195px;
}

.editable-table td:last-child {
  width: 36px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 8px;
}

.economy-actions-panel {
  position: sticky;
  top: calc(var(--topbar-height) + 18px);
}

.tab-strip {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface);
}

.tab-strip button {
  min-height: 35px;
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.tab-strip button:hover {
  color: var(--text);
}

.tab-strip button.active {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-3);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: view-in .17s ease;
}

.editor-layout.list-and-editor {
  grid-template-columns: 280px minmax(0, 1fr);
}

.record-browser {
  min-height: 650px;
}

.record-list {
  display: grid;
  max-height: 590px;
  gap: 4px;
  margin-top: 10px;
  overflow: auto;
}

.record-item {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  color: var(--muted);
  background: rgba(255, 255, 255, .018);
  cursor: pointer;
  text-align: left;
}

.record-item:hover {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface-2);
}

.record-item.active {
  border-color: rgba(76, 201, 240, .35);
  color: var(--text);
  background: rgba(76, 201, 240, .08);
}

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

.record-item strong {
  font-size: 9px;
}

.record-item small {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 7px;
}

.record-item em {
  color: var(--green-soft);
  font-size: 8px;
  font-style: normal;
}

.split-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 9px;
}

.vehicle-builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 14px;
  align-items: start;
}

.vehicle-family-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 17px;
}

.vehicle-family-grid button {
  display: grid;
  min-height: 78px;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  color: var(--muted);
  background: var(--bg-deep);
}

.vehicle-family-grid button:hover,
.vehicle-family-grid button.selected {
  border-color: rgba(76, 201, 240, .55);
  color: var(--text);
  background: rgba(76, 201, 240, .07);
}

.vehicle-family-grid button i {
  color: var(--cyan);
  font-size: 15px;
}

.vehicle-family-grid strong {
  font-size: 9px;
}

.vehicle-family-grid small {
  color: var(--muted-2);
  font-size: 7px;
}

.filter-chips,
.file-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.filter-chips {
  margin-top: 9px;
}

.filter-chips button,
.file-filters button {
  min-height: 27px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  background: var(--bg-deep);
  font-size: 8px;
  font-weight: 800;
}

.filter-chips button:hover,
.filter-chips button.active,
.file-filters button:hover,
.file-filters button.active {
  border-color: rgba(76, 201, 240, .4);
  color: var(--cyan);
  background: rgba(76, 201, 240, .07);
}

.preset-menu {
  min-width: 180px;
}

.npc-event-band {
  display: grid;
  grid-template-columns: minmax(250px, .45fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 14px;
  align-items: end;
}

.npc-event-band p {
  margin-bottom: 0;
  font-size: 9px;
}

.npc-grid {
  grid-template-columns: 1.25fr repeat(4, .7fr) auto;
  align-items: end;
}

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

.weather-state-grid fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--bg-deep);
}

.weather-state-grid legend {
  padding: 0 5px;
  color: var(--cyan);
  font-size: 9px;
  font-weight: 800;
}

.weather-state-grid label {
  color: var(--muted);
  font-size: 8px;
}

.weather-state-grid input {
  height: 33px;
  margin-top: 4px;
  font-size: 9px;
}

.weather-meter-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.weather-meter-list > div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.weather-meter-list span,
.weather-meter-list strong {
  color: var(--muted);
  font-size: 8px;
}

.weather-meter-list strong {
  color: var(--text);
  text-align: right;
}

.weather-meter-list i {
  height: 5px;
  overflow: hidden;
  background: #2b333e;
}

.weather-meter-list b {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width .2s ease;
}

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

.message-entry {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(95px, .35fr)) 34px;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--bg-deep);
}

.message-entry label > span,
.message-entry label > span small {
  display: block;
}

.message-entry label > span {
  min-height: 27px;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 8px;
  font-weight: 800;
}

.message-entry label > span small {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 7px;
  font-weight: 500;
}

.message-entry input,
.message-entry select {
  width: 100%;
  height: 35px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: 0;
  color: var(--text);
  background: var(--surface);
  font-size: 8px;
}

.message-entry button {
  width: 34px;
  height: 35px;
  border: 1px solid rgba(239, 101, 118, .3);
  border-radius: 4px;
  color: #ffb3bd;
  background: rgba(239, 101, 118, .07);
  cursor: pointer;
}

.globals-search {
  max-width: 430px;
  margin-bottom: 12px;
}

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

.global-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--bg-deep);
}

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

.global-entry strong {
  font-family: var(--mono);
  font-size: 8px;
}

.global-entry small {
  color: var(--muted-2);
  font-size: 7px;
}

.global-entry input {
  width: 100%;
  height: 30px;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: 0;
  color: var(--text);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 8px;
}

.player-system-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .75fr);
  gap: 14px;
  align-items: start;
}

.loadout-builder-panel {
  overflow: hidden;
}

.builder-intro {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 17px;
  padding: 10px 12px;
  border: 1px solid rgba(76, 201, 240, .24);
  border-radius: var(--radius-small);
  background: rgba(76, 201, 240, .055);
}

.builder-intro > i {
  color: var(--cyan);
  text-align: center;
}

.builder-intro strong,
.builder-intro small {
  display: block;
}

.builder-intro strong {
  margin-bottom: 2px;
  font-size: 10px;
}

.builder-intro small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.builder-intro code {
  color: var(--cyan);
  font-family: var(--mono);
}

.field-description {
  display: block;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 500;
  line-height: 1.45;
}

.field-format-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 6px;
}

.field-format-guide span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted-2);
  background: var(--surface-2);
  font-size: 7px;
  line-height: 1.3;
}

.field-format-guide b {
  color: var(--cyan);
  font-weight: 900;
}

.warning-text {
  color: var(--amber) !important;
}

.structured-editor-columns {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 18px;
}

.structured-editor {
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.structured-editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.structured-editor-heading > div {
  min-width: 0;
}

.structured-editor-heading h3 {
  margin: 2px 0 3px;
  font-size: 14px;
}

.structured-editor-heading p,
.structured-group-heading p {
  max-width: 620px;
  margin: 0;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.5;
}

.structured-row-list,
.structured-group-list {
  display: grid;
  max-height: 460px;
  gap: 7px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}

.structured-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 30px;
  align-items: end;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--bg-deep);
}

.structured-row-number {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  align-self: end;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--cyan);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 900;
}

.structured-row-fields {
  display: grid;
  align-items: end;
  gap: 7px;
  min-width: 0;
}

.event-child-row .structured-row-fields {
  grid-template-columns: minmax(145px, 2fr) repeat(4, minmax(68px, .72fr));
}

.event-position-row .structured-row-fields {
  grid-template-columns: repeat(3, minmax(96px, 1fr));
}

.part-definition-row .structured-row-fields {
  grid-template-columns: minmax(150px, 2fr) minmax(105px, .8fr) minmax(76px, .55fr);
}

.attachment-choice-row .structured-row-fields {
  grid-template-columns: minmax(150px, 2fr) minmax(110px, .8fr);
}

.safe-position-row .structured-row-fields {
  grid-template-columns: repeat(3, minmax(90px, 1fr));
}

.structured-field {
  display: block;
  min-width: 0;
}

.structured-field > span {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 7px;
  font-weight: 900;
  line-height: 1.25;
}

.structured-field > small {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 7px;
  line-height: 1.35;
}

.structured-field input,
.structured-field select {
  width: 100%;
  min-width: 0;
  height: 31px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: 0;
  color: var(--text);
  background: var(--surface);
  font: 700 8px/1 var(--sans);
}

.structured-field input:focus,
.structured-field select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(67, 211, 223, .12);
}

.structured-field input:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.structured-remove-button,
.structured-group-action {
  display: inline-grid;
  width: 30px;
  height: 31px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 104, 125, .32);
  border-radius: 4px;
  color: var(--red-soft);
  background: rgba(255, 104, 125, .08);
}

.structured-remove-button:hover,
.structured-group-action:hover {
  border-color: var(--red-soft);
  background: rgba(255, 104, 125, .15);
}

.structured-empty {
  display: grid;
  min-height: 92px;
  place-items: center;
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-small);
  color: var(--muted-2);
  text-align: center;
  font-size: 8px;
}

.structured-group {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--bg-deep);
}

.structured-group-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px auto auto;
  align-items: end;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.structured-group-heading h4 {
  margin: 1px 0 2px;
  font-size: 11px;
}

.structured-group .structured-row-list {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.structured-group-add {
  height: 31px;
  white-space: nowrap;
}

.teleport-destination-editor {
  margin-top: 14px;
}

.loadout-survivor-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
  padding: 12px 0 2px;
  border-top: 1px solid var(--border);
}

.loadout-survivor-picker.hidden {
  display: none;
}

.survivor-choice {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  background: var(--bg-deep);
  font-size: 8px;
}

.survivor-choice:has(input:checked) {
  border-color: rgba(76, 201, 240, .45);
  color: var(--text);
  background: rgba(76, 201, 240, .07);
}

.survivor-choice input {
  width: 14px;
  height: 14px;
  accent-color: var(--cyan);
}

.survivor-choice span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loadout-builder-block {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.loadout-block-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.loadout-block-heading h3 {
  margin: 3px 0 0;
  font-size: 14px;
}

.loadout-block-heading p {
  max-width: 560px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.55;
}

.button.button-small {
  min-height: 31px;
  padding: 6px 9px;
  font-size: 8px;
}

.cargo-group-settings {
  margin-bottom: 10px;
}

.loadout-row-list {
  display: grid;
  gap: 7px;
}

.loadout-item-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--bg-deep);
}

.loadout-item-main {
  display: grid;
  grid-template-columns: 30px 130px minmax(160px, 1fr) 92px 32px;
  grid-template-areas: "index slot item weight remove";
  align-items: end;
  gap: 8px;
  padding: 9px;
}

.loadout-item-row[data-loadout-kind="cargo"] .loadout-item-main {
  grid-template-columns: 30px minmax(180px, 1fr) 32px;
  grid-template-areas: "index item remove";
}

.loadout-row-number {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  align-self: center;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 900;
  grid-area: index;
}

.loadout-slot-field { grid-area: slot; }
.loadout-class-field { grid-area: item; }
.loadout-weight-field { grid-area: weight; }

.loadout-item-main .field > span {
  margin-bottom: 4px;
  font-size: 8px;
}

.loadout-item-main .field input,
.loadout-item-main .field select {
  height: 32px;
  padding: 6px 8px;
  font-size: 9px;
}

.loadout-remove-button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 103, 132, .22);
  border-radius: 4px;
  color: var(--red-soft);
  background: rgba(255, 103, 132, .04);
  grid-area: remove;
}

.loadout-remove-button:hover {
  border-color: rgba(255, 103, 132, .55);
  background: rgba(255, 103, 132, .1);
}

.loadout-advanced {
  border-top: 1px solid var(--border);
}

.loadout-advanced summary {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
  list-style: none;
}

.loadout-advanced summary::-webkit-details-marker {
  display: none;
}

.loadout-advanced summary::after {
  content: "+";
  color: var(--cyan);
  font-size: 13px;
}

.loadout-advanced[open] summary::after {
  content: "-";
}

.loadout-advanced summary span {
  margin-left: auto;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 500;
}

.loadout-advanced-fields {
  padding: 0 9px 10px;
}

.loadout-empty-rows {
  display: grid;
  min-height: 70px;
  place-items: center;
  padding: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-small);
  color: var(--muted);
  text-align: center;
}

.loadout-empty-rows strong,
.loadout-empty-rows span {
  display: block;
}

.loadout-empty-rows strong {
  font-size: 9px;
}

.loadout-empty-rows span {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 8px;
}

.loadout-live-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--border);
}

.loadout-live-summary > div {
  min-width: 0;
  padding: 10px;
  background: var(--surface-2);
}

.loadout-live-summary span,
.loadout-live-summary strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loadout-live-summary span {
  color: var(--muted-2);
  font-size: 7px;
  text-transform: uppercase;
}

.loadout-live-summary strong {
  margin-top: 4px;
  font-size: 10px;
}

.loadout-installed-list {
  margin-top: 16px;
}

.file-workspace {
  display: grid;
  min-height: 690px;
  grid-template-columns: 300px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.file-browser-panel {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--border);
  background: #11151a;
}

.file-filters {
  margin: 8px 0;
}

.file-list {
  height: 605px;
  overflow: auto;
}

.file-item {
  display: grid;
  width: 100%;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.file-item:hover {
  color: var(--text);
  background: var(--surface-2);
}

.file-item.active {
  border-color: rgba(76, 201, 240, .3);
  color: var(--text);
  background: rgba(76, 201, 240, .08);
}

.file-item i {
  color: #8292a3;
  text-align: center;
}

.file-item span {
  min-width: 0;
}

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

.file-item strong {
  font-size: 8px;
}

.file-item small {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 7px;
}

.file-item em {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

.file-editor-panel {
  display: grid;
  min-width: 0;
  grid-template-rows: 53px minmax(0, 1fr) 28px;
}

.file-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--border);
}

.file-editor-toolbar > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.file-editor-toolbar > div > i {
  color: var(--cyan);
}

.file-editor-toolbar strong,
.file-editor-toolbar small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-editor-toolbar strong {
  font-size: 9px;
}

.file-editor-toolbar small {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 7px;
}

.code-editor {
  min-width: 0;
  min-height: 0;
  padding: 16px;
  border: 0;
  border-radius: 0;
  resize: none;
  color: #dce9f4;
  background: #090c10;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.55;
  tab-size: 2;
  white-space: pre;
}

.editor-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  background: #101419;
  font-family: var(--mono);
  font-size: 7px;
}

.review-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  box-shadow: var(--shadow-soft);
}

.review-summary > div {
  display: flex;
  min-height: 83px;
  align-items: center;
  gap: 11px;
  padding: 13px;
  background: var(--surface);
}

.review-summary i {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  place-items: center;
  border-radius: var(--radius-small);
  color: var(--cyan);
  background: rgba(76, 201, 240, .08);
}

.review-summary [data-review-tone="error"] i {
  color: var(--red);
  background: rgba(239, 101, 118, .08);
}

.review-summary [data-review-tone="warning"] i {
  color: var(--amber);
  background: rgba(244, 189, 80, .08);
}

.review-summary [data-review-tone="ready"] i {
  color: var(--green-soft);
  background: rgba(44, 182, 125, .08);
}

.review-summary strong,
.review-summary small {
  display: block;
}

.review-summary strong {
  font-size: 18px;
}

.review-summary small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
  gap: 14px;
  align-items: start;
}

.diagnostic-list,
.change-plan-list {
  display: grid;
  gap: 6px;
}

.diagnostic-entry {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--bg-deep);
}

.diagnostic-entry > i {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 4px;
  font-size: 10px;
}

.diagnostic-entry.error > i {
  color: #ffb0ba;
  background: rgba(239, 101, 118, .1);
}

.diagnostic-entry.warning > i {
  color: var(--amber);
  background: rgba(244, 189, 80, .1);
}

.diagnostic-entry.success > i {
  color: var(--green-soft);
  background: rgba(44, 182, 125, .1);
}

.diagnostic-entry strong,
.diagnostic-entry small {
  display: block;
}

.diagnostic-entry strong {
  font-size: 10px;
}

.diagnostic-entry small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.diagnostic-entry code {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 7px;
}

.change-plan-entry {
  padding: 10px;
  border-left: 2px solid var(--cyan);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--bg-deep);
}

.change-plan-entry strong,
.change-plan-entry small {
  display: block;
}

.change-plan-entry strong {
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 8px;
}

.change-plan-entry small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.export-readiness[data-ready="true"] {
  border-color: rgba(44, 182, 125, .42);
  color: var(--green-soft);
  background: rgba(44, 182, 125, .07);
}

.primary-export-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  align-items: center;
  gap: 28px;
  min-height: 220px;
  padding: 28px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  background:
    linear-gradient(115deg, rgba(44, 182, 125, .085), transparent 45%),
    linear-gradient(300deg, rgba(76, 201, 240, .055), transparent 38%),
    var(--surface);
  box-shadow: var(--shadow);
}

.primary-export-copy h2 {
  margin: 5px 0 9px;
  font-size: 24px;
}

.primary-export-copy p {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: 11px;
}

.package-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.package-facts span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  background: rgba(0, 0, 0, .15);
  font-size: 8px;
}

.package-facts i {
  color: var(--cyan);
}

.export-button {
  min-height: 72px;
  justify-content: flex-start;
  padding: 13px 17px;
  text-align: left;
}

.export-button > i {
  font-size: 20px;
}

.export-button strong,
.export-button small {
  display: block;
}

.export-button strong {
  font-size: 12px;
}

.export-button small {
  margin-top: 3px;
  font-size: 8px;
  font-weight: 700;
}

.export-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface);
}

.export-progress > div {
  height: 5px;
  overflow: hidden;
  background: #2a333e;
}

.export-progress > div span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.export-progress p {
  margin: 0;
}

.export-progress strong,
.export-progress p span {
  display: block;
}

.export-progress strong {
  color: var(--text);
  font-size: 9px;
}

.export-progress p span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.export-option-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0;
}

.export-option-grid button {
  display: grid;
  min-width: 0;
  min-height: 102px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.export-option-grid button:hover {
  border-color: var(--cyan);
  background: var(--surface-2);
}

.export-option-grid button > i {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: var(--radius-small);
  color: var(--cyan);
  background: rgba(76, 201, 240, .08);
}

.export-option-grid strong,
.export-option-grid small {
  display: block;
}

.export-option-grid strong {
  font-size: 10px;
}

.export-option-grid small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.export-option-grid em {
  color: var(--green-soft);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.install-checklist {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

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

.horizontal-checks > div {
  border-bottom: 0;
}

.toast-stack {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9000;
  display: grid;
  width: min(370px, calc(100vw - 28px));
  gap: 7px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
  color: var(--text);
  background: rgba(20, 25, 32, .98);
  box-shadow: var(--shadow);
  pointer-events: auto;
  animation: toast-in .2s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast > i {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 4px;
  color: var(--cyan);
  background: rgba(76, 201, 240, .09);
}

.toast.success > i {
  color: var(--green-soft);
  background: rgba(44, 182, 125, .1);
}

.toast.warning > i {
  color: var(--amber);
  background: rgba(244, 189, 80, .1);
}

.toast.error > i {
  color: #ffabb6;
  background: rgba(239, 101, 118, .1);
}

.toast strong,
.toast small {
  display: block;
}

.toast strong {
  font-size: 10px;
}

.toast small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.toast button {
  width: 22px;
  height: 22px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.app-dialog {
  width: min(450px, calc(100vw - 30px));
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .65);
}

.app-dialog::backdrop {
  background: rgba(3, 5, 8, .76);
  backdrop-filter: blur(3px);
}

.app-dialog form {
  padding: 24px;
  text-align: center;
}

.dialog-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: var(--radius);
  color: var(--amber);
  background: rgba(244, 189, 80, .1);
  font-size: 18px;
}

.app-dialog h2 {
  margin-bottom: 7px;
}

.app-dialog p {
  margin-bottom: 18px;
  font-size: 10px;
}

.dialog-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.command-dialog {
  width: min(600px, calc(100vw - 24px));
}

.command-dialog form {
  padding: 10px;
  text-align: left;
}

.command-search input {
  height: 46px;
  font-size: 12px;
}

.command-results {
  display: grid;
  max-height: 390px;
  gap: 3px;
  margin-top: 8px;
  overflow: auto;
}

.command-result {
  display: grid;
  width: 100%;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.command-result:hover,
.command-result.active {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface-2);
}

.command-result i {
  color: var(--cyan);
  text-align: center;
}

.command-result strong,
.command-result small {
  display: block;
}

.command-result strong {
  font-size: 10px;
}

.command-result small,
.command-result em {
  color: var(--muted-2);
  font-size: 8px;
  font-style: normal;
}

@media (max-width: 1280px) {
  :root { --sidebar-width: 250px; }
  .brand { min-width: 220px; }
  .brand-copy small { display: none; }
  .top-status { display: none; }
  .capability-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bulk-drop-band { grid-template-columns: 1fr; }
  .bulk-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .vehicle-family-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .globals-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .npc-event-band { grid-template-columns: 1fr; }
  .review-summary { grid-template-columns: repeat(5, minmax(140px, 1fr)); overflow-x: auto; }
  .export-option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .install-checklist { grid-template-columns: 1fr; }
}

@media (max-width: 1050px) {
  .mobile-nav-button { display: grid; }
  .brand { min-width: 0; }
  .brand-copy strong { max-width: 180px; }
  .project-name-control { width: min(340px, 36vw); }
  .app-layout { display: block; }
  .workspace-sidebar {
    position: fixed;
    top: var(--topbar-height);
    bottom: 0;
    left: 0;
    width: min(var(--sidebar-width), calc(100vw - 48px));
    height: calc(100vh - var(--topbar-height));
    transform: translateX(-102%);
    transition: transform .2s ease;
  }
  body.sidebar-open .workspace-sidebar { transform: translateX(0); }
  .sidebar-backdrop {
    position: fixed;
    inset: var(--topbar-height) 0 0;
    z-index: 55;
    display: block;
    visibility: hidden;
    background: rgba(3, 5, 8, .66);
    opacity: 0;
    transition: opacity .2s ease, visibility .2s ease;
  }
  body.sidebar-open .sidebar-backdrop { visibility: visible; opacity: 1; }
  .workspace-main { padding-inline: 18px; }
  .setup-layout { grid-template-columns: 1fr; }
  .setup-summary-panel { position: static; }
  .editor-layout.with-inspector,
  .economy-layout,
  .review-layout { grid-template-columns: 1fr; }
  .sticky-inspector,
  .economy-actions-panel,
  .installed-mods-panel { position: static; }
  .map-workspace { grid-template-columns: 1fr; }
  .map-controls-panel { height: auto; min-height: 380px; }
  .placed-points-list { max-height: 260px; }
  .vehicle-builder-layout { grid-template-columns: 1fr; }
  .weather-state-grid { grid-template-columns: 1fr; }
  .player-system-grid { grid-template-columns: 1fr; }
  .primary-export-band { grid-template-columns: 1fr; }
  .export-button { width: 100%; }
}

@media (max-width: 760px) {
  :root { --topbar-height: 60px; }
  body { font-size: 13px; }
  .app-topbar { gap: 8px; padding: 0 9px; }
  .brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
  .brand-copy { display: none; }
  .project-name-control { flex: 1; width: auto; }
  .project-name-control input { height: 40px; }
  .top-actions .button { width: 38px; padding: 0; }
  .top-actions .button span { display: none; }
  .workspace-main { padding: 17px 10px 48px; }
  .page-heading,
  .overview-heading { align-items: stretch; flex-direction: column; }
  .overview-heading { min-height: 0; padding: 20px 17px; }
  .overview-heading h1,
  h1 { font-size: 26px; }
  .heading-actions { width: 100%; flex-wrap: wrap; }
  .heading-actions .button,
  .heading-actions .file-button { flex: 1; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .overview-grid { grid-template-columns: 1fr; }
  .capability-band { grid-template-columns: 1fr; }
  .map-choice-grid { grid-template-columns: 1fr; }
  .map-choice { aspect-ratio: 2 / 1; }
  .form-grid.three-column,
  .form-grid.four-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-three,
  .span-four { grid-column: span 2; }
  .toggle-grid { grid-template-columns: 1fr; }
  .preset-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bulk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mods-layout { grid-template-columns: 1fr; }
  .notice-band { grid-template-columns: 1fr; }
  .map-toolbar { align-items: stretch; flex-direction: column; }
  .compact-segments { width: 100%; }
  .map-icon-actions { justify-content: flex-end; }
  .map-canvas-wrap { height: 58vh; min-height: 390px; }
  .economy-toolbar { align-items: stretch; flex-wrap: wrap; }
  .economy-toolbar .search-field { flex-basis: 100%; }
  .compact-field { width: calc(33.333% - 7px); flex: 1 1 100px; }
  .editor-layout.list-and-editor { grid-template-columns: 1fr; }
  .record-browser { min-height: 250px; }
  .record-list { max-height: 250px; }
  .split-fields { grid-template-columns: 1fr; }
  .structured-editor-heading { align-items: stretch; flex-direction: column; }
  .structured-editor-heading .button { width: 100%; }
  .event-child-row .structured-row-fields,
  .event-position-row .structured-row-fields,
  .part-definition-row .structured-row-fields,
  .attachment-choice-row .structured-row-fields,
  .safe-position-row .structured-row-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-child-row .structured-field:first-child,
  .part-definition-row .structured-field:first-child,
  .attachment-choice-row .structured-field:first-child { grid-column: span 2; }
  .structured-group-heading { grid-template-columns: minmax(0, 1fr) 120px auto; }
  .structured-group-heading > div:first-child { grid-column: 1 / -1; }
  .vehicle-family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .message-entry { grid-template-columns: 1fr 1fr; }
  .message-entry > :first-child { grid-column: span 2; }
  .globals-grid { grid-template-columns: 1fr; }
  .loadout-survivor-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loadout-block-heading { flex-direction: column; }
  .loadout-block-heading .heading-actions { width: 100%; }
  .loadout-block-heading .heading-actions .button { flex: 1; }
  .loadout-item-main {
    grid-template-columns: 30px 120px minmax(0, 1fr) 32px;
    grid-template-areas:
      "index slot item remove"
      ". weight weight .";
  }
  .loadout-live-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .file-workspace { min-height: 760px; grid-template-columns: 1fr; grid-template-rows: 280px minmax(0, 1fr); }
  .file-browser-panel { border-right: 0; border-bottom: 1px solid var(--border); }
  .file-list { height: 190px; }
  .review-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; }
  .review-summary > div:last-child { grid-column: span 2; }
  .export-option-grid { grid-template-columns: 1fr; }
  .horizontal-checks { grid-template-columns: 1fr; }
  .export-progress { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .project-name-control span { display: none; }
  .project-name-control input { padding: 8px; font-size: 11px; }
  .top-actions > .icon-button { display: none; }
  .section-panel,
  .map-stage-panel,
  .map-controls-panel,
  .file-workspace { border-radius: var(--radius-small); }
  .build-roadmap,
  .activity-panel,
  .setup-main,
  .setup-summary-panel,
  .settings-layout > .section-panel,
  .editor-stack > .section-panel,
  .sticky-inspector,
  .mod-queue-panel,
  .installed-mods-panel,
  .types-table-panel,
  .economy-actions-panel,
  .record-browser,
  .record-editor,
  .vehicle-builder-layout > .section-panel,
  .npc-event-band,
  .tab-panel > .section-panel,
  .tab-panel .editor-layout > .section-panel,
  .player-system-grid > .section-panel,
  .diagnostics-panel,
  .change-plan-panel,
  .install-checklist { padding: 13px; }
  .overview-heading h1,
  h1 { font-size: 23px; }
  .metric strong { font-size: 16px; }
  .form-grid.two-column,
  .form-grid.three-column,
  .form-grid.four-column { grid-template-columns: 1fr; }
  .span-two,
  .span-three,
  .span-four { grid-column: span 1; }
  .preset-row { grid-template-columns: 1fr; }
  .initialization-footer { align-items: stretch; flex-direction: column; }
  .calculated-values { grid-template-columns: 1fr; }
  .drop-zone.horizontal { align-items: flex-start; flex-direction: column; }
  .drop-zone.horizontal em { align-self: stretch; text-align: center; }
  .map-hint { display: none; }
  .compact-field { flex-basis: calc(50% - 5px); }
  .vehicle-family-grid { grid-template-columns: 1fr 1fr; }
  .structured-row {
    grid-template-columns: 27px minmax(0, 1fr) 30px;
    align-items: start;
  }
  .structured-row-number { align-self: start; }
  .event-child-row .structured-row-fields,
  .event-position-row .structured-row-fields,
  .part-definition-row .structured-row-fields,
  .attachment-choice-row .structured-row-fields,
  .safe-position-row .structured-row-fields { grid-template-columns: 1fr; }
  .event-child-row .structured-field:first-child,
  .part-definition-row .structured-field:first-child,
  .attachment-choice-row .structured-field:first-child { grid-column: span 1; }
  .structured-group-heading { grid-template-columns: 1fr auto; }
  .structured-group-heading .structured-field { grid-column: 1 / -1; }
  .structured-group-add { width: 100%; }
  .loadout-survivor-picker { grid-template-columns: 1fr; }
  .loadout-item-main,
  .loadout-item-row[data-loadout-kind="cargo"] .loadout-item-main {
    grid-template-columns: 30px minmax(0, 1fr) 32px;
    grid-template-areas:
      "index slot remove"
      ". item ."
      ". weight .";
  }
  .loadout-item-row[data-loadout-kind="cargo"] .loadout-item-main {
    grid-template-areas: "index item remove";
  }
  .loadout-advanced-fields.form-grid.four-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loadout-live-summary { grid-template-columns: 1fr 1fr; }
  .weather-state-grid fieldset { grid-template-columns: 1fr; }
  .review-summary { grid-template-columns: 1fr; }
  .review-summary > div:last-child { grid-column: span 1; }
  .primary-export-band { padding: 19px 15px; }
  .primary-export-copy h2 { font-size: 20px; }
}

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