:root {
  color-scheme: dark;
  --tlo: #1c1f23;
  --panel: rgba(30, 33, 38, 0.92);
  --panel-2: #262a30;
  --linia: rgba(255, 255, 255, 0.09);
  --tekst: #e8e6e1;
  --tekst-2: #a7a9ad;
  --akcent: #b38e55;
  --akcent-2: #d1b07a;
  --r: 10px;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--tlo); color: var(--tekst); overflow: hidden; font-size: 14px; }
#app { position: relative; width: 100%; height: 100%; overflow: hidden; }
#scena { position: absolute; inset: 0; z-index: 0; }
#scena canvas { display: block; outline: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* pasek górny */
#pasek {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; pointer-events: none;
}
#pasek > *, .narzedzia > * { pointer-events: auto; }
.narzedzia { display: contents; }
.md hr { border: 0; border-top: 1px solid var(--linia); margin: 16px 0; }
.marka {
  display: flex; align-items: baseline; gap: 10px; padding: 8px 14px; margin-right: auto;
  background: var(--panel); border: 1px solid var(--linia); border-radius: var(--r); backdrop-filter: blur(8px);
  min-width: 0;
}
.logo { font-weight: 700; letter-spacing: 0.22em; color: var(--akcent); font-size: 15px; }
.nazwa { color: var(--tekst-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38vw; }
.grupa {
  display: flex; background: var(--panel); border: 1px solid var(--linia); border-radius: var(--r);
  padding: 3px; gap: 2px; backdrop-filter: blur(8px);
}
.grupa button {
  background: transparent; border: 0; padding: 6px 11px; border-radius: 7px; color: var(--tekst-2); font-size: 13px;
  white-space: nowrap;
}
.grupa button:hover { color: var(--tekst); background: rgba(255, 255, 255, 0.05); }
.grupa button.aktywny { color: #1c1f23; background: var(--akcent); }
#btn-ai { color: var(--akcent-2); }

/* panele */
.panel {
  position: absolute; z-index: 4; background: var(--panel); border: 1px solid var(--linia); border-radius: var(--r);
  backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); display: flex; flex-direction: column;
}
.panel .naglowek { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; gap: 8px; }
.panel h2 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0.02em; }
.panel h2 span { color: var(--tekst-2); font-weight: 400; }
.zamknij { background: none; border: 0; color: var(--tekst-2); font-size: 20px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.zamknij:hover { color: var(--tekst); background: rgba(255, 255, 255, 0.06); }
.lewy { top: 70px; left: 12px; width: 300px; bottom: 12px; }
.prawy { top: 70px; right: 12px; width: 340px; max-height: calc(100% - 82px); }
.dol-lewy { left: 12px; bottom: 12px; width: 280px; max-height: 45%; }
.lewy:not([hidden]) ~ .dol-lewy { left: 324px; }

#szukaj {
  margin: 0 14px 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--linia);
  background: var(--panel-2); color: var(--tekst); font: inherit;
}
#szukaj:focus { outline: 1px solid var(--akcent); }
#lista-maszyn, #lista-stref { list-style: none; margin: 0; padding: 0 8px 10px; overflow-y: auto; }
#lista-maszyn li {
  padding: 7px 8px; border-radius: 7px; cursor: pointer; display: grid; grid-template-columns: 10px 1fr; gap: 2px 9px; align-items: center;
}
#lista-maszyn li:hover, #lista-maszyn li.wybrana { background: rgba(179, 142, 85, 0.14); }
#lista-maszyn .kropka, #lista-stref .kropka { width: 10px; height: 10px; border-radius: 3px; }
#lista-maszyn .n { font-size: 13px; }
#lista-maszyn .t { grid-column: 2; font-size: 11.5px; color: var(--tekst-2); }
#lista-stref li { display: flex; align-items: center; gap: 9px; padding: 5px 8px; font-size: 12.5px; border-radius: 6px; cursor: pointer; }
#lista-stref li:hover { background: rgba(255, 255, 255, 0.05); }
#lista-stref li.aktywna { background: rgba(179, 142, 85, 0.18); box-shadow: inset 2px 0 0 var(--akcent); }
.etk { pointer-events: none; }
.etk .etykieta { transform-origin: 50% 100%; }
#lista-stref .pow { margin-left: auto; color: var(--tekst-2); font-variant-numeric: tabular-nums; font-size: 11.5px; }
.stopka { margin: 0; padding: 8px 14px 12px; border-top: 1px solid var(--linia); color: var(--tekst-2); font-size: 11.5px; }

