/* Black & white. Simple, premium. Din me safed, raat me kaala. */
:root {
  --bg: #ffffff; --card: #ffffff; --ink: #0a0a0a; --mut: #6e6e6e; --line: #e8e8e8;
  --pri: #0a0a0a; --pri-ink: #ffffff; --soft: #f6f6f6; --ok: #0a0a0a; --warn: #0a0a0a;
  --r: 14px;
}
body.night {
  --bg: #000; --card: #0b0b0b; --ink: #8a8a8a; --mut: #777; --line: #1c1c1c;
  --pri: #1a1a1a; --pri-ink: #9a9a9a; --soft: #0f0f0f;
}
* { box-sizing: border-box; min-width: 0; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 17px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  -webkit-font-smoothing: antialiased; letter-spacing: -0.005em;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#app { max-width: 520px; margin: 0 auto; min-height: 100%; }
.view { padding: 28px 20px 40px; min-height: 100dvh; display: flex; flex-direction: column; gap: 16px; }
.center { justify-content: center; align-items: stretch; }
h1 { font-size: 34px; line-height: 1.1; margin: 0; font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: 24px; line-height: 1.2; margin: 0; font-weight: 650; letter-spacing: -0.02em; }
h3 { font-size: 12px; margin: 4px 0 0; color: var(--mut); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
p { margin: 0; }
.dim { color: var(--mut); font-size: 15px; }
.small { font-size: 14px; }

button, .btn {
  font: inherit; font-weight: 600; border: 0; border-radius: var(--r); min-height: 52px; padding: 12px 18px;
  background: var(--pri); color: var(--pri-ink); cursor: pointer; text-align: center; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
button:disabled { opacity: .5; }
button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
button.link { background: none; color: var(--mut); min-height: 44px; padding: 8px; font-weight: 500; text-decoration: underline; }
button.sm { min-height: 44px; padding: 8px 14px; font-size: 15px; border-radius: 14px; }
button:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
button:active { transform: scale(.985); }

/* Home: sketch jaisa — do bade pill buttons */
.big {
  min-height: 96px; border-radius: 999px; font-size: 19px; font-weight: 600; background: var(--card); color: var(--ink);
  border: 1px solid var(--ink); letter-spacing: -0.01em; transition: background .2s, color .2s;
}
.big:hover { background: var(--ink); color: var(--bg); }
body.night .big { border-color: #222; }
body.night .big:hover { background: #111; color: #9a9a9a; }
.home-top { display: flex; justify-content: space-between; align-items: center; }
.home-mid { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.banner { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

textarea, input {
  font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; width: 100%;
}
textarea { min-height: 46dvh; resize: none; }
body.night textarea { background: #000; border-color: #111; color: #777; min-height: 60dvh; }
body.night textarea::placeholder { color: #333; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 auto; }
.mic { flex: 0 0 56px; width: 56px; padding: 0; }
.mic.on { background: var(--ink); color: var(--bg); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.item { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.item:first-of-type { border-top: 0; padding-top: 0; }
.item .t { font-weight: 600; }
.item, .t, .tag, .summary, h2, p { overflow-wrap: anywhere; }
.tag { font-size: 13px; color: var(--mut); }
.loop { border-left: 2px solid var(--ink); padding-left: 12px; }
.summary { font-size: 18px; font-weight: 500; color: var(--mut); font-style: italic; }
input[type=range] { padding: 0; border: 0; accent-color: var(--pri); background: none; }
.pct { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.done { opacity: .5; text-decoration: line-through; }
.meter { display: flex; align-items: center; gap: 10px; }
.meter input { flex: 1; }
.meter b { min-width: 1.5em; text-align: right; }

/* Landing + login popup */
[hidden] { display: none !important; }
.landing { gap: 28px; }
.brand { font-weight: 700; letter-spacing: -0.02em; }
.row-inline { display: inline-flex; align-items: center; gap: 6px; }
.hero { display: flex; flex-direction: column; gap: 14px; padding: 28px 0 8px; }
.hero h1 { font-size: clamp(34px, 9vw, 44px); }
.feats { display: flex; flex-direction: column; }
.feat { border-top: 1px solid var(--line); padding: 18px 0; display: flex; flex-direction: column; gap: 4px; }
.feat h2 { font-size: 18px; }
.foot-links { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.foot-links a, .modal a { color: var(--ink); }
.overlay.login { background: rgba(0,0,0,.45); align-items: flex-end; padding: 0; }
.modal { width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); gap: 14px; }
@media (min-width: 600px) { .overlay.login { align-items: center; padding: 24px; } .modal { border-radius: 20px; } }
.modal .x { min-width: 44px; text-decoration: none; color: var(--mut); }
.or { display: flex; align-items: center; gap: 12px; color: var(--mut); font-size: 14px; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.phone { display: flex; border: 1px solid var(--ink); border-radius: 12px; overflow: hidden; margin-top: 6px; }
.phone span { padding: 14px; border-right: 1px solid var(--line); font-weight: 600; }
.phone input { border: 0; border-radius: 0; }
.phone input:focus-visible { outline: none; }
.phone:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }

/* "i" button + how-it-works animation */
.info-wrap { display: flex; justify-content: center; padding-top: 4px; }
.info-btn { width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; background: transparent; color: var(--mut); border: 1px solid var(--line); font: italic 600 16px Georgia, "Times New Roman", serif; }
.info-btn::after { content: ''; position: absolute; inset: -4px; }
.info-btn { position: relative; }
.overlay.how { background: rgba(0,0,0,.45); align-items: flex-end; padding: 0; }
@media (min-width: 600px) { .overlay.how { align-items: center; padding: 24px; } }
.scene { position: relative; height: 180px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.scene .l { position: absolute; inset: 0; opacity: 0; animation: hb-scene 10s infinite; }
.scene .l2 { animation-delay: 3.33s; } .scene .l3 { animation-delay: 6.66s; }
@keyframes hb-scene { 0% { opacity: 0; } 3% { opacity: 1; } 30% { opacity: 1; } 33.3% { opacity: 0; } 100% { opacity: 0; } }
.scene .pad { position: absolute; inset: 22px; border: 1px solid var(--ink); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.scene .ln { display: block; height: 8px; width: 0; background: var(--ink); border-radius: 4px; animation: hb-type 10s infinite; }
@keyframes hb-type { 0% { width: 0; } 9% { width: var(--w); } 30% { width: var(--w); } 33% { width: 0; } 100% { width: 0; } }
.scene .dot { position: absolute; left: calc(50% - 6px); top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); animation: hb-fly 10s infinite; animation-delay: 3.33s; }
@keyframes hb-fly { 0%, 4% { transform: translate(0, 0); } 16%, 30% { transform: translate(var(--x), 92px); } 100% { transform: translate(var(--x), 92px); } }
.scene .bins { position: absolute; left: 10px; right: 10px; bottom: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.scene .bins b { border: 1px solid var(--ink); border-radius: 8px; padding: 22px 2px 6px; font-size: 11px; font-weight: 600; text-align: center; overflow-wrap: anywhere; }
.scene .l3 { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 14px; gap: 8px; }
.scene .bars { display: flex; align-items: flex-end; gap: 10px; height: 120px; }
.scene .bars i { display: block; width: 20px; height: 0; background: var(--ink); border-radius: 4px 4px 0 0; animation: hb-bar 10s infinite; animation-delay: 6.66s; }
@keyframes hb-bar { 0%, 3% { height: 0; } 14%, 30% { height: var(--h); } 33%, 100% { height: 0; } }
.how-steps { display: grid; gap: 10px; }
.how-steps div { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 10px; }
@media (prefers-reduced-motion: reduce) {
  .scene .l, .scene .ln, .scene .dot, .scene .bars i { animation: none; }
  .scene .l2 { opacity: 1; } .scene .dot { display: none; } .scene .bars i { height: var(--h); }
}

/* What I heard + do-now + file close */
.mirror { border-left: 2px solid var(--ink); padding: 2px 0 2px 14px; display: flex; flex-direction: column; gap: 6px; }
.mirror .quote { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.mirror .summary { font-style: normal; color: var(--ink); font-size: 17px; font-weight: 400; }
.donow-step { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.big-timer { font-size: 56px; text-align: center; }
.fileclose { position: relative; width: 44px; height: 40px; margin: 4px 0; }
.fileclose .folder { position: absolute; left: 0; bottom: 0; width: 44px; height: 24px; border: 2px solid var(--ink); border-radius: 4px; background: var(--card); z-index: 1; }
.fileclose .sheet { position: absolute; left: 10px; top: -6px; width: 24px; height: 28px; border: 2px solid var(--ink); border-radius: 2px; background: var(--card); animation: hb-file .9s ease-in forwards; }
@keyframes hb-file { 0% { transform: translateY(-8px); opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fileclose .sheet { animation: none; opacity: 0; } }

/* Untangle + insight */
.untangle { position: relative; height: 300px; margin: 8px 0; }
.strand { position: absolute; left: 6%; right: 6%; top: 0; height: 2px; background: var(--ink); border-radius: 2px; transform-origin: 50% 50%; will-change: transform, opacity; opacity: 0; }
/* Sleep */
.sleep { background: #000; color: #555; justify-content: space-between; }
.word { font-size: 34px; color: #3a3a3a; text-align: center; transition: opacity 1.2s; min-height: 2.4em; display: flex; align-items: center; justify-content: center; }
.circle { width: 160px; height: 160px; border-radius: 50%; margin: 0 auto; background: #111; border: 1px solid #262626; transform: scale(.6); transition: transform 4s ease-in-out; }
.circle.out { transition-duration: 6s; }
.sleep .foot { display: flex; justify-content: space-between; }
.sleep button.link { color: #6a6a6a; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 5; }
.overlay .card { max-width: 420px; }

/* Morning */
.choices { display: grid; gap: 12px; }
.choices button { background: var(--card); color: var(--ink); border: 1px solid var(--line); min-height: 60px; font-weight: 500; }
.choices button:hover { border-color: var(--ink); }

/* Pay */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan { background: var(--card); color: var(--ink); border: 1px solid var(--line); flex-direction: column; min-height: 110px; font-weight: 500; }
.plan.sel { border: 2px solid var(--ink); }
.plan b { font-size: 28px; letter-spacing: -0.02em; }
.plan { position: relative; gap: 2px; }
.plan .pl-name { font-size: 14px; color: var(--mut); font-weight: 500; }
.plan .pl-day { font-size: 13px; color: var(--mut); font-weight: 500; }
.plan .badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; letter-spacing: .02em; }
.pay .plans { margin-top: 8px; }
.paycard { gap: 14px; }
.paycard .step { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.paycard .num { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; margin-top: 1px; }
.qr-frame { width: min(230px, 64vw); margin: 4px auto 0; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.upi-row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; text-align: center; }
.upi-row button.link { min-height: 36px; padding: 4px 8px; font-size: 14px; color: var(--ink); }
.divider { border-top: 1px solid var(--line); margin: 2px 0; }
.center-t { text-align: center; }
.qr { width: 100%; height: auto; display: block; } /* asli shape (516x626) — dabana nahi */

.install { display: flex; align-items: center; gap: 10px; border: 1px solid var(--ink); border-radius: 12px; padding: 10px 6px 10px 14px; font-size: 14px; }
.install span { flex: 1; }
.install button.sm { flex: none; }
.install .x { flex: none; min-height: 44px; min-width: 44px; padding: 0; text-decoration: none; color: var(--mut); }
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #0a0a0a; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .3s; max-width: 90vw; z-index: 9; }
#toast.show { opacity: 1; }
.sos { border: 2px solid var(--ink); }
@media (prefers-reduced-motion: reduce) { .circle, .word { transition: none; } }

/* हिं/EN pill — har screen par */
.lang-pill { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); z-index: 6;
  min-height: 34px; height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--card); color: var(--mut); border: 1px solid var(--line); }
.lang-pill[hidden] { display: none; }
body.has-pill .view > .home-top, body.has-pill .view > h2:first-child { padding-right: 56px; }

/* Dhaaga: dabate hi hilta hai, jawab par seedha (JS se, ek hi chalti hui movement — koi jhatka nahi) */


/* Card v2 */
.meter-big { border: 1px solid var(--ink); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
body.night .meter-big { border-color: #222; }
.mb-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.mb-num b { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.mb-bar, .rbar { position: relative; height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.mb-bar i, .rbar i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); background: var(--ink); border-radius: 4px; transition: width .7s cubic-bezier(.2,.8,.2,1); }
body.night .mb-bar i, body.night .rbar i { background: #555; }
.rbar { height: 6px; margin-right: 34px; overflow: visible; }
.rbar b { position: absolute; right: -34px; top: -8px; font-size: 13px; color: var(--mut); font-variant-numeric: tabular-nums; width: 28px; text-align: right; }
.rbar.sm { height: 4px; margin-right: 0; }
.rcard .kind { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mut); }
.rcard .t { font-weight: 600; }
.rcard .q { font-weight: 500; }
.rcard .prev { font-size: 15px; border-left: 2px solid var(--line); padding-left: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
button.chip { min-height: 40px; padding: 8px 12px; border-radius: 999px; background: var(--card); color: var(--ink); border: 1px solid var(--line); font-weight: 500; font-size: 15px; text-align: left; }
button.chip.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
button.chip.sel { background: var(--ink); color: var(--bg); border-color: var(--ink); }
body.night button.chip { border-color: #222; }
body.night button.chip.sel { background: #222; color: #aaa; }
.sub { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.like { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.like .tag { margin-right: 4px; }
.tip { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 10px; font-size: 15px; }
.tip span:first-child { flex: 1 1 60%; }
.strength { border-left: 2px solid var(--ink); padding: 2px 0 2px 14px; display: flex; flex-direction: column; gap: 4px; }
.strip { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 14px; padding: 4px 6px 4px 14px; font-size: 13px; color: var(--mut); }
.strip button.link { min-height: 36px; padding: 4px 8px; font-size: 13px; color: var(--ink); }
body.night .strip { display: none; }
.mb-result { text-align: center; }
.mb-result b { font-size: 40px; letter-spacing: -0.03em; }
@media (prefers-reduced-motion: reduce) { .mb-bar i, .rbar i { transition: none; } }
