/* Calendario para imprimir — Corbatalab
   Paleta: fondo #FFFBF2 · texto #1E293B · acento #B42318 · secundario #0E7490 */

:root {
  --fondo: #FFFBF2;
  --papel: #FFFFFF;
  --texto: #1E293B;
  --tenue: #5B6474;
  --acento: #B42318;
  --acento-osc: #8F1B12;
  --sec: #0E7490;
  --linea: #E7DFCF;
  --linea-2: #D6CCB8;
  --suave: #F7F1E3;
  --sombra: 0 1px 2px rgba(30, 41, 59, .06), 0 10px 30px -12px rgba(30, 41, 59, .18);
  --radio: 14px;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font: 400 16px/1.6 var(--sans);
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--sec); text-underline-offset: 2px; }
a:hover { color: var(--acento); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--sec); outline-offset: 2px; border-radius: 6px; }

.contenedor { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.saltar { position: absolute; left: -999px; top: 8px; background: var(--texto); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.saltar:focus { left: 8px; }

/* ---------- cabecera ---------- */
.cabecera { border-bottom: 1px solid var(--linea); background: rgba(255, 251, 242, .92); position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.2) blur(6px); }
.cabecera-in { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 12px; }
.marca { display: flex; align-items: center; gap: 8px; color: var(--texto); text-decoration: none; font-weight: 700; font-size: 1.02rem; }
.marca-tenue { color: var(--tenue); font-weight: 500; }
.nav { display: flex; gap: 18px; font-size: .92rem; }
.nav a { color: var(--texto); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--acento); }
@media (max-width: 640px) { .nav { display: none; } }

/* ---------- hero ---------- */
.hero { padding-top: 22px; padding-bottom: 14px; }
.hero h1 { font-size: clamp(1.6rem, 4.6vw, 2.6rem); margin-bottom: .25em; max-width: 22ch; }
.sub { color: var(--tenue); font-size: clamp(.98rem, 2.4vw, 1.1rem); margin: 0; max-width: 60ch; }

/* ---------- tarjeta de la herramienta ---------- */
.tool-card {
  background: var(--papel); border: 1px solid var(--linea); border-radius: 20px; box-shadow: var(--sombra);
  padding: 16px; display: grid; gap: 18px;
  grid-template-columns: 1fr;
  grid-template-areas: "basico" "vista" "extra";
}
.tool-basico { grid-area: basico; }
.tool-vista { grid-area: vista; min-width: 0; }
.tool-extra { grid-area: extra; }
@media (min-width: 900px) {
  .tool-card {
    padding: 24px; gap: 20px 32px;
    grid-template-columns: minmax(330px, 410px) 1fr;
    grid-template-areas: "basico vista" "extra vista";
    grid-template-rows: auto 1fr;
    align-items: start;
  }
  .tool-vista { position: sticky; top: 72px; }
}
.sin-js { background: var(--suave); padding: 12px; border-radius: 10px; }

