/*
 * DeweloperCeny 3D — wygląd przeglądarki makiet.
 * Neutralny, żeby pasował do każdej strony dewelopera: jasne panele na tle nieba,
 * krój i kolory tekstu z motywu, akcent zmienisz zmienną --dc3d-akcent.
 */
.dc3d {
    --dc3d-akcent: #00a283;
    --dc3d-tusz: #0f172a;
    --dc3d-tusz-2: #475569;
    --dc3d-panel: rgba(255, 255, 255, .92);
    --dc3d-linia: rgba(15, 23, 42, .1);
    --dc3d-cien: 0 10px 30px -12px rgba(15, 23, 42, .35);
    --dc3d-ease: cubic-bezier(.23, 1, .32, 1);
    position: relative;
    margin: 0 0 1.5em;
    scroll-margin-top: 88px;   /* link #dc3d-…: makieta pod przyklejonym menu strony */
    color: var(--dc3d-tusz);
    font-size: 15px;
    line-height: 1.5;
}
.dc3d *, .dc3d *::before, .dc3d *::after { box-sizing: border-box; }

/* Obszar makiety: niebo w CSS (płótno jest przezroczyste), wysokość z atrybutu wysokosc */
.dc3d__okno {
    position: relative;
    scroll-margin-top: 88px;   /* link ?lokal=: okno makiety pod przyklejonym menu strony */
    height: var(--dc3d-h, clamp(380px, 56vw, 620px));
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(180deg, var(--dc3d-niebo, #9cc9ea) 0%, var(--dc3d-horyzont, #e4eef2) 62%, var(--dc3d-horyzont, #e4eef2) 100%);
    isolation: isolate;
}
.dc3d__scena { position: absolute; inset: 0; }
.dc3d__canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: pan-y; cursor: grab; }
.dc3d__canvas:active { cursor: grabbing; }
.dc3d__canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--dc3d-akcent); }

/* Podgląd przed wczytaniem 3D (i zapas bez WebGL) */
.dc3d__plakat { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 500ms ease; pointer-events: none; }
.dc3d--klatka .dc3d__plakat { opacity: 0; }
.dc3d__stan { position: absolute; left: 50%; top: 50%; z-index: 4; transform: translate(-50%, -50%); margin: 0; padding: 10px 16px; border-radius: 999px; background: var(--dc3d-panel); box-shadow: var(--dc3d-cien); font-size: .875rem; font-weight: 600; white-space: nowrap; }
.dc3d__stan::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border: 2px solid var(--dc3d-akcent); border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: dc3d-krec 800ms linear infinite; }
.dc3d--gotowa .dc3d__stan, .dc3d--blad .dc3d__stan, .dc3d--bez-webgl .dc3d__stan { display: none; }
.dc3d:not(.dc3d--laduje):not(.dc3d--gotowa) .dc3d__stan { display: none; }
@keyframes dc3d-krec { to { transform: rotate(360deg); } }

/* Pasek u góry: nazwa + „na żywo z cennika" */
.dc3d__gora { position: absolute; left: 14px; top: 14px; z-index: 3; display: flex; flex-wrap: wrap; gap: 8px; max-width: calc(100% - 240px); pointer-events: none; }
.dc3d__tytul, .dc3d__zywe { margin: 0; padding: 7px 12px; border-radius: 12px; background: var(--dc3d-panel); box-shadow: var(--dc3d-cien); backdrop-filter: blur(6px); font-size: .8125rem; }
.dc3d__tytul b { margin-right: 6px; font-size: .9375rem; }
.dc3d__tytul span { color: var(--dc3d-tusz-2); }
.dc3d__zywe { display: inline-flex; align-items: center; gap: 8px; color: var(--dc3d-tusz-2); font-weight: 600; }
.dc3d__zywe i { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.dc3d__zywe.is-ok i { background: #16a34a; box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); animation: dc3d-puls 2.4s ease-out infinite; }
@keyframes dc3d-puls { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); } 70%, 100% { box-shadow: 0 0 0 9px rgba(22, 163, 74, 0); } }

