:root {
    --dpl-bg: #050505;
    --dpl-fg: #d7ff00;
    --dpl-panel: #111;
    --dpl-border: #d7ff00;
    --dpl-text: #fff;
}

.dpl-toolbar,
.dpl-toolbar * { box-sizing: border-box; }

.dpl-toolbar {
    position: fixed;
    z-index: 2147483647;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.35;
}

.dpl-position-right-bottom { right: 18px; bottom: 18px; }
.dpl-position-left-bottom { left: 18px; bottom: 18px; }
.dpl-position-right-top { right: 18px; top: 18px; }
.dpl-position-left-top { left: 18px; top: 18px; }

.dpl-toggle,
.dpl-close,
.dpl-action {
    cursor: pointer;
    border: 2px solid var(--dpl-border);
    background: var(--dpl-bg);
    color: var(--dpl-fg);
    font: inherit;
}

.dpl-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
}

.dpl-toggle-icon,
.dpl-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dpl-toggle-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.dpl-panel {
    position: absolute;
    width: min(382px, calc(100vw - 36px));
    max-height: min(720px, calc(100vh - 96px));
    overflow: auto;
    padding: 16px;
    border: 2px solid var(--dpl-border);
    border-radius: 16px;
    background: var(--dpl-panel);
    color: var(--dpl-text);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
}

.dpl-position-right-bottom .dpl-panel { right: 0; bottom: 62px; }
.dpl-position-left-bottom .dpl-panel { left: 0; bottom: 62px; }
.dpl-position-right-top .dpl-panel { right: 0; top: 62px; }
.dpl-position-left-top .dpl-panel { left: 0; top: 62px; }

.dpl-panel[hidden] { display: none !important; }

.dpl-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.dpl-title {
    display: block;
    margin: 0;
    color: var(--dpl-title, var(--dpl-text)) !important;
    background: transparent !important;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: 0;
    text-shadow: none !important;
}

.dpl-close {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
}

.dpl-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dpl-action {
    display: flex;
    min-height: 64px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
}

.dpl-action[aria-pressed="true"] {
    background: var(--dpl-fg);
    color: #000;
}

.dpl-toggle:focus-visible,
.dpl-close:focus-visible,
.dpl-action:focus-visible {
    outline: 4px solid #fff;
    outline-offset: 3px;
}

.dpl-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

html.dpl-font-1 { font-size: 106.25%; }
html.dpl-font-2 { font-size: 112.5%; }
html.dpl-font-3 { font-size: 125%; }
html.dpl-font-minus-1 { font-size: 93.75%; }
html.dpl-font-minus-2 { font-size: 87.5%; }

html.dpl-spacing body {
    letter-spacing: .08em !important;
    word-spacing: .16em !important;
    line-height: 1.75 !important;
}

html.dpl-spacing p,
html.dpl-spacing li,
html.dpl-spacing label,
html.dpl-spacing input,
html.dpl-spacing textarea,
html.dpl-spacing button {
    letter-spacing: .08em !important;
    word-spacing: .16em !important;
    line-height: 1.75 !important;
}

html.dpl-dyslexic body,
html.dpl-dyslexic button,
html.dpl-dyslexic input,
html.dpl-dyslexic textarea,
html.dpl-dyslexic select {
    font-family: Verdana, Arial, Helvetica, sans-serif !important;
}

html.dpl-contrast body {
    background: #000 !important;
    color: #fff !important;
}

html.dpl-contrast a,
html.dpl-contrast button,
html.dpl-contrast input,
html.dpl-contrast textarea,
html.dpl-contrast select {
    color: #ff0 !important;
}

html.dpl-contrast img,
html.dpl-contrast video,
html.dpl-contrast iframe { filter: contrast(1.15) !important; }

html.dpl-grayscale { filter: grayscale(1) !important; }

