:root{--ink:#000;--mute:#6b6b6b;--line:#d9d9d9;--bg:#efefef;--card:#fff;--g:#006a4e;--g2:#8fd9b6;--gt:#e1efe9;--r:14px;--grad:linear-gradient(135deg,var(--g2),var(--g))}
*{box-sizing:border-box;margin:0}
html{-webkit-text-size-adjust:100%}
body{font:16px/1.5 Roboto,'Anek Bangla',sans-serif;color:var(--ink);background:var(--bg);height:100dvh;display:flex;flex-direction:column;overflow:hidden;-webkit-tap-highlight-color:transparent}
body.bn,body.bn *{font-family:'Anek Bangla',Roboto,sans-serif}
body.bn{line-height:1.7}
/* welcome screen looks identical in both languages */
body .welcome,body .welcome *{font-family:Roboto,'Anek Bangla',sans-serif;line-height:1.5}
body .welcome [lang=bn]{font-family:'Anek Bangla',Roboto,sans-serif;line-height:1.7}
body .welcome h1[lang]{line-height:1.35}
.langpick{margin-top:12px}.langpick .opt{min-height:72px;font-size:18px;font-weight:500}
button,input,textarea{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0}
:focus-visible{outline:3px solid var(--g);outline-offset:2px}
[hidden]{display:none!important}

/* header: back, count over segmented bar, tools */
#bar{flex:none;display:flex;align-items:center;gap:8px;padding:10px 14px;padding-top:max(10px,env(safe-area-inset-top));min-height:56px}
#bar .sp{flex:1}
.ib{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;flex:none}
.ib:disabled{opacity:.25}
.ib svg{width:22px;height:22px;stroke:var(--ink);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.prog{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0}
.cnt{font-size:12px;color:var(--mute);font-variant-numeric:tabular-nums;line-height:1}
.track{position:relative;width:100%;margin-top:14px}
.runner{position:absolute;bottom:7px;width:18px;height:18px;margin-left:-9px;display:grid;place-items:center;pointer-events:none;transition:left .3s}
.runner svg{width:18px;height:18px;stroke:var(--g);fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.segs{display:flex;gap:4px;height:6px;width:100%}
.segs i{background:#fff;border-radius:6px;overflow:hidden}
.segs b{display:block;height:100%;background:var(--grad);transition:width .3s}
.lang{display:flex;background:#fff;border:1px solid #bdbdbd;border-radius:99px;overflow:hidden;height:40px;padding:3px;flex:none}
.lang button{min-width:56px;padding:0 12px;font-size:14px;line-height:1;font-weight:500}
/* fixed per-label font so the toggle looks identical in both languages */
.lang button[lang=en]{font-family:Roboto,sans-serif}
.lang button[lang=bn]{font-family:'Anek Bangla',sans-serif}
.lang button[aria-pressed=true]{background:var(--ink);color:#fff;border-radius:99px}

#app{flex:1;overflow-y:auto;padding:14px 20px 24px;width:100%;max-width:560px;margin:0 auto}
#app>section{animation:in .22s ease-out}
@keyframes in{from{opacity:0;transform:translateY(6px)}}
@media(prefers-reduced-motion:reduce){#app>section{animation:none}.segs b,.runner{transition:none}}
h1{font-size:22px;line-height:1.35;font-weight:500;text-align:center;padding-top:6px}
body.bn h1{line-height:1.55}
.sub{color:var(--mute);margin-top:8px;font-size:14px;text-align:center}
.stack{display:flex;flex-direction:column;gap:10px;margin-top:24px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}

#foot{flex:none;padding:10px 20px;padding-bottom:max(14px,env(safe-area-inset-bottom));max-width:560px;width:100%;margin:0 auto;display:flex;flex-direction:column;gap:2px;align-items:stretch}
#foot:empty{display:none}
.btn{min-height:52px;border-radius:12px;background:var(--ink);color:#fff;font-weight:500;width:100%;padding:0 20px}
.btn.g{background:var(--ink)}
.btn:disabled{background:#d6d6d6;color:#8c8c8c;cursor:default}
.link,.btn.link{min-height:44px;background:none;color:var(--ink);font-size:13px;text-decoration:underline;text-underline-offset:3px;text-align:center}

/* selectable surfaces: white, gradient outline when chosen */
.opt,.popt,.chip,.row{background:var(--card);border:2px solid transparent}
.opt[aria-pressed=true],.popt[aria-pressed=true],.chip[aria-pressed=true]{background:linear-gradient(var(--card),var(--card)) padding-box,var(--grad) border-box}
.opt{display:flex;align-items:center;width:100%;min-height:60px;padding:14px 16px;border-radius:var(--r);text-align:left;font-size:15px}
.grid2 .opt{min-height:76px;justify-content:center;text-align:center}
.opt.ic{flex-direction:column;justify-content:center;gap:8px;min-height:112px;text-align:center}
.opt.ic svg{width:34px;height:34px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.opt.ic>span:last-child{color:var(--ink)}
.opt.pos{color:var(--g)}.opt.neg{color:#d32f2f}.opt.neu{color:#222}.opt.mute{color:var(--mute)}
.opt:active,.popt:active{transform:scale(.99)}
.multi{flex-direction:row;flex-wrap:wrap;gap:10px}
.popt{display:inline-flex;align-items:center;gap:8px;padding:10px 16px;border-radius:22px;font-size:14px;text-align:left;min-height:44px}
.popt[aria-pressed=true]::after{content:'×';font-size:18px;line-height:1;color:var(--ink)}
.other{margin:0;flex:1 0 100%}
input[type=text],input[type=email],input[type=tel],textarea{width:100%;border:2px solid transparent;border-radius:var(--r);padding:14px 16px;background:#fff;outline:0;resize:none}
input:focus,textarea:focus{border-color:var(--g)}

.row{border-radius:var(--r);padding:14px}
.row p{font-size:15px;margin-bottom:10px;font-weight:500}
.chips{display:flex;gap:6px}
.chip{flex:1;min-height:44px;border-radius:10px;font-size:14px;font-weight:500;padding:0 4px;background-color:#f1f1f1}
.chip.na{flex:1.7;font-size:12px;line-height:1.2}
.row .chip[aria-pressed=false]{background:#f1f1f1}
.legend{font-size:13px}
/* desktop: wide page, question on the left, toggle on the right */
@media(min-width:900px){
  #app:has(.wide){max-width:860px}
  .wide .row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 40px;padding:14px 24px}
  .wide .row p{flex:1;margin:0;font-size:16px}
  .wide .tog{width:340px;flex:none}
  .wide .row .rail{height:36px}
  .wide .row>input{flex:1 0 100%}
}
.row .rail{height:44px;margin:0 14px}
.row .rail .dot.on{width:24px;height:24px;margin:-12px 0 0 -12px}
.icons{display:flex;justify-content:space-between}
.ico{width:28px;padding:4px 0;display:flex;flex-direction:column;align-items:center;gap:2px;color:#9a9a9a}
.ico svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ico em{font-style:normal;font-size:12px;white-space:nowrap;line-height:1.3}
.ico.on{font-weight:500}
.ico.c0.on{color:#d32f2f}.ico.c1.on{color:#444}.ico.c2.on{color:var(--g)}
.row .rail .dot.c0.on{background:#d32f2f;box-shadow:0 0 0 6px #fbe3e3}
.row .rail .dot.c1.on{background:#444;box-shadow:0 0 0 6px #e4e4e4}

/* rating slider (dots on a rail) */
.rate{background:var(--card);border-radius:18px;padding:22px 18px 16px;margin-top:24px}
.rate .val{text-align:center;font-weight:500;min-height:3.2em;display:flex;align-items:center;justify-content:center;margin-bottom:10px}
.rate .val.ph{color:var(--mute);font-weight:400}
.rail{position:relative;height:48px;margin:0 16px;touch-action:none;cursor:pointer}
.rail::before{content:'';position:absolute;left:0;right:0;top:50%;height:2px;margin-top:-1px;background:#cfcfcf}
.rail .dot{position:absolute;top:50%;width:8px;height:8px;margin:-4px 0 0 -4px;border-radius:50%;background:#cfcfcf;transition:all .15s}
.rail .dot.on{width:28px;height:28px;margin:-14px 0 0 -14px;background:var(--g);box-shadow:0 0 0 6px var(--gt)}
.thumb{position:absolute;top:50%;width:28px;height:28px;margin:-14px 0 0 -14px;border-radius:50%;background:var(--g);box-shadow:0 0 0 6px var(--gt);pointer-events:none;transition:left .2s cubic-bezier(.3,.7,.3,1),transform .25s cubic-bezier(.3,.7,.3,1),opacity .2s}
.thumb.off{opacity:0;transform:scale(.2)}
.popt.na{transition:background-color .2s,color .2s}
@media(prefers-reduced-motion:reduce){.thumb,.popt.na{transition:none}}
.ends{display:flex;justify-content:space-between;gap:16px;font-size:12px;color:var(--mute);margin-top:6px;line-height:1.3}
.ends span{max-width:44%}.ends span+span{text-align:right}
.popt.na,.popt.na[aria-pressed=true]{display:flex;justify-content:center;width:fit-content;min-height:38px;padding:6px 18px;margin:12px auto 0;font-size:13px;border:1.5px solid #000;border-radius:99px;background:transparent;font-weight:500;text-align:center}
.popt.na[aria-pressed=true]{background:#000;color:#fff}
.popt.na::after{content:none!important}

/* text + voice */
.tbox{display:flex;gap:10px;align-items:flex-start;margin-top:24px}
.tbox textarea{height:56px;transition:height .2s;border:2px solid transparent;background:linear-gradient(#f8f8f8,#f8f8f8) padding-box,var(--grad) border-box;font-size:15px}
.tbox.open textarea,.tbox.has textarea{height:42dvh;min-height:180px}
.cap{font-size:12px;color:var(--mute);text-align:right;margin-top:8px}
.mic{flex:none;width:56px;height:56px;border-radius:50%;background:var(--ink);display:grid;place-items:center}
.mic svg{width:24px;height:24px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round}
.pill{display:flex;width:fit-content;max-width:100%;margin:24px auto 0;align-items:center;gap:10px;background:#fff;border-radius:99px;padding:8px 12px 8px 8px;min-height:0}
.ib span,.act span{display:flex}
.ib.big{width:40px;height:40px}
.acts{display:flex;gap:10px;justify-content:center;margin-top:12px}
.act{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 16px;border-radius:99px;background:#fff;border:1.5px solid transparent;font-size:14px;font-weight:500}
.act svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.act.del{color:#d32f2f;border-color:#d32f2f}
.pill .ib.go{background:var(--ink)}
.pill .ib.go svg{stroke:#fff}
.pill .ib.go svg[data-i=play]{fill:#fff}
.pill time{font-size:13px;font-variant-numeric:tabular-nums;min-width:34px;text-align:right;color:var(--mute)}
.wave{flex:none;height:36px;display:flex;align-items:center;justify-content:center;min-width:0;padding:0 4px}
.wave i{flex:none;width:2px;margin:0 1px;background:var(--ink);border-radius:3px;transition:background .1s}
.wave i.off{background:#c9c9c9}

.center{min-height:100%;display:flex;flex-direction:column;justify-content:center;padding-bottom:24px;text-align:center}
.hero{font-size:56px;font-weight:700;letter-spacing:-2px;line-height:1;font-variant-numeric:tabular-nums}
.hero small{font-size:22px;font-weight:500;letter-spacing:0;margin-left:6px}
.road{height:6px;background:#fff;border-radius:6px;position:relative;margin:22px 0;overflow:hidden}
.road i{position:absolute;inset:0 auto 0 0;background:var(--grad);border-radius:6px}
.wl{display:flex;align-items:center;justify-content:center;gap:12px;margin:24px 0;flex-direction:column}
.wl p{font-size:14px;color:var(--mute)}
hr{border:0;border-top:1.5px solid var(--line);margin:28px 0}
.rules{list-style:none;padding:0;margin-top:24px;display:flex;flex-direction:column;gap:10px}
.rules li{padding:14px 16px 14px 40px;position:relative;font-size:15px;background:#fff;border-radius:var(--r)}
.rules li::before{content:'';position:absolute;left:18px;top:1.35em;width:10px;height:10px;border-radius:50%;background:var(--grad)}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.stats div{background:#fff;padding:14px;border-radius:var(--r)}
.stats b{display:block;font-size:26px;font-weight:700;line-height:1.2}
.stats span{font-size:13px;color:var(--mute)}
.stats div:last-child:nth-child(odd){grid-column:span 2}
.form{display:flex;flex-direction:column;gap:12px;margin-top:18px}
.form label{font-size:14px;color:var(--mute);display:block;margin-bottom:4px}
.form textarea{height:90px}
.grp{font-size:14px;color:var(--mute);margin:14px 0 0;text-align:center}

#sheet{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;align-items:flex-end;z-index:9}
#sheet>div{background:var(--bg);width:100%;max-width:560px;margin:0 auto;border-radius:20px 20px 0 0;max-height:82dvh;display:flex;flex-direction:column}
#sheet header{display:flex;justify-content:space-between;align-items:center;padding:14px 16px 8px 20px;font-weight:500;font-size:18px}
#sheet ol{list-style:none;padding:0 12px 16px;overflow-y:auto}
#sheet h3{font-size:13px;color:var(--g);font-weight:500;padding:14px 8px 4px}
#sheet li button{display:flex;gap:12px;align-items:flex-start;width:100%;padding:12px 10px;text-align:left;border-radius:12px;font-size:15px;background:#fff;margin-bottom:6px}
#sheet li button:disabled{color:#9a9a9a;background:transparent}
#sheet li button[aria-current]{outline:2px solid var(--g)}
#sheet li s{flex:none;width:26px;text-decoration:none;color:var(--mute);font-size:13px;padding-top:2px;font-variant-numeric:tabular-nums}
#sheet li small{display:block;color:var(--mute);font-size:12px}
#toast{position:fixed;left:16px;right:16px;bottom:90px;max-width:520px;margin:0 auto;background:#000;color:#fff;padding:12px 16px;border-radius:12px;font-size:14px;opacity:0;pointer-events:none;transition:opacity .2s;z-index:10}
#toast.on{opacity:1}
