/* Style komen pou mesaj, kay ak lwe, ak pibliye (menm lang ak rès sit la) */
:root{--red:#ff161f;--ink:#14141a;--muted:#63636f;--line:#e5e5ec;--bg:#f4f4f7;--soft:#fff1f1;
--hd:'Sora',system-ui,sans-serif;--bd:'Figtree',system-ui,-apple-system,'Segoe UI',sans-serif;
box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
html{scroll-padding-top:env(safe-area-inset-top,0px)}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font:400 16px/1.5 var(--bd);min-height:100vh}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);background:#fff;z-index:60}
a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer}
:focus-visible{outline:3px solid var(--red);outline-offset:2px}
header{position:sticky;top:env(safe-area-inset-top,0px);z-index:20;background:#fff;border-bottom:1px solid var(--line)}
.bar{max-width:760px;margin:0 auto;display:flex;align-items:center;gap:10px;height:60px;padding:0 14px}
.bar .b{width:40px;height:40px;border-radius:50%;background:var(--bg);display:grid;place-items:center;border:0}
.bar svg,.ic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.bar strong{font:800 18px var(--hd);flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
main{max-width:760px;margin:0 auto;padding:16px 14px 80px}
h1{font:800 26px/1.15 var(--hd);margin:4px 0 6px}
.empty{text-align:center;color:var(--muted);padding:50px 10px}
.btn{display:inline-flex;align-items:center;justify-content:center;height:46px;padding:0 20px;border-radius:999px;border:1.5px solid var(--line);background:#fff;font-weight:600}
.btn.p{background:var(--red);border-color:var(--red);color:#fff}.btn:disabled{opacity:.6}
.toast{position:fixed;left:50%;bottom:calc(90px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--ink);color:#fff;padding:11px 18px;border-radius:12px;font-size:14px;opacity:0;pointer-events:none;transition:opacity .2s;z-index:80;max-width:90vw;text-align:center}
.toast.show{opacity:1}
/* mesaj */
.cv{display:flex;gap:12px;align-items:center;width:100%;text-align:left;background:#fff;border:1px solid var(--line);border-radius:18px;padding:12px 14px;margin-bottom:10px}
.av{flex:0 0 auto;width:48px;height:48px;border-radius:50%;display:grid;place-items:center;color:#fff;font:800 19px var(--hd)}
.cv .m{flex:1;min-width:0}.cv b{display:flex;justify-content:space-between;gap:8px;font:700 15px var(--hd)}.cv b small{font:400 12px var(--bd);color:var(--muted);white-space:nowrap}
.cv p{margin:2px 0 0;color:var(--muted);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dot{width:10px;height:10px;border-radius:50%;background:var(--red);flex:0 0 auto}
.ctx{display:flex;gap:10px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px;margin-bottom:12px;font-size:14px}
.ctx img{width:48px;height:48px;border-radius:10px;object-fit:cover}
.msgs{display:flex;flex-direction:column;gap:8px;padding:4px 0 90px}
.bm{max-width:82%;padding:10px 14px;border-radius:18px;white-space:pre-wrap;overflow-wrap:anywhere}
.bm small{display:block;font-size:11px;opacity:.7;margin-top:2px}
.bm.me{align-self:flex-end;background:var(--red);color:#fff;border-bottom-right-radius:6px}
.bm.them{align-self:flex-start;background:#fff;border:1px solid var(--line);border-bottom-left-radius:6px}
.composer{position:fixed;left:0;right:0;bottom:0;z-index:25;background:#fff;border-top:1px solid var(--line);padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px))}
.composer div{max-width:760px;margin:0 auto;display:flex;gap:8px;align-items:flex-end}
.composer textarea{flex:1;min-height:44px;max-height:120px;border:1px solid var(--line);border-radius:22px;padding:10px 16px;resize:none;background:var(--bg)}
.composer button{height:44px;padding:0 20px;border:0;border-radius:999px;background:var(--red);color:#fff;font-weight:600}
/* kay ak lwe */
.chips{display:flex;gap:8px;overflow-x:auto;margin:10px 0;scrollbar-width:none}
.chip{flex:0 0 auto;padding:8px 16px;border-radius:999px;border:1px solid var(--line);background:#fff;font-weight:600;font-size:14px}
.chip.on{background:var(--red);border-color:var(--red);color:#fff}
.flt{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}
.flt select,.flt input,.f input,.f select,.f textarea{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:#fff;font-size:16px}
.grid{display:grid;grid-template-columns:1fr;gap:12px}@media(min-width:560px){.grid{grid-template-columns:1fr 1fr}}
.lc{display:block;background:#fff;border:1px solid var(--line);border-radius:20px;overflow:hidden;text-align:left;width:100%;padding:0}
.lc .im{aspect-ratio:4/3;background:linear-gradient(135deg,#ff6a70,#b3161b);display:grid;place-items:center;color:#fff;font:800 28px var(--hd);position:relative}
.lc .im img{width:100%;height:100%;object-fit:cover;display:block}
.tag{position:absolute;left:10px;top:10px;background:var(--red);color:#fff;font:600 12px var(--bd);padding:3px 10px;border-radius:999px}
.lc .b{padding:12px 14px 16px}.lc h3{font:700 16px/1.25 var(--hd);margin:0 0 4px}.lc .pr{font:800 17px var(--hd)}.lc small{color:var(--muted)}
.ov{position:fixed;inset:0;z-index:70;background:#fff;overflow-y:auto;overscroll-behavior:contain}
.ov[hidden]{display:none}
.ov .x{position:fixed;top:calc(env(safe-area-inset-top,0px) + 12px);right:12px;width:42px;height:42px;border-radius:50%;border:0;background:rgba(20,20,26,.72);color:#fff;font-size:26px;z-index:2}
.ov .main-img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block;background:var(--bg)}
.ov .th{display:flex;gap:8px;padding:10px 16px 0;overflow-x:auto}.ov .th img{width:60px;height:60px;border-radius:10px;object-fit:cover;border:2px solid transparent;cursor:pointer}.ov .th img.on{border-color:var(--red)}
.ov .in{padding:14px 18px calc(30px + env(safe-area-inset-bottom,0px));max-width:760px;margin:0 auto}
.ov h2{font:800 22px/1.2 var(--hd);margin:6px 0}.ov .pr{font:800 22px var(--hd)}
.ov .desc{white-space:pre-wrap;overflow-wrap:anywhere;color:#2c2c34;margin:12px 0}
.acts{display:flex;gap:10px;flex-wrap:wrap}.acts .btn{flex:1}
.ht{color:var(--muted);font-weight:400;font-size:12px;white-space:nowrap}
/* fòm pibliye */
.f label{display:block;font-size:13px;color:var(--muted);font-weight:600;margin:12px 0 4px}
.f .row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pv{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.pv img{width:70px;height:70px;border-radius:10px;object-fit:cover}
.box{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;margin-bottom:12px}
.st{display:inline-block;font-size:12px;font-weight:600;padding:2px 10px;border-radius:999px;background:var(--bg);color:var(--muted)}.st.ok{background:#e3f6ec;color:#12a150}
.mine{display:flex;gap:10px;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding:10px 0}.mine:first-child{border-top:0}
.mine button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:6px 14px;font-size:13px}
