/* Void Haul on top of the shared Owlcade theme (shared/theme.css): teal is the game's own colour,
   for ore and anything about the haul; gold stays for credits, as everywhere on Owlcade. */
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; -webkit-user-select: none; user-select: none; background: var(--color-bg); color: var(--color-text); font-family: var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
.link { background: none; border: none; color: var(--color-neutral-400); font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; }
.link:hover { color: var(--color-accent); }

/* — main menu, laid out like Only Gold Matter's — */
.menu { position: fixed; inset: 0; z-index: 10; overflow: hidden; background: var(--color-bg); }
.menu [hidden] { display: none !important; }
#menu-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.menu-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, rgba(22, 24, 38, 0.9) 0%, rgba(22, 24, 38, 0.55) 30%, rgba(22, 24, 38, 0.05) 60%, rgba(22, 24, 38, 0.3) 100%),
    linear-gradient(to top, rgba(22, 24, 38, 0.85) 0%, transparent 40%);
}
.menu-top {
  position: absolute; top: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 16px;
  padding: calc(clamp(14px, 3vw, 28px) + env(safe-area-inset-top)) calc(var(--gutter) + env(safe-area-inset-right)) 0 0;
}
.menu-top .seg.lang button { font-size: 12px; padding: 5px 9px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 500; font-size: 16px; letter-spacing: -0.02em; color: var(--color-neutral-300); text-decoration: none; }
.brand:hover { color: var(--color-text); }
.brand-eyes { display: flex; gap: 4px; }
.brand-eyes span { width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); }

.menu-main {
  position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; max-width: 560px;
  padding: calc(clamp(40px, 9vh, 96px) + env(safe-area-inset-top)) var(--gutter) calc(clamp(28px, 7vh, 72px) + env(safe-area-inset-bottom)) calc(var(--gutter) + env(safe-area-inset-left));
}
.logo {
  margin: 0; color: var(--color-text); text-transform: uppercase;
  font-size: clamp(42px, 6.4vw, 84px); font-weight: 800; line-height: 0.95; letter-spacing: -0.035em;
  display: flex; flex-wrap: wrap; column-gap: 0.25em; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}
.logo-ore { position: relative; color: var(--teal); padding-right: 0.36em; }
/* a glowing ore crystal tucked against the word */
.logo-ore i {
  position: absolute; right: 0; top: 0.1em; width: 0.24em; height: 0.24em; transform: rotate(45deg);
  background: var(--teal); box-shadow: 0 0 0.35em rgba(79, 209, 197, 0.75);
}
#home-tagline { margin: 18px 0 0; color: var(--color-neutral-300); font-size: 15px; max-width: 420px; text-wrap: pretty; }

.menu-list { margin-top: auto; padding-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.menu-items { display: flex; flex-direction: column; }
.menu-item {
  position: relative; display: flex; align-items: center; gap: 10px; width: min(360px, 100%);
  font: inherit; font-size: clamp(16px, 1.6vw, 19px); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; text-align: left;
  color: var(--color-neutral-300); background: transparent; border: 0; border-radius: 4px;
  padding: 7px 14px; margin-left: -14px; cursor: pointer; transition: background 0.12s, color 0.12s;
}
.menu-item:hover, .menu-item:focus-visible {
  color: var(--color-text); outline: none;
  background: linear-gradient(to right, rgba(233, 233, 237, 0.16), rgba(233, 233, 237, 0.06));
}
.menu-item::before {
  content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; border-radius: 2px;
  background: var(--color-accent); opacity: 0; transition: opacity 0.12s;
}
.menu-item:hover::before, .menu-item:focus-visible::before { opacity: 1; }
.menu-item:disabled { opacity: 0.55; cursor: default; }
.code-form { display: flex; gap: 8px; margin: 6px 0 0; width: min(360px, 100%); }
.code-form input {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--color-text); background: var(--glass); border: 1px solid var(--color-divider); border-radius: var(--radius-md); padding: 8px 12px;
}
.code-form input:focus { outline: none; border-color: var(--color-accent); }
#home-status { min-height: 1.3em; margin: 10px 0 0; color: var(--color-neutral-400); font-size: 13px; max-width: 420px; }
#home-status:empty { min-height: 0; margin: 0; }

