/* css/gra2.css — wygląd Gwiezdnego Kupca 2.0: ciemny kosmos, neonowe akcenty w duchu lat 80., duże przyciski pod kciuk. */
:root {
  --tlo: #060818; --panel: #11173a; --panel2: #18204d; --ramka: #2b3778; --tekst: #eef1ff; --przygaszony: #a3acdb;
  --cyjan: #3cf0ff; --roz: #ff4fd8; --zolty: #ffcc4d; --zielony: #6dff8a; --czerwony: #ff5a6e; --fiolet: #b48cff;
  --r: 14px; --cien: 0 10px 30px rgba(0, 0, 0, .45);
  --naglowek: 'Orbitron', 'Rubik', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--tlo); color: var(--tekst); font: 16px/1.4 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif; overflow-x: hidden; }
#tlo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
#app { position: relative; z-index: 1; }
h1, h2, h3 { font-family: var(--naglowek); letter-spacing: .02em; margin: .2em 0 .5em; }
h2 { font-size: 1.15rem; } h3 { font-size: .95rem; color: var(--cyjan); margin-top: 1.2em; }
a { color: var(--cyjan); }
small, .maly { font-size: .82rem; color: var(--przygaszony); }
.srodek { text-align: center; }
.plus { color: var(--zielony); } .minus { color: var(--czerwony); }
button { font: inherit; color: inherit; }

