/* Shared visual language inspired by the supplied ARK Starmap reference. */
:root {
  --hud-cyan: #40d8ff;
  --hud-gold: #e9c282;
  --hud-health: #73dfb5;
  --whisper: #cd639c;
  --broadcast: #edc574;
  --hud-line: #19465d;
  --hud-panel: #07111beF;
  --hud-type: "Bahnschrift", "Segoe UI", Arial, sans-serif;
  --hud-mono: "Consolas", "DejaVu Sans Mono", monospace;
}

body.hud-ui {
  --bg: #030810;
  --panel: #081622;
  --line: #17384c;
  --text: #d0e7f1;
  --muted: #87a6ba;
  --teal: var(--hud-cyan);
  --blue: #83b6ff;
  --amber: var(--hud-gold);
  --health: var(--hud-health);
  --font: var(--hud-type);
  isolation: isolate;
  background-color: var(--bg);
  background-image: linear-gradient(180deg, #02070d00, #030810cf 720px), url("/static/hud-sky.svg");
  background-size: 100% 100%, 1600px 1000px;
  background-position: center top;
  background-attachment: fixed;
  font-family: var(--hud-type);
}

.hud-ui::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .17;
  background-image: repeating-linear-gradient(0deg, #2bbfea16 0 1px, transparent 1px 4px);
}

.hud-ui :focus-visible { outline: 2px solid var(--hud-cyan); outline-offset: 4px; }
.hud-ui ::selection { color: #fff; background: #166184; }
.hud-ui input, .hud-ui textarea { caret-color: var(--hud-cyan); }
.hud-ui .auth-shell, .hud-ui .app-shell { position: relative; z-index: 1; }
.hud-ui .button, .hud-ui .login button {
  position: relative;
  border: 1px solid #27617a;
  border-radius: 0;
  min-height: 44px;
  color: #bdeeff;
  background: linear-gradient(120deg, #0b2438eb, #06111fef);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .065em;
  transition: background .15s, color .15s, border-color .15s;
}
.hud-ui .button::after, .hud-ui .login button::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 2px;
  width: 20px;
  height: 1px;
  background: var(--hud-cyan);
  opacity: .6;
  pointer-events: none;
}
.hud-ui .button:hover, .hud-ui .login button:hover { background: #103d55; border-color: var(--hud-cyan); color: #fff; }
.hud-ui .primary, .hud-ui .login .primary { color: #dbf9ff; background: linear-gradient(110deg, #11506d, #082a43); border-color: #3bcff4; box-shadow: inset 0 0 18px #1b9be71a; }
.hud-ui .primary:hover, .hud-ui .login .primary:hover { background: linear-gradient(110deg, #176a87, #0c3c59); }
.hud-ui .danger-button { color: #ffc0c6; border-color: #9a4958; background: #341d2b; }
.hud-ui .icon-button { border-radius: 0; color: #7fb2c8; }
.hud-ui .icon-button:hover { background: #113549; color: var(--hud-cyan); }
.hud-ui .text-button { color: #59d7f3; font-weight: 500; font-size: .875rem; }
.hud-ui .text-button:hover { color: #d2f9ff; }
.hud-ui label { color: #a8cddf; font-size: .875rem; }
.hud-ui input, .hud-ui textarea, .hud-ui select {
  border-color: #24526b;
  border-radius: 0;
  background-color: #040e19;
  box-shadow: inset 3px 0 #0d2c40, inset 0 -1px #07131d;
}
.hud-ui input:focus, .hud-ui textarea:focus, .hud-ui select:focus { border-color: var(--hud-cyan); box-shadow: inset 3px 0 #36bad4, 0 0 0 1px #37b7dd22; }
.hud-ui input::placeholder, .hud-ui textarea::placeholder { color: #738fa3; }
.hud-ui .eyebrow, .hud-ui .panel-kicker, .hud-ui .workspace-label, .hud-ui .small-label {
  font-family: var(--hud-mono);
  font-size: .75rem;
  letter-spacing: .15em;
  color: #72afc8;
}
.hud-ui h1, .hud-ui h2, .hud-ui h3 { font-family: var(--hud-type); }
.hud-ui .brand { gap: 13px; letter-spacing: .24em; color: #82e3ff; font-family: var(--hud-mono); font-weight: 500; }
.hud-ui .brand-mark { width: 50px; height: 58px; background: url("/static/mark.svg") center/contain no-repeat; clip-path: none; flex-shrink: 0; }
.hud-ui .brand-mark svg { visibility: hidden; }
.hud-ui .brand-light { color: #65b1cf; letter-spacing: .25em; font-size: .75rem; line-height: 1.4; }

/* Entry screen: an orbital plate on the left, a framed access console on the right. */
.hud-ui .auth-intro {
  background: linear-gradient(90deg, #04101b30, #030b14bb), url("/static/hud-sky.svg") 36% 40%/cover;
  border-right: 1px solid #16475b;
}
.hud-ui .auth-intro::after {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid #2b91b838;
  background: linear-gradient(90deg, #45dbff, #45dbff00) left top/160px 1px no-repeat;
  clip-path: polygon(0 0, calc(100% - 38px) 0, 100% 38px, 100% 100%, 38px 100%, 0 calc(100% - 38px));
  pointer-events: none;
}
.hud-ui .intro-copy { margin-top: 72px; }
.hud-ui .intro-copy h1 { font-size: clamp(2.6rem, 4.1vw, 4.25rem); font-weight: 400; letter-spacing: -.025em; text-shadow: 0 0 30px #2995bd22; }
.hud-ui .intro-copy h1 span { color: #59dfff; }
.hud-ui .intro-copy p { color: #a4c3d3; }
.hud-ui .intro-features { gap: 14px; }
.hud-ui .intro-features span { border-color: #3897b9; color: #a3cdde; }
.hud-ui .auth-orbit { color: #56cce9; background: radial-gradient(ellipse at center, #15658329, transparent 64%); }
.hud-ui .orbit-ring { border-color: #3298b05c; }
.hud-ui .ring-2 { border-style: dashed; }
.hud-ui .orbit-ship { filter: drop-shadow(0 0 12px #29bcf080); }
.hud-ui .orbit-dot { background: #83e8bb; box-shadow: 0 0 0 4px #50d28b18, 0 0 13px #26c78755; }
.hud-ui .orbit-caption { color: #5994ae; font-family: var(--hud-mono); font-size: .75rem; letter-spacing: .15em; }
.hud-ui .auth-foot { color: #6b9bb2; font-size: .75rem; }
.hud-ui .auth-panel { background: linear-gradient(155deg, #02070df2, #071522f0); }
.hud-ui .auth-form-wrap {
  position: relative;
  max-width: 430px;
  padding: 30px 28px 26px;
  border: 1px solid #214f67;
  background: linear-gradient(135deg, #081d2cdb, #030c15f2);
  box-shadow: inset 0 0 50px #163e5712, 0 18px 70px #0005;
}
.hud-ui .auth-form-wrap::before, .hud-ui .login::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 90px;
  height: 3px;
  background: var(--hud-cyan);
  box-shadow: 0 0 10px #20c9ff88;
  pointer-events: none;
}
.hud-ui .auth-form-wrap::after, .hud-ui .login::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 48px;
  height: 12px;
  border-right: 2px solid #39c7e5;
  border-bottom: 2px solid #39c7e5;
  pointer-events: none;
}
.hud-ui .auth-form-wrap h2 { font-size: 1.8rem; letter-spacing: -.02em; font-weight: 400; }
.hud-ui .tabs { gap: 8px; border-color: #21506a; margin-top: 26px; }
.hud-ui .tab { flex: 1; border: 1px solid #1a3e53; background: #071a2a; padding: 11px 8px; font-family: var(--hud-mono); font-size: .875rem; font-weight: 400; }
.hud-ui .tab.active { color: var(--hud-gold); border-color: #41c4df; border-bottom: 2px solid #4ad9fa; background: linear-gradient(135deg, #17334b, #061521); }
.hud-ui .field-help, .hud-ui .auth-note { font-size: .75rem; color: #83a6bb; }
.hud-ui .auth-divider { font-family: var(--hud-mono); color: #6898b2; font-size: .75rem; }
.hud-ui .auth-divider::before, .hud-ui .auth-divider::after { background: #234e65; }
.hud-ui .auth-form-wrap>.text-button { display: block; text-align: center; padding-top: 20px; }

/* Command console. Decorative layers never intercept pointer or drag events. */
.hud-ui .sidebar {
  background: linear-gradient(90deg, #07121deF, #030b14fa);
  border-right-color: #1f526a;
  box-shadow: 5px 0 30px #0004;
}
.hud-ui .sidebar .brand { margin: 0 7px 32px; font-size: .875rem; }
.hud-ui .sidebar .brand-light { font-size: .6875rem; }
.hud-ui .nav-item { border-radius: 0; border-color: #122d3f; background: #06121b78; color: #83b8d0; font-size: .875rem; }
.hud-ui .nav-item:hover { color: #c5f5ff; border-color: #2c7e9c; background: #0b2c40; }
.hud-ui .nav-item.active { color: var(--hud-gold); background: linear-gradient(90deg, #0f344a, #061521); border-color: #28667e; box-shadow: inset 2px 0 #42d8ff; }
.hud-ui .nav-tag { border-radius: 0; color: #85d9ff; border-color: #245b72; font-family: var(--hud-mono); font-size: .625rem; }
.hud-ui .group-symbol { border-radius: 0; border-color: #2b617a; color: #90dff3; background: #0b263a; font-family: var(--hud-mono); }
.hud-ui .uplink-card { border-radius: 0; border-color: #24526a; background: linear-gradient(135deg, #0b2437, #040e19); }
.hud-ui .uplink-card .small-label { color: #75cce2; font-size: .75rem; }
.hud-ui .uplink-card p, .hud-ui .uplink-card button { font-size: .8125rem; }
.hud-ui .account { border-top-color: #1c4e64; }
.hud-ui .avatar { border-radius: 0; border: 1px solid #28576f; background: #10263c; color: #b3e3f0; }
.hud-ui .account>div>span { color: #6e9bb3; font-size: .75rem; }
.hud-ui .topbar {
  position: relative;
  min-height: 78px;
  background: linear-gradient(115deg, #04121deF, #0b2337eF 65%, #04111bf5), url("/static/hud-sky.svg") center 20%/cover;
  border-bottom: 1px solid #38c9e5;
  box-shadow: 0 2px 12px #19b2e126;
}
.hud-ui .topbar::after {
  content: "";
  position: absolute;
  right: 25px;
  bottom: -4px;
  width: min(44%, 440px);
  height: 7px;
  clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
  background: linear-gradient(90deg, #145584, #58dfff 78%, #126887);
  box-shadow: 0 0 12px #29c8f8;
  pointer-events: none;
}
.hud-ui .breadcrumb { font-family: var(--hud-mono); font-size: .75rem; letter-spacing: .07em; color: #689db6; }
.hud-ui .breadcrumb strong { color: #8adcf4; }
.hud-ui .connection-indicator { color: #8dc2cf; font-family: var(--hud-mono); font-size: .75rem; }
.hud-ui .status-dot { background: var(--hud-health); box-shadow: 0 0 6px #64dca55a; }
.hud-ui .utc-clock { border-color: #24526b; color: #74b8d2; font-size: .75rem; }
.hud-ui .demo-banner { color: #e6c489; background: #241e12ed; border-color: #68502c; }
.hud-ui .demo-banner strong { font-family: var(--hud-mono); font-size: .75rem; }
.hud-ui .page-heading { border-bottom: 1px solid #16394d; padding: 2px 0 24px; position: relative; }
.hud-ui .page-heading::after { content: ""; position: absolute; bottom: -1px; left: 0; height: 2px; width: 110px; background: #40cef3; pointer-events: none; }
.hud-ui .page-heading .eyebrow { font-size: .75rem; color: #63b5d0; }
.hud-ui .page-heading h1 { font-weight: 400; letter-spacing: .005em; color: #d4f5ff; }
.hud-ui .heading-actions { flex-wrap: wrap; justify-content: flex-end; }
.hud-ui .heading-dot { color: #46d7f9; }
.hud-ui .page-heading p { color: #85a9bc; }
.hud-ui .stat, .hud-ui .goals-panel, .hud-ui .crew-board, .hud-ui .roster-panel,
.hud-ui .detail-panel, .hud-ui .formation-panel, .hud-ui .empty-fleet {
  position: relative;
  border-radius: 0;
  border-color: #20516a;
  background: linear-gradient(125deg, #091c2beF, #040e19f5 80%);
  box-shadow: inset 0 1px #2b7b9833, 0 8px 25px #0002;
}
.hud-ui .stat::before, .hud-ui .goals-panel::before, .hud-ui .crew-board::before,
.hud-ui .roster-panel::before, .hud-ui .detail-panel::before, .hud-ui .formation-panel::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -1px;
  right: -1px;
  width: 29px;
  height: 14px;
  background: linear-gradient(45deg, transparent 43%, #3abada 44% 48%, #040d17 49%);
  border-top: 1px solid #3bbad9;
  border-right: 1px solid #3bbad9;
  pointer-events: none;
}
.hud-ui .stat::after, .hud-ui .crew-board::after, .hud-ui .goals-panel::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: -1px;
  width: 38px;
  height: 4px;
  background: repeating-linear-gradient(120deg, #41c1e3 0 3px, transparent 3px 7px);
  opacity: .7;
  pointer-events: none;
}
.hud-ui .stat-label { color: #83b8ce; font-family: var(--hud-mono); font-size: .75rem; }
.hud-ui .stat-label .icon { color: #4ca9c4; }
.hud-ui .stat-value { font-family: var(--hud-mono); font-weight: 400; letter-spacing: -.05em; }
.hud-ui .stat-foot { color: #7c9fb4; font-size: .75rem; }
.hud-ui .board-heading h2, .hud-ui .panel-heading h2 { color: #c6edfb; font-weight: 500; letter-spacing: .025em; }
.hud-ui .board-heading p, .hud-ui .panel-heading p { color: #85a9bd; font-size: .875rem; }
.hud-ui .board-subheading { border-bottom: 1px solid #163b50; padding-bottom: 12px; }
.hud-ui .board-subheading h3 { color: #81c8df; font-size: .875rem; font-weight: 500; }
.hud-ui .board-subheading>span { color: #7299b0; font-size: .75rem; }
.hud-ui .health-card { border-radius: 0; border-color: #245369; background: linear-gradient(135deg, #0c2434, #07121d); }
.hud-ui .health-alert { border-color: #886936; background: linear-gradient(135deg, #292719, #161a1b); }
.hud-ui .health-card-header strong { font-size: .875rem; color: #c4e8f5; }
.hud-ui .health-reading { color: #92b5c6; }
.hud-ui .health-reading strong { color: var(--hud-health); font-family: var(--hud-mono); }
.hud-ui .health-card .text-button { font-size: .875rem; }
.hud-ui .health-card-bottom { flex-wrap: wrap; }
.hud-ui .meter-track { border-radius: 0; background: #173147; }
.hud-ui .meter-fill { background: var(--hud-health); }
.hud-ui .meter-fill.shield { background: var(--blue); }
.hud-ui .meter-fill.warning { background: var(--amber); }
.hud-ui .meter-fill.danger { background: var(--red); }
.hud-ui .ship-card { border-radius: 0; border: 1px solid #2b6078; background: linear-gradient(130deg, #0b2639eF, #040d18f5); }
.hud-ui .ship-card>header { border-color: #225069; background: linear-gradient(100deg, #10355077, transparent 90%); }
.hud-ui .ship-card>header h3 { color: #c7ecf7; }
.hud-ui .ship-card>header span { color: #82a9c0; font-size: .8125rem; }
.hud-ui .ship-parent-label { color: #62c9e6; }
.hud-ui .ship-card>footer { border-color: #173b50; color: #7aa5bc; background: #03101a66; }
.hud-ui .ship-card>footer .text-button { font-size: .8125rem; }
.hud-ui .ship-children { border-color: #2c7c98; }
.hud-ui .crew-token { border-radius: 0; border-color: #2a586f; background: #06131fd9; }
.hud-ui .crew-token .avatar { border-radius: 0; background: #0b2c40; }
.hud-ui .crew-token small { color: #83b8cc; font-size: .75rem; }
.hud-ui .unassigned-zone, .hud-ui .ship-root-zone { border-radius: 0; border-color: #28556c; background: #061522b0; }
.hud-ui .drop-hint { color: #77a8c1; }
.hud-ui .ship-root-zone p, .hud-ui .board-footnote { font-size: .75rem; color: #83aabd; }
.hud-ui .drop-active { border-color: #65e6ff!important; background: #12394b!important; box-shadow: inset 0 0 22px #2da7d32d!important; }
.hud-ui .roster-tools { background: #081e2d; border-color: #1b4860; }
.hud-ui .segmented button { border-radius: 0; color: #75aac1; font-size: .8125rem; }
.hud-ui .segmented button.selected { border-color: #3b99b4; color: #f1d6a6; background: linear-gradient(135deg, #14384d, #081b2a); }
.hud-ui .search-box { border-bottom: 1px solid #28627c; }
.hud-ui .search-box input { box-shadow: none; font-size: .875rem; }
.hud-ui thead { background: #061725; }
.hud-ui th { color: #67bdd9; font-family: var(--hud-mono); font-size: .75rem; }
.hud-ui td { border-color: #15394d; font-size: .875rem; }
.hud-ui tbody tr:hover { background: #0b2c3e; }
.hud-ui tbody tr.selected { background: linear-gradient(90deg, #12384c, #091d2b); box-shadow: inset 2px 0 #49d8fa; }
.hud-ui .crew-identity .avatar { border-radius: 0; background: #0f2a40; color: #91c7de; }
.hud-ui .crew-identity .commander-avatar { color: var(--hud-gold); background: #2c291d; border-color: #6b5634; }
.hud-ui .crew-name, .hud-ui .meter-text { font-size: .875rem; }
.hud-ui .crew-ship { color: #7ba8bd; font-size: .8125rem; }
.hud-ui .status-chip { border-radius: 0; color: #94decb; background: #0c302e; border-color: #285d52; font-size: .75rem; }
.hud-ui .status-chip.stale { color: #edc58c; background: #302617; border-color: #65502e; }
.hud-ui .status-chip.offline { color: #8aa3b6; background: #101e2c; border-color: #2c465a; }
.hud-ui .status-chip.danger { color: #ffadb8; background: #321a29; border-color: #6d394c; }
.hud-ui .tiny-demo { color: var(--hud-gold); font-family: var(--hud-mono); font-size: .75rem; }
.hud-ui .location-cell, .hud-ui .location-note, .hud-ui .roster-footer { font-size: .75rem; }
.hud-ui .roster-footer { border-color: #20475b; color: #76a8bd; }
.hud-ui .detail-profile .avatar { color: #74d8ed; background: #0c2c3c; }
.hud-ui .detail-profile h2 { color: #bde9f7; font-weight: 500; }
.hud-ui .detail-ship { border-radius: 0; background: #0c2335; border-color: #2b5970; }
.hud-ui .detail-ship span { font-size: .75rem; }
.hud-ui .detail-vital { color: #7eb8ce; font-size: .75rem; }
.hud-ui .detail-vital strong { font-family: var(--hud-mono); font-size: 1.125rem; }
.hud-ui .detail-info>div, .hud-ui .detail-info small, .hud-ui .detail-timestamp { font-size: .75rem; }
.hud-ui .assignment label { font-size: .75rem; color: #73b3cc; }
.hud-ui .assignment input { font-size: .875rem; }
.hud-ui .member-actions .text-button { font-size: .8125rem; }
.hud-ui .goals-panel { border-color: #5b5136; }
.hud-ui .goals-panel::before { border-color: #9a7943; background: linear-gradient(45deg, transparent 43%, #bd9953 44% 48%, #040d17 49%); }
.hud-ui .goals-panel .panel-kicker { color: #c9a774; }
.hud-ui .goal-card { border-radius: 0; border-color: #504832; background: linear-gradient(130deg, #1d211fe8, #07131de8); }
.hud-ui .goal-card h3 { font-size: 1rem; font-weight: 500; }
.hud-ui .goal-meta, .hud-ui .goal-state { font-size: .75rem; color: #cdae78; }
.hud-ui .goal-description { color: #8eafbf; font-size: .875rem; }
.hud-ui .goal-actions .text-button { font-size: .8125rem; }
.hud-ui .goal-detail-list li, .hud-ui .goal-detail-list small { font-size: .8125rem; }
.hud-ui .goal-card[data-channel="whisper"] { border-color: #69394f; background: linear-gradient(130deg, #241424e8, #0d1422e8); }
.hud-ui .goal-card[data-channel="whisper"] .goal-card-header>.icon,
.hud-ui .goal-card[data-channel="whisper"] .goal-meta,
.hud-ui .goal-card[data-channel="whisper"] .goal-state,
.hud-ui .goal-detail-list [data-channel="whisper"] { color: var(--whisper); }
.hud-ui .goal-card[data-channel="broadcast"] .goal-card-header>.icon { color: var(--broadcast); }
.hud-ui .formation-leader { border-radius: 0; border-color: #367d90; background: #0d2b3e; }
.hud-ui .formation-leader small { color: #71b6cf; font-size: .75rem; }
.hud-ui .formation-branch, .hud-ui .formation-description p { font-size: .8125rem; }
.hud-ui .formation-note { font-size: .75rem; }
.hud-ui .page-footer { font-family: var(--hud-mono); color: #54819c; font-size: .75rem; }

/* Dialogs are part of the same console, including their keyboard focus states. */
.hud-ui dialog { border-radius: 0; border: 1px solid #3a829d; border-top: 2px solid #47d3f4; background: linear-gradient(140deg, #0b2538, #040e18); box-shadow: 0 0 0 5px #06121dcc, 0 20px 100px #000a; }
.hud-ui dialog::backdrop { background: #01050bd9; backdrop-filter: blur(4px); }
.hud-ui .modal-header { border-bottom: 1px solid #235268; padding-bottom: 14px; }
.hud-ui .modal-header h2 { color: #9de7fa; font-size: 1.25rem; font-weight: 400; letter-spacing: .02em; }
.hud-ui .modal-section { border-color: #1e4b61; }
.hud-ui .join-code { border-radius: 0; border-color: #4ca1b6; color: var(--hud-gold); background: #071a27; }
.hud-ui .discover-group { border-color: #1a465a; }
.hud-ui pre { border-radius: 0; border-color: #234d62; background: #040c14; color: #9bc4d7; }
.hud-ui .toast { border-radius: 0; background: #0c2c3b; border-color: #4cb3c8; color: #c8eef8; }

/* The mobile overlay retains its geometry and its single back control. */
.hud-mobile .login { position: relative; border: 1px solid #285c73; background: linear-gradient(145deg, #0a2435ed, #020b13f2); margin: max(32px, env(safe-area-inset-top, 0px)) auto 24px; padding: 32px 26px 24px; max-width: 410px; }
.hud-mobile .app-mark { border-radius: 0; }
.hud-mobile .login h1 { color: #d1f2ff; font-weight: 400; }
.hud-mobile .management-link { color: #76c6dc; }
.hud-mobile .app { position: relative; z-index: 1; }
.hud-mobile .app::after {
  content: "";
  position: fixed;
  z-index: 2;
  inset: calc(env(safe-area-inset-top, 0px) + 5px) calc(env(safe-area-inset-right, 0px) + 5px) calc(env(safe-area-inset-bottom, 0px) + 5px) calc(env(safe-area-inset-left, 0px) + 5px);
  background: url("/static/hud-frame.svg") center/100% 100% no-repeat;
  pointer-events: none;
  opacity: .65;
}
.hud-mobile .back { z-index: 3; color: #54d7f6; text-shadow: 0 0 8px #4ad6f866; }
.mobile-overlay { padding: 45px 14px 24px; max-width: 1100px; margin: auto; }
.fleet-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr)); gap: 12px; }
.ship-group { min-width: 0; border: 1px solid #20516a; background: linear-gradient(130deg, #0a2130e8, #040d18ed); padding: 8px; }
.ship-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; margin-left: calc(var(--depth)*8px); min-width: 0; }
.ship-row+.ship-row { border-top: 1px solid #174358; }
.ship { flex: 0 0 96px; min-width: 0; text-align: center; }
.instrument { display: block; width: 84px; height: 84px; margin: auto; }
.ship-name { color: #cceef7; font-size: .875rem; font-weight: 600; overflow-wrap: anywhere; line-height: 1.3; }
.ship-stats { display: flex; gap: 6px; justify-content: center; color: #83b6ff; font-size: .875rem; margin-top: 5px; white-space: nowrap; }
.ship-stats span+span { color: #b4c7dd; }
.ship-demo, .parent-name { color: var(--hud-gold); font: .75rem/1.3 var(--hud-mono); margin-top: 5px; overflow-wrap: anywhere; }
.parent-row { align-items: center; padding: 3px 0 10px; }
.parent-row .ship { display: flex; gap: 9px; text-align: left; align-items: center; flex: 1; }
.parent-row .instrument { width: 66px; height: 66px; margin: 0; }
.parent-row .ship-stats { justify-content: flex-start; }
.crew { display: flex; flex: 1; flex-wrap: wrap; gap: 10px 6px; align-items: flex-start; padding-top: 12px; min-width: 0; }
.person { flex: 0 0 68px; min-width: 0; text-align: center; color: var(--person-color); padding: 8px 3px; background: #071a2680; border: 1px solid #1c4053; }
.person.self { border-color: #418b9f; background: #102c398c; }
.person-symbol { display: block; height: 38px; width: 26px; margin: 0 auto; }
.person-health { font-size: 1rem; font-weight: 650; margin-top: 5px; }
.person-name { font-size: .875rem; color: #c9e4f0; overflow-wrap: anywhere; line-height: 1.2; margin-top: 4px; }
.person-status { font: .75rem/1.3 var(--hud-mono); margin-top: 6px; overflow-wrap: anywhere; }
.person.old .person-name { color: #879eb1; }
.free-members { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin-top: 14px; }
.free-members .person { flex: 1 1 130px; max-width: 220px; padding: 14px 10px; }
.reported-ship { color: #81c3da; font-size: .875rem; margin-top: 10px; overflow-wrap: anywhere; }
.reported-stats { display: flex; justify-content: center; gap: 9px; font-size: .875rem; color: #83b6ff; margin-top: 5px; }
.reported-stats span+span { color: #b4c7dd; }
.reported-location { color: #87a6ba; font-size: .75rem; margin-top: 7px; overflow-wrap: anywhere; }
.mobile-contracts { display: grid; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #244859; }
.mobile-goal { display: flex; align-items: flex-start; gap: 10px; padding: 13px 12px; border: 1px solid #625135; background: linear-gradient(115deg, #25231be8, #081723e8); min-width: 0; }
.mobile-goal[data-channel="whisper"] { border-color: #69394f; background: linear-gradient(115deg, #291626ed, #101625ed); }
.goal-symbol { flex: 0 0 28px; width: 28px; height: 30px; }
.mobile-goal>div { min-width: 0; }
.goal-caption { font: .75rem/1.5 var(--hud-mono); color: var(--broadcast); }
.goal-title { font-size: .875rem; font-weight: 600; color: #d0e7f1; line-height: 1.45; margin-top: 5px; overflow-wrap: anywhere; }
.mobile-goal[data-channel="whisper"] .goal-caption,
.mobile-goal[data-channel="whisper"] .goal-title { color: var(--whisper); }
.overlay-status { font: .8125rem/1.5 var(--hud-mono); color: var(--hud-gold); margin: 6px 0 14px; }

@media (max-width: 1250px) {
  .hud-ui .sidebar .brand { gap: 8px; font-size: .8125rem; letter-spacing: .15em; }
  .hud-ui .sidebar .brand-mark { width: 42px; height: 50px; }
  .hud-ui .sidebar .brand-light { font-size: .625rem; }
  .hud-ui .heading-actions .button { font-size: .8125rem; }
}
@media (max-width: 760px) {
  .hud-ui .auth-intro { padding: 24px; border-right: 0; border-bottom: 1px solid #21677f; }
  .hud-ui .auth-intro::after { inset: 9px; }
  .hud-ui .auth-intro .brand-mark { width: 42px; height: 50px; }
  .hud-ui .intro-copy { margin-top: 28px; }
  .hud-ui .intro-copy h1 { font-size: 2.6rem; }
  .hud-ui .auth-panel { padding: 28px 18px; }
  .hud-ui .auth-form-wrap { padding: 24px 20px; }
  .hud-ui .sidebar { padding: 13px 16px; box-shadow: none; }
  .hud-ui .sidebar .brand { margin: 0; font-size: .875rem; }
  .hud-ui .sidebar .brand-mark { width: 38px; height: 44px; }
  .hud-ui .topbar { min-height: 52px; padding: 0 16px; gap: 8px; }
  .hud-ui .topbar::after { right: 12px; width: 40%; height: 5px; }
  .hud-ui .breadcrumb { font-size: .75rem; letter-spacing: 0; }
  .hud-ui .breadcrumb>span, .hud-ui .breadcrumb>strong { display: none; }
  .hud-ui .connection-indicator { font-size: .75rem; letter-spacing: 0; }
  .hud-ui .main-content { padding: 25px 14px; }
  .hud-ui .page-heading { flex-direction: column; align-items: stretch; gap: 18px; padding-bottom: 20px; }
  .hud-ui .page-heading h1 { font-size: 1.65rem; }
  .hud-ui .heading-actions { flex-direction: row; justify-content: flex-start; gap: 8px; }
  .hud-ui .heading-actions .button { flex: 1 1 110px; padding: 9px 12px; font-size: .8125rem; }
  .hud-ui .heading-actions .icon { display: none; }
  .hud-ui .stat { padding: 16px 12px; }
  .hud-ui .stat-label { font-size: .75rem; letter-spacing: 0; }
  .hud-ui .stat-value { font-size: 1.75rem; }
  .hud-ui .stat-foot { font-size: .75rem; }
  .hud-ui .board-heading { flex-wrap: wrap; }
  .hud-ui .board-heading>.button { min-height: 40px; font-size: .8125rem; }
  .hud-ui .board-heading p { font-size: .8125rem; }
  .hud-ui .board-subheading>span { font-size: .75rem; }
  .hud-ui .health-card { padding: 12px 10px; }
  .hud-ui .panel-heading { flex-wrap: wrap; }
  .hud-ui .panel-heading>.button { font-size: .8125rem; }
  .hud-ui .detail-panel { grid-template-columns: minmax(0, 1fr); }
  .hud-ui .detail-panel>* { grid-column: 1; grid-row: auto; }
  .hud-ui .detail-vitals { margin-top: 14px; }
  .hud-ui .roster-tools { padding: 12px 10px; }
  .hud-ui .segmented { flex-wrap: wrap; }
  .hud-ui .formation { padding: 4px 0; gap: 14px; }
  .hud-ui .formation-branches { padding-left: 16px; }
  .hud-ui .formation-branch::before { width: 14px; left: -16px; }
  .hud-ui .formation-leader { padding: 10px; }
  .hud-ui .formation-leader::after { width: 15px; right: -15px; }
  .hud-ui .demo-banner { font-size: .75rem; }
  .hud-ui .demo-banner .text-button { font-size: .8125rem; }
  .hud-mobile .login { margin: max(20px, env(safe-area-inset-top, 0px)) 16px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hud-ui * { transition: none!important; animation: none!important; }
}

.hud-ui .last-known { filter: grayscale(.85); opacity: .6; }
.hud-mobile .flight-stats { color: var(--hud-text); font: 10px/1.5 monospace; margin-top: 4px; overflow-wrap: anywhere; }
.hud-ui .ship-card header small { display: block; margin-top: 4px; }
.hud-ui .goal-card[data-channel="whisper"] h3 { color: #cd639c; }

/* Compact annunciator panels: transparent when idle, subdued amber when active. */
.annunciator-lights { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:3px; max-width:180px; margin:3px auto; }
.annunciator-light { display:block; text-align:center; color:#71818d; border:1px solid #45556199; background:transparent; font:8px/15px monospace; letter-spacing:0; clip-path:polygon(3px 0,100% 0,100% calc(100% - 3px),calc(100% - 3px) 100%,0 100%,0 3px); }
.annunciator-light.on { color:#efbd85; border-color:#b27a42; background:#b772292e; box-shadow:inset 0 0 8px #dc87332b; filter:drop-shadow(0 0 2px #dc87333b); }
.annunciator-light.unknown { border-style:dashed; opacity:.65; }
.ship .annunciator-lights { max-width:110px; gap:2px; }
.ship .annunciator-light { font-size:7px; line-height:13px; }
.ship-name+.annunciator-lights { margin-top:0; }
.ship-readout .ship-stats { margin-top:0; }

/* Fleet board: consistent instruments and crew slots, including nested squadrons. */
.hud-dashboard .ship-board { grid-template-columns: repeat(auto-fill,minmax(min(100%,310px),1fr)); gap: 16px; overflow: visible; }
.hud-dashboard .ship-card { min-height: 0; height: auto; }
.hud-dashboard .ship-card>header { display: block; padding: 16px; }
.hud-dashboard .ship-identity { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.hud-dashboard .ship-identity>.ship-model-symbol { width: 58px; height: 58px; flex-shrink: 0; }
.hud-dashboard .ship-identity>div { flex: 1; min-width: 0; }
.hud-dashboard .ship-identity h3 { line-height: 1.35; }
.hud-dashboard .ship-model-label { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.hud-dashboard .ship-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 14px 0 10px; border: 1px solid #1c4154; }
.hud-dashboard .ship-metrics>div { padding: 8px 12px; border-bottom: 1px solid #163549; }
.hud-dashboard .ship-metrics>div:nth-child(odd) { border-right: 1px solid #163549; }
.hud-dashboard .ship-metrics>div:nth-last-child(-n+2) { border-bottom: 0; }
.hud-dashboard .ship-metrics dt { color: #80a9bd; font: .625rem/1.5 var(--hud-mono); letter-spacing: .1em; text-transform: uppercase; }
.hud-dashboard .ship-metrics dd { margin: 2px 0 0; color: #d4f0f7; font: 1.0625rem/1.4 var(--hud-mono); }
.hud-dashboard .ship-metrics dd small { display: inline; color: #80a9bd; font-size: .6875rem; }
.hud-dashboard .ship-instruments .annunciator-lights { margin: 0; max-width: none; }
.hud-dashboard .ship-awaiting { color: #80a9bd; font-size: .75rem; margin: 12px 0 0; }
.hud-dashboard .ship-crew { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,140px),1fr)); gap: 8px; padding: 12px 16px; min-height: 78px; }
.hud-dashboard .ship-crew .crew-token { width: 100%; min-width: 0; }
.hud-dashboard .ship-crew .crew-token>span:last-child { min-width: 0; overflow-wrap: anywhere; }
.hud-dashboard .ship-children { margin: 12px 0 0 8px; padding-left: 12px; gap: 12px; }
.hud-dashboard .ship-children .ship-card { min-width: 0; }
.hud-ui .legal-link { display: block; color: #80b7ca; font-size: .75rem; margin: 14px 0; text-decoration: underline; text-underline-offset: 3px; }
.hud-ui .legal-page { margin: 48px auto; width: min(760px,calc(100% - 40px)); padding: clamp(20px,5vw,44px); border: 1px solid #235268; background: #061522ed; overflow-wrap: anywhere; }
.hud-ui .legal-page h1 { font-size: clamp(1.5rem,5vw,2rem); line-height: 1.3; }
.hud-ui .legal-page h2 { color: #92d9ec; font-size: 1rem; margin: 24px 0 8px; }
.hud-ui .legal-page address { font-style: normal; line-height: 1.8; }
.hud-ui .legal-page dt { color: #86aabd; font-size: .75rem; }
.hud-ui .legal-page dd { margin: 0 0 12px; }
.hud-ui .legal-page dd a { text-decoration: underline; text-underline-offset: 3px; }
.annunciator-light.on { color: #fff; background: #522f18; }
.hud-mobile .mobile-goal { display: block; text-align: center; }
.hud-mobile .goal-caption { display: flex; justify-content: center; align-items: center; gap: 5px; }
.hud-mobile .goal-caption .goal-symbol { width: 1em; height: 1em; flex: 0 0 1em; }
.hud-mobile .mobile-goal .goal-title { margin-top: 3px; }

.hud-ui .text-button.remove-crew { color: #ef9eaa; }
.hud-ui .text-button.remove-crew:hover { color: #ffd5dc; }
.hud-ui .crew-actions { white-space: nowrap; text-align: right; }
.hud-ui .crew-actions .remove-crew { font-size: .75rem; }

.hud-ui dialog.group-finder { width: min(900px,calc(100% - 32px)); }
.hud-ui .public-groups { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)); gap: 14px; margin: 16px 0; }
.hud-ui .public-groups .discover-group { display: flex; flex-direction: column; min-width: 0; border: 1px solid #24546a; background: #071b29; padding: 18px; }
.hud-ui .discover-group h3 { color: #c7edf7; overflow-wrap: anywhere; }
.hud-ui .discover-group .group-description { white-space: pre-wrap; line-height: 1.5; margin: 10px 0 18px; }
.hud-ui .group-counts { display: flex; gap: 16px; flex-wrap: wrap; font: .8125rem/1.5 var(--hud-mono); margin-top: auto; color: #a0becf; }
.hud-ui .group-counts .active-members { color: #71dfcf; }
.hud-ui .discover-group .modal-actions { margin-top: 14px; }

/* Selected group's telemetry activity, directly below the brand. */
.hud-ui .sidebar .brand { margin-bottom: 6px; }
.hud-ui .sidebar-activity { display: flex; align-items: center; gap: 7px; margin: 0 7px 26px; padding-left: 63px; color: var(--red); font: .75rem/1.5 var(--hud-mono); white-space: nowrap; }
.hud-ui .sidebar-activity[data-active="true"] { color: var(--hud-health); }
.hud-ui .activity-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 5px currentColor; }
@media (max-width:1250px) { .hud-ui .sidebar-activity { padding-left: 50px; } }
@media (max-width:760px) {
  .hud-ui .sidebar-activity { grid-column: 1; grid-row: 2; margin: 0 0 8px; padding-left: 46px; }
  .hud-ui .sidebar .group-list { grid-row: 3; }
}

.hud-mobile .person-symbol { height: 25.3333px; width: 17.3333px; }
