:root{
  --ink:#12192B; --panel:#1B2540; --panel-line:#2C3654;
  --ivory:#EFE9DC; --ivory-line:#D9D0BB; --ink-on-ivory:#1B2540;
  --warm:#E7E3D6; --warm-dim:#A9A896;
  --brass:#C79A4B; --brass-deep:#9C7530;
  --green:#6E9A7E; --rust:#B15E42;
  --serif:'Fraunces',serif; --sans:'IBM Plex Sans',sans-serif;
}
*{box-sizing:border-box;}
html,body{
  margin:0; padding:0; background:var(--ink); color:var(--warm);
  font-family:var(--sans); min-height:100%;
}
body{
  padding-top:env(safe-area-inset-top,0px);
  padding-bottom:env(safe-area-inset-bottom,0px);
}

.progress-bar{
  position:fixed; top:env(safe-area-inset-top,0px); left:0; right:0; height:3px;
  background:var(--panel-line); z-index:20;
}
.progress-fill{
  height:100%; background:var(--brass); width:16%; transition:width .3s ease;
}

.wizard{
  min-height:100vh;
  display:flex; align-items:center; justify-content:center;
  padding:60px 20px 40px;
}

.step{
  width:100%; max-width:420px;
  animation:fadeIn .25s ease;
}
@keyframes fadeIn{ from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:translateY(0);} }

.step-eyebrow{
  font-size:12px; letter-spacing:.04em; color:var(--brass); margin:0 0 10px; font-family:'IBM Plex Mono', monospace;
}
.step h1{
  font-family:var(--serif); font-weight:500; font-size:clamp(24px,6vw,32px);
  line-height:1.2; margin:0 0 28px; color:var(--warm);
}

.field-input{
  width:100%; padding:16px 4px; background:transparent; border:none;
  border-bottom:2px solid var(--panel-line); color:var(--warm);
  font-family:var(--sans); font-size:20px; outline:none;
}
.field-input:focus{ border-bottom-color:var(--brass); }
.field-input::placeholder{ color:var(--warm-dim); }

.amount-wrap{display:flex; align-items:baseline; border-bottom:2px solid var(--panel-line);}
.amount-wrap.focused{border-bottom-color:var(--brass);}
.amount-wrap span{font-family:var(--serif); font-size:22px; margin-right:6px; color:var(--warm-dim);}
.amount-wrap input{border:none; padding:16px 4px;}

.chip-row{display:flex; flex-wrap:wrap; gap:8px; margin-top:14px;}
.chip{
  font-family:'IBM Plex Mono',monospace; font-size:13px; padding:7px 12px;
  border:1px solid var(--panel-line); background:transparent; color:var(--warm-dim); cursor:pointer;
}
.chip:hover, .chip:active{border-color:var(--brass);}

.option-list{display:flex; flex-direction:column; gap:10px;}
.option-btn{
  text-align:left; padding:16px 18px; background:var(--panel); border:1.5px solid var(--panel-line);
  color:var(--warm); font-family:var(--sans); font-size:16px; cursor:pointer;
  display:flex; justify-content:space-between; align-items:center;
}
.option-btn:hover{border-color:var(--brass-deep);}
.option-btn.selected{border-color:var(--brass); background:rgba(199,154,75,0.08);}
.option-btn .desc{font-size:12.5px; color:var(--warm-dim); display:block; margin-top:4px; font-weight:400;}
.option-btn .label{font-weight:500;}

.nav-row{display:flex; justify-content:space-between; align-items:center; margin-top:32px;}
.btn-next, .btn-submit{
  padding:14px 28px; background:var(--brass); color:var(--ink); border:none;
  font-family:var(--sans); font-size:15px; font-weight:600; cursor:pointer;
}
.btn-next:disabled, .btn-submit:disabled{ opacity:.4; cursor:not-allowed; }
.btn-back{
  background:transparent; border:none; color:var(--warm-dim);
  font-family:var(--sans); font-size:14px; cursor:pointer; padding:14px 6px;
}

