:root{
  --navy:#1f5c34;
  --navy2:#2f7a48;
  --gold:#a9c93a;
  --gold2:#d3e05a;
  --ink:#1a1a1a;
  --muted:#6b7280;
  --bg:#f4f1ea;
  --white:#ffffff;
  --danger:#c0392b;
  --radius:20px;
  --shadow:0 24px 60px -18px rgba(11,31,58,.45);
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  background:
    radial-gradient(1200px 600px at 50% -10%, #35804a 0%, var(--navy) 55%, #072711 100%);
  color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  height:100vh;
  height:100dvh;
  overflow:hidden;
  display:flex;
  justify-content:center;
  padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

.shell{
  width:100%;
  max-width:480px;
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  padding:28px 20px 24px;
}

.title-row{
  display:flex;
  align-items:center;
  gap:14px;
  margin:6px 0 14px;
}
.title-logo{
  height:60px;
  width:auto;
  flex-shrink:0;
  display:block;
}

.card{
  background:var(--white);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:32px 26px 28px;
  flex:1;
  min-height:0;
  position:relative;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}

.step{
  display:none;
  animation:stepIn .38s ease both;
}
.step.is-active{display:block;}

@keyframes stepIn{
  from{opacity:0; transform:translateY(10px);}
  to{opacity:1; transform:translateY(0);}
}

.title{
  margin:0;
  font-size:clamp(24px,6.4vw,30px);
  line-height:1.18;
  font-weight:800;
  letter-spacing:.01em;
  color:var(--navy);
  position:relative;
}
.title::after{
  content:"";
  display:block;
  width:56px;
  height:4px;
  margin-top:14px;
  border-radius:4px;
  background:linear-gradient(90deg,var(--gold),var(--gold2));
}

.subtitle{
  color:#334155;
  font-size:15.5px;
  line-height:1.55;
  margin:0 0 10px;
}
.subtitle.small{font-size:14.5px;}

.fineprint{
  color:var(--muted);
  font-size:12.5px;
  margin:0 0 26px;
}

.step-title{
  font-size:20px;
  font-weight:800;
  color:var(--navy);
  margin:2px 0 10px;
}

.steps-dots{
  display:flex;
  gap:6px;
  margin-bottom:16px;
}
.dot{
  width:26px;
  height:5px;
  border-radius:4px;
  background:#e6e2d8;
}
.dot.is-active{background:linear-gradient(90deg,var(--gold),var(--gold2));}

form{margin-bottom:22px;}

.field{margin-bottom:16px;}
.field label{
  display:block;
  font-size:13px;
  font-weight:700;
  color:#374151;
  margin-bottom:6px;
}
.field label small{font-weight:500; color:var(--muted);}

.field input{
  width:100%;
  min-height:50px;
  padding:0 14px;
  border-radius:12px;
  border:1.5px solid #e2e0d8;
  background:#fbfaf7;
  font-size:16px;
  color:var(--ink);
  outline:none;
  transition:border-color .18s, box-shadow .18s, background .18s;
}
.field input:focus{
  border-color:var(--gold);
  background:var(--white);
  box-shadow:0 0 0 4px rgba(201,162,39,.15);
}
.field input.invalid{border-color:var(--danger);}
.field .error{
  display:block;
  min-height:16px;
  color:var(--danger);
  font-size:12px;
  margin-top:4px;
}

.row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.radio-group{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:2px;
}
.radio-group-inline{flex-direction:row; flex-wrap:wrap;}
.radio-group-inline .radio-pill{flex:1; min-width:100px; justify-content:center;}

.field .radio-pill{
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 14px;
  border-radius:12px;
  border:1.5px solid #e2e0d8;
  background:#fbfaf7;
  font-size:14.5px;
  font-weight:400;
  line-height:1.3;
  color:var(--ink);
  margin-bottom:0;
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease;
  -webkit-tap-highlight-color:transparent;
}
.field .radio-pill input{
  width:18px;
  height:18px;
  accent-color:var(--navy);
  flex-shrink:0;
  outline:none;
  -webkit-tap-highlight-color:transparent;
}
.field .radio-pill input:focus{outline:none; box-shadow:none;}
.field .radio-pill:has(input:checked){
  border-color:var(--gold);
  background:#fbf8ea;
}

.otro-input{
  width:100%;
  min-height:46px;
  margin-top:8px;
  padding:0 14px;
  border-radius:12px;
  border:1.5px solid #e2e0d8;
  background:#fbfaf7;
  font-size:15px;
  color:var(--ink);
  outline:none;
  transition:border-color .18s, box-shadow .18s, background .18s;
}
.otro-input:focus{
  border-color:var(--gold);
  background:var(--white);
  box-shadow:0 0 0 4px rgba(201,162,39,.15);
}

.btn{
  appearance:none;
  border:none;
  width:100%;
  min-height:54px;
  border-radius:14px;
  font-size:16px;
  font-weight:700;
  letter-spacing:.02em;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  transition:transform .12s ease, opacity .18s ease, box-shadow .18s ease;
}
.btn:active{transform:scale(.98);}
.btn:disabled{opacity:.45; cursor:not-allowed;}

.btn-primary{
  background:linear-gradient(135deg,var(--navy2),var(--navy));
  color:var(--white);
  box-shadow:0 12px 24px -8px rgba(11,31,58,.5);
  margin-top:6px;
}
.btn-primary::before{
  content:"";
}
.btn-outline{
  background:var(--white);
  color:var(--navy);
  border:1.6px solid var(--navy);
  margin-bottom:14px;
}

.btn-row{
  display:flex;
  gap:12px;
  margin-top:6px;
}
.btn-row .btn{
  width:auto;
  flex:1;
  margin-bottom:0;
}

.photo-box{
  border-radius:16px;
  background:#f6f4ee;
  border:1.6px dashed #d9d5c8;
  aspect-ratio:16/10;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  margin-bottom:16px;
}
.photo-placeholder{color:#b7ad93;}
.cam-icon{width:56px;height:56px;}
.photo-preview{
  width:100%;
  height:100%;
  object-fit:cover;
}

.camera-viewport{
  position:relative;
  border-radius:16px;
  background:var(--navy);
  aspect-ratio:16/10;
  overflow:hidden;
  margin-bottom:14px;
}
.camera-viewport video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.camera-viewport video[hidden]{
  display:none;
}
.guide-frame{
  position:absolute;
  border:2.6px solid var(--gold);
  border-radius:12px;
  box-shadow:0 0 0 9999px rgba(3,10,22,.58);
  animation:guidePulse 2.2s ease-in-out infinite;
}
.guide-frame::before,.guide-frame::after,
.guide-frame span{content:"";}
@keyframes guidePulse{
  0%,100%{border-color:var(--gold);}
  50%{border-color:var(--gold2);}
}
.camera-error{
  color:var(--danger);
  font-size:13px;
  margin:-4px 0 12px;
}

.btn-row-single{margin-bottom:0;}
.btn-row-single .btn{margin-bottom:14px;}

.submit-error{
  color:var(--danger);
  font-size:13px;
  margin:-4px 0 12px;
}

.spinner{
  width:18px;height:18px;
  border-radius:50%;
  border:2.4px solid rgba(255,255,255,.4);
  border-top-color:#fff;
  animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg);}}

.thanks-icon{
  width:74px;height:74px;
  margin:8px auto 18px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--gold),var(--gold2));
  color:var(--navy);
  display:flex;align-items:center;justify-content:center;
}
.thanks-icon svg{width:36px;height:36px;}
[data-step="thanks"]{text-align:center;}
[data-step="thanks"] .subtitle{margin:0 auto;}

.footlink{
  text-align:center;
  color:rgba(255,255,255,.55);
  font-size:11.5px;
  margin-top:16px;
}

@media (max-width:360px){
  .row{grid-template-columns:1fr;}
}
