/* Accessibility widget — fixed pixel sizes on purpose, so the widget
   itself stays stable while the visitor scales the site's text. */

.a11y-root { font-family: Arial, "Helvetica Neue", sans-serif; direction: rtl; }

.a11y-toggle {
  position: fixed;
  left: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 700;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(233,221,200,0.35);
  background: rgba(14,7,7,0.82);
  color: #efe6d6;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.a11y-toggle:hover { border-color: #c9a24a; color: #c9a24a; }
.a11y-toggle svg { width: 22px; height: 22px; display: block; }

.a11y-panel {
  position: fixed;
  left: 12px;
  bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  z-index: 700;
  width: 280px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid rgba(233,221,200,0.3);
  border-radius: 4px;
  background: #100808;
  color: #efe6d6;
  font-size: 14px;
  line-height: 1.4;
}
.a11y-panel[hidden] { display: none; }

.a11y-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
}
.a11y-panel-title { margin: 0; font-size: 16px; font-weight: 700; }
.a11y-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(233,221,200,0.3);
  border-radius: 3px;
  background: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
}

.a11y-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.a11y-btn {
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid rgba(233,221,200,0.28);
  border-radius: 3px;
  background: rgba(233,221,200,0.05);
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
}
.a11y-btn:hover { border-color: #c9a24a; }
.a11y-btn[aria-pressed="true"] {
  background: #c9a24a;
  border-color: #c9a24a;
  color: #150a0a;
  font-weight: 700;
}
.a11y-btn-wide { grid-column: 1 / -1; }

.a11y-size-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 6px;
  align-items: stretch;
}
.a11y-size-label {
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid rgba(233,221,200,0.16);
  border-radius: 3px;
}

.a11y-footer {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.a11y-footer .a11y-btn { flex: 1; }


.a11y-root :focus-visible {
  outline: 3px solid #ffd76a;
  outline-offset: 2px;
}

.a11y-skip {
  position: fixed;
  top: -60px;
  right: 12px;
  z-index: 710;
  padding: 10px 16px;
  background: #ffd76a;
  color: #150a0a;
  font: 700 15px Arial, sans-serif;
  border-radius: 3px;
  text-decoration: none;
}
.a11y-skip:focus { top: 12px; outline: 3px solid #150a0a; }

/* ---------------- Modes applied to <html> ---------------- */

html { --a11y-scale: 1; }
html.a11y-scaled { font-size: calc(100% * var(--a11y-scale)); }
@media (min-width: 900px) {
  html.a11y-scaled { font-size: calc(106.25% * var(--a11y-scale)); }
}

html.a11y-contrast {
  --ink: #ffffff;
  --ink-dim: #ffffff;
  --cream: #ffffff;
  --gold: #ffd76a;
}
html.a11y-contrast #tracklist { --ink-dim: #ffffff; }
html.a11y-contrast .page-bg { opacity: 0.18; }
html.a11y-contrast body { background: #000; }
html.a11y-contrast .track-tag,
html.a11y-contrast .tracklist-subtext,
html.a11y-contrast .track-note-edit-toggle { color: #ffffff; }
html.a11y-contrast .track,
html.a11y-contrast .track-list { border-color: rgba(255,255,255,0.55); }

html.a11y-gray { filter: grayscale(1); }

html.a11y-links a { text-decoration: underline !important; text-underline-offset: 3px; }

html.a11y-font body,
html.a11y-font button,
html.a11y-font input,
html.a11y-font textarea,
html.a11y-font .handwritten-heading,
html.a11y-font .track-name,
html.a11y-font .track-detail-title,
html.a11y-font .track-lyric {
  font-family: Arial, "Helvetica Neue", sans-serif !important;
  font-style: normal !important;
}
html.a11y-font .a11y-root { font-family: Arial, sans-serif !important; }

html.a11y-spacing body { line-height: 1.9; letter-spacing: 0.04em; word-spacing: 0.14em; }
html.a11y-spacing .a11y-root { letter-spacing: normal; word-spacing: normal; }

html.a11y-focus :focus,
html.a11y-focus :focus-visible {
  outline: 3px solid #ffd76a !important;
  outline-offset: 3px !important;
}

html.a11y-motion *,
html.a11y-motion *::before,
html.a11y-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html.a11y-motion .grain-overlay,
html.a11y-motion .scratch-overlay,
html.a11y-motion .hero-holo { display: none !important; }

html.a11y-cursor,
html.a11y-cursor * {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'><path d='M3 2l16 9-7 2-3 7z' fill='black' stroke='white' stroke-width='1.6' stroke-linejoin='round'/></svg>") 3 2, auto !important;
}

.a11y-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.a11y-root[dir="ltr"] { direction: ltr; }
