/* SoulsGuides — ajustes globales de accesibilidad */

/* Ajustes de lectura */

html.sg-a11y-readable-font body,
html.sg-a11y-readable-font body * {
  font-family: Arial, Verdana, sans-serif !important;
}

html.sg-a11y-line-spacing body * {
  line-height: 1.85 !important;
}

html.sg-a11y-letter-spacing body * {
  letter-spacing: .045em !important;
  word-spacing: .08em !important;
}

/* Add a visible shape cue to labels that also use color to communicate status. */
html.sg-a11y-color-cues body .chips > span,
html.sg-a11y-color-cues body [class*='chip']:not(.chips),
html.sg-a11y-color-cues body [class*='badge'],
html.sg-a11y-color-cues body [class*='rank'],
html.sg-a11y-color-cues body [class*='grade'],
html.sg-a11y-color-cues body [class*='tier'],
html.sg-a11y-color-cues body [class*='rarity'],
html.sg-a11y-color-cues body [class*='status'],
html.sg-a11y-color-cues body [class*='error'],
html.sg-a11y-color-cues body [class*='warning'],
html.sg-a11y-color-cues body [class*='success'],
html.sg-a11y-color-cues body [data-status],
html.sg-a11y-color-cues body [data-state],
html.sg-a11y-color-cues body [data-grade],
html.sg-a11y-color-cues body [data-rarity],
html.sg-a11y-color-cues body [data-tier],
html.sg-a11y-color-cues body [data-rank],
html.sg-a11y-color-cues body .is-met,
html.sg-a11y-color-cues body .is-missing,
html.sg-a11y-color-cues body .is-error,
html.sg-a11y-color-cues body .is-success,
html.sg-a11y-color-cues body .is-warning {
  outline: 1px dashed currentColor !important;
  outline-offset: 2px !important;
  text-decoration-line: underline !important;
  text-decoration-style: dotted !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: .16em !important;
}
html.sg-a11y-color-cues body .sg-a11y-panel .sg-a11y-status {
  outline: none !important;
  text-decoration: none !important;
}

html.sg-a11y-underline-links body a {
  text-decoration: underline !important;
  text-decoration-thickness: .08em !important;
  text-underline-offset: .18em;
}

/* Contraste reforzado sin ocultar las imágenes informativas. */
html.sg-a11y-high-contrast body {
  color: #fff !important;
  background: #000 !important;
}

html.sg-a11y-high-contrast body :where(p, h1, h2, h3, h4, h5, h6, li, dt, dd, span, strong, em, label, small, summary, td, th, figcaption, blockquote, legend) {
  color: #fff !important;
}

html.sg-a11y-high-contrast body a,
html.sg-a11y-high-contrast body a * {
  color: #fff36a !important;
  text-decoration: underline !important;
  text-underline-offset: .18em;
}

html.sg-a11y-high-contrast body :where(button, input, select, textarea, [role="button"]) {
  border-color: #fff !important;
}

html.sg-a11y-high-contrast body :focus-visible {
  outline: 3px solid #fff36a !important;
  outline-offset: 3px !important;
}

html.sg-a11y-focus-highlight :focus-visible {
  outline: 3px solid #fff36a !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 4px #000 !important;
}

html.sg-a11y-reduce-backgrounds body,
html.sg-a11y-reduce-backgrounds body * {
  background-image: none !important;
}

html.sg-a11y-system-cursor .cr { display: none !important; }
@media (pointer: fine) {
  html.sg-a11y-system-cursor.sg-custom-cursor,
  html.sg-a11y-system-cursor.sg-custom-cursor *,
  html.sg-a11y-system-cursor.sg-custom-cursor *::before,
  html.sg-a11y-system-cursor.sg-custom-cursor *::after {
    cursor: auto !important;
  }
}

/* At high text sizes, move secondary navigation into the scrollable menu. */
html.sg-a11y-text-high .hd-nav,
html.sg-a11y-text-high .hd-search-btn,
html.sg-a11y-text-high .hd-socials,
html.sg-a11y-text-high .hd-auth-btn,
html.sg-a11y-text-high .logo-stack {
  display: none !important;
}
html.sg-a11y-text-high .hd-menu { display: flex !important; }
html.sg-a11y-text-high .logo {
  flex: 0 0 auto;
  width: auto;
  overflow: visible;
}
html.sg-a11y-text-high .mmenu {
  align-items: flex-start;
  justify-content: flex-start;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding-top: max(88px, calc(env(safe-area-inset-top) + 72px));
}
html.sg-a11y-text-high .mmenu nav {
  margin: 0 auto;
  padding-top: 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  flex: 0 0 auto;
}

