/* ============ /demo — live demo page (Midnight). Load after styles.css ============ */
.demo{padding:100px 0 40px;outline:none}
.d-head{max-width:820px;margin-bottom:24px}
.d-head .eyebrow{display:inline-flex;align-items:center;gap:10px}
.d-head h1{font-size:clamp(30px,3.6vw,44px);line-height:1.08;letter-spacing:-.035em;font-weight:800;margin-bottom:12px}
.d-sub{color:var(--dim);font-size:17.5px;max-width:680px}
.d-noscript{padding:16px;border-radius:14px;background:var(--gold-bg);color:#F8D48A;margin-bottom:20px}
.dnav{display:flex;gap:24px;margin-inline-start:auto}
.dnav a{color:var(--dim);text-decoration:none;font-weight:500;font-size:15px}
.dnav a:hover{color:var(--text)}

/* ---------- layout ---------- */
.d-grid{display:grid;grid-template-columns:330px minmax(0,1fr) minmax(0,1fr);gap:22px;align-items:start}
.d-tabs{display:none}

/* ---------- setup panel ---------- */
.d-setup{background:var(--card);border:1px solid var(--line);border-radius:24px;padding:20px}
.d-setup-title{font-size:18px;margin-bottom:16px}
.d-step{margin-bottom:20px}
.d-step:last-child{margin-bottom:0}
.d-label{display:flex;align-items:center;gap:10px;font:600 14.5px var(--font-d);margin-bottom:10px}
.d-label b{width:24px;height:24px;border-radius:50%;background:var(--mint-bg);border:1px solid var(--mint-line);color:var(--mint);display:grid;place-items:center;font-size:12px;flex:none}
.d-seg{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.d-seg button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:8px 6px;border-radius:12px;border:1px solid var(--line-2);background:var(--bg);color:var(--soft);font-size:13px;font-weight:500}
.d-seg button[aria-checked=true]{border-color:var(--mint);background:var(--mint-bg);color:var(--mint)}
.cd{width:10px;height:10px;border-radius:50%;flex:none}
.cd.wa{background:#25D366}.cd.ig{background:linear-gradient(135deg,#833AB4,#E1306C,#F77737)}.cd.fb{background:#0866FF}
.d-cats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;min-height:218px}
.d-cat{display:flex;align-items:center;gap:9px;min-height:50px;padding:6px 8px;border-radius:14px;border:1px solid var(--line-2);background:var(--bg);color:var(--soft);font-size:13.5px;font-weight:500;text-align:start}
.d-cat:hover{border-color:var(--line-3);color:var(--text)}
.d-cat[aria-checked=true]{border-color:var(--mint);background:var(--mint-bg);color:var(--text)}
.d-cat .pic{width:36px;height:36px;border-radius:10px;padding:3px}
.d-det{border-top:1px solid var(--line);padding-top:4px}
.d-det>summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;color:var(--soft);font-size:14px;font-weight:500}
.d-det>summary::-webkit-details-marker{display:none}
.d-det>summary::after{content:"";width:9px;height:9px;border-right:2px solid var(--dim);border-bottom:2px solid var(--dim);transform:rotate(45deg) translateY(-3px);transition:transform .2s}
.d-det[open]>summary::after{transform:rotate(-135deg) translate(-2px,-1px)}
.d-det-in{padding-bottom:6px}
.d-fl{display:block;font-size:12.5px;color:var(--dim);margin:12px 0 6px;font-weight:500}
.d-in{width:100%;min-height:42px;background:var(--bg);border:1px solid var(--line-2);border-radius:10px;padding:9px 11px;color:var(--text);font:400 14px var(--font)}
.d-in:focus{outline:none;border-color:var(--mint);box-shadow:0 0 0 3px rgba(var(--accent-rgb),.18)}
select.d-in{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%239AA7BD' stroke-width='2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:16px;padding-right:32px}
.d-items{display:grid;gap:6px}
.d-item{display:grid;grid-template-columns:36px minmax(0,1fr) 78px 34px;gap:6px;align-items:center}
.d-item .pic{width:36px;height:36px;border-radius:9px;padding:3px}
.d-item .d-in{min-height:38px;padding:7px 9px;font-size:13.5px}
.d-x{width:34px;height:38px;border-radius:10px;border:1px solid var(--line-2);background:transparent;color:var(--dim);display:grid;place-items:center;padding:0}
.d-x:hover{border-color:#7F1D1D;color:#FCA5A5}
.d-x svg,.d-add svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.d-add{margin-top:8px;display:flex;align-items:center;justify-content:center;gap:6px;width:100%;min-height:40px;border-radius:10px;border:1px dashed var(--line-3);background:transparent;color:var(--soft);font-size:13.5px}
.d-add:hover{border-color:var(--mint);color:var(--mint)}
.d-add:disabled{opacity:.4;cursor:not-allowed}
.d-row2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.d-row2>div[hidden]{display:none}
.d-chips{display:flex;flex-wrap:wrap;gap:6px}
.d-chip{display:inline-flex;align-items:center;gap:5px;min-height:36px;padding:6px 11px;border-radius:999px;border:1px solid var(--line-2);background:var(--bg);color:var(--dim);font-size:13px}
.d-chip svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;display:none}
.d-chip[aria-pressed=true]{border-color:var(--mint-line);background:var(--mint-bg);color:var(--mint)}
.d-chip[aria-pressed=true] svg{display:block}
.d-start{width:100%;margin-top:16px}
.d-note{margin-top:10px;font-size:12.5px;color:var(--faint);text-align:center}

