/* Lugubrario Relator · estética del canal: casi negro cálido, luz de vela ámbar, serif de época. */
:root {
  --fondo: #120d09;
  --fondo2: #1b140e;
  --panel: #221911;
  --borde: #3a2b1d;
  --texto: #f1e4cc;
  --tenue: #a8977c;
  --ambar: #e8a54b;
  --ambar2: #ffcf7a;
  --sangre: #7a1414;
  --rec: #c0392b;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--fondo); color: var(--texto); font-family: var(--serif); font-size: 18px; line-height: 1.5; }
body {
  background:
    radial-gradient(ellipse 60% 40% at 50% -5%, rgba(232, 165, 75, .14), transparent 70%),
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(122, 20, 20, .10), transparent 70%),
    var(--fondo);
  min-height: 100vh; padding-bottom: 120px;
}
h1, h2 { font-weight: normal; letter-spacing: .04em; }
h1 { margin: 0; font-size: 1.9rem; color: var(--ambar2); text-shadow: 0 0 18px rgba(232, 165, 75, .35); }
h1 span { color: var(--texto); font-style: italic; }
h2 { color: var(--ambar2); margin-top: 0; }
a { color: var(--ambar2); }
.tenue { color: var(--tenue); }
.lema { margin: 0; color: var(--tenue); font-style: italic; font-size: .9rem; }

