/* ---------- Widget ---------- */
#ya11y-root, #ya11y-root * { box-sizing: border-box; font-family: Arial, "Segoe UI", sans-serif !important; letter-spacing: normal !important; line-height: 1.4 !important; }
#ya11y-root { position: fixed; z-index: 2147483000; direction: rtl; }
#ya11y-root.ya11y-left { left: 16px; }
#ya11y-root.ya11y-right { right: 16px; }
#ya11y-root.ya11y-bottom { bottom: 90px; }
#ya11y-root.ya11y-top { top: 120px; }

#ya11y-toggle {
	width: 56px; height: 56px; border-radius: 50%; border: 2px solid #fff;
	background: var(--ya11y-color, #1a4fa0); color: #fff; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 4px 14px rgba(0,0,0,.35); padding: 0;
}
#ya11y-toggle svg { width: 34px; height: 34px; fill: #fff; }
#ya11y-toggle:focus-visible, #ya11y-panel button:focus-visible, #ya11y-panel a:focus-visible {
	outline: 3px solid #ffbf00 !important; outline-offset: 2px !important;
}

#ya11y-panel {
	position: absolute; bottom: 66px; width: 340px; max-width: calc(100vw - 32px);
	max-height: calc(100vh - 180px); overflow-y: auto;
	background: #fff; color: #1a1a1a; border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0,0,0,.35); border: 1px solid #ccc;
}
.ya11y-left #ya11y-panel { left: 0; }
.ya11y-right #ya11y-panel { right: 0; }
.ya11y-top #ya11y-panel { bottom: auto; top: 66px; }
#ya11y-panel[hidden] { display: none !important; }