.error-msg{ color:var(--rust); font-size:13px; margin-top:10px; min-height:16px; }

.mode-toggle{display:flex; border:1px solid var(--panel-line); margin-top:16px; max-width:280px;}
.mode-toggle button{
  flex:1; padding:10px 0; background:transparent; border:none; color:var(--warm-dim);
  font-family:var(--sans); font-size:13px; cursor:pointer; border-right:1px solid var(--panel-line);
}
.mode-toggle button:last-child{border-right:none;}
.mode-toggle button.active{background:var(--panel); color:var(--warm);}

/* ---- Thank you screen ---- */
.thankyou{ text-align:center; }
.thankyou .check{
  width:56px; height:56px; border-radius:50%; border:2px solid var(--green);
  display:flex; align-items:center; justify-content:center; margin:0 auto 24px;
  font-size:26px; color:var(--green);
}
.thankyou h1{font-size:26px;}
.thankyou p{color:var(--warm-dim); font-size:15px; line-height:1.6;}

.spinner{
  width:22px; height:22px; border:2.5px solid var(--panel-line); border-top-color:var(--brass);
  border-radius:50%; animation:spin .7s linear infinite; margin:0 auto;
}
@keyframes spin{ to{ transform:rotate(360deg); } }

/* ---- Basket swipe cards ---- */
.step.wide{max-width:440px;}
.card-counter{font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--warm-dim); margin:0 0 10px; display:flex; justify-content:space-between;}
.card-stage{position:relative; height:470px; touch-action:pan-y; user-select:none; -webkit-user-select:none;}
.basket-card{
  position:absolute; inset:0; background:var(--ivory); color:var(--ink-on-ivory);
  border:1px solid var(--ivory-line); padding:22px 20px; display:flex; flex-direction:column;
  cursor:grab; will-change:transform; touch-action:pan-y; overflow:hidden;
}
.basket-card.dragging{cursor:grabbing; transition:none;}
.basket-card.snap{transition:transform .25s ease;}
.basket-card h2{font-family:var(--serif); font-weight:600; font-size:21px; line-height:1.2; margin:0 0 14px;}
.return-block{display:flex; align-items:baseline; gap:10px; padding:12px 0; border-top:1px solid var(--ivory-line); border-bottom:1px solid var(--ivory-line); margin-bottom:12px;}
.return-num{font-family:var(--serif); font-size:32px; font-weight:600; color:#3F6B54;}
.return-label{font-size:12px; color:#5C5844;}
.scheme-list{flex:1; overflow-y:auto; font-size:13.5px;}
.scheme-row{display:flex; justify-content:space-between; gap:10px; padding:7px 0; border-bottom:1px solid var(--ivory-line);}
.scheme-row:last-child{border-bottom:none;}
.scheme-row .sn{flex:1;}
.scheme-row .sn small{display:block; color:#5C5844; font-size:11.5px;}
.scheme-row .sa{font-family:'IBM Plex Mono',monospace; font-size:12.5px; text-align:right; white-space:nowrap;}
.card-note{font-size:11px; color:#5C5844; margin-top:8px;}
.stamp{
  position:absolute; top:16px; padding:4px 12px; font-family:'IBM Plex Mono',monospace; font-weight:600;
  font-size:14px; border:2px solid; opacity:0; pointer-events:none; letter-spacing:.05em;
}
.stamp.select{right:16px; color:#3F6B54; border-color:#3F6B54;}
.stamp.skip{left:16px; color:var(--rust); border-color:var(--rust);}
.card-actions{display:flex; gap:12px; margin-top:16px;}
.card-actions button{flex:1; padding:14px 0; font-family:var(--sans); font-size:14px; font-weight:600; cursor:pointer; border:1.5px solid;}
.btn-skip{background:transparent; color:var(--warm); border-color:var(--panel-line);}
.btn-select{background:var(--brass); color:var(--ink); border-color:var(--brass);}
.swipe-hint{text-align:center; font-size:12px; color:var(--warm-dim); margin-top:12px;}

.modal-backdrop{position:fixed; inset:0; background:rgba(8,12,22,.75); display:flex; align-items:center; justify-content:center; padding:20px; z-index:50;}
.modal{background:var(--ivory); color:var(--ink-on-ivory); padding:26px 22px; max-width:380px; width:100%; border:1px solid var(--ivory-line);}
.modal h3{font-family:var(--serif); font-size:20px; margin:0 0 8px;}
.modal p{font-size:14px; color:#5C5844; margin:0 0 18px; line-height:1.5;}
.modal .row{display:flex; gap:10px;}
.modal .row button{flex:1; padding:13px 0; font-family:var(--sans); font-size:14px; font-weight:600; cursor:pointer; border:1.5px solid var(--ink-on-ivory);}
.modal .cancel{background:transparent; color:var(--ink-on-ivory);}
.modal .confirm{background:var(--ink-on-ivory); color:var(--ivory);}
.modal .confirm:disabled{opacity:.5;}
.empty-state{text-align:center; padding:10px 0;}
.empty-state p{color:var(--warm-dim); line-height:1.6;}
.card-stage{height:560px;}
.est-block{background:#E4DCC8; padding:9px 11px; margin-bottom:10px;}
.est-title{font-size:11px; color:#5C5844; margin-bottom:5px;}
.est-row{display:grid; grid-template-columns:auto 1fr; column-gap:10px; padding:3px 0;}
.est-row .el{font-size:12.5px;}
.est-row .ev{font-family:'IBM Plex Mono',monospace; font-size:14px; font-weight:500; text-align:right; color:#3F6B54;}
.est-row .eg{grid-column:1 / -1; font-size:11px; color:#5C5844; text-align:right;}

/* ---- Details screen: label, +91 prefix, consent checkbox ---- */
.field-label{display:block; font-size:12.5px; color:var(--warm-dim); margin-bottom:2px;}
.phone-wrap{display:flex; align-items:center; border-bottom:2px solid var(--panel-line);}
.phone-wrap:focus-within{border-bottom-color:var(--brass);}
.phone-wrap .cc{font-size:20px; color:var(--warm-dim); padding:16px 10px 16px 4px; border-right:1px solid var(--panel-line); margin-right:10px;}
.phone-wrap .field-input{border-bottom:none;}
.helper{font-size:12.5px; color:var(--warm-dim); margin:8px 0 0; min-height:18px;}
.helper.ok{color:var(--green);}
.consent{display:flex; gap:12px; align-items:flex-start; margin-top:24px; cursor:pointer; position:relative;}
.consent input{position:absolute; opacity:0; width:22px; height:22px; margin:0; cursor:pointer;}
.consent .box{flex:0 0 22px; height:22px; border:2px solid var(--warm-dim); margin-top:1px; position:relative; background:transparent;}
.consent input:checked + .box{background:var(--brass); border-color:var(--brass);}
.consent input:checked + .box::after{content:''; position:absolute; left:6px; top:1px; width:6px; height:12px; border:solid var(--ink); border-width:0 2.5px 2.5px 0; transform:rotate(45deg);}
.consent input:focus-visible + .box{outline:2px solid var(--brass); outline-offset:3px;}
.consent .ctext{font-size:13.5px; line-height:1.5; color:var(--warm);}
.consent.remember{margin-top:14px;}
.consent .ctext small{display:block; color:var(--warm-dim); font-size:12px; margin-top:2px; line-height:1.4;}
.welcome{font-size:14px; color:var(--warm-dim); margin:-8px 0 18px;}
.welcome a{color:var(--brass); text-decoration:underline;}
.nw{white-space:nowrap;}

/* ---- amount hint, empty state actions, hidden-plans note ---- */
.helper.warn{color:var(--brass);}
.empty-actions{text-align:center; margin-top:24px;}
.hidden-note{font-size:12.5px; color:var(--warm-dim); text-align:center; margin:10px 0 0; line-height:1.5;}
.hidden-note a{color:var(--brass); text-decoration:underline;}
