/* Festivos: calendario laboral */
.migas { font-size: 14px; color: var(--muted); margin-top: 6px; }
.migas a { color: var(--muted); }
.hero.fest { padding-block: 22px 14px; }
.hero.fest h1 { font-size: clamp(36px, 7.5vw, 58px); }
.proximo { margin-top: 16px; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; padding: 10px 16px; box-shadow: 4px 4px 0 var(--ink); }
.proximo b { font-family: var(--f-marca); font-size: 22px; color: var(--coral); }
.proximo span { color: var(--muted); font-size: 15px; }
.resumen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 6px; }
.resumen div { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: center; }
.resumen b { display: block; font-family: var(--f-marca); font-size: clamp(28px, 7vw, 40px); line-height: 1; color: var(--teal); }
.resumen span { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.tabla { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.tabla table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabla th, .tabla td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tabla td small { display: block; color: var(--muted); font-size: 13px; }
.tabla tr.pasado td { opacity: .5; }
.tabla tr.siguiente td { background: color-mix(in srgb, var(--sun) 22%, transparent); }
.tipo { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.tipo.nac { background: color-mix(in srgb, var(--coral) 18%, transparent); color: var(--coral); }
.tipo.aut { background: color-mix(in srgb, var(--teal) 18%, transparent); color: var(--teal); }
.tipo.ins { background: color-mix(in srgb, var(--sun) 30%, transparent); }
.puentes { padding-left: 20px; display: grid; gap: 6px; }
.puentes li.puente { list-style: '🌉 '; }
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, calc(50% - 6px)), 1fr)); gap: 12px; }
@media (max-width: 520px) { .mes { padding: 8px 6px; } .dias span { font-size: 12px; line-height: 23px; border-radius: 6px; } .sem span { font-size: 10px; } .mes h3 { font-size: 16px; padding-left: 4px; } }
.mes { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.mes h3 { font-family: var(--f-marca); font-size: 19px; margin-bottom: 6px; }
.sem, .dias { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; gap: 2px; }
.sem span { font-size: 11.5px; font-weight: 800; color: var(--muted); }
.dias span { font-size: 13.5px; line-height: 28px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.dias .fin { color: var(--muted); background: var(--paper-2); }
.dias .nac, .leyenda .nac { background: var(--coral); color: var(--accent-ink); font-weight: 800; }
.dias .aut, .leyenda .aut { background: var(--teal); color: var(--accent-ink); font-weight: 800; }
.dias .ins { background: var(--sun); color: #1a1400; font-weight: 800; }
.dias .hoy { outline: 2px solid var(--ink); outline-offset: -2px; }
.leyenda { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.leyenda span { padding: 3px 10px; border-radius: 999px; }
.leyenda .fin { background: var(--paper-2); color: var(--muted); }
.ccaa { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ccaa a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: 14.5px; }
.ccaa a:hover { border-color: var(--ink); }
.ccaa.grande { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.ccaa.grande a { display: grid; border-radius: 14px; padding: 12px 14px; }
.ccaa.grande b { font-family: var(--f-marca); font-size: 18px; }
.ccaa.grande span { font-size: 13px; color: var(--muted); }
.nota { background: var(--paper); border-left: 4px solid var(--teal); padding: 10px 14px; border-radius: 0 12px 12px 0; }
.fuente { font-size: 13.5px; color: var(--muted); margin-top: 26px; }
.acciones { margin-top: 12px; }
main details { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 8px; }
main details summary { font-weight: 800; cursor: pointer; }
main details p { margin: 8px 0 2px; color: var(--muted); }
.sobre h3 { font-family: var(--f-marca); font-size: 20px; margin-top: 16px; }
@media (max-width: 420px) { .tabla th:nth-child(3), .tabla td:nth-child(3) { display: none; } .resumen span { font-size: 12px; } }
/* Guardar y compartir */
.guardar { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.guardar .btn { font-size: 15px; padding: 10px 16px; text-decoration: none; }
.guardar .btn.wa { background: #25d366; border-color: #128c4a; color: #06301a; }
.guardar .btn.wa::before { content: ''; display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm5.3 14.1c-.2.6-1.3 1.2-1.8 1.3-.5 0-1 .2-3.3-.7-2.8-1.1-4.5-4-4.7-4.2-.1-.2-1.1-1.5-1.1-2.9s.7-2 1-2.3c.2-.3.5-.3.7-.3h.5c.2 0 .4 0 .6.5l.9 2.1c.1.2.1.3 0 .5l-.3.5-.4.5c-.1.1-.3.3-.1.6.2.3.8 1.3 1.7 2.1 1.2 1 2.1 1.4 2.4 1.5.3.1.5.1.7-.1l1-1.2c.2-.3.4-.2.7-.1l2 1c.3.1.5.2.6.3.1.2.1.7-.1 1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm5.3 14.1c-.2.6-1.3 1.2-1.8 1.3-.5 0-1 .2-3.3-.7-2.8-1.1-4.5-4-4.7-4.2-.1-.2-1.1-1.5-1.1-2.9s.7-2 1-2.3c.2-.3.5-.3.7-.3h.5c.2 0 .4 0 .6.5l.9 2.1c.1.2.1.3 0 .5l-.3.5-.4.5c-.1.1-.3.3-.1.6.2.3.8 1.3 1.7 2.1 1.2 1 2.1 1.4 2.4 1.5.3.1.5.1.7-.1l1-1.2c.2-.3.4-.2.7-.1l2 1c.3.1.5.2.6.3.1.2.1.7-.1 1.4z'/%3E%3C/svg%3E") center / contain no-repeat; }
.acciones { color: var(--muted); max-width: 70ch; }
.acciones b { color: var(--ink); }
.dialogo { border: 2px solid var(--ink); border-radius: 20px; padding: 20px; max-width: min(440px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.dialogo::backdrop { background: rgba(18, 17, 28, .55); }
.dialogo h2 { font-family: var(--f-marca); font-size: 24px; margin-bottom: 6px; }
.dialogo p { margin: 6px 0; }
.dialogo .opciones { display: grid; gap: 8px; margin: 14px 0; }
.dialogo .opciones .btn { font-size: 16px; padding: 12px 16px; text-decoration: none; }
.dialogo .pasos { padding-left: 18px; font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.dialogo form { text-align: right; }

/* Hoja A4 (la crea festivos.js al pulsar «Descargar en PDF» o al imprimir) */
.hoja { display: none; }
@page { size: A4 portrait; margin: 9mm; }
@media print {
  html, body { background: #fff !important; }
  body.con-hoja > *:not(.hoja) { display: none !important; }
  body:not(.con-hoja) header.top, body:not(.con-hoja) footer, .ad, .cookies, .acciones, .guardar, .dialogo, .proximo, .migas, details, .ccaa, .sobre, .puentes, .seccion#puentes, .fuente { display: none !important; }
  body:not(.con-hoja) .cal { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  body:not(.con-hoja) .mes { break-inside: avoid; border-color: #999; }
  .hoja { display: block; }
}
.hoja { --h-ink: #1c1a2e; --h-muted: #5d6279; --h-line: #d8dce8; color: var(--h-ink); background: #fff; font-family: var(--f-body); width: 192mm; height: 278mm; overflow: hidden; display: none; flex-direction: column;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 9pt; line-height: 1.3; }
@media print { .hoja { display: flex; } }
.h-cab { display: flex; align-items: center; gap: 5mm; border-bottom: 1.2mm solid #ff5a4e; padding-bottom: 3.5mm; }
.h-logo { width: 15mm; height: 15mm; flex: none; border-radius: 3.5mm; border: 1.3mm solid var(--h-ink); background: #fff; position: relative; overflow: hidden; }
.h-logo::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4.2mm; background: #ff5a4e; }
.h-logo i { position: absolute; width: 4.2mm; height: 4.2mm; border-radius: 1.2mm; background: #12a594; right: 1.8mm; bottom: 1.8mm; }
.h-cab > div { flex: 1; min-width: 0; }
.h-kicker { margin: 0; font-family: var(--f-marca); font-weight: 700; color: #ff5a4e; font-size: 12pt; letter-spacing: .02em; text-transform: uppercase; }
.h-cab h2 { font-family: var(--f-marca); font-weight: 700; font-size: 26pt; line-height: 1; margin: .5mm 0; }
.h-zona { margin: 0; color: var(--h-muted); font-size: 10pt; font-weight: 600; }
.h-cifras { margin: 0; text-align: right; color: var(--h-muted); font-size: 9pt; line-height: 1.5; }
.h-cifras b { font-family: var(--f-marca); color: #12a594; font-size: 15pt; }
.h-cal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4mm 5mm; margin-top: 5mm; }
.h-mes h3 { font-family: var(--f-marca); font-size: 13pt; text-transform: capitalize; margin: 0 0 1mm; }
.h-sem, .h-dias { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; gap: .5mm; }
.h-sem span { font-size: 7pt; font-weight: 800; color: var(--h-muted); }
.h-dias span { font-size: 8.5pt; line-height: 5.9mm; border-radius: 1.2mm; font-variant-numeric: tabular-nums; }
.h-dias .fin { background: #eaedf4; color: var(--h-muted); }
.hoja .nac { background: #ff5a4e; color: #fff; font-weight: 800; }
.hoja .aut { background: #12a594; color: #fff; font-weight: 800; }
.hoja .ins { background: #8b7cf6; color: #fff; font-weight: 800; }
.hoja .loc { background: #ffc23d; color: #1a1400; font-weight: 800; }
.h-ley { display: flex; flex-wrap: wrap; gap: 2mm 5mm; margin: 3.5mm 0 0; font-size: 8.5pt; color: var(--h-muted); }
.h-ley span, .h-lista li { display: flex; align-items: center; gap: 1.6mm; }
.h-ley i, .h-lista i { width: 3mm; height: 3mm; border-radius: .8mm; flex: none; }
.h-ley i.fin { background: #eaedf4; border: .2mm solid #c9cedb; }
.h-tit { font-family: var(--f-marca); font-size: 12pt; margin: 3.5mm 0 1.5mm; padding-top: 3mm; border-top: .3mm solid var(--h-line); }
.h-lista { list-style: none; margin: 0; padding: 0; columns: 3; column-gap: 5mm; font-size: 8.8pt; }
.h-lista li { break-inside: avoid; padding: .6mm 0; }
.h-lista b { white-space: nowrap; }
.h-lista small { color: var(--h-muted); }
.h-pie { margin-top: auto; padding-top: 2.5mm; border-top: .3mm solid var(--h-line); font-size: 7.5pt; color: var(--h-muted); text-align: center; }
.h-pie b { color: var(--h-ink); }
.dias .loc, .leyenda .loc { background: var(--sun); color: #1a1400; font-weight: 800; }
.leyenda .ins { background: #8b7cf6; color: #fff; }
.dias .ins { background: #8b7cf6; color: #fff; }
.tipo.loc { background: color-mix(in srgb, var(--sun) 35%, transparent); }
.tipo.ins { background: color-mix(in srgb, #8b7cf6 22%, transparent); }
.buscar { width: 100%; max-width: 460px; font: inherit; font-size: 17px; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); margin: 6px 0 12px; }
.buscador { position: relative; max-width: 460px; margin-top: 14px; }
.sugerencias { list-style: none; margin: -8px 0 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sugerencias:empty { display: none; }
.sugerencias a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; text-decoration: none; border-bottom: 1px solid var(--line); }
.sugerencias a small { color: var(--muted); }
.prov { margin-bottom: 8px; }
.prov summary small { font-weight: 600; color: var(--muted); }
.munis { margin-top: 10px; }
.munis a { font-size: 13.5px; padding: 4px 10px; }
.oculto { display: none !important; }
/* Logo de Festivos: hoja de calendario */
.marca .logo { width: 30px; height: 30px; border-radius: 8px; background: var(--paper); border: 3px solid var(--ink); position: relative; display: inline-block; overflow: hidden; }
.marca .logo::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 9px; background: var(--coral); }
.marca .logo i { position: absolute; width: 9px; height: 9px; border-radius: 3px; background: var(--teal); right: 4px; bottom: 4px; }
.sub { font-family: var(--f-marca); font-size: 20px; margin: 18px 0 6px; }
