/* D226/D228: the site overlay. Full screen over the cockpit; HUD pieces float at the edges so the site
   fills the middle. Phone (≤600px or touch): compact header, party pips under it, twin sticks at the
   bottom corners (move left, aim+fire right) and a slim button column above the aim stick. */
.site-overlay { --sf-panel: #e6edf3; --sf-dim: #8b98a5; --sf-amber: #ffd27a; --sf-cyan: #67e8f9; --sf-alarm: #ff4a4a; --sf-rule: rgba(230,237,243,0.3); --sf-mono: ui-monospace, SFMono-Regular, Menlo, monospace; position: fixed; inset: 0; z-index: 60; background: #05060a; color: var(--sf-panel); font-family: var(--sf-mono); touch-action: none; user-select: none; }
.site-overlay[hidden], .site-return[hidden], .site-overlay [hidden] { display: none !important; }
.site-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.site-head { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: linear-gradient(rgba(4,6,10,0.85), rgba(4,6,10,0)); pointer-events: none; }
.site-head button { pointer-events: auto; }
.site-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.site-title b { font-size: 15px; letter-spacing: 0.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-title em { font-style: normal; font-size: 12px; letter-spacing: 0.08em; color: #8b98a5; }
.site-stats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.site-stats span { font-size: 13px; letter-spacing: 0.06em; padding: 3px 8px; border: 1px solid rgba(255,210,122,0.35); background: rgba(255,210,122,0.07); color: #ffd27a; }
.site-hull.low { color: #ff6a5a; border-color: rgba(255,90,90,0.6); background: rgba(255,90,90,0.12); animation: site-pulse 0.8s infinite alternate; }
.site-x { min-width: 64px; min-height: 36px; border: 1px solid #67e8f9; background: rgba(103,232,249,0.1); color: #67e8f9; font: inherit; font-size: 13px; letter-spacing: 0.1em; }
.site-boss { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); width: min(460px, 70vw); text-align: center; pointer-events: none; }
.site-boss b { display: block; font-size: 13px; letter-spacing: 0.12em; color: #ffb4a8; margin-bottom: 4px; text-shadow: 0 1px 2px #000; }
.site-boss-bar { display: block; height: 7px; background: rgba(0,0,0,0.6); border: 1px solid rgba(255,90,90,0.6); }
.site-boss-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff4a4a, #ffb45a); transition: width 0.2s; }
.site-boss.vent .site-boss-bar { border-color: #ffe08a; box-shadow: 0 0 10px rgba(255,224,138,0.5); }
.site-bark { position: absolute; top: 96px; left: 50%; transform: translateX(-50%); max-width: 80vw; padding: 6px 12px; font-size: 14px; font-style: italic; color: #ffe0d8; background: rgba(40,8,8,0.7); border-left: 2px solid #ff4a4a; pointer-events: none; }
.site-party { position: absolute; left: 12px; bottom: 76px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.site-card { width: 168px; padding: 5px 8px; background: rgba(6,10,16,0.72); border: 1px solid rgba(103,232,249,0.25); }
.site-card b { display: block; font-size: 13px; letter-spacing: 0.06em; }
.site-card em { display: block; font-style: normal; font-size: 12px; color: #8b98a5; margin: 2px 0 4px; }
.site-card-bar { display: block; height: 4px; background: rgba(255,255,255,0.08); }
.site-card-bar i { display: block; height: 100%; background: #74f0b0; }
.site-card.pinned { border-color: rgba(255,180,84,0.7); }
.site-card.down { border-color: rgba(255,90,90,0.8); }
.site-card.down em { color: #ff6a5a; }
.site-hint { position: absolute; left: 50%; bottom: 72px; transform: translateX(-50%); max-width: calc(100% - 24px); font-size: 12px; letter-spacing: 0.06em; color: var(--sf-dim); pointer-events: none; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-hurt { position: absolute; inset: 0; pointer-events: none; opacity: 0; box-shadow: inset 0 0 0 1px rgba(255,74,74,0.55); transition: opacity 90ms linear; }
.site-hurt.flash { opacity: 1; }
.site-hurt.low { opacity: 1; box-shadow: inset 0 0 0 1px rgba(255,74,74,0.55), inset 0 0 0 8px rgba(255,74,74,0.08); }
.site-tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(4,6,10,0), rgba(4,6,10,0.85)); }
.site-btn { min-width: 108px; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid rgba(230,237,243,0.3); background: rgba(10,14,20,0.8); color: #e6edf3; font: inherit; font-size: 14px; letter-spacing: 0.08em; }
.site-btn kbd { font-size: 12px; color: #8b98a5; border: 1px solid rgba(139,152,165,0.4); padding: 0 4px; }
.site-btn:disabled { opacity: 0.4; }
.site-btn.armed { border-color: #ffd27a; color: #ffd27a; background: rgba(255,210,122,0.12); }
.site-btn-recall { border-color: rgba(255,90,90,0.5); color: #ffb4a8; }
.site-btn-recall.confirm { background: rgba(255,90,90,0.2); }
.site-return { position: fixed; z-index: 55; left: 50%; top: 64px; transform: translateX(-50%); min-height: 44px; padding: 0 16px; border: 1px solid #67e8f9; background: rgba(6,20,28,0.9); color: #67e8f9; font: 14px ui-monospace, monospace; letter-spacing: 0.1em; }
body.siteOpen { overflow: hidden; }
.site-stick { display: none; position: absolute; bottom: calc(20px + env(safe-area-inset-bottom)); width: 116px; height: 116px; border-radius: 50%; border: 1px solid rgba(230,237,243,0.22); background: radial-gradient(rgba(10,14,20,0.15), rgba(10,14,20,0.45)); touch-action: none; }
.site-stick i { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 1px solid rgba(103,232,249,0.6); background: rgba(103,232,249,0.14); }
.site-stick-move { left: 16px; }
.site-stick-aim { right: 16px; }
.site-stick-aim i { border-color: rgba(255,180,84,0.7); background: rgba(255,180,84,0.14); }
.site-stick::after { position: absolute; left: 0; right: 0; bottom: -2px; text-align: center; font-size: 11px; letter-spacing: 0.12em; color: rgba(139,152,165,0.8); }
.site-stick-move::after { content: 'MOVE'; }
.site-stick-aim::after { content: 'AIM · FIRE'; }
@keyframes site-pulse { from { opacity: 1; } to { opacity: 0.55; } }
@media (max-width: 600px), (pointer: coarse) {
  .site-stick { display: block; }
  .site-hint { display: none; }
  .site-tools { left: auto; right: 12px; bottom: calc(150px + env(safe-area-inset-bottom)); flex-direction: column; width: 84px; gap: 6px; padding: 0; background: none; }
  .site-tools .site-btn { min-width: 0; min-height: 44px; font-size: 12px; letter-spacing: 0.06em; }
  .site-tools .site-btn kbd { display: none; }
  .site-party { left: 8px; top: 58px; bottom: auto; flex-direction: row; gap: 4px; }
  .site-boss { top: 86px; }
}
@media (max-width: 600px) {
  .site-head { padding: 6px 8px; gap: 6px; flex-wrap: wrap; }
  .site-title b { font-size: 13px; }
  .site-stats { order: 3; width: 100%; justify-content: flex-start; gap: 4px; }
  .site-stats span { font-size: 12px; padding: 2px 5px; }
  .site-x { min-width: 52px; min-height: 44px; }
  .site-boss { width: 80vw; }
  .site-bark { top: 104px; font-size: 13px; }
  .site-card { width: auto; min-width: 0; padding: 3px 5px; }
  .site-card b { font-size: 12px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-card em { display: none; }
}