#info-tresc { padding: 0 14px 14px; overflow-y: auto; }
#info-tresc .typ { color: var(--akcent-2); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 10px; }
#info-tresc dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: 13px; }
#info-tresc dt { color: var(--tekst-2); }
#info-tresc dd { margin: 0; font-variant-numeric: tabular-nums; }
#info-tresc .media { display: flex; flex-wrap: wrap; gap: 5px; }
#info-tresc .media span { font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--linia); }
#info-tresc .uwagi { font-size: 13px; line-height: 1.45; color: #cfcdc8; margin: 0; padding: 10px 12px; background: var(--panel-2); border-radius: 8px; border-left: 2px solid var(--akcent); }

/* AI */
.ai { height: calc(100% - 82px); }
#ai-rozmowa { flex: 1; overflow-y: auto; padding: 0 14px; display: flex; flex-direction: column; gap: 8px; }
.ai-wskazowka { color: var(--tekst-2); font-size: 12.5px; line-height: 1.45; }
.msg { padding: 8px 11px; border-radius: 9px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.msg.u { align-self: flex-end; background: rgba(179, 142, 85, 0.2); max-width: 85%; }
.msg.a { background: var(--panel-2); }
.msg.z { font-size: 11.5px; color: var(--akcent-2); background: transparent; padding: 2px 4px; }
.msg.b { color: #f0a0a0; }
#ai-form { display: flex; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid var(--linia); }
#ai-pole { flex: 1; resize: none; border-radius: 8px; border: 1px solid var(--linia); background: var(--panel-2); color: var(--tekst); font: inherit; padding: 8px; }
#ai-wyslij { background: var(--akcent); color: #1c1f23; border: 0; border-radius: 8px; padding: 0 14px; font-weight: 600; }
#ai-wyslij:disabled { opacity: 0.5; }

/* etykiety maszyn (CSS2D) */
.etykieta {
  font-size: 11.5px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; cursor: pointer;
  background: rgba(24, 26, 30, 0.82); color: #ecebe7; border: 1px solid rgba(255, 255, 255, 0.12);
  user-select: none; transition: opacity 0.2s; margin-bottom: 6px;
}
.etykieta:hover, .etykieta.wybrana { border-color: var(--akcent); color: #fff; }
.etykieta.suw { color: #e3c36a; }
#etykiety { position: absolute; inset: 0; pointer-events: none; }
#etykiety .etykieta { pointer-events: auto; }
#etykiety .etk { pointer-events: none !important; }
.ukryj-etykiety .etykieta:not(.wybrana), .tryb-bryla:not(.spacer) .etykieta:not(.wybrana):not(.suw) { display: none; }
.tryb-bryla .etykieta.suw { display: none; }
.etykieta.zakryta:not(.wybrana) { opacity: 0; pointer-events: none !important; }

#ladowanie {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 10; background: var(--tlo); color: var(--tekst-2);
  letter-spacing: 0.04em; transition: opacity 0.4s;
}
#ladowanie.koniec { opacity: 0; pointer-events: none; }
#podpowiedz {
  position: absolute; bottom: 14px; right: 14px; z-index: 3; font-size: 11.5px; color: var(--tekst-2);
  background: var(--panel); padding: 6px 10px; border-radius: 8px; border: 1px solid var(--linia);
}

/* wąskie ekrany */
@media (max-width: 760px) {
  #pasek { top: 8px; left: 8px; right: 8px; gap: 6px; }
  .marka { width: 100%; margin-right: 0; padding: 6px 10px; }
  .narzedzia { display: flex; gap: 6px; width: 100%; overflow-x: auto; scrollbar-width: none; pointer-events: auto; }
  .narzedzia::-webkit-scrollbar { display: none; }
  .narzedzia .grupa { flex-shrink: 0; }
  .nazwa { max-width: 60vw; }
  .grupa button { padding: 5px 8px; font-size: 12px; }
  .lewy, .prawy, .dol-lewy, .ai { left: 8px; right: 8px; width: auto; top: auto; bottom: 8px; max-height: 55%; height: auto; }
  .lewy { top: auto; height: 55%; }
  .ai { height: 60%; }
  .lewy:not([hidden]) ~ .dol-lewy { left: 8px; }
  #podpowiedz { display: none; }
}

/* ---------- iteracja 3: warianty, baner, komunikaty, historia, analiza, edycja, AI ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.marka:has(#grupa-wariant:not([hidden])) .nazwa { display: none; }
#wariant {
  background: var(--panel-2); color: var(--tekst); border: 1px solid var(--linia); border-radius: 7px;
  padding: 4px 8px; font: inherit; font-size: 13px; max-width: 230px;
}
#wariant:focus { outline: 1px solid var(--akcent); }

#baner {
  position: absolute; z-index: 6; top: 66px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; padding: 8px 10px 8px 16px; max-width: min(860px, calc(100% - 24px));
  background: rgba(30, 33, 38, 0.95); border: 1px solid var(--akcent); border-radius: 12px; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.4);
}
#baner .b-tekst { display: flex; flex-direction: column; min-width: 0; }
#baner strong { font-size: 13.5px; font-weight: 600; }
#baner span { font-size: 11.5px; color: var(--tekst-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#baner .b-akcje { display: flex; gap: 6px; flex-shrink: 0; }
#baner button, .komunikat button, .edycja-form button, .cofnij, #analiza .link, .katalog .link {
  background: var(--panel-2); border: 1px solid var(--linia); border-radius: 8px; padding: 6px 12px; font-size: 12.5px; color: var(--tekst);
}
#baner button:hover, .komunikat button:hover, .edycja-form button:hover, .cofnij:hover { border-color: var(--akcent); }
#baner button.glowny, .komunikat button.glowny { background: var(--akcent); color: #1c1f23; border-color: var(--akcent); font-weight: 600; }
#baner button:disabled { opacity: 0.45; cursor: default; }
#baner.edycja { border-color: #6fa8dc; }
#baner.pytanie { border-color: #e0a040; }
body.edycja #scena canvas { cursor: grab; }

#komunikaty { position: absolute; z-index: 9; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(520px, calc(100% - 24px)); }
.komunikat {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: start; padding: 10px 8px 10px 14px;
  background: rgba(30, 33, 38, 0.97); border: 1px solid var(--linia); border-left: 3px solid var(--akcent); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); font-size: 13px;
}
.komunikat .k-tresc p { margin: 2px 0; line-height: 1.4; }
.komunikat ul { margin: 6px 0 0; padding-left: 18px; color: #cfcdc8; font-size: 12px; max-height: 180px; overflow-y: auto; }
.komunikat .k-akcje { grid-column: 1; display: flex; gap: 6px; flex-wrap: wrap; }
.komunikat .k-akcje:empty { display: none; }
.komunikat .zamknij { grid-column: 2; grid-row: 1; }
.komunikat.ok { border-left-color: #5cb87a; }
.komunikat.ostrz { border-left-color: #e0a040; }
.komunikat.blad { border-left-color: #e05a50; }

.podpis { margin: 0 14px 8px; color: var(--tekst-2); font-size: 12px; }
#lista-historii { list-style: none; margin: 0; padding: 0 8px 12px; overflow-y: auto; }
#lista-historii li { display: grid; grid-template-columns: auto auto 1fr; gap: 2px 8px; padding: 8px; border-radius: 8px; cursor: pointer; align-items: baseline; }
#lista-historii li:hover { background: rgba(255, 255, 255, 0.05); }
#lista-historii li.podglad { background: rgba(179, 142, 85, 0.16); }
#lista-historii .w { font-weight: 600; font-variant-numeric: tabular-nums; }
#lista-historii .autor { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--panel-2); color: var(--tekst-2); }
#lista-historii .a-ai { color: #c9a8ff; }
#lista-historii .a-reczna { color: #8cc4f0; }
#lista-historii .czas { font-size: 11.5px; color: var(--tekst-2); text-align: right; }
#lista-historii .opis { grid-column: 1 / -1; font-size: 12px; color: #cfcdc8; line-height: 1.35; }
#lista-historii li.biezaca .w::after { content: ' · bieżąca'; color: var(--akcent-2); font-weight: 400; font-size: 11.5px; }
.pusta { color: var(--tekst-2); font-size: 12.5px; padding: 8px; }

#analiza { position: absolute; inset: 0; z-index: 8; background: rgba(10, 12, 14, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
#analiza .okno {
  width: min(1100px, 100%); height: 100%; max-height: 860px; display: flex; flex-direction: column; min-height: 0;
  background: #1f2227; border: 1px solid var(--linia); border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
#analiza .naglowek { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--linia); }
#analiza h2 { margin: 0; font-size: 15px; }
#analiza-tresc { flex: 1; overflow-y: auto; padding: 8px 28px 28px; }
.md { font-size: 13.5px; line-height: 1.55; color: #dedcd6; }
.md h1 { font-size: 22px; color: var(--tekst); margin: 18px 0 8px; }
.md h2 { font-size: 17px; color: var(--akcent-2); margin: 22px 0 8px; padding-top: 8px; border-top: 1px solid var(--linia); }
.md h3 { font-size: 14.5px; margin: 16px 0 6px; }
.md a { color: var(--akcent-2); }
.md code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.md pre { background: var(--panel-2); padding: 10px; border-radius: 8px; overflow-x: auto; }
.md blockquote { margin: 8px 0; padding: 4px 12px; border-left: 2px solid var(--akcent); color: var(--tekst-2); }
.md .tabela { overflow-x: auto; margin: 10px 0; border: 1px solid var(--linia); border-radius: 8px; }
.md table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.md th, .md td { padding: 6px 10px; border-bottom: 1px solid var(--linia); text-align: left; vertical-align: top; }
.md th { background: #2a2e34; position: sticky; top: 0; font-weight: 600; white-space: nowrap; }
.md tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }
.md .trafienie { outline: 2px solid var(--akcent); border-radius: 4px; }
.md p:first-child { margin-top: 0; }
.md p:last-child { margin-bottom: 0; }

.katalog { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--linia); }
.katalog h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--akcent-2); }
.katalog .k-nazwa { margin: 0 0 8px; font-size: 13px; }
.katalog .k-nazwa span { color: var(--tekst-2); font-size: 11.5px; }
.katalog dd small { color: var(--tekst-2); }
.katalog .zrodla a { color: var(--akcent-2); word-break: break-all; }
.katalog .link { margin-top: 2px; }

.edycja-form { display: flex; flex-direction: column; gap: 10px; }
.edycja-form label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--tekst-2); min-width: 0; }
.edycja-form input, .edycja-form textarea { width: 100%; }
.edycja-form input, .edycja-form textarea {
  background: var(--panel-2); color: var(--tekst); border: 1px solid var(--linia); border-radius: 7px; padding: 6px 8px; font: inherit; font-size: 13px; min-width: 0;
}
.edycja-form input:focus, .edycja-form textarea:focus { outline: 1px solid var(--akcent); }
.edycja-form .rzad3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.edycja-form .przyciski { display: flex; flex-wrap: wrap; gap: 6px; }
.edycja-form .niebezp { color: #f0a0a0; }
.edycja-form .niebezp:hover { border-color: #e05a50; }

.podpowiedzi { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
.podpowiedzi button {
  text-align: left; background: var(--panel-2); border: 1px solid var(--linia); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; color: #d6d3cc;
}
.podpowiedzi button:hover { border-color: var(--akcent); color: var(--tekst); }
.ai-wskazowka.ostrz { color: #e8b86a; }
.msg.a .md { white-space: normal; }
.msg.a .md ul, .msg.a .md ol { padding-left: 18px; margin: 6px 0; }
.msg.a .md .tabela, .msg.a .md table { font-size: 12px; }
.pracuje { color: var(--tekst-2); font-size: 12px; margin-top: 4px; display: flex; align-items: center; gap: 3px; }
.pracuje span { width: 5px; height: 5px; border-radius: 50%; background: var(--akcent); animation: puls 1s infinite ease-in-out; }
.pracuje span:nth-child(2) { animation-delay: 0.15s; }
.pracuje span:nth-child(3) { animation-delay: 0.3s; margin-right: 4px; }
@keyframes puls { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.1); } }
.zmiany { margin-top: 8px; font-size: 12px; color: var(--tekst-2); }
.zmiany summary { cursor: pointer; color: var(--akcent-2); }
.zmiany ul { margin: 6px 0 0; padding-left: 18px; }
.cofnij { margin-top: 8px; display: block; }
#ai-wyslij.przerwij { background: #8a3a34; color: #fff; }

@media (max-width: 760px) {
  #baner { top: auto; bottom: 8px; flex-direction: column; align-items: stretch; gap: 8px; }
  #baner span { white-space: normal; }
  #wariant { max-width: 52vw; }
  #analiza { padding: 6px; }
  #analiza-tresc { padding: 6px 14px 20px; }
  #komunikaty { bottom: 8px; }
}

#roza { position: absolute; z-index: 3; right: 14px; bottom: 52px; width: 56px; height: 56px; pointer-events: none; }
#roza-igla { transition: none; }
@media (max-width: 760px) { #roza { bottom: auto; top: 112px; right: 8px; width: 44px; height: 44px; } #roza svg { width: 44px; height: 44px; } }

.menu-wrap { position: relative; display: inline-flex; }
.menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 7; display: flex; flex-direction: column; min-width: 210px; padding: 4px;
  background: rgba(30, 33, 38, 0.97); border: 1px solid var(--linia); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.menu a { color: var(--tekst); text-decoration: none; padding: 8px 10px; border-radius: 7px; font-size: 13px; white-space: nowrap; }
.menu a:hover { background: rgba(179, 142, 85, 0.16); }
#bilans-tresc { padding: 0 14px 14px; overflow-y: auto; font-size: 13px; }
#bilans-tresc h3 { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--akcent-2); }
#bilans-tresc h3:first-child { margin-top: 0; }
#bilans-tresc .liczby { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#bilans-tresc .kafel { background: var(--panel-2); border: 1px solid var(--linia); border-radius: 9px; padding: 8px 10px; }
#bilans-tresc .kafel b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
#bilans-tresc .kafel span { color: var(--tekst-2); font-size: 11.5px; }
#bilans-tresc table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
#bilans-tresc td { padding: 4px 0; border-bottom: 1px solid var(--linia); }
#bilans-tresc td:last-child, #bilans-tresc td.l { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 8px; }
#bilans-tresc .problemy { list-style: none; margin: 0; padding: 0; }
#bilans-tresc .problemy li { padding: 6px 8px; border-radius: 7px; border-left: 2px solid #e0a040; margin-bottom: 4px; background: var(--panel-2); font-size: 12px; line-height: 1.35; }
#bilans-tresc .problemy li.b { border-left-color: #e05a50; }
#bilans-tresc .problemy li.klik { cursor: pointer; }
#bilans-tresc .problemy li.klik:hover { outline: 1px solid var(--akcent); }
#bilans-tresc .uwaga { color: var(--tekst-2); font-size: 11.5px; margin: 6px 0 0; }
.ok-znak { color: #5cb87a; }

#spacer-info { position: absolute; z-index: 6; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
  background: rgba(30, 33, 38, 0.92); border: 1px solid var(--akcent); border-radius: 12px; padding: 8px 10px 8px 14px; font-size: 12.5px; max-width: calc(100% - 24px); }
#spacer-info p { margin: 0; color: var(--tekst-2); }
#spacer-info b { color: var(--tekst); }
#spacer-info button { background: var(--akcent); color: #1c1f23; border: 0; border-radius: 8px; padding: 6px 12px; font-weight: 600; white-space: nowrap; }
body.spacer #podpowiedz, body.spacer #legenda { display: none; }
body.spacer #scena canvas { cursor: crosshair; }
.drazek { position: absolute; z-index: 5; width: 110px; height: 110px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: rgba(30,33,38,.35); pointer-events: none; transform: translate(-50%, -50%); }
.drazek span { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(179,142,85,.75); }
@media (max-width: 760px) { #spacer-info p { font-size: 11.5px; } }

#wycieczka { position: absolute; z-index: 6; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(620px, calc(100% - 24px));
  background: rgba(28, 31, 36, 0.95); border: 1px solid var(--akcent); border-radius: 14px; padding: 12px 16px 14px; box-shadow: 0 12px 34px rgba(0,0,0,.45); }
.w-pasek { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--tekst-2); }
.w-postep { flex: 1; height: 3px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
.w-postep i { display: block; height: 100%; width: 0; background: var(--akcent); }
#w-tytul { margin: 8px 0 4px; font-size: 16px; color: var(--akcent-2); }
#w-opis { margin: 0 0 10px; font-size: 13.5px; line-height: 1.5; color: #dedcd6; }
.w-akcje { display: flex; gap: 6px; flex-wrap: wrap; }
.w-akcje button { background: var(--panel-2); border: 1px solid var(--linia); border-radius: 8px; padding: 6px 12px; font-size: 12.5px; color: var(--tekst); }
.w-akcje button.glowny { background: var(--akcent); color: #1c1f23; border-color: var(--akcent); font-weight: 600; }
.w-akcje #w-koniec { margin-left: auto; }
body.wycieczka #legenda, body.wycieczka #podpowiedz, body.wycieczka #komunikaty { display: none; }
.mini-panel { position: absolute; z-index: 4; right: 14px; bottom: 118px; background: var(--panel); border: 1px solid var(--linia); border-radius: 10px;
  padding: 10px 12px; font-size: 12.5px; backdrop-filter: blur(8px); box-shadow: 0 8px 22px rgba(0,0,0,.3); }
.mini-panel h4 { margin: 0 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--akcent-2); }
.mini-panel .poz { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.mini-panel .kol { width: 22px; height: 5px; border-radius: 3px; }
#legenda-przeplyw { bottom: 118px; right: 14px; }
#legenda-media:not([hidden]) ~ #legenda-przeplyw { bottom: 290px; }
#przekroj-panel { left: 50%; right: auto; transform: translateX(-50%); bottom: 16px; width: min(520px, calc(100% - 24px)); }
#przekroj-panel label { display: block; margin-bottom: 6px; color: var(--tekst-2); }
#przekroj-panel b { color: var(--tekst); }
#przekroj-x { width: 100%; accent-color: #b38e55; }
#miarka-info { left: 50%; right: auto; transform: translateX(-50%); bottom: 16px; }
body.miarka #scena canvas { cursor: crosshair; }
.etk-miara { background: #b38e55; color: #1c1f23; font-weight: 700; font-size: 12.5px; padding: 3px 9px; border-radius: 7px; white-space: nowrap; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.etk-wys { background: rgba(24,26,30,.9); color: #f3dcae; border: 1px solid #b38e55; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
@media (max-width: 760px) { .mini-panel { right: 8px; bottom: 64px; } #wycieczka { bottom: 8px; padding: 10px 12px; } #w-opis { font-size: 12.5px; } }
