/* Konfigurator altan 3D - styl (ciemny panel, akcent brązu) */
:root {
  --tlo: #0f1114;
  --panel: #15181c;
  --panel-2: #1b1f24;
  --karta: #1d2126;
  --tekst: #efe9e1;
  --tekst-2: #a9a299;
  --tekst-3: #7d776f;
  --linia: #262b31;
  --linia-2: #343a41;
  --akcent: #c8955a;
  --akcent-jasny: #ddb07a;
  --akcent-ciemny: #a8763f;
  --akcent-tlo: rgba(200, 149, 90, .12);
  --grafit: #23272c;
  --ok: #6fbf8a;
  --blad: #ef6b5e;
  --promien: 14px;
  --cien: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 30px rgba(0, 0, 0, .22);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --szer-panelu: 450px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--tekst); background: var(--tlo); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.uklad { display: grid; grid-template-columns: 1fr var(--szer-panelu); height: 100vh; height: 100dvh; }

/* ---------- scena ---------- */
.scena-kolumna { position: relative; min-width: 0; overflow: hidden; background: #c9d3dc; }
.scena { position: absolute; inset: 0; }
.scena-canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.etykiety { position: absolute; inset: 0; pointer-events: none; }
.etykieta { position: absolute; left: 0; top: 0; padding: 4px 9px; border-radius: 7px; background: rgba(21, 24, 28, .88); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 10px rgba(0,0,0,.25); border: 1px solid rgba(200,149,90,.45); }
.znak { position: absolute; left: 18px; top: 16px; display: flex; align-items: center; gap: 8px; padding: 7px 13px 7px 11px; border-radius: 999px; background: rgba(21,24,28,.78); color: var(--tekst); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 13px; font-weight: 600; box-shadow: var(--cien); }
.znak-kropka { width: 9px; height: 9px; border-radius: 50%; background: var(--akcent); box-shadow: 0 0 0 3px rgba(200,149,90,.25); }
.znak-demo { font-weight: 500; color: var(--tekst-2); padding-left: 8px; border-left: 1px solid var(--linia-2); }
.widoki { position: absolute; right: 16px; top: 16px; display: flex; gap: 2px; padding: 4px; border-radius: 12px; background: rgba(21,24,28,.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--cien); }
.widoki button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--tekst-2); white-space: nowrap; transition: background .15s, color .15s; }
.widoki button:hover { color: var(--tekst); background: rgba(255,255,255,.06); }
.widoki button.aktywny { background: var(--akcent); color: #1a140d; }
.pasek { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 16px; background: rgba(21,24,28,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 12px 34px rgba(0,0,0,.3); max-width: calc(100% - 24px); }
.pasek button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 64px; padding: 7px 8px 6px; border: 0; border-radius: 11px; background: transparent; font-size: 11.5px; font-weight: 600; color: var(--tekst-2); white-space: nowrap; transition: background .15s, color .15s, transform .1s; }
.pasek button svg { width: 20px; height: 20px; }
.pasek button:hover:not(:disabled) { background: rgba(255,255,255,.07); color: var(--tekst); }
.pasek button:active:not(:disabled) { transform: scale(.96); }
.pasek button.aktywny { background: var(--akcent-tlo); color: var(--akcent-jasny); }
.pasek-sep { width: 1px; align-self: stretch; margin: 6px 3px; background: var(--linia-2); }
.podpowiedz { position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; text-align: center; font-size: 12px; color: rgba(255,255,255,.85); text-shadow: 0 1px 3px rgba(0,0,0,.55); pointer-events: none; }
.ladowanie { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, #1a1e23, #111316); transition: opacity .6s; z-index: 5; }
.ladowanie.ukryte { opacity: 0; pointer-events: none; }
.ladowanie-karta { width: min(320px, 80%); text-align: center; padding: 18px 22px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--linia); }
.ladowanie-tytul { font-weight: 600; margin-bottom: 12px; color: var(--tekst-2); }
.ladowanie-tor { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.ladowanie-pasek { height: 100%; width: 0; background: var(--akcent); transition: width .2s; }

/* ---------- panel ---------- */
.panel { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-left: 1px solid var(--linia); overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #3a4048 transparent; }
.panel-naglowek { padding: 24px 26px 6px; }
.nadtytul { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--akcent); }
h1 { margin: 8px 0 8px; font-size: 25px; line-height: 1.2; letter-spacing: -.01em; font-weight: 650; }
.wstep { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--tekst-2); }
.krok { padding: 18px 26px 8px; border-top: 1px solid var(--linia); margin-top: 14px; }
.krok h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 13px; font-size: 15px; font-weight: 650; }
.krok-nr { display: inline-grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; border: 1.5px solid var(--akcent); color: var(--akcent); font-size: 12px; font-weight: 700; }
.opis-kroku { margin: -4px 0 12px; font-size: 12.5px; line-height: 1.5; color: var(--tekst-2); }
.opis-kroku b { color: var(--tekst); font-weight: 600; }
.pole-opcji { margin-bottom: 13px; }
.pole-opcji.wciecie { margin: -4px 0 14px 48px; }
.etykieta-opcji { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--tekst-3); margin-bottom: 8px; }
.znaczek { margin-left: 4px; padding: 3px 8px; border-radius: 999px; background: var(--akcent-tlo); color: var(--akcent-jasny); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.krok-premium { background: linear-gradient(180deg, rgba(200,149,90,.05), transparent 70%); }

/* modele */
.modele { display: grid; gap: 8px; }
.model { display: flex; align-items: center; gap: 13px; padding: 9px 12px; border: 1.5px solid var(--linia-2); border-radius: 13px; background: var(--karta); text-align: left; transition: border-color .15s, box-shadow .15s, background .15s; }
.model:hover { border-color: #4a525b; }
.model.aktywny { border-color: var(--akcent); background: #221f1b; box-shadow: 0 0 0 3px rgba(200,149,90,.14); }
.model-ikona { display: grid; place-items: center; width: 70px; height: 46px; border-radius: 9px; background: #262a30; color: #cfc8bf; flex: none; }
.model-ikona svg { width: 60px; height: 38px; stroke: none; }
.model.aktywny .model-ikona { background: rgba(200,149,90,.16); color: var(--akcent-jasny); }
.model-tekst { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.model-tekst small { font-size: 11.5px; color: var(--tekst-3); }
.model-tekst b { font-size: 15px; letter-spacing: .06em; }
.model-tekst em { font-style: normal; font-size: 12.5px; color: var(--akcent-jasny); font-weight: 600; }

/* rozmiary */
.rozmiary { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.rozmiar { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border: 1.5px solid var(--linia-2); border-radius: 12px; background: var(--karta); text-align: left; }
.rozmiar b { font-size: 15px; }
.rozmiar small { font-size: 11px; color: var(--tekst-3); line-height: 1.3; }
.rozmiar em { font-style: normal; font-size: 12px; color: var(--tekst-2); font-weight: 600; margin-top: 2px; }
.rozmiar:hover { border-color: #4a525b; }
.rozmiar.aktywny { border-color: var(--akcent); background: #221f1b; }
.rozmiar.aktywny em { color: var(--akcent-jasny); }

.chipy { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 7px 11px; border: 1.5px solid var(--linia-2); border-radius: 999px; background: var(--karta); font-size: 13px; font-weight: 600; color: var(--tekst-2); transition: all .15s; }
.chip small { font-size: 10.5px; font-weight: 600; color: var(--akcent); margin-left: 3px; }
.chip:hover { border-color: #4a525b; color: var(--tekst); }
.chip.aktywny { border-color: var(--akcent); background: var(--akcent); color: #1a140d; }
.chip.aktywny small { color: #3b2a14; }
.chipy-kolor { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-kolor { display: flex; align-items: center; gap: 7px; padding: 5px 11px 5px 6px; border: 1.5px solid var(--linia-2); border-radius: 999px; background: var(--karta); font-size: 12.5px; font-weight: 600; color: var(--tekst-2); }
.chip-kolor i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.chip-kolor.aktywny { border-color: var(--akcent); color: var(--tekst); box-shadow: 0 0 0 3px rgba(200,149,90,.14); }

.kolory { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 9px 8px; margin-bottom: 14px; }
.kolor { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; border: 0; background: none; min-width: 0; }
.kolor i { width: 100%; aspect-ratio: 1.25; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); transition: transform .12s; background-image: linear-gradient(180deg, rgba(255,255,255,.1), rgba(0,0,0,.12)); background-blend-mode: soft-light; }
.kolor:hover i { transform: translateY(-1px); }
.kolor.aktywny i { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--akcent); }
.kolor span { font-size: 10.5px; line-height: 1.2; color: var(--tekst-2); text-align: center; }
.kolor span b { display: block; color: var(--akcent-jasny); font-weight: 600; }
.kolor.aktywny span { color: var(--tekst); font-weight: 600; }

.segment { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 11px; background: #0f1215; border: 1px solid var(--linia); }
.segment button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--tekst-2); }
.segment button small { font-size: 11px; color: var(--akcent); font-weight: 600; }
.segment button:hover { color: var(--tekst); }
.segment button.aktywny { background: #2b3036; color: var(--tekst); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.karty-male { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.karta-mala { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border: 1.5px solid var(--linia-2); border-radius: 12px; background: var(--karta); text-align: left; }
.karta-mala b { font-size: 13px; }
.karta-mala b em { font-style: normal; color: var(--akcent-jasny); font-weight: 600; font-size: 12px; }
.karta-mala small { font-size: 11.5px; color: var(--tekst-3); line-height: 1.35; }
.karta-mala.aktywny { border-color: var(--akcent); background: #221f1b; }

.przelacznik { position: relative; display: flex; align-items: center; gap: 12px; margin: 4px 0 13px; font-size: 13.5px; cursor: pointer; user-select: none; }
/* pole ukryte wizualnie, ale w obrębie etykiety (inaczej fokus przewijał panel) */
.przelacznik input { position: absolute; left: 0; top: 50%; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.przelacznik .tor { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #3a4047; transition: background .15s; flex: none; }
.przelacznik .tor::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #e8e3dc; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .15s; }
.przelacznik input:checked + .tor { background: var(--akcent); }
.przelacznik input:checked + .tor::after { transform: translateX(16px); background: #fff; }
.przelacznik input:disabled + .tor { opacity: .55; }
.przelacznik input:focus-visible + .tor { outline: 2px solid var(--akcent); outline-offset: 2px; }
.pr-tekst { display: flex; flex-direction: column; gap: 1px; }
.pr-tekst small { font-size: 11.5px; color: var(--akcent-jasny); font-weight: 600; }

.panel-stopka { position: sticky; bottom: 0; margin-top: auto; padding: 14px 26px 14px; background: rgba(18,21,25,.97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--linia); box-shadow: 0 -10px 30px rgba(0,0,0,.3); }
.cena-wiersz { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.cena-etykieta { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--tekst-3); }
.cena { font-size: 28px; font-weight: 700; letter-spacing: -.01em; color: var(--tekst); line-height: 1.15; }
.cena-uwagi { font-size: 11.5px; line-height: 1.45; color: var(--tekst-2); text-align: right; }
.stopka-przyciski { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.cta { border: 0; border-radius: 12px; padding: 13px 18px; background: linear-gradient(180deg, var(--akcent-jasny), var(--akcent)); color: #1a140d; font-weight: 700; font-size: 15px; box-shadow: 0 8px 22px rgba(200,149,90,.28); transition: filter .15s, transform .1s; }
.cta:hover { filter: brightness(1.06); }
.cta:active { transform: scale(.99); }
.drugi { border: 1.5px solid var(--linia-2); background: var(--karta); color: var(--tekst); border-radius: 12px; padding: 12px 16px; font-weight: 600; }
.drugi:hover { border-color: #4a525b; }
.krotki { display: none; }
.link-przycisk { display: block; margin: 9px auto 0; border: 0; background: none; padding: 0; color: var(--tekst-2); font-size: 12.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--akcent); outline-offset: 2px; }

/* ---------- okna ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(5,6,8,0); transition: background .25s; }
.modal.otwarty { background: rgba(5,6,8,.62); }
.modal-okno { position: relative; width: min(760px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--panel-2); color: var(--tekst); border: 1px solid var(--linia-2); border-radius: 18px; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.5); transform: translateY(14px) scale(.98); opacity: 0; transition: transform .25s, opacity .25s; }
.modal.otwarty .modal-okno { transform: none; opacity: 1; }
.modal-x { position: absolute; right: 12px; top: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #2a2f35; font-size: 22px; line-height: 1; color: var(--tekst-2); }
.modal h3 { margin: 2px 40px 8px 0; font-size: 19px; }
.lista-opis { margin: 0 0 12px; font-size: 13px; color: var(--tekst-2); }
.tabela-wrap { overflow-x: auto; border: 1px solid var(--linia-2); border-radius: 12px; }
.tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--tekst-3); background: #171a1e; padding: 9px 12px; }
.tabela td { padding: 9px 12px; border-top: 1px solid var(--linia); vertical-align: top; }
.tabela td small { display: block; font-size: 11.5px; color: var(--tekst-3); margin-top: 2px; }
.tabela .ile { text-align: right; white-space: nowrap; font-weight: 700; }
.tabela tr.potw .ile { color: #e8b86f; font-weight: 600; }
.tabela tr.suma td { background: #221f1b; font-size: 14.5px; font-weight: 700; border-top: 1px solid var(--akcent-ciemny); }
.tabela tr.suma .ile { color: var(--akcent-jasny); }
.tabela tr.sekcja td { background: #171a1e; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--akcent); font-weight: 700; }
.tabela tr.premium .ile { color: var(--tekst-2); font-weight: 600; }
.modal-glowa { display: grid; grid-template-columns: 240px 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.zap-miniatura { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; background: #2a2f35; }
.zap-konfig { margin: 0; white-space: pre-wrap; font-family: inherit; font-size: 12px; line-height: 1.5; color: var(--tekst-2); max-height: 260px; overflow-y: auto; }
.pola { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.pole { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--tekst-2); }
.pole-szerokie { grid-column: 1 / -1; }
.pole input, .pole textarea { font: inherit; font-size: 15px; font-weight: 400; color: var(--tekst); padding: 10px 12px; border: 1.5px solid var(--linia-2); border-radius: 10px; background: #121519; resize: vertical; }
.pole input:focus, .pole textarea:focus { border-color: var(--akcent); outline: none; box-shadow: 0 0 0 3px rgba(200,149,90,.16); }
.pole em { display: none; font-style: normal; font-weight: 500; color: var(--blad); font-size: 12px; }
.pole.blad input { border-color: var(--blad); }
.pole.blad em { display: block; }
.demo-info { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #121519; border: 1px solid var(--linia); font-size: 12px; color: var(--tekst-2); line-height: 1.5; }
.modal-akcje { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.zap-ok { text-align: center; padding: 8px 10px 0; }
.ok-ikona { width: 54px; height: 54px; margin: 4px auto 10px; border-radius: 50%; display: grid; place-items: center; background: rgba(111,191,138,.14); color: var(--ok); font-size: 28px; font-weight: 700; }
.zap-ok h4 { margin: 0 0 6px; font-size: 18px; }
.zap-ok p { margin: 0 auto; max-width: 480px; font-size: 13.5px; color: var(--tekst-2); line-height: 1.5; }
.zap-ok .modal-akcje { justify-content: center; }
.bez-js { position: fixed; inset: 0; display: grid; place-items: center; background: var(--panel); padding: 24px; text-align: center; z-index: 99; }

/* ---------- tablet / telefon ---------- */
@media (min-width: 861px) { html, body { overflow: hidden; } }
@media (max-width: 1150px) { :root { --szer-panelu: 400px; } .znak-demo { display: none; } .widoki button { padding: 7px 9px; } }
@media (max-width: 860px) {
  .uklad { display: block; height: auto; }
  .scena-kolumna { position: sticky; top: 0; height: 48vh; height: 48svh; z-index: 2; }
  .panel { border-left: 0; overflow: visible; }
  .panel-naglowek { padding: 18px 16px 2px; }
  h1 { font-size: 21px; }
  .krok { padding: 15px 16px 6px; }
  .znak { left: 10px; top: 10px; font-size: 12px; padding: 6px 10px 6px 8px; }
  .widoki { left: 10px; right: auto; top: 46px; padding: 3px; overflow-x: auto; max-width: calc(100% - 20px); }
  .widoki button { padding: 6px 9px; font-size: 12px; }
  .pasek { bottom: 10px; gap: 2px; padding: 4px; border-radius: 14px; }
  .pasek button { min-width: 50px; padding: 6px 5px 5px; font-size: 10.5px; }
  .pasek button svg { width: 18px; height: 18px; }
  .podpowiedz { display: none; }
  .panel-stopka { padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); }
  .cena-wiersz { margin-bottom: 7px; }
  .cena-etykieta { font-size: 10px; }
  .cena { font-size: 21px; }
  .cena-uwagi { font-size: 10.5px; }
  .stopka-przyciski .cta, .stopka-przyciski .drugi { padding: 10px 12px; font-size: 14px; }
  .link-przycisk { display: none; }
  .pelny { display: none; }
  .krotki { display: inline; }
  .modal-glowa { grid-template-columns: 1fr; }
  .zap-miniatura { aspect-ratio: 16/9; }
  .pola { grid-template-columns: 1fr; }
  .modal-akcje { flex-direction: column-reverse; }
  .modal-akcje .cta, .modal-akcje .drugi { width: 100%; }
}
@media (max-width: 400px) { .pasek button span { display: none; } .pasek button { min-width: 40px; padding: 9px 6px; } .karty-male { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Demo CodeScriptum (wersja publiczna) ---------- */
a.znak { color: inherit; text-decoration: none; cursor: pointer; transition: box-shadow .15s; }
a.znak:hover, a.znak:focus-visible { box-shadow: 0 0 0 2px var(--akcent), var(--cien); outline: none; }
a.cta { display: block; text-align: center; text-decoration: none; cursor: pointer; }
.cena-demo { margin: 4px 0 0; font-size: 11.5px; line-height: 1.4; color: var(--tekst-2); }
@media (max-width: 860px) { .panel-stopka .cena-demo { font-size: 10.5px; margin: -4px 0 8px; } }
.panel-stopka .cena-demo { margin: -6px 0 10px; }