html.dpl-underline a,
html.dpl-cookieyes-fix .cky-notice a,
html.dpl-cookieyes-fix .cky-consent-container a,
html.dpl-cookieyes-fix [class*="cky"] a {
    text-decoration: underline !important;
    text-decoration-thickness: .12em !important;
    text-underline-offset: .16em !important;
}

html.dpl-cookieyes-fix .cky-notice a,
html.dpl-cookieyes-fix .cky-consent-container a,
html.dpl-cookieyes-fix [class*="cky"] a {
    color: #684400 !important;
}

html.dpl-focus :focus-visible {
    outline: 4px solid #ff0 !important;
    outline-offset: 4px !important;
}

html.dpl-stop-animations *,
html.dpl-stop-animations *::before,
html.dpl-stop-animations *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001s !important;
}

html.dpl-cursor-large *,
html.dpl-cursor-large *::before,
html.dpl-cursor-large *::after {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath fill='white' stroke='black' stroke-width='3' d='M8 3l27 25-13 1 8 15-7 3-8-15-9 9z'/%3E%3C/svg%3E") 8 3, auto !important;
}

html.dpl-cursor-dark *,
html.dpl-cursor-dark *::before,
html.dpl-cursor-dark *::after {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath fill='black' stroke='white' stroke-width='3' d='M8 3l27 25-13 1 8 15-7 3-8-15-9 9z'/%3E%3C/svg%3E") 8 3, auto !important;
}

.dpl-reading-line {
    display: none;
    position: fixed;
    left: 0;
    width: 100vw;
    height: 4px;
    background: #d7ff00;
    box-shadow: 0 0 0 2px #000;
    z-index: 2147483646;
    pointer-events: none;
}

html.dpl-reading-line-active .dpl-reading-line { display: block; }

.dpl-reading-mask {
    display: none;
    position: fixed;
    left: 0;
    width: 100vw;
    background: rgba(0, 0, 0, .72);
    z-index: 2147483645;
    pointer-events: none;
}

.dpl-reading-mask-top { top: 0; height: calc(var(--dpl-mask-y, 50vh) - 42px); }
.dpl-reading-mask-bottom { top: calc(var(--dpl-mask-y, 50vh) + 42px); bottom: 0; }
html.dpl-reading-mask-active .dpl-reading-mask { display: block; }

html.dpl-media-paused video,
html.dpl-media-paused iframe {
    outline: 4px solid #d7ff00 !important;
    outline-offset: 2px !important;
}

@media (max-width: 480px) {
    .dpl-position-right-bottom,
    .dpl-position-right-top { right: 12px; }
    .dpl-position-left-bottom,
    .dpl-position-left-top { left: 12px; }
    .dpl-position-right-bottom,
    .dpl-position-left-bottom { bottom: 12px; }
    .dpl-position-right-top,
    .dpl-position-left-top { top: 12px; }
    .dpl-controls { grid-template-columns: 1fr; }
}

