:root {
  color-scheme: dark;
  --bg: #202822;
  --panel: #29322cf5;
  --panel2: #343d35;
  --line: #d8d6b51c;
  --text: #e6e6d7;
  --muted: #9fa99a;
  --accent: #d2bd8c;
  --green: #a6c6a3;
  --red: #d59684;
  --violet: #b8a4d6;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 13px;
  font-weight: 400;
}
* {
  box-sizing: border-box;
}
html {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  margin: 0;
  background: var(--bg);
  overflow: hidden;
}
button,
a,
input,
select {
  font: inherit;
}
button {
  color: var(--text);
  border: 1px solid var(--line);
  background: #ffffff05;
  cursor: pointer;
  transition:
    background 0.14s,
    border-color 0.14s;
}
button:hover {
  background: #ffffff0d;
  border-color: #d5d4b343;
}
button:focus-visible,
canvas:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
button.active {
  color: var(--accent);
  background: #ccb47b17;
  border-color: #d2bd8c77;
}
button svg {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}
a {
  color: var(--accent);
  text-decoration: none;
}
small {
  color: var(--muted);
}
strong {
  font-weight: 550;
}
#game {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  min-width: 620px;
}
.topbar {
  height: 66px;
  flex: none;
  background: #222c26;
  display: flex;
  align-items: center;
  padding: 0 25px;
  gap: 32px;
  border-bottom: 1px solid var(--line);
  z-index: 5;
}
.brand {
  display: flex;
  gap: 11px;
  color: var(--text);
  align-items: center;
  letter-spacing: 3.5px;
  font-family: Georgia, serif;
  font-size: 24px;
}
.brand svg {
  width: 29px;
  height: 36px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.3;
}
.brand small {
  display: block;
  letter-spacing: 2px;
  font-family: inherit;
  font-size: 7px;
  margin-top: 4px;
}
.colony-heading {
  display: flex;
  gap: 13px;
  align-items: center;
  font-size: 12px;
}
.colony-heading strong {
  font-size: 14px;
}
.status-dot,
.live-dot {
  display: inline-block;
  background: #a8c2a0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.separator {
  color: #6f7c6e;
}
.tag {
  font-size: 9px;
  padding: 4px 6px;
  letter-spacing: 0.7px;
  border: 1px solid #adb49c2c;
  color: #929e8e;
  border-radius: 3px;
}
.top-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}
.icon-button {
  border: 0;
  background: none;
  padding: 7px;
  color: var(--muted);
}
.menu-button {
  padding: 8px 12px;
  border-radius: 3px;
  font-size: 11px;
}
.menu-button span {
  margin-left: 18px;
  color: var(--muted);
}
.roster-bar {
  height: 97px;
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 25px;
  gap: 24px;
  background: #29332c;
  border-bottom: 1px solid #111b1780;
  z-index: 4;
}
.roster-caption {
  width: 104px;
  flex: none;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.7px;
  color: var(--muted);
}
.roster-caption div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 9px;
}
.roster-caption strong {
  font-family: Georgia, serif;
  font-size: 27px;
  color: #d4d9bd;
}
.roster-caption div span {
  font-size: 11px;
  color: var(--muted);
}
.roster {
  display: flex;
  gap: 9px;
  flex: 1;
  overflow: auto;
  scrollbar-width: thin;
}
.pawn-card {
  display: flex;
  align-items: center;
  min-width: 129px;
  height: 66px;
  position: relative;
  padding: 5px 10px 6px 0;
  border-radius: 4px;
  background: #354037;
  gap: 2px;
  text-align: left;
  border-color: #e3dfc014;
}
.pawn-card.selected {
  background: #4a5140;
  border-color: #c8ba88;
}
.pawn-card svg {
  width: 51px;
  height: 55px;
  stroke: none;
  flex: none;
}
.pawn-card .name {
  font-size: 12px;
  font-weight: 550;
}
.pawn-card .role {
  color: var(--muted);
  font-size: 9px;
  display: block;
  margin-top: 4px;
  max-width: 89px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pawn-card .mood-line {
  display: block;
  height: 2px;
  background: #242d23;
  margin-top: 7px;
  width: 62px;
}
.pawn-card .mood-line i {
  display: block;
  height: 100%;
  background: #b5c69b;
}
.pawn-card .pawn-badge {
  position: absolute;
  top: 4px;
  left: 39px;
  font-size: 9px;
  color: var(--violet);
}
.pawn-card.mech {
  min-width: 110px;
}
.time-controls {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: flex-end;
}
.date {
  display: flex;
  gap: 18px;
  font-size: 10px;
  color: #bac3b0;
}
.date span:last-child {
  color: var(--muted);
}
.speed-group {
  display: flex;
  border: 1px solid #d0d4b829;
  border-radius: 3px;
  overflow: hidden;
}
.speed-group button {
  border: 0;
  border-right: 1px solid var(--line);
  height: 28px;
  min-width: 35px;
  font-size: 11px;
}
.speed-group button:last-child {
  border: 0;
}
.speed-group button.active {
  background: #b8b28a27;
  color: #eadab0;
}
.viewport {
  position: relative;
  flex: 1;
  min-height: 150px;
  overflow: hidden;
  background: #7c875f;
}
#world {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  cursor: default;
  outline: none;
}
.resource-list {
  position: absolute;
  left: 20px;
  top: 23px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}