.ya11y-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--ya11y-color, #1a4fa0); color: #fff; border-radius: 12px 12px 0 0; position: sticky; top: 0; }
.ya11y-head h2 { margin: 0 !important; font-size: 18px !important; color: #fff !important; font-weight: 700; }
.ya11y-close { background: transparent !important; box-shadow: none !important; padding: 0 !important; border: 0 !important; color: #fff; font-size: 26px !important; cursor: pointer; width: 36px; height: 36px; line-height: 1 !important; border-radius: 6px; }

.ya11y-fontrow { display: flex; align-items: center; gap: 8px; padding: 12px 16px 4px; }
.ya11y-fontrow span { flex: 1; font-size: 15px !important; font-weight: 700; }
.ya11y-fontrow button { width: 44px; height: 44px; border-radius: 8px; border: 1px solid #888; background: #f3f5f9; color: #1a1a1a; font-size: 20px !important; font-weight: 700; cursor: pointer; }
.ya11y-fontrow output { min-width: 48px; text-align: center; font-size: 14px !important; }

.ya11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 16px; margin: 0; list-style: none; }
.ya11y-grid button {
	width: 100%; min-height: 72px; padding: 8px; border-radius: 10px;
	border: 1px solid #888; background: #f3f5f9; color: #1a1a1a; cursor: pointer;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
	font-size: 14px !important; text-align: center;
}
.ya11y-grid button .ya11y-ico { font-size: 22px !important; line-height: 1 !important; }
.ya11y-grid button[aria-pressed="true"] { background: var(--ya11y-color, #1a4fa0); color: #fff; border-color: var(--ya11y-color, #1a4fa0); }

.ya11y-foot { display: flex; flex-direction: column; gap: 8px; padding: 4px 16px 16px; }
.ya11y-reset { min-height: 44px; border-radius: 8px; border: 2px solid #b00020; background: #fff; color: #b00020; font-weight: 700; font-size: 15px !important; cursor: pointer; }
.ya11y-foot a { color: #0b3d91 !important; text-decoration: underline !important; font-size: 14px !important; text-align: center; }
.ya11y-hint { font-size: 12px !important; color: #555; text-align: center; margin: 0; }

/* ---------- Skip link ---------- */
.ya11y-skip { position: fixed; top: -100px; right: 16px; z-index: 2147483001; background: #000; color: #fff !important; padding: 12px 18px; border-radius: 0 0 8px 8px; font-size: 16px; text-decoration: underline; }
.ya11y-skip:focus { top: 0; outline: 3px solid #ffbf00; }

/* ---------- Reading guide ---------- */
#ya11y-guide { position: fixed; left: 0; right: 0; height: 12px; background: rgba(255,191,0,.55); border-top: 2px solid #000; border-bottom: 2px solid #000; pointer-events: none; z-index: 2147482999; display: none; }
html.ya11y-guide #ya11y-guide { display: block; }

/* ---------- Page modes (widget excluded) ---------- */
html.ya11y-grayscale body > *:not(#ya11y-root):not(#ya11y-guide) { filter: grayscale(100%) !important; }
html.ya11y-invert body > *:not(#ya11y-root):not(#ya11y-guide) { filter: invert(100%) hue-rotate(180deg) !important; }
html.ya11y-invert body { background: #000 !important; }
html.ya11y-invert body > *:not(#ya11y-root) img, html.ya11y-invert body > *:not(#ya11y-root) video { filter: invert(100%) hue-rotate(180deg) !important; }

html.ya11y-contrast body *:not(#ya11y-root):not(#ya11y-root *) { background-color: #000 !important; color: #fff !important; border-color: #fff !important; background-image: none !important; text-shadow: none !important; box-shadow: none !important; }
html.ya11y-contrast body { background: #000 !important; }
html.ya11y-contrast body a:not(#ya11y-root *), html.ya11y-contrast body a:not(#ya11y-root *) * { color: #ffff00 !important; }
html.ya11y-contrast body button:not(#ya11y-root *) { color: #ffff00 !important; border: 1px solid #ffff00 !important; }

html.ya11y-light body *:not(#ya11y-root):not(#ya11y-root *) { background-color: #fff !important; color: #000 !important; background-image: none !important; text-shadow: none !important; }
html.ya11y-light body { background: #fff !important; }
html.ya11y-light body a:not(#ya11y-root *) { color: #0000ee !important; }

html.ya11y-links body a:not(#ya11y-root *) { text-decoration: underline !important; outline: 2px solid #ffbf00 !important; outline-offset: 1px; background-color: #fff8d6 !important; color: #00008b !important; }
html.ya11y-headings body :is(h1,h2,h3,h4,h5,h6):not(#ya11y-root *) { outline: 3px dashed #d40000 !important; outline-offset: 3px; }

html.ya11y-readable body *:not(#ya11y-root *):not(i):not([class*="icon"]):not([class*="fa-"]):not([class*="eicon"]) { font-family: Arial, Helvetica, sans-serif !important; }
html.ya11y-spacing body *:not(#ya11y-root *) { line-height: 1.8 !important; letter-spacing: .12em !important; word-spacing: .16em !important; }
html.ya11y-spacing body p:not(#ya11y-root *) { margin-bottom: 2em !important; }

html.ya11y-noanim *, html.ya11y-noanim *::before, html.ya11y-noanim *::after {
	animation-duration: .001ms !important; animation-iteration-count: 1 !important;
	transition-duration: .001ms !important; scroll-behavior: auto !important;
}

html.ya11y-focus body *:focus { outline: 4px solid #ffbf00 !important; outline-offset: 2px !important; box-shadow: 0 0 0 7px #000 !important; }

html.ya11y-cursor-black, html.ya11y-cursor-black * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l16 10.5-7 1.3 4.2 7.6-3 1.6-4.2-7.7L4 20z' fill='%23000' stroke='%23fff' stroke-width='1.2'/%3E%3C/svg%3E") 4 2, auto !important; }
html.ya11y-cursor-white, html.ya11y-cursor-white * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l16 10.5-7 1.3 4.2 7.6-3 1.6-4.2-7.7L4 20z' fill='%23fff' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") 4 2, auto !important; }

@media (prefers-reduced-motion: reduce) {
	#ya11y-root * { transition: none !important; animation: none !important; }
}
@media print {
	#ya11y-root, #ya11y-guide, .ya11y-skip { display: none !important; }
}

/* ---------- Footer link ---------- */
.ya11y-footer-link { color: inherit !important; text-decoration: underline !important; }
.ya11y-footer-line { text-align: center; margin: 8px 0 !important; }
