/* salidas — el panel. Dirección: balizas de sendero y dorsales de papel.
   Rojo GR para lo urgente, amarillo PR para lo hecho, azul del Mediterráneo de Malgrat para enlaces,
   fondo liquen. La pieza memorable es el dorsal; el resto, callado. */

:root {
  --liquen: #e8eee9;
  --liquen-2: #dce5df;
  --papel: #fdfdfb;
  --pino: #18241f;
  --pino-2: #4b5a53;
  --gr: #d2232b;
  --pr: #f0bd1d;
  --mar: #1f6585;
  --linea: #c7d3cb;
  --sombra: 0 1px 0 rgba(24, 36, 31, .08), 0 6px 18px -10px rgba(24, 36, 31, .35);
  --r: 6px;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --texto: "Atkinson Hyperlegible", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --liquen: #111916; --liquen-2: #18221e; --papel: #1d2823; --pino: #e5ece8; --pino-2: #9fb0a7;
    --gr: #ff5a5f; --pr: #f5c842; --mar: #6fb6d8; --linea: #2c3a34;
    --sombra: 0 1px 0 rgba(0, 0, 0, .4), 0 8px 22px -12px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --liquen: #111916; --liquen-2: #18221e; --papel: #1d2823; --pino: #e5ece8; --pino-2: #9fb0a7;
  --gr: #ff5a5f; --pr: #f5c842; --mar: #6fb6d8; --linea: #2c3a34; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--liquen); color: var(--pino);
  font: 17px/1.5 var(--texto);
  /* curvas de nivel muy suaves */
  background-image: radial-gradient(circle at 85% -10%, var(--liquen-2) 0 18%, transparent 18.2% 24%, var(--liquen-2) 24.2% 25%, transparent 25.2%);
  background-attachment: fixed;
}
a { color: var(--mar); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--mar); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { margin: 0; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- cabecera y menú ---------- */
.cabecera {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 2.5rem); max-width: 1180px; margin: 0 auto;
}
.marca {
  display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--pino);
  font: 800 1.7rem/1 var(--display); letter-spacing: .02em; text-transform: uppercase;
}
.baliza { /* marca de GR: blanca y roja */
  width: 22px; height: 14px; border-radius: 2px;
  background: linear-gradient(var(--papel) 0 50%, var(--gr) 50% 100%);
  box-shadow: 0 0 0 1.5px var(--pino);
}
.menu { display: flex; gap: .25rem; }
.menu a {
  display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .75rem; border-radius: 99px;
  color: var(--pino-2); text-decoration: none; font-weight: 700; font-size: .95rem;
}
.menu a.activa, .menu a:hover { color: var(--pino); background: var(--liquen-2); }
.ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
.ico svg path[d^="M3 11"] { fill: none; }

main { max-width: 1180px; margin: 0 auto; padding: .5rem clamp(1rem, 4vw, 2.5rem) 6rem; }
main.solo { display: grid; place-items: center; min-height: 100svh; padding-bottom: 2rem; }

@media (max-width: 720px) {
  .menu {
    position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; justify-content: space-around;
    padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--papel) 92%, transparent); backdrop-filter: blur(8px);
    border-top: 1px solid var(--linea);
  }
  .menu a { flex-direction: column; gap: .1rem; font-size: .72rem; padding: .35rem .6rem; border-radius: 10px; }
  .menu a.activa { background: none; color: var(--gr); }
}

/* salir: discreto, a la derecha */
.salir { margin: 0; }
.salir button { background: none; border: 0; color: var(--pino-2); font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; cursor: pointer; padding: .5rem; }
.salir button:hover { color: var(--gr); }
@media (min-width: 721px) { .cabecera .menu { margin-left: auto; } }
@media (max-width: 720px) { .cabecera .ajustes-enlace { margin-left: auto; } }

/* ---------- textos ---------- */
.ceja { margin: 0 0 .3rem; font: 500 .78rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--pino-2); }
h1 { font: 800 clamp(2.2rem, 6vw, 3.6rem)/.95 var(--display); text-transform: uppercase; letter-spacing: .005em; }
h2 { font: 800 1.45rem/1 var(--display); text-transform: uppercase; letter-spacing: .03em; margin-bottom: .9rem; }
.cuando { margin: .6rem 0 0; font-size: 1.05rem; color: var(--pino-2); }
.cuando::first-letter { text-transform: uppercase; }
.titulo { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 1rem 0 1.2rem; }
.sep { margin-top: 2rem; }
.vacio { color: var(--pino-2); }

