:root {
  --ink: #103d4c;
  --teal: #218fa0;
  --paper: #fff3d3;
  --paper-deep: #f1dca7;
  --yellow: #f2b632;
  --coral: #e9664f;
  --leaf: #79b84a;
  --blue: #1e9dd2;
  --shadow: rgba(16, 61, 76, 0.42);
  --ui-panel-large: url("../assets/runtime-ui/sliced/ui_panel_large.png");
  --ui-panel-medium: url("../assets/runtime-ui/sliced/ui_panel_medium.png");
  --ui-panel-readable: url("../assets/runtime-ui/sliced/ui_panel_readable_v1.png");
  --ui-panel-small: url("../assets/runtime-ui/sliced/ui_panel_small.png");
  --ui-button-primary: url("../assets/runtime-ui/sliced/ui_button_primary.png");
  --ui-button-danger: url("../assets/runtime-ui/sliced/ui_button_danger.png");
  --ui-button-success: url("../assets/runtime-ui/sliced/ui_button_success.png");
  --ui-button-info: url("../assets/runtime-ui/sliced/ui_button_info.png");
  --ui-nav-tab: url("../assets/runtime-ui/sliced/ui_nav_tab.png");
  --ui-slot: url("../assets/runtime-ui/sliced/ui_inventory_slot.png");
  --ui-slot-selected: url("../assets/runtime-ui/sliced/ui_inventory_slot_selected.png");
  --ui-plaque: url("../assets/runtime-ui/sliced/ui_museum_plaque.png");
  --ui-plaque-locked: url("../assets/runtime-ui/sliced/ui_museum_plaque_locked.png");
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: #0c3040; }

body {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  color: var(--ink);
  overflow: hidden;
}

button { font: inherit; }

.app-shell {
  /* 48px message rail + 6px separation + 12px outside margin. Keep all
     message text in CSS pixels, independently of the game's rem scaling. */
  width: min(calc(100vw - 12px), calc((100vh - 66px) * 1.776833156), 1632px);
  width: min(calc(100vw - 12px), calc((100dvh - 66px) * 1.776833156), 1632px);
  padding: 0;
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1672 / 941;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  background: #1d8698 center / cover no-repeat;
  border: 3px solid var(--ink);
  box-shadow: 0 18px 0 rgba(0, 0, 0, 0.17), 0 28px 48px rgba(0, 0, 0, 0.34);
}

.stage-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(6, 38, 48, 0.08);
}

.top-runtime {
  position: absolute;
  top: 1.9%;
  left: 3%;
  right: calc(3% + max(3.1rem, 22px));
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 7.5%;
  pointer-events: none;
}

.resource-strip {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}

.resource-chip,
.runtime-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  min-height: 2.15rem;
  padding: 0.32rem 0.72rem;
  color: var(--ink);
  background: rgba(255, 243, 211, 0.95);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--shadow);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.resource-chip { flex: 0 0 auto; min-width: 0; white-space: nowrap; }
.resource-chip b { font-size: 1rem; white-space: nowrap; }
.resource-chip small { font-size: 0.72rem; font-weight: 800; flex: 0 0 auto; white-space: nowrap; }
.exact-count, .inventory-quantity { white-space: nowrap; overflow-wrap: normal; }
.resource-item-icon { width: 1.5rem; height: 1.5rem; flex: 0 0 auto; object-fit: contain; }

.runtime-chip {
  margin-left: auto;
  max-width: 48%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-runtime {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.screen-runtime > * { pointer-events: auto; }

.manual-explore-intro { position: absolute; top: 12%; left: 3%; width: 58%; text-align: center; color: var(--paper); text-shadow: 1px 2px 0 var(--ink), -1px -1px 0 var(--ink); }
.manual-explore-intro h2 { margin: 0; font-size: 1.6rem; }
.manual-explore-intro p { margin: .3rem 0 0; font-size: .85rem; font-weight: 900; }
.stage[data-screen="explore"] .exploration-islands { top: 25%; }

.home-title {
  position: absolute;
  top: 18%;
  right: 5.5%;
  width: 39%;
  color: var(--ink);
  text-align: center;
  text-shadow: 0 3px 0 rgba(255, 243, 211, 0.86), 0 7px 0 rgba(242, 182, 50, 0.52);
}

.home-title p,
.home-title h1 { margin: 0; }
.home-title p { font-size: clamp(0.75rem, 1.5vw, 1.15rem); font-weight: 950; }
.home-title h1 { margin-top: 0.25rem; font-size: min(7cqw, 5.4rem); line-height: 1; letter-spacing: 0; white-space: nowrap; }

.action-dock {
  position: absolute;
  right: 2.7%;
  bottom: 12.5%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
  max-width: 42%;
}

.action-button,
.nav-hit,
.route-choice,
.grid-hit,
.close-hit {
  border: 2px solid var(--ink);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--shadow);
  cursor: pointer;
  font-weight: 950;
  transition: transform 120ms ease, filter 120ms ease;
}

.action-button {
  min-width: 8rem;
  min-height: 3.25rem;
  padding: 0.72rem 1.15rem;
  border: 0;
  background: transparent var(--ui-button-primary) center / 126.22% 125% no-repeat;
  box-shadow: none;
  font-size: clamp(0.74rem, 1.3vw, 1rem);
  text-shadow: 0 1px 0 rgba(255, 243, 211, 0.55);
}

.action-button.primary { background-image: var(--ui-button-primary); }
.action-button.success { background-image: var(--ui-button-success); background-size: 122.26% 128%; }
.action-button.danger { background-image: var(--ui-button-danger); background-size: 127.04% 128%; }
.action-button.info { color: #fff7dc; background-image: var(--ui-button-info); background-size: 129.57% 126.98%; text-shadow: 0 1px 0 rgba(16, 61, 76, 0.8); }
.action-button:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.7); }
.action-button:not(:disabled):hover,
.route-choice:hover,
.close-hit:hover { transform: translate(-1px, -1px); filter: brightness(1.06); }
.action-button:not(:disabled):active,
.route-choice:active,
.close-hit:active { transform: translate(2px, 2px); }