@media (max-width: 600px) {
  html.sg-a11y-text-high body .wall {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

html.sg-a11y-reduce-motion,
html.sg-a11y-reduce-motion * ,
html.sg-a11y-reduce-motion *::before,
html.sg-a11y-reduce-motion *::after,
html.sg-reduced-motion,
html.sg-reduced-motion * ,
html.sg-reduced-motion *::before,
html.sg-reduced-motion *::after {
  scroll-behavior: auto !important;
  animation: none !important;
  transition: none !important;
}

/* Acceso rápido de la cabecera y pie */
.hd-accessibility-btn {
  color: var(--text-l, #e0d8cc);
}
.hd-accessibility-btn svg { display: block; }
.hd-accessibility-btn:hover,
.hd-accessibility-btn[aria-expanded="true"] {
  color: var(--gold-l, #d4b86c);
  border-color: rgba(196, 163, 90, .55);
  background: rgba(196, 163, 90, .1);
}
.ft-accessibility-toggle {
  min-height: 34px;
  padding: 7px 12px;
  color: var(--text-l, #e0d8cc);
  background: rgba(196, 163, 90, .07);
  border: 1px solid rgba(196, 163, 90, .38);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}
.ft-accessibility-toggle:hover,
.ft-accessibility-toggle:focus-visible {
  color: var(--white, #f0e8dc);
  background: rgba(196, 163, 90, .16);
  border-color: var(--gold, #c4a35a);
}

/* Panel de opciones */
.sg-a11y-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12990;
  background: rgba(0, 0, 0, .72);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility 0s linear .22s;
}
.sg-a11y-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .22s ease;
}
.sg-a11y-panel {
  position: fixed;
  z-index: 13000;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  width: min(440px, 100vw);
  height: 100vh;
  height: 100dvh;
  padding-top: env(safe-area-inset-top);
  overflow: hidden;
  color: #e7dfd2;
  background: #11100e;
  border-left: 1px solid rgba(196, 163, 90, .4);
  box-shadow: -18px 0 60px rgba(0, 0, 0, .58);
  font-family: Arial, Verdana, sans-serif;
  transform: translateX(102%);
  visibility: hidden;
  transition: transform .25s ease, visibility 0s linear .25s;
}
.sg-a11y-panel.is-open {
  transform: none;
  visibility: visible;
  transition: transform .25s ease;
}
.sg-a11y-backdrop[hidden],
.sg-a11y-panel[hidden] { display: none !important; }
.sg-a11y-panel__head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(196, 163, 90, .2);
}
.sg-a11y-panel__eyebrow {
  color: #c4a35a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.sg-a11y-panel__title {
  margin: 3px 0 0;
  color: #f4eee4;
  font-size: 23px;
  line-height: 1.25;
}
.sg-a11y-panel__close {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #eee5d8;
  background: #211e19;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  cursor: pointer;
  font-size: 27px;
  line-height: 1;
}
.sg-a11y-panel__close:hover { background: #332b1d; }
.sg-a11y-panel__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px 24px max(24px, env(safe-area-inset-bottom));
}
.sg-a11y-panel__intro {
  margin: 0 0 18px;
  color: #c9c0b3;
  font-size: 14px;
  line-height: 1.55;
}
.sg-a11y-group + .sg-a11y-group {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(196, 163, 90, .2);
}
.sg-a11y-group__title {
  margin: 0 0 7px;
  color: #e7c77b;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.sg-a11y-text-size {
  padding: 12px 0 10px;
}
.sg-a11y-text-size__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #f4eee4;
  font-size: 14px;
  font-weight: 700;
}
.sg-a11y-text-size__label output { color: #e7c77b; font-variant-numeric: tabular-nums; }
.sg-a11y-text-size input[type="range"] {
  display: block;
  width: 100%;
  min-height: 30px;
  margin: 8px 0 0;
  accent-color: #e7c77b;
  cursor: pointer;
}
.sg-a11y-range-labels {
  display: flex;
  justify-content: space-between;
  color: #bdb4a8;
  font-size: 12px;
}
.sg-a11y-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  cursor: pointer;
}
.sg-a11y-option__copy { display: flex; flex-direction: column; gap: 3px; }
.sg-a11y-option__label { color: #f0e9dd; font-size: 14px; font-weight: 700; line-height: 1.35; }
.sg-a11y-option__desc { color: #bdb4a8; font-size: 12px; line-height: 1.4; }
.sg-a11y-option input[type="checkbox"] {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: #d6b663;
  cursor: pointer;
}
.sg-a11y-option:focus-within { outline: 2px solid #fff36a; outline-offset: 2px; }
.sg-a11y-panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(196, 163, 90, .2);
}
.sg-a11y-reset {
  min-height: 42px;
  padding: 9px 14px;
  color: #f4eee4;
  background: #211e19;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.sg-a11y-reset:hover { background: #332b1d; border-color: #e7c77b; }
.sg-a11y-status { margin: 0; color: #e7c77b; font-size: 12px; text-align: right; }

@media (max-width: 600px) {
  .sg-a11y-panel { inset: 0; width: 100%; height: 100vh; height: 100dvh; border-left: 0; }
  .sg-a11y-panel__head { padding: 16px 18px 14px; }
  .sg-a11y-panel__body { padding: 14px 18px max(22px, env(safe-area-inset-bottom)); }
}
