:root {
  --papel: #eef0ee;
  --hoja: #f8f9f7;
  --tinta: #16233f;
  --grafito: #566072;
  --linea: #d3d8dd;
  --sello: #a8231b;
  --hecho: #2c6a4c;
  --foco: #2f5fd0;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --papel: #0e1624;
    --hoja: #151f30;
    --tinta: #e4e8ee;
    --grafito: #9aa4b5;
    --linea: #2a364b;
    --sello: #e06a60;
    --hecho: #6fc298;
    --foco: #8fb0ff;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: inherit; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font: 400 1.0625rem/1.55 "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.pagina {
  max-width: 38rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 7rem;
}

/* Marca */
.marca {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  text-decoration: none;
  color: var(--grafito);
  font-size: .9rem;
  margin-bottom: 2.5rem;
}
.marca b {
  font-family: "Spectral", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--tinta);
}

/* Títulos */
h1, h2 {
  font-family: "Spectral", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
}
h1 { font-size: clamp(2rem, 7vw, 2.75rem); letter-spacing: -.01em; }
h2 { font-size: 1.35rem; margin: 2.5rem 0 .75rem; }
.bajada { color: var(--grafito); margin: .75rem 0 0; max-width: 32rem; }
.cuando {
  display: inline-block;
  margin-top: 1rem;
  padding: .2rem .6rem;
  border: 1px solid var(--linea);
  border-radius: 4px;
  font-size: .9rem;
  color: var(--grafito);
}

p { margin: 0 0 1rem; }
a { color: var(--tinta); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }

/* Botones */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: .6rem 1.1rem;
  border-radius: 6px;
  border: 1.5px solid var(--tinta);
  background: var(--tinta);
  color: var(--papel);
  font: 600 1rem/1.2 inherit;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
.boton.secundario { background: transparent; color: var(--tinta); }
.botones { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }

/* Listas de actividades y tiendas */
.filas { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linea); }
.filas li { border-bottom: 1px solid var(--linea); }
.filas a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  text-decoration: none;
}
.filas a span:first-child { font-weight: 600; }
.filas small { color: var(--grafito); font-size: .9rem; text-align: right; }

/* Checklist */
.grupo { margin: 0; padding: 0; border: 0; }
.grupo legend {
  font-family: "Spectral", Georgia, serif;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0;
  margin: 1.75rem 0 .25rem;
}
.item {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 3rem;
  border-bottom: 1px solid var(--linea);
  cursor: pointer;
}
.item input {
  appearance: none;
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  margin: 0;
  border: 1.5px solid var(--grafito);
  border-radius: 4px;
  display: grid;
  place-content: center;
  cursor: pointer;
}
.item input:checked { background: var(--tinta); border-color: var(--tinta); }
.item input:checked::after {
  content: "";
  width: .7rem;
  height: .38rem;
  border: 2.5px solid var(--papel);
  border-top: 0;
  border-right: 0;
  transform: translateY(-2px) rotate(-45deg);
}
.item span { flex: 1; }
.item input:checked + span { font-weight: 600; }
.quitar {
  border: 0;
  background: none;
  color: var(--grafito);
  font-size: 1.4rem;
  line-height: 1;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  border-radius: 4px;
}

.agregar { display: flex; gap: .5rem; margin-top: .75rem; }
.agregar input, .campo input {
  flex: 1;
  min-width: 0;
  min-height: 2.9rem;
  padding: .5rem .75rem;
  border: 1.5px solid var(--linea);
  border-radius: 6px;
  background: var(--hoja);
  color: var(--tinta);
  font: inherit;
}
.vacio { color: var(--grafito); font-style: italic; padding: .75rem 0; margin: 0; }

/* Mensajes prehechos */
.mensaje {
  background: var(--hoja);
  border-left: 3px solid var(--tinta);
  padding: 1rem 1.1rem;
  margin: 0 0 .5rem;
  font-family: "Spectral", Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.5;
}
.mensaje + .botones { margin-top: .5rem; margin-bottom: 1.75rem; }

/* Campos guardados (gas) */
.campo { display: block; margin: .75rem 0; }
.campo span { display: block; font-size: .9rem; color: var(--grafito); margin-bottom: .25rem; }
.campo input { width: 100%; }

/* Barra inferior */
.barra {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--hoja);
  border-top: 1px solid var(--linea);
  padding: .75rem 1.25rem calc(.75rem + env(safe-area-inset-bottom, 0px));
}
.barra .interior {
  max-width: 38rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.barra .conteo { flex: 1 0 100%; font-weight: 600; font-size: .95rem; }
.barra .boton { flex: 1; }
@media (min-width: 34rem) {
  .barra .conteo { flex: 1; }
  .barra .boton { flex: none; }
}

/* El sello */
.sello {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 10;
}
.sello[hidden] { display: none; }
.sello div {
  font-family: "Spectral", Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(3.5rem, 18vw, 6.5rem);
  color: var(--sello);
  border: 5px double var(--sello);
  border-radius: 10px;
  padding: .1em .45em .15em;
  transform: rotate(-8deg);
  background: color-mix(in srgb, var(--papel) 82%, transparent);
  animation: sellar .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes sellar {
  from { transform: rotate(-8deg) scale(1.9); opacity: 0; }
  to   { transform: rotate(-8deg) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sello div { animation: none; }
}

.aviso {
  font-size: .9rem;
  color: var(--grafito);
  margin-top: 2rem;
}

/* Vistas y barras alternas */
[data-vista][hidden], .barra[hidden] { display: none; }
.barra .nota { flex: 1 0 100%; font-size: .9rem; color: var(--grafito); margin: 0; }

/* Modo compra */
.item.grande { min-height: 3.6rem; font-size: 1.2rem; }
.item.grande input { width: 1.6rem; height: 1.6rem; }
.item.grande input:checked + span {
  font-weight: 400;
  color: var(--grafito);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.tiendas-rapidas { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.5rem; }
.tiendas-rapidas a {
  padding: .45rem .8rem;
  border: 1.5px solid var(--linea);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
}