.runtime-card {
  position: absolute;
  left: 2.7%;
  bottom: 12.5%;
  max-width: 32%;
  padding: 1.25rem 1.5rem;
  color: var(--ink);
  background: transparent var(--ui-panel-readable) center / 105.34% 129.42% no-repeat;
  border: 0;
  box-shadow: none;
}

.runtime-card h2,
.runtime-card p { margin: 0; }
.runtime-card h2 { font-size: clamp(0.88rem, 1.75vw, 1.25rem); }
.runtime-card p { margin-top: 0.28rem; font-size: clamp(0.68rem, 1.15vw, 0.9rem); line-height: 1.35; }
.runtime-card.completed { filter: saturate(1.12) brightness(1.03); }
.runtime-card.completed h2 { color: #8a3b2d; }

.route-panel {
  position: absolute;
  right: 2.8%;
  top: 13.5%;
  width: min(40%, 37rem);
  height: 72%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(18px, 3.8vw, 54px) clamp(18px, 3.5vw, 50px);
  background: transparent var(--ui-panel-readable) center / 105.34% 129.42% no-repeat;
  border: 0;
  box-shadow: none;
}

.route-panel > * { flex-shrink: 0; }
.route-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px 2px 4px; }
.route-panel > .route-scroll { flex-shrink: 1; }
.route-panel h2 { align-self: flex-start; margin: 0 0 0.45rem; font-size: clamp(1rem, 2vw, 1.45rem); }
.route-panel h2,
.inventory-panel h2,
.museum-panel h2,
.commission-panel h2,
.settlement-panel h2,
.robot-panel h2 {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: rgba(255, 243, 211, 0.92);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(16, 61, 76, 0.22);
}
.route-panel p { margin: 0.25rem 0; font-size: clamp(0.68rem, 1.15vw, 0.88rem); }
.route-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin: 0.7rem 0; }
.route-choice { min-height: 4rem; padding: 0.7rem 0.8rem; text-align: left; background: transparent var(--ui-panel-small) center / 100% 100% no-repeat; border: 0; box-shadow: none; }
.route-choice.selected { outline: 4px solid var(--yellow); outline-offset: -0.35rem; filter: saturate(1.16) brightness(1.03); }
.route-choice:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.7); }
.route-choice strong, .route-choice small { display: block; }
.route-choice small { margin-top: 0.22rem; }
.route-choices .route-choice { min-height: 4.5rem; padding: 1rem 18% 1.25rem 20%; }
.route-choices .route-choice strong,
.route-choices .route-choice small { line-height: 1.15; }
.robot-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; margin: 0.4rem 0 0.65rem; }
.robot-pick { display: flex; align-items: center; gap: 0.25rem; min-width: 0; min-height: 3rem; padding: 0.25rem 0.35rem; background: rgba(33, 143, 160, 0.12); border: 1px solid var(--teal); cursor: pointer; }
.robot-pick.is-busy { background: rgba(16, 61, 76, 0.08); cursor: default; }
.robot-pick input { flex: 0 0 auto; margin: 0; accent-color: var(--teal); }
.robot-pick span { min-width: 0; font-size: 0.86rem; font-weight: 800; }
.robot-pick small { display: block; margin-top: 0.1rem; font-size: 0.72rem; font-weight: 500; }
.route-robot-icon { width: 2.7rem; height: 2.7rem; object-fit: contain; }
.route-robot-title { font-weight: 800; }
.route-estimates { flex: 0 0 auto; min-height: 0; overflow: visible; }
.route-estimates small { display: block; margin-top: 0.35rem; font-size: 0.75rem; line-height: 1.4; }
.route-map { position: absolute; left: 3%; top: 15%; width: 54%; height: 57%; }
.route-map-paths { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--paper); stroke-width: 3; stroke-dasharray: 7 8; opacity: 0.7; pointer-events: none; }
.route-map-choice { position: absolute; width: 47%; height: 56%; padding: 0; border: 0; border-radius: 0.5rem; color: var(--ink); background: transparent; font: inherit; cursor: pointer; }
.route-map-choice:nth-of-type(1) { left: 0; top: 0; }
.route-map-choice:nth-of-type(2) { right: 0; top: 0; }
.route-map-choice:nth-of-type(3) { left: 26.5%; bottom: 0; }
.route-location-art { position: absolute; left: 5%; top: 0; width: 90%; height: 83%; object-fit: contain; transition: transform 120ms ease, filter 120ms ease; }
.route-map-choice:not(:disabled):hover .route-location-art { transform: translateY(-3px); filter: brightness(1.06); }
.route-map-choice:disabled { cursor: not-allowed; }
.route-map-choice:disabled .route-location-art { opacity: 0.6; filter: saturate(0.2); }
.route-map-choice:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.route-map-label { position: absolute; bottom: 0; left: 4%; right: 4%; height: 7rem; display: flex; flex-direction: column; justify-content: center; gap: 0.1rem; padding: 1.4rem 12% 2.3rem; background: transparent var(--ui-plaque) center / 100% 100% no-repeat; }
.route-map-label strong,
.route-map-label small { line-height: 1.1; }
.route-map-label strong { font-size: 1.2rem; }
.route-map-label small { font-size: 0.85rem; }
.route-map-choice.selected .route-map-label { outline: 3px solid var(--yellow); outline-offset: -0.2rem; }
.altar-location-stack { position: absolute; left: 5%; top: 0; width: 90%; height: 83%; pointer-events: none; transition: transform 120ms ease, filter 120ms ease; }
.altar-location-stack .route-location-art { left: 0; top: 0; width: 100%; height: 100%; transition: none; }
.altar-gate-canvas { position: absolute; pointer-events: none !important; }
.route-map-choice:not(:disabled):hover .altar-location-stack { transform: translateY(-3px); filter: brightness(1.06); }
.route-map-choice:not(:disabled):hover .altar-location-stack .route-location-art { transform: none; filter: none; }
.route-map-choice:disabled .altar-location-stack { opacity: 0.6; filter: saturate(0.2); }
.route-map-choice:disabled .altar-location-stack .route-location-art { opacity: 1; filter: none; }
.stage:is([data-screen="route"], [data-screen="explore"]) .action-dock { left: 3%; right: auto; max-width: 57%; justify-content: center; }

