.accessibility-widget {
    position: fixed;
    right: 18px;
    bottom: 72px;
    z-index: 9999;
    font-family: Arial, sans-serif;
}

.accessibility-toggle {
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #b9b29b 0%, #8b8062 100%);
    color: #2d1104;
    box-shadow: 0 10px 25px rgba(45, 17, 4, 0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.accessibility-toggle:hover,
.accessibility-toggle:focus {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(45, 17, 4, 0.3);
    outline: none;
}

.accessibility-panel {
    position: absolute;
    right: 0;
    bottom: 68px;
    width: 320px;
    max-width: calc(100vw - 24px);
    background: rgba(247, 240, 222, 0.98);
    border: 1px solid #d4cbaf;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(45, 17, 4, 0.22);
    overflow: hidden;
    display: none;
}

.accessibility-widget.open .accessibility-panel {
    display: block;
}

.accessibility-header {
    background: linear-gradient(135deg, #2d1104 0%, #5d1d01 100%);
    color: #fff;
    padding: 14px 18px 12px;
}

.accessibility-header h3 {
    margin: 0;
    color: #fff;
    font: 700 18px Arial, sans-serif;
    text-transform: none;
}

.accessibility-header p {
    margin: 4px 0 0;
    color: #eeeadd;
    font-size: 12px;
    line-height: 18px;
}

.accessibility-body {
    padding: 14px;
}

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

.accessibility-action,
.accessibility-reset {
    border: 1px solid #d4cbaf;
    background: #fff;
    border-radius: 12px;
    min-height: 52px;
    padding: 10px 12px;
    text-align: left;
    color: #2d1104;
    font-size: 13px;
    font-weight: bold;
    line-height: 18px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.accessibility-action small {
    display: block;
    color: #6f6656;
    font-size: 11px;
    font-weight: normal;
}

.accessibility-action:hover,
.accessibility-action:focus,
.accessibility-reset:hover,
.accessibility-reset:focus {
    background: #f8f4e8;
    border-color: #8b8062;
    transform: translateY(-1px);
    outline: none;
}

.accessibility-action.active {
    background: #8b8062;
    border-color: #8b8062;
    color: #fff;
}

.accessibility-action.active small {
    color: #f3eee3;
}

.accessibility-footer {
    padding: 0 14px 14px;
}

.accessibility-reset {
    width: 100%;
    text-align: center;
    min-height: 44px;
    background: #2d1104;
    color: #fff;
    border-color: #2d1104;
}

body.acc-readable-font,
body.acc-readable-font p,
body.acc-readable-font li,
body.acc-readable-font a,
body.acc-readable-font span,
body.acc-readable-font td,
body.acc-readable-font th,
body.acc-readable-font input,
body.acc-readable-font textarea,
body.acc-readable-font select {
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: 0.02em;
}

body.acc-underline-links a {
    text-decoration: underline !important;
}

body.acc-high-contrast,
body.acc-high-contrast #body,
body.acc-high-contrast #body-inner,
body.acc-high-contrast #page,
body.acc-high-contrast .box1,
body.acc-high-contrast .box2 .inner,
body.acc-high-contrast .box3 > div,
body.acc-high-contrast .box4,
body.acc-high-contrast .box5,
body.acc-high-contrast .box6 > div > div,
body.acc-high-contrast .sidebar,
body.acc-high-contrast footer,
body.acc-high-contrast .copyright,
body.acc-high-contrast .accessibility-panel {
    background: #111 !important;
    background-image: none !important;
    color: #fff !important;
}

body.acc-high-contrast p,
body.acc-high-contrast span,
body.acc-high-contrast li,
body.acc-high-contrast div,
body.acc-high-contrast h1,
body.acc-high-contrast h2,
body.acc-high-contrast h3,
body.acc-high-contrast h4,
body.acc-high-contrast h5,
body.acc-high-contrast h6,
body.acc-high-contrast td,
body.acc-high-contrast th,
body.acc-high-contrast label {
    color: #fff !important;
    text-shadow: none !important;
}

body.acc-high-contrast a {
    color: #ffd54a !important;
}

body.acc-high-contrast input,
body.acc-high-contrast textarea,
body.acc-high-contrast select,
body.acc-high-contrast button {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #ffd54a !important;
    box-shadow: none !important;
}

body.acc-dark-mode,
body.acc-dark-mode #body,
body.acc-dark-mode #body-inner,
body.acc-dark-mode #page,
body.acc-dark-mode footer,
body.acc-dark-mode .copyright,
body.acc-dark-mode .accessibility-panel {
    background-color: #1d1b19 !important;
    background-image: none !important;
    color: #eee !important;
}

body.acc-dark-mode p,
body.acc-dark-mode span,
body.acc-dark-mode li,
body.acc-dark-mode div,
body.acc-dark-mode h1,
body.acc-dark-mode h2,
body.acc-dark-mode h3,
body.acc-dark-mode h4,
body.acc-dark-mode h5,
body.acc-dark-mode h6,
body.acc-dark-mode td,
body.acc-dark-mode th,
body.acc-dark-mode label {
    color: #eee !important;
    text-shadow: none !important;
}

body.acc-dark-mode a {
    color: #ff6b6b !important;
}

body.acc-dark-mode .accessibility-action,
body.acc-dark-mode .accessibility-reset {
    background: #2a2724;
    color: #eee;
    border-color: #5a5146;
}

body.acc-large-cursor,
body.acc-large-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='40' viewBox='0 0 28 40'%3E%3Cpath d='M3 2l20 20h-9l4 16-7 2-4-16-6 6z' fill='%232d1104' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") 2 2, auto !important;
}

body.acc-stop-animations *,
body.acc-stop-animations *:before,
body.acc-stop-animations *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

@media (max-width: 767px) {
    .accessibility-widget {
        right: 12px;
        bottom: 68px;
    }

    .accessibility-panel {
        width: 290px;
    }

    .accessibility-grid {
        grid-template-columns: 1fr;
    }
}