/* 2.3.0 - mocniejszy, ale bezpieczniejszy wysoki kontrast */
html.dpl-contrast body,
html.dpl-contrast body :where(main, article, section, aside, header, footer, nav, div, p, span, li, ul, ol, h1, h2, h3, h4, h5, h6, label, table, thead, tbody, tr, td, th, blockquote, strong, em, small) {
    background-color: #000 !important;
    background-image: none !important;
    color: #fff !important;
    border-color: #fff !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

html.dpl-contrast body :where(a, a *, button, button *, input, textarea, select, summary, [role="button"], [tabindex]):not(.dpl-toolbar):not(.dpl-toolbar *) {
    color: #ff0 !important;
    border-color: #ff0 !important;
    text-shadow: none !important;
}

html.dpl-contrast body :where(input, textarea, select):not(.dpl-toolbar *) {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #ff0 !important;
}

html.dpl-contrast body :where(input::placeholder, textarea::placeholder) {
    color: #ddd !important;
    opacity: 1 !important;
}

html.dpl-contrast body :where(svg, svg *) {
    fill: currentColor !important;
    stroke: currentColor !important;
}

html.dpl-contrast .dpl-toolbar,
html.dpl-contrast .dpl-toolbar * {
    background-color: var(--dpl-bg) !important;
    color: var(--dpl-fg) !important;
    border-color: var(--dpl-border) !important;
}

html.dpl-contrast .dpl-action[aria-pressed="true"],
html.dpl-contrast .dpl-action.dpl-is-working,
html.dpl-contrast .dpl-action.dpl-is-active {
    background-color: var(--dpl-fg) !important;
    color: #000 !important;
}

html.dpl-contrast .dpl-action[aria-pressed="true"] *,
html.dpl-contrast .dpl-action.dpl-is-working *,
html.dpl-contrast .dpl-action.dpl-is-active * {
    background-color: transparent !important;
    color: #000 !important;
}

.dpl-action.dpl-is-active,
.dpl-action.dpl-is-working {
    background: var(--dpl-fg);
    color: #000;
}

.dpl-action.dpl-is-working {
    box-shadow: 0 0 0 4px rgba(215, 255, 0, .35);
}

.dpl-action.dpl-is-working .dpl-action-text::after {
    content: " · działa";
    font-weight: 700;
}

/* 2.4.0 - wybór spokojniejszej kolorystyki paska */
.dpl-toolbar.dpl-theme-graphite-blue {
    --dpl-bg: #172033;
    --dpl-fg: #dbeafe;
    --dpl-panel: #0f172a;
    --dpl-border: #60a5fa;
    --dpl-text: #f8fafc;
    --dpl-title: #ffffff;
    --dpl-active-bg: #60a5fa;
    --dpl-active-text: #06101f;
    --dpl-active-shadow: rgba(96, 165, 250, .32);
}

.dpl-toolbar.dpl-theme-black-gold {
    --dpl-bg: #15120a;
    --dpl-fg: #f5d77b;
    --dpl-panel: #0d0b07;
    --dpl-border: #d6a93a;
    --dpl-text: #fff8e1;
    --dpl-title: #fff8e1;
    --dpl-active-bg: #d6a93a;
    --dpl-active-text: #120d03;
    --dpl-active-shadow: rgba(214, 169, 58, .32);
}

.dpl-toolbar.dpl-theme-calm-green {
    --dpl-bg: #10251c;
    --dpl-fg: #dcfce7;
    --dpl-panel: #081c15;
    --dpl-border: #4ade80;
    --dpl-text: #f0fdf4;
    --dpl-title: #f0fdf4;
    --dpl-active-bg: #4ade80;
    --dpl-active-text: #021008;
    --dpl-active-shadow: rgba(74, 222, 128, .28);
}

.dpl-toolbar.dpl-theme-wine {
    --dpl-bg: #2a0f18;
    --dpl-fg: #fff1f2;
    --dpl-panel: #1f0a11;
    --dpl-border: #f0a6b2;
    --dpl-text: #fff7f8;
    --dpl-title: #fff7f8;
    --dpl-active-bg: #f0a6b2;
    --dpl-active-text: #1a050b;
    --dpl-active-shadow: rgba(240, 166, 178, .30);
}

.dpl-toolbar.dpl-theme-classic-lime {
    --dpl-bg: #050505;
    --dpl-fg: #d7ff00;
    --dpl-panel: #111;
    --dpl-border: #d7ff00;
    --dpl-text: #fff;
    --dpl-title: #fff;
    --dpl-active-bg: #d7ff00;
    --dpl-active-text: #000;
    --dpl-active-shadow: rgba(215, 255, 0, .35);
}

.dpl-action[aria-pressed="true"],
.dpl-action.dpl-is-active,
.dpl-action.dpl-is-working,
html.dpl-contrast .dpl-action[aria-pressed="true"],
html.dpl-contrast .dpl-action.dpl-is-working,
html.dpl-contrast .dpl-action.dpl-is-active {
    background: var(--dpl-active-bg, var(--dpl-fg)) !important;
    color: var(--dpl-active-text, #000) !important;
}

.dpl-action.dpl-is-working {
    box-shadow: 0 0 0 4px var(--dpl-active-shadow, rgba(215, 255, 0, .35));
}

html.dpl-contrast .dpl-action[aria-pressed="true"] *,
html.dpl-contrast .dpl-action.dpl-is-working *,
html.dpl-contrast .dpl-action.dpl-is-active * {
    color: var(--dpl-active-text, #000) !important;
}


/* 2.5.0 - tytul panelu bez h2 i z czytelnym kontrastem */
.dpl-toolbar .dpl-title,
html.dpl-contrast .dpl-toolbar .dpl-title {
    color: var(--dpl-title, var(--dpl-text)) !important;
    background: transparent !important;
    font-size: 18px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    max-width: calc(100% - 56px);
}

@media (max-width: 480px) {
    .dpl-toolbar .dpl-title,
    html.dpl-contrast .dpl-toolbar .dpl-title {
        font-size: 16px !important;
    }
}


/* 2.6.0 - kompaktowy panel, brak poziomego scrolla i poprawiony przycisk zamykania */
.dpl-toolbar,
.dpl-toolbar * {
    box-sizing: border-box !important;
}

.dpl-toolbar button,
.dpl-toolbar .dpl-action,
.dpl-toolbar .dpl-close,
.dpl-toolbar .dpl-toggle {
    appearance: none !important;
    -webkit-appearance: none !important;
    min-width: 0 !important;
    max-width: 100% !important;
    font-family: Arial, Helvetica, sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    white-space: normal !important;
}

.dpl-panel {
    width: min(360px, calc(100vw - 28px)) !important;
    max-width: calc(100vw - 28px) !important;
    max-height: min(680px, calc(100dvh - 92px)) !important;
    padding: 14px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-gutter: stable;
}

@supports not (height: 100dvh) {
    .dpl-panel { max-height: min(680px, calc(100vh - 92px)) !important; }
}

.dpl-panel-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
}

.dpl-toolbar .dpl-title,
html.dpl-contrast .dpl-toolbar .dpl-title {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    font-size: 17px !important;
    line-height: 1.2 !important;
}

.dpl-close,
html.dpl-contrast .dpl-toolbar .dpl-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border: 2px solid var(--dpl-border) !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--dpl-title, var(--dpl-text)) !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

.dpl-close:hover,
.dpl-close:active,
html.dpl-contrast .dpl-toolbar .dpl-close:hover,
html.dpl-contrast .dpl-toolbar .dpl-close:active {
    background: var(--dpl-active-bg, var(--dpl-border)) !important;
    color: var(--dpl-active-text, #000) !important;
}

.dpl-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
}

.dpl-action {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 56px !important;
    padding: 8px 8px !important;
    border-radius: 10px !important;
    gap: 3px !important;
    overflow: hidden !important;
    line-height: 1.12 !important;
}

.dpl-action-icon {
    font-size: 14px !important;
    line-height: 1 !important;
    min-height: 14px !important;
}

.dpl-action-text {
    display: block !important;
    max-width: 100% !important;
    font-size: 13px !important;
    line-height: 1.12 !important;
    font-weight: 700 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    hyphens: auto !important;
}

.dpl-toggle {
    border-radius: 0 !important;
    min-height: 48px !important;
}

@media (max-width: 420px) {
    .dpl-panel {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        padding: 12px !important;
    }
    .dpl-controls { gap: 7px !important; }
    .dpl-action {
        min-height: 52px !important;
        padding: 7px 6px !important;
    }
    .dpl-action-text { font-size: 12px !important; }
    .dpl-toolbar .dpl-title,
    html.dpl-contrast .dpl-toolbar .dpl-title { font-size: 16px !important; }
}

@media (max-width: 340px) {
    .dpl-controls { grid-template-columns: 1fr !important; }
}
