/* ═══ Temas nuevos (Erick, 28-10): Medianoche y Borgoña ═══════════════════════════════════════
   Se escogen en Configuración › Apariencia › Fondo. Marfil y Crema reforzado se probaron el 28-10 y Erick los
   rechazó («los de antes están más lindos»): se quitaron; el código está en el commit 38e7cf3.
   · Medianoche: negro azulado con champán (la escena del Arco dorado sobre un campo azul noche).
   Letra de los títulos: Fraunces 600 (trazo firme que aguanta cualquier pantalla); cifras de ancho fijo. */

@font-face {
  font-family: "Fraunces PT";
  src: url("letras/fraunces-600.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ══════════ MEDIANOCHE (oscuro) ══════════ */
html.vidrio[data-fondo="medianoche"] {
  --ac: 224 190 120; --ac2: 240 220 170; --ac-luz: 250 243 224; --ac-brillo: 230 196 128; --ac-sombra: 160 118 56; --ac-hondo: 84 56 14;
  --ac-tinta: #1b1306; --calido: 232 238 252; --tinte: 6 12 28; --tinte2: 14 24 48;
  --b1: #f3e2b4; --b2: #dcbb76; --b3: #b9934f;
  --r1: #fff4d8; --r2: #e4bf74; --r3: #7a6030; --r4: #cdb07a; --r5: #f4e6c4; --r6: #8d9dc2;
  --luz-arco: #e9c98a;
}
html.vidrio[data-fondo="medianoche"][data-theme="dark"] {
  --v-didot: "Fraunces PT", Georgia, "Times New Roman", serif;
  /* El campo azul noche: el fondo de la página lleva el azul y la escena del Arco (negra con su arco
     dorado) se MEZCLA encima con «screen»: el negro deja pasar el azul y el oro sigue siendo oro. */
  background:
    radial-gradient(90% 70% at 15% 105%, rgba(30, 64, 150, .9), transparent 70%),
    radial-gradient(80% 60% at 95% -5%, rgba(20, 46, 110, .75), transparent 65%),
    #06102a;
  font-variant-numeric: tabular-nums;
}
html.vidrio[data-fondo="medianoche"] :is(.vidrio-cielo, .portada-cielo) { mix-blend-mode: screen; }
/* El arco en reposo, más tenue: sobre el azul noche ya brillaba al máximo y el destello que pasa por él no se notaba. */
html.vidrio[data-fondo="medianoche"] .vidrio-cielo .entrada-cielo-deriva > img { filter: brightness(.55); }

/* ══════════ OBSIDIANA (oscuro, capas de papel negras con los cantos en oro) ══════════
   Erick, 06-11: «ninguno de los fondos nuevos es negro; uno negro, oscuro, con rayas doradas, bien pro».
   El oro y los botones son los del Arco dorado (vidrio.css, por omisión); solo el vidrio se vuelve negro
   neutro y cálido, sin el azul de Medianoche. Las capas y sus destellos: fondo-capas.js (FONDOS_CAPAS.obsidiana). */
html.vidrio[data-fondo="obsidiana"] {
  --tinte: 10 9 8; --tinte2: 24 21 17;
  --luz-arco: #e9c98a;
}
html.vidrio[data-fondo="obsidiana"][data-theme="dark"] { background: #090807; font-variant-numeric: tabular-nums; }

/* ══════════ CLAROS DE CAPAS DE PAPEL: Celeste, Lavanda, Ciruela, Rosa empolvado, Terracota, Albaricoque, Miel, Oliva, Salvia, Moca y Plata ══════════
   Fotos lisas dibujadas con código (generar-claros.swift): curvas grandes con sombra suave, sin dibujos. */
html.vidrio[data-fondo="celeste"] {
  --ac: 30 78 140; --ac2: 90 140 200; --ac-luz: 232 241 250; --ac-brillo: 80 140 210; --ac-sombra: 30 78 140; --ac-hondo: 14 40 84;
  --ac-tinta: #ffffff; --calido: 30 50 80; --tinte: 255 255 255; --tinte2: 246 249 253;
  --b1: #4f82c0; --b2: #2a5c9e; --b3: #173f78;
  --r1: #eef5fc; --r2: #8fb4de; --r3: #2a5c9e; --r4: #7ea6d4; --r5: #dce8f6; --r6: #4a78b4;
  --luz-arco: #ffffff;
}
html.vidrio[data-fondo="celeste"][data-theme="light"] { --ink: #0f1f38; --muted: rgba(15, 31, 56, .86); --line: rgba(15, 45, 90, .16); --v-didot: "Fraunces PT", Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; }
html.vidrio[data-fondo="salvia"] {
  --ac: 28 94 70; --ac2: 76 146 116; --ac-luz: 232 244 238; --ac-brillo: 60 140 110; --ac-sombra: 28 94 70; --ac-hondo: 10 50 38;
  --ac-tinta: #ffffff; --calido: 30 60 48; --tinte: 255 255 255; --tinte2: 247 250 246;
  --b1: #3c8c74; --b2: #1f6a52; --b3: #124a3a;
  --r1: #eef6f1; --r2: #8fc2ae; --r3: #1f6a52; --r4: #7fb5a0; --r5: #dcece4; --r6: #3f8a70;
  --luz-arco: #ffffff;
}
html.vidrio[data-fondo="salvia"][data-theme="light"] { --ink: #10231d; --muted: rgba(16, 35, 29, .86); --line: rgba(16, 50, 40, .17); --v-didot: "Fraunces PT", Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; }
html.vidrio[data-fondo="lavanda"] {
  --ac: 92 62 150; --ac2: 150 120 200; --ac-luz: 240 234 250; --ac-brillo: 150 110 215; --ac-sombra: 92 62 150; --ac-hondo: 46 28 90;
  --ac-tinta: #ffffff; --calido: 60 40 90; --tinte: 255 253 255; --tinte2: 249 246 253;
  --b1: #8a6cc4; --b2: #6444a6; --b3: #442a7c;
  --r1: #f3effb; --r2: #b8a4e0; --r3: #6444a6; --r4: #a58cd4; --r5: #e6def5; --r6: #7e5cba;
  --luz-arco: #ffffff;
}
html.vidrio[data-fondo="lavanda"][data-theme="light"] { --ink: #1c1530; --muted: rgba(28, 21, 48, .86); --line: rgba(60, 40, 110, .16); --v-didot: "Fraunces PT", Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; }
html.vidrio[data-fondo="rosa"] {
  --ac: 140 64 86; --ac2: 184 137 150; --ac-luz: 244 236 238; --ac-brillo: 174 121 137; --ac-sombra: 140 64 86; --ac-hondo: 77 35 47;
  --ac-tinta: #ffffff; --calido: 98 45 60; --tinte: 255 255 255; --tinte2: 253 249 250;
  --b1: #c27a8e; --b2: #a05a70; --b3: #7a3f54;
  --r1: #f6f0f1; --r2: #c6a0aa; --r3: #a05a70; --r4: #cfafb8; --r5: #ede0e4; --r6: #a36678;
  --luz-arco: #ffffff;
}
html.vidrio[data-fondo="rosa"][data-theme="light"] { --ink: #2a161c; --muted: rgba(42, 22, 28, .86); --line: rgba(140, 64, 86, .16); --v-didot: "Fraunces PT", Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; }
html.vidrio[data-fondo="oliva"] {
  --ac: 82 96 48; --ac2: 148 156 127; --ac-luz: 238 239 234; --ac-brillo: 134 144 110; --ac-sombra: 82 96 48; --ac-hondo: 45 53 26;
  --ac-tinta: #ffffff; --calido: 57 67 34; --tinte: 255 255 255; --tinte2: 250 251 246;
  --b1: #7e9152; --b2: #5f7238; --b3: #445226;
  --r1: #f1f2ee; --r2: #a8b098; --r3: #5f7238; --r4: #b6bca8; --r5: #e3e6de; --r6: #758059;
  --luz-arco: #ffffff;
}
html.vidrio[data-fondo="oliva"][data-theme="light"] { --ink: #1a1f10; --muted: rgba(26, 31, 16, .86); --line: rgba(82, 96, 48, .16); --v-didot: "Fraunces PT", Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; }
html.vidrio[data-fondo="ciruela"] {
  --ac: 106 62 99; --ac2: 167 124 159; --ac-luz: 242 238 241; --ac-brillo: 178 103 165; --ac-sombra: 106 62 99; --ac-hondo: 58 34 54;
  --ac-tinta: #ffffff; --calido: 63 49 61; --tinte: 255 255 255; --tinte2: 250 248 249;
  --b1: #a5699b; --b2: #814b77; --b3: #5a3554;
  --r1: #f5f2f5; --r2: #c5abc0; --r3: #814b77; --r4: #b69bb1; --r5: #e9e2e8; --r6: #915f88;
  --luz-arco: #ffffff;
}
html.vidrio[data-fondo="ciruela"][data-theme="light"] { --ink: #1d161c; --muted: rgba(29, 22, 28, .86); --line: rgba(106, 62, 99, .16); --v-didot: "Fraunces PT", Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; }
html.vidrio[data-fondo="terracota"] {
  --ac: 121 58 47; --ac2: 181 120 109; --ac-luz: 243 237 236; --ac-brillo: 203 96 78; --ac-sombra: 121 58 47; --ac-hondo: 66 32 26;
  --ac-tinta: #ffffff; --calido: 68 47 44; --tinte: 255 255 255; --tinte2: 250 247 247;
  --b1: #b96455; --b2: #934639; --b3: #673128;
  --r1: #f6f2f1; --r2: #cda8a2; --r3: #934639; --r4: #bf9892; --r5: #ebe2e0; --r6: #a25a4e;
  --luz-arco: #ffffff;
}
html.vidrio[data-fondo="terracota"][data-theme="light"] { --ink: #201513; --muted: rgba(32, 21, 19, .86); --line: rgba(121, 58, 47, .16); --v-didot: "Fraunces PT", Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; }
html.vidrio[data-fondo="albaricoque"] {
  --ac: 141 82 27; --ac2: 201 143 90; --ac-luz: 245 239 235; --ac-brillo: 237 136 43; --ac-sombra: 141 82 27; --ac-hondo: 77 45 15;
  --ac-tinta: #ffffff; --calido: 75 55 37; --tinte: 255 255 255; --tinte2: 251 249 246;
  --b1: #d4843a; --b2: #ab6321; --b3: #784517;
  --r1: #f7f3f0; --r2: #d9b696; --r3: #ab6321; --r4: #cba785; --r5: #eee5dd; --r6: #b97537;
  --luz-arco: #ffffff;
}
html.vidrio[data-fondo="albaricoque"][data-theme="light"] { --ink: #231910; --muted: rgba(35, 25, 16, .86); --line: rgba(141, 82, 27, .16); --v-didot: "Fraunces PT", Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; }
html.vidrio[data-fondo="miel"] {
  --ac: 134 100 35; --ac2: 194 161 97; --ac-luz: 244 241 235; --ac-brillo: 224 168 56; --ac-sombra: 134 100 35; --ac-hondo: 73 55 19;
  --ac-tinta: #ffffff; --calido: 73 61 40; --tinte: 255 255 255; --tinte2: 251 249 246;
  --b1: #ca9d44; --b2: #a2792a; --b3: #71551d;
  --r1: #f7f5f0; --r2: #d5c19a; --r3: #a2792a; --r4: #c7b28a; --r5: #ede8de; --r6: #b08a40;
  --luz-arco: #ffffff;
}
html.vidrio[data-fondo="miel"][data-theme="light"] { --ink: #221c11; --muted: rgba(34, 28, 17, .86); --line: rgba(134, 100, 35, .16); --v-didot: "Fraunces PT", Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; }
html.vidrio[data-fondo="moca"] {
  --ac: 106 80 62; --ac2: 167 141 124; --ac-luz: 242 239 238; --ac-brillo: 177 133 103; --ac-sombra: 106 80 62; --ac-hondo: 58 44 34;
  --ac-tinta: #ffffff; --calido: 63 55 49; --tinte: 255 255 255; --tinte2: 250 248 248;
  --b1: #a4816a; --b2: #80614c; --b3: #5a4435;
  --r1: #f5f3f2; --r2: #c4b5ab; --r3: #80614c; --r4: #b6a69b; --r5: #e9e5e2; --r6: #91735f;
  --luz-arco: #ffffff;
}
html.vidrio[data-fondo="moca"][data-theme="light"] { --ink: #1d1916; --muted: rgba(29, 25, 22, .86); --line: rgba(106, 80, 62, .16); --v-didot: "Fraunces PT", Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; }
html.vidrio[data-fondo="plata"] {
  --ac: 72 81 96; --ac2: 134 142 157; --ac-luz: 239 239 241; --ac-brillo: 120 135 160; --ac-sombra: 72 81 96; --ac-hondo: 39 44 52;
  --ac-tinta: #ffffff; --calido: 52 55 60; --tinte: 255 255 255; --tinte2: 248 248 249;
  --b1: #778397; --b2: #586274; --b3: #3d4551;
  --r1: #f3f3f4; --r2: #b1b6bf; --r3: #586274; --r4: #a1a6b0; --r5: #e4e5e7; --r6: #6a7485;
  --luz-arco: #ffffff;
}
html.vidrio[data-fondo="plata"][data-theme="light"] { --ink: #18191b; --muted: rgba(24, 25, 27, .86); --line: rgba(72, 81, 96, .16); --v-didot: "Fraunces PT", Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; }

/* Las capas vivas (fondo-capas.js): dos lienzos sobre la foto, que entran con un fundido cuando dibujan su primer cuadro. */
.cielo-capas canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s ease; }
.cielo-capas.viva canvas { opacity: 1; }