.cabecera { display: flex; align-items: center; gap: 18px; padding: 18px 28px 6px; max-width: 1100px; margin: 0 auto; }
.tenebrario { width: 92px; height: 54px; flex: none; }
.llama { fill: var(--ambar2); transform-box: fill-box; transform-origin: 50% 100%; animation: titila 2.6s ease-in-out infinite; filter: drop-shadow(0 0 2px rgba(255, 190, 90, .9)); }
.vela { fill: #d8c8a8; }
.apagada .llama { opacity: 0; }
@keyframes titila { 0%, 100% { transform: scale(1, 1); opacity: .95 } 45% { transform: scale(.85, 1.12); opacity: 1 } 70% { transform: scale(1.05, .9); opacity: .85 } }

.aviso { max-width: 1100px; margin: 8px auto; padding: 10px 16px; border: 1px solid var(--sangre); background: rgba(122, 20, 20, .25); border-radius: 6px; }

nav#pasos { display: flex; gap: 6px; max-width: 1100px; margin: 12px auto 18px; padding: 0 28px; flex-wrap: wrap; }
nav#pasos button { flex: 1 1 140px; display: flex; align-items: center; gap: 10px; justify-content: center; padding: 12px 10px; font-size: 1rem; background: var(--fondo2); border: 1px solid var(--borde); color: var(--tenue); border-radius: 6px; }
nav#pasos button b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid currentColor; font-weight: normal; }
nav#pasos button.actual { color: var(--fondo); background: var(--ambar); border-color: var(--ambar); box-shadow: 0 0 22px rgba(232, 165, 75, .35); }
nav#pasos button.hecho { color: var(--ambar2); border-color: #6b4f2a; }
nav#pasos button:disabled { opacity: .45; cursor: not-allowed; }

main { max-width: 1100px; margin: 0 auto; padding: 0 28px; }
.paso { background: linear-gradient(180deg, rgba(34, 25, 17, .85), rgba(27, 20, 14, .85)); border: 1px solid var(--borde); border-radius: 10px; padding: 26px 30px; }

button { font-family: var(--serif); font-size: 1rem; color: var(--texto); background: #2a1f15; border: 1px solid #4a3826; border-radius: 6px; padding: 9px 16px; cursor: pointer; transition: background .15s, box-shadow .15s; }
button:hover:not(:disabled) { background: #3a2a1b; box-shadow: 0 0 12px rgba(232, 165, 75, .18); }
button:disabled { opacity: .4; cursor: not-allowed; }
button.grande { font-size: 1.15rem; padding: 14px 26px; }
button.principal { background: var(--ambar); color: #1a1008; border-color: var(--ambar); }
button.principal:hover:not(:disabled) { background: var(--ambar2); }
button.enlace { background: none; border: none; text-decoration: underline; color: var(--tenue); }
button.rec { background: var(--rec); border-color: #e05a4a; color: #fff; }
button.rec.activo { animation: latido 1.2s ease-in-out infinite; }
@keyframes latido { 50% { box-shadow: 0 0 0 8px rgba(192, 57, 43, .25); } }
button:focus-visible, input:focus-visible { outline: 2px solid var(--ambar2); outline-offset: 2px; }

.campo { display: block; margin-bottom: 18px; color: var(--tenue); }
.campo input { display: block; margin-top: 6px; width: min(420px, 100%); font: inherit; color: var(--texto); background: var(--fondo); border: 1px solid var(--borde); border-radius: 6px; padding: 10px 12px; }

.tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tarjeta { text-align: left; padding: 18px; background: var(--fondo2); border: 1px solid var(--borde); border-radius: 8px; display: block; width: 100%; }
.tarjeta h3 { margin: 0 0 4px; font-weight: normal; color: var(--ambar2); font-size: 1.2rem; }
.tarjeta p { margin: 2px 0; font-size: .9rem; color: var(--tenue); }
.tarjeta .idioma { float: right; font-size: .8rem; border: 1px solid var(--borde); border-radius: 4px; padding: 0 6px; }
.tarjeta .prov { color: #e0806a; }

.carga { margin-top: 18px; }
.barra { height: 6px; background: var(--fondo); border-radius: 3px; overflow: hidden; }
.barra i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sangre), var(--ambar)); transition: width .2s; }

.personajes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 18px 0; }
.personaje { text-align: left; padding: 18px; border-radius: 8px; background: var(--fondo2); }
.personaje b { display: block; font-size: 1.35rem; font-weight: normal; color: var(--texto); }
.personaje span { display: block; font-size: .85rem; color: var(--tenue); }
.personaje.elegido { background: rgba(232, 165, 75, .16); border-color: var(--ambar); box-shadow: inset 0 0 0 1px var(--ambar), 0 0 20px rgba(232, 165, 75, .2); }
.personaje.elegido b::before { content: "✦ "; color: var(--ambar2); }
.personaje .muestra { margin-top: 10px; font-size: .85rem; padding: 4px 10px; }
.acciones { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 18px; }

/* Micrófono */
.micro { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--borde); margin-bottom: 14px; }
.medidor { position: relative; width: 220px; height: 12px; background: var(--fondo); border: 1px solid var(--borde); border-radius: 6px; overflow: hidden; }
.medidor i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #6b8f4e 0 70%, var(--ambar) 70% 88%, var(--rec) 88%); transition: width .05s; }
.medidor .zona { position: absolute; left: 55%; width: 25%; top: 0; bottom: 0; border-left: 1px dashed #6a5a44; border-right: 1px dashed #6a5a44; }

/* Karaoke */
.karaoke { max-height: calc(100vh - 330px); min-height: 300px; overflow-y: auto; padding: 30vh 8px 30vh; scroll-behavior: smooth; mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); }
.linea { position: relative; padding: 10px 16px 10px 118px; margin: 4px 0; border-radius: 6px; cursor: pointer; opacity: .42; transition: opacity .3s, background .3s; }
.linea .quien { position: absolute; left: 8px; top: 14px; width: 100px; text-align: right; font-size: .78rem; color: var(--tenue); letter-spacing: .05em; text-transform: uppercase; }
.linea .plano { font-size: .7rem; color: #6d5d48; display: block; }
.linea .texto { margin: 0; font-size: 1.45rem; line-height: 1.55; }
.linea .estado { font-size: .8rem; color: var(--tenue); }
.linea.mia { opacity: .7; border-left: 3px solid var(--ambar); background: rgba(232, 165, 75, .05); }
.linea.mia .quien { color: var(--ambar2); }
.linea.mia .quien::before { content: "tú · "; }
.linea.mia .texto { color: #ffe3b0; }
.linea.actual { opacity: 1; background: rgba(255, 255, 255, .035); }
.linea.mia.actual { background: rgba(232, 165, 75, .13); box-shadow: 0 0 30px rgba(232, 165, 75, .12); }
.linea .texto w { transition: color .12s, text-shadow .12s; }
.linea.actual .texto w.dicha { color: var(--ambar2); text-shadow: 0 0 10px rgba(255, 190, 90, .45); }
.linea.grabada .estado::before { content: "● grabada "; color: #d0a060; }
.separador-plano { height: 1px; margin: 14px 0 10px 118px; background: linear-gradient(90deg, var(--borde), transparent); }

/* Transporte */
.transporte { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 12px 20px; background: rgba(18, 13, 9, .95); border-top: 1px solid var(--borde); backdrop-filter: blur(6px); z-index: 10; }
.redondo { width: 58px; height: 58px; border-radius: 50%; font-size: 1.4rem; padding: 0; background: var(--ambar); color: #1a1008; border-color: var(--ambar); }
.interruptor { color: var(--tenue); font-size: .9rem; }

/* Grabador */
.grabador { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); width: min(980px, 96vw); background: #1d150e; border: 1px solid var(--ambar); border-radius: 12px; padding: 20px 24px; box-shadow: 0 0 60px rgba(0, 0, 0, .8), 0 0 40px rgba(232, 165, 75, .15); z-index: 20; }
.g-cab { display: flex; gap: 16px; align-items: baseline; }
.etiqueta { color: var(--fondo); background: var(--ambar); padding: 2px 10px; border-radius: 4px; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.g-texto { font-size: 1.7rem; line-height: 1.5; color: #ffe9c4; margin: 12px 0; max-height: 34vh; overflow-y: auto; }
#g-onda { width: 100%; height: 90px; background: var(--fondo); border: 1px solid var(--borde); border-radius: 6px; cursor: crosshair; display: block; }
.grabador .medidor { width: 100%; margin: 8px 0 12px; }
.g-botones { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.g-botones #g-ok { margin-left: auto; }
.atajos { font-size: .78rem; margin: 10px 0 0; }

/* Tablas */
.tabla table { width: 100%; border-collapse: collapse; font-size: .92rem; margin-top: 12px; }
.tabla th { text-align: left; font-weight: normal; color: var(--tenue); border-bottom: 1px solid var(--borde); padding: 6px; }
.tabla td { border-bottom: 1px solid #2a2016; padding: 6px; vertical-align: top; }
.tabla td { white-space: nowrap; }
.tabla td.texto { max-width: 420px; white-space: normal; }
.tabla .mal { color: #e0806a; }
.tabla .bien { color: #b5c98a; }
.consejos li { margin: 4px 0; }

.zona-soltar { display: block; text-align: center; padding: 28px; border: 2px dashed #5a4632; border-radius: 10px; cursor: pointer; background: rgba(0, 0, 0, .2); }
.zona-soltar.encima { border-color: var(--ambar); background: rgba(232, 165, 75, .08); }
.opciones { margin: 16px 0; display: grid; gap: 6px; color: var(--tenue); }
#res-audio { width: 100%; margin: 12px 0; }
.planos { display: flex; flex-wrap: wrap; gap: 6px; }
.planos button { font-size: .8rem; padding: 4px 8px; }
.manual { margin-top: 26px; color: var(--tenue); }
.manual summary { cursor: pointer; }

.nota { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); background: #2a1f15; border: 1px solid var(--ambar); padding: 10px 18px; border-radius: 8px; z-index: 50; box-shadow: 0 6px 30px rgba(0, 0, 0, .6); max-width: 90vw; }
.nota.error { border-color: var(--rec); }

@media (max-width: 700px) {
  html, body { font-size: 16px; }
  .linea { padding-left: 16px; } .linea .quien { position: static; display: block; text-align: left; width: auto; }
  .separador-plano { margin-left: 0; }
  .paso { padding: 18px; }
}
