/* MyGolf · «Libreta del caddie». Colores y tipos documentados en docs/documentacion-tecnica.md */
:root {
  --papel: #F1ECDD;
  --papel-claro: #FBF8EF;
  --borde: #C9C2AE;
  --tinta: #1E2B23;
  --gris: #5B6458;
  --verde: #2E6B3C;
  --verde-claro: #E3EED6;
  --bandera: #D9541E;
  --bandera-texto: #B8441A;
  --arena: #E4D3A2;
  --f-rotulo: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --f-texto: 'Barlow', system-ui, sans-serif;
  --f-lapiz: 'Caveat', 'Comic Sans MS', cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--papel); color: var(--tinta); font-family: var(--f-texto); }
body { -webkit-text-size-adjust: 100%; }
a { color: var(--verde); }
a:hover { color: #1E4A29; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--bandera); outline-offset: 2px; }

.pantalla { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.contenido { flex: 1; padding: 0 20px 24px; }

.rotulo { font-family: var(--f-rotulo); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--gris); }
.rotulo.verde { color: var(--verde); font-weight: 700; }
.lapiz { font-family: var(--f-lapiz); font-size: 22px; }
.lapiz.grande { font-size: 26px; line-height: 1.2; }
.gris { color: var(--gris); }

/* Botones */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px;
  background: var(--verde); color: #fff; border: 2px solid var(--verde); text-decoration: none; cursor: pointer;
  font-family: var(--f-rotulo); font-weight: 700; font-size: 18px; letter-spacing: .06em; text-transform: uppercase;
}
.boton:hover { background: #24572F; color: #fff; }
.boton.secundario { background: transparent; color: var(--tinta); border-color: var(--tinta); }
.boton.secundario:hover { background: #E8E2D0; }
.boton:disabled { opacity: .4; cursor: default; }
.boton.ancho { width: 100%; margin-top: 16px; }

/* Cabecera del recorrido */
.cabecera { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 8px; }
.marca { display: flex; align-items: center; gap: 8px; font-family: var(--f-rotulo); font-weight: 700; font-size: 26px; }
.tarjeta-siguiente { margin-top: 4px; border: 2px solid var(--tinta); background: var(--papel-claro); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.fila-rotulos { display: flex; justify-content: space-between; font-family: var(--f-rotulo); text-transform: uppercase; letter-spacing: .1em; font-size: 13px; color: var(--gris); }
.siguiente-titulo { display: flex; align-items: baseline; gap: 10px; }
.num-grande { font-family: var(--f-rotulo); font-weight: 700; font-size: 44px; line-height: 1; }
.titulo-hoyo { font-family: var(--f-rotulo); font-weight: 600; font-size: 28px; line-height: 1.05; margin: 0; }
.objetivo { margin: 0; color: var(--gris); }
.tarjeta-siguiente .boton { align-self: flex-start; margin-top: 6px; }
.fila-titulo { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; }
.fila-titulo h2 { margin: 0; font-family: var(--f-rotulo); font-size: 20px; text-transform: uppercase; letter-spacing: .06em; }
.fila-titulo span { font-family: var(--f-rotulo); color: var(--gris); }
.mapa { display: block; width: 100%; max-width: 420px; margin: 4px auto 0; }
.mapa a { cursor: pointer; }
.mapa-num { font-family: var(--f-rotulo); font-weight: 700; font-size: 12px; }
.mapa-rotulo { font-family: var(--f-rotulo); font-size: 11px; fill: var(--gris); letter-spacing: 1px; }

.lista-hoyos { list-style: none; margin: 16px 0 0; padding: 0; border-top: 2px solid var(--tinta); }
.lista-hoyos li { border-bottom: 1px solid var(--borde); }
.lista-hoyos li.separa { border-top: 2px solid var(--tinta); }
.lista-hoyos a, .lh-pendiente { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 4px; text-decoration: none; color: var(--tinta); }
.lh-pendiente { opacity: .55; }
.lh-num { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--tinta); display: inline-flex; align-items: center; justify-content: center; font-family: var(--f-rotulo); font-weight: 700; flex: none; background: var(--papel-claro); }
.lh-num.hecho { background: var(--verde); border-color: var(--verde); color: #fff; }
.lh-texto { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.lh-titulo { font-family: var(--f-rotulo); font-weight: 600; font-size: 20px; }
.lh-sub { font-size: 14px; color: var(--gris); }
.lh-ok { width: 22px; height: 22px; border: 2px solid var(--verde); border-radius: 50%; flex: none; }

/* Navegación inferior */
.nav { position: sticky; bottom: 0; border-top: 2px solid var(--tinta); display: flex; justify-content: space-around; padding: 8px 0 calc(12px + env(safe-area-inset-bottom)); background: var(--papel); }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; min-height: 48px; justify-content: center; text-decoration: none; color: var(--gris); font-family: var(--f-rotulo); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.nav a.on { color: var(--tinta); font-weight: 700; }

/* Pantalla de hoyo */
.barra-hoyo { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 0 8px; }
.icono { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--tinta); }
.cabeza-hoyo { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.cabeza-hoyo > div { display: flex; flex-direction: column; }
.num-enorme { font-family: var(--f-rotulo); font-weight: 700; font-size: 96px; line-height: .85; }
.cabeza-hoyo .titulo-hoyo { font-size: 32px; margin-top: 6px; }
.cabeza-hoyo .sub { font-family: var(--f-rotulo); font-size: 16px; color: var(--gris); margin-top: 4px; }
.plano-golpes { width: 110px; flex: none; }
.aviso-profe { margin: 10px 0 0; padding: 6px 10px; border: 1px dashed var(--bandera-texto); color: var(--bandera-texto); font-size: 14px; }

.golpe { margin-top: 14px; border-top: 2px solid var(--tinta); padding-top: 12px; }
.golpe p { font-size: 17px; line-height: 1.55; margin: 10px 0; }
.golpe figure { margin: 14px 0; }
.golpe figcaption { font-size: 14px; color: var(--gris); margin-top: 6px; }
.nota-caddie { font-family: var(--f-lapiz); font-size: 23px !important; line-height: 1.2 !important; color: var(--bandera-texto); }
.ejercicio { background: var(--papel-claro); border-left: 0; border: 1px solid var(--borde); padding: 10px 12px; margin-top: 12px; }
.ejercicio p { margin: 4px 0 0; font-size: 16px; }

.pie-hoyo { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px dashed #9AA393; background: var(--papel); }
.pie-hoyo .boton { flex: 1; }

/* Preguntas de green */
.pregunta { margin-top: 18px; border-top: 2px solid var(--tinta); padding-top: 12px; }
.pregunta h3 { font-family: var(--f-rotulo); font-weight: 600; font-size: 24px; line-height: 1.15; margin: 8px 0 14px; }
.opciones { display: flex; flex-direction: column; gap: 10px; }
.opcion { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; text-align: left; background: var(--papel-claro); border: 2px solid var(--tinta); color: var(--tinta); cursor: pointer; font-size: 17px; }
.opcion:disabled { cursor: default; }
.marca-opcion { width: 20px; height: 20px; border: 2px solid var(--gris); border-radius: 50%; flex: none; }
.opcion.correcta { border-color: var(--verde); background: var(--verde-claro); }
.opcion.correcta .marca-opcion { border-color: var(--verde); background: var(--verde); }
.opcion.fallada { border-color: var(--bandera-texto); }
.opcion.fallada .marca-opcion { border-radius: 0; border-color: var(--bandera-texto); }
.opcion.apagada { opacity: .5; }
.explicacion { margin-top: 14px; padding: 10px 12px; font-size: 16px; line-height: 1.45; border: 1px solid var(--borde); background: var(--papel-claro); }
.explicacion.bien strong { color: var(--verde); }
.explicacion.mal strong { color: var(--bandera-texto); }

.final-hoyo { margin-top: 24px; text-align: center; }
.final-hoyo h2 { font-family: var(--f-rotulo); font-size: 30px; margin: 8px 0 4px; }
.final-hoyo p { color: var(--gris); }
.final-hoyo .botones { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.fuentes { text-align: left; margin-top: 18px; border-top: 1px dashed #9AA393; padding-top: 10px; }
.fuentes ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.6; }

/* Ajustes y secciones */
.cabecera-seccion { padding: 22px 20px 10px; border-bottom: 2px solid var(--tinta); margin-bottom: 16px; }
.cabecera-seccion h1 { margin: 0; font-family: var(--f-rotulo); font-weight: 700; font-size: 34px; line-height: 1; }
.grupo { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.grupo.apagado { color: var(--gris); }
.segmentos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 2px solid var(--tinta); }
.segmentos button { min-height: 46px; border: 0; background: transparent; color: var(--tinta); font-family: var(--f-rotulo); font-weight: 700; font-size: 18px; cursor: pointer; }
.segmentos button.on { background: var(--tinta); color: var(--papel); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