.resource {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 107px;
  padding: 3px 8px 3px 5px;
  background: #253022bf;
  border: 1px solid #d6d9bf13;
  border-radius: 3px;
  font-size: 11px;
  box-shadow: 0 1px 3px #1d291e1a;
}
.resource img {
  width: 21px;
  height: 21px;
  object-fit: cover;
}
.sprite-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  flex: none;
  background-image: url("./assets/atlas.svg");
  background-repeat: no-repeat;
}
.resource .res-name {
  font-size: 10px;
  color: #c2cbb7;
  min-width: 62px;
}
.resource strong {
  margin-left: auto;
  color: #edead1;
  min-width: 30px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.map-topline {
  position: absolute;
  inset: 20px 22px auto 175px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.map-label {
  padding: 8px 12px;
  background: #293528b3;
  border-radius: 3px;
  display: flex;
  gap: 14px;
  align-items: center;
  color: #d0d4bc;
  font-size: 9px;
}
.map-label .eyebrow {
  color: #d0d4bc;
}
.map-tools {
  display: flex;
  gap: 5px;
  pointer-events: auto;
}
.map-tools button {
  width: 31px;
  height: 31px;
  background: #293528db;
  border-radius: 3px;
  color: #c2ccb5;
  border-color: #d9dcbd22;
}
.map-tools svg {
  width: 15px;
  height: 15px;
}
.alerts {
  position: absolute;
  right: 22px;
  top: 67px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 226px;
}
.alert {
  font-size: 11px;
  padding: 9px 11px;
  border-radius: 3px;
  background: #463d2de8;
  border-left: 2px solid #cdb27c;
  cursor: pointer;
  color: #e7d6ac;
  box-shadow: 0 3px 12px #24302419;
}
.alert.danger {
  border-color: #c88778;
  background: #483630eb;
  color: #e6b7a6;
}
.story-card {
  position: absolute;
  right: 22px;
  top: 72px;
  width: 242px;
  background: #29342af2;
  border: 1px solid #d4d7b72b;
  border-radius: 4px;
  padding: 18px 18px 15px;
  box-shadow: 0 4px 20px #27352222;
}
.story-card .eyebrow {
  color: #b9c6a6;
}
.story-card h2 {
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 400;
  margin: 11px 0;
  color: #e7e7cc;
}
.story-card p {
  font-size: 11px;
  line-height: 1.75;
  color: #b5c0a9;
  margin: 0 0 14px;
}
.story-card .objective {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 10px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
  color: #cbd2bb;
}
.story-card .objective svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
}
.story-card .close-story {
  position: absolute;
  top: 9px;
  right: 9px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 17px;
}
.story-card .story-foot {
  font-size: 9px;
  color: #8d9f86;
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}
.inspection {
  position: absolute;
  bottom: 18px;
  left: 20px;
  width: 290px;
  background: #26312af7;
  border: 1px solid #c3cbb12d;
  border-radius: 5px;
  box-shadow: 0 4px 22px #20302133;
  overflow: hidden;
}
.inspection:empty {
  display: none;
}
.inspection .inspect-head {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 16px 17px;
  border-bottom: 1px solid var(--line);
}
.inspect-head h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 400;
}
.inspect-head p {
  margin: 5px 0 0;
  font-size: 10px;
  color: var(--muted);
}
.inspect-head .portrait {
  height: 57px;
  width: 55px;
  background: #bac7a80d;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.inspect-tabs {
  display: flex;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}