.exploration-islands { position: absolute; left: 3%; top: 18%; bottom: 25%; width: 58%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.exploration-islands.multiple { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
.exploration-island { position: relative; min-width: 0; min-height: 0; }
.exploration-location-art { position: absolute; left: 5%; top: 0; width: 90%; height: 85%; object-fit: contain; }
.exploration-caption { position: absolute; bottom: 0; left: 5%; right: 5%; height: 7.8rem; display: flex; flex-direction: column; justify-content: center; gap: 0.2rem; padding: 1.6rem 12% 2.7rem; text-align: center; background: transparent var(--ui-plaque) center / 100% 100% no-repeat; }
.exploration-caption strong,
.exploration-caption small { line-height: 1.1; }
.exploration-caption strong { font-size: 1.4rem; }
.exploration-caption small { font-size: 0.95rem; }
.runtime-card.explore-panel { left: auto; bottom: auto; right: 2.8%; top: 15%; width: 35.5%; max-width: none; height: 68%; display: flex; flex-direction: column; overflow: hidden; padding: clamp(18px, 3.8vw, 54px) clamp(18px, 3.5vw, 50px); background-image: var(--ui-panel-readable); }
.explore-panel > * { flex-shrink: 0; }
.expedition-fleet { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; align-content: start; gap: 0.5rem; margin: 0.8rem 0 0.4rem; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.expedition-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem; border: 1px solid rgba(16, 61, 76, 0.4); background: rgba(33, 143, 160, 0.08); }
.expedition-actor { flex: 0 0 auto; width: 5.5rem; height: 5.5rem; object-fit: contain; }
.expedition-row > div { flex: 1 1 0; min-width: 0; }
.expedition-row strong { display: block; font-size: 1rem; }
.expedition-row small { display: block; margin-top: 0.15rem; font-size: 0.8rem; line-height: 1.3; }
.expedition-status { display: inline-block; margin: 0.25rem 0 0.1rem; padding: 0.1rem 0.4rem; border-radius: 0.2rem; font-size: 0.8rem; font-weight: 800; color: var(--ink); background: var(--leaf); }
.expedition-status.state-collecting { color: var(--paper); background: #126b80; }
.expedition-status.state-ready { background: var(--yellow); }
.explore-capacity { font-weight: 800; }

.inventory-panel {
  position: absolute;
  right: 2.8%;
  top: 13.5%;
  width: min(40%, 37rem);
  max-height: 72%;
  overflow: auto;
  padding: clamp(18px, 3.8vw, 54px) clamp(18px, 3.5vw, 50px);
  background: transparent var(--ui-panel-readable) center / 105.34% 129.42% no-repeat;
  border: 0;
  box-shadow: none;
}

.inventory-panel h2 { margin: 0 0 0.45rem; }
.inventory-filters { display: flex; flex-wrap: wrap; gap: 0.32rem; margin: 0 0 0.45rem; }
.inventory-filter {
  min-height: 32px;
  border: 1px solid var(--ink);
  padding: 0.24rem 0.48rem;
  color: var(--ink);
  background: #fff9e7;
  cursor: pointer;
  font-weight: 900;
}
.inventory-filter.selected { background: var(--yellow); box-shadow: 2px 2px 0 var(--shadow); }
.inventory-notice { margin: 0 0 0.45rem; padding: 0.32rem 0.45rem; border: 1px dashed var(--teal); background: rgba(33, 143, 160, 0.1); font-size: 0.72rem; font-weight: 800; }
.inventory-notice.full { border-color: var(--coral); background: rgba(233, 102, 79, 0.16); }
.inventory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.35rem; }
.inventory-cell { min-width: 0; min-height: 4.15rem; padding: 0.6rem; color: var(--ink); background: transparent var(--ui-slot) center / 141.84% 127.27% no-repeat; border: 0; text-align: left; overflow-wrap: anywhere; }
.inventory-item-icon { width: 2.875rem; height: 2.875rem; max-width: 100%; object-fit: contain; }
.exhibit-item-icon { width: 2.125rem; height: 2.125rem; flex: 0 0 auto; object-fit: contain; }
.inventory-item { cursor: pointer; font: inherit; }
.inventory-item:hover { filter: brightness(1.04) saturate(1.08); }
.inventory-item.selected { outline: 2px solid var(--yellow); outline-offset: -2px; background-image: var(--ui-slot-selected); background-size: 119.77% 123.24%; box-shadow: none; }
.inventory-cell.empty { opacity: 0.6; }
.inventory-cell strong { display: block; font-size: 0.74rem; }
.inventory-cell small { display: block; margin-top: 0.15rem; font-size: 0.68rem; }
.inventory-art { display: block; line-height: 0; }
.inventory-cell small { display: flex; flex-wrap: wrap; column-gap: 3px; }
.inventory-cell small > span { white-space: nowrap; }
.inventory-cell em { display: inline-block; margin-top: 0.18rem; padding: 0.08rem 0.22rem; color: var(--ink); background: var(--leaf); border: 1px solid var(--ink); font-size: 0.62rem; font-style: normal; font-weight: 900; }
.inventory-empty,
.museum-empty { display: grid; gap: 0.2rem; margin: 0.45rem 0; padding: 0.55rem; border: 1px dashed var(--ink); background: rgba(233, 102, 79, 0.12); }
.inventory-empty small,
.museum-empty small { font-size: 0.72rem; }
.selection-card { display: grid; gap: 0.18rem; margin-top: 0.48rem; padding: 0.5rem; background: #fff9e7; border: 2px solid var(--teal); }
.selection-card.muted { border-style: dashed; border-color: rgba(16, 61, 76, 0.62); background: rgba(16, 61, 76, 0.06); }
.selection-card.complete { border-color: var(--leaf); background: rgba(121, 184, 74, 0.22); }
.selection-card span,
.selection-card small { font-size: 0.7rem; line-height: 1.3; }

.museum-panel {
  position: absolute;
  right: 2.8%;
  top: 15%;
  display: flex;
  flex-direction: column;
  width: 35.5%;
  height: 68%;
  overflow: auto;
  padding: clamp(18px, 3.8vw, 54px) clamp(18px, 3.5vw, 50px);
  background: transparent var(--ui-panel-readable) center / 105.34% 129.42% no-repeat;
  border: 0;
  box-shadow: none;
}

.museum-panel > * { flex-shrink: 0; }
.museum-panel h2 { align-self: flex-start; margin: 0 0 0.35rem; font-size: 1.35rem; }
.museum-progress { margin: 0.15rem 0; font-size: 0.9rem; font-weight: 800; }
.progress-bar { height: 0.65rem; margin: 0.35rem 0 0.55rem; background: rgba(16, 61, 76, 0.18); border: 1px solid var(--ink); }
.progress-bar i { display: block; height: 100%; background: var(--yellow); }
.museum-showcase { position: absolute; top: 18%; bottom: 25%; left: 3%; width: 58%; }
.museum-showcase > h2 { display: inline-block; margin: 0; color: var(--paper); text-shadow: 1px 2px 0 var(--ink), -1px -1px 0 var(--ink); font-size: 2rem; }
.museum-showcase > p { margin: 0.4rem 0 0; color: var(--paper); text-shadow: 0 1px 2px var(--ink); font-size: 0.9rem; font-weight: 800; }
.museum-slots { position: absolute; inset: 20% 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.3rem; margin: 0; }
.museum-slot { position: relative; display: block; min-width: 0; min-height: 0; padding: 0; background: none; border: 0; text-align: center; }
.museum-slot:is(button) { color: var(--ink); cursor: pointer; font: inherit; }
.museum-slot:is(button):hover .museum-artifact { transform: translateY(-3px); }
.museum-slot:is(button):focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.museum-pedestal-stack { position: absolute; bottom: 0; left: 0; width: 100%; aspect-ratio: 1; pointer-events: none; }
.museum-pedestal { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.museum-item-icon.museum-artifact { position: absolute; bottom: 68%; left: 12%; width: 76%; height: 76%; object-fit: contain; transition: transform 120ms ease; }
.museum-slot.missing .museum-artifact { filter: grayscale(1) contrast(0) brightness(2.2); opacity: 0.3; }
.museum-slot.available .museum-artifact { filter: saturate(0.5); opacity: 0.5; }
.museum-nameplate { position: absolute; left: 10%; right: 10%; bottom: 17%; display: grid; gap: 0.15rem; padding: 0.5rem 0.15rem; color: var(--ink); background: transparent var(--ui-plaque) center / 100% 100% no-repeat; }
.museum-slot strong { font-size: 0.86rem; line-height: 1.2; }
.museum-slot small { font-size: 0.7rem; line-height: 1.2; }
.museum-slot.missing .museum-nameplate { background-image: var(--ui-plaque-locked); }
.museum-list-title { margin: 0.1rem 0; font-size: 0.86rem; }
.museum-panel .exhibit-list { flex: 1 0 60px; min-height: 60px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; align-content: start; padding: 0.25rem; }
.exhibit-list { display: grid; gap: 0.35rem; margin: 0.3rem 0; }
.exhibit-choice { display: flex; align-items: center; justify-content: space-between; gap: 0.45rem; padding: 0.38rem 0.45rem; color: var(--ink); background: rgba(33, 143, 160, 0.09); border: 1px solid var(--ink); cursor: pointer; text-align: left; }
.exhibit-choice strong { font-size: 0.72rem; }
.exhibit-choice small { font-size: 0.65rem; }
.exhibit-choice.selected { outline: 3px solid var(--yellow); background: #fff9e7; box-shadow: 3px 3px 0 var(--shadow); }
.museum-help { margin: 0.5rem 0 0; font-size: 0.75rem; line-height: 1.4; }
.stage[data-screen="museum"] .action-dock { left: 3%; right: auto; max-width: 58%; justify-content: center; }

.commission-panel,
.settlement-panel,
.robot-panel,
.settings-panel {
  position: absolute;
  right: 2.8%;
  top: 15%;
  width: min(40%, 37rem);
  max-height: 68%;
  overflow: auto;
  padding: clamp(18px, 3.8vw, 54px) clamp(18px, 3.5vw, 50px);
  background: transparent var(--ui-panel-readable) center / 105.34% 129.42% no-repeat;
  border: 0;
  box-shadow: none;
}

.commission-panel h2,
.settlement-panel h2,
.robot-panel h2,
.settings-panel h2 { margin: 0 0 0.45rem; }
.commission-row,
.settlement-row,
.robot-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.45rem 0; border-top: 1px dashed rgba(16, 61, 76, 0.52); }
.settlement-row { align-items: flex-start; flex-wrap: wrap; }
.settlement-row b { max-width: 72%; text-align: right; overflow-wrap: anywhere; }
.settlement-panel { padding: clamp(22px, 3.8vw, 54px) clamp(20px, 4vw, 58px); }
.trip-durations { display: grid; gap: 0.2rem; }
.settlement-rewards h3 { margin: 0.45rem 0; font-size: 1rem; }
.settlement-rewards ul { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; margin: 0 0 0.5rem; padding: 0; list-style: none; }
.settlement-rewards li { display: flex; align-items: center; gap: 0.25rem; min-width: 0; padding: 0.3rem; background: rgba(255, 243, 211, 0.82); border: 1px solid rgba(16, 61, 76, 0.28); }
.settlement-rewards strong { font-size: 0.78rem; overflow-wrap: anywhere; }
.reward-item-icon { width: 2rem; height: 2rem; flex: 0 0 auto; object-fit: contain; }
.commission-row:first-of-type,
.settlement-row:first-of-type,
.robot-row:first-of-type { border-top: 0; }
.commission-row small,
.settlement-row small,
.robot-row small { display: block; margin-top: 0.12rem; opacity: 0.78; }
.commission-row > span,
.settlement-row > span,
.robot-row > span { min-width: 0; }
.robot-row > span:last-child { max-width: 52%; text-align: right; font-size: 0.9em; }
.robot-manage { width: 100%; color: var(--ink); background: transparent; cursor: pointer; text-align: left; font: inherit; }
.robot-manage.selected { margin: 2px 0; padding-inline: 0.35rem; outline: 3px solid var(--yellow); background: rgba(242, 182, 50, 0.16); }
.robot-panel { width: 44%; padding: clamp(18px, 3.8vw, 54px) clamp(18px, 3.5vw, 50px); background-image: var(--ui-panel-readable); }
.stage[data-screen="robots"] .action-dock { left: 3%; right: auto; max-width: 48%; justify-content: center; }
.robot-panel p { font-size: 0.86rem; line-height: 1.5; }
.robot-row.robot-manage { display: grid; gap: 0.35rem; padding: 0.55rem 0.45rem; }
.robot-row.robot-manage > span:last-child { max-width: none; text-align: left; }
.robot-showcase { position: absolute; top: 21%; bottom: 25%; left: 3%; width: 48%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.robot-portrait { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 0.6rem; border: 2px solid transparent; border-radius: 0.55rem; color: var(--ink); background: rgba(255, 243, 211, 0.65); font: inherit; cursor: pointer; }
.robot-portrait.selected { border-color: var(--yellow); box-shadow: inset 0 0 0 2px var(--ink), 3px 4px 0 var(--shadow); background: rgba(255, 243, 211, 0.9); }
.robot-portrait img { display: block; width: 100%; min-height: 0; flex: 1; object-fit: contain; }
.robot-portrait strong { margin-top: 0.3rem; font-size: 1.2rem; }
.robot-state { display: inline-block; min-width: 5em; margin-top: 0.3rem; padding: 0.2rem 0.5rem; border-radius: 0.2rem; background: var(--leaf); color: #103d4c; font-size: 0.85rem; font-weight: 800; }
.robot-state.state-collecting { background: var(--blue); color: #fff3d3; }
.robot-state.state-ready { background: var(--yellow); }

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-top: 1px dashed rgba(16, 61, 76, 0.52);
}

.settings-row:first-of-type { border-top: 0; }
.settings-row span { min-width: 0; }
.settings-row > span:first-child { flex: 1 1 auto; }
.settings-row > span:last-child:not(:first-child) { flex: 0 0 auto; white-space: nowrap; }
.settings-row small { display: block; margin-top: 0.15rem; font-size: 0.7rem; line-height: 1.35; }
.settings-toggle {
  min-width: 5rem;
  min-height: 2.15rem;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: #d7d2bd;
  box-shadow: 2px 2px 0 var(--shadow);
  cursor: pointer;
  font-weight: 900;
}
.settings-toggle.enabled { background: var(--leaf); }
.save-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.settings-panel { padding-inline: clamp(18px, 3.5vw, 50px); }

.nav-hitbar {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0.5%;
  height: 11.5%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
}

.nav-hit {
  min-width: 0;
  min-height: 2.4rem;
  padding: 0.48rem 0.65rem;
  border: 0;
  color: #fff3d3;
  background: transparent var(--ui-nav-tab) center / 118.19% 128% no-repeat;
  box-shadow: none;
  font-size: clamp(0.68rem, 1.25vw, 0.98rem);
  text-shadow: 0 2px 0 rgba(6, 38, 48, 0.85);
}

.nav-hit:hover { filter: brightness(1.12); transform: translateY(-1px); }
.nav-hit.active { outline: 3px solid rgba(242, 182, 50, 0.86); outline-offset: -0.4rem; filter: saturate(1.25) brightness(1.08); }

.gear-button {
  position: absolute;
  top: 2.6%;
  right: 2.7%;
  width: 2.55rem;
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--shadow);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.status-rail {
  position: relative;
  height: 48px;
  margin-top: 6px;
  isolation: isolate;
  pointer-events: none;
}

.toast {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  visibility: hidden;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--paper);
  opacity: 0;
  transition: opacity 120ms ease;
  text-align: center;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.toast.show { visibility: visible; opacity: 1; }
.boot-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 4px;
  color: #d8f5ef;
  text-align: center;
  font-size: 12px;
  line-height: 1.3;
}
.status-rail:has(.toast.show) .boot-note { visibility: hidden; }
.boot-note[data-save-warning="true"] { color: var(--yellow); font-weight: 800; }
.settings-save-warning { color: #8b2d1c; font-weight: 800; overflow-wrap: anywhere; }
@media (orientation: portrait) {
  .boot-note::before { content: "建议横屏游玩，界面和机关会更清晰"; font-size: 13px; color: var(--paper); }
}

/* These components retain their full source PNGs. Only transparent outer
   space is clipped in the capacity/clock viewports; art is never stretched. */
.symbol-icon, .action-symbol, .nav-symbol, .gear-symbol,
.robot-attribute-icon, .route-risk-icon, .kept-seal-icon,
.commission-symbol, .milestone-badge { flex: 0 0 auto; object-fit: contain; vertical-align: middle; }
.action-button, .nav-hit { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; }
.action-button > span { min-width: 0; }
.action-symbol { width: 1.9rem; height: 1.9rem; }
.action-button[data-action="sell-selected"] .action-symbol { width: 2.5rem; height: 2.5rem; }
.action-button[data-action="combine"] .action-symbol,
.commission-symbol[data-symbol="commissionCombine"] { background: var(--paper); border-radius: 0.2rem; }
.nav-symbol { width: 2rem; height: 2rem; }
.nav-symbol[data-symbol="robots"] { width: 2.4rem; height: 2.4rem; }
.gear-button { display: grid; place-items: center; padding: 0.2rem; }
.gear-symbol { width: 100%; height: 100%; }
.milestone-heading { display: flex !important; align-items: center; gap: 0.35rem; }
.milestone-badge { width: 2.8rem; height: 2.8rem; }
.robot-attributes { display: grid; gap: 0.2rem; }
.robot-attribute { display: inline-flex; align-items: center; gap: 0.3rem; }
.robot-attribute-icon { width: 1.5rem; height: 1.5rem; }
.route-choices .route-choice { display: flex; align-items: center; gap: 0.4rem; padding-inline: 10%; }
.route-risk-icon { width: 2.1rem; height: 2.1rem; }
.route-choice-copy { min-width: 0; }
.kept-mark, .selection-kept { display: inline-flex !important; align-items: center; gap: 0.2rem; }
.kept-seal-icon { width: 1.35rem; height: 1.35rem; }
.capacity-meter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.4rem; min-width: 0; }
.capacity-art { position: relative; display: block; flex: 0 1 auto; width: 12rem; max-width: 100%; aspect-ratio: 2172 / 430; overflow: hidden; }
.capacity-rack-art { position: absolute; left: 0; top: -32.55814%; width: 100%; height: auto; }
.capacity-segments { position: absolute; left: 13.81215%; top: 38.13953%; width: 72.28361%; height: 26.04651%; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: max(1px, 0.08rem); }
.capacity-segment { display: block; min-width: 0; background: #fff3d3; border: 1px solid var(--ink); }
.capacity-segment.filled { background: var(--yellow); box-shadow: inset 0 -1px 0 #bb7925; }
.capacity-meter.full .capacity-segment.filled { background: var(--coral); }
.capacity-label { font-size: 0.75rem; line-height: 1.2; font-weight: 900; white-space: nowrap; }
.runtime-chip { overflow: visible; max-width: 54%; }
.top-capacity { flex-wrap: nowrap; }
.top-capacity .capacity-art { width: 11rem; }
.save-indicator { font-size: 0.7rem; }
.inventory-capacity { margin: 0 0 0.3rem; }
.explore-capacity { margin-top: 0.25rem; }
.explore-capacity .capacity-art { width: 10rem; }
.capacity-warning { color: #8a3b2d; margin: 0 !important; font-weight: 800; }
.duration-component { display: inline-flex; align-items: center; gap: 0.2rem; min-width: 0; max-width: 100%; }
.duration-label { flex: 0 0 auto; font-size: 0.72rem; line-height: 1.2; font-weight: 800; }
.duration-plate { position: relative; display: block; width: 11.875rem; max-width: 100%; aspect-ratio: 2172 / 600; overflow: hidden; }
.duration-plate-art { position: absolute; left: 0; top: -10.83333%; width: 100%; height: auto; }
.duration-value { position: absolute; left: 39.13444%; top: 33.33333%; width: 50.64457%; height: 30%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.route-duration-list { display: grid; gap: 0.15rem; }
.route-duration-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem; font-size: 0.75rem; font-weight: 800; }
.route-duration-row > span { flex: 0 1 auto; max-width: 100%; }
.route-duration-row > .duration-component { flex-wrap: wrap; }
.expedition-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.fleet-duration .duration-plate { width: 10rem; }
.fleet-duration .duration-value { font-size: 0.7rem; }
.fleet-duration .duration-label { font-size: 0.65rem; }
.growth-panel.runtime-card { width: 51%; max-width: 51%; padding: 2rem 2.2rem; background-image: var(--ui-panel-readable); }
.growth-heading { margin: 0.5rem 0 0.25rem !important; font-size: 0.88rem !important; font-weight: 800; }
.growth-track { position: relative; width: 100%; aspect-ratio: 2172 / 724; margin-bottom: 1.5rem; }
.growth-base-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.growth-node { position: absolute; display: grid; place-items: center; width: 10%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 2px solid transparent; border-radius: 50%; }
.growth-node-0 { left: 19.33702%; top: 56.62983%; }
.growth-node-1 { left: 49.95396%; top: 49.03315%; width: 11%; }
.growth-node-2 { left: 81.07735%; top: 41.85083%; width: 11%; }
.growth-node.current { border-color: var(--coral); background: rgba(242, 182, 50, 0.18); box-shadow: 0 0 0 2px var(--paper); }
.growth-item-icon { display: block; width: 72%; height: 72%; object-fit: contain; }
.growth-label { position: absolute; top: 99%; width: 30%; transform: translateX(-50%); text-align: center; font-size: 0.75rem !important; line-height: 1.2; font-weight: 900; white-space: nowrap; }
.growth-label-0 { left: 19.33702%; }
.growth-label-1 { left: 49.95396%; }
.growth-label-2 { left: 81.07735%; }
.growth-label.current { color: #963d2b; }
.combine-feedback .growth-heading { color: #963d2b; }
.cargo-stage { position: absolute; top: 18%; bottom: 25%; left: 3%; width: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cargo-stage > h2 { margin: 0; color: var(--paper); font-size: 1.8rem; text-shadow: 1px 2px 0 var(--ink), -1px -1px 0 var(--ink); }
.cargo-art, .cargo-vacancy { position: relative; width: min(100%, 24rem); aspect-ratio: 1; min-height: 0; }
.cargo-vacancy { display: grid; place-items: center; }
.cargo-crate-art { display: block; width: 100%; height: 100%; object-fit: contain; }
.cargo-rig-canvas { display: block; width: 100%; height: 100%; pointer-events: none !important; }
.stage[data-cargo-episode] .cargo-art { visibility: hidden; }
.stage[data-cargo-episode] .cargo-vacancy .cargo-empty { visibility: hidden; }
.cargo-contents { position: absolute; left: 29%; right: 26%; top: 33%; display: flex; justify-content: center; align-items: flex-end; gap: 0.3rem; }
.cargo-contents > span { display: inline-flex; align-items: flex-end; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); padding: 0.1rem; }
.cargo-item-icon { width: 2.6rem; height: 2.6rem; object-fit: contain; }
.cargo-contents b { font-size: 0.7rem; }
.cargo-feedback, .cargo-empty { margin: 0; padding: 0.4rem 0.65rem; max-width: 95%; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); font-size: 0.9rem; font-weight: 800; text-align: center; }
.cargo-empty { margin: 2rem 0; }
.cargo-stage.received .cargo-feedback { border-color: var(--leaf); background: #e2efbe; }
.stage:is([data-screen="settlement"], [data-screen="settings"], [data-screen="commissions"]) .action-dock { left: 3%; right: auto; max-width: 50%; justify-content: center; }
.commission-symbol { width: 2.75rem; height: 2.75rem; }
.commission-copy { flex: 1; }
.commission-row > span:last-child:not(.commission-copy) { flex: 0 0 auto; white-space: nowrap; }
.commission-day { margin: 0 0 0.35rem; font-size: 0.8rem; font-weight: 900; }
.commission-stamps { display: inline-flex; gap: 0.2rem; margin-top: 0.2rem; vertical-align: middle; }
.commission-stamp { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border: 1px dashed var(--teal); background: rgba(255, 243, 211, 0.72); }
.commission-stamp.filled { border-style: solid; background: var(--paper); }
.commission-stamp-art { width: 100%; height: 100%; object-fit: contain; }
.commission-feedback-anchor { position: absolute; left: 3%; top: 16%; z-index: 7; width: min(31%, 19rem); pointer-events: none !important; }
.commission-feedback-anchor * { pointer-events: none !important; }
.commission-panel > p { font-size: 0.82rem; line-height: 1.4; }
.sound-switch { display: inline-flex; align-items: center; gap: 0.35rem; }
.sound-track { position: relative; display: inline-block; width: 8rem; aspect-ratio: 2160 / 728; }
.sound-track-art { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.sound-lever { position: absolute; left: 31.94444%; top: 51.51099%; width: 12%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); box-shadow: 1px 2px 0 rgba(16, 61, 76, 0.65); }
.sound-lever > i { position: absolute; left: 37%; bottom: 40%; width: 26%; height: 140%; background: var(--coral); border: 1px solid var(--ink); transform: rotate(-28deg); transform-origin: 50% 90%; }
.sound-switch.enabled .sound-lever { left: 68.05556%; background: var(--yellow); }
.sound-switch.enabled .sound-lever > i { transform: rotate(28deg); background: var(--leaf); }
.sound-switch-label { font-size: 0.8rem; line-height: 1.2; white-space: nowrap; font-weight: 900; }
.settings-toggle, .settings-toggle.enabled { min-width: 0; padding: 0.1rem 0.3rem; color: var(--ink); background: var(--paper); border-color: transparent; box-shadow: none; }
.settings-toggle:focus-visible, .action-button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.dock-sound-switch .sound-track { width: 5rem; }
.dock-sound-switch .sound-switch-label { display: none; }
.stage[data-screen="backpack"] .inventory-panel { height: 55%; max-height: 55%; }

@media (max-width: 900px), (max-height: 560px) {
  :root { font-size: min(0.95694vw, 1.70032vh); }

  html,
  body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
  }

  .app-shell { overflow: visible; }

  .stage {
    width: 100%;
    min-width: 0;
    transform: none;
  }

}

/* Compact landscape uses measured text sizes, not the desktop rem shrink. */
@media (orientation: landscape) and (min-width: 640px) and (max-height: 560px),
       (orientation: landscape) and (min-width: 640px) and (max-width: 1100px) {
  :root { font-size: 11px; }
  .top-runtime { right: calc(3% + 42px); gap: 5px; }
  .resource-strip { gap: 4px; flex-wrap: nowrap; }
  .resource-chip { padding: 4px 3px; gap: 2px; min-height: 28px; }
  .resource-item-icon { width: 18px; height: 18px; }
  .resource-chip small, .resource-chip b { font-size: 11px; }
  .resource-item-icon { width: 18px; height: 18px; }
  .runtime-chip { padding: 3px 6px; max-width: 48%; }
  .save-indicator { display: none; }
  .gear-button { width: 34px; min-width: 34px; height: 34px; min-height: 34px; aspect-ratio: auto; }

  .action-button { min-width: 72px; min-height: 36px; padding: 7px 12px; gap: 4px; font-size: 12px; line-height: 1.15; white-space: nowrap; }
  .action-symbol, .nav-symbol { width: 23px; height: 23px; }
  .action-button[data-action="sell-selected"] .action-symbol { width: 28px; height: 28px; }
  .nav-symbol[data-symbol="robots"] { width: 27px; height: 27px; }
  .action-dock { gap: 6px; }
  .nav-hit { gap: 5px; font-size: 13px; padding: 6px 8px; min-height: 36px; }
  [data-risk] { min-width: 64px; min-height: 40px; }

  .route-panel { width: 40%; height: 72%; padding: 14px 14px; }
  .route-panel h2, .runtime-card h2, .commission-panel h2, .settings-panel h2, .settlement-panel h2, .museum-panel h2, .robot-panel h2 { font-size: 16px; line-height: 1.2; margin-bottom: 5px; }
  .route-panel p, .runtime-card p, .robot-panel p, .commission-panel > p { font-size: 12px; line-height: 1.4; }
  .route-choices { gap: 6px; margin: 5px 0; }
  .route-choices .route-choice {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-content: center;
    min-height: 56px;
    padding: 7px 4px;
    gap: 3px;
    background-image: var(--ui-panel-readable);
    background-size: 140% 174%;
    border: 1px solid var(--ink);
  }
  .route-choice-copy { display: contents; }
  .route-choice-copy strong { grid-column: 2; }
  .route-choice-copy small { grid-column: 1 / -1; }
  .route-risk-icon { width: 22px; height: 22px; flex: 0 0 auto; }
  .route-choice-copy strong, .route-choice-copy small { white-space: normal; overflow-wrap: anywhere; }
  .route-choice strong { font-size: 12px; }
  .route-choice small { margin-top: 2px; font-size: 10px; line-height: 1.2; }
  .robot-picks { grid-template-columns: minmax(0, 1fr); gap: 5px; margin: 4px 0; }
  .robot-pick { min-height: 40px; padding: 3px; gap: 3px; }
  .robot-pick input { width: 15px; height: 15px; }
  .robot-pick span { font-size: 11px; }
  .robot-pick small { font-size: 10px; }
  .route-robot-icon { width: 22px; height: 28px; }
  .robot-pick span { white-space: normal; overflow-wrap: anywhere; }
  .route-estimates { min-height: 0; }
  .route-estimates small { font-size: 11px; line-height: 1.35; }
  .route-map-label { height: 58px; padding: 11px 12% 15px; }
  .route-map-label strong { font-size: 12px; }
  .route-map-label small { font-size: 11px; }
  .exploration-caption { height: 61px; padding: 11px 12% 17px; gap: 2px; }
  .exploration-caption strong { font-size: 13px; }
  .exploration-caption small { font-size: 11px; }
  .manual-explore-intro h2 { font-size: 17px; }
  .manual-explore-intro p { font-size: 11px; }
  .stage[data-screen="explore"] .exploration-islands { bottom: 33%; }
  .runtime-card.explore-panel { padding: 22px 24px; }
  .expedition-fleet { gap: 5px; margin: 5px 0; }
  .expedition-row { min-height: 58px; gap: 5px; padding: 4px; }
  .expedition-actor { width: 42px; height: 48px; }
  .expedition-row strong { font-size: 12px; }
  .expedition-row small, .expedition-status { font-size: 11px; }
  .expedition-identity .expedition-status { margin: 0; }
  .explore-summary { display: none; }
  .explore-note { display: none; }

  .museum-panel { padding: 14px 16px; }
  .museum-panel .exhibit-list { flex: 0 0 60px; min-height: 60px; max-height: 100px; }
  .museum-progress { font-size: 12px; }
  .museum-list-title { font-size: 12px; }
  .museum-panel .exhibit-choice {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    min-height: 44px;
    padding: 4px;
    gap: 2px 6px;
  }
  .museum-panel .exhibit-choice .exhibit-item-icon { grid-row: 1 / 3; }
  .museum-panel .exhibit-choice strong, .museum-panel .exhibit-choice small { min-width: 0; overflow-wrap: anywhere; }
  .museum-panel .exhibit-choice strong, .museum-panel .selection-card strong { font-size: 12px; }
  .museum-panel .exhibit-choice small, .museum-panel .selection-card span, .museum-panel .selection-card small, .museum-help, .museum-panel .museum-empty small { font-size: 11px; line-height: 1.3; }
  .museum-panel .exhibit-item-icon { width: 28px; height: 28px; }
  .museum-panel .selection-card { margin-top: 5px; padding: 5px; gap: 3px; }
  .museum-panel .museum-empty strong { font-size: 12px; }
  .museum-help { margin-top: 5px; }
  .museum-showcase { bottom: 30%; }
  .museum-showcase > h2 { font-size: 19px; }
  .museum-showcase > p { font-size: 12px; }
  .museum-slot strong { font-size: 11px; }
  .museum-slot small { font-size: 10px; }

  .robot-panel { height: 68%; max-height: 68%; padding: 22px 24px; }
  .robot-row.robot-manage { gap: 4px; padding: 5px; }
  .robot-row.robot-manage > .robot-attributes { font-size: 11px; }
  .robot-row b { font-size: 13px; }
  .robot-row small { font-size: 11px; line-height: 1.35; }
  .robot-attribute-icon { width: 21px; height: 21px; }
  .robot-showcase { top: 17%; bottom: 39%; }
  .robot-portrait { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; height: 100%; min-height: 0; }
  .robot-portrait img { height: 100%; }
  .robot-portrait strong { font-size: 13px; }
  .robot-state { font-size: 12px; }

  .capacity-art, .top-capacity .capacity-art { width: 128px; }
  .top-capacity .capacity-art { width: 100px; }
  .capacity-label { font-size: 11px; }
  .explore-capacity .capacity-art { width: 126px; }
  .inventory-capacity .capacity-art { width: 140px; }
  .capacity-segments { gap: 1px; }
  .route-duration-row { font-size: 11px; }
  .duration-plate, .route-duration .duration-plate, .fleet-duration .duration-plate { width: 126px; }
  .duration-label, .duration-value, .fleet-duration .duration-label, .fleet-duration .duration-value { font-size: 11px; }
  .fleet-duration { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
  .fleet-duration .duration-plate { flex: 0 0 auto; }
  .route-duration-list { gap: 3px; }

  .inventory-panel { padding: 8px 12px; }
  .inventory-panel .inventory-capacity, .inventory-panel .inventory-notice { display: none; }
  .inventory-panel h2 { margin-bottom: 1px; }
  .inventory-filters { gap: 4px; margin-bottom: 3px; }
  .inventory-notice { margin-bottom: 3px; padding: 3px 5px; }
  .inventory-filter { font-size: 12px; min-height: 32px; padding: 5px 10px; }
  .inventory-cell { min-height: 76px; padding: 4px; }
  .inventory-item-icon { width: 32px; height: 32px; }
  .inventory-cell strong { font-size: 11px; line-height: 1.25; }
  .inventory-cell small, .inventory-cell em { font-size: 10px; }
  .inventory-cell small { line-height: 1.2; }
  .inventory-notice, .selection-card span, .selection-card small, .inventory-empty small { font-size: 11px; }
  .kept-seal-icon { width: 18px; height: 18px; }
  .milestone-badge { width: 32px; height: 32px; }
  .growth-panel.runtime-card { padding: 20px 22px; }
  .growth-heading { font-size: 12px !important; }
  .growth-track { margin-bottom: 19px; }
  .growth-label { font-size: 11px !important; }

  .commission-panel, .settlement-panel { padding: 28px 30px; }
  .commission-symbol { width: 32px; height: 32px; }
  .commission-row b, .settlement-row { font-size: 12px; }
  .commission-row small, .commission-row > span:last-child { font-size: 11px; }
  .commission-stamp { width: 19px; height: 19px; }
  .commission-feedback-anchor { width: 31%; }
  .settings-panel { top: 18%; width: 44%; height: 60%; padding: 22px 24px; }
  .settings-row { gap: 8px; }
  .settings-row b { font-size: 13px; }
  .settings-row small, .settings-row > span:last-child { font-size: 11px; }
  .settings-toggle { flex: 0 0 auto; min-height: 34px; }
  .settings-toggle .sound-switch { flex-direction: column; gap: 1px; }
  .settings-toggle .sound-track { width: 76px; flex-shrink: 0; }
  .sound-track { width: 100px; }
  .sound-switch-label { font-size: 11px; }
  .dock-sound-switch .sound-track { width: 64px; }
  .settlement-rewards h3 { font-size: 13px; }
  .settlement-rewards strong { font-size: 11px; line-height: 1.3; }
  .reward-item-icon { width: 26px; height: 26px; }
  .cargo-stage > h2 { font-size: 18px; }
  .cargo-art, .cargo-vacancy { width: 164px; }
  .cargo-item-icon { width: 25px; height: 25px; }
  .cargo-contents { gap: 3px; }
  .cargo-contents b { font-size: 10px; }
  .cargo-feedback, .cargo-empty { padding: 5px 8px; font-size: 12px; line-height: 1.35; }
  .stage[data-screen="backpack"] .inventory-panel { height: calc(74% - 93px); max-height: calc(74% - 93px); }
}
