/* Galaxy Invasion — builds on /style.css (light theme) */
.view.wide { max-width: 1120px; align-items: stretch; }
.hero-space { margin: -6px -6px 0; height: 110px; border-radius: 16px; overflow: hidden; background: #070b1f; }
.hero-space canvas { width: 100%; height: 100%; display: block; }

.hangar-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 4px 0 18px; }
.h-title { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.5px; }
.share { display: flex; gap: 8px; min-width: min(420px, 100%); }
.share input { flex: 1; font-size: 14px; padding: 12px 14px; color: #4a4670; background: #fff; }
.hangar-grid { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 16px; align-items: start; }
.panel { padding: 20px; }
.panel h2 { margin: 0 0 14px; font-size: 15px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); }
.pilots { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.pilot { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: #fff; box-shadow: 0 4px 14px -8px rgba(60,40,160,.3); border: 2px solid transparent; }
.pilot.filled { border-color: var(--c); }
.pilot canvas { width: 54px; height: 54px; flex: none; }
.pilot .pn { font-weight: 800; font-size: 17px; }
.pilot .ps { font-size: 12px; color: var(--muted); font-weight: 600; }
.pilot.empty { opacity: .6; border-style: dashed; border-color: #d6d2ec; }
.spect { color: var(--muted); font-size: 13px; min-height: 16px; margin: 0 0 12px; }
.wait-host { text-align: center; color: var(--muted); margin: 6px 0 0; }
.howto { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 9px; font-size: 14px; color: #4a4670; line-height: 1.4; }
.pu { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--c); color: #fff; font-style: normal; font-weight: 800; font-size: 12px; vertical-align: -4px; }
.board { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; counter-reset: b; }
.board li { counter-increment: b; display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 3px 10px -8px rgba(60,40,160,.35); }
.board li::before { content: counter(b); color: var(--muted); font-size: 12px; text-align: center; }
.board li small { display: block; color: var(--muted); font-weight: 600; font-size: 11px; }
.board li b { font-variant-numeric: tabular-nums; }
.board li.new { background: #fff4f6; box-shadow: 0 0 0 2px #ff6a8a; }
.board .empty { color: var(--muted); font-size: 14px; }
@media (max-width: 980px) { .hangar-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .hangar-grid { grid-template-columns: 1fr; } .h-title { font-size: 26px; } }

/* ---------- play ---------- */
.play { position: fixed; inset: 0; z-index: 20; background: #050816; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
#space { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: none; }
.ghud { position: absolute; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: start; padding: max(10px, env(safe-area-inset-top)) 12px 0; pointer-events: none; color: #fff; }
.pbox { justify-self: start; min-width: 0; padding: 8px 12px; border-radius: 14px; background: rgba(10, 14, 40, .55); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(6px); }
.pbox.right { justify-self: end; text-align: right; }
.pbox:empty { display: none; }
.pbox .pn { font-weight: 800; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.pbox.right .pn { justify-content: flex-end; }
.pbox .pn i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.pbox .sc { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.pbox .meta { font-size: 12px; opacity: .85; display: flex; gap: 8px; }
.pbox.right .meta { justify-content: flex-end; }
.pbox .wp { letter-spacing: 1px; color: var(--c); }
.pbox.out { opacity: .5; }
.lvl { text-align: center; padding: 6px 14px; border-radius: 14px; background: rgba(10, 14, 40, .55); border: 1px solid rgba(255,255,255,.1); }
.lvl small { display: block; font-size: 10px; letter-spacing: 2px; opacity: .7; font-weight: 700; }
.lvl b { font-size: 24px; font-weight: 900; }
.bossbar { position: absolute; top: calc(max(10px, env(safe-area-inset-top)) + 70px); left: 50%; transform: translateX(-50%); width: min(420px, 80vw); color: #fff; text-align: center; font-size: 11px; font-weight: 800; letter-spacing: 3px; pointer-events: none; }
.bossbar div { height: 10px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 4px; border: 1px solid rgba(255,255,255,.2); }
.bossbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #f43f5e, #fb923c, #facc15); transition: width .2s; box-shadow: 0 0 12px #f43f5e; }
.gbanner { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%) scale(.9); opacity: 0; color: #fff; text-align: center; pointer-events: none; transition: opacity .35s, transform .35s; white-space: nowrap; }
.gbanner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.gbanner b { display: block; font-size: clamp(34px, 8vw, 64px); font-weight: 900; letter-spacing: 2px; text-shadow: 0 0 30px rgba(125, 211, 252, .8); }
.gbanner span { display: block; font-size: clamp(14px, 3vw, 20px); font-weight: 700; letter-spacing: 4px; opacity: .85; text-transform: uppercase; }
.gbanner.warn b { color: #fecaca; text-shadow: 0 0 30px #f43f5e; animation: blink .5s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.gicon { position: absolute; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,.15); background: rgba(10, 14, 40, .55); font-size: 18px; color: #fff; }
.bomb-btn { position: absolute; right: 16px; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 56px); width: 76px; height: 76px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); font-size: 30px;
  background: radial-gradient(circle at 35% 30%, #fb7185, #e11d48 60%, #9f1239); box-shadow: 0 0 30px -4px rgba(244, 63, 94, .8); touch-action: none; }
.bomb-btn b { position: absolute; right: -4px; top: -4px; min-width: 24px; height: 24px; border-radius: 12px; background: #fff; color: #9f1239; font-size: 13px; display: grid; place-items: center; padding: 0 6px; }
.bomb-btn:disabled { filter: grayscale(1) brightness(.6); }
.bomb-btn:active { transform: scale(.93); }
.ghint { position: absolute; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); color: rgba(255,255,255,.7); font-size: 13px; font-weight: 600; pointer-events: none; white-space: nowrap; transition: opacity 1s; }
@media (max-width: 600px) { .pbox .sc { font-size: 17px; } .pbox { padding: 6px 9px; } .lvl b { font-size: 19px; } }

.gover { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 22, .55); backdrop-filter: blur(6px); }
.gover-card { width: min(460px, 100%); padding: 26px 22px; text-align: center; max-height: calc(100dvh - 32px); overflow: auto; animation: rise .5s cubic-bezier(.2,.9,.3,1.2) both; }
.gover-card h2 { margin: 0; font-size: 30px; }
.gover-card h3 { margin: 18px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); text-align: left; }
.go-total { font-size: 52px; font-weight: 900; letter-spacing: 1px; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.go-pilots { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.go-pilots span { padding: 6px 12px; border-radius: 999px; background: #f4f3fb; font-weight: 700; font-size: 14px; border: 2px solid var(--c); }
.go-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