.inspect-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  border-radius: 0;
  padding: 10px 9px;
  font-size: 10px;
  color: var(--muted);
}
.inspect-tabs button.active {
  border-color: var(--accent);
  color: #d9cb9f;
}
.inspect-body {
  padding: 13px 17px;
  max-height: 226px;
  overflow: auto;
  scrollbar-width: thin;
}
.need-row {
  display: grid;
  grid-template-columns: 74px 1fr 32px;
  gap: 8px;
  align-items: center;
  font-size: 10px;
  margin-bottom: 10px;
}
.need-label {
  color: #c0c8b6;
}
.need-track {
  height: 5px;
  background: #111f186b;
  border-radius: 1px;
  overflow: hidden;
}
.need-track i {
  display: block;
  height: 100%;
  background: #aabf97;
}
.need-value {
  font-size: 9px;
  text-align: right;
  color: #a9b49f;
}
.thought {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: 8px;
}
.thought.good span:last-child {
  color: var(--green);
}
.thought.bad span:last-child {
  color: var(--red);
}
.inspect-actions {
  display: flex;
  gap: 5px;
  padding: 10px 14px;
  background: #222c2580;
  flex-wrap: wrap;
}
.inspect-actions button {
  font-size: 10px;
  padding: 7px 9px;
  border-radius: 3px;
  flex: 1;
}
.inspect-status {
  font-size: 10px;
  color: #b3c4a5;
  padding: 0 17px 13px;
}
.skill-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  padding: 4px 0;
}
.skill-row span:first-child {
  color: #c0cbb5;
}
.skill-row .passion {
  color: var(--accent);
  margin-left: auto;
}
.empty-note {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}
.minimap-wrap {
  position: absolute;
  right: 22px;
  bottom: 18px;
  width: 218px;
  background: #26312af2;
  border: 1px solid #c3cbb12d;
  border-radius: 4px;
  box-shadow: 0 4px 20px #26342233;
  overflow: hidden;
}
.management-open .minimap-wrap {
  display: none;
}
.minimap-title {
  display: flex;
  justify-content: space-between;
  padding: 9px 11px;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #c6cfb6;
}
.minimap-title span:last-child {
  font-size: 9px;
  letter-spacing: 0;
  color: #aebb9a;
}
#minimap {
  display: block;
  width: 216px;
  height: 144px;
  cursor: crosshair;
  opacity: 0.88;
}
.minimap-foot {
  display: flex;
  justify-content: space-between;
  padding: 8px 9px;
  font-size: 8px;
  color: #a6b49c;
}
.map-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  font-size: 9px;
  white-space: nowrap;
  color: #e4e5ca;
  background: #2a362ac9;
  padding: 8px 13px;
  border: 1px solid #d9debb1c;
  border-radius: 3px;
  pointer-events: none;
}
.map-hint span {
  margin: 0 6px;
  color: #adba9d;
}
.tool-hint {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  background: #28322cee;
  border: 1px solid #d4c39377;
  padding: 11px 16px;
  border-radius: 4px;
  max-width: 55%;
  color: #e2d9ba;
  font-size: 11px;
  box-shadow: 0 4px 15px #15271933;
}
.toast {
  pointer-events: none;
  position: absolute;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%);
  max-width: 440px;
  background: #202e25ed;
  border: 1px solid #d2c19488;
  padding: 12px 18px;
  border-radius: 4px;
  z-index: 30;
  color: #e6dfc5;
  font-size: 12px;
  box-shadow: 0 5px 25px #16261b55;
}
.context-menu {
  position: absolute;
  z-index: 40;
  min-width: 180px;
  box-shadow: 0 6px 25px #17241988;
  border: 1px solid #d6d0ad55;
  background: #29362c;
  border-radius: 4px;
  padding: 5px;
}
.context-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px;
  border: 0;
  font-size: 11px;
}
.tool-panel {
  flex: none;
  background: #29342d;
  border-top: 1px solid #d8d2ac35;
  position: relative;
  max-height: 42vh;
  overflow: auto;
  scrollbar-width: thin;
  z-index: 6;
}
.panel-head {
  display: flex;
  align-items: center;
  padding: 13px 22px 10px;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  font-size: 16px;
  font-family: Georgia, serif;
  font-weight: 400;
  margin: 0;
}
.panel-head p {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
}
.panel-head .close-panel {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 21px;
  padding: 0 4px;
}
.panel-content {
  padding: 15px 22px;
  display: flex;
  gap: 16px;
}
.category-list {
  display: flex;
  flex-direction: column;
  min-width: 120px;
  gap: 3px;
  border-right: 1px solid var(--line);
  padding-right: 14px;
}
.category-list button {
  padding: 8px 11px;
  font-size: 11px;
  border: 0;
  border-radius: 3px;
  text-align: left;
}
.build-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  flex: 1;
}
.build-item {
  width: 96px;
  min-height: 84px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 7px;
  border-radius: 3px;
  position: relative;
  gap: 5px;
  background: #34403577;
}
.build-item .sprite-icon {
  width: 35px;
  height: 35px;
}
.build-item .item-name {
  font-size: 9px;
  line-height: 1.3;
}
.build-item .cost {
  font-size: 8px;
  color: #acb79e;
}
.build-item.locked {
  opacity: 0.4;
}
.build-item .lock {
  position: absolute;
  right: 5px;
  top: 3px;
  font-size: 10px;
}
.bottom-nav {
  height: 58px;
  flex: none;
  background: #242f28;
  border-top: 1px solid #d8d2ac28;
  display: flex;
  align-items: stretch;
  padding: 0 16px;
  z-index: 7;
  gap: 1px;
}
.nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  max-width: 130px;
  border: 0;
  border-top: 2px solid transparent;
  font-size: 11px;
  background: none;
  color: #b9c4ae;
}
.nav-button svg {
  width: 17px;
  height: 17px;
  color: #a1b197;
}
.nav-button.active {
  background: #bdb88d12;
  border: 0;
  border-top: 2px solid #c9b985;
  color: #e5d5ac;
}
.nav-button.active svg {
  color: #d5c395;
}
.nav-button .shortcut {
  font-size: 8px;
  color: #6e816e;
  border: 1px solid #a5b49220;
  padding: 1px 3px;
  border-radius: 2px;
}
.statusbar {
  height: 27px;
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 24px;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 0.15px;
  color: #879b83;
  background: #1c2821;
  border-top: 1px solid #d6d4b20f;
}
.statusbar .live-dot {
  height: 4px;
  width: 4px;
  margin-right: 6px;
  background: #8ba581;
}
.statusbar #status-right {
  color: #81947d;
}
.statusbar #save-status {
  color: #81947d;
}
.badge {
  display: inline-block;
  border: 1px solid #b5c3a632;
  border-radius: 3px;
  color: #b3c8a6;
  font-size: 9px;
  padding: 3px 5px;
}
.badge.violet {
  color: #c5b1df;
  border-color: #baa1d844;
}
.cards {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.content-card {
  background: #354136;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 15px;
  min-width: 215px;
  max-width: 320px;
  flex: 1;
}
.content-card h3 {
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 500;
  color: #e0e3cb;
}
.content-card p {
  font-size: 10px;
  color: #afbea5;
  line-height: 1.7;
  margin: 6px 0 10px;
}
.content-card button {
  font-size: 10px;
  padding: 7px 10px;
  border-radius: 3px;
}
.content-card .card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.progress {
  height: 4px;
  background: #14221b66;
  margin: 10px 0;
}
.progress i {
  display: block;
  height: 100%;
  background: #b1bf94;
}
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  width: 100%;
}
.tech {
  padding: 12px;
  text-align: left;
  min-height: 98px;
  border-radius: 3px;
  background: #344135;
}
.tech strong {
  font-size: 11px;
}
.tech p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
  margin: 7px 0;
}
.tech .tech-foot {
  font-size: 9px;
  display: flex;
  justify-content: space-between;
  color: #b7c7a7;
}
.tech.done {
  background: #90b18712;
  border-color: #b2ce9b33;
}
.tech.done strong {
  color: #aec59e;
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
}
.data-table th {
  font-size: 9px;
  font-weight: 400;
  color: var(--muted);
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.data-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  color: #cbd5c0;
}
.work-table th:not(:first-child) {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  height: 78px;
  padding: 5px;
  font-size: 9px;
  min-width: 31px;
}
.work-table td {
  text-align: center;
  padding: 5px;
}
.work-table td:first-child {
  text-align: left;
  min-width: 90px;
}
.priority {
  width: 25px;
  height: 25px;
  border-radius: 2px;
  font-size: 12px;
  padding: 0;
  background: #203125;
}
.priority.p1 {
  color: #b5d3a4;
}
.priority.p2 {
  color: #d2ce9b;
}
.priority.p3 {
  color: #c8b997;
}
.priority.p4 {
  color: #ab9c89;
}
.priority.p0 {
  color: #667960;
}
.schedule-cell {
  width: 23px;
  height: 24px;
  border-radius: 2px;
  padding: 0;
  font-size: 8px;
}
.schedule-cell.Sleep {
  background: #727eab55;
}
.schedule-cell.Work {
  background: #c2a67d55;
}
.schedule-cell.Recreation {
  background: #83ae8d55;
}
.schedule-cell.Meditate {
  background: #b699cf55;
}
.schedule-legend {
  display: flex;
  gap: 8px;
  padding: 0 22px 10px;
}
.schedule-legend button {
  padding: 5px 8px;
  font-size: 9px;
}
.psy-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.power-button {
  text-align: left;
  border-radius: 3px;
  width: 155px;
  padding: 10px 11px;
}
.power-button strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #d3c3e6;
}
.power-button small {
  font-size: 9px;
  display: block;
  margin-top: 6px;
}
.gene-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gene-chip {
  font-size: 10px;
  padding: 8px 10px;
  border-radius: 3px;
  background: #a0b1ad0e;
}
.gene-chip.active {
  border-color: #b7cfb3;
  color: #cee0c6;
  background: #a3bea522;
}
.gene-chip.unknown {
  opacity: 0.35;
}
.biotech-layout {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1fr;
  gap: 14px;
  width: 100%;
}
.tiny-title {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1.4px;
  margin: 0 0 12px;
}
.subtle {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
}
.inline-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.inline-actions button {
  font-size: 10px;
  padding: 7px 10px;
  border-radius: 3px;
}
.panel-select {
  background: #1e2d23;
  border: 1px solid #bec4a73b;
  color: #d8ddc9;
  border-radius: 3px;
  padding: 6px 8px;
  font-size: 11px;
}
.log-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.log-row {
  display: grid;
  grid-template-columns: 88px 190px 1fr;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 10px;
  color: var(--muted);
}
.log-row strong {
  color: #d8dfc6;
}
.log-row.danger strong {
  color: var(--red);
}
.log-row.psychic strong {
  color: var(--violet);
}
.log-row.good strong {
  color: var(--green);
}
.close-inspect {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 18px;
  padding: 2px;
}
.inspection h3 {
  font-size: 12px;
  font-weight: 500;
  margin: 0 0 9px;
}
.quest-reward {
  color: var(--accent);
  font-size: 10px;
}
.world-map {
  width: 320px;
  height: 180px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #57664c;
  position: relative;
  overflow: hidden;
}
.world-map svg {
  width: 100%;
  height: 100%;
}
.world-location {
  position: absolute;
  border-radius: 3px;
  padding: 5px 7px;
  font-size: 9px;
  background: #233223dd;
  white-space: nowrap;
  border-color: #c4c9a844;
}
.world-location.home {
  color: #e5ce99;
  left: 38%;
  top: 50%;
}
.faction-row {
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.trade-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.trade-row span {
  flex: 1;
}
.trade-row button {
  font-size: 9px;
  padding: 5px;
}
.trade-row small {
  width: 38px;
}
.bill-row {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 11px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.bill-row span {
  flex: 1;
}
.bill-row button {
  padding: 4px 8px;
}
.bill-row input {
  width: 50px;
  background: #203025;
  border: 1px solid #c1c6a632;
  border-radius: 2px;
  padding: 5px;
  color: #e1e4ce;
}
.bill-row small {
  width: 130px;
}
.muted {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
dialog {
  padding: 0;
  border: 1px solid #b6bd9866;
  border-radius: 6px;
  background: #29362d;
  color: var(--text);
  max-width: 760px;
  width: min(94vw, 760px);
  box-shadow: 0 20px 100px #0b140e99;
  max-height: 90dvh;
}
dialog::backdrop {
  background: #15251bbb;
  backdrop-filter: blur(5px);
}
.dialog-head {
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.dialog-head h1 {
  font-family: Georgia, serif;
  font-size: 29px;
  font-weight: 400;
  margin: 0;
}
.dialog-head button {
  margin-left: auto;
  border: 0;
  font-size: 23px;
  background: none;
  color: var(--muted);
}
.dialog-body {
  padding: 23px 28px;
  max-height: 66vh;
  overflow: auto;
  font-size: 12px;
  line-height: 1.8;
  color: #bac8ae;
}
.dialog-body p {
  margin: 0 0 15px;
}
.dialog-body h3 {
  font-size: 11px;
  letter-spacing: 0.5px;
  color: #d5dfc4;
  margin: 18px 0 7px;
}
.dialog-actions {
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
}
.primary {
  background: #d1bd8a !important;
  border-color: #d1bd8a !important;
  color: #29332a !important;
  padding: 10px 17px;
  border-radius: 3px;
  font-weight: 550;
}
.secondary {
  padding: 10px 15px;
  border-radius: 3px;
}
.dialog-body .settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.field label {
  font-size: 10px;
  display: block;
  color: #aebea3;
  margin-bottom: 5px;
}
.field input,
.field select {
  width: 100%;
  padding: 9px 10px;
  background: #203025;
  border: 1px solid #b4c2a63d;
  color: #dce4cd;
  border-radius: 3px;
}
.scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 20px;
}
.scenario-card {
  padding: 12px;
  text-align: left;
  border-radius: 3px;
  background: #93a6870b;
}
.scenario-card strong {
  display: block;
  font-size: 12px;
}
.scenario-card p {
  font-size: 10px;
  line-height: 1.65;
  margin: 5px 0 0;
  color: #a7b99a;
}
.keyboard {
  padding: 2px 5px;
  border: 1px solid #a5b38d44;
  border-radius: 3px;
  font-size: 10px;
  font-family: monospace;
  color: #d1daba;
}
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 25px;
}
.help-grid p {
  font-size: 11px;
}
.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.menu-grid button {
  padding: 18px;
  text-align: left;
  border-radius: 3px;
}
.menu-grid button span {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  color: var(--muted);
}
.policy-note {
  font-size: 10px;
  color: #8fa283;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 20px;
}
.chart-row {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  height: 100px;
}
.chart-row div {
  background: #9cb18a55;
  flex: 1;
  border-top: 2px solid #b4c49a;
}
.split {
  display: flex;
  gap: 18px;
  width: 100%;
}
.split > div {
  flex: 1;
}
.warn {
  color: var(--red);
}
@media (min-width: 1600px) {
  .roster-bar {
    gap: 35px;
  }
  .pawn-card {
    min-width: 147px;
  }
  .roster {
    gap: 12px;
  }
  .time-controls {
    margin-right: 5px;
  }
  .story-card {
    width: 260px;
  }
  .inspection {
    width: 310px;
  }
  .resource-list {
    left: 25px;
  }
}
@media (max-width: 1150px) {
  .topbar {
    padding: 0 15px;
    gap: 25px;
  }
  .brand {
    font-size: 20px;
  }
  .colony-heading {
    gap: 9px;
  }
  .colony-heading .tag,
  .colony-heading #biome-label,
  .colony-heading .separator {
    display: none;
  }
  .roster-bar {
    padding: 0 14px;
    gap: 10px;
  }
  .roster-caption {
    width: 80px;
  }
  .roster-caption .eyebrow {
    font-size: 8px;
  }
  .roster-caption strong {
    font-size: 23px;
  }
  .roster-caption div {
    gap: 5px;
  }
  .roster-caption div span {
    font-size: 10px;
  }
  .pawn-card {
    min-width: 112px;
    padding-right: 6px;
  }
  .pawn-card svg {
    width: 42px;
  }
  .pawn-card .role {
    max-width: 66px;
  }
  .time-controls {
    max-width: 160px;
  }
  .date {
    flex-direction: column;
    gap: 4px;
  }
  .speed-group button {
    min-width: 30px;
  }
  .story-card {
    width: 218px;
    padding: 15px;
  }
  .story-card h2 {
    font-size: 21px;
  }
  .minimap-wrap {
    width: 182px;
  }
  #minimap {
    width: 180px;
    height: 120px;
  }
  .minimap-title {
    padding: 7px 9px;
  }
  .minimap-foot {
    font-size: 7px;
  }
  .map-hint {
    left: 50%;
    font-size: 8px;
  }
  .nav-button {
    gap: 5px;
    font-size: 10px;
  }
  .nav-button .shortcut {
    display: none;
  }
  .bottom-nav {
    padding: 0 5px;
  }
  .inspection {
    width: 260px;
  }
  .biotech-layout {
    grid-template-columns: 1fr 1fr;
  }
  .biotech-layout > .content-card:last-child {
    max-width: none;
    grid-column: span 2;
  }
  .map-topline {
    left: 165px;
  }
  .statusbar #status-right {
    display: none;
  }
}
@media (max-height: 800px) {
  .topbar {
    height: 55px;
  }
  .roster-bar {
    height: 83px;
  }
  .pawn-card {
    height: 60px;
  }
  .bottom-nav {
    height: 51px;
  }
  .story-card {
    top: 64px;
  }
  .story-card p {
    font-size: 10px;
    line-height: 1.6;
    margin-bottom: 7px;
  }
  .story-card h2 {
    font-size: 21px;
    margin: 8px 0;
  }
  .story-card .objective {
    padding: 8px 0;
  }
  .inspection .inspect-head {
    padding: 10px 14px;
  }
  .inspect-body {
    max-height: 155px;
    padding: 10px 14px;
  }
  .inspect-head h2 {
    font-size: 21px;
  }
  .need-row {
    margin-bottom: 8px;
  }
  .inspection {
    bottom: 13px;
  }
  .map-hint {
    bottom: 12px;
  }
  .minimap-wrap {
    bottom: 13px;
  }
  .resource-list {
    gap: 3px;
    top: 20px;
  }
  .resource {
    padding: 1px 6px;
  }
  .map-topline {
    top: 15px;
  }
  .minimap-wrap {
    width: 182px;
  }
  #minimap {
    width: 180px;
    height: 120px;
  }
  .tool-panel {
    max-height: 39vh;
  }
}
@media (max-width: 750px) {
  #game {
    min-width: 360px;
  }
  .topbar {
    height: 51px;
    gap: 16px;
    padding: 0 10px;
  }
  .brand {
    font-size: 18px;
    letter-spacing: 2px;
    gap: 6px;
  }
  .brand svg {
    width: 22px;
  }
  .brand small {
    font-size: 5px;
    letter-spacing: 1px;
  }
  .colony-heading {
    font-size: 11px;
  }
  .colony-heading strong {
    font-size: 12px;
  }
  .top-actions {
    gap: 2px;
  }
  .menu-button {
    font-size: 0;
    padding: 5px;
    border: 0;
  }
  .menu-button span {
    font-size: 17px;
    margin: 0;
  }
  .icon-button svg {
    width: 16px;
  }
  .icon-button {
    padding: 5px;
  }
  .roster-bar {
    height: 91px;
    padding: 0 9px;
    gap: 8px;
  }
  .roster-caption {
    display: none;
  }
  .roster {
    gap: 5px;
  }
  .pawn-card {
    min-width: 73px;
    width: 73px;
    height: 71px;
    flex-direction: column;
    padding: 1px 4px;
    gap: 0;
  }
  .pawn-card svg {
    width: 31px;
    height: 36px;
  }
  .pawn-card .name {
    font-size: 10px;
  }
  .pawn-card .role {
    font-size: 7px;
    margin-top: 1px;
    max-width: 62px;
  }
  .pawn-card .mood-line {
    width: 55px;
    margin-top: 4px;
  }
  .pawn-card .pawn-badge {
    top: 3px;
    left: 52px;
  }
  .pawn-card.mech {
    min-width: 73px;
  }
  .time-controls {
    width: 74px;
    max-width: 74px;
    gap: 5px;
  }
  .date {
    font-size: 8px;
    line-height: 1.4;
  }
  .speed-group {
    flex-wrap: wrap;
    width: 68px;
  }
  .speed-group button {
    min-width: 32px;
    font-size: 9px;
    height: 23px;
  }
  .resource-list {
    left: 9px;
    top: 12px;
    gap: 2px;
  }
  .resource {
    min-width: 80px;
    gap: 4px;
    font-size: 9px;
    padding: 0 4px;
  }
  .resource .res-name {
    display: none;
  }
  .resource .sprite-icon {
    width: 22px;
    height: 22px;
  }
  .resource strong {
    font-size: 10px;
  }
  .resource:nth-child(n + 9) {
    display: none;
  }
  .map-topline {
    left: 100px;
    right: 10px;
    top: 13px;
  }
  .map-label {
    padding: 7px 9px;
    gap: 0;
  }
  .map-label #map-coordinates {
    display: none;
  }
  .map-label .eyebrow {
    font-size: 8px;
  }
  .map-tools {
    gap: 3px;
  }
  .map-tools button {
    width: 25px;
    height: 25px;
  }
  .map-tools button:nth-child(3) {
    display: none;
  }
  .map-tools svg {
    width: 13px;
  }
  .story-card {
    top: 55px;
    right: 10px;
    width: 195px;
    padding: 13px;
  }
  .story-card h2 {
    font-size: 20px;
  }
  .story-card p {
    font-size: 10px;
  }
  .story-card .eyebrow {
    font-size: 8px;
  }
  .story-card .objective {
    font-size: 9px;
    padding: 7px 0;
  }
  .story-card .story-foot {
    font-size: 8px;
  }
  .minimap-wrap {
    width: 118px;
    right: 9px;
    bottom: 10px;
  }
  #minimap {
    width: 116px;
    height: 77px;
  }
  .minimap-title {
    font-size: 7px;
    letter-spacing: 0.7px;
    padding: 6px;
  }
  .minimap-title span:last-child {
    font-size: 7px;
  }
  .minimap-foot {
    display: none;
  }
  .map-hint {
    display: none;
  }
  .inspection {
    left: 9px;
    bottom: 10px;
    width: 225px;
  }
  .inspect-head h2 {
    font-size: 20px;
  }
  .inspect-head p {
    font-size: 9px;
  }
  .inspection .inspect-head {
    padding: 8px 11px;
  }
  .inspect-head .portrait {
    width: 40px;
    height: 43px;
  }
  .inspect-head .portrait svg {
    width: 42px;
  }
  .inspect-tabs {
    padding: 0 6px;
  }
  .inspect-tabs button {
    font-size: 9px;
    padding: 7px;
  }
  .inspect-body {
    max-height: 145px;
    padding: 10px 12px;
  }
  .need-row {
    grid-template-columns: 65px 1fr 27px;
    font-size: 9px;
    margin-bottom: 8px;
  }
  .inspect-actions {
    padding: 7px 9px;
  }
  .inspect-actions button {
    font-size: 9px;
    padding: 6px;
  }
  .inspect-status {
    padding: 0 12px 9px;
    font-size: 9px;
  }
  .bottom-nav {
    height: 77px;
    flex-wrap: wrap;
    gap: 0;
    padding: 2px 5px;
  }
  .nav-button {
    flex: 0 0 20%;
    max-width: 20%;
    height: 35px;
    gap: 5px;
    font-size: 9px;
  }
  .nav-button svg {
    width: 14px;
    height: 14px;
  }
  .statusbar {
    height: 23px;
    padding: 0 10px;
    font-size: 7px;
  }
  .tool-panel {
    max-height: 40vh;
  }
  .panel-head {
    padding: 10px 12px;
    gap: 10px;
  }
  .panel-head h2 {
    font-size: 15px;
  }
  .panel-head p {
    font-size: 9px;
    max-width: 200px;
  }
  .panel-content {
    padding: 10px 12px;
    gap: 10px;
  }
  .category-list {
    min-width: 83px;
    padding-right: 8px;
  }
  .category-list button {
    font-size: 9px;
    padding: 6px;
  }
  .build-item {
    width: 74px;
    min-height: 72px;
    padding: 5px;
  }
  .build-item .sprite-icon {
    width: 29px;
    height: 29px;
  }
  .build-item .item-name {
    font-size: 8px;
  }
  .build-item .cost {
    font-size: 7px;
  }
  .build-grid {
    gap: 5px;
  }
  .tech-grid {
    grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
  }
  .tech {
    padding: 9px;
  }
  .tech strong {
    font-size: 10px;
  }
  .tech p {
    font-size: 9px;
  }
  .panel-content .split {
    flex-direction: column;
  }
  .biotech-layout {
    grid-template-columns: 1fr;
  }
  .biotech-layout > .content-card:last-child {
    grid-column: auto;
  }
  .content-card {
    min-width: 170px;
    padding: 12px;
    max-width: none;
  }
  .world-map {
    width: 100%;
    height: 150px;
  }
  .log-row {
    grid-template-columns: 54px 1fr;
    gap: 4px;
    font-size: 9px;
  }
  .log-row > span:last-child {
    grid-column: 2;
  }
  .power-button {
    width: calc(50% - 4px);
    padding: 9px;
  }
  .power-button strong {
    font-size: 10px;
  }
  .power-button small {
    font-size: 8px;
  }
  .tool-hint {
    top: 50px;
    max-width: 80%;
    width: max-content;
    font-size: 10px;
    padding: 8px 10px;
  }
  .alerts {
    right: 10px;
    top: 53px;
    width: 195px;
  }
  .dialog-head {
    padding: 18px;
  }
  .dialog-head h1 {
    font-size: 24px;
  }
  .dialog-body {
    padding: 17px 18px;
  }
  .dialog-body .settings-grid {
    gap: 12px;
  }
  .scenario-grid {
    gap: 7px;
  }
  .scenario-card {
    padding: 9px;
  }
  .scenario-card strong {
    font-size: 11px;
  }
  .scenario-card p {
    font-size: 9px;
  }
  .dialog-actions {
    padding: 14px 18px;
  }
  .help-grid {
    gap: 0 16px;
  }
  .help-grid p {
    font-size: 10px;
  }
  .toast {
    font-size: 10px;
    width: max-content;
    max-width: 90%;
    bottom: 30px;
  }
  .data-table {
    font-size: 10px;
  }
  .data-table td {
    padding: 5px;
  }
  .bill-row {
    font-size: 10px;
    gap: 5px;
  }
  .bill-row small {
    width: 80px;
    font-size: 8px;
  }
}
/* Compact management trays keep the map usable while planning. */
.panel-content:has(.category-list) {
  flex-direction: column;
  gap: 10px;
}
.category-list {
  flex-direction: row;
  flex-wrap: wrap;
  min-width: 0;
  width: 100%;
  padding: 0 0 9px;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  gap: 4px;
}
.category-list button {
  text-align: center;
  padding: 7px 13px;
}
.management-open .inspection {
  display: none;
}
.management-open .map-hint {
  display: none;
}
@media (max-width: 750px) {
  .category-list {
    padding-bottom: 6px;
    gap: 2px;
  }
  .category-list button {
    padding: 5px 8px;
  }
  .panel-content:has(.category-list) {
    gap: 6px;
  }
}
#world {
  touch-action: none;
}
.biotech-layout > .content-card {
  max-width: none;
  min-width: 0;
}
.map-tools #zoom-in,
.map-tools #zoom-out {
  font-size: 18px;
  line-height: 1;
}
@media (max-width: 750px) {
  .time-controls .date {
    line-height: 1.25;
    gap: 2px;
    width: 74px;
  }
  .date #date-label {
    white-space: nowrap;
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .date #weather-label {
    white-space: nowrap;
    font-size: 7px;
  }
  .speed-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 68px;
  }
  .speed-group button {
    width: 100%;
    min-width: 0;
    height: 23px;
    padding: 0;
    font-size: 8px;
  }
  .map-tools #toggle-grid {
    display: none;
  }
  .biotech-layout > .content-card {
    max-width: none;
  }
}
.world-map {
  height: 200px;
}
.world-map .planet-map {
  width: 100%;
  height: 100%;
  display: block;
  background: #58756d;
}
.planet-map rect {
  cursor: help;
}
.planet-map text {
  pointer-events: none;
}
.planet-map path {
  pointer-events: none;
}
.body-summary {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.body-diagram {
  width: 82px;
  height: 148px;
  flex: none;
}
.capacities {
  flex: 1;
  min-width: 115px;
}
.capacity-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 10px;
  border-bottom: 1px solid var(--line);
}
.capacity-row span {
  color: var(--muted);
}
.capacity-row strong {
  font-size: 10px;
  color: #c6d3b7;
}
.capacity-row .warn {
  color: var(--red);
}
.injury {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  font-size: 10px;
}
.injury strong {
  font-weight: 500;
}
.injury small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}
.injury > span {
  font-size: 9px;
  color: #c6b28b;
}
.injury.missing > span {
  color: var(--red);
}
.injury.implant > span {
  color: var(--violet);
}
.clinic-layout {
  display: grid;
  grid-template-columns: 145px minmax(280px, 1fr) minmax(270px, 1fr);
  gap: 16px;
  width: 100%;
}
.clinic-layout > .content-card {
  max-width: none;
  min-width: 0;
}
.clinic-patients {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.clinic-patients button {
  padding: 10px;
  text-align: left;
  border-radius: 3px;
}
.clinic-patients small {
  display: block;
  margin-top: 5px;
  font-size: 9px;
}
.clinic-layout .panel-select {
  display: block;
  width: 100%;
  margin-top: 7px;
}
.inspection .body-diagram {
  width: 65px;
  height: 118px;
}
.inspection .body-summary {
  gap: 10px;
}
@media (max-width: 1000px) {
  .clinic-layout {
    grid-template-columns: 100px 1fr 1fr;
    gap: 10px;
  }
  .clinic-layout .content-card {
    padding: 11px;
  }
  .clinic-layout .body-diagram {
    width: 60px;
    height: 110px;
  }
  .clinic-layout .body-summary {
    gap: 8px;
  }
}
@media (max-width: 750px) {
  .clinic-layout {
    grid-template-columns: 1fr;
  }
  .clinic-patients {
    flex-direction: row;
    overflow: auto;
  }
  .clinic-patients button {
    min-width: 85px;
  }
  .body-diagram {
    width: 75px;
    height: 135px;
  }
  .clinic-layout .body-diagram {
    width: 75px;
    height: 135px;
  }
}

.storage-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(400px, 2fr);
  gap: 18px;
  align-items: start;
}
.storage-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  font-size: 12px;
  padding: 12px 0;
  max-height: 270px;
  overflow: auto;
}
.storage-layout .data-table {
  font-size: 12px;
}
.storage-layout label > .panel-select {
  display: block;
  margin: 6px 0 12px;
  width: 100%;
}
@media (max-width: 850px) {
  .storage-layout {
    grid-template-columns: 1fr;
  }
  .storage-layout .content-card {
    overflow-x: auto;
  }
}
.policy-assignment {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  margin: 7px 0;
}
.drug-number {
  width: 65px;
  background: #232923;
  color: #ddd9c8;
  border: 1px solid #535a4b;
  padding: 7px;
  border-radius: 4px;
}
.drug-policy-card {
  margin-top: 18px;
}
.drug-health {
  margin: 12px 0;
}
.drug-health h3 {
  font-size: 13px;
  margin: 12px 0 6px;
}
.drug-health p {
  margin: 4px 0;
}
.drug-policy-card .data-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #a8b88c;
}

