/* Compartido por todas las páginas: botón de sonido y el secreto */
.snd {
  position: fixed; top: 14px; right: 16px; z-index: 20;
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px;
  background: none; border: 0; color: #8d887f; cursor: pointer;
  font: italic 400 1rem/1 "EB Garamond", Garamond, "Times New Roman", serif;
  text-shadow: 0 0 8px #000, 0 0 18px #000;
  transition: color .3s;
}
.snd:hover, .snd[aria-pressed="true"] { color: #ebe5d8; }
.snd:focus-visible { outline: 1px solid #ebe5d8; outline-offset: 2px; }
.snd .bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.snd .bars i { display: block; width: 2px; height: 3px; background: currentColor; border-radius: 1px; transition: height .3s; }
.snd[aria-pressed="true"] .bars i { animation: eq 1.1s ease-in-out infinite; }
.snd[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -.35s; }
.snd[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -.7s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

/* "lucifer": todo se tiñe de rojo unos segundos */
html.infernal body::after {
  content: ""; position: fixed; inset: 0; z-index: 30; pointer-events: none;
  background: radial-gradient(circle at 50% 45%, #ff3a1c, #a3120a 70%);
  mix-blend-mode: multiply; animation: infernal 4.5s ease forwards;
}
html.infernal body { animation: tremor .5s ease-in-out 2; }
@keyframes infernal { 0% { opacity: 0; } 12% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tremor { 0%, 100% { transform: none; } 25% { transform: translate(-2px, 1px); } 75% { transform: translate(2px, -1px); } }

@media (prefers-reduced-motion: reduce) {
  .snd[aria-pressed="true"] .bars i { animation: none; height: 8px; }
  html.infernal body { animation: none; }
}
@media (max-width: 560px) { .snd .txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* Selector de idioma, al pie de cada página */
.lang-switch { font: inherit; font-size: .95rem; color: inherit; background: #070707; border: 1px solid #2a2a2a; border-radius: 2px; padding: 4px 26px 4px 10px; cursor: pointer;
  -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 13px) 55%, calc(100% - 8px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.lang-switch:hover, .lang-switch:focus-visible { border-color: #5a5a5a; outline: none; }
footer .lang { margin: 0; }
html:lang(zh-Hans) body, html:lang(zh-Hans) h1, html:lang(zh-Hans) h2 { letter-spacing: 0; }
