/* Меню доступності — як на museum.mincult.gov.ua: кнопки з рівнями (смужки-індикатори) і перемикачі,
   класи a11y-* на <html>, стан у localStorage 'a11y-settings'. */
#a11y-panel{position:fixed;right:20px;bottom:20px;max-width:500px;width:calc(100% - 40px);max-height:calc(100svh - 100px);overflow-y:auto;background:#fff;color:#000;border-radius:20px;padding:12px;display:none;z-index:9999;flex-wrap:wrap;gap:20px;box-shadow:0 0 10px rgb(0 0 0/.1);font-size:16px!important;font-family:inherit;text-align:center}
#a11y-panel,#a11y-panel *{line-height:1!important;letter-spacing:0!important}
#a11y-panel.open{display:flex}
#a11y-panel .top-wrap{display:flex;align-items:center;justify-content:space-between;width:100%;gap:20px}
#a11y-panel .a11y-close{width:48px;min-width:48px;height:48px;display:grid;place-items:center;border:0;background:#000;border-radius:12px;cursor:pointer;padding:0}
#a11y-panel .a11y-close svg{width:40%;height:40%}
#a11y-panel .top-wrap p{font-size:1.125em;line-height:1.5!important;font-weight:400;color:#fff;background:#000;padding:15px 16px;flex:1;border-radius:12px;margin:0;text-align:center!important}
#a11y-panel .a11y-btn{width:calc(33.3333% - 13.3333px);background:#fff;border-radius:12px;padding:25px 12px 12px;color:#000;border:1px solid #000;text-align:center;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;font:inherit;font-size:1em}
@media (min-width:576px){#a11y-panel .a11y-btn:hover{box-shadow:0 0 5px rgb(0 0 0/.5)}}
#a11y-panel .a11y-btn svg{width:30px;min-width:30px;height:30px;margin-bottom:10px}
#a11y-panel .a11y-btn .label{font-size:1em;line-height:1.2!important;word-break:break-word;text-align:center!important}
#a11y-panel .a11y-btn.active{background:#000;color:#fff}
#a11y-panel .indicator{width:100%;margin:10px auto 0;display:flex;gap:6px;justify-content:center}
#a11y-panel .indicator span{height:3px;flex:1;background:rgb(255 255 255/.35);border-radius:2px}
#a11y-panel .a11y-btn:not(.active) .indicator span{background:transparent}
#a11y-panel .indicator span.active{background:#fff}
#a11y-panel .indicator.single{height:3px;background:transparent;border-radius:2px}
#a11y-panel .a11y-btn.active .indicator.single{background:#fff}
#a11y-panel .a11y-reset{width:100%;background:#000;color:#fff;border:0;border-radius:12px;padding:.75em 1em;cursor:pointer;text-align:center!important;font:inherit}
#a11y-panel :focus-visible{outline:3px solid #6E72D1;outline-offset:2px}
@media (max-width:1199px){#a11y-panel{right:15px;bottom:15px;max-height:calc(100svh - 90px)}#a11y-panel .a11y-btn svg{width:28px;min-width:28px;height:28px}}
@media (max-width:767px){#a11y-panel{left:10px;right:10px;bottom:10px;max-width:none;width:auto;padding:16px;gap:16px}#a11y-panel .a11y-btn{width:calc(33.3333% - 10.6667px)}#a11y-panel .top-wrap{gap:16px}#a11y-panel .a11y-btn svg{width:26px;min-width:26px;height:26px}}
@media (max-width:575px){#a11y-panel{inset:0;padding:12px;gap:12px;max-height:none;align-content:flex-start;width:100%;border-radius:0}#a11y-panel .top-wrap{gap:12px}#a11y-panel .a11y-close{width:35px;min-width:35px;height:35px}#a11y-panel .top-wrap p{font-size:1em;padding:9px 10px}#a11y-panel .a11y-btn{width:calc(50% - 6px);font-size:.875em;padding:8px;border-radius:0}#a11y-panel .a11y-btn svg{width:24px;min-width:24px;height:24px;margin-bottom:5px}#a11y-panel .indicator,#a11y-panel .indicator.single{margin-top:6px}#a11y-panel .indicator span,#a11y-panel .indicator.single{height:2px}#a11y-panel .a11y-reset{font-size:.875em;padding:.5em .875em;min-height:34px}}

/* effects */
html.a11y-text-1{font-size:110%}
html.a11y-text-2{font-size:120%}
html.a11y-text-3{font-size:130%}
html.a11y-line-1 body *{line-height:1.5!important}
html.a11y-line-2 body *{line-height:1.8!important}
html.a11y-line-3 body *{line-height:2!important}
html.a11y-letter-1 body *{letter-spacing:.1rem!important}
html.a11y-letter-2 body *{letter-spacing:.15rem!important}
html.a11y-letter-3 body *{letter-spacing:.2rem!important}
html.a11y-align-1 body *{text-align:left!important}
html.a11y-align-2 body *{text-align:center!important}
html.a11y-align-3 body *{text-align:right!important}
html.a11y-highlight-links body :not(.thumbnail)>a{background:yellow!important;color:#000!important;outline:2px solid #000!important}
html.a11y-hide-images body img{display:none!important}
html.a11y-hide-videos body video,html.a11y-hide-videos body iframe[src*="youtube.com"],html.a11y-hide-videos body iframe.tv-embed{display:none!important}
/* colour modes combine like on the original (contrast → saturation → inversion → grayscale); one fixed layer filters
   everything under it, so fixed popups keep their place */
html.a11y-contrast-1{--a11y-c:contrast(.8)}
html.a11y-contrast-2{--a11y-c:contrast(1.5)}
html.a11y-contrast-3{--a11y-c:contrast(2)}
html.a11y-sat-low{--a11y-s:saturate(.2)}
html.a11y-sat-high{--a11y-s:saturate(2)}
html.a11y-invert{--a11y-i:invert(1) hue-rotate(180deg)}
html.a11y-grayscale{--a11y-g:grayscale(1)}
html:is(.a11y-contrast-1,.a11y-contrast-2,.a11y-contrast-3,.a11y-sat-low,.a11y-sat-high,.a11y-invert,.a11y-grayscale)::after{content:"";position:fixed;inset:0;z-index:2147483646;pointer-events:none;-webkit-backdrop-filter:var(--a11y-c,) var(--a11y-s,) var(--a11y-i,) var(--a11y-g,);backdrop-filter:var(--a11y-c,) var(--a11y-s,) var(--a11y-i,) var(--a11y-g,)}
/* cursor: 1 — big red dot, 2 — reading strip, 3 — reading line with a pointer */
#a11y-cursor{position:fixed;z-index:2147483647;pointer-events:none;top:0;left:0;display:none}
html:is(.a11y-cursor-1,.a11y-cursor-2,.a11y-cursor-3) #a11y-cursor{display:block}
html.a11y-cursor-1 #a11y-cursor{width:50px;height:50px;background:rgb(255 0 0/.5);border:2px solid #fff;box-shadow:0 0 20px #fff;border-radius:50%;transform:translate(-50%,-50%)}
html.a11y-cursor-2 #a11y-cursor{width:100%;height:15vh;background:transparent;border-block:10px solid #fff;box-shadow:0 0 0 100vh rgb(0 0 0/.5);transform:translateY(-50%)}
html.a11y-cursor-3 #a11y-cursor{width:25vw;height:8px;background:#000;border:2px solid yellow;transform:translate(-50%,50%)}
html.a11y-cursor-3 #a11y-cursor::before{content:"";position:absolute;top:-10px;left:50%;transform:translateX(-50%);border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid yellow}
html.a11y-cursor-3,html.a11y-cursor-3 *{cursor:none!important}
