@font-face {
  font-family: "Simulantion Sans";
  src: url("assets/fonts/DejaVuSans.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: "Simulantion Sans";
  src: url("assets/fonts/DejaVuSans-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600 900;
  font-display: block;
}

@font-face {
  font-family: "Simulantion Serif";
  src: url("assets/fonts/DejaVuSerif.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: "Simulantion Serif";
  src: url("assets/fonts/DejaVuSerif-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600 900;
  font-display: block;
}

:root {
  color-scheme: dark;
  --cream: #e8dfc8;
  --muted: #9f9b86;
  --gold: #d4aa63;
  --gold-bright: #f0ca7a;
  --moss: #8fa45a;
  --dark: #0b0e09;
  --panel: rgba(16, 20, 13, 0.82);
  --edge: rgba(235, 215, 168, 0.15);
  --ui-scale: 1;
  font-family: "Simulantion Sans", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #11160d;
  color: var(--cream);
}

button, input { font: inherit; }
button { color: inherit; }

#game-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 320px;
  isolation: isolate;
  background: radial-gradient(circle at 50% 45%, #3b4425, #10140c);
}

#world {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.atmosphere {
  pointer-events: none;
  position: absolute;
  z-index: 2;
  inset: 0;
  box-shadow: inset 0 0 180px 35px rgba(0,0,0,.46);
  background:
    linear-gradient(180deg, rgba(5,8,4,.18), transparent 22%, transparent 70%, rgba(5,7,3,.24)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.009) 0, rgba(255,255,255,.009) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: normal;
}

.glass {
  background: linear-gradient(135deg, rgba(24,29,19,.91), rgba(10,13,9,.77));
  border: 1px solid var(--edge);
  box-shadow: 0 16px 45px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(14px);
}

.topbar {
  position: absolute;
  z-index: 10;
  top: 18px;
  left: 22px;
  right: 22px;
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 16px 0 18px;
  border-radius: 4px;
  /* The settings control must always remain inside the viewport. Other HUD
     panels honor --ui-scale; the topbar deliberately stays viewport-safe. */
}

.topbar::before, .mission-panel::before, .intel-panel::before, .command-dock::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 2px;
  top: -1px;
  left: 22px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(212,170,99,.45);
}

.brand { display: flex; align-items: center; width: 245px; flex: 0 0 auto; }
.brand-mark { display: block; width: 39px; height: 39px; margin-right: 12px; flex: 0 0 auto; object-fit: contain; }
.brand .brand-name { display: block; font-family: "Simulantion Serif", serif; font-size: 17px; font-weight: 700; letter-spacing: .18em; line-height: 1; white-space: nowrap; }
.brand .brand-name > span { display: inline; margin: 0; color: inherit; font-size: inherit; letter-spacing: inherit; }
.brand .brand-name > .brand-ant { position: relative; color: #e2b963; font-weight: 900; text-shadow: 0 0 10px rgba(212,170,99,.28); }
.brand .brand-name > .brand-ant::after { content: ""; position: absolute; left: -.04em; right: .13em; bottom: -.22em; height: 2px; background: var(--gold); box-shadow: 0 0 7px rgba(212,170,99,.6); }
.brand .brand-meta { display: block; margin-top: 6px; color: #777c6b; font-size: 8px; letter-spacing: .25em; }
.brand b { color: var(--moss); font-weight: 700; }

.resources { height: 100%; display: flex; flex: 1; min-width: 390px; }
.resource { position: relative; height: 100%; min-width: 124px; display: flex; align-items: center; gap: 9px; padding: 0 21px; border-left: 1px solid rgba(255,255,255,.07); }
.resource-icon { width: 21px; height: 21px; position: relative; opacity: .9; }
.food-icon { border: 1px solid var(--gold); border-radius: 50% 45% 50% 35%; transform: rotate(-24deg); }
.food-icon::after { content: ""; position: absolute; width: 8px; height: 1px; background: var(--gold); top: -3px; left: 13px; transform: rotate(-42deg); }
.brood-icon { width: 17px; height: 23px; border: 1px solid #c7c1a7; border-radius: 50%; }
.brood-icon::after { content: ""; position: absolute; inset: 4px; border: 1px solid #c7c1a7; border-radius: 50%; }
.ant-icon::before, .ant-icon::after { content: ""; position: absolute; border: 1px solid var(--gold); border-radius: 50%; }
.ant-icon::before { width: 9px; height: 9px; left: 1px; top: 6px; box-shadow: 9px 2px 0 -2px transparent; }
.ant-icon::after { width: 10px; height: 13px; left: 12px; top: 5px; }
.resource small { display: block; color: #7e816f; font-size: 7px; font-weight: 800; letter-spacing: .2em; }
.resource strong { display: block; margin-top: 3px; font: 18px "Simulantion Serif", serif; color: #efe8d7; }
.resource i { color: var(--moss); font-size: 9px; font-style: normal; }

.world-status { height: 100%; display: flex; align-items: center; margin-left: auto; }
.weather { height: 100%; padding: 0 22px; display: flex; align-items: center; gap: 10px; border-left: 1px solid rgba(255,255,255,.07); }
.weather-glyph { color: var(--gold); font-size: 24px; }
.weather small { display: block; color: #858978; font-size: 7px; letter-spacing: .18em; }
.weather strong { display: block; font: 15px "Simulantion Serif", serif; margin-top: 2px; }
.cycle { width: 142px; margin: 0 21px 0 6px; }
.cycle-row { display: flex; justify-content: space-between; font-size: 7px; color: #7d806f; letter-spacing: .17em; }
.cycle-row b { color: #c7b88f; }
.cycle-track { position: relative; height: 2px; margin-top: 12px; background: rgba(255,255,255,.1); }
.cycle-track i { position: absolute; inset: 0 auto 0 0; width: 18%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.cycle-track span { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-bright); top: -3px; left: calc(18% - 4px); box-shadow: 0 0 10px var(--gold); }
.icon-button { width: 38px; height: 38px; border: 0; border-left: 1px solid rgba(255,255,255,.07); background: transparent; color: #a4a38f; cursor: pointer; }
.icon-button:hover { color: var(--gold-bright); background: rgba(255,255,255,.04); }
.icon-button[aria-pressed="true"] { color: var(--gold-bright); background: rgba(212,170,99,.1); box-shadow: inset 0 -2px rgba(212,170,99,.55); }
.speed-button { width: 44px; color: var(--moss); font-size: 8px; font-weight: 800; letter-spacing: .04em; }

.view-switch {
  position: absolute;
  z-index: 11;
  top: 103px;
  left: 50%;
  display: flex;
  height: 35px;
  padding: 3px;
  transform: translateX(-50%) scale(var(--ui-scale));
  transform-origin: top center;
  border-radius: 3px;
}
.view-switch button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 98px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #727668;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .13em;
  cursor: pointer;
}
.view-switch button i { color: #848879; font-size: 12px; font-style: normal; }
.view-switch button.active { background: rgba(212,170,99,.1); color: var(--gold-bright); }
.view-switch button.active i { color: var(--gold); text-shadow: 0 0 8px rgba(212,170,99,.7); }
.view-switch kbd { align-self: center; margin: 0 4px 0 3px; }

.world-overview, .biome-overview, .world-region-list, .biome-events {
  position: absolute;
  z-index: 9;
  border-radius: 3px;
}
.world-overview, .biome-overview {
  top: 160px;
  left: 22px;
  width: 270px;
  padding: 20px;
}
.world-overview::before, .biome-overview::before, .world-region-list::before, .biome-events::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 22px;
  width: 28px;
  height: 2px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(212,170,99,.42);
}
.world-overview h1, .biome-overview h1 {
  margin: 14px 0 8px;
  color: #f0e7d3;
  font: 27px "Simulantion Serif", serif;
  font-weight: normal;
}
.world-overview > p, .biome-overview > p {
  margin: 0;
  color: #989988;
  font-size: 9px;
  line-height: 1.65;
}
.world-totals, .biome-vitals {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 18px;
  border-top: 1px solid rgba(255,255,255,.065);
  border-left: 1px solid rgba(255,255,255,.065);
}
.world-totals > div, .biome-vitals > div {
  min-height: 54px;
  padding: 10px;
  border-right: 1px solid rgba(255,255,255,.065);
  border-bottom: 1px solid rgba(255,255,255,.065);
}
.world-totals small, .biome-vitals small {
  display: block;
  color: #767a6b;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .14em;
}
.world-totals strong, .biome-vitals strong {
  display: block;
  margin-top: 5px;
  color: #d9cfb8;
  font: 14px "Simulantion Serif", serif;
  font-weight: normal;
}
.world-hint {
  display: block;
  margin-top: 14px;
  color: #777b6c;
  font-size: 6px;
  letter-spacing: .16em;
}
.world-region-list {
  top: 160px;
  right: 22px;
  width: 278px;
  max-height: calc(100vh - 190px);
  padding: 9px;
  overflow: auto;
}
.world-region-button {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-bottom-color: rgba(255,255,255,.055);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.world-region-button:hover, .world-region-button.active {
  border-color: rgba(212,170,99,.23);
  background: rgba(212,170,99,.055);
}
.world-region-button > i {
  width: 22px;
  height: 22px;
  border: 1px solid var(--region-accent, var(--gold));
  border-radius: 50%;
  box-shadow: inset 0 0 12px color-mix(in srgb, var(--region-accent, var(--gold)) 28%, transparent);
}
.world-region-button span strong { display: block; color: #ddd4c0; font: 12px "Simulantion Serif", serif; font-weight: normal; }
.world-region-button span small { display: block; margin-top: 4px; color: #74796b; font-size: 6px; letter-spacing: .11em; }
.world-region-button > b { color: #a2ad77; font-size: 7px; letter-spacing: .08em; }
.world-region-button.active > b { color: var(--gold-bright); }
.biome-overview { width: 282px; }
.biome-vitals strong { font: 10px "Simulantion Sans"; font-weight: 700; letter-spacing: .04em; }
.observe-region {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 15px;
  padding: 12px 14px;
  border: 1px solid rgba(212,170,99,.34);
  background: rgba(212,170,99,.075);
  color: var(--gold-bright);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .14em;
  cursor: pointer;
}
.observe-region:hover { background: rgba(212,170,99,.14); }
.observe-region span { font-size: 14px; }
.biome-events {
  right: 22px;
  bottom: 22px;
  width: 292px;
  padding: 16px;
}
.biome-events ol {
  display: grid;
  gap: 8px;
  max-height: 154px;
  margin: 13px 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}
.biome-events li {
  padding: 8px 0 8px 10px;
  border-left: 2px solid rgba(212,170,99,.34);
  color: #a5a391;
  font-size: 7px;
  line-height: 1.5;
  letter-spacing: .06em;
}
.biome-events > small { color: #6d7164; font-size: 6px; line-height: 1.5; letter-spacing: .08em; }

#game-shell[data-view="world"] .mission-panel,
#game-shell[data-view="world"] .intel-panel,
#game-shell[data-view="world"] .observer-dock,
#game-shell[data-view="world"] .regional-map,
#game-shell[data-view="world"] .zoom-controls,
#game-shell[data-view="world"] .controls-hint,
#game-shell[data-view="world"] .event-feed,
#game-shell[data-view="biome"] .mission-panel,
#game-shell[data-view="biome"] .intel-panel,
#game-shell[data-view="biome"] .observer-dock,
#game-shell[data-view="biome"] .regional-map,
#game-shell[data-view="biome"] .zoom-controls,
#game-shell[data-view="biome"] .controls-hint,
#game-shell[data-view="biome"] .event-feed { display: none; }

#game-shell[data-view="world"] .resources,
#game-shell[data-view="biome"] .resources { visibility: hidden; }

#game-shell[data-biome="desert-grassland"] {
  background: radial-gradient(circle at 50% 45%, #5a4026, #171008);
}

#game-shell[data-view="nest"] .atmosphere {
  background:
    linear-gradient(180deg, rgba(3,2,1,.25), transparent 24%, transparent 74%, rgba(2,1,1,.3)),
    repeating-linear-gradient(0deg, rgba(255,230,190,.01) 0, rgba(255,230,190,.01) 1px, transparent 1px, transparent 3px);
  box-shadow: inset 0 0 210px 50px rgba(0,0,0,.5);
}

.mission-panel, .intel-panel {
  position: absolute;
  z-index: 8;
  top: 111px;
  width: 250px;
  padding: 18px;
  border-radius: 3px;
}
.mission-panel { left: 22px; }
.mission-mobile-toggle { display: none; }
.mission-panel-body { min-width: 0; }
.intel-panel { right: 22px; }
.eyebrow { display: flex; align-items: center; justify-content: space-between; color: #888a78; font-size: 7px; font-weight: 800; letter-spacing: .19em; }
.eyebrow b { color: var(--gold); }
.mission-panel h2 { margin: 13px 0 6px; color: #f2ead7; font: 21px "Simulantion Serif", serif; font-weight: normal; }
.mission-panel p { min-height: 32px; margin: 0 0 17px; color: #999b8b; font-size: 10px; line-height: 1.55; }
.objective-row, .threat-section > div:first-child { display: flex; justify-content: space-between; font-size: 8px; color: #aaab9c; letter-spacing: .06em; }
.objective-row b { color: #d8cba8; }
.objective-track, .threat-track { height: 3px; margin-top: 8px; background: rgba(255,255,255,.08); overflow: hidden; }
.objective-track i, .threat-track i { display: block; width: 0%; height: 100%; background: linear-gradient(90deg, #8d9954, var(--gold)); transition: width .5s; }
.colony-outlook { margin-top: 13px; padding: 9px 10px; border-left: 2px solid rgba(153,170,101,.42); background: rgba(113,132,76,.075); }
.colony-outlook > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #777b6b; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.colony-outlook > div b { color: #a7b781; text-align: right; }
.colony-outlook[data-severity="watch"] { border-left-color: rgba(212,170,99,.55); background: rgba(145,105,57,.09); }
.colony-outlook[data-severity="watch"] > div b { color: #d4aa63; }
.colony-outlook[data-severity="danger"] { border-left-color: rgba(209,116,89,.58); background: rgba(150,70,53,.09); }
.colony-outlook[data-severity="danger"] > div b { color: #d17459; }
.mission-panel .colony-outlook p, .mission-panel .environment-explanation { min-height: 0; margin: 6px 0 0; color: #a6a796; font-size: 12px; line-height: 1.5; }
.environment-summary { margin-top: 14px; padding-top: 11px; border-top: 1px solid rgba(255,255,255,.06); }
.environment-summary > div:first-child { display: flex; align-items: center; justify-content: space-between; color: #777b6b; font-size: 6px; font-weight: 800; letter-spacing: .14em; }
.environment-summary > div:first-child b { color: #a7b781; }
.environment-summary[data-severity="watch"] > div:first-child b { color: #d4aa63; }
.environment-summary[data-severity="danger"] > div:first-child b { color: #d17459; text-shadow: 0 0 8px rgba(209,116,89,.25); }
.environment-summary[data-severity="winter"] > div:first-child b { color: #a8c2cb; text-shadow: 0 0 9px rgba(137,181,196,.24); }
.mission-panel .winter-explanation { min-height: 0; margin: 10px 0 2px; padding: 9px 10px; border-left: 2px solid rgba(137,181,196,.45); background: rgba(80,112,124,.11); color: #b7c3c2; font-size: 11px; line-height: 1.5; }
.environment-grid { display: grid; grid-template-columns: repeat(3, 1fr); row-gap: 9px; margin: 9px -6px 0; }
.environment-grid > span { min-width: 0; padding: 0 6px; border-left: 1px solid rgba(255,255,255,.055); }
.environment-grid > span:nth-child(3n+1) { border-left: 0; }
.environment-grid small, .environment-grid b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.environment-grid small { color: #64695c; font-size: 5px; font-weight: 800; letter-spacing: .08em; }
.environment-grid b { margin-top: 4px; color: #bbb9a1; font: 9px "Simulantion Serif", serif; font-weight: normal; }
.mission-panel .environment-explanation { margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.05); color: #999d8c; }
.reward { display: flex; justify-content: space-between; margin: 15px -18px -18px; padding: 11px 18px; border-top: 1px solid rgba(255,255,255,.06); font-size: 7px; color: #737767; }
.reward b { color: #aeb291; font-weight: 600; }

.live-dot { position: relative; padding-left: 10px; color: #90a85b !important; }
.live-dot::before { content: ""; position: absolute; left: 0; top: 3px; width: 4px; height: 4px; border-radius: 50%; background: #95b25c; box-shadow: 0 0 7px #95b25c; }
.queen-card { display: flex; align-items: center; margin: 14px 0; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }
.queen-sigil { display: grid; place-items: center; width: 31px; height: 31px; margin-right: 9px; border: 1px solid rgba(212,170,99,.35); border-radius: 50%; color: var(--gold); font-size: 16px; }
.queen-card div:nth-child(2) { flex: 1; }
.queen-card small { display: block; color: #717566; font-size: 6px; letter-spacing: .15em; }
.queen-card strong { display: block; margin-top: 4px; color: #9fad74; font-size: 8px; letter-spacing: .12em; }
.vital-ring { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(var(--moss) 96%, rgba(255,255,255,.08) 0); }
.vital-ring::before { content: ""; position: absolute; width: 28px; height: 28px; border-radius: 50%; background: #161b12; }
.vital-ring span { z-index: 1; font: 10px "Simulantion Serif", serif; }
.castes { display: grid; gap: 9px; }
.castes > div { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; color: #a3a494; font-size: 9px; }
.castes b { color: #e2d9c3; font: 12px "Simulantion Serif", serif; }
.caste-dot { width: 5px; height: 5px; border-radius: 50%; box-shadow: 0 0 5px currentColor; }
.caste-dot.worker { color: #d1a15d; background: currentColor; }
.caste-dot.scout { color: #91a75e; background: currentColor; }
.caste-dot.soldier { color: #a95d4c; background: currentColor; }
.threat-section { margin-top: 15px; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.06); }
.threat-section b { color: #9eaa74; }
.threat-track i { width: 12%; background: linear-gradient(90deg, #8b995b, #b95e45); }
.text-button { width: 100%; margin-top: 14px; padding: 9px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.02); color: #939582; font-size: 7px; letter-spacing: .16em; cursor: pointer; }
.text-button:hover { border-color: rgba(212,170,99,.4); color: var(--gold); }
kbd { padding: 2px 5px; border: 1px solid rgba(255,255,255,.14); border-radius: 2px; background: rgba(0,0,0,.18); color: #8c8e7c; font: 7px inherit; box-shadow: none; }

.event-feed { position: absolute; z-index: 7; left: 22px; bottom: 123px; display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
.event { min-width: 220px; padding: 9px 12px; border-left: 2px solid var(--moss); background: rgba(9,12,8,.68); backdrop-filter: blur(8px); color: #b8b6a4; font-size: 8px; letter-spacing: .05em; animation: event-in .35s ease both; transition: opacity .5s, transform .5s; }
.event b { color: var(--gold-bright); font-weight: 700; }
.event.danger { border-color: #b65c47; }
.event.out { opacity: 0; transform: translateX(-10px); }
@keyframes event-in { from { opacity: 0; transform: translateX(-10px); } }

.selection-card { position: absolute; z-index: 9; left: 22px; top: 332px; width: 292px; min-height: 145px; padding: 16px; transition: opacity .2s, transform .2s; }
.selection-card.hidden { display: none; }
.selection-card > .selection-close { position: absolute; top: 8px; right: 9px; border: 0; background: none; color: #777b6d; cursor: pointer; }
.selection-icon { float: left; display: grid; place-items: center; width: 36px; height: 36px; margin-right: 10px; border: 1px solid rgba(212,170,99,.3); border-radius: 50%; color: var(--gold); }
.selection-card small { color: #777b6b; font-size: 6px; letter-spacing: .18em; }
.selection-card h3 { margin: 3px 0 15px; font: 16px "Simulantion Serif", serif; }
.selection-card p { clear: both; color: #969789; font-size: 9px; line-height: 1.45; }
.selection-details { display: grid; grid-template-columns: 1fr 1fr; margin: 11px 0 9px; border: 1px solid rgba(255,255,255,.06); background: rgba(3,7,4,.28); }
.selection-details.hidden { display: none; }
.selection-details > span { min-width: 0; padding: 8px 7px; border-right: 1px solid rgba(255,255,255,.05); border-bottom: 1px solid rgba(255,255,255,.05); }
.selection-details > span:nth-child(2n) { border-right: 0; }
.selection-details > span:nth-last-child(-n+2) { border-bottom: 0; }
.selection-details small { display: block; margin-bottom: 4px; color: #747a69; font-size: 6px; }
.selection-details b { display: block; overflow: hidden; color: #c2c2ad; font-size: 8px; font-weight: 700; line-height: 1.4; text-overflow: ellipsis; }
.selection-stat { display: flex; justify-content: space-between; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.07); color: #818474; font-size: 7px; letter-spacing: .15em; }
.selection-stat b { color: var(--gold); }
.selection-card .follow-button { width: 100%; margin-top: 11px; padding: 8px; border: 1px solid rgba(143,164,90,.35); background: rgba(143,164,90,.06); color: #b8c58e; font-size: 7px; font-weight: 800; letter-spacing: .15em; cursor: pointer; }
.selection-card .follow-button:hover, .selection-card .follow-button.active { border-color: rgba(212,170,99,.55); color: var(--gold-bright); }

.command-dock {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: 18px;
  height: 84px;
  display: flex;
  align-items: stretch;
  transform: translateX(-50%) scale(var(--ui-scale));
  transform-origin: bottom center;
  border-radius: 3px;
}
.command-dock::before { left: 18px; }
.nest-dock .command-glyph { color: #c89357; border-color: rgba(200,147,81,.28); }
.nest-dock .command:hover strong { color: var(--gold-bright); }
.command-title { width: 116px; display: flex; flex-direction: column; justify-content: center; padding-left: 17px; }
.command-title span { font-size: 8px; font-weight: 800; letter-spacing: .2em; }
.command-title small { margin-top: 5px; color: #696d61; font-size: 6px; letter-spacing: .12em; }
.command { position: relative; width: 142px; display: grid; grid-template-columns: 32px 1fr; align-items: center; padding: 0 9px; border: 0; border-left: 1px solid rgba(255,255,255,.07); background: transparent; text-align: left; cursor: pointer; }
.command:hover { background: rgba(255,255,255,.035); }
.command.active { background: linear-gradient(180deg, rgba(212,170,99,.09), transparent); }
.command.active::after { content: ""; position: absolute; bottom: 0; left: 15%; right: 15%; height: 2px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.command > kbd { position: absolute; top: 8px; right: 8px; }
.command-glyph { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid rgba(212,170,99,.26); border-radius: 50%; color: var(--gold); font-size: 16px; }
.command strong { display: block; color: #bebaa9; font-size: 8px; letter-spacing: .12em; }
.command small { display: block; margin-top: 5px; color: #6f7366; font-size: 7px; }
.command.active strong { color: var(--gold-bright); }

#game-shell[data-mode="observe"] .manual-dock { display: none !important; }
#game-shell[data-mode="manual"] .observer-dock { display: none !important; }

.observer-dock {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: 18px;
  width: min(880px, calc(100vw - 44px));
  height: 72px;
  display: grid;
  grid-template-columns: 146px repeat(4, minmax(0, 1fr));
  align-items: stretch;
  transform: translateX(-50%) scale(var(--ui-scale));
  transform-origin: bottom center;
  border-radius: 3px;
}
.observer-dock::before { content: ""; position: absolute; top: -1px; left: 18px; width: 24px; height: 2px; background: var(--moss); box-shadow: 0 0 12px rgba(143,164,90,.5); }
.observer-title { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 17px; }
.observer-title span { color: #c5c0ac; font-size: 7px; font-weight: 800; letter-spacing: .17em; }
.observer-title small { margin-top: 5px; color: #69705d; font-size: 6px; letter-spacing: .12em; }
.activity { position: relative; min-width: 0; width: 100%; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 0; border-left: 1px solid rgba(255,255,255,.07); background: transparent; color: inherit; font: inherit; text-align: left; }
button.activity[aria-disabled="false"] { cursor: pointer; }
button.activity[aria-disabled="false"]:hover { background: rgba(255,255,255,.035); }
button.activity[aria-disabled="true"] { cursor: default; }
.activity > i { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 auto; border: 1px solid rgba(143,164,90,.2); border-radius: 50%; color: #737869; font-style: normal; font-size: 14px; }
.activity > span { min-width: 0; flex: 1 1 auto; }
.activity > span strong { display: block; color: #8f9182; font-size: 7px; letter-spacing: .13em; }
.activity > span small { display: block; max-width: none; margin-top: 5px; overflow: visible; color: #62675a; font-size: 6px; letter-spacing: .07em; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; }
.activity.active::after { content: ""; position: absolute; top: 12px; right: 11px; width: 3px; height: 3px; border-radius: 50%; background: var(--moss); box-shadow: 0 0 7px var(--moss); }
.activity.active > i { border-color: rgba(143,164,90,.42); color: #a8ba70; }
.activity.active > span strong { color: #bdc99b; }
.activity.danger::after { background: #bd6047; box-shadow: 0 0 7px #bd6047; }
.activity.danger > i { border-color: rgba(189,96,71,.5); color: #c46d54; }
.activity.danger > span strong { color: #d28a72; }

.zoom-controls { position: absolute; z-index: 8; right: 22px; bottom: 25px; display: flex; height: 31px; align-items: center; border-radius: 3px; }
.zoom-controls button { width: 31px; height: 30px; border: 0; background: transparent; color: #a8a998; cursor: pointer; }
.zoom-controls span { width: 1px; height: 12px; background: rgba(255,255,255,.1); }
.controls-hint { position: absolute; z-index: 7; right: 22px; bottom: 68px; padding: 8px 10px; display: flex; gap: 12px; color: #75796c; font-size: 6px; letter-spacing: .12em; transition: opacity .5s; }
.controls-hint b { color: #a8a998; }
.camera-status { position: absolute; z-index: 13; left: 50%; bottom: 122px; display: flex; align-items: center; gap: 8px; min-height: 31px; max-width: min(420px, calc(100vw - 30px)); padding: 7px 11px; transform: translateX(-50%) scale(var(--ui-scale)); transform-origin: bottom center; color: #858a78; font-size: 9px; font-weight: 800; letter-spacing: .11em; white-space: nowrap; }
.camera-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--moss); box-shadow: 0 0 8px var(--moss); }
.camera-status b { overflow: hidden; color: #d9c897; text-overflow: ellipsis; }
.mouse-icon { display: inline-block; width: 7px; height: 10px; margin-right: 4px; border: 1px solid #8e9182; border-radius: 4px; vertical-align: -2px; }

.depth-readout {
  position: absolute;
  z-index: 8;
  right: 22px;
  top: 418px;
  width: 66px;
  padding: 11px 8px;
  text-align: center;
}
.depth-readout > span { display: block; color: #777668; font-size: 5px; font-weight: 800; letter-spacing: .16em; }
.depth-readout > div { position: relative; width: 1px; height: 74px; margin: 9px auto; background: linear-gradient(#a87b44, #3d2919); }
.depth-readout > div::before, .depth-readout > div::after { content: ""; position: absolute; left: -4px; width: 9px; height: 1px; background: #7b6342; }
.depth-readout > div::before { top: 0; }
.depth-readout > div::after { bottom: 0; }
.depth-readout i { position: absolute; left: -2px; width: 5px; height: 5px; border-radius: 50%; background: #886b42; }
.depth-readout i:nth-child(1) { top: 12%; }.depth-readout i:nth-child(2) { top: 38%; }.depth-readout i:nth-child(3) { top: 64%; }.depth-readout i:nth-child(4) { top: 88%; background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.depth-readout b { color: #ba9d6c; font: 9px "Simulantion Serif", serif; }

.nest-task-key {
  position: absolute;
  z-index: 8;
  right: 22px;
  bottom: 112px;
  width: 268px;
  padding: 13px 14px 11px;
}
.nest-task-heading { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: start; gap: 10px; }
.nest-task-heading span { color: #b7a37c; font-size: 6px; font-weight: 800; letter-spacing: .16em; }
.nest-task-heading b { min-width: 0; color: #8f9f71; font-size: 6px; letter-spacing: .1em; text-align: right; }
.nest-task-key p { margin: 9px 0 11px; color: #898777; font: 8px/1.45 "Simulantion Serif", serif; }
.nest-status-grid { display: grid; gap: 4px; margin: 0 0 9px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.05); }
.nest-status-grid > span { display: grid; grid-template-columns: 86px minmax(0, 1fr); align-items: start; gap: 8px; min-width: 0; }
.nest-status-grid small { min-width: 0; color: #66695d; font-size: 5px; font-weight: 800; letter-spacing: .1em; line-height: 1.35; white-space: normal; }
.nest-status-grid b { display: block; min-width: 0; color: #aca989; font-size: 5px; letter-spacing: .06em; line-height: 1.35; text-align: right; white-space: normal; overflow-wrap: anywhere; }
.nest-task-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; padding: 9px 0; border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }
.nest-task-grid > div { --task-color: #b99657; display: grid; grid-template-columns: 7px 1fr auto; align-items: center; gap: 5px; min-width: 0; color: #777b6d; font-size: 5px; font-weight: 800; letter-spacing: .08em; }
.nest-task-grid i { width: 5px; height: 5px; border-radius: 50%; background: var(--task-color); box-shadow: 0 0 5px var(--task-color); }
.nest-task-grid span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nest-task-grid b { color: var(--task-color); font: 8px "Simulantion Serif", serif; }
.nest-task-grid [data-task="carrier"] { --task-color: #d5aa5d; }
.nest-task-grid [data-task="nurse"] { --task-color: #d4cfb2; }
.nest-task-grid [data-task="attendant"] { --task-color: #c78362; }
.nest-task-grid [data-task="sanitation"] { --task-color: #8f9b62; }
.nest-task-grid [data-task="maintenance"] { --task-color: #78a0a0; }
.nest-task-grid [data-task="excavator"] { --task-color: #c27643; }
.nest-task-grid [data-task="forager"] { --task-color: #9fba66; }
.nest-task-key > small { display: block; margin-top: 8px; color: #5f6256; font-size: 5px; line-height: 1.4; letter-spacing: .09em; }

.regional-map {
  position: absolute;
  z-index: 8;
  right: 22px;
  bottom: 112px;
  width: 232px;
  padding: 11px 11px 9px;
}
.regional-map > div { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: #777b6b; font-size: 6px; font-weight: 800; letter-spacing: .13em; }
.regional-map > div b { color: #a9ad91; font-size: 6px; }
.regional-map > div b i { display: inline-block; width: 4px; height: 4px; margin-right: 4px; border-radius: 50%; background: var(--moss); box-shadow: 0 0 6px var(--moss); }
.regional-map canvas { display: block; width: 210px; height: 112px; border: 1px solid rgba(255,255,255,.06); background: rgba(4,7,4,.52); cursor: pointer; }
.regional-map > .surface-task-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 8px; margin: 8px 0 0; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.055); border-bottom: 1px solid rgba(255,255,255,.055); }
.surface-task-legend span { --task-color: #9fba66; display: flex; align-items: center; gap: 5px; min-width: 0; color: #858978; font-size: 6px; letter-spacing: .08em; }
.surface-task-legend i { width: 5px; height: 5px; border-radius: 50%; background: var(--task-color); box-shadow: 0 0 5px var(--task-color); }
.surface-task-legend [data-task="carry"] { --task-color: #d5aa5d; }.surface-task-legend [data-task="security"] { --task-color: #c75b49; }.surface-task-legend [data-task="homing"] { --task-color: #78a0a0; }
.regional-map > small { display: block; margin-top: 7px; color: #5e6256; font-size: 5px; letter-spacing: .1em; }
#game-shell[data-view="nest"] .regional-map { display: none; }
#game-shell[data-view="nest"] .intel-panel { display: none; }

.cursor-label { position: absolute; z-index: 12; pointer-events: none; display: flex; align-items: center; gap: 7px; padding: 6px 8px; border: 1px solid rgba(212,170,99,.25); background: rgba(10,13,8,.75); backdrop-filter: blur(5px); font-size: 6px; letter-spacing: .13em; }
.cursor-label span { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.hidden { display: none !important; }

.intro { position: fixed; z-index: 40; inset: 0; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 65%, rgba(66,75,36,.32), rgba(5,7,4,.95) 66%), rgba(5,7,4,.85); backdrop-filter: blur(7px); transition: opacity 1s ease, visibility 1s; }
.intro::before { content: ""; position: absolute; inset: 0; background: linear-gradient(112deg, transparent 35%, rgba(222,199,134,.07) 45%, transparent 58%); animation: intro-light 8s ease-in-out infinite alternate; }
.intro.dismissed { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-noise { position: absolute; inset: -50%; opacity: .12; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E"); animation: noise 1s steps(2) infinite; }
.intro-content { position: relative; width: min(580px, calc(100% - 40px)); text-align: center; }
.intro-kicker { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .42em; }
.intro h1 { margin: 21px 0 18px; font: 72px/.8 "Simulantion Serif", serif; font-weight: normal; letter-spacing: .05em; text-shadow: 0 4px 30px #000; }
.intro h1 .intro-ant { position: relative; color: var(--gold); font-weight: 700; }
.intro h1 .intro-ant::after { content: ""; position: absolute; left: .02em; right: .04em; bottom: -.12em; height: 3px; background: var(--gold); box-shadow: 0 0 8px rgba(224,174,87,.32); }
.intro p { width: min(480px, 90%); margin: 0 auto 31px; color: #aaa999; font: 14px/1.7 "Simulantion Serif", serif; }
.intro-guide { display: grid; grid-template-columns: repeat(4, 1fr); width: min(570px, 100%); margin: -10px auto 22px; border: 1px solid rgba(255,255,255,.07); background: rgba(5,8,4,.24); }
.intro-guide span { min-width: 0; padding: 10px 7px; border-right: 1px solid rgba(255,255,255,.06); }
.intro-guide span:last-child { border-right: 0; }
.intro-guide b, .intro-guide small { display: block; }
.intro-guide b { color: #c9bd9e; font-size: 9px; letter-spacing: .14em; }
.intro-guide small { margin-top: 4px; color: #737769; font-size: 7px; line-height: 1.35; letter-spacing: .07em; }
.intro button { position: relative; width: 235px; height: 49px; padding: 0 10px 0 25px; border: 1px solid rgba(212,170,99,.6); background: rgba(212,170,99,.08); color: var(--gold-bright); font-size: 8px; letter-spacing: .2em; cursor: pointer; overflow: hidden; }
.intro button::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(212,170,99,.16), transparent); transform: translateX(-100%); transition: transform .5s; }
.intro button:hover::before { transform: translateX(100%); }
.intro button span { position: relative; }
.intro button i { position: relative; float: right; font-style: normal; font-size: 15px; }
.intro .intro-species { display: flex; align-items: center; justify-content: space-between; width: min(360px, 90%); height: 45px; margin: 0 auto 10px; padding: 0 15px; border-color: rgba(158,177,113,.36); background: rgba(112,132,72,.08); color: #bbc69a; text-align: left; letter-spacing: .12em; }
.intro .intro-species span { display: grid; gap: 3px; }
.intro .intro-species small { color: #69715d; font-size: 5px; font-weight: 800; letter-spacing: .2em; }
.intro .intro-species strong { color: #c4c9ab; font-size: 7px; letter-spacing: .14em; }
.intro .intro-species i { color: #8e9b70; font-size: 7px; letter-spacing: .1em; }
.intro-content > small { display: block; margin-top: 17px; color: #5f6257; font-size: 6px; letter-spacing: .17em; }
@keyframes noise { to { transform: translate3d(3%,-2%,0); } }
@keyframes intro-light { to { transform: translateX(10%); opacity: .5; } }

.pause-overlay { position: fixed; z-index: 35; inset: 0; display: grid; place-content: center; text-align: center; background: rgba(5,7,4,.66); backdrop-filter: blur(5px); }
.pause-overlay > span { color: var(--gold); font-size: 7px; letter-spacing: .34em; }
.pause-overlay h2 { margin: 12px 0 24px; font: 34px "Simulantion Serif", serif; font-weight: normal; }
.pause-overlay button { padding: 12px 20px; border: 1px solid rgba(212,170,99,.4); background: rgba(20,25,16,.8); color: var(--gold); font-size: 8px; letter-spacing: .16em; cursor: pointer; }

dialog { width: min(410px, calc(100% - 30px)); padding: 30px; border: 1px solid rgba(212,170,99,.28); background: #131810; color: var(--cream); box-shadow: 0 30px 90px #000; }
dialog::backdrop { background: rgba(3,5,2,.76); backdrop-filter: blur(5px); }
dialog h2 { margin: 9px 0 25px; font: 28px "Simulantion Serif", serif; font-weight: normal; }
.dialog-close { position: absolute; top: 12px; right: 14px; border: 0; background: none; color: #858778; font-size: 20px; cursor: pointer; }
dialog label { display: grid; grid-template-columns: 1fr 150px; align-items: center; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.06); color: #9ea08f; font-size: 9px; letter-spacing: .08em; }
input[type="range"] { accent-color: var(--gold); }
dialog select { min-height: 34px; padding: 6px 9px; border: 1px solid rgba(212,170,99,.28); background: #0d120b; color: #c8c4ad; font: inherit; letter-spacing: .04em; }
.toggle-row input { display: none; }
.toggle-row i { justify-self: end; width: 34px; height: 18px; padding: 2px; border-radius: 10px; background: #303428; }
.toggle-row i::after { content: ""; display: block; width: 14px; height: 14px; border-radius: 50%; background: #8d8d7d; transition: transform .2s; }
.toggle-row input:checked + i { background: #71623e; }
.toggle-row input:checked + i::after { transform: translateX(16px); background: var(--gold); }
.dialog-actions { display: flex; gap: 9px; margin-top: 24px; }
.dialog-actions button { flex: 1; padding: 11px; border: 1px solid rgba(255,255,255,.1); background: transparent; color: #929485; font-size: 8px; letter-spacing: .14em; cursor: pointer; }
.dialog-actions button:last-child { border-color: rgba(212,170,99,.45); color: var(--gold); }
.settings-note { display: block; margin-top: 12px; color: #74786a; font-size: 7px; letter-spacing: .08em; }

.species-dialog { width: min(980px, calc(100% - 30px)); max-height: min(880px, calc(100% - 30px)); padding: 34px; overflow: auto; }
.species-dialog .intro-kicker { font-size: 13px; letter-spacing: .3em; }
.species-dialog h2 { margin: 11px 0 10px; font-size: 34px; }
.species-dialog .dialog-close { font-size: 26px; }
.species-intro { max-width: 760px; margin: 0 0 24px; color: #a5a998; font: 15px/1.6 "Simulantion Serif", serif; }
.species-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.species-option { min-height: 132px; padding: 18px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.018); color: #aeb2a1; text-align: left; cursor: pointer; }
.species-option:hover { border-color: rgba(212,170,99,.24); }
.species-option.selected { border-color: rgba(212,170,99,.58); background: rgba(212,170,99,.07); }
.species-option[data-availability="researching"] { opacity: .52; }
.species-option small, .species-detail small { display: block; color: #929987; font-size: 13px; font-weight: 800; letter-spacing: .13em; line-height: 1.35; }
.species-option strong { display: block; margin: 12px 0 7px; color: #e1d8bc; font: 21px/1.25 "Simulantion Serif", serif; font-weight: normal; }
.species-option em { color: #9ca090; font: italic 13px/1.4 "Simulantion Serif", serif; }
.species-detail { margin-top: 16px; padding: 22px; border: 1px solid rgba(255,255,255,.07); background: rgba(5,8,4,.34); }
.species-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.species-detail-heading > span { display: grid; gap: 4px; }
.species-detail-heading strong { color: #eee3c6; font: 27px/1.2 "Simulantion Serif", serif; font-weight: normal; }
.species-detail-heading em { color: #a5aa98; font: italic 14px/1.4 "Simulantion Serif", serif; }
.species-detail-heading > b { max-width: 240px; padding: 9px 11px; border: 1px solid rgba(158,177,113,.28); color: #b4c68c; font-size: 13px; line-height: 1.4; letter-spacing: .11em; }
.species-detail > p { margin: 16px 0; color: #c1c4b1; font: 15px/1.65 "Simulantion Serif", serif; }
.species-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }
.species-facts > span { padding: 14px; border-right: 1px solid rgba(255,255,255,.06); }
.species-facts > span:last-child { border: 0; }
.species-facts b { display: block; margin-top: 7px; color: #d0d0ba; font-size: 13px; font-weight: 600; line-height: 1.4; letter-spacing: .035em; }
.species-detail ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin: 17px 0; padding: 0; list-style: none; }
.species-detail li { position: relative; padding-left: 17px; color: #b7baa7; font-size: 13px; line-height: 1.55; letter-spacing: .025em; }
.species-detail li::before { content: "•"; position: absolute; left: 0; color: var(--gold); }
.species-conflict { padding: 14px 16px; border-left: 3px solid #84935f; background: rgba(119,138,78,.07); }
.species-conflict p { margin: 8px 0 0; color: #c5cbb0; font: 14px/1.6 "Simulantion Serif", serif; }
.species-dialog .dialog-actions { position: sticky; z-index: 2; bottom: -1px; justify-content: flex-end; margin-top: 12px; padding-top: 20px; background: linear-gradient(to bottom, rgba(19,24,16,0), #131810 38%); }
.species-dialog .dialog-actions button { flex: 0 1 230px; min-height: 46px; font-size: 14px; font-weight: 700; }
.species-dialog .dialog-actions button:disabled { opacity: .35; cursor: not-allowed; }

.observatory-dialog { width: min(900px, calc(100% - 30px)); max-height: min(900px, calc(100% - 30px)); padding: 26px 28px 22px; overflow: auto; }
.observatory-dialog h2 { margin-bottom: 18px; }
.observatory-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.07); border-bottom: 1px solid rgba(255,255,255,.07); }
.speed-options, .overlay-options { display: flex; align-items: center; gap: 6px; }
.speed-options > span { margin-right: 5px; color: #777c6b; font-size: 6px; font-weight: 800; letter-spacing: .18em; }
.speed-options button { min-width: 38px; padding: 7px 8px; border: 1px solid rgba(255,255,255,.09); background: transparent; color: #858978; font-size: 7px; cursor: pointer; }
.speed-options button.active { border-color: rgba(212,170,99,.48); background: rgba(212,170,99,.08); color: var(--gold-bright); }
.observatory-dialog .overlay-options label { display: flex; grid-template-columns: none; gap: 6px; padding: 0; border: 0; color: #858978; font-size: 6px; white-space: nowrap; cursor: pointer; }
.overlay-options input { width: 11px; height: 11px; margin: 0; accent-color: var(--moss); }
.observatory-metrics { display: grid; grid-template-columns: repeat(6, 1fr); margin: 17px 0; border: 1px solid rgba(255,255,255,.07); }
.observatory-metrics > div { min-width: 0; padding: 12px 10px; border-right: 1px solid rgba(255,255,255,.07); }
.observatory-metrics > div:last-child { border-right: 0; }
.observatory-metrics small { display: block; overflow: hidden; color: #6e7363; font-size: 5px; font-weight: 800; letter-spacing: .13em; white-space: nowrap; text-overflow: ellipsis; }
.observatory-metrics strong { display: block; margin-top: 6px; color: #ddd4bd; font: 17px "Simulantion Serif", serif; }
.ethology-panel { margin-bottom: 13px; border: 1px solid rgba(143,164,90,.16); background: rgba(12,18,9,.36); }
.ethology-panel > div:first-child { display: flex; justify-content: space-between; padding: 9px 11px; border-bottom: 1px solid rgba(255,255,255,.055); color: #8f9c70; font-size: 6px; font-weight: 800; letter-spacing: .14em; }
.ethology-panel > div:first-child small { color: #616858; font-size: 5px; }
.ethology-metrics { display: grid; grid-template-columns: repeat(6, 1fr); }
.ethology-metrics > div { min-width: 0; padding: 10px; border-right: 1px solid rgba(255,255,255,.055); }
.ethology-metrics > div:last-child { border-right: 0; }
.ethology-metrics small { display: block; overflow: hidden; color: #69705e; font-size: 5px; letter-spacing: .11em; white-space: nowrap; text-overflow: ellipsis; }
.ethology-metrics strong { display: block; margin-top: 5px; color: #b9c596; font: 13px "Simulantion Serif", serif; }
.history-panel, .observatory-log { border: 1px solid rgba(255,255,255,.07); background: rgba(5,8,4,.28); }
.history-panel > div:first-child, .observatory-log > div:first-child { display: flex; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.06); color: #898d7c; font-size: 6px; font-weight: 800; letter-spacing: .14em; }
.history-panel b { color: var(--gold); }
.history-panel canvas { display: block; width: 100%; height: 190px; }
.chart-legend { display: flex; gap: 18px; padding: 0 12px 10px; color: #717667; font-size: 6px; letter-spacing: .14em; }
.chart-legend span::before { content: ""; display: inline-block; width: 11px; height: 2px; margin-right: 6px; vertical-align: 2px; background: currentColor; }
.chart-legend .food { color: #d4aa63; }.chart-legend .population { color: #9fb66a; }.chart-legend .brood { color: #b7b0cf; }
.observatory-log { margin-top: 13px; }
.observatory-log ol { height: 116px; margin: 0; padding: 6px 12px; overflow: auto; list-style: none; }
.observatory-log li { display: grid; grid-template-columns: 54px 64px 1fr; gap: 9px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.045); color: #929586; font-size: 7px; letter-spacing: .06em; }
.observatory-log time { color: #666b5d; }.observatory-log b { color: var(--gold); }.observatory-log .danger { color: #c57963; }
.observatory-dialog footer { margin-top: 12px; color: #5f6457; font-size: 6px; letter-spacing: .12em; text-align: center; }

#tooltip { position: fixed; z-index: 80; max-width: 190px; padding: 7px 9px; background: #0b0e09; border: 1px solid rgba(212,170,99,.2); color: #aaa999; font-size: 8px; line-height: 1.4; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
#tooltip.visible { opacity: 1; transform: translateY(0); }

/* Readable field-interface typography. The original 5–9px labels looked
   atmospheric at screenshot size, but were too small during actual play.
   Keep the compact top navigation unchanged and give every working surface
   a practical text floor with enough panel space to support it. */
.mission-panel, .intel-panel { width: 280px; }
.world-overview, .biome-overview { width: 300px; }
.world-region-list { width: 320px; }
.biome-events { width: 320px; }
.selection-card { top: 160px; left: 322px; width: 316px; }
.nest-task-key { width: 300px; }

.view-switch button { min-width: 112px; font-size: 10px; letter-spacing: .1em; }
.view-switch button i { font-size: 14px; }
.view-switch kbd, kbd { font-size: 9px; }

.world-overview > p, .biome-overview > p { font-size: 13px; line-height: 1.6; }
.world-totals small, .biome-vitals small { font-size: 10px; letter-spacing: .1em; line-height: 1.35; }
.world-totals strong, .biome-vitals strong { font-size: 15px; }
.biome-vitals strong { font-size: 12px; }
.world-hint { font-size: 10px; line-height: 1.45; letter-spacing: .1em; }
.world-region-button { min-height: 70px; }
.world-region-button span strong { font-size: 14px; }
.world-region-button span small { font-size: 10px; line-height: 1.35; letter-spacing: .07em; }
.world-region-button > b { font-size: 10px; }
.observe-region { font-size: 11px; }
.biome-events li { font-size: 11px; line-height: 1.55; }
.biome-events > small { font-size: 10px; }

.eyebrow { font-size: 10px; letter-spacing: .14em; }
.mission-panel p { font-size: 13px; line-height: 1.55; }
.objective-row, .threat-section > div:first-child { font-size: 11px; }
.environment-summary > div:first-child { font-size: 10px; letter-spacing: .1em; }
.environment-grid { row-gap: 11px; }
.environment-grid small { font-size: 9px; line-height: 1.3; letter-spacing: .04em; }
.environment-grid b { font-size: 12px; }
.reward { font-size: 10px; }
.queen-card small { font-size: 10px; letter-spacing: .1em; }
.queen-card strong { font-size: 11px; letter-spacing: .08em; }
.castes > div { font-size: 12px; }
.castes b { font-size: 14px; }
.text-button { min-height: 36px; font-size: 11px; letter-spacing: .11em; }

.event { font-size: 11px; line-height: 1.4; }
.selection-card small { font-size: 10px; letter-spacing: .12em; }
.selection-card p { font-size: 13px; line-height: 1.5; }
.selection-details small { font-size: 9px; line-height: 1.3; }
.selection-details b { font-size: 11px; }
.selection-stat { font-size: 10px; letter-spacing: .1em; }
.selection-card .follow-button { min-height: 36px; font-size: 11px; letter-spacing: .1em; }

.command-dock { height: 94px; }
.command-title { width: 132px; }
.command-title span { font-size: 11px; letter-spacing: .14em; }
.command-title small { font-size: 9px; line-height: 1.35; }
.command { width: 154px; grid-template-columns: 36px 1fr; }
.command-glyph { width: 30px; height: 30px; }
.command strong { font-size: 11px; line-height: 1.2; letter-spacing: .08em; }
.command small { font-size: 9px; line-height: 1.35; }
.observer-dock { height: 84px; }
.observer-title span { font-size: 10px; letter-spacing: .12em; }
.observer-title small { font-size: 9px; line-height: 1.35; }
.activity > span strong { font-size: 10px; line-height: 1.2; letter-spacing: .09em; }
.activity > span small { font-size: 9px; line-height: 1.3; }
.controls-hint { font-size: 10px; letter-spacing: .08em; }

.depth-readout { width: 74px; }
.depth-readout > span { font-size: 9px; letter-spacing: .1em; }
.depth-readout b { font-size: 11px; }
.nest-task-heading span, .nest-task-heading b { font-size: 10px; letter-spacing: .09em; }
.nest-task-key p { font-size: 11px; line-height: 1.5; }
.nest-status-grid { gap: 6px; }
.nest-status-grid small, .nest-status-grid b { font-size: 9px; line-height: 1.35; }
.nest-task-grid { gap: 7px 12px; }
.nest-task-grid > div { font-size: 9px; letter-spacing: .04em; }
.nest-task-grid b { font-size: 11px; }
.nest-task-key > small { font-size: 9px; line-height: 1.45; letter-spacing: .05em; }
.regional-map > div, .regional-map > div b { font-size: 10px; letter-spacing: .09em; }
.regional-map > small { font-size: 9px; line-height: 1.4; letter-spacing: .06em; }
.cursor-label { font-size: 10px; letter-spacing: .09em; }

.intro-kicker { font-size: 11px; }
.intro button { font-size: 11px; }
.intro .intro-species { height: 56px; }
.intro .intro-species small { font-size: 9px; letter-spacing: .14em; }
.intro .intro-species strong { font-size: 11px; letter-spacing: .1em; }
.intro .intro-species i { font-size: 10px; }
.intro-content > small { font-size: 9px; line-height: 1.4; letter-spacing: .12em; }
.pause-overlay > span { font-size: 10px; }
.pause-overlay button { font-size: 11px; }

dialog label { font-size: 13px; }
.dialog-actions button { min-height: 40px; font-size: 11px; }
.settings-note { font-size: 10px; line-height: 1.45; }
.speed-options > span { font-size: 10px; letter-spacing: .12em; }
.speed-options button { font-size: 11px; }
.observatory-dialog .overlay-options label { font-size: 10px; }
.overlay-options input { width: 14px; height: 14px; }
.observatory-metrics small { font-size: 9px; line-height: 1.3; letter-spacing: .08em; }
.ethology-panel > div:first-child { font-size: 10px; letter-spacing: .1em; }
.ethology-panel > div:first-child small { font-size: 9px; }
.ethology-metrics small { font-size: 9px; line-height: 1.3; letter-spacing: .07em; }
.history-panel > div:first-child, .observatory-log > div:first-child { font-size: 10px; letter-spacing: .1em; }
.chart-legend { font-size: 10px; letter-spacing: .08em; }
.observatory-log li { grid-template-columns: 62px 78px 1fr; font-size: 11px; line-height: 1.35; }
.observatory-dialog footer { font-size: 10px; line-height: 1.4; }
#tooltip { max-width: 250px; padding: 9px 11px; font-size: 12px; line-height: 1.5; }

@media (max-width: 1240px) {
  .intel-panel { display: none; }
  .weather { display: none; }
  .cycle { display: none; }
  .resources { min-width: 0; }
  .resource { min-width: 94px; padding: 0 10px; }
  .resource:nth-child(3) { display: none; }
  .command-title { display: none; }
  .command { width: 128px; }
}

@media (max-width: 760px) {
  .topbar { top: 8px; left: 8px; right: 8px; height: 58px; padding: 0 8px; }
  .brand { width: auto; flex: 1; }
  .brand-mark { width: 30px; height: 30px; }
  .brand .brand-name { font-size: 13px; }
  .brand .brand-meta, .cycle, .resource:nth-child(n+2), .world-status .icon-button:not(#pause-button):not(#menu-button):not(#focus-colony-button):not(#minimal-ui-button) { display: none; }
  .world-status .icon-button { width: 34px; }
  .resources { flex: 0; min-width: auto; }
  .resource { height: 58px; min-width: 91px; padding: 0 9px; }
  .resource-icon { display: none; }
  .mission-panel { top: 120px; left: 8px; right: 8px; width: auto; max-height: calc(100dvh - 224px); padding: 0; overflow: hidden; }
  .mission-mobile-toggle {
    width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 13px 9px 16px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
  }
  .mission-mobile-copy { min-width: 0; display: block; }
  .mission-mobile-copy small, .mission-mobile-copy strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .mission-mobile-copy small { color: #888a78; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
  .mission-mobile-copy strong { margin-top: 5px; color: #eee5d1; font: 15px "Simulantion Serif", serif; font-weight: normal; }
  .mission-mobile-meta { flex: 0 0 auto; display: grid; grid-template-columns: auto 16px; align-items: center; gap: 2px 9px; text-align: right; }
  .mission-mobile-meta small { grid-column: 1 / -1; color: #a7b781; font-size: 9px; font-weight: 800; letter-spacing: .09em; }
  .mission-mobile-counts { display: flex; align-items: center; justify-content: flex-end; gap: 7px; white-space: nowrap; }
  .mission-mobile-meta b { color: #d8cba8; font-size: 11px; letter-spacing: .05em; }
  #mobile-population-value { color: #b8c98b; }
  #mobile-objective-value { padding-left: 7px; border-left: 1px solid rgba(255,255,255,.09); }
  .mission-panel[data-population-view="sampled"] #mobile-objective-value { display: none; }
  .mission-mobile-meta i { color: #a4aa8b; font-size: 15px; font-style: normal; transition: transform .18s ease; }
  .mission-panel[data-severity="watch"] .mission-mobile-meta small { color: #d4aa63; }
  .mission-panel[data-severity="danger"] .mission-mobile-meta small { color: #d17459; }
  .mission-panel[data-severity="winter"] .mission-mobile-meta small { color: #a8c2cb; }
  .mission-panel-body { display: none; padding: 14px 16px 16px; border-top: 1px solid rgba(255,255,255,.06); }
  .mission-panel.mobile-expanded { overflow-y: auto; overscroll-behavior: contain; }
  .mission-panel.mobile-expanded .mission-panel-body { display: block; }
  .mission-panel.mobile-expanded .mission-mobile-meta i { transform: rotate(180deg); }
  .mission-panel .reward { margin: 15px -16px -16px; padding-right: 16px; padding-left: 16px; }
  .view-switch { top: 76px; left: auto; right: 8px; height: 32px; transform: scale(var(--ui-scale)); transform-origin: top right; }
  .view-switch button { min-width: 0; width: 56px; padding: 0; justify-content: center; }
  .view-switch button span, .view-switch kbd { display: none; }
  .view-switch button::after { content: attr(data-short); color: inherit; font-size: 5px; letter-spacing: .08em; }
  .command-dock { left: 8px; right: 8px; bottom: 8px; width: auto; height: 70px; transform: scale(var(--ui-scale)); }
  .command { flex: 1; width: auto; min-width: 0; grid-template-columns: 1fr; text-align: center; padding: 0; }
  .command-glyph { margin: 0 auto; }
  .command > span:last-child small { display: none; }
  .command strong { margin-top: 5px; font-size: 6px; }
  .command > kbd { display: none; }
  .observer-dock { left: 8px; right: 8px; bottom: 8px; width: auto; height: 70px; grid-template-columns: repeat(4, minmax(0, 1fr)); transform: scale(var(--ui-scale)); }
  .observer-title { display: none; }
  .activity { flex: 1; min-width: 0; justify-content: center; gap: 0; padding: 0; text-align: center; }
  .activity > i { margin: 0 auto 6px; }
  .activity > span { display: block; }
  .activity > span small { display: none; }
  .activity > span strong { font-size: 5px; }
  .activity { flex-direction: column; }
  .activity.active::after { top: 9px; right: 9px; }
  .selection-card { left: 8px; right: 8px; top: auto; bottom: 96px; width: auto; max-height: calc(100dvh - 220px); overflow-y: auto; overscroll-behavior: contain; }
  .zoom-controls, .controls-hint, .depth-readout, .nest-task-key, .regional-map { display: none; }
  .event-feed { left: 8px; right: 8px; bottom: 96px; align-items: flex-start; }
  .event { width: fit-content; min-width: 0; max-width: 100%; padding: 7px 10px; font-size: 10px; }
  .event-feed .event:nth-child(n+2) { display: none; }
  .world-overview, .biome-overview { top: 122px; left: 8px; width: min(252px, calc(100vw - 16px)); max-height: calc(100vh - 140px); overflow: auto; }
  .world-region-list { top: auto; right: 8px; bottom: 8px; left: 8px; width: auto; max-height: 188px; }
  .world-overview { display: none; }
  .biome-events { display: none; }
  #game-shell[data-view="world"] .world-region-list { display: block !important; }
  .world-region-button { min-height: 52px; }
  .intro h1 { font-size: clamp(30px, 10vw, 48px); }
  .intro p { margin-bottom: 20px; }
  .intro-guide { grid-template-columns: repeat(2, 1fr); width: min(360px, 100%); margin-bottom: 16px; }
  .intro-guide span:nth-child(2) { border-right: 0; }
  .intro-guide span:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.06); }
  .species-dialog { padding: 26px 18px 18px; }
  .species-dialog h2 { font-size: 30px; }
  .species-intro { font-size: 14px; }
  .species-list { grid-template-columns: 1fr; }
  .species-option { min-height: 108px; }
  .species-detail-heading { display: grid; }
  .species-facts { grid-template-columns: 1fr; }
  .species-facts > span { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .species-detail ul { grid-template-columns: 1fr; }
  .observatory-dialog { padding: 22px 16px 18px; }
  .observatory-toolbar { align-items: flex-start; flex-direction: column; }
  .overlay-options { flex-wrap: wrap; }
  .observatory-metrics { grid-template-columns: repeat(3, 1fr); }
  .observatory-metrics > div:nth-child(3) { border-right: 0; }
  .observatory-metrics > div:nth-child(-n+3) { border-bottom: 1px solid rgba(255,255,255,.07); }
  .history-panel canvas { height: 150px; }
  .ethology-metrics { grid-template-columns: repeat(3, 1fr); }
  .ethology-metrics > div:nth-child(3) { border-right: 0; }
  .ethology-metrics > div:nth-child(-n+3) { border-bottom: 1px solid rgba(255,255,255,.055); }
}

@media (max-width: 760px) {
  .view-switch button { width: 62px; }
  .view-switch button::after { font-size: 9px; letter-spacing: .05em; }
  .command-dock, .observer-dock { height: 78px; }
  .command strong, .activity > span strong { font-size: 9px; line-height: 1.15; letter-spacing: .04em; }
  .selection-card { bottom: 96px; }
  .world-overview, .biome-overview { width: min(290px, calc(100vw - 16px)); }
  .world-region-button { min-height: 64px; }
  dialog label { grid-template-columns: 1fr 130px; gap: 12px; }
}

@media (max-width: 420px) {
  .brand { min-width: 30px; }
  .brand .brand-name { display: none; }
  .brand-mark { margin-right: 0; }
}

/* A cinematic observation mode: retain navigation and essential transport
   controls while removing panels that cover the simulated world. Inspectors
   remain available on demand when the viewer clicks a worker or resource. */
#game-shell.minimal-ui .mission-panel,
#game-shell.minimal-ui .intel-panel,
#game-shell.minimal-ui .event-feed,
#game-shell.minimal-ui .manual-dock,
#game-shell.minimal-ui .observer-dock,
#game-shell.minimal-ui .depth-readout,
#game-shell.minimal-ui .nest-task-key,
#game-shell.minimal-ui .regional-map,
#game-shell.minimal-ui .zoom-controls,
#game-shell.minimal-ui .controls-hint { display: none !important; }
#game-shell.minimal-ui .topbar { top: 12px; left: 50%; right: auto; width: min(620px, calc(100vw - 24px)); height: 54px; padding: 0 10px 0 14px; transform: translateX(-50%); }
#game-shell.minimal-ui .topbar .brand { width: auto; flex: 1; }
#game-shell.minimal-ui .topbar .brand-mark { width: 31px; height: 31px; margin-right: 9px; }
#game-shell.minimal-ui .topbar .brand-meta,
#game-shell.minimal-ui .topbar .resources,
#game-shell.minimal-ui .topbar .weather,
#game-shell.minimal-ui .topbar .cycle,
#game-shell.minimal-ui #world-button,
#game-shell.minimal-ui #observatory-button,
#game-shell.minimal-ui #sound-button { display: none !important; }
#game-shell.minimal-ui .view-switch { top: 76px; }
#game-shell.minimal-ui .camera-status { bottom: 20px; }

/* Public watch sessions are deliberately non-interactive and cinematic. The
   camera caption is the only persistent UI; it explains the framed activity
   without covering the simulation with the full colony-management HUD. */
#game-shell.watch-mode #world { cursor: default; pointer-events: none; touch-action: auto; }
#game-shell.watch-mode .topbar,
#game-shell.watch-mode .view-switch,
#game-shell.watch-mode .world-overview,
#game-shell.watch-mode .biome-overview,
#game-shell.watch-mode .world-region-list,
#game-shell.watch-mode .biome-events,
#game-shell.watch-mode .mission-panel,
#game-shell.watch-mode .intel-panel,
#game-shell.watch-mode .event-feed,
#game-shell.watch-mode .selection-card,
#game-shell.watch-mode .manual-dock,
#game-shell.watch-mode .observer-dock,
#game-shell.watch-mode .depth-readout,
#game-shell.watch-mode .nest-task-key,
#game-shell.watch-mode .regional-map,
#game-shell.watch-mode .zoom-controls,
#game-shell.watch-mode .controls-hint,
#game-shell.watch-mode .cursor-label,
#game-shell.watch-mode #tooltip,
#game-shell.watch-mode .pause-overlay { display: none !important; }
#game-shell.watch-mode .camera-status { bottom: 20px; max-width: min(520px, calc(100vw - 24px)); }

@media (max-width: 760px) {
  .camera-status { bottom: 96px; font-size: 8px; }
  #game-shell.minimal-ui .topbar { top: 8px; width: calc(100vw - 16px); height: 50px; }
  #game-shell.minimal-ui .topbar .brand-name { font-size: 12px; }
  #game-shell.minimal-ui .world-status #camera-tracking-button,
  #game-shell.minimal-ui .world-status #minimal-ui-button { display: block; }
  #game-shell.minimal-ui .view-switch { top: 68px; }
  #game-shell.minimal-ui .camera-status { bottom: 12px; }
  #game-shell.watch-mode .camera-status { bottom: 12px; }
}

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

html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
}
