﻿.nav a[aria-current="page"]{ color: var(--text); background: rgba(74,163,255,.18); border: 1px solid rgba(74,163,255,.22); }
    .portalHero{ padding:24px 0 0; }
    .portalHeroInner{ background: linear-gradient(180deg, rgba(11,18,36,.88), rgba(10,15,31,.72)); border:1px solid rgba(255,255,255,.08); border-radius:calc(var(--radius) + 8px); box-shadow:var(--shadow); padding:26px; display:grid; gap:16px; }
    .eyebrow{ display:inline-flex; width:fit-content; align-items:center; gap:8px; padding:6px 12px; border-radius:999px; border:1px solid rgba(74,163,255,.22); background:rgba(74,163,255,.14); color:var(--text); font-size:.92rem; font-weight:700; }
    .portalHero h1{ margin:0; font-size:clamp(1.9rem,4vw,3rem); line-height:1.05; }
    .portalHero p{ margin:0; color:var(--muted); max-width:72ch; font-size:1rem; }
    .portalSubnav{ display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
    .portalSubnav a{ display:inline-flex; align-items:center; padding:8px 12px; border-radius:8px; border:1px solid rgba(255,255,255,.10); background:rgba(255,255,255,.04); color:var(--text); font-weight:800; text-decoration:none; }
    .portalSubnav a[aria-current="page"]{ background:rgba(74,163,255,.18); border-color:rgba(74,163,255,.28); }
    .gameShell{ margin-top:10px; display:grid; gap:10px; }
    .portalHero{ display:none; }
    .gameStage{ position:relative; border:1px solid rgba(255,255,255,.10); border-radius:8px; overflow:hidden; background:#050811; box-shadow:var(--shadow); }
    .gameStage:fullscreen{ --fullPad:max(10px, calc((100vw - 1920px) / 2 + 10px)); width:100vw; height:100vh; border:0; border-radius:0; background:#02040b; }
    .gameStage:fullscreen #starforgeCanvas{ position:absolute; top:0; left:50%; width:min(100vw, 1920px); height:100vh; min-height:100vh; transform:translateX(-50%); }
    .gameStage:fullscreen .gameTopbar{ left:var(--fullPad); right:var(--fullPad); }
    .gameStage:fullscreen .powerPanel{ top:172px; right:var(--fullPad); }
    .gameStage:fullscreen .dronePanel{ top:92px; left:var(--fullPad); }
    .gameStage:fullscreen .upgradePanel{ left:var(--fullPad); right:var(--fullPad); }
    .gameStage:fullscreen .gameOverlay{ left:var(--fullPad); right:var(--fullPad); }
    #starforgeCanvas{ display:block; width:100%; height:calc(100vh - 150px); min-height:560px; touch-action:none; pointer-events:none; }
    .gameTopbar{ position:absolute; z-index:6; top:10px; left:10px; right:10px; display:grid; grid-template-columns:1fr auto; gap:8px; align-items:start; pointer-events:none; }
    .gameTopbar > *{ pointer-events:auto; }
    .shipSelect{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
    .shipCard{ border:1px solid rgba(255,255,255,.12); background:rgba(7,11,23,.78); border-radius:8px; padding:8px; color:var(--text); text-align:left; cursor:pointer; min-height:58px; display:grid; gap:2px; }
    .shipCard strong{ font-size:.88rem; line-height:1.1; }
    .shipCard span{ color:var(--muted); font-size:.72rem; line-height:1.18; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
    .shipCard[aria-pressed="true"]{ border-color:rgba(124,244,199,.58); background:rgba(31,84,74,.66); }
    .shipMenu{ display:none; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:14px 0; }
    .shipMenu .shipCard{ min-height:96px; padding:12px; }
    .shipMenu .shipCard strong{ font-size:1.05rem; }
    .shipMenu .shipCard span{ font-size:.86rem; -webkit-line-clamp:4; }
    .difficultyMenu{ display:none; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:10px 0 14px; }
    .difficultyCard{ border:1px solid rgba(255,255,255,.12); background:rgba(7,11,23,.78); border-radius:8px; padding:12px; color:var(--text); text-align:left; cursor:pointer; display:grid; gap:4px; min-height:78px; }
    .difficultyCard strong{ font-size:1rem; line-height:1.1; }
    .difficultyCard span{ color:var(--muted); font-size:.82rem; line-height:1.2; }
    .difficultyCard[aria-pressed="true"]{ border-color:rgba(124,244,199,.58); background:rgba(31,84,74,.66); }
    .difficultyCard.insane[aria-pressed="true"]{ border-color:rgba(255,138,161,.68); background:rgba(91,32,49,.78); }
    .gameHud{ display:grid; grid-template-columns:repeat(7,minmax(64px,1fr)); gap:6px; align-items:start; }
    .hudTile{ border:1px solid rgba(255,255,255,.10); background:rgba(7,11,23,.78); border-radius:8px; padding:7px 8px; min-width:0; min-height:46px; align-self:start; }
    .hudLabel{ color:var(--muted); font-size:.68rem; font-weight:800; line-height:1; }
    .hudValue{ font-size:.95rem; font-weight:900; margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .hudValue.resourceValue{ display:flex !important; flex-direction:column; gap:2px; white-space:normal !important; overflow:visible; text-overflow:clip; line-height:1.05; font-size:.74rem; }
    .hudValue.resourceValue span{ display:block; white-space:nowrap; overflow:visible; text-overflow:clip; }
    .upgradePanel{ position:absolute; z-index:4; left:10px; right:10px; bottom:10px; display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:8px; pointer-events:none; }
    .upgradeButton{ border:1px solid rgba(255,255,255,.12); background:rgba(7,11,23,.78); color:var(--text); border-radius:8px; padding:10px 12px; text-align:left; cursor:pointer; min-height:58px; pointer-events:auto; }
    .upgradeButton strong{ display:block; font-size:.82rem; line-height:1.1; margin-bottom:4px; }
    .upgradeButton span{ display:block; color:var(--muted); font-size:.7rem; line-height:1.18; white-space:normal; overflow:hidden; }
    .upgradeButton:disabled{ cursor:not-allowed; opacity:.5; }
    .upgradePanel.hidden,.powerPanel.hidden{ display:none; }
    .powerPanel{ position:absolute; z-index:4; top:150px; right:10px; display:grid; grid-template-columns:1fr; gap:6px; width:112px; pointer-events:none; }
    .powerButton{ border:1px solid rgba(255,255,255,.12); background:rgba(7,11,23,.78); color:var(--text); border-radius:8px; padding:9px 7px; cursor:pointer; min-height:46px; font-weight:900; font-size:.74rem; pointer-events:auto; text-align:left; }
    .powerButton[aria-pressed="true"]{ border-color:rgba(255,211,110,.62); background:rgba(95,75,32,.72); }
    .powerButton:disabled{ cursor:not-allowed; opacity:.45; }
    #holdBtn{ border-color:rgba(124,244,199,.28); }
    #holdBtn[aria-pressed="true"]{ border-color:rgba(124,244,199,.62); background:rgba(31,84,74,.74); }
    .dronePanel{ position:absolute; z-index:4; top:150px; left:10px; width:136px; display:grid; gap:6px; pointer-events:none; }
    .dronePanel.hidden{ display:none; }
    #droneSlots,.droneSlot{ pointer-events:auto; }
    .dronePanelTitle{ border:1px solid rgba(255,255,255,.12); background:rgba(7,11,23,.78); border-radius:8px; padding:7px 8px; font-size:.72rem; font-weight:900; color:var(--text); }
    .droneHint{ display:block; margin-top:2px; color:var(--muted); font-size:.62rem; }
    .hangarPolicyPanel{ display:grid; grid-template-columns:1fr; gap:4px; pointer-events:auto; }
    .hangarPolicyButton{ border:1px solid rgba(255,255,255,.10); background:rgba(7,11,23,.72); color:var(--muted); border-radius:6px; padding:5px 6px; font-size:.58rem; font-weight:900; cursor:pointer; text-align:left; }
    .hangarPolicyButton[aria-pressed="true"]{ color:var(--text); border-color:rgba(124,244,199,.48); background:rgba(31,84,74,.66); }
    .droneSlot{ border:1px solid rgba(255,255,255,.10); background:rgba(7,11,23,.68); border-radius:8px; padding:7px; display:grid; gap:4px; }
    .droneSlot strong{ font-size:.68rem; line-height:1; color:var(--text); display:flex; justify-content:space-between; gap:6px; }
    .droneSlot span{ color:var(--muted); font-size:.62rem; text-transform:uppercase; }
    .droneBar{ height:4px; border-radius:999px; overflow:hidden; background:rgba(255,255,255,.10); }
    .droneBar i{ display:block; height:100%; width:0%; background:#7cf4c7; }
    .droneBar.ammo i{ background:#ffd36e; }
    .droneBar.fuel i{ background:#9fd7ff; }
    .droneService{ border:1px solid rgba(124,244,199,.26); background:rgba(31,84,74,.58); color:var(--text); border-radius:6px; padding:4px 5px; font-size:.58rem; font-weight:900; cursor:pointer; pointer-events:auto; margin-right:3px; margin-top:1px; }
    .droneService:disabled{ cursor:not-allowed; opacity:.45; }
    .gameControls{ display:grid; gap:6px; align-content:start; min-width:112px; }
    .controlText{ display:none; }
    .gameButton{ border:1px solid rgba(124,244,199,.32); background:rgba(31,84,74,.78); color:var(--text); border-radius:8px; padding:8px 12px; font-weight:900; cursor:pointer; min-height:48px; }
    .gameButton:hover{ background:rgba(43,110,95,.86); }
    #soundBtn[aria-pressed="false"]{ border-color:rgba(255,138,161,.32); background:rgba(91,32,49,.72); }
    #starforgeCanvas{ position:relative; z-index:1; }
    .gameOverlay{ position:absolute; z-index:3; inset:0; display:grid; place-items:center; pointer-events:auto; padding:18px; text-align:center; background:linear-gradient(180deg, rgba(5,8,17,.08), rgba(5,8,17,.36)); }
    .gameOverlay.hidden{ display:none; }
    .overlayPanel{ max-width:620px; border:1px solid rgba(255,255,255,.12); background:rgba(7,11,23,.84); border-radius:8px; padding:20px; box-shadow:var(--shadow); pointer-events:auto; }
    .overlayPanel h2{ margin:0 0 8px; }
    .overlayPanel p{ margin:6px 0; color:var(--muted); }
    .mainMenuActions,.newGameActions,.menuActions{ display:none; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:14px; }
    .newGameCopy{ display:none; }
    .helpPanel,.optionsPanel{ display:none; margin-top:14px; text-align:left; border:1px solid rgba(255,255,255,.10); border-radius:8px; padding:12px; background:rgba(5,8,17,.62); }
    .helpPanel h3,.optionsPanel h3{ margin:0 0 8px; }
    .helpPanel p{ margin:4px 0; font-size:.9rem; }
    .optionsPanel .gameButton{ width:100%; }
    .panelBackButton{ width:100%; margin-top:12px; }
    .smallButton{ min-height:34px; padding:6px 10px; font-size:.75rem; width:auto !important; }
    .optionRange{ margin-top:12px; display:grid; gap:8px; color:var(--text); font-weight:900; }
    .optionRange span{ display:flex; justify-content:space-between; gap:12px; font-size:.9rem; }
    .optionRange input{ width:100%; accent-color:#7cf4c7; }
    .controlsGroup,.keybindGroup{ display:grid; gap:6px; margin-top:10px; }
    .controlsGroup h4,.keybindGroup h4,.keybindHeader h4{ margin:0; color:var(--text); font-size:.82rem; letter-spacing:0; }
    .keybindPanel{ margin-top:14px; display:grid; gap:10px; }
    .keybindHeader{ display:flex; justify-content:space-between; align-items:center; gap:10px; }
    .keybindNotice{ min-height:18px; margin:0 !important; font-size:.82rem; color:var(--muted); }
    .keybindNotice.bad{ color:#ff8aa1; }
    .keybindList{ max-height:300px; overflow:auto; display:grid; gap:12px; padding-right:4px; }
    .keybindRow{ width:100%; border:1px solid rgba(255,255,255,.10); background:rgba(7,11,23,.72); color:var(--text); border-radius:8px; padding:8px 10px; display:flex; align-items:center; justify-content:space-between; gap:10px; cursor:pointer; text-align:left; }
    .keybindRow:hover{ border-color:rgba(124,244,199,.36); background:rgba(31,84,74,.38); }
    .keybindRow span{ color:var(--muted); font-weight:800; font-size:.78rem; }
    .keybindRow strong{ font-size:.8rem; text-align:right; }
    .gameOverlay.startMode:not(.helpMode):not(.optionsMode) .mainMenuActions{ display:grid; }
    .gameOverlay.newGameMode:not(.helpMode):not(.optionsMode) .shipMenu,
    .gameOverlay.newGameMode:not(.helpMode):not(.optionsMode) .difficultyMenu,
    .gameOverlay.newGameMode:not(.helpMode):not(.optionsMode) .newGameActions{ display:grid; }
    .gameOverlay.newGameMode:not(.helpMode):not(.optionsMode) .newGameCopy{ display:block; }
    .gameOverlay.menuMode:not(.helpMode):not(.optionsMode) .menuActions{ display:grid; }
    .gameOverlay.helpMode .helpPanel{ display:block; }
    .gameOverlay.optionsMode .optionsPanel{ display:block; }
    @media (max-width:1180px){ .gameTopbar{ grid-template-columns:1fr; position:absolute; max-height:45%; overflow:auto; right:132px; } .gameHud{ grid-template-columns:repeat(4,minmax(64px,1fr)); } .shipSelect{ grid-template-columns:repeat(3,minmax(0,1fr)); } .upgradePanel{ grid-template-columns:repeat(4,minmax(0,1fr)); } }
    @media (max-width:760px){ .gameHud{ grid-template-columns:repeat(2,minmax(0,1fr)); } .powerPanel{ top:auto; right:10px; bottom:210px; width:104px; } .dronePanel{ top:auto; bottom:210px; width:118px; } .upgradePanel{ grid-template-columns:1fr; } .shipMenu,.difficultyMenu{ grid-template-columns:1fr; } #starforgeCanvas{ height:62vh; min-height:390px; } }