/* ---------- botones y formularios ---------- */
.boton {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  background: var(--pino); color: var(--liquen); font: 700 1rem/1 var(--texto);
  padding: .8rem 1.15rem; border-radius: var(--r);
}
.boton:hover { background: var(--gr); color: #fff; }
.boton.suave { background: var(--liquen-2); color: var(--pino); }
.boton.suave:hover { background: var(--pino); color: var(--liquen); }
.campo { display: grid; gap: .3rem; font-size: .9rem; font-weight: 700; color: var(--pino-2); }
.campo input, .campo select, .campo textarea {
  font: 400 1rem/1.3 var(--texto); color: var(--pino); background: var(--papel);
  border: 1.5px solid var(--linea); border-radius: var(--r); padding: .65rem .7rem; width: 100%; min-width: 0;
}
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--mar); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--mar) 25%, transparent); }
.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .9rem 1rem; align-items: end; margin-top: 1rem; }
.rejilla.grande { background: var(--papel); padding: clamp(1rem, 3vw, 1.6rem); border-radius: var(--r); box-shadow: var(--sombra); }
.rejilla .ancho { grid-column: 1 / -1; }
.en-linea { display: flex; flex-wrap: wrap; gap: .7rem; align-items: end; }
.campo.corto input { width: 7.5rem; }
.check { display: flex; gap: .45rem; align-items: center; font-size: .95rem; }
.error { background: color-mix(in srgb, var(--gr) 14%, var(--papel)); border-left: 4px solid var(--gr); padding: .7rem .9rem; border-radius: var(--r); }
.hecho { background: color-mix(in srgb, var(--pr) 22%, var(--papel)); border-left: 4px solid var(--pr); padding: .6rem .9rem; border-radius: var(--r); margin: 1rem 0 0; }
.plegable { margin-top: 1rem; }
.plegable summary { cursor: pointer; color: var(--mar); font-weight: 700; }

/* ---------- EL DORSAL ---------- */
.dorsal {
  --tinta: var(--pino);
  position: relative; display: grid; grid-template-rows: auto 1fr auto auto auto;
  background: var(--papel); color: var(--tinta); text-decoration: none;
  border-radius: 4px; padding: 1.15rem 1.25rem 0; min-height: 210px; overflow: hidden;
  box-shadow: var(--sombra);
  transition: transform .18s ease, box-shadow .18s ease;
}
a.dorsal:hover { transform: rotate(-.6deg) translateY(-2px); }
.dorsal .pin { /* agujeros del imperdible */
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: var(--liquen); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
}
.p1 { top: 9px; left: 9px; } .p2 { top: 9px; right: 9px; }
.p3 { bottom: 52px; left: 9px; } .p4 { bottom: 52px; right: 9px; }
.d-cab { display: flex; justify-content: space-between; gap: .5rem; font: 500 .72rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 0 .5rem; }
.d-estado { color: var(--pino-2); }
.d-num { display: flex; align-items: baseline; justify-content: center; gap: .35rem; padding: .2rem 0 0; }
.d-num b { font: 900 clamp(4.2rem, 10vw, 5.4rem)/.9 var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.d-num small { font: 800 1.1rem/1 var(--display); text-transform: uppercase; color: var(--pino-2); }
.d-nombre { font: 800 1.15rem/1.05 var(--display); text-transform: uppercase; text-align: center; letter-spacing: .02em; padding: .35rem .25rem .2rem; }
.d-estrellas { text-align: center; color: var(--pr); letter-spacing: .15em; font-size: .95rem; text-shadow: 0 0 1px var(--pino); }
.d-tira { /* la tira de abajo, separada por la línea de corte */
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .8rem;
  margin: .7rem -1.25rem 0; padding: .6rem 1.25rem .7rem;
  border-top: 1.5px dashed var(--linea); font: 500 .78rem/1.2 var(--mono); color: var(--pino-2);
}
.d-salir { color: var(--pino); font-weight: 500; }
/* franja de color según el estado, como la banda del patrocinador */
.dorsal::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--linea); }
.dorsal.apuntado::before { background: var(--gr); }
.dorsal.hecha::before { background: var(--pr); }
.dorsal.propuesta::before { background: repeating-linear-gradient(90deg, var(--mar) 0 10px, transparent 10px 16px); }
.dorsal.descartada, .dorsal.no_fui { opacity: .55; }
.dorsal.apuntado .d-estado { color: var(--gr); }
.dorsal.grande { min-height: 300px; padding-top: 1.5rem; }
.dorsal.grande .d-num b { font-size: clamp(6rem, 18vw, 8.5rem); }
.dorsal.grande .d-nombre { font-size: 1.45rem; }