.storage-layout {
  width: 100%;
}
.storage-layout > .content-card {
  max-width: none;
  min-width: 0;
}
.policies-content {
  display: block !important;
}
.drug-policy-card {
  width: 100%;
  max-width: none !important;
}
.policy-assignment .panel-select {
  max-width: 170px;
}
.storage-filters label {
  display: flex;
  align-items: center;
  gap: 5px;
}
.storage-filters input {
  margin: 0;
}
.animal-tabs {
  display: flex;
  gap: 7px;
  padding: 8px 22px;
  border-bottom: 1px solid var(--line);
}
.animal-tabs button {
  padding: 8px 18px;
}
.animal-layout {
  width: 100%;
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.animal-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.animal-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  text-align: left;
}
.animal-list strong {
  font-size: 12px;
  display: block;
  font-weight: 500;
}
.animal-list small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.animal-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.animal-detail > .content-card,
.animal-pens > .content-card {
  max-width: none;
  min-width: 0;
}
.animal-detail label > .panel-select,
.animal-pens label > .panel-select {
  display: block;
  width: 100%;
  margin-top: 7px;
}
.animal-meters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.animal-meters b {
  color: #c4d2af;
  margin-left: 5px;
}
.animal-pens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  align-items: start;
}
.animal-detail input[type="checkbox"] {
  accent-color: #afbc94;
  width: 17px;
  height: 17px;
}
.animal-detail .data-table {
  margin-bottom: 14px;
}
@media (max-width: 1100px) {
  .animal-detail {
    grid-template-columns: 1fr;
  }
  .animal-pens {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  .animal-layout {
    grid-template-columns: 1fr;
  }
  .animal-list {
    flex-direction: row;
    overflow: auto;
  }
  .animal-list button {
    min-width: 165px;
  }
  .animal-pens {
    grid-template-columns: 1fr;
  }
  .animal-tabs {
    padding: 8px 12px;
  }
  .animal-meters {
    gap: 12px;
  }
  .animal-detail .data-table {
    font-size: 11px;
  }
}
.psychic-control {
  flex: 0 0 225px;
  max-width: 225px;
}
.psychic-control .panel-select {
  width: 100%;
}
.psychic-control .inline-actions {
  gap: 5px;
}
.psychic-control h3 {
  margin-bottom: 10px;
}
@media (max-width: 650px) {
  .psychic-control {
    flex: 0 0 200px;
    max-width: 200px;
  }
}

.power-button:disabled {
  opacity: 0.62;
}
.psy-grid {
  min-width: 0;
}
@media (max-width: 650px) {
  .panel-content:has(.psychic-control) {
    display: block;
  }
  .psychic-control {
    max-width: none;
    width: 100%;
    margin-bottom: 18px;
  }
  .psy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
}
.expanded-layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  width: 100%;
}
.expanded-controls {
  min-width: 0;
}
.expanded-controls > .panel-select {
  width: 100%;
}
.expanded-path-list {
  display: grid;
  gap: 5px;
  margin: 18px 0;
  max-height: 310px;
  overflow: auto;
}
.expanded-path-list button {
  text-align: left;
  padding: 10px;
}
.expanded-path-list span {
  display: block;
}
.expanded-path-list small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}
.expanded-tree {
  min-width: 0;
}
.expanded-tree .content-card {
  max-width: none;
}
.expanded-abilities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.expanded-ability {
  border: 1px solid var(--line);
  background: #a7b18d08;
  padding: 15px;
  border-radius: 4px;
}
.expanded-ability h3 {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 8px;
}
.expanded-ability.learned {
  border-color: #c4b3d263;
  background: #b6a4cd0d;
}
.expanded-ability label {
  display: block;
  margin-top: 10px;
}
.expanded-path-head {
  margin-bottom: 14px;
}
.expanded-controls input[type="checkbox"],
.expanded-ability input[type="checkbox"] {
  accent-color: #b8a2cf;
}
@media (max-width: 750px) {
  .expanded-layout {
    grid-template-columns: 1fr;
  }
  .expanded-path-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 160px;
    overflow: auto;
  }
  .expanded-path-list button {
    font-size: 10px;
  }
  .expanded-path-list small {
    font-size: 9px;
  }
  .expanded-abilities {
    grid-template-columns: 1fr;
  }
}
.expanded-path-picker {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.expanded-path-picker select {
  min-width: 240px;
  max-width: 100%;
}
.focus-choices {
  margin: 14px 0;
}
.focus-choices summary {
  cursor: pointer;
  color: #c4b3d2;
  font-size: 12px;
}
@media (max-width: 750px) {
  .expanded-path-picker {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }
  .expanded-path-picker select {
    width: 100%;
    min-width: 0;
  }
}
.expanded-ability button,
.expanded-controls > button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #a6b68d12;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.expanded-ability button:disabled,
.expanded-controls > button:disabled {
  opacity: 0.4;
  cursor: default;
}
.expanded-ability button:not(:disabled):hover,
.expanded-controls > button:not(:disabled):hover {
  border-color: #c4b3d2;
  background: #b6a4cd20;
}
.expanded-controls #expanded-live button {
  padding: 7px 10px;
  margin: 5px 0;
  border: 1px solid #c7788666;
  border-radius: 3px;
  background: #c7788614;
  color: var(--text);
  cursor: pointer;
}

