:root {
  --verde: #008943;
  --verde-oscuro: #066636;
  --amarillo: #e59e00;
  --rojo: #9d1c24;
  --fondo: #f3f6f2;
  --tinta: #17211b;
  --linea: #d5e0d6;
  --ok: #e5f6ea;
  --mal: #fde8e6;
  --medio: #fff6df;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, sans-serif;
  color: var(--tinta);
  background: var(--fondo);
}
.top {
  background: var(--verde);
  color: white;
  padding: 1.1rem 1rem 1.2rem;
}
.marca { margin: 0; letter-spacing: .04em; font-size: .78rem; text-transform: uppercase; }
h1 { margin: .2rem 0; font-size: 1.7rem; }
.sub { margin: 0; max-width: 38rem; color: #e7f6ec; font-size: .95rem; }
.salir {
  display: block;
  width: auto;
  margin: .85rem 0 0 auto;
  min-height: 44px;
  padding: 0 1rem;
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, .85);
  font-size: 1rem;
}
.tabs, main, #acceso { max-width: 40rem; margin: 0 auto; }
.tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.4rem, 1fr));
  gap: .4rem;
  padding: .8rem 1rem 0;
}
.tabs button, button {
  border: 0;
  border-radius: 10px;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 650;
}
.tabs button { background: white; color: var(--verde-oscuro); }
.tabs button.activa { background: var(--amarillo); color: #1d1600; }
.card {
  background: white;
  margin: .8rem 1rem 1.4rem;
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(8, 40, 22, .06);
}
label { display: block; margin: .85rem 0 .3rem; font-weight: 650; }
label span { font-weight: 450; color: #5d6b61; }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--linea);
  border-radius: 10px;
  padding: .55rem .7rem;
  font-size: 1.05rem;
  background: white;
}
textarea { min-height: 88px; }
button { background: var(--verde); color: white; width: 100%; margin-top: .8rem; }
button.secundario { background: white; color: var(--verde-oscuro); border: 1px solid var(--verde); }
.fila { display: flex; gap: .6rem; align-items: center; margin-top: .8rem; }
.fila button { width: auto; margin: 0; padding: 0 1rem; }
#gps-estado { color: #4d5c53; }
.check { display: flex; gap: .6rem; align-items: center; font-weight: 650; }
.check input { width: 1.3rem; min-height: 1.3rem; }
.postular {
  display: flex;
  gap: .9rem;
  align-items: center;
  margin-top: 1.1rem;
  padding: 1rem 1.05rem;
  min-height: 84px;
  border: 3px solid var(--amarillo);
  border-radius: 16px;
  background: #fff4cc;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 6px 0 rgba(229, 158, 0, .18);
}
.postular input {
  width: 2.15rem;
  min-height: 2.15rem;
  accent-color: var(--verde-oscuro);
  flex: 0 0 auto;
}
.postular small {
  display: block;
  margin-top: .25rem;
  font-size: .95rem;
  font-weight: 650;
  color: #6a5200;
}
.postular.marcado {
  background: var(--ok);
  border-color: var(--verde);
  box-shadow: 0 6px 0 rgba(0, 137, 67, .16);
}
.postular.marcado small { color: var(--verde-oscuro); }
.aviso { background: var(--medio); padding: .7rem .8rem; border-radius: 10px; }
.error { color: var(--rojo); min-height: 1.2rem; }
.clave-nueva { font-size: 1.35rem; font-weight: 700; letter-spacing: .03em; word-break: break-all; }
.trampa { position: absolute; left: -10000px; height: 0; overflow: hidden; }
.foto-archivo { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; }
.publico main { padding-bottom: 6.5rem; }
.publico .oferta {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem;
  max-width: 40rem;
  margin: .8rem auto 0;
  padding: 0 1rem;
  list-style: none;
}
.publico .oferta li {
  display: block;
  margin: 0;
  padding: .75rem .85rem;
  background: white;
  border-radius: 14px;
}
.publico .oferta strong, .publico .oferta span { display: block; }
.publico .oferta strong { color: var(--verde-oscuro); font-size: 1rem; }
.publico .oferta span { margin-top: .1rem; color: #4d5c53; font-size: .9rem; }
.publico h1 { font-size: 1.45rem; line-height: 1.2; }
.publico .pregunta { margin: .9rem 0 .35rem; font-weight: 750; }
.publico .opciones.tres { grid-template-columns: repeat(3, 1fr); }
.publico .condiciones {
  margin: .4rem 0 0;
  padding: .85rem 1rem .85rem 1.35rem;
  background: var(--fondo);
  border-radius: 14px;
}
.publico .condiciones li { margin: .4rem 0; }
.publico .check {
  margin-top: .7rem;
  padding: .85rem;
  border: 1px solid var(--linea);
  border-radius: 14px;
}
.publico .check:has(input:checked) {
  border-color: var(--verde);
  background: var(--ok);
}
.publico .fotos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
  margin-top: .35rem;
}
.publico .foto-tarjeta {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin: 0;
  padding: .8rem;
  border: 1px dashed #b7c9bb;
  border-radius: 14px;
  background: var(--fondo);
  font-weight: 750;
}
.publico .foto-tarjeta.ancha { grid-column: 1 / -1; }
.publico .foto-tarjeta input {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: .82rem;
  font-weight: 500;
}
.publico .foto-tarjeta.lista {
  border-style: solid;
  border-color: var(--verde);
  background: var(--ok);
}
.publico .numero-grande {
  margin: .2rem 0 .8rem;
  font-size: 1.8rem;
  color: var(--verde-oscuro);
}
.publico .numero-grande strong { font-size: 2rem; }
@media (min-width: 720px) {
  .publico .oferta { grid-template-columns: repeat(3, 1fr); }
  .publico .oferta li { text-align: center; }
}
.oculto { display: none !important; }
.veredicto { margin-top: .8rem; padding: .9rem; border-radius: 12px; font-weight: 650; }
.veredicto.ok { background: var(--ok); }
.veredicto.no { background: var(--mal); }
.veredicto.medio { background: var(--medio); }
.item, .metricas, .tabla { border-top: 1px solid var(--linea); padding: .75rem 0; }
.item strong, .metricas strong { display: block; }
.metricas { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.metricas div { background: var(--fondo); border-radius: 10px; padding: .7rem; }
.pill { display: inline-block; margin-top: .25rem; padding: .15rem .45rem; border-radius: 999px; background: var(--fondo); font-size: .85rem; }
h2 { margin: .2rem 0 .6rem; font-size: 1.2rem; }
.buscador { position: relative; }
.sugerencias {
  margin-top: .35rem;
  border: 1px solid var(--linea);
  border-radius: 10px;
  overflow: hidden;
  background: white;
}
.sugerencias button {
  display: block;
  width: 100%;
  margin: 0;
  text-align: left;
  background: white;
  color: var(--tinta);
  border-radius: 0;
  border-bottom: 1px solid var(--linea);
  min-height: 44px;
  padding: 0 .8rem;
}
.sugerencias button:last-child { border-bottom: 0; }
.fotos-linea { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.fotos-linea button { width: auto; margin: 0; padding: 0 .8rem; }
.item > button.secundario { width: auto; margin-top: .45rem; padding: 0 .8rem; }
.paso {
  margin: 1.15rem 0 .15rem;
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--verde-oscuro);
}
.paso:first-child { margin-top: 0; }
.ayuda { margin: .8rem 0 .2rem; color: #4d5c53; font-size: .92rem; }
.par { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.opciones { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.opciones button {
  margin: 0;
  min-width: 0;
  height: auto;
  background: white;
  color: var(--tinta);
  border: 1px solid var(--linea);
  white-space: normal;
  line-height: 1.15;
  padding: .45rem .5rem;
}
.opciones button.elegida {
  background: var(--verde);
  color: white;
  border-color: var(--verde);
}
.acciones {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: 0;
  width: min(40rem, 100%);
  transform: translateX(-50%);
  padding: .7rem 1rem calc(.85rem + env(safe-area-inset-bottom));
  background: white;
  border-top: 1px solid var(--linea);
  box-shadow: 0 -8px 18px rgba(8, 40, 22, .08);
}
#app { padding-bottom: 8.5rem; }
.acciones button { margin-top: .35rem; }
.acciones .error { margin: 0; }
.fotos { display: grid; gap: .8rem; margin-top: .6rem; }
.fotos.dos { grid-template-columns: 1fr 1fr; }
.fotos button { margin-top: 0; }
.miniatura {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  margin-top: .4rem;
  border-radius: 10px;
  background: #111;
}
.camara {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000;
}
.camara video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.marco {
  position: absolute;
  border: 3px solid var(--amarillo);
  border-radius: 14px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .55);
  pointer-events: none;
}
#camara-titulo {
  position: absolute;
  z-index: 3;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  margin: 0;
  text-align: center;
  color: white;
  font-weight: 700;
  text-shadow: 0 1px 4px #000;
}
.camara-bar {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .75));
}