.tablero { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem; }

/* ---------- portada ---------- */
.portada { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: clamp(1.2rem, 4vw, 3rem); align-items: center; margin: 1.2rem 0 2.5rem; }
.portada-dorsal .dorsal { transform: rotate(-2deg); }
.portada-dorsal a.dorsal:hover { transform: rotate(-3deg) translateY(-3px); }
.portada-texto h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
.practico { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .45rem; }
.practico li { padding-left: 1.4rem; position: relative; }
.practico li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 7px; background: linear-gradient(var(--papel) 0 50%, var(--gr) 50%); box-shadow: 0 0 0 1px var(--pino); border-radius: 1px; }
.vacia h1 { font-size: clamp(2rem, 5vw, 3rem); }
@media (max-width: 720px) {
  .portada { grid-template-columns: 1fr; }
  .portada-dorsal { max-width: 320px; margin: 0 auto; width: 100%; }
}

.bloque { margin: 2.2rem 0; }
.avisos ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.aviso a { display: block; padding: .7rem .9rem .7rem 1.1rem; background: var(--papel); border-radius: var(--r); color: var(--pino); text-decoration: none; border-left: 5px solid var(--mar); box-shadow: var(--sombra); }
.aviso.cierra a, .aviso.se_acerca a, .aviso.conflicto a { border-left-color: var(--gr); }
.aviso.valorar a, .aviso.repetir a, .aviso.como_fue a { border-left-color: var(--pr); }
.aviso a:hover { transform: translateX(3px); }

/* ---------- el año ---------- */
.ano-cifra { margin: 0; font-size: 1.05rem; color: var(--pino-2); }
.ano-cifra b { font: 900 clamp(3.4rem, 9vw, 5rem)/1 var(--display); color: var(--pino); }
.ano-chiste { max-width: 60ch; color: var(--pino-2); }
.recorrido { position: relative; margin: 1.2rem 0 2.6rem; height: 18px; }
.recorrido svg { width: 100%; height: 18px; display: block; }
.r-base { stroke: var(--linea); stroke-width: 3; stroke-dasharray: 2 2; }
.r-hecho { stroke: var(--gr); stroke-width: 5; stroke-linecap: round; }
.r-hitos { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.r-hitos li { position: absolute; top: 2px; transform: translateX(-50%); display: grid; justify-items: center; font-size: .72rem; color: var(--pino-2); }
.r-hitos li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--papel); border: 2px solid var(--linea); margin-bottom: .35rem; }
.r-hitos li.pasado::before { border-color: var(--gr); }
.r-hitos li span { font-weight: 700; color: var(--pino); white-space: nowrap; }
.r-hitos small { font-family: var(--mono); }
.r-hitos li.yo { top: -22px; }
.r-hitos li.yo::before { display: none; }
.r-hitos li.yo span { background: var(--pino); color: var(--liquen); padding: .1rem .4rem; border-radius: 3px; font-family: var(--mono); font-size: .68rem; }
.r-hitos li.tick::before { width: 6px; height: 6px; border-width: 1.5px; margin-top: 2px; }
@media (max-width: 760px) { .r-hitos li.principal:nth-child(4n+2) span, .r-hitos li.principal:nth-child(4n+2) small { display: none; } }
@media (max-width: 480px) { .r-hitos li.principal:not(:first-child):not(:nth-last-child(2)) span, .r-hitos li.principal:not(:first-child):not(:nth-last-child(2)) small { display: none; } }