/* ---------- przyciski ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 44px; padding: .55em 1em; border-radius: 12px; border: 1.5px solid var(--ramka);
  background: var(--panel2); color: var(--tekst); font-weight: 500; cursor: pointer; transition: transform .08s, background .15s, box-shadow .15s; touch-action: manipulation; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:hover:not(:disabled) { border-color: var(--cyjan); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.glowny { background: linear-gradient(180deg, #46f3ff, #16b8d6); border-color: #7ff7ff; color: #041320; font-weight: 700; box-shadow: 0 0 18px rgba(60, 240, 255, .28); }
.btn.zielony { background: linear-gradient(180deg, #7dff98, #2fcf59); border-color: #b0ffbf; color: #04200d; font-weight: 700; box-shadow: 0 0 16px rgba(109, 255, 138, .25); }
.btn.zly { border-color: var(--czerwony); color: var(--czerwony); background: transparent; }
.btn.duzy { width: 100%; min-height: 54px; font-size: 1.05rem; margin: .35em 0; }
.btn.maly { min-height: 32px; padding: .2em .7em; font-size: .85rem; }
.btn.link { background: none; border: 0; color: var(--cyjan); text-decoration: underline; min-height: 38px; }
.btn.okragly { min-width: 52px; }

/* ---------- ekran startowy ---------- */
.startEkran { max-width: 460px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px 32px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.jezyki { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.jezyki button { background: rgba(17, 23, 58, .8); border: 1px solid var(--ramka); border-radius: 8px; padding: .3em .6em; cursor: pointer; font-size: .85rem; min-height: 36px; min-width: 44px; }
.jezyki button.akt { border-color: var(--cyjan); color: var(--cyjan); }
.logo { text-align: center; margin: 8px 0 6px; }
.logoStatek svg { max-width: 78vw; height: auto; filter: drop-shadow(0 0 22px rgba(60, 240, 255, .35)); animation: unos 4s ease-in-out infinite; }
@keyframes unos { 50% { transform: translateY(-8px); } }
.logo h1 { font-size: clamp(1.7rem, 7.5vw, 2.4rem); font-weight: 800; background: linear-gradient(90deg, var(--cyjan), var(--roz) 60%, var(--zolty)); -webkit-background-clip: text; background-clip: text; color: transparent; margin: .1em 0; text-shadow: none; }
.haslo { color: var(--zolty); font-family: var(--naglowek); font-size: .9rem; letter-spacing: .06em; margin: 0; }
.kroki { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; }
.kroki li { display: flex; gap: 12px; align-items: center; background: rgba(17, 23, 58, .78); border: 1px solid var(--ramka); border-radius: var(--r); padding: 10px 14px; }
.kroki b { font-size: 1.5rem; }
.formularz { background: rgba(17, 23, 58, .88); border: 1px solid var(--ramka); border-radius: 18px; padding: 16px; box-shadow: var(--cien); backdrop-filter: blur(6px); }
.formularz label { display: block; margin: .6em 0; font-size: .88rem; color: var(--przygaszony); }
input:not([type=checkbox]):not([type=range]) { display: block; width: 100%; margin-top: 4px; min-height: 48px; padding: .6em .8em; background: #0a0f2a; border: 1.5px solid var(--ramka); border-radius: 12px; color: var(--tekst); font: inherit; }
input:focus { outline: none; border-color: var(--cyjan); box-shadow: 0 0 0 3px rgba(60, 240, 255, .2); }
.stopka { text-align: center; margin-top: auto; padding-top: 18px; font-size: .85rem; color: var(--przygaszony); }

/* ---------- gra: układ ---------- */
body.gra { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
#hud { position: sticky; top: 0; z-index: 20; background: linear-gradient(180deg, rgba(6, 8, 24, .97), rgba(10, 14, 40, .94)); border-bottom: 1px solid var(--ramka); padding: max(6px, env(safe-area-inset-top)) 12px 8px; backdrop-filter: blur(8px); }
.hudGora { display: flex; justify-content: space-between; align-items: center; gap: 8px; max-width: 1100px; margin: 0 auto; }
.kto { display: flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; padding: 0; min-width: 0; text-align: left; }
.kto svg { flex: none; }
.kto span { display: flex; flex-direction: column; min-width: 0; }
.kto b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.kto small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; color: var(--zolty); }
.diamenty { display: flex; align-items: center; gap: 6px; background: rgba(180, 140, 255, .15); border: 1.5px solid var(--fiolet); border-radius: 999px; padding: .35em .5em .35em .8em; cursor: pointer; min-height: 40px; }
.diamenty i { font-style: normal; background: var(--fiolet); color: #160a33; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; font-weight: 700; }
.hudLiczniki { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: 6px; margin: 6px auto 0; max-width: 1100px; }
.licznik { background: var(--panel); border: 1px solid var(--ramka); border-radius: 10px; padding: 4px 7px 6px; min-width: 0; }
.licznik small { display: block; font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.licznik b { font-size: .92rem; white-space: nowrap; }
.licznik.kredyty b { color: var(--zolty); font-size: 1.02rem; }
.pasek { display: block; height: 5px; border-radius: 3px; background: #0a0f2a; overflow: hidden; margin-top: 3px; }
.pasek i { display: block; height: 100%; background: var(--cyjan); border-radius: 3px; transition: width .4s; }
.pasek.zielony i { background: var(--zielony); } .pasek.zolty i { background: var(--zolty); } .pasek.zly i { background: var(--czerwony); } .pasek.fiolet i { background: linear-gradient(90deg, var(--fiolet), var(--roz)); }
.hudRanga { display: flex; align-items: center; gap: 8px; font-size: .7rem; color: var(--przygaszony); max-width: 1100px; margin: 6px auto 0; }
.hudRanga .pasek { flex: 1; margin: 0; height: 6px; }
#uklad { max-width: 1100px; margin: 0 auto; padding: 12px; }
#ekran { min-width: 0; }
#boczna[hidden] { display: none; }
@media (min-width: 1000px) {
  #uklad { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 20px; align-items: start; }
  #boczna { position: sticky; top: 150px; background: rgba(17, 23, 58, .6); border: 1px solid var(--ramka); border-radius: 18px; padding: 14px; }
  .kto b, .kto small { max-width: 400px; }
}
#nawigacja { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(8, 11, 32, .97); border-top: 1px solid var(--ramka); padding: 4px 4px max(4px, env(safe-area-inset-bottom)); backdrop-filter: blur(8px); }
#nawigacja button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; background: none; border: 0; padding: 6px 2px; min-height: 60px; border-radius: 12px; cursor: pointer; color: var(--przygaszony); font-size: .74rem; }
#nawigacja .ik { font-size: 1.45rem; line-height: 1.1; filter: grayscale(.5); }
#nawigacja button.akt { color: var(--cyjan); background: rgba(60, 240, 255, .09); }
#nawigacja button.akt .ik { filter: none; }
#nawigacja .kropka { position: absolute; top: 3px; right: calc(50% - 22px); font-style: normal; font-size: .7rem; font-weight: 700; background: var(--czerwony); color: #fff; border-radius: 999px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }
#nawigacja .kropka:empty { display: none; }
@media (min-width: 1000px) { body.gra { padding-bottom: 110px; } #nawigacja { left: 50%; right: auto; transform: translateX(-50%); width: 560px; border: 1px solid var(--ramka); border-radius: 18px 18px 0 0; } }

/* ---------- rynek ---------- */
.stacjaKarta { display: flex; gap: 12px; align-items: center; background: linear-gradient(135deg, rgba(24, 32, 77, .92), rgba(17, 23, 58, .92)); border: 1px solid var(--ramka); border-left: 4px solid var(--kolor); border-radius: 18px; padding: 10px 14px; box-shadow: var(--cien); }
.stacjaKarta h2 { font-size: 1.45rem; margin: 0; }
.stacjaPlaneta { flex: none; }
.znaczek { display: inline-block; font-size: .78rem; padding: .15em .6em; border-radius: 999px; border: 1px solid var(--kolor, var(--ramka)); color: var(--kolor, var(--tekst)); background: rgba(0, 0, 0, .25); }
.wiesc { margin: 8px 0; padding: 8px 12px; border-radius: 12px; font-size: .9rem; border: 1px solid; }
.wiesc.niedobor { border-color: var(--zolty); background: rgba(255, 204, 77, .09); }
.wiesc.nadwyzka { border-color: var(--zielony); background: rgba(109, 255, 138, .08); }
.podpowiedz { margin: 10px 0; padding: 10px 12px; border-radius: 14px; background: rgba(180, 140, 255, .1); border: 1px dashed var(--fiolet); font-size: .93rem; }
.podpowiedz .btn { margin-left: 4px; }
.ramkaInfo { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--ramka); background: var(--panel); margin: 8px 0; }
.ramkaInfo.zly { border-color: var(--czerwony); } .ramkaInfo.dobry { border-color: var(--zielony); }
.towary { display: grid; gap: 8px; }
.towar { display: grid; grid-template-columns: 44px 1fr auto; grid-template-areas: "ik opis ceny" "ik przyc przyc"; gap: 6px 10px; align-items: center; background: rgba(17, 23, 58, .9); border: 1px solid var(--ramka); border-radius: var(--r); padding: 10px 12px; }
.towar.mam { border-color: rgba(255, 204, 77, .55); }
.towar.zablokowany { opacity: .5; grid-template-areas: "ik opis opis"; }
.tIk { grid-area: ik; font-size: 1.9rem; text-align: center; }
.tOpis { grid-area: opis; min-width: 0; }
.tOpis b { margin-right: 6px; }
.tOpis small { display: block; }
.tCeny { grid-area: ceny; display: flex; flex-direction: column; align-items: flex-end; font-size: .8rem; color: var(--przygaszony); }
.tCeny b { font-size: 1.05rem; color: var(--tekst); }
.cSprz.plus b { color: var(--zielony); } .cSprz.minus b { color: var(--czerwony); }
.cKup.brak { font-style: italic; }
.tPrzyciski { grid-area: przyc; display: flex; gap: 8px; }
.tPrzyciski .btn { flex: 1; }
.ocena { font-size: .68rem; font-weight: 700; padding: .12em .5em; border-radius: 6px; letter-spacing: .04em; white-space: nowrap; }
.ocena.btanio { background: var(--zielony); color: #04200d; } .ocena.tanio { color: var(--zielony); border: 1px solid var(--zielony); }
.ocena.bdrogo { background: var(--zolty); color: #2a1d00; } .ocena.drogo { color: var(--zolty); border: 1px solid var(--zolty); }
.ocena.srednio { color: var(--przygaszony); border: 1px solid var(--ramka); }

/* ---------- okna i arkusze ---------- */
.nakladka { position: fixed; inset: 0; z-index: 50; background: rgba(3, 4, 14, .72); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .18s; backdrop-filter: blur(3px); }
.nakladka.widoczna { opacity: 1; }
.okno { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; background: linear-gradient(180deg, #1a2257, #10163a); border: 1.5px solid var(--ramka); border-radius: 20px; padding: 18px 16px 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.nakladka.arkusz { place-items: end center; padding: 0; }
.nakladka.arkusz .okno { border-radius: 22px 22px 0 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); transform: translateY(30px); transition: transform .2s; }
.nakladka.arkusz.widoczna .okno { transform: none; }
.okno .x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .06); cursor: pointer; font-size: 1.1rem; }
.okno h2 { padding-right: 36px; }
.ilosc { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0; }
.ilosc output { font-family: var(--naglowek); font-size: 2rem; min-width: 80px; text-align: center; color: var(--zolty); }
input[type=range] { width: 100%; accent-color: var(--cyjan); height: 34px; }
.szybkie { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 10px; }
.podsumowanie { text-align: center; font-size: 1.05rem; margin: 6px 0; }
.duzaIkona { font-size: 3.4rem; text-align: center; }
.swieto, .ogloszenie, .zdarzenie { text-align: center; }
.nagroda { font-family: var(--naglowek); font-size: 1.5rem; color: var(--zolty); margin: .3em 0; }
.zmiany { list-style: none; padding: 0; margin: 12px 0; text-align: left; display: grid; gap: 6px; }
.zmiany li { background: rgba(0, 0, 0, .25); border-radius: 10px; padding: 8px 12px; }
.ilustracja { width: 100%; max-width: 280px; height: auto; display: block; margin: 0 auto 4px; }
.opcje { display: grid; gap: 8px; margin-top: 12px; }
.opcja { justify-content: flex-start; text-align: left; gap: 12px; }
.opcja > span:first-child { font-size: 1.5rem; }
.opcja span { display: flex; flex-direction: column; }
.opcja small { color: var(--przygaszony); }
.zdarzenieOkno { border-color: var(--roz); }

/* ---------- mapa ---------- */
.mapaRamka { background: radial-gradient(circle at 50% 50%, rgba(43, 55, 120, .35), rgba(6, 8, 24, .6)); border: 1px solid var(--ramka); border-radius: 18px; padding: 4px; }
.mapaSvg { display: block; width: 100%; height: auto; max-height: 62vh; max-height: 62dvh; touch-action: manipulation; }
.mapaSvg .zasieg { fill: rgba(60, 240, 255, .05); stroke: var(--cyjan); stroke-width: .35; stroke-dasharray: 1.5 1.2; }
.mapaSvg .trasa { stroke: var(--zolty); stroke-width: .6; stroke-dasharray: 1.6 1; }
.mapaSvg .st { cursor: pointer; }
.mapaSvg .dotyk { fill: transparent; }
.mapaSvg .nazwa { font: 600 3.5px 'Rubik', sans-serif; fill: var(--tekst); text-anchor: middle; paint-order: stroke; stroke: #060818; stroke-width: .9px; }
.mapaSvg .ikonaRodzaju, .mapaSvg .gracze { font-size: 3px; }
.mapaSvg .zyskZnak { font: 700 3.1px 'Rubik', sans-serif; fill: var(--zielony); text-anchor: middle; paint-order: stroke; stroke: #060818; stroke-width: .8px; }
.mapaSvg .daleko { opacity: .38; }
.mapaSvg .tankuj .nazwa { fill: var(--przygaszony); }
.mapaSvg .wybrana .nazwa { fill: var(--zolty); }
.mapaSvg .wybrana circle:nth-of-type(2), .mapaSvg .wybrana circle:last-of-type { stroke: var(--zolty); stroke-width: 1.1; }
.mapaSvg .puls { fill: none; stroke: var(--cyjan); stroke-width: .5; animation: puls 1.6s ease-out infinite; transform-origin: center; transform-box: fill-box; }
.mapaSvg .ja { fill: var(--cyjan); }
@keyframes puls { from { opacity: 1; transform: scale(.7); } to { opacity: 0; transform: scale(1.6); } }
.kartaStacji { margin-top: 10px; background: rgba(17, 23, 58, .92); border: 1px solid var(--ramka); border-left: 4px solid var(--kolor, var(--ramka)); border-radius: 16px; padding: 12px 14px; }
.kartaStacji.pusta { text-align: center; }
.ksGora { display: flex; gap: 10px; align-items: center; }
.ksGora h3 { margin: 0; color: var(--tekst); font-size: 1.15rem; }
.ksGora small { display: block; margin-top: 3px; }
.cenyLista { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
.cenyLista li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 9px; background: rgba(0, 0, 0, .25); font-size: .9rem; }
.cenyLista li.tanio span:first-child::after { content: ' ▼'; color: var(--zielony); font-size: .7rem; }
.cenyLista li.drogo span:first-child::after { content: ' ▲'; color: var(--zolty); font-size: .7rem; }
.cenyLista li.mam { border: 1px solid rgba(255, 204, 77, .5); }
.legenda { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .78rem; color: var(--przygaszony); margin-top: 8px; justify-content: center; }
.tytulBoczny { margin-top: 0; }

/* ---------- lot ---------- */
.lot { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-size: 1.1rem; }
.statek.wLocie { animation: drzy .18s linear infinite; filter: drop-shadow(0 0 18px rgba(60, 240, 255, .5)); }
@keyframes drzy { 50% { transform: translate(1px, -1px); } }

/* ---------- statek ---------- */
.hangar { text-align: center; background: radial-gradient(ellipse at 50% 60%, rgba(60, 240, 255, .12), transparent 70%); border-radius: 18px; padding: 8px; }
.hangarStatek svg { max-width: 88vw; height: auto; filter: drop-shadow(0 0 16px rgba(60, 240, 255, .25)); }
.serwis { display: grid; gap: 6px; margin: 10px 0; }
.ulepszenia { display: grid; gap: 8px; }
.ulepszenie, .usluga { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; background: rgba(17, 23, 58, .9); border: 1px solid var(--ramka); border-radius: var(--r); padding: 10px 12px; }
.uIk { font-size: 1.7rem; text-align: center; }
.uOpis, .usluga > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kropki { display: flex; gap: 3px; }
.kropki i { width: 10px; height: 10px; border-radius: 3px; background: #0a0f2a; border: 1px solid var(--ramka); }
.kropki i.pelna { background: var(--cyjan); border-color: var(--cyjan); box-shadow: 0 0 6px rgba(60, 240, 255, .5); }
.skorki { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.skorka { display: flex; flex-direction: column; align-items: center; gap: 2px; background: rgba(17, 23, 58, .9); border: 1.5px solid var(--ramka); border-radius: var(--r); padding: 8px; cursor: pointer; min-height: 44px; }
.skorka.akt { border-color: var(--zolty); box-shadow: 0 0 12px rgba(255, 204, 77, .3); }

/* ---------- cele, menu, ranking, sklep, czat ---------- */
.cele { display: grid; gap: 8px; }
.cel { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; background: rgba(17, 23, 58, .9); border: 1px solid var(--ramka); border-radius: var(--r); padding: 12px; }
.cel.gotowy { border-color: var(--zielony); box-shadow: 0 0 14px rgba(109, 255, 138, .18); }
.cel.odebrany { opacity: .55; }
.cel .pasek { height: 8px; margin: 6px 0 2px; }
.rangaKarta { background: rgba(17, 23, 58, .9); border: 1px solid var(--ramka); border-radius: var(--r); padding: 12px; display: grid; gap: 4px; }
.rangaKarta .pasek { height: 9px; }
.statystyki { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.statystyki li { background: rgba(17, 23, 58, .9); border: 1px solid var(--ramka); border-radius: 10px; padding: 8px 10px; font-size: .85rem; color: var(--przygaszony); }
.statystyki b { color: var(--tekst); display: block; font-size: 1rem; }
.menu { display: grid; gap: 8px; }
.menu button { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; text-align: left; gap: 0 10px; align-items: center; background: rgba(17, 23, 58, .92); border: 1px solid var(--ramka); border-radius: var(--r); padding: 12px; cursor: pointer; min-height: 64px; }
.menu button span { grid-row: span 2; font-size: 1.7rem; text-align: center; }
.ranking { list-style: none; padding: 0; display: grid; gap: 6px; }
.ranking li { display: grid; grid-template-columns: 30px 46px 1fr auto; gap: 8px; align-items: center; background: rgba(17, 23, 58, .9); border: 1px solid var(--ramka); border-radius: 12px; padding: 6px 10px; }
.ranking li.ja { border-color: var(--zolty); }
.ranking .poz { font-family: var(--naglowek); color: var(--cyjan); text-align: center; }
.ranking .rn { min-width: 0; display: flex; flex-direction: column; }
.ranking .rn b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking .rm { color: var(--zolty); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.saldo { text-align: center; font-size: 1.8rem; font-family: var(--naglowek); background: rgba(180, 140, 255, .12); border: 1px solid var(--fiolet); border-radius: 16px; padding: 10px; }
.saldo small { display: block; font-family: 'Rubik', sans-serif; font-size: .82rem; }
.uslugi { display: grid; gap: 8px; }
.waluty { display: flex; gap: 6px; margin-bottom: 8px; }
.pakiety { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pakiet { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 16px; border: 1.5px solid var(--fiolet); background: linear-gradient(180deg, rgba(180, 140, 255, .18), rgba(17, 23, 58, .9)); cursor: pointer; }
.pakiet .pIk { font-size: 1.6rem; }
.pakiet b { font-size: 1.15rem; }
.pakiet .cena { margin-top: 6px; background: var(--fiolet); color: #160a33; font-weight: 700; padding: .3em .9em; border-radius: 999px; }
/* mega pakiety (26.11.2026): 9 kafli czytelnie na telefonie (2 kolumny, najlepszy na całą szerokość), tablecie i komputerze */
.pakiet { position: relative; min-height: 44px; text-align: center; }
.pakiet small.plus { font-size: .78rem; }
@media (min-width: 620px) { .pakiety { grid-template-columns: repeat(4, 1fr); } .pakiety.mega { grid-template-columns: repeat(3, 1fr); } }
.megaTytul { margin-top: 18px; }
.pakiet.megaP { border-color: var(--zolty); background: linear-gradient(180deg, rgba(255, 204, 77, .2), rgba(17, 23, 58, .92)); padding-top: 20px; }
.pakiet.megaP .cena { background: var(--zolty); color: #2a1d00; }
.pakiet.najlepsza { grid-column: 1 / -1; border-width: 2px; box-shadow: 0 0 18px rgba(255, 204, 77, .35); }
.pakiet.najlepsza .pIk { font-size: 2.2rem; }
.pakiet.najlepsza b { font-size: 1.4rem; }
@media (min-width: 620px) { .pakiet.najlepsza { grid-column: span 2; } }
.wstega { position: absolute; top: -1px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: var(--roz); color: #fff; padding: .2em .8em; border-radius: 0 0 10px 10px; white-space: nowrap; }
.wstega.mega { background: var(--zolty); color: #2a1d00; }
/* okno potwierdzenia dużego wydatku */
.okno.potwierdzenie { text-align: center; }
.okno.potwierdzenie .przyciski { display: grid; gap: 8px; margin-top: 14px; }
.kwotaZakupu { font-size: 1.15rem; margin: .4em 0; }
.kwotaZakupu b { color: var(--zolty); }
.podgladSkorki { display: flex; justify-content: center; }
/* skórki ekskluzywne i tytuły */
.skorka { position: relative; }
.skorka.ekskluzywna { border-color: var(--zolty); background: linear-gradient(180deg, rgba(255, 204, 77, .14), rgba(17, 23, 58, .9)); }
.znakEks { display: block; line-height: 1; font-style: normal; font-size: .6rem; font-weight: 800; text-transform: uppercase; color: var(--zolty); letter-spacing: .05em; }
.tytuly { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tytulBtn { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 44px; padding: 10px 8px; background: rgba(17, 23, 58, .9); border: 1.5px solid var(--ramka); border-radius: var(--r); cursor: pointer; color: inherit; font: inherit; }
.tytulBtn b { color: var(--zolty); }
.tytulBtn.akt { border-color: var(--zolty); box-shadow: 0 0 12px rgba(255, 204, 77, .3); }
.zgoda { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 4px; font-size: .82rem; color: var(--przygaszony); }
.zgoda input { width: 22px; height: 22px; flex: none; accent-color: var(--fiolet); margin-top: 2px; }
.zgoda.mrug { animation: mrug .4s 3; }
@keyframes mrug { 50% { color: var(--czerwony); } }
.galaktyki { display: grid; gap: 8px; }
.galaktyka { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; background: rgba(17, 23, 58, .92); border: 1px solid var(--ramka); border-radius: var(--r); padding: 12px; }
.galaktyka > div { display: flex; flex-direction: column; }
.galaktyka.akt { border-color: var(--cyjan); }
.czat { height: 52vh; height: 52dvh; overflow: auto; background: rgba(6, 8, 24, .6); border: 1px solid var(--ramka); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.wiad { background: rgba(17, 23, 58, .9); border-radius: 10px; padding: 6px 10px; user-select: none; -webkit-user-select: none; }
.wiad p { margin: 2px 0 0; word-wrap: break-word; }
.czatForm { display: flex; gap: 6px; margin-top: 8px; }
.czatForm input { margin: 0; }
.pomoc { padding-left: 0; list-style: none; display: grid; gap: 8px; }
.pomoc li { background: rgba(0, 0, 0, .25); border-radius: 10px; padding: 8px 12px; }

/* ---------- samouczek, toasty ---------- */
.podswietl { position: relative; z-index: 41; box-shadow: 0 0 0 3px var(--zolty), 0 0 24px 6px rgba(255, 204, 77, .55) !important; animation: pulsuj 1.2s ease-in-out infinite; }
g.podswietl { animation: none; }
g.podswietl circle:nth-of-type(3) { stroke: var(--zolty); stroke-width: 1.4; }
@keyframes pulsuj { 50% { box-shadow: 0 0 0 5px var(--zolty), 0 0 30px 10px rgba(255, 204, 77, .35); } }
.dymek { position: absolute; z-index: 45; max-width: min(320px, calc(100vw - 20px)); background: #fff8dc; color: #241a00; border-radius: 14px; padding: 10px 14px 4px; box-shadow: var(--cien); font-size: .95rem; animation: wjedz .3s; }
.dymek p { margin: 0 0 2px; }
.dymek .btn.link { color: #6b5200; min-height: 30px; padding: 0; font-size: .8rem; }
.dymek.pod::before, .dymek.nad::after { content: ''; position: absolute; left: calc(50% - 8px); border: 8px solid transparent; }
.dymek.pod::before { top: -16px; border-bottom-color: #fff8dc; }
.dymek.nad::after { bottom: -16px; border-top-color: #fff8dc; }
@keyframes wjedz { from { opacity: 0; transform: translateY(6px); } }
#toasty { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 60; display: grid; gap: 6px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: rgba(24, 32, 77, .97); border: 1px solid var(--ramka); border-radius: 12px; padding: 10px 14px; box-shadow: var(--cien); animation: wjedz .25s; transition: opacity .5s, transform .5s; }
.toast.dobry { border-color: var(--zielony); } .toast.zly { border-color: var(--czerwony); }
.toast.znika { opacity: 0; transform: translateY(-8px); }
.blysk { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 70; font-family: var(--naglowek); font-size: 2.4rem; color: var(--zielony); text-shadow: 0 0 20px rgba(109, 255, 138, .8); pointer-events: none; animation: blysk 1.6s ease-out forwards; }
@keyframes blysk { from { opacity: 0; transform: translate(-50%, -20%) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } to { opacity: 0; transform: translate(-50%, -140%) scale(1); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (max-width: 380px) { .hudLiczniki { grid-template-columns: 1fr 1fr; } .towar { padding: 8px 10px; } }

/* ---------- kolonie, walki, gildie, kontrakty, sezon (26.11.2026) ---------- */
.naStacji { margin-top: 1.4em; }
.kolonie { display: grid; gap: 8px; }
.kolonia { display: grid; grid-template-columns: 40px 1fr; grid-template-areas: "ik opis" "ik prz"; gap: 6px 10px; align-items: center; background: rgba(17, 23, 58, .9); border: 1px solid var(--ramka); border-radius: var(--r); padding: 10px 12px; }
.kolonia.moja { border-color: var(--zielony); }
.kolonia.list { border-color: var(--czerwony); }
.kolonia .kOpis { grid-area: opis; min-width: 0; display: flex; flex-direction: column; }
.kolonia .kPrz { grid-area: prz; display: flex; flex-wrap: wrap; gap: 6px; }
.kolonia .kPrz .btn small { color: inherit; opacity: .8; margin-left: 4px; }
.kIk { grid-area: ik; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, hsl(var(--h, 200) 80% 75%), hsl(var(--h, 200) 60% 35%) 60%, #050716); box-shadow: 0 0 10px hsl(var(--h, 200) 80% 50% / .4); display: grid; place-items: center; font-size: 1.2rem; }
.kIk.cel { background: rgba(255, 90, 110, .14); box-shadow: none; }
.kIk.duza { width: 46px; height: 46px; }
.kIk.gildiaKolo { background: var(--g); box-shadow: 0 0 12px var(--g); }
.blokada { color: var(--przygaszony); font-size: .8rem; }
.kontrakt { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; margin: 10px 0; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--zolty); background: rgba(255, 204, 77, .08); }
.kontrakt > span { font-size: 1.4rem; }
.kontrakt div { display: flex; flex-direction: column; min-width: 0; }
.kontraktMaly { margin: 6px 0; font-size: .88rem; color: var(--zolty); }
.zasadzka { border-color: var(--roz); }
.gildiaZnak { display: inline-block; padding: 0 .45em; border-radius: 6px; border: 1px solid var(--g); color: var(--g); font-size: .75rem; line-height: 1.5; white-space: nowrap; }
.gildiaKarta { background: rgba(17, 23, 58, .92); border: 1px solid var(--g); border-left: 6px solid var(--g); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.gildiaKarta b { font-family: var(--naglowek); color: var(--g); font-size: 1.1rem; }
.czlonkowie, .obrot { list-style: none; padding: 0; display: grid; gap: 6px; }
.czlonkowie li, .obrot li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: rgba(17, 23, 58, .9); border: 1px solid var(--ramka); border-radius: 10px; padding: 6px 10px; }
.czlonkowie li small, .obrot li small { flex: 1 1 100%; }
.czlonkowie li .btn { margin-left: auto; }
.czat.krotki { height: 34vh; }
.barwy { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.barwa input { position: absolute; opacity: 0; }
.barwa i { display: block; width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.barwa input:checked + i { border-color: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, .6); }
.kolKarta { background: rgba(17, 23, 58, .92); border: 1px solid var(--zielony); border-radius: var(--r); padding: 12px; margin-bottom: 8px; display: grid; gap: 8px; }
.kolGora { display: flex; gap: 10px; align-items: center; }
.kolGora div { display: flex; flex-direction: column; min-width: 0; }
.kolMag .pasek { height: 8px; margin-bottom: 2px; }
.kolUl, .kolAkcje { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kolAkcje .wybor { flex: 1 1 160px; min-height: 44px; background: #0a0f2a; color: var(--tekst); border: 1.5px solid var(--ramka); border-radius: 12px; padding: 0 .6em; font: inherit; }
.tarczeBtn { display: flex; flex-direction: column; gap: 4px; }
.raporty { list-style: none; padding: 0; display: grid; gap: 6px; text-align: left; }
.raporty li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; background: rgba(17, 23, 58, .9); border: 1px solid var(--ramka); border-radius: 10px; padding: 8px 10px; }
.raporty.kronika li { grid-template-columns: 1fr; }
.raporty li.plus { color: inherit; border-color: rgba(109, 255, 138, .5); }
.raporty li p { margin: 0 0 2px; }
.raporty li .btn { margin-top: 6px; }
.zakladki { display: flex; gap: 6px; margin-bottom: 10px; }
.licznikNowych { font-style: normal; background: var(--czerwony); color: #fff; border-radius: 999px; padding: 0 .5em; font-size: .75rem; }
.odliczanie { font-size: .9rem; color: var(--zolty); border: 1px solid var(--zolty); border-radius: 8px; padding: 0 .4em; vertical-align: middle; }
.zasadyPvp { margin-top: 14px; background: rgba(17, 23, 58, .7); border: 1px solid var(--ramka); border-radius: 12px; padding: 8px 12px; font-size: .88rem; }
.zasadyPvp summary { cursor: pointer; color: var(--cyjan); min-height: 32px; display: flex; align-items: center; }
.gildiaPierscien { fill: none; stroke-width: 1.1; stroke-dasharray: 2 1.2; opacity: .95; }
.kolKropka { stroke: #cfd6ff; stroke-width: .35; }
.kolKropka.wzor { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1px solid #cfd6ff; vertical-align: middle; }
.mapaZnak { font-size: 4px; pointer-events: none; }
.trasaTransportu { stroke: rgba(255, 154, 138, .55); stroke-width: .45; stroke-dasharray: 1.2 1.2; }
.trasaTransportu.moj { stroke: rgba(109, 255, 138, .6); }
.transport { fill: #ff9a8a; } .transport.moj { fill: var(--zielony); }
.kolonia .kIk.cel { display: flex; align-items: center; justify-content: center; line-height: 1; font-size: 1.25rem; padding: 0; text-indent: 0; }

/* rosnąca galaktyka (25.11.2026): duża mapa z sektorami — napisy rosną o --k; mgła niezbadanych sektorów */
.mapaSvg.duza .nazwa { font-size: calc(3.5px * var(--k)); stroke-width: calc(.9px * var(--k)); }
.mapaSvg.duza .ikonaRodzaju, .mapaSvg.duza .gracze { font-size: calc(3px * var(--k)); }
.mapaSvg.duza .zyskZnak { font-size: calc(3.1px * var(--k)); stroke-width: calc(.8px * var(--k)); }
.mapaSvg.duza .mapaZnak { font-size: calc(4px * var(--k)); }
.mapaSvg.duza .zasieg, .mapaSvg.duza .trasa { stroke-width: calc(.5px * var(--k)); }
.mapaSvg .mgla { cursor: pointer; }
.mapaSvg .mglaKolo { fill: rgba(180, 140, 255, .10); stroke: rgba(180, 140, 255, .45); stroke-width: .5; stroke-dasharray: 2 1.6; }
.mapaSvg .mglaKleb { fill: rgba(200, 180, 255, .10); animation: mglaPlywa 7s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.mapaSvg .mglaKleb + .mglaKleb { animation-duration: 9s; animation-direction: alternate-reverse; }
.mapaSvg .mglaZnak { fill: rgba(220, 200, 255, .85); text-anchor: middle; font-weight: 700; pointer-events: none; }
.mapaSvg .mgla.zamknieta .mglaKolo { fill: rgba(120, 130, 170, .07); stroke: rgba(150, 160, 200, .35); }
.mapaSvg .mgla.wybranaM .mglaKolo { stroke: var(--zolty); stroke-dasharray: none; }
.mapaSvg .sektorNapis { fill: rgba(200, 180, 255, .55); text-anchor: middle; font-family: 'Rubik', sans-serif; font-weight: 600; pointer-events: none; }
.mapaSvg .daleka .nazwa { fill: #d9c8ff; }
@keyframes mglaPlywa { from { transform: translate(-1.5px, 0) scale(1); } to { transform: translate(1.5px, -1px) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .mapaSvg .mglaKleb { animation: none; } }
.sektorKarta h3 { margin: 0 0 6px; }
.kartaStacji .daleka { color: #d9c8ff; }

/* planeta kolonii (krok 2, 25.11.2026): horyzont z siatką pól, budynki, zasoby, budowa */
.plGora { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.plGora h2 { margin: 0; font-size: 1.15rem; }
.plGora small { color: var(--przygaszony); }
.planetaRamka { border-radius: 18px; overflow: hidden; border: 1px solid var(--ramka); box-shadow: 0 0 30px rgba(60, 240, 255, .08); }
.planetaWidok { display: block; width: 100%; height: auto; max-height: 56vh; }
.planetaWidok .pole { cursor: pointer; }
.planetaWidok .kafel { fill: rgba(6, 8, 24, .35); stroke: rgba(207, 214, 255, .35); stroke-width: 1.2; transition: fill .2s; }
.planetaWidok .pole:hover .kafel, .planetaWidok .pole:focus .kafel { fill: rgba(60, 240, 255, .12); }
.planetaWidok .pole.wybrane .kafel { stroke: var(--zolty) !important; stroke-width: 2.4; fill: rgba(255, 204, 77, .14); }
.planetaWidok .plus { fill: rgba(207, 214, 255, .45); text-anchor: middle; font-family: 'Rubik', sans-serif; pointer-events: none; }
.planetaWidok .poziomKolo { fill: #0b0f2a; stroke: var(--zolty); stroke-width: 1; }
.planetaWidok .poziomTxt { fill: var(--zolty); text-anchor: middle; font-weight: 700; font-family: 'Rubik', sans-serif; pointer-events: none; }
.zasobyPl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.zasob { background: rgba(17, 23, 58, .9); border: 1px solid var(--ramka); border-radius: 12px; padding: 6px 8px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.zasob b { font-size: 1.05rem; }
.zasob small { font-size: .72rem; color: var(--przygaszony); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zasob.zly { border-color: var(--czerwony); }
.zasob.zly small { color: var(--czerwony); }
@media (max-width: 520px) { .zasobyPl { grid-template-columns: repeat(2, 1fr); } }
.budowaPasek { background: rgba(255, 204, 77, .08); border: 1px solid rgba(255, 204, 77, .4); border-radius: 12px; padding: 8px 10px; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.budowaPasek .kPrz { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.budynekKarta { background: rgba(17, 23, 58, .92); border: 1px solid var(--ramka); border-left: 4px solid var(--b, var(--ramka)); border-radius: 14px; padding: 10px 12px; margin: 10px 0; }
.bkGora { display: flex; gap: 10px; align-items: center; }
.bkGora small { display: block; color: var(--przygaszony); }
.bkIk { width: 46px; height: 46px; flex: none; }
.budynkiLista { display: grid; gap: 4px; }
@media (min-width: 820px) { .budynkiLista { grid-template-columns: 1fr 1fr; gap: 0 10px; } }
.transportPl { display: flex; flex-direction: column; gap: 6px; }
.transportPl .chk { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.transportPl .ileSur { width: 90px; padding: .35em .5em; border-radius: 8px; border: 1px solid var(--ramka); background: rgba(6, 8, 24, .6); color: var(--tekst); }
.linkPlanety { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.kIk[data-planeta] { cursor: pointer; }
.transportPl .chk span { white-space: nowrap; }
/* podbój (krok 3) */
.oblezenie { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.oblezenie .pasek { flex: 1; }
.kolonia .kPrz .btn + .btn { margin-top: 4px; }

/* ===================== 27.11.2026: liczba graczy (jak w Star Manor) + wygląd dopasowany do ekranu + mapa na cały ekran ===================== */
/* licznik graczy w HUD: ● w grze teraz · 👥 wszyscy · niebieska 4 h / pomarańczowa 12 h / czerwona dłużej */
.hudGora .kto { flex: 1 1 auto; }
.hudGora .kto b, .hudGora .kto small { max-width: 100%; }
.hudGora .diamenty { flex: none; }
.graczeHud { display: flex; align-items: center; gap: 7px; flex: none; min-height: 40px; padding: 3px 10px 3px 4px; border-radius: 999px; border: 1px solid var(--ramka); background: rgba(17, 23, 58, .85);
  cursor: pointer; font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--tekst); }
.graczeHud:hover { border-color: var(--cyjan); }
.graczeHud .onl { display: flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px; background: rgba(22, 163, 74, .18); border: 1px solid rgba(74, 222, 128, .45); }
.graczeHud .wsz b { margin-left: 3px; }
.graczeHud .akt { display: flex; gap: 8px; }
.onlineKropka { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .25); flex: none; }
.akKr { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.kr { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; font-style: normal; }
.kr.niebieska { background: #3b82f6; } .kr.pomaranczowa { background: #f59e0b; } .kr.czerwona { background: #ef4444; }
.graczeLista li { align-items: center; }
.graczeLista li span { display: flex; align-items: center; gap: 8px; }
@media (max-width: 620px) { .graczeHud .akt { display: none; } .graczeHud { gap: 5px; padding-right: 8px; } }
@media (max-width: 420px) { .kto svg { width: 42px; height: auto; } .hudGora { gap: 6px; } .graczeHud .onl { padding: 2px 7px 2px 5px; } .diamenty { padding-left: .6em; } }
@media (max-width: 350px) { .graczeHud .wsz { display: none; } }

/* mapa: przycisk „na cały ekran” w rogu ramki */
.mapaRamka { position: relative; }
.mapaPelnaBtn { position: absolute; top: 8px; left: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--ramka); background: rgba(8, 11, 32, .86); color: var(--cyjan); cursor: pointer; font-size: .82rem; font-weight: 600; backdrop-filter: blur(4px); }
.mapaPelnaBtn > span:first-child { font-size: 1.25rem; line-height: 1; }
.mapaPelnaBtn:hover { border-color: var(--cyjan); }
@media (max-width: 480px) { .mapaPelnaBtn .mpNapis { display: none; } .mapaPelnaBtn { padding: 0; justify-content: center; } }
#boczna .mapaPelnaBtn .mpNapis { display: none; }
#boczna .mapaPelnaBtn { padding: 0; justify-content: center; }

/* komputer: zakładka Mapa na całą szerokość — mapa po lewej, karta stacji po prawej (bez pustej połowy ekranu) */
@media (min-width: 1000px) {
  body[data-ekran="mapa"] #uklad { grid-template-columns: minmax(0, 1fr); }
  body[data-ekran="mapa"] .mapaUklad { display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 28vw, 420px); gap: 16px; align-items: start; }
  body[data-ekran="mapa"] .mapaUklad .mapaSvg { max-height: calc(100dvh - var(--hudH, 150px) - 140px); min-height: 320px; }
  body[data-ekran="mapa"] .mapaBok { position: sticky; top: calc(var(--hudH, 150px) + 12px); max-height: calc(100dvh - var(--hudH, 150px) - 130px); overflow: auto; }
  body[data-ekran="mapa"] .mapaBok .kartaStacji { margin-top: 0; }
  #boczna { top: calc(var(--hudH, 150px) + 12px); max-height: calc(100dvh - var(--hudH, 150px) - 110px); overflow: auto; }
  #boczna .mapaSvg { max-height: max(260px, calc(100dvh - var(--hudH, 150px) - 380px)); }
  /* rynek w jednym wierszu: ikona · nazwa · ceny · przyciski — mniej przewijania */
  .towar { grid-template-columns: 44px minmax(0, 1fr) auto minmax(150px, auto); grid-template-areas: "ik opis ceny przyc"; }
  .towar.zablokowany { grid-template-areas: "ik opis opis opis"; }
}
/* szeroki ekran: szerszy układ zamiast pustych pasów po bokach */
@media (min-width: 1400px) {
  .hudGora, .hudLiczniki, .hudRanga, #uklad { max-width: 1360px; }
  #uklad { grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 24px; }
}
@media (min-width: 1800px) {
  .hudGora, .hudLiczniki, .hudRanga, #uklad { max-width: 1600px; }
  #uklad { grid-template-columns: minmax(0, 720px) minmax(0, 1fr); }
}
/* tablet pionowo: rynek też w jednym wierszu */
@media (min-width: 640px) and (max-width: 999px) {
  .towar { grid-template-columns: 44px minmax(0, 1fr) auto minmax(140px, auto); grid-template-areas: "ik opis ceny przyc"; }
  .towar.zablokowany { grid-template-areas: "ik opis opis opis"; }
}

/* telefon poziomo (niski ekran): HUD w jednym wierszu, nawigacja jako pionowa szyna po lewej, mapa obok karty */
@media (orientation: landscape) and (max-height: 520px) {
  body.gra { padding-bottom: 0; padding-left: calc(68px + env(safe-area-inset-left)); }
  #nawigacja { top: 0; bottom: 0; left: 0; right: auto; width: calc(68px + env(safe-area-inset-left)); transform: none; border: 0; border-right: 1px solid var(--ramka); border-radius: 0;
    grid-template-columns: 1fr; grid-template-rows: repeat(5, 1fr); padding: max(4px, env(safe-area-inset-top)) 4px max(4px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left)); }
  #nawigacja button { min-height: 0; padding: 2px; font-size: .66rem; justify-content: center; }
  #nawigacja .ik { font-size: 1.25rem; }
  #nawigacja .kropka { top: 2px; right: 4px; }
  #hud { display: flex; align-items: center; gap: 8px; padding: max(4px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 4px 10px; }
  .hudGora { display: contents; }
  .hudGora .kto { order: 1; flex: 0 1 auto; max-width: 30%; }
  .kto svg { width: 38px; height: auto; }
  .kto small { font-size: .7rem; }
  .hudLiczniki { order: 2; flex: 1 1 auto; margin: 0; gap: 4px; }
  .licznik { padding: 2px 6px 3px; }
  .licznik small { font-size: .6rem; }
  .licznik b { font-size: .82rem; }
  .graczeHud { order: 3; min-height: 36px; }
  .graczeHud .akt { display: none; }
  .diamenty { order: 4; min-height: 36px; }
  .hudRanga { display: none; }
  #uklad { padding: 8px 10px; padding-right: max(10px, env(safe-area-inset-right)); }
  .stacjaKarta { padding: 6px 12px; }
  .stacjaPlaneta svg { width: 60px; height: auto; }
  .stacjaKarta h2 { font-size: 1.2rem; }
  .towar { grid-template-columns: 40px minmax(0, 1fr) auto minmax(130px, auto); grid-template-areas: "ik opis ceny przyc"; padding: 6px 10px; }
  .towar.zablokowany { grid-template-areas: "ik opis opis opis"; }
  .mapaUklad { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 40%); gap: 10px; align-items: start; }
  .mapaUklad .mapaSvg { max-height: calc(100dvh - var(--hudH, 52px) - 26px); }
  .mapaBok { max-height: calc(100dvh - var(--hudH, 52px) - 20px); overflow: auto; position: sticky; top: calc(var(--hudH, 52px) + 8px); }
  .mapaBok .kartaStacji { margin-top: 0; }
  .nakladka { padding: 8px; }
  .okno { max-height: calc(100dvh - 16px); }
  .lot { min-height: calc(100dvh - var(--hudH, 52px) - 30px); }
  .hangarStatek svg { max-height: 40dvh; width: auto; }
}

/* mapa galaktyki na cały ekran (Fullscreen API albo nakładka 100dvw × 100dvh) */
body.mapaPelnaOtwarta { overflow: hidden; }
#mapaPelna { position: fixed; inset: 0; z-index: 40; width: 100vw; height: 100vh; width: 100dvw; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: radial-gradient(circle at 50% 45%, #121a48, var(--tlo) 75%); padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.mpGora { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--ramka); background: rgba(8, 11, 32, .94); min-width: 0; }
.mpGora b { font-family: var(--naglowek); color: var(--cyjan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mpPaliwo { margin-left: auto; font-size: .85rem; color: var(--przygaszony); white-space: nowrap; }
.mpZamknij { flex: none; min-height: 44px; border-color: var(--czerwony); font-weight: 700; }
.mpTresc { min-height: 0; padding: 8px; }
.mapaUklad.wPelnej { height: 100%; display: grid; grid-template-columns: none; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; }
.wPelnej .mapaRamka { min-height: 0; height: 100%; display: flex; }
.mapaUklad.wPelnej .mapaSvg { flex: 1; width: 100%; height: 100%; max-height: none; min-height: 0; }
.mapaUklad.wPelnej .mapaBok { max-height: 36dvh; overflow: auto; position: static; }
.wPelnej .kartaStacji { margin-top: 0; }
.wPelnej .kartaStacji.pusta p { margin: .2em 0; }
.wPelnej .legenda { display: none; }
@media (max-width: 420px) { .mpGora b span { display: none; } }
@media (orientation: landscape), (min-width: 900px) {
  .mapaUklad.wPelnej { grid-template-rows: none; grid-template-columns: minmax(0, 1fr) clamp(250px, 30vw, 420px); }
  .mapaUklad.wPelnej .mapaBok { max-height: 100%; }
  .wPelnej .legenda { display: flex; }
}
@media (orientation: landscape) and (max-height: 520px) { .mpGora { padding: 3px 10px; } .mpZamknij { min-height: 38px; } .wPelnej .legenda { display: none; } }
