:root {
  --primary:#0F6E56; --primary-dark:#085041; --light:#E1F5EE;
  --success-bg:#EAF3DE; --success-text:#27500A;
  --amber-bg:#FBF1D9; --amber-text:#8A5A00; --amber-border:#EBD9A8;
  --text-1:#1A1A18; --text-2:#6B6A64; --text-3:#9A998F;
  --border:#D8D7CF; --muted:#F7F6F1; --frame:#E0DFD8;
  --radius:12px;
  --font:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,monospace;
}
* { box-sizing:border-box; }
html,body { margin:0; }
body {
  font-family:var(--font);
  color:var(--text-1);
  background:#EAECE8;
  -webkit-font-smoothing:antialiased;
}
.app { min-height:100vh; min-height:100dvh; display:flex; align-items:center; justify-content:center; padding:20px; }
.phone {
  width:390px; max-width:100%; min-height:780px;
  background:#fff; border:1px solid var(--frame); border-radius:28px;
  padding:28px 18px 24px; position:relative; overflow:hidden;
  display:flex; flex-direction:column;
}

/* screens */
.screen { display:none; animation:fade .22s ease; }
.screen.active { display:block; }
@keyframes fade { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }

/* type */
.brand { font-size:20px; font-weight:500; text-align:center; margin:0; }
.title { font-size:19px; font-weight:500; margin:0 0 6px; }
.title.center { text-align:center; }
.title.mt { margin-top:14px; }
.subtitle { font-size:12.5px; color:var(--text-2); line-height:1.55; margin:6px 0 24px; }
.subtitle.center { text-align:center; }
.subtitle.left { text-align:left; }
.subtitle.pad { margin-left:10px; margin-right:10px; text-align:center; }
.fineprint { font-size:11px; color:var(--text-3); text-align:center; line-height:1.5; margin:18px 0 0; }
.fineprint a { color:var(--primary); text-decoration:underline; text-underline-offset:2px; }
.fineprint.lock { margin-top:16px; }
.hint { font-size:11.5px; color:var(--text-2); margin:8px 0; line-height:1.5; }
.hint.center { text-align:center; }