/* el camino, pueblo a pueblo: se desliza en horizontal */
.camino { list-style: none; margin: 0 0 .6rem; padding: .2rem 0 .8rem; display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.camino li { flex: 0 0 auto; scroll-snap-align: start; display: grid; grid-template-columns: auto 1fr; column-gap: .45rem; align-items: center;
  background: var(--papel); border-radius: var(--r); padding: .45rem .7rem; box-shadow: var(--sombra); color: var(--pino-2); }
.camino b { font-weight: 700; color: var(--pino); white-space: nowrap; font-size: .92rem; }
.camino small { grid-column: 2; font: 500 .7rem/1.2 var(--mono); }
.camino .baliza-mini { grid-row: span 2; width: 14px; height: 9px; border-radius: 1px; background: var(--liquen-2); box-shadow: 0 0 0 1px var(--linea); }
.camino li.andado .baliza-mini { background: linear-gradient(var(--papel) 0 50%, var(--gr) 50%); box-shadow: 0 0 0 1px var(--pino); }
.camino li.andado { opacity: .8; }
.camino li.siguiente { box-shadow: inset 0 0 0 2px var(--gr), var(--sombra); }
.camino li.siguiente small { color: var(--gr); }

/* ---------- lista ---------- */
.pestañas { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pestañas a { padding: .4rem .8rem; border-radius: 99px; background: var(--liquen-2); color: var(--pino); text-decoration: none; font-weight: 700; font-size: .92rem; }
.pestañas a.activa { background: var(--pino); color: var(--liquen); }

/* ---------- ficha ---------- */
.ficha-cab { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: clamp(1.2rem, 4vw, 3rem); align-items: center; margin: 1.2rem 0 1rem; }
.ficha-dorsal .dorsal { transform: rotate(1.5deg); }
.acciones { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 1rem 0 0; font-weight: 700; }
@media (max-width: 720px) { .ficha-cab { grid-template-columns: 1fr; } .ficha-dorsal { max-width: 320px; } }
.ficha-cuerpo { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(1.5rem, 4vw, 3rem); }
.ficha-cuerpo > .col { min-width: 0; }
@media (max-width: 900px) { .ficha-cuerpo { grid-template-columns: 1fr; } }
.practico-dl { margin: 0; display: grid; gap: .1rem; }
.practico-dl div { display: grid; grid-template-columns: 8.5rem 1fr; gap: .8rem; padding: .55rem 0; border-bottom: 1px solid var(--linea); }
.practico-dl dt { font: 500 .78rem/1.6 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--pino-2); }
.practico-dl dd { margin: 0; }
@media (max-width: 480px) { .practico-dl div { grid-template-columns: 1fr; gap: .1rem; } }

.fuentes { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.fuentes > li { background: var(--papel); border-radius: var(--r); padding: .7rem .9rem; box-shadow: var(--sombra); }
.fuentes > li.conflicto { box-shadow: inset 4px 0 0 var(--gr), var(--sombra); }
.f-campo { font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--pino-2); }
.f-campo em { font-style: normal; color: var(--gr); margin-left: .4rem; }
.fuentes ul { list-style: none; margin: .35rem 0 0; padding: 0; display: grid; gap: .35rem; }
.f-valor { display: block; overflow-wrap: anywhere; }
.f-quien { display: flex; flex-wrap: wrap; gap: .1rem .7rem; font-size: .85rem; }
.f-quien span { color: var(--pino-2); }

.gastos { width: 100%; border-collapse: collapse; background: var(--papel); border-radius: var(--r); overflow: hidden; box-shadow: var(--sombra); }
.gastos th, .gastos td { text-align: left; padding: .6rem .9rem; border-bottom: 1px solid var(--linea); vertical-align: top; }
.gastos th { font-weight: 400; }
.gastos th small { display: block; color: var(--pino-2); font-size: .78rem; }
.gastos td { text-align: right; font-family: var(--mono); white-space: nowrap; }
.gastos tr.estimado td { color: var(--pino-2); }
.gastos tfoot th, .gastos tfoot td { font-weight: 700; border-bottom: 0; }
.gastos tfoot td { font-size: 1.1rem; }
.gastos-acciones { margin-top: 1rem; }

/* estrellas: radios al revés para pintar las de la izquierda con :hover y :checked */
.estrellas-campo { border: 0; padding: 0; margin: 0 0 .8rem; display: inline-flex; flex-direction: row-reverse; }
.estrellas-campo input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.estrellas-campo label { font-size: 2.4rem; line-height: 1; color: var(--linea); cursor: pointer; padding: 0 .1rem; }
.estrellas-campo input:checked ~ label, .estrellas-campo label:hover, .estrellas-campo label:hover ~ label { color: var(--pr); text-shadow: 0 0 1px var(--pino); }
.estrellas-campo input:focus-visible + label { outline: 3px solid var(--mar); border-radius: 3px; }
.form-valorar .campo { margin-bottom: .8rem; }

/* ---------- calendario ---------- */
.cal-nav { display: flex; gap: .3rem; }
.cal-nav a { padding: .45rem .8rem; background: var(--papel); border-radius: var(--r); text-decoration: none; font-weight: 700; color: var(--pino); box-shadow: var(--sombra); }
.mes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mes li { background: var(--papel); min-height: 92px; padding: .35rem; border-radius: 3px; display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.mes li.dia-sem { min-height: 0; background: none; font: 500 .75rem/1 var(--mono); color: var(--pino-2); text-align: center; padding: .3rem 0; }
.mes li.vacia { background: transparent; }
.mes li.hoy { box-shadow: inset 0 0 0 2px var(--pino); }
.mes .n { font: 800 1rem/1 var(--display); color: var(--pino-2); }
.cal-ev { display: block; font-size: .75rem; line-height: 1.2; padding: .2rem .3rem; border-radius: 3px; text-decoration: none; color: var(--pino); background: var(--liquen-2); border-left: 3px solid var(--mar); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev.apuntado { border-left-color: var(--gr); }
.cal-ev.hecha { border-left-color: var(--pr); }
.mes-lista { list-style: none; padding: 0; margin: 2rem 0 0; display: none; gap: 1rem; }
.pie-cal { margin-top: 1.5rem; font-weight: 700; }
@media (max-width: 720px) {
  .mes li { min-height: 46px; }
  .cal-ev { font-size: 0; padding: 0; height: 6px; border-left: 0; background: var(--mar); }
  .cal-ev.apuntado { background: var(--gr); } .cal-ev.hecha { background: var(--pr); }
  .mes-lista { display: grid; }
}

/* ---------- entrar ---------- */
.entrar { width: min(380px, 100%); }
.entrar-dorsal { padding-bottom: 1.4rem; transform: rotate(-1.5deg); }
.entrar-form { display: grid; gap: .9rem; margin-top: 1.4rem; padding: 0 .4rem; }
.entrar .p3, .entrar .p4 { bottom: 9px; }

/* ---------- invitados ---------- */
.invitados { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.invitados li { display: inline-flex; gap: .35rem; align-items: center; background: var(--liquen-2); border-radius: 99px; padding: .2rem .65rem; }
.invitados em { font-style: normal; font: 500 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--pino-2); }
.invitados .r-accepted { background: color-mix(in srgb, var(--pr) 30%, var(--papel)); }
.invitados .r-accepted em { color: var(--pino); }
.invitados .r-declined em { color: var(--gr); }
.visto { display: block; margin-top: .35rem; color: var(--pino-2); font-size: .8rem; }
.d-num.largo b { font-size: clamp(3rem, 8vw, 4rem); letter-spacing: .02em; }
.dorsal.grande .d-num.largo b { font-size: clamp(4rem, 12vw, 5.6rem); }

/* ---------- gastos del año ---------- */
.gastos-ano thead th { font: 500 .72rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--pino-2); text-align: right; }
.gastos-ano tbody th, .gastos-ano tfoot th { font-weight: 700; }
.gastos-ano td:last-child { font-weight: 700; color: var(--pino); }
.gastos .etq { display: block; font: 400 .68rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--pino-2); }
.nota { font-size: .85rem; color: var(--pino-2); max-width: 70ch; }
.por-carrera { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .3rem; }
.por-carrera li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--linea); padding: .2rem 0; }
.por-carrera span { font-family: var(--mono); }
@media (max-width: 480px) { .gastos-ano th, .gastos-ano td { padding: .5rem .45rem; font-size: .85rem; } }

