/* Memorable · Los colores vienen de cada comunidad (--primario, --secundario, --fondo). */
:root { --texto: #1d1a14; --suave: #6b6457; --borde: #e3dcc7; --blanco: #fff; --peligro: #a3271b; --ok: #2f6b2f; --radio: 10px; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.55; color: var(--texto); background: var(--fondo); }
h1, h2, h3 { font-family: Roboto, system-ui, sans-serif; line-height: 1.25; color: var(--secundario); }
h1 { font-size: 1.7rem; margin: .2em 0 .5em; }
h2 { font-size: 1.25rem; margin: 1.3em 0 .4em; }
a { color: var(--secundario); }
img { max-width: 100%; }

.barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .7rem 1.2rem; background: var(--primario); }
.barra a, .barra .enlace { color: #fff; text-decoration: none; font-weight: 600; }
.marca { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; }
.marca img { height: 40px; width: auto; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.idiomas a { font-size: .85rem; opacity: .75; margin-left: .3rem; }
.idiomas a.activo { opacity: 1; border-bottom: 2px solid #fff; }

main { max-width: 860px; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
footer { display: flex; justify-content: space-between; padding: 1rem 1.2rem; background: var(--secundario); color: #f0e9d6; font-size: .85rem; }
footer a { color: #f0e9d6; }

.tarjeta { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.2rem 1.4rem; margin: 0 0 1.2rem; }
.angosta { max-width: 560px; margin-left: auto; margin-right: auto; }
.portada { text-align: center; padding: 1.5rem 0 1rem; }
.grande { font-size: 1.2rem; }
.chico { font-size: .9rem; color: var(--suave); }

label { display: block; margin: .7rem 0; font-weight: 600; }
label small { font-weight: 400; color: var(--suave); }
input, select, textarea { display: block; width: 100%; margin-top: .3rem; padding: .55rem .65rem; font: inherit; border: 1px solid #cfc6ad; border-radius: 8px; background: #fff; }
input[type=checkbox] { display: inline; width: auto; margin: 0 .4rem 0 0; }
input[type=color] { width: 4rem; padding: .1rem; height: 2.2rem; }
.casilla { font-weight: 400; display: flex; align-items: flex-start; gap: .2rem; }
.casilla input { margin-top: .35rem; }
fieldset { border: 1px solid var(--borde); border-radius: 8px; margin: 1rem 0; padding: .4rem 1rem; }
legend { font-weight: 700; padding: 0 .3rem; }

.boton { display: inline-block; padding: .6rem 1.2rem; border: 0; border-radius: 8px; background: var(--secundario); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.boton.secundario { background: transparent; color: var(--secundario); border: 2px solid var(--secundario); }
.boton.chico { padding: .35rem .8rem; font-size: .9rem; }
.boton.peligro { background: var(--peligro); }
.enlace { background: none; border: 0; padding: 0; font: inherit; color: var(--secundario); text-decoration: underline; cursor: pointer; }
.enlace.peligro { color: var(--peligro); }
.enlinea { display: inline; }
.botones { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

.aviso { padding: .7rem 1rem; border-radius: 8px; margin: 0 0 1rem; background: #eef6ea; border-left: 4px solid var(--ok); }
.aviso.error { background: #fbeceb; border-color: var(--peligro); }
.aviso.alerta { background: #fdf4dc; border-color: var(--primario); }
.estado { display: inline-block; padding: .15rem .6rem; border-radius: 99px; font-size: .85rem; font-weight: 700; background: #eee; }
.estado-pendiente { background: #fdf4dc; } .estado-aprobada { background: #e4f1df; } .estado-rechazada { background: #fbeceb; }

.cuenta-regresiva { font-weight: 700; color: var(--secundario); }
.recorrido-resumen, .encabezado-recorrido { display: grid; grid-template-columns: 110px 1fr; gap: 1.2rem; align-items: start; }
.espiga { width: 100%; max-width: 110px; }
.espiga .tallo { stroke: #9c8a5a; stroke-width: 3; }
.espiga .grano { fill: #fff; stroke: #c9a646; stroke-width: 2; }
.espiga .grano.lleno { fill: var(--primario); stroke: #a4842d; }

.bloque .intro { color: var(--suave); }
ol.pasos { list-style: none; padding: 0; margin: 0; }
.paso a, .paso > span { display: flex; align-items: center; gap: .8rem; }
.paso { border: 1px solid var(--borde); border-radius: 8px; margin: .4rem 0; background: #fff; }
.paso a { padding: .6rem .8rem; text-decoration: none; color: inherit; }
.paso.cerrado { padding: .6rem .8rem; color: var(--suave); display: flex; gap: .8rem; background: #f7f4ea; }
.paso .num { width: 2rem; height: 2rem; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--fondo); font-weight: 700; }
.paso .titulo { flex: 1; }
.paso .marca-estado { font-size: .85rem; color: var(--suave); }
.paso.vivido .num { background: var(--primario); color: #fff; }
.paso.actual { border: 2px solid var(--primario); }

.migas { margin: 0 0 .6rem; }
.epoca { color: var(--suave); font-style: italic; margin: 0; }
ul.papeles { padding-left: 1.1rem; }
ul.papeles li { margin: .35rem 0; }
.papel-principal { background: var(--fondo); border-radius: 8px; padding: .8rem 1rem; }
.variante { margin: .6rem 0 0; }
.ensenanza { border-left: 4px solid var(--primario); padding: .2rem 1rem; background: #fffdf3; margin-top: 1.2rem; }
.vivida.hecha { border-color: var(--primario); border-width: 2px; }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; margin-top: 1rem; }
.fotos figure { margin: 0; }
.fotos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.fotos figcaption { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .85rem; }
.anterior-siguiente { display: flex; justify-content: space-between; }
.quitar { margin-top: 1rem; }
.fila-integrante { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: .5rem; align-items: center; margin: .4rem 0; }
.fila-integrante input, .fila-integrante select { margin: 0; }
.zona-peligro { margin-top: 2rem; }
.zona-peligro summary { color: var(--peligro); cursor: pointer; }

.tabla { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--borde); vertical-align: top; }
table.datos th { width: 35%; color: var(--suave); font-weight: 600; }
.cuadros { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.cuadro { text-decoration: none; display: flex; flex-direction: column; gap: .3rem; }
.cuadro strong { font-size: 2rem; color: var(--secundario); }
.formulario-panel .campo-casilla { font-weight: 400; }
.texto-largo.corto { max-height: 9rem; overflow: hidden; }

@media (max-width: 560px) {
  .recorrido-resumen, .encabezado-recorrido { grid-template-columns: 70px 1fr; gap: .8rem; }
  .fila-integrante { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.4rem; }
}
