/* R21 · FONDOS VERDES/TEAL Y HEXÁGONOS HEREDADOS DEL TEMA HALLOWEEN · reemplazo por los fondos Halloween YA aprobados. DOM claro. NO integrado.
   Alcance: SOLO bajo html[data-halloween-theme="escena"]. El tema permanente de La Colmena (style.css, sin ese atributo) no se toca: hexágonos y petróleo siguen siendo su identidad.
   Mecanismo (docs/halloween-r1/TEMAS.md): una temporada cambia TOKENS y reutiliza idiomas aprobados; no se inventa arte ni se genera fondo nuevo.
   Idiomas aprobados que se reutilizan (copiados de screens.css, sin cambios):
     · fondo de vista de texto = «host»: escena ESC01 arriba que se funde a --e-night (screens.css:1844)
     · cabecera = degradé oscuro + filete dorado (screens.css:1808/1848)
     · tarjeta/panel = rgba(16,14,20,.9) + filete --e-edge + sombra (screens.css:1810/1850)
   Los selectores con :where() valen 0 de especificidad: NO pisan ninguna regla temática existente (las vistas ya cubiertas siguen exactamente igual); sólo rellenan lo que hoy cae en el estilo base.
   NO se tocan colores funcionales: estado «hallada» de la reliquia (.relic.found, verde), avisos de éxito/error y toasts. Ver inventario (columna «Funcional»).
   Guardas: 0 (sin !important, sin display:none, sin url() nuevos). */

/* 1 · Tokens de la temporada: --deep/--ink (petróleo) pasan a la noche Halloween. Los usan style.css (7), tables-ui.css (4), table-art-ui.css, collection-ui.css y extras-ui.css;
       screens.css y theme.css no los usan: las vistas temáticas no cambian. */
