/* Vaidya — an ayurvedic care app.
   The page is the app. On a desktop it sits in a phone, on a phone it fills the
   screen. Apothecary warmth rather than the usual green-leaf wellness look:
   parchment, ink, one amber accent, one deep herbal shade. */
:root{
  --paper:#FAF6EF; --paper2:#F1EADC; --card:#FFFDF9;
  --ink:#17150F; --body:#5C574B; --mute:#8B8474; --line:#E3DBC9;
  --herb:#1F3D2B; --herb2:#2E5940; --amber:#C2703D; --amber2:#A85C2D;
  --alert:#9B2C24;
  --disp:'Newsreader',Georgia,serif;
  --sans:'Schibsted Grotesk',system-ui,-apple-system,sans-serif;
}
*{margin:0;padding:0;box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{background:#0E1512;font-family:var(--sans);color:var(--ink);
  -webkit-font-smoothing:antialiased}
img{display:block;max-width:100%}
button{font:inherit;color:inherit;border:0;background:none;cursor:pointer}

/* ── the stage (desktop only) ─────────────────────── */
.stage{min-height:100svh;display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:16px;padding:20px 20px 22px;
  background:radial-gradient(120% 90% at 50% 0%,#1A2A22 0%,#0E1512 62%)}
.phone{width:390px;height:844px;max-height:calc(100svh - 128px);background:var(--paper);border-radius:44px;
  overflow:hidden;position:relative;box-shadow:0 0 0 11px #14100C,0 0 0 12px #2C2620,
  0 50px 90px -40px rgba(0,0,0,.9);display:flex;flex-direction:column}
.cap{color:#7E9689;font-size:13.5px;text-align:center;max-width:44ch;line-height:1.6}
.cap b{color:#CFE0D6;font-weight:600}

/* ── app chrome ───────────────────────────────────── */
.app{flex:1;display:flex;flex-direction:column;min-height:0;position:relative}
.bar{padding:14px 20px 12px;display:flex;align-items:center;justify-content:space-between;
  gap:12px;border-bottom:1px solid var(--line);background:var(--paper);flex:none}
.brand{display:flex;align-items:center;gap:9px;font-family:var(--disp);font-weight:600;
  font-size:20px;letter-spacing:-.01em}
.brand svg{width:26px;height:26px;flex:none}
.bar .who{width:32px;height:32px;border-radius:50%;overflow:hidden;flex:none;
  background:var(--paper2)}
.bar .who img{width:100%;height:100%;object-fit:cover}

.views{flex:1;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.view{display:none;padding:22px 20px 42px}
.view.on{display:block}

.tabs{flex:none;display:grid;grid-template-columns:repeat(4,1fr);
  border-top:1px solid var(--line);background:var(--card);padding-bottom:env(safe-area-inset-bottom)}
.tabs button{padding:11px 4px 14px;display:flex;flex-direction:column;align-items:center;
  gap:5px;font-size:10.5px;letter-spacing:.04em;color:var(--mute);font-weight:600;
  position:relative}
.tabs svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;
  stroke-linecap:round;stroke-linejoin:round}
.tabs button.on{color:var(--herb)}
.tabs .pip{position:absolute;top:7px;right:calc(50% - 20px);min-width:16px;height:16px;
  border-radius:9px;background:var(--amber);color:#fff;font-size:10px;font-weight:700;
  display:none;align-items:center;justify-content:center;padding:0 4px}
.tabs .pip.show{display:flex}

/* ── shared bits ──────────────────────────────────── */
h1{font-family:var(--disp);font-weight:600;font-size:27px;line-height:1.12;
  letter-spacing:-.015em}
h2{font-family:var(--disp);font-weight:600;font-size:19px;line-height:1.2}
.sub{color:var(--body);font-size:14.5px;line-height:1.55;margin-top:8px}
.eyebrow{font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;color:var(--mute);
  font-weight:700}
.btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;
  background:var(--herb);color:#F4EFE4;padding:15px;border-radius:13px;font-weight:600;
  font-size:15.5px;transition:background .18s}
.btn:active{background:var(--herb2)}
.btn--amber{background:var(--amber)}.btn--amber:active{background:var(--amber2)}
.btn--ghost{background:none;color:var(--herb);box-shadow:inset 0 0 0 1.5px var(--line)}

/* ── ask (the assistant) ──────────────────────────── */
.thread{display:flex;flex-direction:column;gap:14px}
.msg{max-width:88%;padding:13px 16px;border-radius:16px;font-size:15px;line-height:1.55}
.msg.bot{background:var(--card);border:1px solid var(--line);border-bottom-left-radius:5px}
.msg.you{align-self:flex-end;background:var(--herb);color:#F1EDE2;
  border-bottom-right-radius:5px}
.msg.think{display:flex;gap:5px;align-items:center;padding:16px}
.msg.think s{width:6px;height:6px;border-radius:50%;background:#BEB6A2;text-decoration:none;
  animation:bob 1.15s infinite}
.msg.think s:nth-child(2){animation-delay:.16s}.msg.think s:nth-child(3){animation-delay:.32s}
@keyframes bob{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.chips button{border:1.5px solid var(--line);background:var(--card);padding:10px 14px;
  border-radius:100px;font-size:13.5px;color:var(--ink);font-weight:500;text-align:left}
.chips button:active{background:var(--paper2)}
.chips button.risk{border-color:#E7C9C4;color:var(--alert)}
.ask__head{margin-bottom:20px}
.ask__head h1 em{font-style:normal;color:var(--amber)}

/* the plan card the assistant builds */
.plan{background:var(--card);border:1px solid var(--line);border-radius:18px;
  overflow:hidden;margin-top:2px}
.plan__t{padding:15px 17px 13px;border-bottom:1px solid var(--line);background:var(--paper2)}
.plan__t b{font-family:var(--disp);font-weight:600;font-size:17px;display:block}
.plan__t i{font-style:normal;font-size:12.5px;color:var(--body)}
.step{display:grid;grid-template-columns:22px 1fr;gap:11px;padding:13px 17px;
  border-bottom:1px solid var(--line);font-size:14px;line-height:1.5;color:var(--body)}
.step u{text-decoration:none;font-family:var(--disp);font-weight:600;color:var(--amber);
  font-size:15px}
.plan .picks{padding:14px 17px 17px;display:flex;flex-direction:column;gap:10px}

/* red flag */
.flag{background:#FBF0EE;border:1px solid #EBD0CB;border-radius:18px;padding:17px}
.flag b{display:flex;align-items:center;gap:9px;font-family:var(--disp);font-weight:600;
  font-size:17px;color:var(--alert)}
.flag b svg{width:20px;height:20px;flex:none;stroke:var(--alert);fill:none;stroke-width:1.9}
.flag p{font-size:14px;line-height:1.55;color:#6B4A45;margin-top:9px}
.flag .btn{margin-top:14px;background:var(--alert)}
.flag .btn--ghost{background:none;color:var(--alert);box-shadow:inset 0 0 0 1.5px #E4C6C1}
.fine{display:none;font-size:11.5px;color:var(--mute);line-height:1.55;margin-top:26px;
  padding-top:13px;border-top:1px solid var(--line)}

/* sticky order bar so it is never below the fold */
.cartbar{position:sticky;bottom:-42px;margin:16px -20px -42px;padding:12px 20px 16px;
  background:linear-gradient(180deg,rgba(250,246,239,0) 0%,var(--paper) 26%);z-index:5}

/* the video consultation */
.call{margin-top:16px;border-radius:18px;overflow:hidden;background:#111A15;
  padding:18px 16px 16px;position:relative}
.call__t{display:flex;align-items:center;gap:8px;color:#9FBBA9;font-size:11.5px;
  letter-spacing:.1em;text-transform:uppercase;font-weight:700}
.call__t s{width:7px;height:7px;border-radius:50%;background:#4ADE80;text-decoration:none;
  animation:pulse 1.6s infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.35}}
.call__stage{margin-top:14px;height:196px;border-radius:14px;background:#1C2A22;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:11px;
  position:relative;overflow:hidden}
.call__stage .mono{width:74px;height:74px;border-radius:50%;background:#2F5942;color:#E8DCC4;
  display:flex;align-items:center;justify-content:center;font-family:var(--disp);
  font-weight:600;font-size:26px}
.call__stage b{color:#F0EADC;font-family:var(--disp);font-weight:600;font-size:17px}
.call__stage span{color:#8FA898;font-size:12.5px}
.call__self{position:absolute;right:11px;bottom:11px;width:58px;height:78px;border-radius:10px;
  background:#3A3229;border:1.5px solid rgba(255,255,255,.16);display:flex;align-items:center;
  justify-content:center;color:#D9CDB6;font-family:var(--disp);font-size:17px;font-weight:600}
.call__ctrl{display:flex;gap:11px;justify-content:center;margin-top:14px}
.call__ctrl button{width:46px;height:46px;border-radius:50%;background:#26332B;
  display:flex;align-items:center;justify-content:center}
.call__ctrl svg{width:20px;height:20px;fill:none;stroke:#CFE0D6;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round}
.call__ctrl .end{background:#9B2C24}
.call__ctrl .end svg{stroke:#fff}
.call__ctrl button.off{background:#3E4A42}

/* ── products ─────────────────────────────────────── */
.prod{display:flex;gap:13px;background:var(--card);border:1px solid var(--line);
  border-radius:15px;padding:11px;width:100%;text-align:left;align-items:center}
.prod>span{display:block;min-width:0}
.prod img{width:70px;height:70px;border-radius:11px;object-fit:cover;flex:none}
.prod .n{display:block;font-family:var(--disp);font-weight:600;font-size:16px;line-height:1.15}
.prod .d{display:block;font-size:12.5px;color:var(--body);margin-top:4px;line-height:1.4}
.prod .p{display:block;font-weight:700;font-size:15px;margin-top:7px}
.prod .p s{text-decoration:none;color:var(--mute);font-weight:500;font-size:12px;
  margin-left:5px}

/* the dispensary shelf */
.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}
.grid .prod{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;
  padding:0;overflow:hidden;border-radius:16px}
.grid .prod img{width:100%;height:124px;border-radius:0}
.grid .prod>span{padding:11px 12px 13px}
.grid .prod .n{font-size:15px}
.grid .prod .d{display:none}
.grid .prod .p{font-size:14.5px;margin-top:6px}

.band{margin:16px 0 4px;border-radius:16px;overflow:hidden;background:var(--paper2)}
.band img{width:100%;height:132px;object-fit:cover;object-position:50% 62%}
.band figcaption{font-size:11.5px;line-height:1.5;color:var(--body);padding:10px 13px 12px}

/* product sheet */
.sheet{position:absolute;inset:0;background:rgba(23,21,15,.45);opacity:0;
  pointer-events:none;transition:opacity .25s;z-index:20;display:flex;align-items:flex-end}
.sheet.on{opacity:1;pointer-events:auto}
.sheet__in{background:var(--paper);width:100%;max-height:88%;border-radius:22px 22px 0 0;
  overflow-y:auto;transform:translateY(14px);transition:transform .25s}
.sheet.on .sheet__in{transform:none}
.sheet__in>img{width:100%;height:190px;object-fit:cover}
.sheet__b{padding:18px 20px 24px}
.sheet__b h2{margin-bottom:6px}
.facts{border:1px solid var(--line);border-radius:13px;margin-top:16px;overflow:hidden}
.fact{display:flex;justify-content:space-between;gap:14px;padding:11px 14px;font-size:13px;
  border-bottom:1px solid var(--line);color:var(--body)}
.fact:last-child{border-bottom:0}
.fact b{color:var(--ink);font-weight:600;text-align:right}
.legal{font-size:11.5px;color:var(--mute);line-height:1.55;margin-top:13px}
.sheet .btn{margin-top:16px}
.x{position:absolute;top:14px;right:16px;width:32px;height:32px;border-radius:50%;
  background:rgba(250,246,239,.9);display:flex;align-items:center;justify-content:center;
  font-size:19px;color:var(--ink);z-index:2}

/* ── orders ───────────────────────────────────────── */
.order{background:var(--card);border:1px solid var(--line);border-radius:18px;
  overflow:hidden;margin-top:18px}
.order__t{padding:15px 17px;border-bottom:1px solid var(--line);display:flex;
  justify-content:space-between;align-items:baseline;gap:12px}
.order__t b{font-family:var(--disp);font-weight:600;font-size:16px}
.order__t i{font-style:normal;font-size:12px;color:var(--mute);letter-spacing:.04em}
.track{padding:6px 17px 14px}
.tr{display:grid;grid-template-columns:26px 1fr;gap:12px;padding:11px 0;position:relative}
.tr::before{content:"";position:absolute;left:12px;top:26px;bottom:-11px;width:2px;
  background:var(--line)}
.tr:last-child::before{display:none}
.tr .dot{width:26px;height:26px;border-radius:50%;border:2px solid var(--line);
  background:var(--card);display:flex;align-items:center;justify-content:center;
  font-size:12px;color:var(--mute);z-index:1}
.tr.done .dot{background:var(--herb);border-color:var(--herb);color:#F1EDE2}
.tr.now .dot{border-color:var(--amber);color:var(--amber)}
.tr b{font-size:14.5px;font-weight:600;display:block}
.tr span{font-size:12.5px;color:var(--body)}
.tr.todo b,.tr.todo span{color:var(--mute)}
.lines{padding:14px 17px;border-top:1px solid var(--line);background:var(--paper2)}
.li{display:flex;justify-content:space-between;font-size:13.5px;color:var(--body);
  padding:4px 0}
.li.tot{font-weight:700;color:var(--ink);border-top:1px solid var(--line);margin-top:7px;
  padding-top:9px}
.li .with{display:flex;align-items:center;gap:9px}
.li .with img{width:30px;height:30px;border-radius:7px;object-fit:cover;flex:none}
.batch{font-size:11.5px;color:var(--mute);line-height:1.55;margin-top:12px;
  padding:0 2px}
.shelf{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:18px 0 18px}
.shelf img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:11px}

/* what the vaidya will see before you speak */
.file{background:var(--card);border:1px solid var(--line);border-radius:16px;
  margin-top:14px;overflow:hidden}
.file h3{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--mute);
  font-weight:700;padding:13px 15px 0}
.file .row{display:flex;gap:11px;align-items:center;padding:11px 15px;
  border-bottom:1px solid var(--line)}
.file .row:last-child{border-bottom:0}
.file .row img{width:38px;height:38px;border-radius:9px;object-fit:cover;flex:none}
.file .row b{display:block;font-size:14px;font-weight:600}
.file .row span{display:block;font-size:12px;color:var(--body);margin-top:2px}
.file .row i{font-style:normal;width:38px;height:38px;border-radius:9px;flex:none;
  background:var(--paper2);display:flex;align-items:center;justify-content:center;
  font-family:var(--disp);font-weight:600;color:var(--amber);font-size:16px}

/* ── doctor ───────────────────────────────────────── */
.doc{display:flex;gap:14px;align-items:center;background:var(--card);
  border:1px solid var(--line);border-radius:18px;padding:15px;margin-top:18px}
.doc .mono{width:60px;height:60px;border-radius:50%;flex:none;background:var(--herb);
  color:#EDE4CF;display:flex;align-items:center;justify-content:center;
  font-family:var(--disp);font-weight:600;font-size:22px;letter-spacing:.02em}
.doc b{font-family:var(--disp);font-weight:600;font-size:17px;display:block}
.doc span{font-size:13px;color:var(--body);display:block;margin-top:2px}
.doc .reg{font-size:11.5px;color:var(--mute);margin-top:5px}
.modes{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:11px;
  background:var(--paper2);padding:5px;border-radius:13px}
.modes button{padding:11px 4px;border-radius:9px;font-size:14px;font-weight:600;
  color:var(--body);text-align:center}
.modes button.on{background:var(--card);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.09)}
.mnote{font-size:12.5px;line-height:1.55;color:var(--body);margin-top:11px;
  padding-left:11px;border-left:2.5px solid var(--amber)}
.slots{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:14px}
.slots button{border:1.5px solid var(--line);background:var(--card);padding:12px 4px;
  border-radius:11px;font-size:13.5px;font-weight:600;text-align:center}
.slots button.on{background:var(--herb);color:#F1EDE2;border-color:var(--herb)}
.slots button:disabled{color:var(--mute);background:var(--paper2);font-weight:500}
.consent{display:flex;gap:10px;align-items:flex-start;margin-top:16px;font-size:12.5px;
  color:var(--body);line-height:1.5}
.consent input{margin-top:2px;width:17px;height:17px;accent-color:var(--herb);flex:none}
.dchat{display:flex;flex-direction:column;gap:12px;margin-top:16px}
.note{background:var(--paper2);border:1px dashed var(--line);border-radius:14px;
  padding:14px 16px;font-size:13.5px;color:var(--body);line-height:1.55}
.note b{display:block;color:var(--ink);font-size:14px;margin-bottom:5px;
  font-family:var(--disp);font-weight:600}

/* ── responsive: on a phone the app IS the page ───── */
@media (max-width:820px){
  body{background:var(--paper)}
  .stage{padding:0;gap:0;min-height:100svh;background:none;display:block}
  .phone{width:100%;height:100svh;max-height:none;border-radius:0;box-shadow:none}
  .cap{display:none}
  .fine{display:block}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
