/* Revive — styl wg plakatu: jasny „lodowy” błękit, głęboki morski turkus, białe szklane karty */
:root {
  --tlo: #e7f3f4;
  --tlo-jasne: #f7fbfb;
  --szklo: rgba(255, 255, 255, .74);
  --szklo-mocne: rgba(255, 255, 255, .92);
  --obrys: rgba(15, 107, 111, .14);
  --obrys-jasny: rgba(255, 255, 255, .9);
  --morski: #0f6b6f;
  --morski-ciemny: #0a4c52;
  --morski-glebia: #082f35;
  --aqua: #2bb3b1;
  --aqua-jasna: #8fe0da;
  --tekst: #0f2a33;
  --tekst-2: #48646d;
  --tekst-3: #7b949b;
  --plus: #13827f;
  --minus: #c9822e;
  --cien: 0 10px 30px rgba(10, 76, 82, .10), 0 2px 6px rgba(10, 76, 82, .06);
  --cien-maly: 0 2px 8px rgba(10, 76, 82, .08);
  --promien: 16px;
  --promien-maly: 10px;
  --font-tytul: "Montserrat", system-ui, sans-serif;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wys-gora: 64px;
  --szer-bok: 232px;
  --dol: 0px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.45 var(--font);
  color: var(--tekst);
  background:
    radial-gradient(1200px 520px at 70% -120px, rgba(43, 179, 177, .28), transparent 70%),
    radial-gradient(900px 480px at -10% 10%, rgba(143, 224, 218, .35), transparent 70%),
    linear-gradient(180deg, #dff0f2 0%, var(--tlo) 40%, var(--tlo-jasne) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 20px; height: 20px; flex: none; }
[hidden] { display: none !important; }

/* ---------- szkielet ---------- */
.app { display: flex; height: 100dvh; }
.kolumna { flex: 1; min-width: 0; display: flex; flex-direction: column; }
main { flex: 1; min-height: 0; overflow: auto; padding: 14px 18px calc(14px + var(--dol)); }

/* ---------- logo ---------- */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--morski-ciemny); flex: none; }
.logo-trio { display: inline-flex; color: var(--morski); }
.logo-trio svg { width: 26px; height: 26px; margin-right: -3px; }
.logo-trio svg:nth-child(2) { transform: translateY(-3px) scale(1.12); color: var(--morski-ciemny); }
.logo-trio.duze svg { width: 48px; height: 48px; margin-right: -4px; }
.logo-tekst {
  font: italic 900 22px/1 var(--font-tytul); letter-spacing: .02em;
  background: linear-gradient(180deg, var(--morski-ciemny), var(--morski) 60%, var(--aqua));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- nawigacja (wspólne pozycje) ---------- */
.nav-poz {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 999px;
  color: var(--tekst-2); text-decoration: none; font-weight: 600; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-poz:hover { color: var(--morski-ciemny); background: rgba(255, 255, 255, .6); }
.nav-poz.aktywna { color: #fff; background: linear-gradient(180deg, var(--morski), var(--morski-ciemny)); box-shadow: 0 6px 16px rgba(10, 76, 82, .25); }
.nav-poz .wkrotce { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--tekst-3); }
.nav-poz.aktywna .wkrotce { color: var(--aqua-jasna); }

/* ---------- WARIANT A: zakładki u góry ---------- */
.gora {
  height: var(--wys-gora); flex: none; display: flex; align-items: center; gap: 18px; padding: 0 18px;
  background: var(--szklo); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--obrys-jasny); box-shadow: var(--cien-maly); position: relative; z-index: 5;
}
.gora-nav { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.gora-nav::-webkit-scrollbar { display: none; }
.gora-nav .nav-poz svg, .gora-nav .wkrotce { display: none; }
.gora-prawa { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tytul-widoku { display: none; margin: 0; font: 800 18px/1 var(--font-tytul); color: var(--morski-glebia); }

/* ---------- WARIANT B: panel boczny ---------- */
.bok {
  width: var(--szer-bok); flex: none; display: none; flex-direction: column; gap: 22px; padding: 20px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .55));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-right: 1px solid var(--obrys-jasny); box-shadow: var(--cien-maly); z-index: 6;
}
.bok .logo { padding: 2px 8px 6px; }
.bok-nav { display: flex; flex-direction: column; gap: 4px; }
.bok-nav .nav-poz { border-radius: 12px; padding: 11px 14px; }
.bok-nav .nav-poz .wkrotce { margin-left: auto; }
.bok-stopka { margin-top: auto; }
.bok-stopka .konto-chip { width: 100%; justify-content: flex-start; }
.dol-nav { display: none; }

body[data-uklad="bok"] .bok { display: flex; }
body[data-uklad="bok"] .gora .logo,
body[data-uklad="bok"] .gora-nav,
body[data-uklad="bok"] .tylko-gora { display: none; }
body[data-uklad="bok"] .tytul-widoku { display: block; }
body[data-uklad="bok"] .gora { background: transparent; box-shadow: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ---------- przyciski ---------- */
.przycisk, .przycisk-ikona {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--obrys); background: var(--szklo-mocne);
  color: var(--morski-ciemny); font-weight: 600; box-shadow: var(--cien-maly); transition: transform .1s, background .15s, border-color .15s;
}
.przycisk-ikona { padding: 0 10px; }
.przycisk:hover, .przycisk-ikona:hover { border-color: rgba(15, 107, 111, .35); }
.przycisk:active, .przycisk-ikona:active { transform: translateY(1px); }
.przycisk:disabled { opacity: .5; cursor: default; }
.przycisk.glowny { background: linear-gradient(180deg, var(--morski), var(--morski-ciemny)); color: #fff; border-color: transparent; }
.przycisk.przelacznik.wl { background: linear-gradient(180deg, var(--morski), var(--morski-ciemny)); color: #fff; border-color: transparent; }
.przycisk-ikona span { font-size: 13px; }

.konto-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 5px; border-radius: 999px;
  border: 1px solid var(--obrys); background: var(--szklo-mocne); font-weight: 600; color: var(--morski-ciemny); box-shadow: var(--cien-maly);
}
.konto-chip .awatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 12px var(--font-tytul);
  background: linear-gradient(180deg, var(--aqua), var(--morski-ciemny));
}
.konto-chip .rola { font-size: 10px; font-weight: 600; color: var(--aqua); text-transform: uppercase; letter-spacing: .06em; }

.live-znak {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .8); border: 1px solid var(--obrys); font-size: 12px; font-weight: 600; color: var(--tekst-2); white-space: nowrap;
}
.live-znak i { width: 8px; height: 8px; border-radius: 50%; background: #b9c7ca; }
.live-znak.ok i { background: var(--aqua); box-shadow: 0 0 0 0 rgba(43, 179, 177, .6); animation: puls 1.6s infinite; }
.live-znak.blad i { background: #d9534f; }
@keyframes puls { 70% { box-shadow: 0 0 0 7px rgba(43, 179, 177, 0); } 100% { box-shadow: 0 0 0 0 rgba(43, 179, 177, 0); } }

/* ---------- widok wykresu ---------- */
#widok-wykres { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 420px; }
.pasek-wykresu {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 10px; border-radius: var(--promien);
  background: var(--szklo); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--obrys-jasny); box-shadow: var(--cien);
}
.instrument { position: relative; display: flex; align-items: center; gap: 14px; }
.instrument-wybor {
  display: flex; align-items: baseline; gap: 8px; border: 0; background: transparent; padding: 4px 6px; border-radius: 10px;
}
.instrument-wybor:hover { background: rgba(15, 107, 111, .06); }
.instrument-sym { font: italic 900 20px/1 var(--font-tytul); color: var(--morski-glebia); }
.instrument-nazwa { color: var(--tekst-3); font-weight: 500; font-size: 13px; }
.strzalka { width: 12px; height: 12px; align-self: center; color: var(--tekst-3); }
.instrument-cena { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.instrument-cena b { font: 700 17px/1 var(--font-tytul); color: var(--tekst); transition: color .3s; }
.instrument-cena b.w-gore { color: var(--plus); }
.instrument-cena b.w-dol { color: var(--minus); }
.instrument-cena span { font-size: 12px; font-weight: 600; }
.instrument-cena span.plus { color: var(--plus); }
.instrument-cena span.minus { color: var(--minus); }

.lista-instrumentow, .menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; min-width: 250px; max-height: min(60vh, 420px); overflow: auto;
  padding: 6px; border-radius: 14px; background: var(--szklo-mocne); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--obrys); box-shadow: 0 18px 40px rgba(10, 76, 82, .18);
}
.lista-instrumentow button, .menu label {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; text-align: left;
}
.lista-instrumentow button:hover, .menu label:hover { background: rgba(15, 107, 111, .07); }
.lista-instrumentow button.aktywny { background: rgba(43, 179, 177, .14); }
.lista-instrumentow b { font: 800 13px var(--font-tytul); color: var(--morski-glebia); min-width: 64px; }
.lista-instrumentow span { color: var(--tekst-2); }
.menu { left: auto; right: 0; min-width: 220px; }
.menu h4 { margin: 8px 10px 4px; font: 700 10px var(--font-tytul); text-transform: uppercase; letter-spacing: .1em; color: var(--tekst-3); }
.menu input { accent-color: var(--morski); width: 16px; height: 16px; }
.menu label span { flex: 1; font-weight: 500; }
.menu label small { color: var(--tekst-3); }