html[data-halloween-theme="escena"] { --deep: #0c0c10; --ink: #121217; }

/* 2 · Fondo de página: la escena ESC01 + noche (idioma «host») en lugar de hexágonos + petróleo. Cubre /coleccion, /blood, /trivia, /trivia-host, /creditos, /reliquias,
       /blood/asientos (alrededor del libro) y el panel de host sin #host-output. */
:where(html[data-halloween-theme="escena"]) body {
  background:
    linear-gradient(180deg, rgb(12 12 16 / 0.25) 0, rgb(12 12 16 / 0.55) 200px, rgb(12 12 16 / 0.92) 420px, var(--e-night, #0c0c10) 560px) center top / 100% 560px no-repeat,
    var(--e-scene) center top / 100% auto no-repeat,
    var(--e-night, #0c0c10);
}

/* 3 · Cabecera del sitio (teal #071b20 en las vistas sin cobertura y en carga/error) y su etiqueta «HALLOWEEN EDICIÓN». */
:where(html[data-halloween-theme="escena"]) body > header {
  background: linear-gradient(rgba(10, 10, 13, 0.96), rgba(10, 10, 13, 0.78));
  border-bottom-color: var(--e-edge, rgb(201 160 72 / 0.48));
}
:where(html[data-halloween-theme="escena"]) body > header .edition { background: rgb(12 12 16 / 0.6); }

/* 4 · Tarjetas base (.card degradé #173c41→#102f35): tablero de Blood, Mi colección, Mesas con invitación, host sin #host-output… */
:where(html[data-halloween-theme="escena"] main#app) .card {
  background: rgba(16, 14, 20, 0.9);
  border: 1px solid var(--e-edge, rgb(201 160 72 / 0.48));
  box-shadow: rgba(0, 0, 0, 0.4) 0 12px 30px;
}

/* 5 · Campos de formulario (#061e24) en las vistas sin cobertura. */
:where(html[data-halloween-theme="escena"]) :is(input, select) { background: var(--e-field, #19191f); border-color: var(--e-field-line, #5a5a64); }

/* 6 · Reliquias (Horrorcruxes): la tarjeta base pasa a panel. `.relic.found` (verde = estado «hallada») NO se toca: es funcional, decisión de Lu si debe ser dorado. */
html[data-halloween-theme="escena"] .relic:not(.found) { background: rgba(16, 14, 20, 0.9); border-color: var(--e-edge, rgb(201 160 72 / 0.48)); }

/* 7 · Popups y franjas flotantes que cargan sus hojas después del tema (por eso llevan especificidad propia, sólo bajo el atributo del tema): */
html[data-halloween-theme="escena"] .notification-panel {                       /* campanita · notifications-ui.css:3 · #0a2930 */
  background: rgba(12, 12, 16, 0.96);
  border-color: var(--e-edge, rgb(201 160 72 / 0.48));
  box-shadow: var(--e-glow, 0 18px 48px rgb(0 0 0 / 0.5));
}
html[data-halloween-theme="escena"] .na-strip {                                  /* «Próxima actividad» · next-activity-ui.css:6 · degradé #1b3d41→#102e33 */
  background: rgba(12, 12, 16, 0.88);
  border-color: var(--e-edge, rgb(201 160 72 / 0.48));
}
html[data-halloween-theme="escena"] .contest-photo { background: var(--e-night, #0c0c10); }   /* style.css:129 · #051b20 detrás de fotos */

/* 8 · Del escaneo estático de todas las hojas (arrastran teal fijo en hex/rgba; sin superficie dinámica medida o con medida < 4 % de la pantalla). Sólo bajo el tema; mismos tokens aprobados. */
html[data-halloween-theme="escena"] :is(.na-list, .na-short) { background: rgba(12, 12, 16, 0.94); }                       /* next-activity-ui.css:13,19 · #102e33 */
html[data-halloween-theme="escena"] .na-bubble { background: rgb(36 30 14 / 0.95); border-color: var(--e-edge, rgb(201 160 72 / 0.48)); }   /* :20 · #20464b */
html[data-halloween-theme="escena"] .header-tools .notification-count { background: var(--e-night, #0c0c10); }              /* notifications-ui.css:9 · #082d31 */
html[data-halloween-theme="escena"] .notification-invitation-actions button { background: var(--e-field, #19191f); }          /* :11 · #153a40 (botón secundario; el primario dorado no se toca) */
html[data-halloween-theme="escena"] .feedback-dialog { background: linear-gradient(180deg, var(--e-panel, #121217), var(--e-night, #0c0c10)); }  /* event-feedback-ui.css:1 #08272d y screens.css:1621 (#0b2a30→#0a1f24, teal DENTRO del tema) */
html[data-halloween-theme="escena"] .table-private-chat-message { background: rgb(16 14 20 / 0.72); }                          /* screens.css:1647 · rgb(16 46 51/.55), teal DENTRO del tema */
html[data-halloween-theme="escena"] .surprise-card { background: var(--e-panel, #121217); }                                   /* surprise-ui.css:3 · #0f2629 */
html[data-halloween-theme="escena"] :is(.avatar-dialog, .avatar-dialog-heading, .halloween-install-dialog) { background: var(--e-panel, #121217); }   /* profile-modal.css:3,5 · #102f35 · pwa/install.css:1 · #082d31 */
html[data-halloween-theme="escena"] :is(.tables-approved-art, .tables-card.has-art button.secondary) { background: var(--e-panel, #121217); }   /* tables-ui.css:5,14 · table-art-ui.css:1 · #082d31 */
html[data-halloween-theme="escena"] .tables-card.has-art progress { background: var(--e-night, #0c0c10); }
html[data-halloween-theme="escena"] .tables-card.has-art progress::-webkit-progress-bar { background: var(--e-night, #0c0c10); }   /* tables-ui.css:15 · #051b20 */
html[data-halloween-theme="escena"] .tables-card.has-art :is(h2, h3, p, legend, summary, label, .small, .eyebrow, .tables-member-names li) { background: rgba(12, 12, 16, 0.86); }   /* tables-ui.css:23 · rgba(5,27,32,.86) */
html[data-halloween-theme="escena"] .tables-member-names li { background: var(--e-field, #19191f); }                          /* tables-ui.css:17 · #08262b */

/* 9 · Del barrido fino (≥ 0,3 % de la pantalla), después de §1–8: chips de estado y pista del cronómetro de Trivia. */
html[data-halloween-theme="escena"] .status { background: var(--e-night, #0c0c10); }              /* style.css:18 · #071b20 (chip «Inscripción abierta», «La búsqueda está abierta») */
html[data-halloween-theme="escena"] .trivia-bar { background: var(--e-night, #0c0c10); }          /* style.css:127 · #051b20 (pista; el relleno dorado no se toca) */

/* 10 · APROBADO por Lu: lanzador del Chat negro con borde e ícono dorados, SÓLO en Halloween (footer-chat-ui.css:8 lo dejaba en #20464b, verde petróleo).
   Mismo tamaño (58×58), posición, foco y z-index: sólo cambia el color. El ícono y el rótulo «Chat» usan currentColor = dorado. El panel del Chat ya era oscuro/dorado. */
html[data-halloween-theme="escena"] button.chat-launcher {
  background: var(--e-night, #0c0c10);
  border-color: var(--e-edge-strong, rgb(214 172 78 / 0.78));
  color: var(--e-gold-hi, #f7d36a);
}