/* ---------- propuestas ---------- */
.propuesta { display: grid; gap: .55rem; align-content: start; }
.propuesta .incluye { margin: 0; font-size: .8rem; color: var(--pino-2); }
.propuesta.repite .dorsal::before { background: repeating-linear-gradient(90deg, var(--pr) 0 10px, transparent 10px 16px); }
.incluye.tramos { font-family: var(--mono); font-size: .72rem; }
.prop-acciones { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.prop-acciones form { margin: 0; }
.prop-acciones .boton { padding: .55rem .9rem; font-size: .9rem; }
.prop-acciones a { margin-left: auto; font-weight: 700; font-size: .9rem; }

/* ---------- elegir modalidad ---------- */
.elegir { display: grid; gap: .55rem; margin: 0; }
.modalidades { border: 0; padding: 0; margin: 0; display: grid; gap: .3rem; }
.modalidades legend { font: 500 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--pino-2); margin-bottom: .35rem; }
.modalidades label { display: flex; gap: .5rem; align-items: flex-start; background: var(--papel); padding: .45rem .6rem; border-radius: var(--r); cursor: pointer; font-size: .88rem; }
.modalidades label:has(input:checked) { box-shadow: inset 0 0 0 2px var(--pino); }
.modalidades label.fuera { opacity: .6; }
.modalidades small { display: block; font: 400 .7rem/1.3 var(--mono); color: var(--pino-2); }
.modalidades .fuera-txt { color: var(--gr); }
.modalidades input { margin-top: .2rem; accent-color: var(--gr); }