.interwaly { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(15, 107, 111, .07); }
.interwaly button {
  border: 0; background: transparent; padding: 6px 11px; border-radius: 999px; font: 700 12px var(--font-tytul); color: var(--tekst-2);
}
.interwaly button.aktywny { background: #fff; color: var(--morski-ciemny); box-shadow: var(--cien-maly); }
.pasek-prawa { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.rozwijane { position: relative; }

.obszar-wykresu { flex: 1; min-height: 0; display: flex; gap: 10px; }
.narzedzia {
  display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: var(--promien);
  background: var(--szklo); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--obrys-jasny); box-shadow: var(--cien); overflow-y: auto; scrollbar-width: none;
}
.narzedzia::-webkit-scrollbar { display: none; }
.narzedzia button {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--tekst-2);
}
.narzedzia button:hover { background: rgba(15, 107, 111, .08); color: var(--morski-ciemny); }
.narzedzia button.aktywny { background: linear-gradient(180deg, var(--morski), var(--morski-ciemny)); color: #fff; }
.narzedzia button.wl { color: var(--aqua); background: rgba(43, 179, 177, .12); }
.narzedzia hr { width: 70%; border: 0; border-top: 1px solid var(--obrys); margin: 4px auto; }

.wykres-ramka {
  position: relative; flex: 1; min-width: 0; border-radius: var(--promien); overflow: hidden;
  background: radial-gradient(900px 400px at 80% 0%, #0f4048, #0a2c33 60%, #08242a);
  border: 1px solid rgba(15, 107, 111, .35); box-shadow: 0 16px 40px rgba(8, 47, 53, .28);
}
body[data-wykres="jasny"] .wykres-ramka { background: #fbfefe; border-color: var(--obrys); box-shadow: var(--cien); }
#wykres { position: absolute; inset: 0; }
.wykres-znak { position: absolute; right: 74px; bottom: 34px; pointer-events: none; color: #8fe0da; opacity: .06; }
.wykres-znak svg { width: 170px; height: 170px; }
body[data-wykres="jasny"] .wykres-znak { color: var(--morski); opacity: .05; }
.wczytywanie { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8, 36, 42, .35); opacity: 0; pointer-events: none; transition: opacity .2s; }
.wczytywanie.wl { opacity: 1; }
.wczytywanie span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(143, 224, 218, .25); border-top-color: var(--aqua-jasna); animation: obrot .8s linear infinite; }
@keyframes obrot { to { transform: rotate(360deg); } }

.pasek-stanu { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0 6px; font-size: 12px; color: var(--tekst-2); }
.pasek-stanu em { font-style: normal; font: 700 10px var(--font-tytul); text-transform: uppercase; letter-spacing: .08em; color: var(--tekst-3); margin-right: 4px; }
.pasek-stanu b { font-weight: 600; color: var(--morski-ciemny); }
.stan-rysunki { margin-left: auto; }

/* ---------- pozostałe widoki ---------- */
.naglowek-widoku {
  display: flex; align-items: center; gap: 22px; padding: 26px 28px; border-radius: 22px; margin-bottom: 16px;
  background: linear-gradient(120deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .55));
  border: 1px solid var(--obrys-jasny); box-shadow: var(--cien);
}
.naglowek-widoku .maskotka { width: 86px; height: 86px; color: var(--morski); flex: none; }
.naglowek-widoku h2 { margin: 2px 0 6px; font: italic 900 34px/1 var(--font-tytul); color: var(--morski-glebia); }
.naglowek-widoku p { margin: 0; color: var(--tekst-2); max-width: 620px; }
.etykieta { font: 700 11px var(--font-tytul) !important; text-transform: uppercase; letter-spacing: .14em; color: var(--aqua) !important; }
.karty { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.karta {
  position: relative; padding: 20px; border-radius: var(--promien); background: var(--szklo); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--obrys-jasny); box-shadow: var(--cien);
}
.karta.szeroka { grid-column: 1 / -1; }
.karta h3 { margin: 0 0 6px; font: 800 17px var(--font-tytul); color: var(--morski-glebia); }
.karta p { margin: 0 0 14px; color: var(--tekst-2); }
.odznaka { display: inline-block; padding: 4px 10px; border-radius: 999px; font: 700 11px var(--font-tytul); color: var(--morski); background: rgba(43, 179, 177, .14); }

/* ---------- okno logowania ---------- */
.okno { border: 0; padding: 0; border-radius: 22px; background: transparent; max-width: min(420px, calc(100vw - 32px)); }
.okno::backdrop { background: rgba(8, 47, 53, .35); backdrop-filter: blur(4px); }
.okno-tresc { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px; text-align: center; background: var(--szklo-mocne); border-radius: 22px; box-shadow: 0 30px 60px rgba(8, 47, 53, .3); }
.okno-tresc h2 { margin: 6px 0 0; font: italic 900 26px var(--font-tytul); color: var(--morski-glebia); }
.okno-tresc p { margin: 0; color: var(--tekst-2); font-size: 13px; }
.okno-tresc input { width: 100%; height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--obrys); background: #fff; font: 500 15px var(--font); color: var(--tekst); }
.okno-tresc input:focus { outline: 2px solid var(--aqua); outline-offset: 1px; }
.okno-przyciski { display: flex; gap: 10px; width: 100%; }
.okno-przyciski .przycisk { flex: 1; height: 42px; }

.toast {
  position: fixed; left: 50%; bottom: calc(22px + var(--dol)); transform: translateX(-50%); z-index: 50; padding: 10px 18px; border-radius: 999px;
  background: var(--morski-glebia); color: #fff; font-weight: 500; box-shadow: 0 12px 30px rgba(8, 47, 53, .35); max-width: calc(100vw - 32px);
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  :root { --szer-bok: 76px; }
  .bok { padding: 18px 10px; align-items: center; }
  .bok .logo-tekst, .bok-nav .nav-poz span, .bok-nav .wkrotce, .bok-stopka .konto-chip span:not(.awatar) { display: none; }
  .bok .logo-trio svg { width: 20px; height: 20px; }
  .bok-nav .nav-poz { justify-content: center; padding: 11px; }
  .bok-stopka .konto-chip { padding: 0 5px; width: auto; }
  [data-zmien-uklad] span { display: none; }
}

/* ---------- telefon ---------- */
@media (max-width: 760px) {
  :root { --wys-gora: 56px; }
  main { padding: 10px 10px calc(10px + var(--dol)); }
  .gora { gap: 10px; padding: 0 12px; }
  .logo-tekst { font-size: 19px; }
  .logo-trio svg { width: 22px; height: 22px; }
  .live-znak b { display: none; }
  .live-znak { padding: 0 9px; }
  .konto-chip { padding: 0 4px; }
  .konto-chip span:not(.awatar) { display: none; }

  /* wariant A na telefonie: zakładki jako przewijany pasek pod nagłówkiem */
  body[data-uklad="gora"] .gora { flex-wrap: wrap; height: auto; padding-top: 8px; row-gap: 6px; }
  body[data-uklad="gora"] .gora-nav { order: 3; flex-basis: 100%; padding-bottom: 8px; }
  body[data-uklad="gora"] .gora-nav .nav-poz { padding: 7px 13px; font-size: 13px; }

  /* wariant B na telefonie: panel boczny zamienia się w dolny pasek */
  body[data-uklad="bok"] { --dol: calc(64px + env(safe-area-inset-bottom)); }
  body[data-uklad="bok"] .bok { display: none; }
  body[data-uklad="bok"] .gora .logo { display: flex; }
  body[data-uklad="bok"] .tytul-widoku { display: none; }
  body[data-uklad="bok"] .tylko-gora { display: inline-flex; }
  body[data-uklad="bok"] .dol-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: var(--dol); padding: 6px 6px env(safe-area-inset-bottom);
    background: var(--szklo-mocne); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--obrys); box-shadow: 0 -6px 20px rgba(10, 76, 82, .08);
  }
  .dol-nav .nav-poz { flex: 1; flex-direction: column; gap: 3px; padding: 6px 2px; border-radius: 12px; font-size: 11px; justify-content: center; }
  .dol-nav .nav-poz svg { width: 22px; height: 22px; }
  .dol-nav .nav-poz.aktywna { box-shadow: none; }
  .dol-nav .wkrotce { display: none; }

  #widok-wykres { gap: 8px; min-height: 0; }
  .pasek-wykresu { gap: 8px; padding: 8px; }
  .instrument { flex: 1; min-width: 0; flex-direction: column; align-items: flex-start; gap: 2px; }
  .instrument-wybor { padding: 2px 4px; }
  .instrument-cena { padding-left: 4px; }
  .instrument-nazwa { display: none; }
  .interwaly { order: 3; flex-basis: 100%; justify-content: space-between; }
  .interwaly button { flex: 1; padding: 7px 0; }
  .pasek-prawa { order: 2; margin-left: 0; }
  .pasek-prawa .przycisk span { display: none; }
  .pasek-prawa .przycisk { padding: 0 10px; }
  [data-pelny] { display: none; }

  /* narzędzia rysowania: poziomy pasek pod wykresem */
  .obszar-wykresu { flex-direction: column-reverse; gap: 8px; }
  .narzedzia { flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 4px; }
  .narzedzia hr { width: auto; height: 24px; border-top: 0; border-left: 1px solid var(--obrys); margin: auto 4px; }
  .wykres-ramka { min-height: 300px; }
  .wykres-znak { right: 56px; bottom: 30px; }
  .wykres-znak svg { width: 110px; height: 110px; }
  .pasek-stanu { gap: 4px 12px; font-size: 11px; }
  .stan-rysunki { margin-left: 0; }

  .naglowek-widoku { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; }
  .naglowek-widoku .maskotka { width: 60px; height: 60px; }
  .naglowek-widoku h2 { font-size: 28px; }
}

