:root {
  --fondo: #f6f4f1; --papel: #ffffff; --tinta: #1d1f26; --tenue: #6b6f7a; --raya: #dcd8d2;
  --rojo: #b3202a; --barra: #3d4458; --barra-tinta: #ffffff; --letra: 19px;
}
:root[data-tema="oscuro"] {
  --fondo: #14161b; --papel: #1e2128; --tinta: #e8e6e1; --tenue: #9a9eaa; --raya: #33363f;
  --rojo: #ff7a80; --barra: #0e1014; --barra-tinta: #e8e6e1;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fondo); color: var(--tinta); }
body { font-family: Georgia, "Times New Roman", serif; font-size: 17px; line-height: 1.45;
  -webkit-text-size-adjust: 100%; overflow-wrap: anywhere; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

#barra { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px;
  background: var(--barra); color: var(--barra-tinta); padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top)); }
#barra button { font-size: 22px; min-width: 44px; min-height: 44px; border-radius: 8px; }
#barra #btn-gaur { font-family: system-ui, sans-serif; font-size: 15px; font-weight: 600; padding: 0 12px;
  border: 1px solid currentColor; }
#titulos { flex: 1; min-width: 0; }
#titulo { font-family: system-ui, sans-serif; font-weight: 600; font-size: 16px; }
#subtitulo { font-size: 14px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#vista { max-width: 680px; margin: 0 auto; padding: 16px 16px 48px; outline: none; }
.aviso { font-family: system-ui, sans-serif; font-size: 13px; color: var(--tenue); text-align: center; margin: 8px 0; }
.aviso.prueba { background: #fff3cd; color: #6b5200; border-radius: 8px; padding: 6px 10px; }
:root[data-tema="oscuro"] .aviso.prueba { background: #4a3d10; color: #f3dc8c; }

/* Día */
/* Cabecera del día: sin cuadro; el día litúrgico, grande, en el color del tiempo (--c) */
.cab { position: relative; text-align: center; padding: 14px 34px 16px; margin-bottom: 10px; border-bottom: 1px solid var(--raya); }
.cab .fecha { font-family: system-ui, sans-serif; font-size: 12px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--tenue); margin-bottom: 10px; }
.cab h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.15; color: var(--c); text-wrap: balance; }
.cab .memoria { font-size: 18px; margin-bottom: 10px; }
.cab .memoria em { display: block; color: var(--tenue); font-size: 15px; }
.cab .estrella { color: var(--c); margin-right: 5px; }
.cab .info { font-family: system-ui, sans-serif; font-size: 13px; color: var(--tenue); }
.cab .flecha { position: absolute; top: 2px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  color: var(--tenue); text-decoration: none; font-size: 20px; font-family: system-ui, sans-serif; }
.cab .flecha.ant { left: -8px; } .cab .flecha.sig { right: -8px; }
:root[data-tema="oscuro"] .cab h1, :root[data-tema="oscuro"] .cab .estrella { filter: brightness(1.7) saturate(.8); }
.celebracion { text-align: center; color: var(--rojo); font-size: 22px; line-height: 1.25; margin: 14px 0 4px; }
.rango { text-align: center; font-family: system-ui, sans-serif; font-size: 13px; color: var(--tenue); margin-bottom: 14px; }
.punto { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px;
  border: 1px solid rgba(0,0,0,.25); vertical-align: baseline; }
.fichas { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.ficha { font-family: system-ui, sans-serif; font-size: 14px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--raya); background: var(--papel); min-height: 40px; }
.ficha[aria-pressed="true"] { background: var(--barra); color: var(--barra-tinta); border-color: var(--barra); }
.horas { list-style: none; margin: 0; padding: 0; }
.horas a { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none;
  color: inherit; padding: 18px 4px; border-bottom: 1px solid var(--raya); font-size: 22px; }
.horas a small { display: block; font-family: system-ui, sans-serif; font-size: 13px; color: var(--tenue); }
.horas a.ahora { background: var(--papel); border: 1px solid var(--raya); border-radius: 10px; padding: 22px 16px;
  margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.12); font-size: 26px; }
.horas a::after { content: "\2192"; color: var(--tenue); }
.pasos { display: flex; justify-content: center; margin-top: 22px; font-family: system-ui, sans-serif; }
.pasos a { color: var(--rojo); text-decoration: none; padding: 10px 4px; min-height: 44px; }

/* Lector */
.herramientas { display: flex; gap: 6px; justify-content: flex-end; font-family: system-ui, sans-serif; }
.herramientas button { border: 1px solid var(--raya); border-radius: 8px; min-width: 44px; min-height: 40px; background: var(--papel); }
.lector { font-size: var(--letra); }
.lector h1 { color: var(--rojo); font-size: 1.15em; font-weight: normal; text-align: center; margin: .6em 0 .1em; }
.lector h2 { text-align: center; font-size: .8em; letter-spacing: .12em; text-transform: uppercase; color: var(--tenue);
  font-family: system-ui, sans-serif; font-weight: 600; margin: 0 0 1.2em; }
.lector section { margin: 0 0 1.3em; }
.lector p { margin: 0 0 .55em; }
.l-titulo { color: var(--rojo); font-size: .82em; letter-spacing: .08em; text-transform: uppercase;
  font-family: system-ui, sans-serif; font-weight: 600; margin-top: 1.2em !important; }
.l-rubrica { color: var(--rojo); font-style: italic; font-size: .85em; }
.l-salmo { color: var(--rojo); font-weight: bold; text-align: center; margin-top: .8em !important; }
.l-epigrafe { color: var(--rojo); font-style: italic; text-align: center; font-size: .9em; }
.l-cita { color: var(--rojo); text-align: right; font-size: .9em; }
.l-sentencia { font-style: italic; text-align: center; font-size: .9em; }
.l-estrofa { white-space: pre-line; padding-left: 1.2em; }
.l-texto { white-space: pre-line; }
.marca { color: var(--rojo); font-weight: bold; margin-right: .35em; }
.falta { font-family: system-ui, sans-serif; font-size: 13px; color: var(--tenue); border: 1px dashed var(--raya);
  border-radius: 8px; padding: 8px 10px; }
.batua { font-family: system-ui, sans-serif; font-size: 12px; color: var(--rojo); margin: 0 0 2px; }

/* Calendario */
.mes { display: flex; justify-content: space-between; align-items: center; font-size: 20px; margin: 4px 0 12px; }
.mes button { font-size: 22px; min-width: 44px; min-height: 44px; }
.rejilla { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-family: system-ui, sans-serif; }
.rejilla .cab { text-align: center; font-size: 12px; color: var(--tenue); padding: 4px 0; }
.rejilla a, .rejilla span.d { display: flex; flex-direction: column; align-items: center; justify-content: center;
  aspect-ratio: 1; border-radius: 8px; text-decoration: none; color: inherit; font-size: 16px; background: var(--papel); }
.rejilla span.d { color: var(--raya); background: none; }
.rejilla a.hoy { outline: 2px solid var(--rojo); }
.rejilla a.fiesta { font-weight: 700; color: var(--rojo); }
.rejilla .punto { margin: 3px 0 0; width: 7px; height: 7px; }