.menu-foot { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-size: 13px; color: var(--color-neutral-400); }
.menu-foot:has(#home-me:empty) { display: none; }
#home-me::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); margin-right: 8px; vertical-align: 1px; }

.menu-legal { position: absolute; right: calc(var(--gutter) + env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 1; margin: 0; }
.legal-links { font-size: 11px; text-align: center; }
.legal-links a { color: var(--color-neutral-500); margin: 0 6px; text-decoration: none; }
.legal-links a:hover { color: var(--color-accent); }

@media (max-width: 640px) {
  .menu-shade { background: linear-gradient(to top, rgba(22, 24, 38, 0.92) 0%, rgba(22, 24, 38, 0.4) 55%, rgba(22, 24, 38, 0.6) 100%); }
  .menu-legal { left: 0; right: 0; }
  .menu-main { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
}

/* — in flight — */
.game { position: fixed; inset: 0; z-index: 5; background: #0d0f1a; touch-action: none; }
.game[hidden], .game [hidden] { display: none !important; }
#game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hud-top {
  position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); pointer-events: none;
  padding: calc(12px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 12px calc(16px + env(safe-area-inset-left));
  background: linear-gradient(to bottom, rgba(13, 15, 26, 0.85), transparent);
}
.hud-top > * { pointer-events: auto; }
.hud-btn {
  font: inherit; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-neutral-300);
  background: var(--glass); border: 1px solid var(--color-divider); border-radius: var(--radius-md); padding: 7px 12px; cursor: pointer;
}
.hud-btn:hover { color: var(--color-text); border-color: var(--color-accent); }
.hud-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hud-stat b { font-size: 16px; font-weight: 600; white-space: nowrap; }
.hud-label { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-500); white-space: nowrap; }
.gold { color: var(--gold); }
.hud-cargo b { color: var(--teal); }
.bar { display: block; width: 110px; height: 4px; border-radius: 2px; background: rgba(233, 233, 237, 0.12); overflow: hidden; margin-top: 3px; }
#hud-cargo-fill { display: block; height: 100%; width: 0; background: var(--teal); transition: width 0.2s; }
.bar.full #hud-cargo-fill { background: var(--gold); }
#hud-hull-fill { display: block; height: 100%; width: 100%; background: var(--color-neutral-300); transition: width 0.15s; }
.bar.low #hud-hull-fill { background: var(--danger); }
.hud-code { position: absolute; right: calc(16px + env(safe-area-inset-right)); top: calc(232px + env(safe-area-inset-top)); margin: 0; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-400); -webkit-user-select: text; user-select: text; }
.hud-shield { position: absolute; left: 50%; transform: translateX(-50%); top: calc(124px + env(safe-area-inset-top)); color: var(--teal); border-color: rgba(79, 209, 197, 0.5); font-size: 12px; }
.hud-where { margin-left: auto; text-align: right; align-items: flex-end; }
.hud-where b { font-size: 13px; color: var(--color-neutral-300); }
.hud-hint, .hud-msg {
  position: absolute; left: 50%; transform: translateX(-50%); margin: 0; max-width: min(520px, calc(100% - 32px)); text-align: center;
  font-size: 13px; color: var(--color-neutral-300); background: var(--glass); border: 1px solid var(--color-divider); border-radius: var(--radius-md); padding: 8px 14px;
  pointer-events: none;
}
.hud-hint { bottom: calc(28px + env(safe-area-inset-bottom)); }
.hud-msg { top: calc(76px + env(safe-area-inset-top)); }
.hud-msg.gold { color: var(--gold); border-color: rgba(255, 198, 41, 0.4); }
.hud-msg.bad { color: var(--danger); }
.hud-dock { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom)); display: flex; gap: 10px; }
.hud-hangar.btn { color: var(--teal); border-color: rgba(79, 209, 197, 0.6); background: var(--glass); }
.shield-bar { height: 3px; margin-top: 3px; }
#hud-shield-fill { display: block; height: 100%; width: 100%; background: #7fb4ff; transition: width 0.15s; }
.shield-bar + .bar { margin-top: 2px; }
.hangar {
  position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 24px)); max-height: calc(100% - 110px); overflow: hidden;
  background: rgba(22, 24, 38, 0.96); border: 1px solid var(--color-divider); border-radius: var(--radius-lg, 14px); padding: 18px; display: flex; flex-direction: column; gap: 12px;
}
.hangar header { display: flex; align-items: center; gap: 14px; }
.hangar h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.hangar-credits { margin-left: auto; font-size: 15px; }
.hangar-note { margin: 0; font-size: 12.5px; color: var(--color-neutral-400); }
.hangar-hold { display: flex; flex-wrap: wrap; gap: 6px; }
.ore-chip { font-size: 12px; padding: 3px 9px; border-radius: 99px; color: var(--ore); border: 1px solid color-mix(in srgb, var(--ore) 55%, transparent); }
.ore-chip.none { opacity: 0.4; }
.hangar-sub { margin: 4px 0 0; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-neutral-500); }
.hangar-ships { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); gap: 8px; overflow-x: auto; padding-bottom: 2px; flex-shrink: 0; touch-action: pan-x; }
.ship-card { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; background: rgba(233, 233, 237, 0.04); border: 1px solid transparent; border-radius: var(--radius-md); padding: 8px 6px; }
.ship-card.on { border-color: rgba(79, 209, 197, 0.6); }
.ship-card b { font-size: 13px; }
.ship-card span { font-size: 11px; color: var(--color-neutral-400); line-height: 1.3; min-height: 2.6em; }
.ship-btn.btn { font-size: 11.5px; line-height: 1.25; padding: 5px 8px; white-space: normal; margin-top: auto; color: var(--gold); border-color: rgba(255, 198, 41, 0.6); }
.ship-btn.btn:disabled { opacity: 0.5; cursor: default; }
.ship-card.on .ship-btn.btn { color: var(--teal); border-color: rgba(79, 209, 197, 0.6); }
.hangar-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 0; flex: 1; overscroll-behavior: contain; touch-action: pan-y; }
.game.in-hangar .hud-shield, .game.in-hangar .hud-drill, .game.in-hangar .hud-hint, .game.in-hangar .hud-dock { display: none !important; }
.mod { display: flex; align-items: center; gap: 12px; background: rgba(233, 233, 237, 0.04); border-radius: var(--radius-md); padding: 10px 12px; }
.mod-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.mod-info b { font-size: 14px; font-weight: 600; }
.mod-info span { font-size: 12px; color: var(--color-neutral-400); }
.pips { display: flex; gap: 3px; margin-top: 2px; }
.pips i { width: 9px; height: 5px; border-radius: 2px; background: rgba(233, 233, 237, 0.12); }
.pips i.f { background: var(--teal); }
.mod-buy.btn { white-space: nowrap; font-size: 12.5px; padding: 7px 12px; color: var(--gold); border-color: rgba(255, 198, 41, 0.6); }
.mod-buy.btn:disabled { opacity: 0.45; cursor: default; }
.hud-drill {
  position: absolute; right: calc(22px + env(safe-area-inset-right)); bottom: calc(30px + env(safe-area-inset-bottom));
  width: 84px; height: 84px; border-radius: 50%; font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--teal); background: rgba(79, 209, 197, 0.12); border: 2px solid rgba(79, 209, 197, 0.6); touch-action: none; -webkit-tap-highlight-color: transparent;
}
.hud-drill:active { background: rgba(79, 209, 197, 0.3); }
.hud-fire { bottom: calc(128px + env(safe-area-inset-bottom)); color: var(--danger); background: rgba(224, 122, 115, 0.12); border-color: rgba(224, 122, 115, 0.6); }
.hud-fire:active { background: rgba(224, 122, 115, 0.3); }
@media (max-width: 640px) {
  .hud-top { gap: 12px; }
  .bar { width: 56px; }
  .hud-where { display: none; }
  .hud-code { top: calc(172px + env(safe-area-inset-top)); }
  .hud-msg { top: calc(194px + env(safe-area-inset-top)); }
  .hud-shield { top: calc(250px + env(safe-area-inset-top)); }
  .hud-stat b { font-size: 14px; }
  .hud-hint { bottom: calc(130px + env(safe-area-inset-bottom)); }
}
.hud-sell.btn { color: var(--gold); border-color: rgba(255, 198, 41, 0.7); background: var(--glass); }
.hud-sell.btn:hover { background: rgba(255, 198, 41, 0.12); }