/* product pictures (tiles) */
.pic{display:block;flex:none;background:#EEF2F6;border-radius:10px;padding:4px}
.pic svg{width:100%;height:100%;display:block}
.pic-f{background:#FFF1E0}.pic-w{background:#F6EEFF}.pic-e{background:#E8F3FF}.pic-g{background:#FFF6DD}
.pic-h{background:#E6F7F1}.pic-b{background:#FDECF3}.pic-s{background:#EAF1FF}.pic-x{background:#EEF2F6}
.pic.sm{width:32px;height:32px;padding:2px;border-radius:8px}
.pic.xs{width:28px;height:28px;padding:2px;border-radius:7px}

/* ---------- phones ---------- */
.d-phone{min-width:0}
.d-cap{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--dim);margin:2px 0 10px;font-weight:500}
.d-cap-dot{width:8px;height:8px;border-radius:50%;background:var(--mint)}
.d-cap-dot.s{background:var(--blue)}
.ph{--ph-bg:#0B141A;--ph-head:#1F2C34;--me:#005C4B;--bot:#1F2C34;--accent:#25D366;--accent-t:#53E08A;--accent-ink:#03261A;--input:#1F2C34;
  position:relative;height:740px;max-height:calc(100svh - 120px);min-height:560px;display:flex;flex-direction:column;background:var(--ph-bg);border:1px solid var(--line-2);border-radius:34px;padding:10px;overflow:hidden;box-shadow:0 34px 80px rgba(0,0,0,.45),inset 0 0 0 5px rgba(255,255,255,.03)}
.d-cust[data-ch=ig] .ph{--ph-bg:#000;--ph-head:#121212;--me:linear-gradient(135deg,#5B2BE0,#B0307E 75%);--bot:#262626;--accent:#C9265B;--accent-t:#FF8FB5;--accent-ink:#fff;--input:#262626}
.d-cust[data-ch=fb] .ph{--ph-bg:#0E1013;--ph-head:#1B1D21;--me:#0866FF;--bot:#303030;--accent:#0866FF;--accent-t:#6AB0FF;--accent-ink:#fff;--input:#2B2D31}
.ph-s{--ph-bg:#0C1220;--ph-head:var(--card-2);--accent:var(--mint);--accent-t:var(--mint);--accent-ink:var(--mint-ink);--input:var(--raise)}
.ph-head{display:flex;align-items:center;gap:10px;padding:8px 8px 10px;background:var(--ph-head);border-radius:26px 26px 12px 12px;margin:-2px -2px 0}
.ph-av{width:38px;height:38px;border-radius:50%;background:var(--mint-line);color:var(--mint);display:grid;place-items:center;font:700 13px var(--font-d);flex:none}
.d-cust[data-ch=ig] .ph-av{background:#000;color:#fff;box-shadow:0 0 0 2px #000,0 0 0 4px #E1306C}
.d-cust[data-ch=fb] .ph-av{background:#0866FF;color:#fff}
.ph-av.s{background:var(--blue-bg);color:var(--blue)}
.ph-id{display:flex;flex-direction:column;min-width:0;line-height:1.25;flex:1}
.ph-id b{font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ph-id small{font-size:12px;color:var(--accent-t)}
.ph-s .ph-id small{color:var(--dim)}
.ph-chan{font-size:11px;font-weight:600;color:var(--accent-t);border:1px solid currentColor;border-radius:999px;padding:3px 9px;white-space:nowrap;opacity:.9}
.ph-icon{width:40px;height:40px;border-radius:50%;border:0;background:transparent;color:var(--dim);display:grid;place-items:center;padding:0;flex:none}
.ph-icon:hover{background:rgba(255,255,255,.07);color:var(--text)}
.ph-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ph-log{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;gap:8px;padding:14px 6px 10px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#2C3A58 transparent}
.ph-log:focus-visible{outline-offset:-3px}
.ph-log::-webkit-scrollbar{width:6px}.ph-log::-webkit-scrollbar-thumb{background:#2C3A58;border-radius:3px}

/* messages */
.msg{max-width:86%;padding:8px 11px 5px;border-radius:15px;font-size:14px;line-height:1.45;color:var(--text);overflow-wrap:anywhere}
.msg p{margin:0}
.msg p b{color:#fff;font-weight:600}
.msg time{display:block;text-align:end;font-size:10.5px;opacity:.6;margin-top:2px}
.msg.me{align-self:flex-end;background:var(--me);color:#fff;border-end-end-radius:4px}
.msg.bot{align-self:flex-start;background:var(--bot);border-end-start-radius:4px}
.msg.bot.staff{background:#14332A;border:1px solid var(--mint-line)}
.d-cust[data-ch=fb] .msg.bot.staff,.d-cust[data-ch=ig] .msg.bot.staff{background:#1E2A22}
.msg .from{display:block;font-size:11.5px;color:var(--mint);font-weight:600;margin-bottom:2px}
.msg.sys{align-self:center;max-width:92%;text-align:center;font-size:12.5px;color:var(--dim);background:rgba(255,255,255,.05);border-radius:10px;padding:7px 12px}
.msg.sys b{color:var(--text);font-weight:600}
.msg.typing{display:flex;gap:4px;padding:12px 14px}
.msg.typing i{width:7px;height:7px;border-radius:50%;background:#8696A0;animation:chanDot 1s infinite}
.msg.typing i:nth-child(2){animation-delay:.15s}.msg.typing i:nth-child(3){animation-delay:.3s}
.msg:has(.cards),.msg:has(.ed),.msg:has(.rc){width:86%}

/* product cards inside a message */
.cards{display:grid;grid-auto-flow:column;grid-auto-columns:118px;gap:8px;overflow-x:auto;margin:8px -4px 2px;padding:0 4px 6px;scroll-snap-type:x mandatory;scrollbar-width:thin;scrollbar-color:#3A4B70 transparent}
.card{display:flex;flex-direction:column;gap:2px;background:rgba(255,255,255,.06);border-radius:12px;padding:6px;scroll-snap-align:start;min-width:0}
.card .pic{width:100%;height:auto;aspect-ratio:1;border-radius:9px;padding:6px;margin-bottom:4px}
.card b{font-size:12.5px;font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.6em}
.card small{font-size:12px;color:var(--accent-t);font-weight:600}
.card-btn{margin-top:5px;display:flex;align-items:center;justify-content:center;gap:4px;min-height:34px;border-radius:999px;border:1px solid var(--accent);background:transparent;color:var(--accent-t);font-size:12.5px;font-weight:600}
.card-btn:hover{background:var(--accent);color:var(--accent-ink)}
.card-btn svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round}

/* choice buttons inside a message */
.choices{display:flex;flex-wrap:wrap;gap:6px;margin:9px 0 3px}
.choice{min-height:36px;padding:7px 13px;border-radius:999px;border:1px solid var(--accent);background:transparent;color:var(--accent-t);font-size:13px;font-weight:500}
.choice.pri{background:var(--accent);color:var(--accent-ink)}
.choice:hover:not(:disabled){filter:brightness(1.12)}
.choice:disabled{opacity:.4;cursor:default}
.choice.picked{opacity:1;background:var(--accent);color:var(--accent-ink)}

/* receipt */
.rc{margin-top:8px;background:rgba(0,0,0,.28);border:1px dashed rgba(255,255,255,.16);border-radius:12px;padding:10px 11px;font-size:12.5px}
.rc-top{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:6px}
.rc-top b{font:700 13.5px var(--font-d);color:#fff}
.rc ul{display:grid;gap:3px;padding-bottom:6px;border-bottom:1px solid rgba(255,255,255,.1)}
.rc li{display:flex;justify-content:space-between;gap:10px;color:var(--soft)}
.rc li.fee{color:var(--dim)}
.rc-total{display:flex;justify-content:space-between;padding-top:6px;font-weight:600;font-size:13.5px}
.rc-total b{color:#fff}
.rc-meta{margin-top:6px;color:var(--dim);font-size:12px;line-height:1.45}

/* status chips */
.st{font-style:normal;font-size:11px;font-weight:600;letter-spacing:.02em;border-radius:999px;padding:3px 9px;white-space:nowrap;background:var(--blue-bg);color:#A9C4FF}
.st-paid,.st-delivered,.st-confirmed,.st-arrived{background:var(--mint-bg);color:var(--mint)}
.st-dispatched,.st-check{background:var(--gold-bg);color:var(--gold)}
.st-cancelled,.st-warn{background:#3A1717;color:#FCA5A5}
.st-noshow{background:var(--raise);color:var(--dim)}

/* order editor */
.ed{margin-top:8px;background:rgba(0,0,0,.28);border-radius:12px;padding:8px;display:grid;gap:6px}
.ed-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center}
.ed-name{font-size:12.5px;line-height:1.3;min-width:0;overflow-wrap:anywhere}
.ed-name small{display:block;color:var(--dim);font-size:11.5px}
.ed-row.off{opacity:.45}.ed-row.off .ed-name{text-decoration:line-through}
.ed-q{display:flex;align-items:center;gap:4px}
.ed-q b{min-width:20px;text-align:center;font-size:14px}
.ed-q button{width:32px;height:32px;border-radius:50%;border:1px solid var(--line-3);background:rgba(255,255,255,.04);color:var(--text);display:grid;place-items:center;padding:0}
.ed-q button svg,.ed-add svg,.pick-row svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round}
.ed-total{display:flex;justify-content:space-between;font-size:13px;font-weight:600;padding-top:6px;border-top:1px solid rgba(255,255,255,.1)}
.ed-act{display:flex;gap:6px}
.ed-act button{flex:1;min-height:36px;border-radius:999px;font-size:12.5px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:4px}
.ed-add{border:1px solid var(--accent);background:transparent;color:var(--accent-t)}
.ed-save{border:0;background:var(--accent);color:var(--accent-ink)}
.ed.done{opacity:.6}
.ed button:disabled{cursor:default}

/* payment screenshot (customer side) */
.msg.shot{padding:6px 6px 4px}
.shot-img{display:flex;flex-direction:column;gap:2px;width:170px;background:#fff;color:#0F172A;border-radius:10px;overflow:hidden;padding-bottom:8px;font-size:11.5px}
.shot-bar{background:#6D28D9;color:#fff;font-weight:700;padding:6px 9px;margin-bottom:6px}
.shot-ok{display:flex;align-items:center;gap:4px;color:#047857;font-weight:600;padding:0 9px}
.shot-ok svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.shot-img b{font:800 17px var(--font-d);padding:2px 9px;color:#0F172A}
.shot-img small{color:#475569;padding:0 9px}

/* quick buttons + composer */
.ph-newmsg{position:absolute;left:50%;bottom:118px;transform:translateX(-50%);display:flex;align-items:center;gap:4px;min-height:34px;padding:6px 12px;border-radius:999px;border:0;background:var(--accent);color:var(--accent-ink);font-size:12.5px;font-weight:600;box-shadow:0 8px 20px rgba(0,0,0,.4);z-index:2}
.ph-newmsg svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.4}
.ph-newmsg[hidden]{display:none}
.ph-quick{display:flex;gap:6px;align-items:center;padding:8px 4px 2px}
.qr-scroll{flex:1;min-width:0;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg,#000 88%,transparent);mask-image:linear-gradient(90deg,#000 88%,transparent);padding-inline-end:14px}
.qr-scroll::-webkit-scrollbar{display:none}
.qr{flex:none;min-height:38px;padding:7px 13px;border-radius:999px;border:1px solid var(--accent);background:transparent;color:var(--accent-t);font-size:13px;font-weight:500;white-space:nowrap}
.qr:hover{background:rgba(255,255,255,.05)}
.qr-more{display:flex;align-items:center;gap:5px;background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.qr-more:hover{background:var(--accent);filter:brightness(1.1)}
.qr-more svg{width:16px;height:16px;fill:currentColor}
.ph-compose{display:flex;gap:8px;padding:8px 2px 2px}
.ph-compose input{flex:1;min-width:0;min-height:46px;border-radius:999px;border:1px solid transparent;background:var(--input);color:var(--text);padding:10px 16px;font:400 15px var(--font)}
.ph-compose input::placeholder{color:#8696A0}
.ph-compose input:focus{outline:none;border-color:var(--accent)}
.ph-compose button{width:46px;height:46px;flex:none;border-radius:50%;border:0;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;padding:0}
.ph-compose button svg{width:20px;height:20px;fill:currentColor}

/* "More" sheet */
.ph-sheet{position:absolute;inset:0;background:rgba(0,0,0,.55);display:flex;align-items:flex-end;z-index:5;border-radius:34px}
.ph-sheet[hidden]{display:none}
.ph-sheet-in{width:100%;max-height:78%;overflow:auto;background:var(--card-2);border-top:1px solid var(--line-3);border-radius:24px 24px 26px 26px;padding:12px 14px 16px;animation:sheetUp .28s cubic-bezier(.2,.9,.3,1.1)}
@keyframes sheetUp{from{transform:translateY(40%);opacity:0}to{transform:none;opacity:1}}
.ph-sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.ph-sheet-head h3{font-size:16px}
.sh-h{font-size:11.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--faint);margin:10px 0 7px}
.sh-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.sh-btn{min-height:44px;padding:9px 12px;border-radius:12px;border:1px solid var(--line-3);background:var(--raise);color:var(--text);font-size:13.5px;text-align:start}
.sh-btn:hover{border-color:var(--accent)}

/* ---------- shop owner phone ---------- */
.s-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 2px 0}
.s-stats span{display:flex;flex-direction:column;align-items:center;gap:0;background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:6px 4px}
.s-stats b{font:700 15px var(--font-d);white-space:nowrap}
.s-stats small{font-size:11px;color:var(--faint)}
.s-log{gap:10px}
.s-empty{margin:auto 8px;text-align:center;color:var(--faint);font-size:13px;border:1px dashed var(--line-3);border-radius:14px;padding:22px 14px}
.oc{background:var(--card);border:1px solid var(--line-2);border-radius:16px;padding:12px;display:grid;gap:8px;font-size:13px}
.oc.done{opacity:.6}
.oc-top{display:flex;justify-content:space-between;align-items:center;gap:8px}
.oc-top b{font:700 14px var(--font-d)}
.oc-lines{display:grid;gap:5px}
.oc-lines li{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center;color:var(--soft)}
.oc-lines b{font-weight:600;color:var(--text)}
.oc-meta{display:flex;flex-direction:column;gap:1px;color:var(--dim);font-size:12.5px}
.oc-meta span:empty{display:none}
.oc-total{display:flex;justify-content:space-between;align-items:baseline;font-weight:600;padding-top:6px;border-top:1px solid var(--line)}
.oc-total small{color:var(--faint);font-weight:400}
.oc-note{font-size:12px;color:var(--faint)}
.oc-quote{font-size:13px;color:var(--soft);font-style:italic}
.chk{display:grid;gap:4px}
.chk li{display:flex;align-items:center;gap:6px;color:var(--soft)}
.chk svg{width:15px;height:15px;fill:none;stroke:var(--mint);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
.sb{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.sbtn{min-height:40px;padding:7px 6px;border-radius:11px;border:1px solid var(--line-3);background:var(--raise);color:var(--text);font-size:12.5px;font-weight:500;display:flex;align-items:center;justify-content:center;gap:4px;text-align:center;line-height:1.2}
.sbtn:hover:not(:disabled){border-color:#3A4B70}
.sbtn.pri{background:var(--mint);border-color:var(--mint);color:var(--mint-ink);font-weight:600}
.sbtn.warn{color:#FCA5A5;border-color:#5B2323}
.sbtn.more[aria-expanded=true]{border-color:var(--blue);color:var(--blue)}
.sbtn svg{width:15px;height:15px;fill:currentColor}
.sbtn:disabled{opacity:.5;cursor:default}
.smenu{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:8px;border-radius:12px;background:var(--bg);border:1px solid var(--line-2)}
.smenu[hidden]{display:none}
.smi{min-height:40px;padding:7px 10px;border-radius:10px;border:1px solid var(--line-2);background:var(--card);color:var(--text);font-size:12.5px;text-align:start}
.smi:hover{border-color:var(--blue)}
.sconfirm{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.sconfirm span{flex:1 1 100%;font-size:12.5px;color:#FCA5A5}
.sconfirm .sbtn{flex:1}
.ev{display:grid;gap:1px;background:rgba(122,167,255,.08);border:1px solid rgba(122,167,255,.22);border-radius:12px;padding:8px 10px;font-size:12.5px}
.ev b{font-weight:600;font-size:12.5px;color:#C9DAFF}
.ev span{color:var(--soft)}
.ev time{font-size:10.5px;color:var(--faint);text-align:end}
.ev.warn{background:rgba(248,113,113,.08);border-color:rgba(248,113,113,.25)}
.ev.warn b{color:#FCA5A5}
.ev.me{background:var(--mint-bg);border-color:var(--mint-line);align-self:flex-end;max-width:88%}
.ev.me b{color:var(--mint)}
.pick-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:8px;align-items:center;min-height:42px;padding:6px 8px;border-radius:10px;border:1px solid var(--line-2);background:var(--bg);color:var(--text);font-size:12.5px;text-align:start}
.pick-row:hover{border-color:var(--mint)}
.pick-row b{font-weight:600;color:var(--mint)}

/* ---------- after the demo ---------- */
.d-after{margin-top:40px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:20px 32px;background:radial-gradient(600px 260px at 0% 0%,rgba(var(--accent-rgb),.1),transparent 60%),var(--card);border:1px solid var(--line);border-radius:26px;padding:28px 30px}
.d-after>div:first-child{flex:1 1 420px}
.d-after h2{font-size:clamp(22px,2.6vw,30px);margin-bottom:6px}
.d-after p{color:var(--dim);font-size:16px;max-width:620px}
.d-after-cta{display:flex;flex-wrap:wrap;gap:10px}

/* ---------- responsive ---------- */
@media (max-width:1240px){
  .d-grid{grid-template-columns:300px minmax(0,1fr) minmax(0,1fr);gap:16px}
  .ph{padding:8px;border-radius:30px}
}
@media (max-width:1099px){
  .demo{padding-top:92px}
  .d-grid{grid-template-columns:minmax(0,1fr);gap:16px;max-width:560px;margin-inline:auto}
  .d-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;position:sticky;top:70px;z-index:6;padding:4px;border-radius:14px;background:var(--card);border:1px solid var(--line-2);box-shadow:0 10px 24px rgba(0,0,0,.35)}
  .d-tabs button{position:relative;min-height:44px;border-radius:10px;border:0;background:transparent;color:var(--dim);font-weight:600;font-size:14.5px;display:flex;align-items:center;justify-content:center;gap:8px}
  .d-tabs button[aria-selected=true]{background:var(--text);color:var(--bg)}
  .d-badge{min-width:20px;height:20px;border-radius:999px;background:var(--mint);color:var(--mint-ink);font-size:11.5px;display:grid;place-items:center;padding:0 6px}
  .d-badge[hidden]{display:none}
  .d-grid[data-tab=cust] .d-sell,.d-grid[data-tab=sell] .d-cust{display:none}
  .d-cap{display:none}
  .ph{height:min(76svh,700px);min-height:500px;max-height:none}
  .dnav{display:none}
}
@media (max-width:768px){
  .nav-cta{display:inline-flex}
  .demo .btn,.d-after .btn{width:100%}
  .d-head{margin-bottom:20px}
  .d-sub{font-size:16px}
  .d-after{padding:22px}
}
@media (max-width:520px){
  .nav-cta{display:none}
  .d-setup{padding:16px;border-radius:20px}
  .ph{border-radius:26px;padding:6px;height:min(78svh,680px)}
  .ph-head{border-radius:20px 20px 10px 10px}
  .ph-sheet{border-radius:26px}
  .msg{max-width:90%}
  .msg:has(.cards),.msg:has(.ed),.msg:has(.rc){width:90%}
}
@media (prefers-reduced-motion:reduce){.msg.typing i{animation:none}.ph-sheet-in{animation:none}}