/* tryb pełnego ekranu wykresu */
body.pelny .gora, body.pelny .bok, body.pelny .dol-nav, body.pelny .pasek-stanu { display: none !important; }
body.pelny main { padding: 8px; }

/* =====================================================================
   v3: strona Start (plakat), narzędzia jak w TradingView, okna
   ===================================================================== */
.nav-poz > svg { width: 20px; height: 20px; }

/* ---------- START ---------- */
.widok-start { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; padding-bottom: 30px; }
.hero {
  position: relative; border-radius: 26px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(10, 76, 82, .18); background: linear-gradient(180deg, #d5ecee 0, #d5ecee 50%, var(--tlo-jasne) 100%);
}
.hero-obraz { position: relative; aspect-ratio: 1199 / 305; background: url("/static/img/maskotki.jpg") center top / cover no-repeat; }
.hero-obraz::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%;
  background: linear-gradient(180deg, rgba(213, 236, 238, 0), #d5ecee 92%);
}
.hero-tresc { position: relative; text-align: center; padding: 0 24px 34px; margin-top: -28px; display: flex; flex-direction: column; align-items: center; }
.hero-nad { margin: 0; font: 600 16px var(--font-tytul); color: var(--morski-glebia); letter-spacing: .02em; }
.hero-nad i { font-style: normal; color: var(--aqua); margin: 0 6px; }
.hero-tytul {
  margin: 4px 0 0; font: italic 900 clamp(54px, 9vw, 104px)/.9 var(--font-tytul); letter-spacing: -.01em;
  background: linear-gradient(180deg, var(--morski-glebia) 20%, var(--morski) 90%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, .6));
}
.hero-podtytul { margin: 2px 0 10px; font: italic 800 clamp(18px, 3vw, 30px) var(--font-tytul); color: var(--morski); letter-spacing: .04em; }
.hero-opis { margin: 0 0 18px; max-width: 640px; font-size: 16px; color: var(--tekst); }
.hero-przyciski { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.przycisk.duzy { height: 48px; padding: 0 26px; font-size: 15px; text-decoration: none; border-radius: 14px; }
.przycisk.duzy.glowny { box-shadow: 0 10px 24px rgba(10, 76, 82, .3); }
a.przycisk { text-decoration: none; }

.cechy { display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 0; }
.cecha { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 6px; border-left: 1px solid var(--obrys); }
.cecha:first-child { border-left: 0; }
.cecha b { font: 600 13px/1.3 var(--font); color: var(--tekst); }
.cecha-ikona { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--morski); border: 2px solid currentColor; }
.cecha-ikona svg { width: 22px; height: 22px; }
.cecha-ikona.duza { width: 58px; height: 58px; flex: none; background: rgba(43, 179, 177, .1); }
.cecha-ikona.duza svg { width: 28px; height: 28px; }
.karty-3 { grid-template-columns: repeat(3, 1fr); }
.karta-ikona { display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.karta-ikona:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(10, 76, 82, .16); }
.karta-ikona p { margin: 0; font-size: 13px; }
.podejscie { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; padding: 10px 6px; }
.podejscie-ekran {
  border-radius: 18px; padding: 14px; background: radial-gradient(500px 220px at 80% 0%, #0f4048, #0a2c33 60%, #08242a);
  box-shadow: 0 24px 50px rgba(8, 47, 53, .3); border: 6px solid #1c2b30; aspect-ratio: 16 / 9; display: flex; flex-direction: column;
}
.ekran-pasek { display: flex; gap: 10px; align-items: baseline; color: #d9eeee; margin-bottom: 6px; }
.ekran-pasek b { font: italic 900 16px var(--font-tytul); }
.ekran-pasek span { font-size: 12px; color: #93b3b8; }
.ekran-swiece { width: 100%; flex: 1; height: auto; }
.podejscie-tekst { border-left: 2px solid var(--obrys); padding-left: 28px; }
.kreska-akcent { display: block; width: 56px; height: 4px; border-radius: 4px; background: var(--morski); margin-bottom: 14px; }
.podejscie-tekst h2 { margin: 0 0 14px; font: 800 30px var(--font-tytul); color: var(--morski-glebia); }
.lista-ptaszki { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lista-ptaszki li { position: relative; padding-left: 32px; font-size: 16px; }
.lista-ptaszki li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 14px; height: 8px; border-left: 3px solid var(--morski); border-bottom: 3px solid var(--morski); transform: rotate(-45deg); }

/* ---------- pasek nad wykresem ---------- */
.pasek-srodek { display: flex; align-items: center; gap: 6px; }
.pasek-srodek .sep, .pasek-stylu .sep { width: 1px; height: 22px; background: var(--obrys); margin: 0 2px; }
.przycisk-ikona svg { width: 20px; height: 20px; }
.przycisk-ikona:disabled { opacity: .4; cursor: default; }
.przycisk-ikona.maly { height: 30px; padding: 0 9px; box-shadow: none; }
[data-typ-ikona] { display: inline-flex; }
.menu-poz { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; text-align: left; color: var(--tekst); }
.menu-poz:hover { background: rgba(15, 107, 111, .07); }
.menu-poz.aktywny { background: rgba(43, 179, 177, .14); color: var(--morski-ciemny); font-weight: 600; }
.menu-poz svg { width: 20px; height: 20px; color: var(--morski); }
.menu-poz kbd, .wysuwane kbd { margin-left: auto; font: 500 11px var(--font); color: var(--tekst-3); background: rgba(15, 107, 111, .07); padding: 2px 6px; border-radius: 5px; }
.menu-poz.niebezp { color: #c0453a; }
.menu-poz.niebezp svg { color: #c0453a; }
.rozwijane .menu { left: 0; right: auto; min-width: 220px; }

/* ---------- pasek narzędzi (grupy z wysuwanym menu) ---------- */
.narzedzia { width: 56px; align-items: center; }
.grupa { position: relative; display: flex; align-items: center; }
.narzedzia .grupa-glowny, .narzedzia .pojedynczy { width: 38px; height: 38px; }
.narzedzia button svg { width: 22px; height: 22px; }
.narzedzia .grupa-strzalka {
  position: absolute; right: -7px; top: 50%; transform: translateY(-50%); width: 10px; height: 22px; padding: 0;
  display: grid; place-items: center; border-radius: 4px; color: var(--tekst-3); opacity: .55;
}
.grupa:hover .grupa-strzalka { opacity: 1; }
.narzedzia .grupa-strzalka svg { width: 5px; height: 9px; }
.pojedynczy { position: relative; }
.pojedynczy .znaczek { position: absolute; right: 5px; bottom: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--aqua); }
.wysuwane {
  position: fixed; z-index: 60; min-width: 250px; max-height: calc(100vh - 16px); overflow: auto; padding: 6px; border-radius: 14px;
  background: var(--szklo-mocne); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--obrys);
  box-shadow: 0 18px 40px rgba(10, 76, 82, .2);
}
.wysuwane .naglowek { margin: 8px 10px 3px; font: 700 10px var(--font-tytul); text-transform: uppercase; letter-spacing: .1em; color: var(--tekst-3); }
.wysuwane button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 9px; background: transparent; text-align: left; color: var(--tekst); font-weight: 500; }
.wysuwane button:hover:not(:disabled) { background: rgba(15, 107, 111, .07); }
.wysuwane button:disabled { opacity: .4; cursor: default; }
.wysuwane button.aktywny { background: rgba(43, 179, 177, .14); color: var(--morski-ciemny); }
.wysuwane button svg { width: 22px; height: 22px; color: var(--morski); flex: none; }
.wysuwane.arkusz {
  left: 8px !important; right: 8px; bottom: calc(8px + var(--dol)); top: auto !important; min-width: 0; max-height: 62vh; border-radius: 18px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 10px;
}
.wysuwane.arkusz .naglowek, .wysuwane.arkusz .arkusz-tytul { grid-column: 1 / -1; }
.arkusz-tytul { margin: 2px 6px 6px; font: 800 15px var(--font-tytul); color: var(--morski-glebia); }
.wysuwane.arkusz button { font-size: 13px; padding: 9px 8px; }
.wysuwane.arkusz kbd { display: none; }

/* ---------- elementy na wykresie ---------- */
.podpowiedz {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 4; padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(8, 36, 42, .86); color: #d9eeee; pointer-events: none; white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis;
}
.pasek-stylu {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 4px; padding: 5px 6px; border-radius: 12px;
  background: var(--szklo-mocne); border: 1px solid var(--obrys); box-shadow: 0 12px 30px rgba(8, 47, 53, .3); max-width: calc(100% - 16px); overflow-x: auto;
}
.pasek-stylu .ps-nazwa { font: 700 12px var(--font-tytul); color: var(--morski-glebia); padding: 0 6px; white-space: nowrap; }
.pasek-stylu button { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--tekst-2); }
.pasek-stylu button:hover { background: rgba(15, 107, 111, .08); }
.pasek-stylu button.wl { color: var(--morski); background: rgba(43, 179, 177, .14); }
.pasek-stylu button svg { width: 19px; height: 19px; }
.ps-kolor i { width: 18px; height: 18px; border-radius: 5px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--obrys); }
.ps-kolor.tlo i { border-radius: 50%; }
.pasek-stylu select { height: 30px; border-radius: 8px; border: 1px solid var(--obrys); background: #fff; font: 500 12px var(--font); color: var(--tekst); padding: 0 4px; }
.paleta {
  position: fixed; z-index: 70; display: grid; grid-template-columns: repeat(6, 26px); gap: 6px; padding: 10px; border-radius: 12px;
  background: var(--szklo-mocne); border: 1px solid var(--obrys); box-shadow: 0 16px 36px rgba(8, 47, 53, .25);
}
.paleta button { width: 26px; height: 26px; border-radius: 7px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--obrys); }
.paleta-wlasny { width: 26px; height: 26px; border-radius: 7px; overflow: hidden; box-shadow: 0 0 0 1px var(--obrys); background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); cursor: pointer; }
.paleta-wlasny input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.menu-kontekst { position: absolute; min-width: 200px; top: 0; left: 0; right: auto; z-index: 8; }
.menu-tytul { padding: 6px 10px 4px; font: 700 11px var(--font-tytul); text-transform: uppercase; letter-spacing: .08em; color: var(--tekst-3); }
.do-teraz {
  position: absolute; right: 78px; bottom: 44px; z-index: 4; width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(143, 224, 218, .3);
  background: rgba(15, 107, 111, .85); color: #fff; font-size: 18px; line-height: 1; box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}
.zaslona {
  position: absolute; inset: 0; z-index: 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 20px;
  background: rgba(8, 36, 42, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #d9eeee;
}
.zaslona .logo-trio { color: var(--aqua-jasna); }
.zaslona h3 { margin: 6px 0 0; font: italic 900 24px var(--font-tytul); color: #fff; }
.zaslona p { margin: 0 0 8px; color: #a9c6ca; }

/* ---------- lista rysunków ---------- */
.lista-obiektow {
  width: 260px; flex: none; display: flex; flex-direction: column; border-radius: var(--promien); overflow: hidden;
  background: var(--szklo); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--obrys-jasny); box-shadow: var(--cien);
}
.lista-obiektow header { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 6px 14px; }
.lista-obiektow header b { font: 800 14px var(--font-tytul); color: var(--morski-glebia); }
[data-lista-obiektow-tresc] { overflow: auto; padding: 0 6px 8px; }
.obiekt { display: flex; align-items: center; gap: 2px; border-radius: 9px; }
.obiekt:hover { background: rgba(15, 107, 111, .06); }
.obiekt button { border: 0; background: transparent; height: 32px; display: grid; place-items: center; width: 28px; border-radius: 7px; color: var(--tekst-3); }
.obiekt button.wl { color: var(--morski); }
.obiekt button svg { width: 17px; height: 17px; }
.obiekt .obiekt-nazwa { flex: 1; display: flex; align-items: center; gap: 8px; width: auto; justify-content: flex-start; color: var(--tekst); font-size: 13px; text-align: left; overflow: hidden; }
.obiekt .obiekt-nazwa span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.obiekt .obiekt-nazwa svg { color: var(--morski); flex: none; }
.obiekt-sekcja { margin: 8px 8px 0; font-size: 11px; color: var(--tekst-3); }
.pusto { color: var(--tekst-3); font-size: 13px; padding: 8px; margin: 0; }

/* ---------- okna dialogowe ---------- */
.okno-szerokie { max-width: min(560px, calc(100vw - 24px)); width: 100%; }
.okno-tresc.lewo { align-items: stretch; text-align: left; gap: 10px; max-height: min(78vh, 680px); }
.okno-naglowek { display: flex; align-items: center; justify-content: space-between; }
.okno-naglowek h2 { margin: 0; font: italic 900 22px var(--font-tytul); color: var(--morski-glebia); }
.okno-tresc input[type=search] { height: 42px; }
.lista-wskaznikow, .lista-symboli { overflow: auto; margin: 0 -8px; padding: 0 8px; }
.lista-wskaznikow h4 { margin: 10px 4px 4px; font: 700 10px var(--font-tytul); text-transform: uppercase; letter-spacing: .1em; color: var(--tekst-3); }
.wsk-wiersz { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; }
.wsk-wiersz:hover { background: rgba(15, 107, 111, .06); }
.okno-tresc .wsk-wiersz input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--morski); flex: none; }
.wsk-nazwa { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.wsk-nazwa b { font: 800 13px var(--font-tytul); color: var(--morski-glebia); }
.wsk-nazwa small { color: var(--tekst-2); font-size: 12px; }
.okno-tresc .wsk-par { width: 110px; height: 32px; padding: 0 8px; font-size: 12px; border-radius: 8px; }
.lista-symboli button { display: flex; align-items: baseline; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.lista-symboli button:hover { background: rgba(15, 107, 111, .07); }
.lista-symboli button.aktywny { background: rgba(43, 179, 177, .14); }
.lista-symboli b { font: 800 14px var(--font-tytul); color: var(--morski-glebia); min-width: 80px; }
.lista-symboli span { flex: 1; color: var(--tekst-2); }
.lista-symboli small { color: var(--tekst-3); font-size: 11px; }
.zakladki-okna { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(15, 107, 111, .07); }
.zakladki-okna button { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font: 700 13px var(--font-tytul); color: var(--tekst-2); }
.zakladki-okna button.aktywna { background: #fff; color: var(--morski-ciemny); box-shadow: var(--cien-maly); }
.blad { color: #c0453a !important; font-weight: 600; }

/* ---------- tablet i telefon ---------- */
@media (max-width: 900px) {
  .karty-3 { grid-template-columns: 1fr; }
  .podejscie { grid-template-columns: 1fr; }
  .podejscie-tekst { border-left: 0; padding-left: 0; }
}
@media (max-width: 760px) {
  .hero { border-radius: 20px; }
  .hero-obraz { aspect-ratio: 2 / 1; background-size: auto 100%; background-position: 52% top; }
  .hero-tresc { padding: 0 16px 22px; margin-top: -18px; }
  .hero-opis { font-size: 14px; }
  .przycisk.duzy { height: 44px; padding: 0 18px; font-size: 14px; }
  .cechy { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
  .cecha:nth-child(3) { border-left: 0; }
  .narzedzia { width: auto; }
  .narzedzia .grupa-strzalka { display: none; }
  .pasek-srodek { order: 4; }
  .pasek-srodek .przycisk span { display: none; }
  .pasek-srodek .przycisk { padding: 0 10px; }
  .lista-obiektow { width: auto; max-height: 40vh; }
  .do-teraz { right: 60px; bottom: 40px; }
  .pasek-stylu .ps-nazwa { display: none; }
}