/* en las propuestas la tira cambia de alto: solo los agujeros de arriba */
article.propuesta .dorsal .p3, article.propuesta .dorsal .p4 { display: none; }

/* ---------- ajustes ---------- */
.ajustes-enlace { color: var(--pino-2); display: inline-flex; padding: .4rem; border-radius: 99px; }
.ajustes-enlace svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.ajustes-enlace:hover, .ajustes-enlace.activa { color: var(--pino); background: var(--liquen-2); }
.cabecera .salir { margin-left: .2rem; }
.tabla-ajustes { overflow-x: auto; }
.tabla-ajustes input:not([type=checkbox]) { width: 6rem; font: 400 1rem/1.2 var(--texto); padding: .45rem .5rem; border: 1.5px solid var(--linea); border-radius: var(--r); background: var(--papel); color: var(--pino); }
.tabla-ajustes td { text-align: left; }
.tabla-ajustes small { color: var(--pino-2); font-size: .75rem; }
.tabla-ajustes th .check { font-weight: 700; }
@media (max-width: 640px) {
  .tabla-ajustes thead { display: none; }
  .tabla-ajustes table, .tabla-ajustes tbody, .tabla-ajustes tr { display: block; }
  .tabla-ajustes tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem .6rem; padding: .7rem .8rem; border-bottom: 1px solid var(--linea); }
  .tabla-ajustes th { grid-column: 1 / -1; padding: 0; border: 0; }
  .tabla-ajustes td { padding: 0; border: 0; text-align: left; }
  .tabla-ajustes td[data-etq]:has(input)::before { content: attr(data-etq); display: block; font: 500 .68rem/1.3 var(--mono); text-transform: uppercase; color: var(--pino-2); margin-bottom: .2rem; }
  .tabla-ajustes td:has(small) { grid-column: 1 / -1; }
  .tabla-ajustes input:not([type=checkbox]) { width: 100%; }
}

/* ---------- cartel ---------- */
.cartel { margin: 0; background: var(--papel); padding: .7rem; border-radius: var(--r); box-shadow: var(--sombra); transform: rotate(-.8deg); }
.cartel img { display: block; width: 100%; max-height: 520px; object-fit: contain; background: var(--liquen-2); }
.cartel figcaption { font-size: .8rem; color: var(--pino-2); margin-top: .5rem; }
.d-lugar { flex-basis: 100%; order: 3; }

/* ---------- track ---------- */
.track { background: var(--papel); border-radius: var(--r); padding: 1rem; box-shadow: var(--sombra); }
.mapa { width: 100%; height: auto; max-height: 340px; display: block; }
.ruta { fill: none; stroke: var(--gr); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.ruta-sombra { fill: none; stroke: var(--papel); stroke-width: 6; stroke-linejoin: round; }
.mapa .ini { fill: var(--pino); } .mapa .fin { fill: var(--papel); stroke: var(--pino); stroke-width: 2; }
.track-datos { margin: .7rem 0 .4rem; }
.perfil { margin: 0; }
.perfil svg { width: 100%; height: 70px; display: block; }
.perfil polygon { fill: color-mix(in srgb, var(--pr) 35%, transparent); }
.perfil polyline { fill: none; stroke: var(--pino); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.perfil figcaption { display: flex; justify-content: space-between; font: 500 .72rem/1 var(--mono); color: var(--pino-2); margin-top: .3rem; }
.subir-gpx { margin-top: .8rem; }
.subir-gpx input[type=file] { padding: .45rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .portada-dorsal .dorsal, .ficha-dorsal .dorsal, .entrar-dorsal { transform: none; }
}
.check input, .tabla-ajustes input[type=checkbox] { accent-color: var(--gr); width: 18px; height: 18px; }
