.starship {
  --ink: #edf5ee;
  --muted: #a8bfca;
  --line: #334a5a;
  --bg: #101c2c;
  --green: #9ce1c3;
  --pale: #203547;
  background: #0b1521;
  color-scheme: dark;
}
.starship .app { box-shadow: 0 0 72px #02070d80; }
.starship header { border-color: #314855; }
.starship .brand { color: #edf5ee; font-size: 12px; letter-spacing: .17em; }
.ship-brand-mark { width: 34px; height: 34px; padding: 5px; border-radius: 10px; background: #20384a; fill: none; stroke: #a9ddcb; stroke-width: 1.7; stroke-linejoin: round; }
.starship .datebar .progress { background: #2e4a59; }
.starship .entry-overview {
  --supply-rail: clamp(56px, 19%, 79px);
  --fuel-rail: clamp(56px, 19%, 79px);
  grid-template-columns: var(--supply-rail) minmax(0, 1fr) var(--fuel-rail);
  min-height: 322px;
  align-items: center;
  background: radial-gradient(ellipse at 50% 42%, #263f50 0%, #172b3d 58%, #132335 100%);
  border: 1px solid #2d4758;
  border-radius: 22px;
}
.starship .entry-rail { align-self: center; padding: 0 5px; min-height: 0; }
.starship .fuel-rail { align-self: start; margin-top: 12px; max-height: calc(100% - 24px); }
.starship .individual-entry {
  background: #1d3648;
  color: #d9eae4;
  border-color: #426171;
}
.starship .individual-entry .entry-time { color: #ccdedf; }
.starship .individual-entry.is-done { color: #e9fff0; background: #2e594e; border-color: #8bc2a9; }
.starship .individual-entry.is-done i { color: #c4f6d9; }
.starship .individual-entry:hover, .starship .individual-entry:active { background: #335466; }
.starship .add-fuel { background: #345758; border-color: #638e85; }
.ship-stage {
  grid-area: 1 / 2;
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 246px;
  aspect-ratio: 240 / 420;
  margin: auto;
}
.ship-stage img { display: block; width: 100%; height: 100%; pointer-events: none; }
.ship-control {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: #eff9f1;
  background: transparent;
  touch-action: manipulation;
}
.ship-control svg {
  box-sizing: content-box;
  width: 20px;
  height: 20px;
  padding: 4px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  border-radius: 8px;
  background: #1b3848;
  border: 1px solid #7fa8ae;
  box-shadow: 0 1px 3px #10202a77;
}
.ship-control:hover svg, .ship-control:focus-visible svg { background: #33615f; border-color: #d7eee4; }
.ship-control.is-done svg { border-color: #b5f2cb; background: #3b705c; }
.ship-control small {
  position: absolute;
  z-index: 1;
  bottom: -4px;
  left: 50%;
  translate: -50% 0;
  padding: 1px 4px;
  border-radius: 5px;
  background: #142b3b;
  color: #e3f8ec;
  white-space: nowrap;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.ship-control small:empty { display: none; }
.ship-intake { --x: 50%; --y: 24%; }
.ship-pressure { --x: 27%; --y: 43%; }
.ship-fuel { --x: 73%; --y: 43%; }
.ship-hull { --x: 50%; --y: 55%; }
.ship-load { --x: 50%; --y: 70%; }
.ship-service { --x: 21%; --y: 83%; }
.ship-inspect { --x: 79%; --y: 83%; }
.ship-status { --x: 50%; --y: 87%; }
.ship-prep { --x: 50%; --y: 37%; }
.starship .map-bottom a { color: #c1d5de; }
.starship .ship-details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 650; }
.starship .ship-details dl { margin: 0; }
.starship .ship-details dl div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-top: 1px solid var(--line); padding: 6px 0; font-size: 11px; }
.starship .ship-details dd { margin: 0; color: var(--muted); }
.starship .empty, .starship .entry, .starship .routine-list, .starship .care, .starship .dose, .starship .readings > button {
  color: #e4f2ed;
  background: #192c3e;
  border-color: #344e60;
}
.starship .dose.done, .starship .care.done { background: #284a45; }
.starship .primary, .starship .done .check { color: #122c27; }
.starship .reading-icon, .starship .care .care-icon { color: #a7dcce; }
.starship dialog { background: #192d40; color: #e9f4ee; border-color: #456073; }
.starship #actionSheet .dialog-head { background: #192d40; }
.starship input, .starship textarea, .starship select { background: #112435; color: #eef6ef; border-color: #52707d; }
.starship .quick-add button { border-color: #456073; }
@media (max-width: 359px) {
  .ship-control svg { width: 18px; height: 18px; padding: 3px; }
  .ship-prep { --y: 36%; }
}
.starship [hidden] { display: none !important; }
.owner-key, .text-button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 10px; border: 1px solid #456073; border-radius: 10px; background: #1d3648; color: #ebf6f1; font-size: 12px; font-weight: 650; }
.owner-key svg { width: 17px; height: 17px; stroke: #a9ddcb; stroke-width: 1.6; stroke-linecap: round; fill: none; }
.owner-key:hover, .text-button:hover { background: #335466; }
.starship .entry-overview { margin-top: 12px; }
.starship #accessStatus:empty { display: none; }
.starship #accessStatus { color: #ffd1b9; }
.starship #profile { padding: 9px; }
.starship #stationContent .dose { width: 100%; }
.starship #stationContent .section-note { margin: 3px 0 12px; }
.starship #privateLog { margin-top: 16px; }

.fleet-tabs { display: grid; grid-template-columns: .68fr .96fr 1.15fr 1.15fr; gap: 3px; padding: 5px 12px; border-bottom: 1px solid var(--line); }
.fleet-tabs button, .deck-controls button { min-height: 44px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: clamp(11px, 3.3vw, 14px); font-weight: 650; padding: 0 4px; white-space: nowrap; }
.fleet-tabs [aria-selected="true"], .deck-controls [aria-pressed="true"] { color: #effaf4; border-color: #5b888c; background: #244554; }
.starship .brand { letter-spacing: .12em; }
.starship .body-overview { height: calc(100svh - 166px); }
.deck-chart { margin: 8px 0; border: 1px solid #345363; border-radius: 16px; background: linear-gradient(#263e4c70 1px, transparent 1px), linear-gradient(90deg, #263e4c70 1px, transparent 1px), radial-gradient(ellipse at center, #233d4c, #142436); background-size: 16px 16px, 16px 16px, auto; display: grid; place-items: center; }
.deck-chart > svg { width: 100%; height: clamp(242px, 50svh, 470px); overflow: visible; }
.deck-controls { display: flex; gap: 4px; justify-content: space-between; padding-top: 7px; }
.deck-controls button { flex: 1; }
.deck-filters { padding-top: 0; }
.deck-outline { stroke: #819daa; fill: none; stroke-width: 1.4; stroke-linejoin: round; }
.deck-zone { cursor: pointer; outline: none; }
.zone-area { fill: #2a4c5a; stroke: #92b5ba; stroke-width: 1.2; stroke-linejoin: round; }
.deck-zone.systems .zone-area { fill: #365252; }
.deck-zone:is(:hover, :focus-visible, .selected) .zone-area { stroke: #d4ffe4; stroke-width: 2; fill: #477069; }
.zone-symbol { fill: none; stroke: #e4f5ed; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.deck-readout { display: grid; gap: 5px; padding: 12px 10px; min-height: 45px; font-size: 14px; }
.deck-readout span { color: var(--muted); }
.deck-readout a { display: inline-flex; align-items: center; min-height: 44px; color: var(--green); }
.transport-chart { margin-top: 12px; }
.transport-shell { stroke: #b2d8d1; fill: #2d5160; stroke-width: 2; stroke-linejoin: round; }
.shield-open { color: #d9fae8; border-color: #80beaa; background: #24483f; }