.android-entry {
  width: 100%;
  text-align: left;
  margin-bottom: 18px;
  padding: 14px 18px;
  color: #d5d7b1;
  background: #758c7d22;
  border: 1px solid #a8bc9755;
  border-radius: 5px;
  font:
    18px Georgia,
    serif;
}
.android-entry span {
  display: block;
  font: 12px system-ui;
  color: #a9bca5;
  margin-top: 5px;
}
.android-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(260px, 1fr) minmax(
      250px,
      1fr
    );
  gap: 18px;
  align-items: start;
}
.android-layout .content-card {
  margin-bottom: 14px;
  min-width: 0;
}
.android-layout p {
  line-height: 1.65;
}
.android-layout button {
  margin: 4px 0;
}
.android-layout h3 {
  margin-bottom: 12px;
}
.android-component-list {
  max-height: 360px;
  overflow: auto;
  margin: 14px 0;
  border-top: 1px solid #9fb28233;
  border-bottom: 1px solid #9fb28233;
}
.android-component {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px solid #9fb28215;
  font-size: 12px;
  cursor: pointer;
}
.android-component input {
  accent-color: #b6c99d;
  flex: none;
  width: 16px;
  height: 16px;
}
.android-component span small {
  display: block;
  color: #9bae97;
  font-size: 10px;
  margin-top: 3px;
}
.android-component.unavailable {
  opacity: 0.55;
}
.android-pawn {
  padding: 16px 0;
  border-top: 1px solid #9fb28233;
}
.android-pawn .inline-actions {
  flex-wrap: wrap;
}
.android-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 12px;
  margin: 14px 0;
}
.android-layout .panel-select {
  width: 100%;
  box-sizing: border-box;
}
.android-station small {
  font: 11px system-ui;
  color: #93a88d;
}
@media (max-width: 1100px) {
  .android-layout {
    grid-template-columns: minmax(240px, 1fr) minmax(260px, 1fr);
  }
  .android-layout > section:last-child {
    grid-column: 1/-1;
  }
}
@media (max-width: 650px) {
  .android-layout {
    display: flex;
    flex-direction: column;
  }
  .android-layout > * {
    width: 100%;
    box-sizing: border-box;
  }
  .android-layout .content-card {
    box-sizing: border-box;
  }
  .android-component-list {
    max-height: 260px;
  }
}
.panel-content:has(.android-entry) {
  display: block;
}
.android-layout .content-card {
  max-width: none;
}
.tool-panel:has(.android-layout) .panel-head {
  position: sticky;
  top: 0;
  background: #29342d;
  z-index: 2;
}
.puppet-network {
  margin-top: 14px;
}
.puppet-roster {
  display: grid;
  gap: 7px;
}
.puppet-roster > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.puppet-roster small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 11px;
}
.focus-choices > select {
  width: 100%;
  margin: 10px 0;
}
.focus-choices > button {
  margin: 6px 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #a6b68d12;
  color: var(--text);
  cursor: pointer;
}