/* Narzędzia */
.dc3d__narzedzia { position: absolute; right: 14px; top: 14px; z-index: 3; display: flex; gap: 6px; }
.dc3d__btn { display: grid; place-items: center; min-width: 36px; height: 36px; margin: 0; padding: 0 10px; border: 0; border-radius: 10px; background: var(--dc3d-panel); box-shadow: var(--dc3d-cien); color: var(--dc3d-tusz); font: 600 1.05rem/1 system-ui, sans-serif; cursor: pointer; transition: background-color 160ms ease, transform 120ms ease; }
.dc3d__btn--tekst { font-size: .8125rem; }
.dc3d__btn[aria-pressed="true"] { background: var(--dc3d-akcent); color: #fff; }
.dc3d__btn:focus-visible { outline: 3px solid var(--dc3d-akcent); outline-offset: 2px; }
.dc3d__btn:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .dc3d__btn:hover { background: #fff; } .dc3d__btn[aria-pressed="true"]:hover { background: var(--dc3d-akcent); } }

/* Legenda i podpowiedź */
.dc3d__legenda { position: absolute; left: 14px; bottom: 14px; z-index: 3; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 7px 12px; border-radius: 12px; background: var(--dc3d-panel); box-shadow: var(--dc3d-cien); list-style: none; font-size: .75rem; color: var(--dc3d-tusz-2); }
.dc3d__legenda li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.dc3d__legenda i { width: 10px; height: 10px; border-radius: 3px; }
.dc3d__podpowiedz { position: absolute; left: 50%; bottom: 60px; z-index: 3; transform: translateX(-50%); margin: 0; padding: 7px 14px; border-radius: 999px; background: rgba(15, 23, 42, .78); color: #fff; font-size: .78rem; white-space: nowrap; pointer-events: none; transition: opacity 400ms ease; }
.dc3d__podpowiedz.is-off { opacity: 0; }
.dc3d--szeroka .dc3d__podpowiedz { bottom: 14px; }
.dc3d__dymek { position: absolute; left: 50%; top: 50%; z-index: 5; transform: translate(-50%, -50%); margin: 0; padding: 9px 16px; border-radius: 12px; background: rgba(15, 23, 42, .82); color: #fff; font-size: .875rem; opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
.dc3d__dymek.is-on { opacity: 1; }

/* Pinezki nad domami */
.dc3d__pinezki { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.dc3d__pin { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 11px 6px 8px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .96); box-shadow: 0 10px 24px -10px rgba(8, 14, 24, .6); color: var(--dc3d-tusz); font-family: inherit; font-size: .78rem; font-weight: 600; line-height: 1.2; white-space: nowrap; pointer-events: auto; cursor: pointer; transition: opacity 200ms ease, box-shadow 160ms ease; }
.dc3d__pin::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 9px; height: 9px; margin-left: -4.5px; background: inherit; transform: rotate(45deg); border-radius: 1px; }
.dc3d__pin i { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.dc3d__pin b { font-weight: 800; }
.dc3d__pin-cena { max-width: 0; overflow: hidden; color: var(--dc3d-tusz-2); font-weight: 600; transition: max-width 220ms var(--dc3d-ease); }
.dc3d--szeroka .dc3d__pin-cena, .dc3d__pin.is-hover .dc3d__pin-cena, .dc3d__pin.is-wybrany .dc3d__pin-cena, .dc3d__pin:focus-visible .dc3d__pin-cena { max-width: 160px; }
.dc3d__pin.is-wybrany { background: var(--dc3d-tusz); color: #fff; box-shadow: 0 12px 26px -10px rgba(8, 14, 24, .75); }
.dc3d__pin.is-wybrany .dc3d__pin-cena { color: rgba(255, 255, 255, .78); }
.dc3d__pin.is-wybrany i { box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.dc3d__pin.is-off { opacity: .45; }
.dc3d__pin:focus-visible { outline: 3px solid var(--dc3d-akcent); outline-offset: 2px; }

/* Karta lokalu */
.dc3d__karta { position: absolute; right: 14px; top: 62px; z-index: 4; width: min(310px, calc(100% - 28px)); max-height: calc(100% - 76px); overflow: auto; margin: 0; padding: 16px 18px 14px; border-radius: 16px; background: #fff; box-shadow: 0 18px 50px -18px rgba(15, 23, 42, .5); animation: dc3d-wjazd 220ms var(--dc3d-ease); }
.dc3d__karta[hidden] { display: none; }
@keyframes dc3d-wjazd { from { opacity: 0; transform: translateY(8px); } }
.dc3d__zamknij { position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--dc3d-tusz-2); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.dc3d__zamknij:hover { background: #f1f5f9; }
.dc3d__karta-typ { margin: 0 36px 6px 0; font-size: 1.05rem; font-weight: 800; }
.dc3d__status { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--kol) 14%, #fff); color: color-mix(in srgb, var(--kol) 70%, #000); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.dc3d__status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--kol); }
.dc3d__cena { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.dc3d__cena--ukryta { font-size: 1rem; font-weight: 600; color: var(--dc3d-tusz-2); }
.dc3d__cena-m2 { margin: 2px 0 0; color: var(--dc3d-tusz-2); font-size: .875rem; }
.dc3d__omnibus { margin: 8px 0 0; padding: 6px 10px; border-radius: 8px; background: #f8fafc; color: var(--dc3d-tusz-2); font-size: .78rem; }
.dc3d__cechy { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--dc3d-linia); font-size: .875rem; }
.dc3d__cechy dt { margin: 0; color: var(--dc3d-tusz-2); }
.dc3d__cechy dd { margin: 0; font-weight: 600; text-align: right; }
.dc3d__akcje { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.dc3d__akcja { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px; border: 1px solid var(--dc3d-linia); border-radius: 10px; background: #fff; color: var(--dc3d-tusz); font-family: inherit; font-size: .875rem; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color 160ms ease, transform 120ms ease; }
.dc3d__akcja--glowna { border-color: var(--dc3d-akcent); background: var(--dc3d-akcent); color: #fff; }
.dc3d__akcje .dc3d__akcja { flex: 1 1 auto; }
.dc3d__akcje .dc3d__akcja--glowna { flex-basis: 100%; }
@media (hover: hover) and (pointer: fine) {
    .dc3d__akcja:hover { background: #f4f7fa; }
    .dc3d__akcja--glowna:hover { background: color-mix(in srgb, var(--dc3d-akcent) 88%, #000); }
}
.dc3d__akcja:active { transform: scale(.97); }
.dc3d__akcja:focus-visible { outline: 3px solid var(--dc3d-akcent); outline-offset: 2px; }
.dc3d__karta-info { margin: 0; color: var(--dc3d-tusz-2); }
.dc3d__zrodlo { margin: 12px 0 0; color: #94a3b8; font-size: .7rem; line-height: 1.4; }

/* ═══════ Karta 1.2: rzut, historia ceny, porównanie, podobne, zapytanie ═══════ */
.dc3d__rzut { display: flex; align-items: center; gap: 10px; width: 100%; margin: 12px 0 0; padding: 6px; border: 1px solid var(--dc3d-linia); border-radius: 12px; background: #f8fafc; color: var(--dc3d-tusz-2); font-family: inherit; font-size: .8125rem; font-weight: 600; line-height: 1.3; text-align: left; cursor: zoom-in; transition: background-color 160ms ease; }
.dc3d__rzut img { flex: none; width: 68px; height: 50px; margin: 0; border-radius: 8px; background: #fff; object-fit: contain; }
.dc3d__rzut:focus-visible { outline: 3px solid var(--dc3d-akcent); outline-offset: 2px; }
.dc3d__narz { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.dc3d__narz-btn { display: inline-flex; align-items: center; min-height: 32px; margin: 0; padding: 5px 11px; border: 1px solid var(--dc3d-linia); border-radius: 999px; background: #fff; color: var(--dc3d-tusz-2); font-family: inherit; font-size: .78rem; font-weight: 700; line-height: 1.2; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 120ms ease; }
.dc3d__narz-btn[aria-pressed="true"], .dc3d__narz-btn[aria-expanded="true"] { border-color: var(--dc3d-akcent); background: rgba(0, 162, 131, .08); color: #00785f; }
.dc3d__narz-btn:active { transform: scale(.97); }
.dc3d__narz-btn:focus-visible { outline: 3px solid var(--dc3d-akcent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .dc3d__rzut:hover, .dc3d__narz-btn:hover { background: #f1f5f9; } }

.dc3d__historia { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: #f8fafc; }
.dc3d__historia[hidden] { display: none; }
.dc3d__historia-info { margin: 0; color: var(--dc3d-tusz-2); font-size: .8125rem; }
.dc3d__historia-lista + .dc3d__historia-info { margin-top: 6px; font-size: .72rem; }
.dc3d__wykres { display: block; width: 100%; height: auto; margin: 0 0 6px; overflow: visible; }
.dc3d__wykres path { fill: none; stroke: var(--dc3d-akcent); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.dc3d__wykres circle { fill: #fff; stroke: var(--dc3d-akcent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.dc3d__wykres circle:last-of-type { fill: var(--dc3d-akcent); }
.dc3d__historia-lista { margin: 0; padding: 0; list-style: none; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.dc3d__historia-lista li { display: grid; grid-template-columns: minmax(0, 1fr) auto 3.6em; gap: 8px; margin: 0; padding: 3px 0; }
.dc3d__historia-lista li + li { border-top: 1px solid #eef2f6; }
.dc3d__historia-lista span { color: var(--dc3d-tusz-2); }
.dc3d__historia-lista b { font-weight: 700; }
.dc3d__historia-lista em { font-style: normal; font-weight: 700; text-align: right; }
.dc3d__historia-lista .is-w-dol { color: #15803d; }
.dc3d__historia-lista .is-w-gore { color: #b45309; }

.dc3d__podobne { margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--dc3d-linia); }
.dc3d__podobne[hidden] { display: none; }
.dc3d__podobne-tytul { margin: 0 0 6px; color: #64748b; font-size: .6875rem; font-weight: 700; letter-spacing: .07em; line-height: 1.2; text-transform: uppercase; }
.dc3d__podobny { display: grid; gap: 1px; width: 100%; margin: 0 0 6px; padding: 8px 10px; border: 1px solid var(--dc3d-linia); border-left: 3px solid #16a34a; border-radius: 10px; background: #fff; color: var(--dc3d-tusz); font-family: inherit; font-size: .875rem; line-height: 1.3; text-align: left; cursor: pointer; transition: background-color 140ms ease; }
.dc3d__podobny b { font-weight: 800; }
.dc3d__podobny span { color: var(--dc3d-tusz-2); font-size: .78rem; font-variant-numeric: tabular-nums; }
.dc3d__podobny:focus-visible { outline: 3px solid var(--dc3d-akcent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .dc3d__podobny:hover { background: #f4f7fa; } }

/* Zapytanie o lokal */
.dc3d__karta--form { width: min(340px, calc(100% - 28px)); }
.dc3d__wroc { display: inline-flex; margin: -4px 0 6px -4px; padding: 4px 6px; border: 0; border-radius: 8px; background: none; color: var(--dc3d-tusz-2); font-family: inherit; font-size: .8125rem; font-weight: 600; line-height: 1.2; cursor: pointer; }
.dc3d__wroc:hover { background: #f1f5f9; }
.dc3d__wroc:focus-visible { outline: 3px solid var(--dc3d-akcent); outline-offset: 1px; }
.dc3d__form-lokal { margin: 0 0 10px; color: var(--dc3d-tusz-2); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.dc3d__form-opis { margin: 0 0 10px; padding: 7px 10px; border-radius: 8px; background: rgba(0, 162, 131, .08); color: #00594a; font-size: .78rem; line-height: 1.4; }
.dc3d__form { display: grid; gap: 8px; margin: 0; }
.dc3d .dc3d__pole-f { display: grid; gap: 3px; margin: 0; }
.dc3d .dc3d__pole-f > span { color: var(--dc3d-tusz-2); font-size: .75rem; font-weight: 700; line-height: 1.2; }
.dc3d .dc3d__pole-f input, .dc3d .dc3d__pole-f textarea { display: block; width: 100%; min-height: 40px; margin: 0; padding: 8px 11px; border: 1px solid rgba(15, 23, 42, .18); border-radius: 10px; background: #fff; box-shadow: none; color: var(--dc3d-tusz); font-family: inherit; font-size: .9375rem; font-weight: 500; line-height: 1.35; outline: none; transition: border-color 160ms ease, box-shadow 160ms ease; }
.dc3d .dc3d__pole-f textarea { min-height: 68px; resize: vertical; }
@media (pointer: coarse) { .dc3d .dc3d__pole-f input, .dc3d .dc3d__pole-f textarea { font-size: 16px; } }   /* iOS nie przybliża pola */
.dc3d .dc3d__pole-f input:focus, .dc3d .dc3d__pole-f textarea:focus { border-color: var(--dc3d-akcent); box-shadow: 0 0 0 3px rgba(0, 162, 131, .16); }
.dc3d__form-podp { margin: -3px 0 0; color: #64748b; font-size: .72rem; line-height: 1.35; }
.dc3d__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dc3d .dc3d__zgoda { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; margin: 2px 0 0; color: var(--dc3d-tusz-2); font-size: .72rem; font-weight: 500; line-height: 1.4; cursor: pointer; }
.dc3d .dc3d__zgoda input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--dc3d-akcent); cursor: pointer; }
.dc3d__zgoda a { color: inherit; text-decoration: underline; }
.dc3d__form-blad { margin: 0; color: #b91c1c; font-size: .8125rem; font-weight: 600; }
.dc3d__form-blad:empty { display: none; }
.dc3d__form-wyslij { width: 100%; margin-top: 2px; }
.dc3d__form-wyslij:disabled { opacity: .7; cursor: progress; }
.dc3d__form-ok { padding: 8px 2px 2px; text-align: center; }
.dc3d__form-ok .dc3d__karta-typ { margin: 0 0 4px; }
.dc3d__form-ok p { margin: 0; color: var(--dc3d-tusz-2); font-size: .875rem; }
.dc3d__form-ok .dc3d__akcja { margin-top: 14px; }
.dc3d .dc3d__form-ok-znak { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%; background: rgba(0, 162, 131, .12); color: var(--dc3d-akcent); font-size: 1.35rem; font-weight: 800; line-height: 1; }

/* Pasek porównania (zastępuje legendę, póki coś jest wybrane do porównania) */
.dc3d__porownanie { position: absolute; left: 14px; bottom: 14px; z-index: 3; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 28px); margin: 0; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--dc3d-tusz); box-shadow: var(--dc3d-cien); color: #fff; font-size: .8125rem; animation: dc3d-wjazd 220ms var(--dc3d-ease); }
.dc3d__porownanie[hidden] { display: none; }
.dc3d--porownanie .dc3d__legenda { display: none; }
.dc3d__porownanie-lista { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dc3d__porownanie-btn { flex: none; min-height: 32px; margin: 0; padding: 5px 12px; border: 0; border-radius: 8px; background: var(--dc3d-akcent); color: #fff; font-family: inherit; font-size: .8125rem; font-weight: 700; line-height: 1.2; cursor: pointer; }
.dc3d__porownanie-btn:disabled { background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .75); cursor: default; }
.dc3d__porownanie-x { flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 8px; background: none; color: rgba(255, 255, 255, .8); font-family: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.dc3d__porownanie-x:hover { background: rgba(255, 255, 255, .12); }
.dc3d__porownanie button:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }

/* Okno nad stroną: porównanie i rzut (poza .dc3d, więc własne zmienne) */
.dc3d-modal { --dc3d-akcent: #00a283; --dc3d-tusz: #0f172a; --dc3d-tusz-2: #475569; --dc3d-linia: rgba(15, 23, 42, .1); position: fixed; inset: 0; z-index: 99995; display: grid; place-items: center; padding: 16px; background: rgba(8, 14, 24, .58); color: var(--dc3d-tusz); font-size: 15px; line-height: 1.5; animation: dc3d-tlo 200ms ease; }
.dc3d-modal *, .dc3d-modal *::before, .dc3d-modal *::after { box-sizing: border-box; }
.dc3d-modal__okno { width: 100%; max-width: 780px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; padding: 16px 18px 18px; border-radius: 18px; background: #fff; box-shadow: 0 30px 80px -20px rgba(8, 14, 24, .6); animation: dc3d-wjazd 240ms cubic-bezier(.23, 1, .32, 1); }
.dc3d-modal--rzut .dc3d-modal__okno { max-width: 980px; }
.dc3d-modal__gora { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.dc3d-modal__tytul { margin: 0; font-size: 1.125rem; font-weight: 800; letter-spacing: -.01em; }
.dc3d-modal__zamknij { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin: 0; padding: 0; border: 0; border-radius: 10px; background: #f1f5f9; color: var(--dc3d-tusz); font-family: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.dc3d-modal__zamknij:focus-visible { outline: 3px solid var(--dc3d-akcent); outline-offset: 2px; }
.dc3d-rzuty { display: grid; gap: 12px; }
.dc3d-rzuty img { display: block; width: 100%; height: auto; max-height: 76vh; margin: 0 auto; object-fit: contain; }
.dc3d-por__opak { overflow-x: auto; }
.dc3d-modal table.dc3d-por { width: 100%; min-width: 420px; margin: 0; border: 0; border-collapse: collapse; background: none; font-size: .875rem; font-variant-numeric: tabular-nums; }
.dc3d-modal .dc3d-por th, .dc3d-modal .dc3d-por td { margin: 0; padding: 9px 10px; border: 0; border-bottom: 1px solid #eef2f6; background: none; color: inherit; text-align: left; vertical-align: middle; }
.dc3d-modal .dc3d-por tbody th { color: var(--dc3d-tusz-2); font-weight: 600; white-space: nowrap; }
.dc3d-modal .dc3d-por td { font-weight: 600; }
.dc3d-modal .dc3d-por thead th { padding-top: 4px; border-bottom: 2px solid var(--dc3d-linia); vertical-align: bottom; }
.dc3d-modal .dc3d-por thead b { display: block; margin: 0 0 4px; font-size: 1rem; font-weight: 800; }
.dc3d-modal .dc3d-por td.is-naj { background: rgba(22, 163, 74, .09); color: #166534; font-weight: 800; }
.dc3d-modal .dc3d-por tr:last-child td { border-bottom: 0; padding-top: 12px; }
.dc3d-por .dc3d__status { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--kol) 14%, #fff); color: color-mix(in srgb, var(--kol) 70%, #000); font-size: .6875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.dc3d-por .dc3d__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--kol); }
.dc3d-por .dc3d__akcja { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 12px; border: 1px solid var(--dc3d-linia); border-radius: 10px; background: #fff; color: var(--dc3d-tusz); font-family: inherit; font-size: .8125rem; font-weight: 700; line-height: 1.2; white-space: nowrap; cursor: pointer; }
.dc3d-por .dc3d__akcja:hover { background: #f4f7fa; }
.dc3d-por__info { margin: 10px 0 0; color: #64748b; font-size: .75rem; }
@keyframes dc3d-tlo { from { opacity: 0; } }

/* ═══════ 1.3: kompas, słońce i noc ═══════ */
.dc3d__kompas { position: absolute; left: 14px; top: 60px; z-index: 3; display: block; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: var(--dc3d-panel); box-shadow: var(--dc3d-cien); cursor: pointer; transition: transform 120ms ease; }
.dc3d__kompas:active { transform: scale(.95); }
.dc3d__kompas:focus-visible { outline: 3px solid var(--dc3d-akcent); outline-offset: 2px; }
.dc3d__kompas-tarcza { position: absolute; inset: 3px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--dc3d-linia); }
.dc3d__kompas-tarcza i { position: absolute; display: block; font-style: normal; }
.dc3d__kompas-n { left: 50%; top: 1px; transform: translateX(-50%); color: #d9363e; font: 800 9px/1 system-ui, sans-serif; }
.dc3d__kompas-igla { left: 50%; top: 50%; width: 8px; height: 18px; margin: -7px 0 0 -4px; background: linear-gradient(to bottom, #d9363e 0 50%, #94a3b8 50% 100%); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.dc3d__kompas-slonce { left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #f5a524; box-shadow: 0 0 0 2px #fff, 0 0 8px 2px rgba(245, 165, 36, .55); }
.dc3d__kompas-slonce[hidden] { display: none; }

.dc3d__btn-ikona { font-size: 1rem; line-height: 1; }
.dc3d__btn--slonce { display: inline-flex; align-items: center; gap: 6px; }
.dc3d__btn--slonce[aria-expanded="true"], .dc3d__btn--slonce[aria-pressed="true"] { background: var(--dc3d-tusz); color: #fff; }

.dc3d__slonce { position: absolute; left: 50%; bottom: 14px; z-index: 4; width: min(400px, calc(100% - 28px)); margin: 0; padding: 12px 14px 12px; border-radius: 16px; background: rgba(255, 255, 255, .96); box-shadow: 0 18px 50px -18px rgba(15, 23, 42, .55); color: var(--dc3d-tusz); font-size: .8125rem; transform: translateX(-50%); animation: dc3d-wjazd 220ms var(--dc3d-ease); }
.dc3d__slonce[hidden] { display: none; }
.dc3d--slonce-otwarte .dc3d__legenda, .dc3d--slonce-otwarte .dc3d__podpowiedz, .dc3d--slonce-otwarte .dc3d__porownanie { display: none; }
.dc3d__slonce-gora { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; }
.dc3d__slonce-tytul { margin: 0; font-size: .9375rem; font-weight: 800; letter-spacing: -.01em; }
.dc3d__slonce-x { display: grid; place-items: center; width: 28px; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--dc3d-tusz-2); font-family: inherit; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.dc3d__slonce-x:hover { background: #f1f5f9; }
.dc3d__slonce-daty { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 10px; }
.dc3d__slonce-chip { min-height: 30px; margin: 0; padding: 4px 10px; border: 1px solid var(--dc3d-linia); border-radius: 999px; background: #fff; color: var(--dc3d-tusz-2); font-family: inherit; font-size: .78rem; font-weight: 700; line-height: 1.2; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease; }
.dc3d__slonce-chip[aria-pressed="true"] { border-color: var(--dc3d-tusz); background: var(--dc3d-tusz); color: #fff; }
.dc3d__slonce-wiersz { display: grid; grid-template-columns: auto minmax(0, 1fr) 3.2em; align-items: center; gap: 10px; }
.dc3d .dc3d__slonce-etyk { margin: 0; color: var(--dc3d-tusz-2); font-size: .75rem; font-weight: 700; }
.dc3d .dc3d__slonce-suwak { width: 100%; height: 24px; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; accent-color: #f59e0b; cursor: pointer; }
.dc3d__slonce-godz { font-size: .9375rem; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.dc3d__slonce-info { min-height: 2.8em; margin: 6px 0 0; color: var(--dc3d-tusz-2); font-size: .75rem; line-height: 1.4; }
.dc3d__slonce-dol { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.dc3d__slonce-akcja { min-height: 32px; margin: 0; padding: 5px 12px; border: 1px solid var(--dc3d-linia); border-radius: 9px; background: #fff; color: var(--dc3d-tusz); font-family: inherit; font-size: .78rem; font-weight: 700; line-height: 1.2; cursor: pointer; transition: background-color 160ms ease; }
.dc3d__slonce-akcja[aria-pressed="true"] { border-color: var(--dc3d-tusz); background: var(--dc3d-tusz); color: #fff; }
.dc3d__slonce-akcja[hidden] { display: none; }
.dc3d__slonce button:focus-visible, .dc3d .dc3d__slonce-suwak:focus-visible { outline: 3px solid var(--dc3d-akcent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .dc3d__slonce-chip:hover, .dc3d__slonce-akcja:hover { background: #f1f5f9; } .dc3d__slonce-chip[aria-pressed="true"]:hover, .dc3d__slonce-akcja[aria-pressed="true"]:hover { background: var(--dc3d-tusz); } }

/* ═══════ 1.4: okolica z OpenStreetMap, galeria ═══════ */
.dc3d__btn--ikona { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; }
.dc3d__btn-svg { flex: none; width: 18px; height: 18px; }
.dc3d__btn-svg, .dc3d__punkt-ikona svg, .dc3d__okolica-chip svg, .dc3d__okolica-poz i svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dc3d:not(.dc3d--etykiety) .dc3d__btn-etykieta { display: none; }
.dc3d__btn--okolica.is-wl { background: var(--dc3d-tusz); color: #fff; }

/* podpis licencji OpenStreetMap (ODbL) — zawsze widoczny, gdy makieta pokazuje dane z mapy */
.dc3d__osm { position: absolute; right: 6px; bottom: 4px; z-index: 6; margin: 0; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .78); color: #334155; font-size: 10px; font-weight: 600; line-height: 1.3; text-decoration: none; }
.dc3d__osm:hover { color: var(--dc3d-tusz); text-decoration: underline; }
.dc3d__osm:focus-visible { outline: 2px solid var(--dc3d-akcent); outline-offset: 1px; }

/* pinezki punktów w okolicy: ciemne, żeby nie myliły się z białymi pinezkami lokali */
.dc3d__punkty { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.dc3d__punkty[hidden] { display: none; }
.dc3d__punkt { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 3px 9px 3px 3px; border: 0; border-radius: 999px; background: rgba(15, 23, 42, .9); box-shadow: 0 8px 18px -8px rgba(8, 14, 24, .7); color: #fff; font-family: inherit; font-size: .72rem; font-weight: 700; line-height: 1.2; white-space: nowrap; pointer-events: auto; cursor: pointer; }
.dc3d__punkt::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; margin-left: -4px; background: inherit; transform: rotate(45deg); border-radius: 1px; }
.dc3d__punkt.is-off { display: none; }
.dc3d__punkt-ikona { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--kol); color: #fff; }
.dc3d__punkt-ikona svg { width: 13px; height: 13px; }
.dc3d__punkt-nazwa { max-width: 0; overflow: hidden; text-overflow: ellipsis; transition: max-width 220ms var(--dc3d-ease); }
.dc3d__punkt-odl { color: rgba(255, 255, 255, .78); font-variant-numeric: tabular-nums; }
.dc3d__punkt:hover .dc3d__punkt-nazwa, .dc3d__punkt:focus-visible .dc3d__punkt-nazwa, .dc3d__punkt.is-otwarty .dc3d__punkt-nazwa { max-width: 220px; }
.dc3d__punkt:hover, .dc3d__punkt:focus-visible, .dc3d__punkt.is-otwarty { z-index: 1; }
.dc3d__punkt:focus-visible { outline: 3px solid var(--dc3d-akcent); outline-offset: 2px; }

/* panel „Okolica” — w tym samym miejscu co panel słońca (otwarty jest jeden naraz) */
.dc3d__okolica { position: absolute; left: 50%; bottom: 14px; z-index: 4; display: flex; flex-direction: column; width: min(540px, calc(100% - 28px)); max-height: calc(100% - 84px); margin: 0; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .97); box-shadow: 0 18px 50px -18px rgba(15, 23, 42, .55); color: var(--dc3d-tusz); font-size: .8125rem; transform: translateX(-50%); animation: dc3d-wjazd 220ms var(--dc3d-ease); }
.dc3d__okolica[hidden] { display: none; }
.dc3d--okolica .dc3d__legenda, .dc3d--okolica .dc3d__podpowiedz, .dc3d--okolica .dc3d__porownanie { display: none; }
.dc3d__okolica-kat { display: flex; flex: none; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.dc3d__okolica-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; margin: 0; padding: 2px 8px 2px 5px; border: 1px solid var(--dc3d-linia); border-radius: 999px; background: #fff; color: #94a3b8; font-family: inherit; font-size: .75rem; font-weight: 700; line-height: 1.2; cursor: pointer; transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
.dc3d__okolica-chip svg { width: 14px; height: 14px; }
.dc3d__okolica-chip[aria-pressed="true"] { border-color: color-mix(in srgb, var(--kol) 40%, #fff); background: color-mix(in srgb, var(--kol) 10%, #fff); color: color-mix(in srgb, var(--kol) 75%, #000); }
.dc3d__okolica-chip:focus-visible, .dc3d__okolica-poz:focus-visible { outline: 3px solid var(--dc3d-akcent); outline-offset: 1px; }
.dc3d__okolica-lista { flex: 1 1 auto; min-height: 0; max-height: 156px; overflow-y: auto; margin: 0; padding: 0; list-style: none; scrollbar-width: thin; }
.dc3d__okolica-lista li { margin: 0; padding: 0; }
.dc3d__okolica-lista li[hidden] { display: none; }
.dc3d__okolica-lista li + li { border-top: 1px solid #eef2f6; }
.dc3d__okolica-poz { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 7px 6px; border: 0; border-radius: 8px; background: none; color: var(--dc3d-tusz); font-family: inherit; font-size: .8125rem; line-height: 1.3; text-align: left; cursor: pointer; transition: background-color 140ms ease; }
.dc3d__okolica-poz i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--kol); color: #fff; }
.dc3d__okolica-poz i svg { width: 14px; height: 14px; }
.dc3d__okolica-poz span { display: grid; min-width: 0; }
.dc3d__okolica-poz b { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.dc3d__okolica-poz em { color: #64748b; font-size: .72rem; font-style: normal; }
.dc3d__okolica-poz strong { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dc3d__okolica-lista li.is-wybrany .dc3d__okolica-poz { background: rgba(0, 162, 131, .08); }
@media (hover: hover) and (pointer: fine) { .dc3d__okolica-poz:hover { background: #f4f7fa; } }
.dc3d__okolica-stopka { margin: 8px 0 0; color: #64748b; font-size: .7rem; line-height: 1.4; }
.dc3d__okolica-stopka a { color: inherit; }

/* galeria */
.dc3d-modal--galeria .dc3d-modal__okno { max-width: 1120px; background: #0f172a; color: #e2e8f0; }
.dc3d-modal--galeria .dc3d-modal__tytul { color: #fff; }
.dc3d-modal--galeria .dc3d-modal__zamknij { background: rgba(255, 255, 255, .1); color: #fff; }
.dc3d-galeria { outline: none; }
.dc3d-galeria__scena { position: relative; display: grid; place-items: center; min-height: 200px; overflow: hidden; border-radius: 12px; background: #0b1220; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.dc3d-galeria__obraz { display: block; width: auto; max-width: 100%; height: auto; max-height: min(66vh, 720px); object-fit: contain; }
.dc3d-galeria__nav { position: absolute; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; margin: -22px 0 0; padding: 0; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .62); color: #fff; font-family: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; transition: background-color 160ms ease; }
.dc3d-galeria__nav--wst { left: 10px; }
.dc3d-galeria__nav--dal { right: 10px; }
.dc3d-galeria__nav:hover { background: rgba(15, 23, 42, .85); }
.dc3d-galeria__nav:focus-visible, .dc3d-galeria__min:focus-visible, .dc3d-galeria__pliki a:focus-visible { outline: 3px solid var(--dc3d-akcent); outline-offset: 2px; }
.dc3d-galeria__opis { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 10px 2px 0; }
.dc3d-galeria__podpis { margin: 0; color: #e2e8f0; font-size: .875rem; }
.dc3d-galeria__licznik { flex: none; color: #94a3b8; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.dc3d-galeria__miniatury { display: flex; gap: 8px; margin: 12px 0 0; padding: 2px; overflow-x: auto; scrollbar-width: thin; }
.dc3d-galeria__min { flex: none; width: 88px; height: 58px; margin: 0; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 8px; background: #1e293b; cursor: pointer; opacity: .7; transition: opacity 160ms ease, border-color 160ms ease; }
.dc3d-galeria__min img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dc3d-galeria__min.is-wybrana { border-color: var(--dc3d-akcent); opacity: 1; }
.dc3d-galeria__pliki { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.dc3d-galeria__pliki li { margin: 0; }
.dc3d-galeria__pliki a { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #fff; font-size: .8125rem; font-weight: 700; text-decoration: none; }
.dc3d-galeria__pliki a::before { content: "PDF"; padding: 1px 5px; border-radius: 4px; background: #dc3545; color: #fff; font-size: .62rem; letter-spacing: .04em; }
.dc3d-galeria__pliki span { color: #94a3b8; font-size: .72rem; font-weight: 600; }

/* Pasek z zapytaniem do API (pokazuje połączenie z wtyczką) */
.dc3d__api { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: #0b1220; color: #cbd5e1; font: 500 .75rem/1.5 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.dc3d__api b { color: #8ff0d9; }
.dc3d__api code { color: #e2e8f0; font: inherit; background: none; padding: 0; word-break: break-all; }
.dc3d__api .is-ok { color: #4ade80; }

/* Lista lokali z serwera: bez JavaScriptu i bez WebGL (i dla robotów) */
.dc3d__lista { margin: 12px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.dc3d__lista li { margin: 0; padding: 10px 12px; border: 1px solid var(--dc3d-linia); border-radius: 12px; font-size: .875rem; }
.dc3d--gotowa .dc3d__lista { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.dc3d--blad .dc3d__okno::after, .dc3d--bez-webgl .dc3d__okno::after { content: "Makieta 3D wymaga przeglądarki z WebGL. Poniżej lista lokali."; position: absolute; left: 14px; bottom: 14px; padding: 8px 12px; border-radius: 10px; background: var(--dc3d-panel); font-size: .8125rem; }

/* Pełny ekran: sama makieta */
.dc3d:fullscreen { margin: 0; background: #fff; }
.dc3d:fullscreen .dc3d__okno { height: 100vh; border-radius: 0; }
.dc3d:fullscreen .dc3d__api, .dc3d:fullscreen .dc3d__lista { display: none; }

/* ═══════ Wersja FOTO: klatki renderu + obrysy lokali ═══════ */
.dc3d--foto .dc3d__okno { height: auto; aspect-ratio: 16 / 9; background: #cfdde6; }
.dc3d--foto .dc3d__plakat { object-fit: cover; }
.dc3d__scena--foto { touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; outline: none; }
.dc3d__scena--foto:active { cursor: grabbing; }
.dc3d__scena--foto:focus-visible { box-shadow: inset 0 0 0 3px var(--dc3d-akcent); }
.dc3d__klatka { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.dc3d__obrysy { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dc3d__obrys polygon { fill: var(--kol, #13a47e); fill-opacity: .2; stroke: var(--kol, #13a47e); stroke-width: 2; stroke-opacity: .85; stroke-linejoin: round; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill-opacity 160ms ease, stroke-width 160ms ease; }
.dc3d__obrys.is-aktywny polygon { fill-opacity: .42; stroke-width: 3; stroke-opacity: 1; }
.dc3d__obrys.is-wybrany polygon { fill-opacity: .5; stroke: #fff; stroke-width: 3; }
.dc3d__obrys.is-wybrany { filter: drop-shadow(0 0 7px rgba(255, 255, 255, .85)); }
.dc3d__obrys.is-off polygon { fill-opacity: 0; stroke-opacity: 0; pointer-events: none; }
.dc3d--foto .dc3d__pinezki { pointer-events: none; }
/* Postęp wczytywania klatek: kółko + licznik, znika po pobraniu całego obrotu */
.dc3d__postep { position: absolute; left: 50%; top: 64px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px 6px 9px; border-radius: 999px; background: rgba(15, 23, 42, .72); color: #fff; font-size: .75rem; font-weight: 600; white-space: nowrap; transform: translateX(-50%); pointer-events: none; transition: opacity 400ms ease; }
.dc3d__postep::before { content: ""; width: 12px; height: 12px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: dc3d-krec 800ms linear infinite; }
.dc3d__postep.is-off { opacity: 0; }

/* ═══════ Panel: filtry i lista lokali obok makiety ═══════ */
.dc3d--z-panelem { display: grid; grid-template-columns: minmax(0, 1fr) var(--dc3d-panel-szer, 340px); gap: 0; align-items: stretch; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 30px 70px -40px rgba(15, 23, 42, .45); }
.dc3d--z-panelem .dc3d__okno { border-radius: 0; grid-column: 1; grid-row: 1; }
.dc3d--z-panelem > .dc3d__panel { grid-column: 2; grid-row: 1; }
.dc3d--z-panelem .dc3d__api { grid-column: 1 / -1; margin: 0; border-radius: 0; }
.dc3d--z-panelem .dc3d__lista { grid-column: 1 / -1; }
.dc3d__panel { display: flex; flex-direction: column; min-height: 0; max-height: 100%; border-left: 1px solid var(--dc3d-linia); background: #fff; font-size: .875rem; }
.dc3d--z-panelem:not(.dc3d--foto) .dc3d__panel { max-height: var(--dc3d-h, clamp(380px, 56vw, 620px)); }
.dc3d--foto .dc3d__okno { width: 100%; min-width: 0; }
/* Wysokość wiersza wyznacza zdjęcie (16:9), panel się do niej dopasowuje i przewija listę w środku */
.dc3d--foto.dc3d--z-panelem > .dc3d__panel { position: relative; height: 0; min-height: 100%; }
.dc3d__panel-gora { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 13px 16px 11px; border-bottom: 1px solid var(--dc3d-linia); }
.dc3d__panel-tytul { margin: 0; font-size: 1.0625rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; color: var(--dc3d-tusz); }
.dc3d__panel-licznik { margin: 3px 0 0; color: var(--dc3d-tusz-2); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.dc3d__filtry { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; gap: 10px 12px; padding: 11px 16px 13px; border-bottom: 1px solid var(--dc3d-linia); }
.dc3d__f-tytul { margin: 0 0 5px; font-size: .6875rem; font-weight: 700; letter-spacing: .07em; line-height: 1.2; text-transform: uppercase; color: #64748b; }
.dc3d__chipy { display: flex; flex-wrap: wrap; gap: 5px; }
.dc3d__chip { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; margin: 0; padding: 4px 9px; border: 1px solid var(--dc3d-linia); border-radius: 999px; background: #fff; color: #64748b; font-family: inherit; font-size: .8125rem; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 120ms ease; }
.dc3d__chip i { width: 7px; height: 7px; border-radius: 50%; opacity: .35; transition: opacity 160ms ease; }
.dc3d__chip[aria-pressed="true"] { border-color: var(--dc3d-tusz); background: #f1f5f9; color: var(--dc3d-tusz); }
.dc3d__chip[aria-pressed="true"] i { opacity: 1; }
.dc3d__chip:active { transform: scale(.97); }
.dc3d__chip--nr { min-width: 42px; justify-content: center; font-variant-numeric: tabular-nums; }
.dc3d__chip:focus-visible, .dc3d__wynik:focus-visible, .dc3d__wyczysc:focus-visible, .dc3d__sort:focus-visible { outline: 3px solid var(--dc3d-akcent); outline-offset: 2px; }
.dc3d__zakres { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dc3d__pole { display: flex; align-items: center; gap: 5px; min-width: 0; height: 34px; margin: 0; padding: 0 10px; border: 1px solid var(--dc3d-linia); border-radius: 10px; background: #fff; color: #64748b; font-size: .75rem; font-weight: 600; cursor: text; transition: border-color 160ms ease, box-shadow 160ms ease; }
.dc3d__pole input { flex: 1; width: 100%; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--dc3d-tusz); font-family: inherit; font-size: .875rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; outline: none; -moz-appearance: textfield; appearance: textfield; }
.dc3d__pole input::-webkit-outer-spin-button, .dc3d__pole input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.dc3d__pole input::placeholder { color: #a3adbb; font-weight: 500; opacity: 1; }
.dc3d__pole:focus-within { border-color: var(--dc3d-akcent); box-shadow: 0 0 0 3px rgba(0, 162, 131, .14); }
.dc3d__f:first-child, .dc3d__f--szeroki { grid-column: 1 / -1; }
.dc3d__wyczysc { flex: none; margin: 1px 0 0; padding: 4px 9px; border: 0; border-radius: 8px; background: rgba(0, 162, 131, .1); color: #00785f; font-family: inherit; font-size: .75rem; font-weight: 700; line-height: 1.2; cursor: pointer; transition: background-color 160ms ease; }
.dc3d__wyczysc[hidden] { display: none; }
.dc3d__lista-gora { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px 6px; color: #64748b; font-size: .75rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.dc3d__lista-gora label { margin: 0; cursor: pointer; }
.dc3d__sort { height: 30px; margin: 0; padding: 0 28px 0 10px; border: 1px solid var(--dc3d-linia); border-radius: 8px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23475569' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center; color: var(--dc3d-tusz); font-family: inherit; font-size: .8125rem; font-weight: 600; line-height: 1; letter-spacing: 0; text-transform: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
.dc3d__wyniki { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 0 8px 10px; list-style: none; scrollbar-width: thin; }
.dc3d__wyniki li { margin: 0; padding: 0; }
.dc3d__wyniki li + li { border-top: 1px solid #eef2f6; }
.dc3d__wynik { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; width: 100%; margin: 0; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--dc3d-tusz); font-family: inherit; font-size: .875rem; font-weight: 500; line-height: 1.3; text-align: left; cursor: pointer; transition: background-color 140ms ease, box-shadow 140ms ease; }
.dc3d__wynik i { grid-row: 1; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 3px #fff; }
.dc3d__wynik-nr { grid-column: 2; grid-row: 1; display: flex; align-items: baseline; gap: 7px; min-width: 0; white-space: nowrap; }
.dc3d__wynik-nr b { font-weight: 800; letter-spacing: -.005em; }
.dc3d__wynik-nr em { overflow: hidden; color: #64748b; font-size: .75rem; font-style: normal; font-weight: 600; text-overflow: ellipsis; }
.dc3d__wynik-cena { grid-column: 3; grid-row: 1; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.dc3d__wynik-info, .dc3d__wynik-m2 { grid-row: 2; color: #64748b; font-size: .78rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dc3d__wynik-info { grid-column: 2; overflow: hidden; text-overflow: ellipsis; }
.dc3d__wynik-m2 { grid-column: 3; text-align: right; }
.dc3d__wynik--zarezerwowany .dc3d__wynik-nr em { color: #b26f0e; }
.dc3d__wynik--sprzedany .dc3d__wynik-nr b, .dc3d__wynik--sprzedany .dc3d__wynik-cena { color: #8b95a3; }
.dc3d__wynik.is-hover, .dc3d__wynik:hover { background: #f4f7fa; }
.dc3d__wynik.is-wybrany { background: rgba(0, 162, 131, .08); box-shadow: inset 3px 0 0 var(--dc3d-akcent); }
.dc3d__brak { padding: 14px 8px; color: var(--dc3d-tusz-2); }

/* Na całą szerokość ekranu (atrybut szerokosc="pelna") */
.dc3d--pelna { width: var(--dc3d-vw, 100vw); max-width: var(--dc3d-vw, 100vw); margin-left: calc(50% - var(--dc3d-vw, 100vw) / 2); margin-right: 0; border-radius: 0; }
.dc3d--pelna .dc3d__okno, .dc3d--pelna.dc3d--z-panelem { border-radius: 0; }

@media (max-width: 1023.98px) {
    .dc3d--z-panelem { grid-template-columns: minmax(0, 1fr); }
    .dc3d__panel, .dc3d--z-panelem > .dc3d__panel { grid-column: 1; grid-row: auto; border-left: 0; border-top: 1px solid var(--dc3d-linia); max-height: none; }
    .dc3d--z-panelem:not(.dc3d--foto) .dc3d__panel { max-height: none; }
    .dc3d__wyniki { max-height: 360px; }
    .dc3d--foto.dc3d--z-panelem > .dc3d__panel { height: auto; min-height: 0; }
}

@media (max-width: 640px) {
    .dc3d__okno { height: var(--dc3d-h-tel, 500px); border-radius: 14px; }
    .dc3d__gora { left: 10px; top: 10px; }
    .dc3d__tytul span { display: none; }
    .dc3d__narzedzia { right: 10px; top: auto; bottom: 10px; }
    .dc3d__btn--pelny { display: none; }
    .dc3d__legenda { left: auto; right: 10px; top: 10px; bottom: auto; flex-direction: column; padding: 6px 10px; }
    .dc3d__postep { top: auto; bottom: 108px; }
    /* FOTO na telefonie: większy kadr, na zdjęciu tylko to, co niezbędne (reszta jest w panelu pod spodem) */
    .dc3d--foto .dc3d__okno { aspect-ratio: 16 / 10; }
    .dc3d--foto.dc3d--z-panelem .dc3d__tytul, .dc3d--foto.dc3d--z-panelem .dc3d__legenda, .dc3d--foto.dc3d--z-panelem .dc3d__btn--tekst { display: none; }
    .dc3d--foto .dc3d__gora { left: 8px; top: 8px; max-width: calc(100% - 16px); }
    .dc3d--foto .dc3d__zywe { padding: 4px 9px; font-size: .7rem; }
    .dc3d--foto .dc3d__narzedzia { right: 8px; bottom: 8px; gap: 4px; }
    .dc3d--foto .dc3d__btn { min-width: 32px; height: 32px; padding: 0 8px; font-size: .95rem; }
    .dc3d--foto .dc3d__btn--pelny { display: grid; }
    .dc3d--foto .dc3d__podpowiedz { bottom: 48px; font-size: .68rem; }
    .dc3d--foto .dc3d__postep { bottom: 48px; }
    .dc3d--foto .dc3d__pin { padding: 3px 7px 3px 6px; font-size: .68rem; }
    /* karta domu jako arkusz od dołu ekranu (bez izolacji okna, inaczej panel pod spodem ją zasłania) */
    .dc3d--foto .dc3d__okno { isolation: auto; }
    .dc3d--foto .dc3d__karta { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 99990; width: auto; max-height: 60vh; border-radius: 18px 18px 0 0; box-shadow: 0 -18px 50px -12px rgba(15, 23, 42, .45); padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
    .dc3d__gora { max-width: calc(100% - 130px); }
    .dc3d__podpowiedz { bottom: 56px; font-size: .72rem; white-space: normal; width: max-content; max-width: calc(100% - 20px); text-align: center; }
    .dc3d__karta { left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; max-height: 72%; border-radius: 14px; }
    .dc3d__karta--form { width: auto; }
    /* LITE: tytuł i „na żywo” zajmują dwa wiersze, więc kompas w lewym dolnym rogu (obok narzędzi) */
    .dc3d__kompas { left: 10px; top: auto; bottom: 10px; width: 38px; height: 38px; }
    .dc3d--porownanie:not(.dc3d--foto) .dc3d__kompas { display: none; }
    .dc3d--foto .dc3d__kompas { left: 8px; top: 38px; bottom: auto; width: 34px; height: 34px; }
    .dc3d--foto .dc3d__kompas-igla { height: 15px; margin-top: -5px; }
    .dc3d__btn--slonce .dc3d__btn-etykieta, .dc3d__btn-etykieta { display: none; }
    .dc3d--z-panelem .dc3d__btn--wolne { display: none; }   /* filtr statusu jest w panelu pod makietą */
    .dc3d--osm .dc3d__narzedzia { bottom: 24px; }
    .dc3d--foto.dc3d--osm .dc3d__narzedzia { bottom: 22px; }
    .dc3d--osm .dc3d__slonce { bottom: 68px; }
    .dc3d__okolica { left: 10px; right: 10px; bottom: 54px; width: auto; max-height: calc(100% - 64px); padding: 10px 12px; transform: none; }
    .dc3d--osm .dc3d__okolica { bottom: 68px; max-height: calc(100% - 78px); }
    /* telefon: panel niski, żeby nad nim było widać pinezki przy horyzoncie */
    .dc3d__okolica, .dc3d--osm .dc3d__okolica { max-height: 54%; }
    .dc3d__okolica-kat { flex-wrap: nowrap; margin-right: -12px; padding-right: 12px; overflow-x: auto; scrollbar-width: none; }
    .dc3d__okolica-kat::-webkit-scrollbar { display: none; }
    .dc3d__okolica-chip { flex: none; }
    .dc3d__okolica-lista { max-height: 104px; }
    .dc3d__okolica-stopka { display: none; }
    /* FOTO na telefonie: okno makiety jest niskie — lista jako arkusz od dołu ekranu (jak karta domu) */
    .dc3d--foto .dc3d__okolica, .dc3d--foto.dc3d--osm .dc3d__okolica { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 99990; width: auto; max-height: 44vh; border-radius: 18px 18px 0 0; background: #fff; padding-bottom: calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -18px 50px -12px rgba(15, 23, 42, .45); transform: none; }
    .dc3d--foto .dc3d__okolica-lista { max-height: 30vh; }
    .dc3d-galeria__obraz { max-height: 58vh; }
    .dc3d-galeria__nav { width: 38px; height: 38px; margin-top: -19px; font-size: 1.35rem; }
    .dc3d-galeria__min { width: 70px; height: 46px; }
    .dc3d__slonce { left: 10px; right: 10px; bottom: 54px; width: auto; padding: 10px 12px; transform: none; }
    .dc3d__slonce-info { min-height: 0; }
    .dc3d--foto .dc3d__karta--form { max-height: 86vh; }
    .dc3d__porownanie { left: 10px; bottom: 10px; max-width: calc(100% - 150px); padding: 4px; }
    .dc3d--foto .dc3d__porownanie { left: 8px; bottom: 8px; }
    .dc3d__porownanie-lista { display: none; }
    .dc3d-modal { align-items: end; padding: 0; }
    .dc3d-modal__okno { max-height: 88vh; max-height: 88dvh; border-radius: 18px 18px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
    .dc3d-modal table.dc3d-por { min-width: 330px; font-size: .8125rem; }
    .dc3d-modal .dc3d-por th, .dc3d-modal .dc3d-por td { padding: 7px 6px; }
    .dc3d-modal .dc3d-por tbody th { position: sticky; left: 0; z-index: 1; background: #fff; white-space: normal; }
    .dc3d-modal .dc3d-por thead b { font-size: .875rem; }
    .dc3d-por .dc3d__akcja { min-height: 34px; padding: 5px 8px; font-size: .75rem; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
    .dc3d__pin-cena, .dc3d__plakat, .dc3d__podpowiedz, .dc3d__btn, .dc3d__obrys polygon, .dc3d__chip, .dc3d__wynik { transition: none; }
    .dc3d__karta, .dc3d__postep::before, .dc3d__porownanie, .dc3d-modal, .dc3d-modal__okno, .dc3d__slonce { animation: none; }
    .dc3d__kompas, .dc3d__slonce-chip, .dc3d__slonce-akcja { transition: none; }
    .dc3d__okolica { animation: none; }
    .dc3d__punkt-nazwa, .dc3d__okolica-chip, .dc3d__okolica-poz, .dc3d-galeria__nav, .dc3d-galeria__min { transition: none; }
    .dc3d__akcja, .dc3d__narz-btn, .dc3d__rzut, .dc3d__podobny, .dc3d .dc3d__pole-f input, .dc3d .dc3d__pole-f textarea { transition: none; }
    .dc3d__zywe.is-ok i, .dc3d__stan::before { animation: none; }
}

/* ═══════════════ 1.5: KALKULATOR KREDYTU (wtyczka DeweloperCeny 2.24+) ═══════════════ */
.dc3d__rata {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px;
    width: 100%; margin: 10px 0 0; padding: 9px 12px; border: 1px solid var(--dc3d-linia); border-radius: 10px;
    background: #f8fafc; color: var(--dc3d-tusz); font: inherit; font-size: .84rem; text-align: left; cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease;
}
.dc3d__rata span { font-variant-numeric: tabular-nums; }
.dc3d__rata b { color: var(--dc3d-akcent); font-weight: 700; white-space: nowrap; }
.dc3d__rata b::after { content: " \2192"; }
.dc3d__rata:focus-visible { outline: 3px solid var(--dc3d-akcent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .dc3d__rata:hover { border-color: var(--dc3d-akcent); background: #fff; } }
.dc3d-modal--kalk .dc3d-modal__okno { max-width: 720px; }
.dc3d-modal--kalk .dew-kalk { --dew-kalk-w: #0f172a; --dew-kalk-wk: #fff; margin: 0; padding: 0; border: 0; border-radius: 0; }
.dc3d-modal--kalk .dew-kalk__gora { display: none; }
@media (prefers-reduced-motion: reduce) { .dc3d__rata { transition: none; } }

/* ═══════════════ 1.5: WARIANTY FOTO — noc, słońce w ogrodach, widoki ═══════════════ */
/* Ujęcie słońca zamiast orbity: obrysy, pinezki lokali i punkty okolicy chowają się (inna kamera) */
.dc3d__ujecie { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.dc3d__ujecie[hidden] { display: none; }
.dc3d--ujecie .dc3d__obrysy, .dc3d--ujecie .dc3d__pinezki, .dc3d--ujecie .dc3d__punkty,
.dc3d--ujecie .dc3d__podpowiedz, .dc3d--ujecie .dc3d__dymek, .dc3d--ujecie .dc3d__postep { visibility: hidden; }
.dc3d--ujecie .dc3d__legenda { display: none; }
.dc3d--ujecie .dc3d__scena--foto { cursor: default; }
.dc3d__slonce-pod { margin: -4px 0 8px; color: var(--dc3d-tusz-2); font-size: .75rem; line-height: 1.4; }
/* FOTO: panel przy lewej krawędzi (legenda jest wtedy schowana), środek ujęcia — ogrody — zostaje odsłonięty */
@media (min-width: 641px) { .dc3d__slonce--foto { left: 14px; transform: none; width: min(360px, calc(100% - 28px)); } }
/* Telefon: okno makiety FOTO jest niskie, więc panel słońca jest arkuszem od dołu ekranu (jak karta i okolica) */
@media (max-width: 640px) {
    .dc3d--foto .dc3d__slonce--foto { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 99990; width: auto; max-height: 50vh; overflow: auto; border-radius: 18px 18px 0 0; background: #fff; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -18px 50px -12px rgba(15, 23, 42, .45); transform: none; }
    .dc3d__slonce--foto .dc3d__slonce-pod { display: none; }
}
/* Noc w FOTO: przycisk wciśnięty w kolorze nocnego nieba */
.dc3d__btn--noc[aria-pressed="true"] { background: #1e2a4a; color: #ffe1a8; }
@media (hover: hover) and (pointer: fine) { .dc3d__btn--noc[aria-pressed="true"]:hover { background: #1e2a4a; } }
