:root { color-scheme: dark; font-family: system-ui, "Microsoft YaHei", sans-serif; color: #e9eff5; background: #101823; --surface: #1b2937; --muted: #aebfce; --border: #405266; --accent: #326bba; }
* { box-sizing: border-box; } body { margin: 0; } [hidden] { display: none !important; }
button, input, select { font: inherit; min-height: 46px; border-radius: 5px; }
button { border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; padding: 0 14px; touch-action: manipulation; }
button:disabled { opacity: .55; cursor: wait; } button:active { filter: brightness(.85); }
.secondary { color: #e9eff5; background: var(--surface); border-color: var(--border); }
button:focus-visible, input:focus-visible, select:focus-visible, canvas:focus-visible, .move-stick:focus-visible { outline: 2px solid #76b5ff; outline-offset: 3px; }
#entry { min-height: 100svh; display: grid; place-items: center; padding: 24px; } #room-form { width: 100%; max-width: 300px; }
h1 { margin: 0 0 32px; font-size: 23px; font-weight: 600; } label { display: block; margin-bottom: 10px; font-size: 14px; }
input, select { border: 1px solid var(--border); background: var(--surface); color: #e9eff5; padding: 0 12px; font-size: 16px; }
#room { width: 100%; } #join, #open-models { width: 100%; margin-top: 12px; }
#form-error { min-height: 20px; margin: 12px 0 0; font-size: 13px; color: #ffbda3; }
#view { height: 100svh; display: flex; flex-direction: column; }
header { min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-bottom: 1px solid var(--border); }
#active-room { font-variant-numeric: tabular-nums; font-size: 14px; } #connection { flex: 1; color: var(--muted); font-size: 12px; }
#scene-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; } #scene { width: 100%; height: 100%; } canvas { display: block; touch-action: none; }
#empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); font-size: 14px; pointer-events: none; }
#stale { position: absolute; top: 8px; left: 12px; color: #ffce93; font-size: 12px; pointer-events: none; }
.camera-controls { position: absolute; top: 62px; right: 12px; display: flex; flex-direction: column; gap: 8px; } .camera-controls button { font-size: 13px; min-width: 46px; padding-inline: 10px; }
.ui-toggle { position: absolute; top: 8px; right: max(12px, env(safe-area-inset-right)); z-index: 40; min-height: 44px; padding-inline: 10px; font-size: 12px; background: #1b2937d9; }
#view.ui-hidden > header, #view.ui-hidden > footer, .ui-hidden .camera-controls, .ui-hidden .flight-controls, .ui-hidden .legend, .ui-hidden .gesture-hint, .ui-hidden .display-settings, .ui-hidden .target-list { display: none; }
.legend { position: absolute; bottom: 12px; left: 12px; display: flex; flex-wrap: wrap; gap: 4px 12px; max-width: calc(100% - 214px); font-size: 11px; pointer-events: none; }
.gesture-hint { position: absolute; bottom: 208px; left: 12px; margin: 0; font-size: 11px; color: var(--muted); pointer-events: none; }
.flight-controls { position: absolute; bottom: 58px; left: max(12px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 10px; z-index: 25; }
.move-stick { width: 128px; height: 128px; position: relative; border: 1px solid #6d879b; border-radius: 50%; background: #152434d9; touch-action: none; user-select: none; cursor: grab; }
.move-stick[data-active="true"] { border-color: #76b5ff; cursor: grabbing; }
.stick-direction { position: absolute; font-size: 11px; color: var(--muted); pointer-events: none; }
.stick-forward { top: 6px; left: 50%; transform: translateX(-50%); }.stick-back { bottom: 6px; left: 50%; transform: translateX(-50%); }
.stick-left { left: 8px; top: 50%; transform: translateY(-50%); }.stick-right { right: 8px; top: 50%; transform: translateY(-50%); }
.stick-knob { position: absolute; width: 46px; height: 46px; left: calc(50% - 23px); top: calc(50% - 23px); background: #4a789f; border: 1px solid #97bad5; border-radius: 50%; pointer-events: none; }
.height-controls { display: flex; flex-direction: column; gap: 8px; }.height-controls button { min-width: 72px; touch-action: none; user-select: none; font-size: 12px; padding-inline: 8px; background: #1b2937eb; }
#follow[aria-pressed="true"] { background: #286d59; border-color: #76c7a9; }
.self { color: #e9fff8; }.team { color: #48cde4; }.enemy { color: #ff946d; }
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.entity-label { position: absolute; top: 0; left: 0; padding: 0; font-size: var(--radar-label-size, 12px); line-height: 1.2; text-align: center; text-shadow: 0 1px 3px #000, 1px 0 2px #000, -1px 0 2px #000; }
.entity-line { display: block; white-space: nowrap; }
.target-list { position: absolute; right: 112px; top: 62px; width: min(188px, 38vw); max-height: calc(100% - 124px); overflow-y: auto; z-index: 24; scrollbar-width: thin; }
.target-heading { margin: 8px 0 2px; color: var(--muted); font-size: 11px; text-shadow: 0 1px 3px #000; }
.target-item { display: block; width: 100%; min-height: 34px; padding: 4px 2px; background: transparent; border: 0; border-radius: 0; text-align: left; font-size: 12px; text-shadow: 0 1px 3px #000; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.target-item[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 4px; font-weight: 700; }
.font-size-control { justify-content: space-between; } #label-size { width: 100%; height: 24px; min-height: 24px; margin: 0 0 6px; padding: 0; }
.labels.is-stale { opacity: .45; }
.display-settings { position: absolute; right: 12px; bottom: 12px; z-index: 30; width: 188px; max-height: calc(100% - 24px); display: flex; flex-direction: column; background: #131e2af2; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
#display-toggle { min-height: 44px; flex-shrink: 0; border: 0; background: transparent; text-align: left; }
.display-options { min-height: 0; max-height: 420px; overflow-y: auto; padding: 0 10px 8px; border-top: 1px solid var(--border); }
.display-options label { display: flex; align-items: center; gap: 9px; min-height: 36px; margin: 0; cursor: pointer; font-size: 13px; }
.display-options input { min-height: 0; width: 16px; height: 16px; margin: 0; padding: 0; accent-color: #76b5ff; }
footer { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 12px max(8px, env(safe-area-inset-bottom)); background: #131e2a; border-top: 1px solid var(--border); }
footer select { flex: 1; min-width: 110px; width: 0; font-size: 13px; } footer button { font-size: 13px; padding-inline: 12px; }
#map-state { flex-basis: 100%; margin: 0; font-size: 12px; min-height: 18px; color: var(--muted); }
dialog { width: min(92vw, 520px); max-height: 85svh; padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: #131e2a; } dialog::backdrop { background: #0009; }
.dialog-heading { display: flex; align-items: center; gap: 16px; justify-content: space-between; } h2 { font-size: 20px; margin: 0; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.map-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding-block: 12px; border-top: 1px solid var(--border); }
.map-row span { font-size: 14px; }.map-row small { display: block; font-size: 12px; color: var(--muted); padding-top: 4px; }.map-row button { font-size: 12px; padding-inline: 10px; }
.file-label { margin-top: 16px; } #import-file { max-width: 100%; width: 100%; padding: 8px; font-size: 12px; }
#model-progress { font-size: 13px; color: #bdd5ff; min-height: 20px; }
#import-progress { width: 100%; height: 8px; margin-top: 12px; accent-color: #76b5ff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-height: 430px) { .camera-controls { flex-direction: row; top: 12px; left: 12px; right: auto; } footer { padding-block: 4px; } header { min-height: 50px; } }
@media (max-height: 540px) { .flight-controls { bottom: 18px; }.gesture-hint, .legend { display: none; }.move-stick { width: 108px; height: 108px; } }
@media (max-height: 430px) { .target-list { top: 70px; right: 12px; width: min(188px, 32vw); max-height: calc(100% - 80px); } }
@media (max-width: 600px) and (min-height: 431px) { .camera-controls { left: 12px; right: 12px; top: 60px; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }.camera-controls button { padding-inline: 8px; }.target-list { right: 12px; top: 120px; max-height: calc(100% - 188px); } }