.synthetic-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.6fr);
  gap: 20px;
  width: 100%;
  align-items: start;
}
.synthetic-layout .content-card {
  min-width: 0;
  max-width: none;
}
.synthetic-layout label {
  display: block;
  font-size: 10px;
  color: #b4c3a3;
  margin: 12px 0 6px;
}
.synthetic-layout .panel-select {
  width: 100%;
  box-sizing: border-box;
}
.synthetic-body {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 16px 0;
}
.synthetic-body .body-diagram {
  width: 95px;
  height: 170px;
  flex: none;
}
.synthetic-body > div {
  flex: 1;
  min-width: 0;
}
.synthetic-catalog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 15px;
}
.synthetic-part,
.synthetic-bill {
  border: 1px solid #9cac8533;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 10px;
}
.synthetic-part strong {
  font-size: 12px;
  font-weight: 500;
  color: #dce2c8;
}
.synthetic-part[hidden] {
  display: none;
}
.synthetic-layout .card-top {
  gap: 10px;
  flex-wrap: wrap;
}
.tool-panel:has(.synthetic-layout) .panel-head {
  position: sticky;
  top: 0;
  background: #29342d;
  z-index: 2;
}
.tool-panel:has(.synthetic-layout) {
  scroll-padding-top: 70px;
}
@media (max-width: 750px) {
  .synthetic-layout {
    display: block;
  }
  .synthetic-layout > .content-card {
    margin-bottom: 15px;
  }
  .synthetic-catalog {
    grid-template-columns: 1fr;
  }
  .synthetic-body {
    gap: 14px;
  }
  .synthetic-layout .content-card {
    box-sizing: border-box;
  }
}

