/* Mobile-only enhancement. Wider layouts remain owned by the original theme. */
#zpm-root{display:none}
.zpm-year-select,.zpm-year-label{display:none}
@media(max-width:1023px){
 html{scroll-padding-top:12px}
 body:not(.zpm-active) #kontener{max-width:100%;width:auto}
 body.zpm-active{margin:0;background:#f2f4f6;color:#26333f;font-family:wlasny,Arial,Helvetica,sans-serif}
 /* Hide only the legacy theme, never body-level gallery/dialog overlays. */
 body.zpm-active>#kontener,body.zpm-active>#footer,body.zpm-active>#content_center,body.zpm-active>#srodek{display:none!important}
 body.zpm-active #zpm-root{display:block}
 #zpm-root{--zpm-accent:#07869d;--zpm-scale:1;font-size:calc(16px * var(--zpm-scale));line-height:1.5;overflow-wrap:break-word}
 #zpm-root *,#zpm-root *:before,#zpm-root *:after{box-sizing:border-box}
 #zpm-root [hidden]{display:none!important}
 #zpm-root a{color:inherit;text-decoration:none}
 #zpm-root button,#zpm-root input,#zpm-root select{font:inherit}
 #zpm-root button,#zpm-root summary{cursor:pointer;-webkit-tap-highlight-color:transparent}
 #zpm-root button{border:0}
 #zpm-root :focus-visible{outline:3px solid #f9bc31;outline-offset:3px}
 #zpm-root .zpm-icon{width:28px;height:28px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
 #zpm-root .zpm-pattern{background-color:#00566d;background-image:linear-gradient(105deg,rgba(0,69,91,.70),rgba(0,86,110,.56)),url('tlo_desen_gora.jpg');background-size:auto,390px;color:white}
 #zpm-root .zpm-header{min-height:158px;padding:22px 12px;display:flex;align-items:center;gap:10px}
 #zpm-root .zpm-brand{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
 #zpm-root .zpm-brand img{width:clamp(65px,20vw,90px);height:auto;flex:none}
 #zpm-root .zpm-brand strong{display:block;font-weight:800;font-size:clamp(20px,6.4vw,31px);line-height:1.1;letter-spacing:-1px;white-space:nowrap}
 #zpm-root .zpm-brand small{display:block;font-size:clamp(11px,3.25vw,15px);line-height:1.35;margin-top:7px}
 #zpm-root .zpm-menu-button{display:flex;flex-direction:column;align-items:center;background:transparent;color:white;min-width:44px;padding:0;font-size:14px;font-weight:700;gap:3px}
 #zpm-root .zpm-menu-button svg{width:35px;height:35px;stroke-width:3}
 #zpm-root .zpm-skip{position:absolute;top:0;left:8px;transform:translateY(-160%);z-index:10010;background:white;color:#00566d;padding:8px}
 #zpm-root .zpm-skip:focus{transform:translateY(0)}
 #zpm-root summary{list-style:none}
 #zpm-root summary::-webkit-details-marker{display:none}
 #zpm-root .zpm-section{--zpm-accent:#008fa8;--zpm-start:#008cab;--zpm-end:#00d4e1;margin:0}
 #zpm-root .zpm-preschool{--zpm-accent:#438c20;--zpm-start:#37803c;--zpm-end:#9adb10}
 #zpm-root .zpm-school{--zpm-accent:#d85500;--zpm-start:#e6530b;--zpm-end:#ff9d00}
 #zpm-root .zpm-official{--zpm-accent:#d91e30;--zpm-start:#ac2731;--zpm-end:#ff2835}
 #zpm-root .zpm-section>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:65px;padding:15px 20px;background:linear-gradient(100deg,var(--zpm-start),var(--zpm-end));color:white;font-weight:800;font-size:calc(27px * var(--zpm-scale));line-height:1.16}
 #zpm-root .zpm-section>summary>.zpm-icon{width:28px;height:28px;stroke-width:3}
 #zpm-root details[open]>summary>.zpm-icon:last-child{transform:rotate(180deg)}
 #zpm-root .zpm-panel{background:white;padding:0 12px;color:var(--zpm-accent)}
 #zpm-root .zpm-links{list-style:none;padding:0;margin:0}
 #zpm-root .zpm-links>li{list-style:none;margin:0;padding:0;border-bottom:1px solid #dfe7eb}
 #zpm-root .zpm-links>li:last-child{border-bottom:0}
 #zpm-root .zpm-links>li>a,#zpm-root .zpm-submenu>summary,#zpm-root .zpm-official-link{display:flex;align-items:center;gap:16px;min-height:52px;padding:12px 8px;color:inherit;font-size:calc(16px * var(--zpm-scale));line-height:1.4}
 #zpm-root .zpm-links span{min-width:0}
 #zpm-root .zpm-submenu>summary>span{flex:1}
 #zpm-root .zpm-submenu>summary>.zpm-icon:last-child{width:20px;height:20px}
 #zpm-root .zpm-nested{margin-left:44px}
 #zpm-root .zpm-nested>li>a,#zpm-root .zpm-nested .zpm-submenu>summary{font-size:calc(15px * var(--zpm-scale));min-height:44px;padding:10px 4px}
 #zpm-root .zpm-parent-link{display:block;margin-left:44px;padding:10px 4px;text-decoration:underline;font-size:14px}
 #zpm-root .zpm-emblem{display:block;width:59px;height:66px;margin:auto;padding:0}
 #zpm-root .zpm-official .zpm-panel{padding-top:20px}
 #zpm-root .zpm-official-link{border-bottom:1px solid #dfe7eb;padding:16px 8px}
 #zpm-root .zpm-official-link small{display:block;font-size:12px;letter-spacing:2px}
 #zpm-root .zpm-footer{text-align:center;padding:28px 12px 24px}
 #zpm-root .zpm-footer address{font-style:normal;font-size:calc(14px * var(--zpm-scale));line-height:1.7}
 #zpm-root .zpm-email{white-space:nowrap;font-size:clamp(12px,3.7vw,16px)}
 #zpm-root .zpm-tools{display:flex;justify-content:center;gap:24px;margin-top:20px}
 #zpm-root .zpm-tools>a,#zpm-root .zpm-tools>button{display:grid;place-items:center;background:transparent;color:white;width:44px;height:44px;padding:4px}
 #zpm-root .zpm-tools svg{width:34px;height:34px}
 #zpm-root .zpm-search,#zpm-root .zpm-access{margin-top:16px;text-align:left}
 #zpm-root .zpm-search label{display:block;margin-bottom:8px}
 #zpm-root .zpm-search>div{display:flex;gap:8px}
 #zpm-root .zpm-search input{min-width:0;width:100%;padding:10px;border:1px solid #9bb5c0;border-radius:4px;background:white;color:#26333f}
 #zpm-root .zpm-search button,#zpm-root .zpm-access button{padding:10px;background:white;color:#00566d;border-radius:4px}
 #zpm-root .zpm-access{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
 #zpm-root .zpm-access [aria-pressed=true]{background:#ffe39d;color:#111}
 #zpm-root .zpm-overlay{position:fixed;inset:0;background:rgba(0,30,40,.12);z-index:100001}
 #zpm-root .zpm-drawer{position:fixed;right:0;top:0;bottom:0;width:min(82vw,360px);height:100dvh;overflow:auto;overscroll-behavior:contain;box-shadow:-4px 0 16px #00364720;border-radius:14px 0 0 14px;z-index:100002;display:flex;flex-direction:column;padding:20px 0 24px}
 #zpm-root .zpm-close{align-self:flex-end;width:44px;height:44px;margin:0 12px 16px;background:none;color:white}
 #zpm-root .zpm-close svg{width:36px;height:36px;stroke-width:2.5}
 #zpm-root .zpm-drawer h2{color:white;font-size:28px;line-height:1.2;margin:0;padding:6px 20px 22px;text-shadow:none;font-weight:800}
 #zpm-root .zpm-drawer .zpm-links>li{border-color:#ffffff20}
 #zpm-root .zpm-drawer .zpm-links>li>a{padding:20px;gap:18px;font-size:21px;font-weight:700;min-height:72px}
 #zpm-root .zpm-drawer a[aria-current=page]{color:#09def0;border-left:5px solid #09def0;padding-left:15px}
 #zpm-root .zpm-drawer-brand{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:auto;padding:40px 12px 4px;font-size:20px}
 #zpm-root .zpm-drawer-brand img{width:58px;height:auto}
 body.zpm-lock{overflow:hidden!important}
 #zpm-root .zpm-breadcrumb{display:flex;flex-wrap:wrap;gap:8px;padding:16px;color:#657080;font-size:14px;line-height:1.4}
 #zpm-root .zpm-breadcrumb>span:last-child{color:#006b84}
 #zpm-root .zpm-content{padding:0 12px 24px;background:#f2f4f6;color:#26333f}
 #zpm-root #artykuly{width:auto!important;max-width:100%;float:none;margin:0;padding:0;position:static;font:inherit;color:inherit}
 #zpm-root .zpm-content h1,#zpm-root .zpm-content h2{font:bold calc(30px * var(--zpm-scale))/1.2 wlasny,Arial,sans-serif;margin:10px 0 20px;padding:0;color:#006c85;text-shadow:none}
 #zpm-root .zpm-content h3{font:bold calc(21px * var(--zpm-scale))/1.3 wlasny,Arial,sans-serif;margin:0 0 12px;padding:0;color:#00788d;text-shadow:none}
 #zpm-root .zpm-content h4{font:bold calc(17px * var(--zpm-scale))/1.4 wlasny,Arial,sans-serif;margin:0 0 8px;padding:0}
 #zpm-root .zpm-content p{margin:0 0 16px;line-height:1.65}
 #zpm-root .zpm-content a{color:#007e98;text-decoration:underline;text-underline-offset:3px}
 #zpm-root .zpm-content h3 a{text-decoration:none}
 #zpm-root .zpm-content img{max-width:100%!important;height:auto!important;object-fit:contain}
 #zpm-root .zpm-content iframe{max-width:100%!important;width:100%!important;border:0;min-height:230px}
 #zpm-root .zpm-content .tresc,#zpm-root .zpm-content .content,#zpm-root .zpm-content article,#zpm-root .zpm-content .tresc_artykulu{width:auto!important;max-width:100%;height:auto;float:none;margin:0 0 16px;padding:16px;background:white;border:0;border-radius:8px;column-count:1!important;text-align:left;line-height:1.6;font-size:calc(16px * var(--zpm-scale))}
 #zpm-root .zpm-content article article,#zpm-root .zpm-content .tresc_artykulu .content,#zpm-root .zpm-content .tresc .content{padding:0;background:transparent}
 #zpm-root .zpm-content .trzy_kolumny{column-count:1!important;column-gap:0}
 #zpm-root .zpm-content ul:not(.page-numbers){list-style:disc;padding-left:22px}
 #zpm-root .zpm-content li{margin-bottom:8px}
 #zpm-root .zpm-content .miniaturka{float:none;margin:8px 0 12px;width:auto;max-width:100%}
 #zpm-root .zpm-content .miniaturka img{display:block;max-height:220px;width:100%!important;object-fit:cover;object-position:center top}
 #zpm-root .zpm-content .d_t{display:flex;flex-wrap:wrap;gap:6px 14px;height:auto;width:auto;margin:4px 0 12px;padding:0;font-size:12px;color:#626e78}
 #zpm-root .zpm-content .data,#zpm-root .zpm-content .autor{height:auto;float:none;margin:0;padding-left:18px;line-height:1.5;font-size:12px}
 #zpm-root .zpm-content table{width:100%!important;max-width:100%;border-collapse:collapse;font-size:calc(15px * var(--zpm-scale));margin:14px 0;table-layout:fixed}
 #zpm-root .zpm-content td,#zpm-root .zpm-content th{width:auto!important;height:auto;padding:9px 7px;text-align:left;border:0;border-bottom:1px solid #dce4ea;vertical-align:top;overflow-wrap:anywhere}
 #zpm-root .zpm-content tr:nth-child(even){background:#f1f5f7}
 #zpm-root .zpm-content th{font-weight:700;background:#e2f1f5}
 #zpm-root .zpm-content .zpm-table-scroll{overflow-x:auto;max-width:100%}
 #zpm-root .zpm-content .zpm-phone-table,#zpm-root .zpm-content .zpm-phone-table tbody{display:block}
 #zpm-root .zpm-content .zpm-phone-table tr{display:flex;flex-wrap:wrap;padding:14px 12px;border-bottom:1px solid #dce4ea;gap:4px 8px;content-visibility:visible!important;contain-intrinsic-size:none!important}
 #zpm-root .zpm-content .zpm-phone-table td{display:block;border:0;padding:0;line-height:1.5;font-size:calc(16px * var(--zpm-scale));content-visibility:visible!important;contain-intrinsic-size:none!important}
 #zpm-root .zpm-content .zpm-phone-table td:first-child{flex-basis:100%;font-weight:700;color:#006b84;margin-bottom:4px}
 #zpm-root .zpm-content .zpm-phone-table td:nth-child(3){white-space:nowrap}
 #zpm-root .zpm-content .dyrekcja{width:auto;float:none;margin:0 0 24px;padding:0}
 #zpm-root .zpm-content .dyrekcja>img{display:block;float:none;width:120px!important;margin:0 auto 16px}
 #zpm-root .zpm-content .dyrekcja table{float:none;width:100%!important;margin:0}
 #zpm-root .zpm-content .zpm-staff-table,#zpm-root .zpm-content .zpm-staff-table tbody{display:block}
 #zpm-root .zpm-content .zpm-staff-table tr{display:block;padding:12px 0;border-bottom:1px solid #dce4ea}
 #zpm-root .zpm-content .zpm-staff-table tr,#zpm-root .zpm-content .zpm-staff-table td{content-visibility:visible!important;contain-intrinsic-size:none!important}
 #zpm-root .zpm-content .zpm-staff-table td{display:block;border:0;padding:2px 8px;font-size:calc(16px * var(--zpm-scale));line-height:1.6}
 #zpm-root .zpm-content .zpm-staff-table td:first-child{font-weight:700;color:#006b84}
 #zpm-root .zpm-content .zpm-staff-heading{display:none!important}
 #zpm-root .zpm-content .zpm-staff-numbered td:first-child{display:none}
 #zpm-root .zpm-content .zpm-staff-numbered td:nth-child(2){font-weight:700;color:#006b84}
 #zpm-root .zpm-content #kadra_rok{display:none}
 #zpm-root .zpm-year-label{display:block;font-size:14px;margin:0 0 6px}
 #zpm-root .zpm-year-select{display:block;width:100%;min-height:44px;padding:9px;color:#006b84;background:white;border:1px solid #98b8c3;border-radius:4px;margin:0 0 16px}
 #zpm-root .zpm-content #sekret,#zpm-root .zpm-content #maps{float:none;width:auto!important;margin:0 0 20px;padding:0;position:static}
 #zpm-root .zpm-content #sekret table,#zpm-root .zpm-content #sekret tbody,#zpm-root .zpm-content #sekret tr,#zpm-root .zpm-content #sekret td{display:block;width:auto!important;background:none;border:0;padding:0}
 #zpm-root .zpm-content #sekret tr{margin:12px 0}
 #zpm-root .zpm-content #sekret td:first-child{font-size:13px;color:#62717c}
 #zpm-root .zpm-content #sekret a{font-size:clamp(12px,3.8vw,16px);white-space:nowrap}
 #zpm-root .zpm-content #paginacja{margin:20px 0;padding:0;width:auto}
 #zpm-root .zpm-content .page-numbers{display:flex;flex-wrap:wrap;gap:6px;list-style:none;padding:0;margin:0;justify-content:center;position:static;float:none;transform:none;left:auto;right:auto;width:auto;height:auto}
 #zpm-root .zpm-content .page-numbers li{margin:0;width:auto;height:auto;position:static;float:none}
 #zpm-root .zpm-content a.page-numbers,#zpm-root .zpm-content span.page-numbers{min-width:40px;min-height:44px;display:grid;place-items:center;padding:6px 10px;border:1px solid #b3cbd6;border-radius:4px;color:#006b84;text-decoration:none}
 #zpm-root .zpm-content .page-numbers.current{background:#006b84;color:white}
 #zpm-root .zpm-large-text{--zpm-scale:1.15}
 #zpm-root.zpm-large-text{--zpm-scale:1.15}
 #zpm-root.zpm-high-contrast .zpm-panel,#zpm-root.zpm-high-contrast .zpm-content,#zpm-root.zpm-high-contrast .zpm-content *{background-color:#fff!important;color:#111!important}
 #zpm-root.zpm-high-contrast .zpm-pattern,#zpm-root.zpm-high-contrast .zpm-section>summary{background:#003849!important;color:white}
 #zpm-root.zpm-high-contrast .zpm-links>li{border-color:#111}
 @media(prefers-reduced-motion:no-preference){#zpm-root .zpm-drawer{animation:zpm-enter .18s ease-out}@keyframes zpm-enter{from{transform:translateX(100%)}to{transform:translateX(0)}}}
}

@media(max-width:1023px){
 #zpm-root .zpm-drawer-footer{margin-top:auto;padding:20px 12px;text-align:center}
 #zpm-root .zpm-drawer-footer address{font-style:normal;font-size:14px;line-height:1.8;margin-top:20px}
 #zpm-root .zpm-drawer-footer .zpm-email{white-space:normal;overflow-wrap:anywhere;font-size:13px}
 #zpm-root .zpm-access{display:flex;flex-direction:column;gap:0;text-align:left;background:white;color:#26333f;border-radius:6px;overflow:hidden}
 #zpm-root .zpm-access button{text-align:left;border-radius:0;border-bottom:1px solid #dce4ea;min-height:48px;font-size:16px}
 #zpm-root .zpm-access button:disabled{opacity:.5;cursor:default}
 #zpm-root .zpm-setting-status{font-size:13px;padding:12px;margin:0}
 #zpm-root.zpm-underline-links a{text-decoration:underline!important;text-underline-offset:3px}
 #zpm-root .zpm-search-page{padding-top:16px}
 #zpm-root .zpm-legacy-search{display:none!important}
 #zpm-root .zpm-search button{background:#006b84;color:white;min-height:44px}
 #zpm-root.zpm-high-contrast .zpm-pattern,#zpm-root.zpm-high-contrast .zpm-section>summary{background:#002634!important;color:white}
 #zpm-root .zpm-content .zpm-phone-table td:nth-child(3){white-space:normal}
}

/* Continuous page background; monochrome print at 40% opacity. */
@media(max-width:1023px){
 body.zpm-active{background:#033641}
 #zpm-root{position:relative;isolation:isolate;min-height:100vh;min-height:100dvh;background:#033641;color:white}
 #zpm-root .zpm-pattern{position:relative;isolation:isolate;background:#033641}
 #zpm-root::before,#zpm-root .zpm-pattern::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:url('tlo_desen_gora.jpg') repeat;background-size:390px;filter:url(#zpm-dark-print);opacity:.4}
 #zpm-root .zpm-drawer{position:fixed}
 #zpm-root .zpm-content{background:transparent;color:white}
 #zpm-root .zpm-breadcrumb,#zpm-root .zpm-breadcrumb>span:last-child,#zpm-root .zpm-search-page h1{color:white}
 #zpm-root .zpm-content .tresc,#zpm-root .zpm-content .content,#zpm-root .zpm-content article,#zpm-root .zpm-content .tresc_artykulu{color:#26333f}
 #zpm-root .zpm-search-page{background:rgba(0,54,70,.72)}
 #zpm-root.zpm-high-contrast::before,#zpm-root.zpm-high-contrast .zpm-pattern::before{display:none}
}

/* Keep page titles and their articles on one readable white surface. */
@media(max-width:1023px){
 #zpm-root #zpm-content:not([hidden]){background:#fff;color:#26333f;margin:0 12px 24px;padding:16px 12px 24px;border-radius:8px}
 #zpm-root #zpm-content #artykuly>h2{margin-top:0}
}
@media(max-width:1023px){
 #zpm-root .zpm-content h2{padding-left:clamp(0px,calc((100vw - 320px) * .125),60px);position:static;padding-top:16px}
}

/* Phone cards and utility buttons match the tablet design. */
@media(max-width:599px){
 #zpm-root .zpm-sections{margin:0 12px}
 #zpm-root .zpm-section{margin-bottom:12px;border-radius:8px;overflow:hidden}
 #zpm-root .zpm-tools>a,#zpm-root .zpm-tools>button{width:48px;height:48px;border-radius:50%;background:#36aec0;color:white}
 #zpm-root .zpm-tools>button{border-radius:0;background:#10458e}
 #zpm-root .zpm-tools>a:last-child{background:#1877f2}
}
@media(max-width:1023px){
 #zpm-root .zpm-brand strong{letter-spacing:.025em}
}
@media(min-width:600px) and (max-width:1023px){
 #zpm-root .zpm-header{padding-right:40px}
}

@media(max-width:1023px){
 #zpm-root .zpm-content .miniaturka img.zpm-thumbnail-full{max-height:none!important;height:auto!important;object-fit:contain}
 #zpm-root .zpm-back-top{position:fixed;left:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:9990;width:48px;height:48px;border-radius:50%;background:#00566d;color:white;border:2px solid white;box-shadow:0 2px 8px #0004;font-size:28px;line-height:1}
}
/* Director profiles: stack the existing cells; keep desktop DOM and data. */
@media(max-width:599px){
 #zpm-root #zpm-content #artykuly:has(#tablepress-22) .tresc,
 #zpm-root #zpm-content #artykuly:has(#tablepress-22) .tresc_artykulu{padding:0!important;margin-top:0!important}
 #zpm-root #zpm-content #artykuly:has(#tablepress-22) h3:empty{display:none}
 #zpm-root #zpm-content :is(#tablepress-22,#tablepress-23){display:block!important;margin:16px 0 28px!important;width:100%!important;float:none!important}
 #zpm-root #zpm-content :is(#tablepress-22,#tablepress-23) :is(tbody,tr,td){display:block!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;float:none!important;box-sizing:border-box;content-visibility:visible!important;contain-intrinsic-size:none!important}
 #zpm-root #zpm-content :is(#tablepress-22,#tablepress-23) tr{margin:0!important;padding:10px 12px!important;border-bottom:1px solid #dce4ea}
 #zpm-root #zpm-content :is(#tablepress-22,#tablepress-23) .row-1{display:none!important}
 #zpm-root #zpm-content :is(#tablepress-22,#tablepress-23) td{padding:2px 0!important;border:0!important;font-size:calc(16px * var(--zpm-scale))!important;line-height:1.5!important;white-space:normal!important;word-break:normal!important;overflow-wrap:break-word!important}
 #zpm-root #zpm-content :is(#tablepress-22,#tablepress-23) .row-2{display:flex!important;flex-direction:column;gap:12px}
 #zpm-root #zpm-content :is(#tablepress-22,#tablepress-23) .row-2 .column-2{order:-1;font-size:calc(22px * var(--zpm-scale))!important;font-weight:bold;color:#006b84}
 #zpm-root #zpm-content :is(#tablepress-22,#tablepress-23) img{display:block;float:none!important;width:177px!important;max-width:100%!important;height:auto!important;margin:0 auto!important}
 #zpm-root #zpm-content :is(#tablepress-22,#tablepress-23) tr:not(.row-2) td:first-child{font-weight:bold}
}