/* hero icons */
.hero-chip { width:64px; height:64px; border-radius:18px; background:var(--light); color:var(--primary); display:flex; align-items:center; justify-content:center; margin:6px auto 14px; }
.hero-chip.sm { width:40px; height:40px; border-radius:12px; margin:0; flex-shrink:0; }
.hero-circle { width:72px; height:72px; border-radius:50%; background:var(--light); color:var(--primary); display:flex; align-items:center; justify-content:center; margin:8px auto 16px; }
.hero-circle.success { background:var(--success-bg); color:#3B6D11; }

/* labels + inputs */
.field-label { display:block; font-size:12px; color:var(--text-2); margin:0 0 6px; }
.field-label.mt12 { margin-top:12px; }
.input {
  display:flex; align-items:center; gap:10px;
  border:1px solid var(--border); border-radius:var(--radius);
  height:48px; padding:0 14px; background:#fff;
}
.input input { border:none; outline:none; font:inherit; color:var(--text-1); width:100%; background:transparent; }
.input.readonly { background:var(--muted); border-color:var(--frame); color:var(--text-2); justify-content:space-between; height:44px; }
.input:focus-within { border-color:var(--primary); }
.phone-input .cc { color:var(--text-2); border-right:1px solid var(--frame); padding-right:10px; }
.phone-input.locked { background:var(--muted); border-color:var(--frame); }
.phone-input.locked input { color:var(--text-2); }
.change-link { background:none; border:none; font:inherit; font-size:12.5px; font-weight:500; color:var(--primary); cursor:pointer; padding:0; flex-shrink:0; }
.row { display:flex; gap:10px; }
.col { flex:1; }

/* buttons */
.btn {
  width:100%; height:48px; border-radius:var(--radius); font:inherit; font-weight:500;
  display:flex; align-items:center; justify-content:center; gap:8px;
  border:1px solid transparent; cursor:pointer; margin-top:12px; text-decoration:none;
}
.btn.sm { height:42px; }
.btn-primary { background:var(--primary); color:#fff; }
.btn-primary:active { background:var(--primary-dark); }
.btn-primary:disabled { opacity:.45; cursor:not-allowed; }
.btn-secondary { background:#fff; color:var(--text-1); border-color:var(--border); }
.iconbtn { background:none; border:none; padding:0; color:var(--text-1); cursor:pointer; }
.back-row { display:flex; align-items:center; gap:4px; font:inherit; font-size:13.5px; font-weight:500; margin-bottom:14px; }

/* otp */
.otp { display:flex; gap:8px; justify-content:space-between; }
.otp input {
  width:100%; height:48px; text-align:center; font-size:18px; font-weight:500;
  border:1px solid var(--border); border-radius:10px; outline:none; color:var(--text-1);
}
.otp input:focus, .otp input.filled { border-color:var(--primary); }
.resend { font-size:12px; color:var(--text-2); margin:14px 0 0; }
.resend b, .resend .link { color:var(--primary); font-weight:500; cursor:pointer; }

/* error */
.error { font-size:12px; color:#B42318; margin:8px 0 0; min-height:0; }
.error:empty { margin:0; }
.error.center { text-align:center; }

/* panels (manual + denied) */
.panel, .denied { margin-top:14px; padding:14px; border:1px solid var(--frame); border-radius:14px; background:var(--muted); }
.hidden { display:none; }

/* badges */
.badge { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:500; border-radius:999px; padding:5px 12px; }
.badge-success { background:var(--success-bg); color:var(--success-text); }
.badge-amber { background:var(--amber-bg); color:var(--amber-text); }

/* mini map */
.map { height:110px; background:#EDF3F0; border-radius:14px; margin:14px 0; position:relative; overflow:hidden; }
.map.muted-map { background:var(--muted); }
.map-line { position:absolute; background:#C9D8D1; }
.map-line.h { left:-20px; width:360px; height:1px; }
.map-line.v { top:-10px; width:1px; height:140px; }
.map-line.v.r { transform:rotate(18deg); }
.map-pin { position:absolute; left:50%; top:50%; transform:translate(-50%,-62%); color:var(--primary); }
.map-pin.amber { color:#C08A1E; }
.map-label { position:absolute; right:8px; bottom:6px; font-size:10px; color:#8A897F; background:#ffffffcc; border-radius:6px; padding:2px 6px; }

/* card */
.card { border:1px solid var(--border); border-radius:14px; padding:14px; margin-top:6px; }
.card-head { display:flex; align-items:center; gap:10px; }
.chip { width:40px; height:40px; border-radius:10px; background:var(--light); color:var(--primary); display:flex; align-items:center; justify-content:center; font-weight:600; font-size:13px; flex-shrink:0; }
.card-title { margin:0; font-weight:500; font-size:14px; }
.card-sub { margin:2px 0 0; font-size:11.5px; color:var(--text-2); }
.tags { display:flex; gap:6px; margin-top:10px; flex-wrap:wrap; }
.tag { font-size:10.5px; font-weight:500; border-radius:6px; padding:3px 8px; background:#F1EFE8; color:#444441; }
.tag-brand { background:var(--light); color:var(--primary-dark); }

/* checkbox */
.checkbox-row { display:flex; gap:10px; align-items:flex-start; margin-top:16px; cursor:pointer; }
.checkbox-row input { position:absolute; opacity:0; width:0; height:0; }
.checkbox-row .box { width:20px; height:20px; border-radius:6px; border:1.5px solid var(--border); flex-shrink:0; position:relative; transition:.15s; }
.checkbox-row input:checked + .box { background:var(--primary); border-color:var(--primary); }
.checkbox-row input:checked + .box::after { content:""; position:absolute; left:6px; top:2px; width:5px; height:10px; border:solid #fff; border-width:0 2px 2px 0; transform:rotate(45deg); }
.checkbox-row .ck-text { font-size:12px; line-height:1.5; color:var(--text-1); }

/* reference + success */
.ref { border:1px dashed #C9C8C0; border-radius:12px; padding:10px 14px; display:flex; justify-content:space-between; align-items:center; margin-top:4px; }
.ref-label { font-size:12px; color:var(--text-2); }
.ref-no { font-size:13px; font-weight:500; font-family:var(--mono); }

/* install sheet */
.sheet { position:absolute; left:0; right:0; bottom:0; transform:translateY(110%); transition:transform .28s ease; padding:12px; }
.sheet.show { transform:translateY(0); }
.sheet-card { background:#fff; border:1px solid var(--frame); border-radius:18px; padding:14px; display:flex; align-items:center; gap:12px; box-shadow:0 8px 30px rgba(0,0,0,.12); }
.sheet-text { flex:1; }
.sheet-actions { display:flex; flex-direction:column; gap:6px; }
.sheet-actions .btn { width:auto; margin-top:0; padding:0 14px; }

/* toast */
.toast { position:absolute; left:50%; bottom:26px; transform:translateX(-50%); background:#1A1A18; color:#fff; font-size:12.5px; padding:10px 16px; border-radius:10px; opacity:0; pointer-events:none; transition:opacity .2s; max-width:80%; text-align:center; }
.toast.show { opacity:.96; }

/* turnstile (Cloudflare anti-bot — runs when an action is taken) */
.turnstile { display:flex; justify-content:center; }
.turnstile:not(:empty) { margin-bottom:10px; }

/* coming-soon note (result screen) */
.soon { margin-top:18px; border:1px dashed var(--border); border-radius:14px; padding:14px; background:var(--muted); text-align:center; }
.soon-head { display:inline-flex; align-items:center; gap:6px; color:var(--primary-dark); font-weight:500; font-size:12.5px; }
.soon p { font-size:12px; color:var(--text-2); margin:8px 0 0; line-height:1.5; }

/* copyright — pinned to the bottom of the frame */
.copyright { font-size:9px; color:var(--text-3); text-align:center; margin-top:auto; padding-top:20px; letter-spacing:.2px; }

/* full-bleed on phones */
@media (max-width:430px) {
  .app { padding:0; }
  .phone { border:none; border-radius:0; min-height:100vh; min-height:100dvh; width:100%; padding:28px 18px 24px; }
}