.fila-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.campo { display: block; border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.campo-et { display: block; font-size: .8rem; font-weight: 600; color: var(--tenue); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; padding: 0; }
.campo-et small { text-transform: none; letter-spacing: 0; font-weight: 500; }
select, input[type="text"], input[type="number"] {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--linea-2); border-radius: 10px;
  background: #fff; color: var(--texto); font: 500 1rem/1 var(--sans);
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235B6474' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px; padding-right: 32px; }
select:hover, input[type="text"]:hover, input[type="number"]:hover { border-color: #BDB09A; }

/* segmentos (radios con aspecto de botón) */
.segmento { display: flex; gap: 6px; background: var(--suave); padding: 4px; border-radius: 12px; }
.segmento label { flex: 1; position: relative; cursor: pointer; }
.segmento input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmento span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 40px; padding: 6px 8px; border-radius: 9px; font-weight: 600; font-size: .92rem; color: var(--tenue); text-align: center; transition: background .15s, color .15s, box-shadow .15s; }
.segmento small { font-weight: 500; font-size: .74rem; }
.segmento svg { width: 20px; height: 20px; fill: currentColor; }
.segmento input:checked + span { background: #fff; color: var(--texto); box-shadow: 0 1px 3px rgba(30, 41, 59, .16); }
.segmento input:checked + span svg { fill: var(--acento); }
.segmento input:focus-visible + span { outline: 3px solid var(--sec); outline-offset: 1px; }
.segmento-3 span { min-height: 64px; }

/* acciones */
.acciones { display: grid; gap: 8px; margin-top: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; font: 600 1rem/1.2 var(--sans); cursor: pointer; padding: 0 18px; min-height: 44px; transition: background .15s, transform .1s; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 22px; height: 22px; }
.btn-principal { background: var(--acento); color: #fff; min-height: 56px; font-size: 1.1rem; box-shadow: 0 6px 16px -8px rgba(180, 35, 24, .7); }
.btn-principal:hover { background: var(--acento-osc); }
.btn-principal[disabled] { opacity: .7; cursor: progress; }
.btn-extra { font-weight: 500; font-size: .85rem; background: rgba(255, 255, 255, .18); padding: 3px 8px; border-radius: 999px; }
.btn-secundario { background: #fff; color: var(--texto); border: 1px solid var(--linea-2); }
.btn-secundario:hover { border-color: var(--sec); color: var(--sec); }
.estado { min-height: 1.4em; margin: 2px 0 0; font-size: .9rem; color: var(--tenue); }
.estado.ok { color: #166534; font-weight: 600; }
.estado.error { color: var(--acento); font-weight: 600; }
.tool-card[data-state="working"] .btn-principal { background: var(--acento-osc); }
.privado { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; color: var(--tenue); margin: 12px 0 0; }
.privado svg { width: 16px; height: 16px; fill: var(--sec); flex: none; margin-top: 3px; }

/* vista previa */
.vista-barra { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
@media (max-width: 480px) { .vista-et { display: none; } }
.vista-et { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--tenue); }
.vista-nav { display: flex; align-items: center; gap: 6px; }
.vista-nav[hidden] { display: none; }
.vista-mes { min-width: 9.5em; text-align: center; font-weight: 600; text-transform: capitalize; }
.icono { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--linea-2); background: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--texto); }
.icono:hover { border-color: var(--sec); color: var(--sec); }
.vista-caja { background: repeating-linear-gradient(45deg, #F3EDDF 0 10px, #F7F2E6 10px 20px); border-radius: 14px; padding: 16px; display: flex; justify-content: center; }
.vista-caja canvas { background: #fff; box-shadow: 0 2px 4px rgba(30, 41, 59, .08), 0 14px 30px -14px rgba(30, 41, 59, .35); border-radius: 2px; }

/* lista de feriados */
.feriados { margin-top: 16px; border: 1px solid var(--linea); border-radius: 12px; padding: 12px 14px; background: #FFFDF8; }
.feriados > summary { font-weight: 700; cursor: pointer; }
.fer-nota { color: var(--tenue); font-size: .88rem; margin: 8px 0; }
.fer-lista { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.fer-lista li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 0; border-top: 1px dashed var(--linea); }
.fer-fecha { font-weight: 700; min-width: 6.6em; color: var(--acento); font-variant-numeric: tabular-nums; }
.fer-nombre { flex: 1; min-width: 12em; }
.fer-nombre small { color: var(--tenue); }
.badge { font-size: .74rem; font-weight: 700; background: #FEF3C7; color: #78350F; border: 1px solid #F3D27A; border-radius: 999px; padding: 1px 8px; }
.aviso { background: #FFF4EF; border-left: 4px solid var(--acento); padding: 10px 12px; border-radius: 0 10px 10px 0; font-size: .9rem; margin: 12px 0 0; }
.aviso-pend { font-size: .86rem; color: #78350F; margin: 10px 0 0; }
.fuentes { margin-top: 10px; font-size: .86rem; }
.fuentes summary { cursor: pointer; color: var(--sec); font-weight: 600; }
.fuentes ul { padding-left: 18px; margin: 8px 0 0; }
.fuentes li { margin-bottom: 4px; }

/* bloques de personalización */
.bloque { border-top: 1px solid var(--linea); padding-top: 12px; margin-top: 4px; }
.bloque > summary, .bloque-tit { font-weight: 700; font-size: 1rem; cursor: pointer; margin: 0 0 12px; font-family: var(--sans); }
.bloque > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; }
.bloque > summary::-webkit-details-marker { display: none; }
.bloque > summary::after { content: "+"; font-size: 1.3rem; color: var(--tenue); }
.bloque[open] > summary::after { content: "–"; }
.bloque-fotos { padding-bottom: 4px; }
.ayuda { font-size: .85rem; color: var(--tenue); margin: 4px 0 10px; }
.msg { font-size: .88rem; color: var(--acento); min-height: 1.2em; margin: 4px 0; }

.temas { display: flex; flex-wrap: wrap; gap: 8px; }
.tema { position: relative; cursor: pointer; }
.tema input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tema span { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 8px; border: 1px solid var(--linea-2); border-radius: 10px; font-weight: 600; font-size: .9rem; background: #fff; }
.tema span::before { content: ""; width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--a) 0 55%, var(--b) 55%); }
.tema input:checked + span { border-color: var(--texto); box-shadow: inset 0 0 0 1px var(--texto); }
.tema input:focus-visible + span { outline: 3px solid var(--sec); outline-offset: 2px; }
.acento-propio { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px 0 6px; border: 1px dashed var(--linea-2); border-radius: 10px; font-weight: 600; font-size: .9rem; cursor: pointer; background: #fff; }
.acento-propio input { width: 28px; height: 28px; border: 0; padding: 0; background: none; cursor: pointer; }
.check { display: flex; gap: 10px; align-items: center; font-size: .95rem; cursor: pointer; margin: 4px 0 8px; }
.check input { width: 20px; height: 20px; accent-color: var(--acento); }
.check[hidden] { display: none; }

.fp-form { display: grid; grid-template-columns: 70px 1fr; gap: 8px 10px; align-items: end; }
.fp-form .campo { margin: 0; }
.fp-texto { grid-column: 1 / -1; }
.fp-add { grid-column: 1 / -1; }
@media (min-width: 480px) and (max-width: 899px) {
  .fp-form { grid-template-columns: 70px 140px 1fr auto; }
  .fp-texto, .fp-add { grid-column: auto; }
}
.chips { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { display: inline-flex; align-items: center; gap: 4px; background: #ECF7F9; border: 1px solid #BFE3EA; border-radius: 999px; padding: 2px 4px 2px 12px; font-size: .88rem; }
.chips b { color: var(--sec); }
.chip-x { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; font-size: 1.1rem; cursor: pointer; color: var(--tenue); }
.chip-x:hover { background: #fff; color: var(--acento); }

.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot { position: relative; }
.slot-todas { grid-column: 1 / -1; }
.slot-btn { width: 100%; aspect-ratio: 4 / 3; border: 1.5px dashed var(--linea-2); border-radius: 10px; background: #FFFDF8 center / cover no-repeat; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding: 4px; font: 600 .8rem var(--sans); color: var(--tenue); }
.slot-todas .slot-btn { aspect-ratio: auto; height: 56px; align-items: center; font-size: .92rem; }
.slot-btn:hover, .slot-btn.sobre { border-color: var(--sec); color: var(--sec); }
.con-foto .slot-btn { border-style: solid; border-color: transparent; }
.con-foto .slot-et { background: rgba(255, 255, 255, .92); color: var(--texto); border-radius: 6px; padding: 1px 6px; }
.slot-x { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--texto); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }

/* ---------- anuncios (huecos) ---------- */
.ad-slot { display: flex; align-items: center; justify-content: center; border: 1.5px dashed #CFC3AC; border-radius: 10px; background: #FBF6EA; color: #6B6150; font: 700 .78rem var(--sans); letter-spacing: .14em; }
.ad-leaderboard { min-height: 100px; margin: 24px auto; max-width: 970px; }
.ad-contenido { min-height: 250px; margin: 8px auto 32px; max-width: 728px; }
.ad-popup { min-height: 250px; width: 100%; margin: 12px 0; }
.ad-esquina { min-height: 100px; width: 100%; }

.popup { border: 0; border-radius: 18px; padding: 20px; width: min(360px, calc(100vw - 32px)); box-shadow: 0 30px 80px -20px rgba(15, 23, 42, .5); color: var(--texto); }
.popup::backdrop { background: rgba(15, 23, 42, .45); }
.popup .btn { width: 100%; }
.popup-tit { font-weight: 700; margin: 0 28px 0 0; }
.popup-x, .esquina-x { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--suave); font-size: 1.3rem; cursor: pointer; color: var(--texto); }
.popup-x:hover, .esquina-x:hover { background: var(--linea); }

.esquina { position: fixed; right: 16px; bottom: 16px; width: 300px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--linea); border-radius: 14px; box-shadow: var(--sombra); padding: 40px 12px 12px; z-index: 30; opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s; }
.esquina.visible { opacity: 1; transform: none; }
.esquina[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .esquina { transition: none; } }

/* ---------- contenido ---------- */
.seccion { padding-top: 40px; padding-bottom: 8px; }
.seccion h2 { font-size: clamp(1.35rem, 3.4vw, 1.9rem); }
.pasos { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .pasos { grid-template-columns: repeat(3, 1fr); } }
.pasos li { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 18px; }
.paso-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--acento); color: #fff; font-weight: 700; margin-bottom: 10px; }
.pasos p { color: var(--tenue); margin: 0; font-size: .95rem; }

.paises { display: grid; gap: 10px; margin: 18px 0; }
@media (min-width: 760px) { .paises { grid-template-columns: 1fr 1fr; align-items: start; } }
.pais { background: #fff; border: 1px solid var(--linea); border-radius: 12px; padding: 12px 16px; }
.pais summary { cursor: pointer; font-weight: 700; }
.pais h3 { display: inline; font-size: 1rem; }
.pais ul { list-style: none; padding: 0; margin: 10px 0 4px; font-size: .92rem; }
.pais li { padding: 4px 0; border-top: 1px dashed var(--linea); display: flex; gap: 10px; }
.pais li span { font-weight: 700; color: var(--acento); min-width: 6.4em; font-variant-numeric: tabular-nums; }
.pais .pend { font-size: .78rem; color: #78350F; font-weight: 600; }

.dos-col { display: grid; gap: 8px 40px; }
@media (min-width: 900px) { .dos-col { grid-template-columns: 1fr 1fr; } }
.ideas { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .ideas { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .ideas { grid-template-columns: repeat(3, 1fr); } }
.ideas li { background: #fff; border: 1px solid var(--linea); border-top: 4px solid var(--sec); border-radius: 12px; padding: 16px; }
.ideas p { color: var(--tenue); margin: 0; font-size: .94rem; }

.faq { display: grid; gap: 8px; margin-top: 16px; max-width: 820px; }
.faq details { background: #fff; border: 1px solid var(--linea); border-radius: 12px; padding: 0 16px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
.faq p { color: var(--tenue); }

/* ---------- pie ---------- */
.pie { margin-top: 56px; background: #1E293B; color: #E2E8F0; padding: 32px 0 40px; }
.pie-in { display: grid; gap: 10px; }
.corbatalab { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font: 600 1.3rem var(--display); }
.corbatalab svg { color: #F2836B; }
.corbatalab b { color: #F2836B; font-weight: 700; }
.corbatalab:hover { color: #fff; }
.pie-txt { color: #CBD5E1; margin: 0; font-size: .95rem; }
.pie-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.pie-nav a { color: #fff; font-weight: 500; }
.pie-nav a:hover { color: #F2836B; }
.pie-mini { color: #A9B4C4; font-size: .82rem; margin: 6px 0 0; }

/* ---------- páginas legales ---------- */
.legal { max-width: 760px; padding-top: 32px; }
.legal h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.legal h2 { font-size: 1.2rem; margin-top: 1.6em; font-family: var(--sans); }
.legal p, .legal li { color: #334155; }
.volver { display: inline-block; margin-top: 24px; }

@media print {
  .cabecera, .ad-slot, .esquina, .popup, .pie { display: none !important; }
}