/* Thermal care uses the established colony panel palette. */
.thermal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.thermal-layout .content-card {
  margin-bottom: 12px;
}
.thermal-controls {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.thermal-controls label {
  display: grid;
  gap: 5px;
  font-size: 12px;
}
.thermal-controls input {
  width: 100px;
  margin: 0;
}
.thermal-device h3 {
  margin: 0;
}
@media (max-width: 760px) {
  .thermal-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.thermal-layout > section {
  min-width: 0;
}
.thermal-layout .content-card {
  width: auto;
  max-width: none;
}

.skip-travel-layout { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; align-items:start; }
.skip-travel-layout .content-card { width:auto; max-width:none; min-width:0; }
.skip-door-card { border-top:1px solid #a6b78b33; margin-top:12px; padding-top:10px; }
@media(max-width:1000px) { .skip-travel-layout { grid-template-columns:1fr; } }

.area-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.area-editor > .content-card {
  min-width: 0;
  max-width: none;
}
.area-editor .panel-select {
  min-width: 0;
}
.area-editor .inline-actions {
  flex-wrap: wrap;
}
.area-editor [aria-pressed="true"] {
  background: #385e55;
  color: #e4f8ee;
}
.area-size {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.area-size span {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 2px;
}
@media (max-width: 600px) {
  .area-editor {
    grid-template-columns: 1fr;
  }
  .area-editor button,
  .area-editor select {
    min-height: 32px;
  }
}

.food-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 8px 0;
}
.food-options label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
}
