
:root{--bg:#0b0b0e;--surface:#15151b;--raised:#1e1e27;--line:#2b2b35;--ink:#f5f3fa;--muted:#aaa8b6;--violet:#bb8cff;--primary:#9e64f2;--green:#6ed8a5;--warn:#ffc47c;--red:#ff8c9b;--r:18px}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.45 system-ui,-apple-system,'Segoe UI',sans-serif}button,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{color:inherit;cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--violet);outline-offset:3px}button{border:0}a{color:var(--violet)}.wrap{max-width:1160px;margin:auto;padding:28px 32px}.mast{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}.identity{display:flex;align-items:center;gap:13px}.brand{width:51px;height:51px;border-radius:14px;object-fit:cover}.brandname{font-weight:850;font-size:20px;letter-spacing:.07em}.eyebrow{font-size:11px;font-weight:750;letter-spacing:.15em;color:var(--violet)}.muted,small{color:var(--muted)}.tag{padding:7px 12px;border:1px solid var(--line);border-radius:30px;font-size:12px;color:var(--muted)}.layout{display:grid;grid-template-columns:minmax(360px,460px) minmax(300px,1fr);gap:32px;align-items:start}.phone{border:1px solid #363442;border-radius:29px;background:#0f0f14;overflow:hidden;box-shadow:0 15px 60px #0006;min-width:0}.top{padding:15px 20px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line)}.top .brand{width:39px;height:39px;border-radius:11px}.top .identity{flex:1;gap:10px}.top .brandname{font-size:15px}.top small{font-size:11px}.iconbtn{background:var(--raised);border-radius:12px;width:44px;height:44px;display:grid;place-items:center}.ic{width:21px;height:21px;display:inline-block;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.content{padding:19px;min-height:570px;max-height:690px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#45404d transparent}.nav{display:grid;grid-template-columns:repeat(4,1fr);padding:9px 9px 12px;gap:5px;border-top:1px solid var(--line);background:#15151c}.nav button{background:transparent;border-radius:12px;display:flex;flex-direction:column;align-items:center;gap:5px;padding:9px 3px;font-size:11px;color:var(--muted);min-height:55px}.nav button.on{background:#2a203c;color:var(--violet);font-weight:700}.heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 15px}h1,h2,h3,p{margin:0}h1{font-size:28px;letter-spacing:-.045em;line-height:1.15}h2{font-size:18px;letter-spacing:-.02em}h3{font-size:14px}p{margin-top:5px}.hero{position:relative;overflow:hidden;border:1px solid #513673;border-radius:20px;padding:19px;background:linear-gradient(135deg,#21182f,#15131c 75%);margin-bottom:14px}.hero:after{content:'';position:absolute;right:-55px;top:-84px;width:170px;height:170px;border:1px solid #7249a2;border-radius:50%;box-shadow:0 0 0 18px #7955a411,0 0 0 35px #7955a40b;pointer-events:none}.hero h1{margin:12px 0 6px;font-size:24px}.status{display:inline-flex;gap:7px;align-items:center;font-size:12px;font-weight:650;color:var(--green)}.dot{width:8px;height:8px;background:var(--green);border-radius:50%}.hero .sub{color:#c9bdd8;font-size:13px;max-width:270px}.herofoot{border-top:1px solid #ffffff16;display:flex;justify-content:space-between;align-items:center;margin-top:16px;padding-top:12px;font-size:13px}.linkbtn{background:none;color:var(--violet);font-weight:650;padding:8px 0;min-height:36px}.metrics{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 20px}.metric{border:1px solid var(--line);background:var(--surface);border-radius:15px;padding:13px;text-align:left}.metric .ic{color:var(--violet);width:18px;height:18px}.metric strong{display:block;font-size:23px;letter-spacing:-.04em;margin-top:8px}.metric small{font-size:12px}.section{margin:18px 0 9px;display:flex;align-items:center;justify-content:space-between}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:15px;margin-bottom:10px}.rowbtn{width:100%;background:var(--surface);border:1px solid var(--line);border-radius:14px;display:flex;align-items:center;gap:12px;padding:12px;text-align:left;min-height:63px;margin-bottom:8px}.rowbtn .tile{background:#262035;border-radius:11px;width:40px;height:40px;color:var(--violet);display:grid;place-items:center;flex-shrink:0}.rowbtn .desc{flex:1;min-width:0}.rowbtn small{display:block;font-size:12px;margin-top:3px}.rowbtn>.ic:last-child{width:17px;color:var(--muted)}.primary,.secondary,.danger{border-radius:13px;padding:13px 15px;min-height:48px;width:100%;font-weight:750;margin:6px 0;text-align:center;text-decoration:none;display:block}.primary{background:var(--primary);color:#100b19}.secondary{background:var(--raised);border:1px solid var(--line)}.danger{color:var(--red);background:#351d27;border:1px solid #623242}.bar{height:7px;border-radius:10px;background:#30303b;overflow:hidden;margin:9px 0 5px}.bar span{display:block;height:100%;background:var(--primary);border-radius:10px}.kv{display:flex;align-items:center;justify-content:space-between;gap:8px}.kv strong{font-size:13px}.resource{padding:10px 0}.resource+.resource{border-top:1px solid var(--line)}.search{width:100%;background:var(--surface);color:var(--ink);border:1px solid var(--line);padding:14px;border-radius:13px;margin:0 0 12px}.filters{display:flex;gap:7px;overflow:auto;margin-bottom:15px}.chip{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:9px 12px;white-space:nowrap;font-size:12px}.chip.on{background:#2b203d;color:var(--violet);border-color:#5a3a82}.listrow{display:flex;align-items:flex-start;gap:11px;padding:13px 0;border-bottom:1px solid var(--line)}.listrow:last-child{border-bottom:0}.listrow .tile{width:36px;height:36px;border-radius:10px;background:#262035;display:grid;place-items:center;color:var(--violet);flex-shrink:0}.listrow .desc{flex:1;min-width:0}.listrow button{background:none;text-align:left;padding:0;width:100%}.listrow p{font-size:13px;color:var(--muted);overflow-wrap:anywhere}.stamp{font-size:11px;color:var(--muted);white-space:nowrap}.back{background:none;color:var(--violet);padding:7px 0 13px;min-height:44px;display:flex;align-items:center;gap:6px}.notice{border:1px solid #55442d;background:#251e17;color:#ffdbab;border-radius:14px;padding:13px;font-size:13px;margin-bottom:14px}.label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--muted)}.lock{text-align:center;padding:30px 12px}.lock .brand{width:96px;height:96px;border-radius:23px;margin-bottom:22px}.lock h1{font-size:26px}.lock p{margin:14px 0 22px;color:var(--muted)}.side{min-width:0}.side h1{font-size:35px;max-width:550px;margin:7px 0 10px}.sideintro{color:var(--muted);max-width:560px;margin-bottom:21px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:20px;margin-bottom:14px}.panel h2{margin-bottom:10px}.toggle{display:flex;align-items:center;gap:10px;margin:10px 0}.toggle input{accent-color:var(--primary);width:19px;height:19px}.colors{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:14px}.sw{border:1px solid var(--line);border-radius:10px;overflow:hidden}.sw div{height:37px}.sw small{display:block;padding:6px 4px;font-size:10px;text-align:center}.bot{border:1px solid #34333e;border-radius:15px;padding:14px;background:#11151e}.bothero{display:flex;align-items:center;gap:13px;background:#1b1725;padding:12px;border-radius:12px;border-left:3px solid var(--primary);margin-bottom:12px}.bothero .brand{width:56px;height:56px}.bothero strong{font-size:18px;letter-spacing:.04em}.botbuttons{display:grid;grid-template-columns:1fr 1fr;gap:6px}.botbuttons button{background:#222939;min-height:43px;border-radius:9px;color:#e4d9fa;font-size:12px;padding:9px}.botbuttons .wide{grid-column:1/-1;background:#634197;color:#fff;font-weight:750}.foot{font-size:12px;color:var(--muted);margin-top:12px}.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:#292332;color:var(--ink);border:1px solid #69518b;border-radius:13px;padding:12px 18px;max-width:90vw;z-index:10;box-shadow:0 6px 30px #0008}.hide{display:none!important}.empty{color:var(--muted);padding:23px;text-align:center}.dialog{position:fixed;inset:0;background:#000b;display:grid;place-items:center;padding:20px;z-index:20}.dialog .card{max-width:380px;width:100%;padding:22px}.dialog .card p{color:var(--muted);margin:12px 0}.switch{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}.switch input{width:20px;height:20px;accent-color:var(--primary)}@media(max-width:800px){.wrap{padding:16px;max-width:480px}.layout{grid-template-columns:1fr;gap:19px}.mast{margin-bottom:13px}.mast .tag{display:none}.content{max-height:64vh;min-height:340px}.side h1{font-size:26px}.phone{border-radius:20px}.nav{position:sticky;bottom:0}.side{padding-bottom:15px}}@media(max-width:400px){.wrap{padding:8px}.content{padding:14px}.hero{padding:15px}.brandname{font-size:18px}.metrics{gap:7px}.metric{padding:11px}.rowbtn{padding:10px}}@media(prefers-reduced-motion:no-preference){button:hover{filter:brightness(1.12)}button:active{filter:brightness(.93)}}

/* Design System 1.1 — visual refinement */
:root{--r:16px}body{background:radial-gradient(ellipse at 10% 0%,#1a1423 0,transparent 38%),var(--bg)}.wrap{max-width:1216px;padding:30px 32px}.mast{margin-bottom:25px}.mast-actions{display:flex;align-items:center;gap:10px}.viewbtn{border:1px solid #514064;background:#201a2b;color:var(--violet);padding:9px 13px;min-height:40px;border-radius:10px;font-size:12px;font-weight:700}.layout{grid-template-columns:minmax(340px,450px) minmax(300px,1fr);gap:36px}.phone{display:flex;flex-direction:column;border-radius:25px;background:#101015;border-color:#3b3745}.top{padding:13px 18px;background:#13131a}.top .brand{width:42px;height:42px}.content{padding:18px;min-height:0;height: min(740px, calc(100vh - 220px));max-height:none;scrollbar-gutter:stable}.nav{padding:8px;background:#17171e;flex-shrink:0}.nav button{position:relative;min-height:58px;border-radius:10px;font-size:12px;gap:6px}.nav button.on:before{content:'';position:absolute;top:0;width:20px;height:3px;background:var(--violet);border-radius:4px}.heading{margin-bottom:13px}.heading h1{font-size:26px}.heading p{font-size:13px}.hero{padding:16px;background:linear-gradient(115deg,#271c38,#191621 88%);border-color:#49365d;margin-bottom:14px}.hero-title{font-size:22px;letter-spacing:-.035em;line-height:1.2;margin:8px 0}.hero:after{right:-86px;top:-110px;opacity:.7}.hero .sub{font-size:13px;max-width:100%;margin:6px 0}.herofoot{margin-top:11px;padding-top:6px;gap:8px}.herofoot span{font-size:12px}.herofoot .linkbtn{font-size:13px;white-space:nowrap}.section{margin:15px 0 9px;gap:8px}.section h2{font-size:16px}.section .linkbtn{font-size:12px;min-height:32px}.metrics{gap:8px;margin:0 0 13px}.metric{padding:11px 12px;border-radius:13px;background:#18181f}.metric-top{display:flex;justify-content:space-between;align-items:center}.metric-top .ic:last-child{width:15px;color:#8c829b}.metric strong{font-size:24px;margin-top:3px;font-variant-numeric:tabular-nums}.metric small{font-size:12px}.card{padding:13px 15px}.resource{padding:9px 0}.bar{height:6px;background:#34313e}.quota-foot{display:flex;justify-content:space-between;gap:5px;border-top:1px solid var(--line);padding-top:9px;margin-top:4px;color:var(--muted);font-size:11px}.rowbtn{min-height:60px;padding:10px 12px}.rowbtn .tile{width:39px;height:39px}.rowbtn .desc b{font-size:14px}.smalltag{font-size:11px;color:var(--violet);background:#2b223c;border:1px solid #4b3765;border-radius:7px;padding:4px 8px;white-space:nowrap}.panel-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}.side h1{font-size:36px}.panel{padding:18px 20px;border-radius:18px}.scenarios .toggle{padding:4px 0}.bot{background:#111720}.bothero{border-left:2px solid var(--primary)}.botbuttons button{min-height:44px}.searchwrap{position:relative;margin-bottom:10px}.searchwrap>span{position:absolute;left:13px;top:7px;color:var(--muted);font-size:24px;pointer-events:none}.searchwrap .search{margin:0;padding:12px 38px 12px 39px;min-height:46px}.clearsearch{position:absolute;right:5px;top:4px;min-width:38px;height:38px;background:none;font-size:22px;color:var(--muted)}.filterline{display:flex;align-items:center;gap:10px;margin-bottom:10px;color:var(--muted);font-size:13px}.filterline select{flex:1;min-width:0;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);padding:10px;font:inherit;min-height:42px}.chip{min-height:42px;font-size:13px}.filters{gap:7px;margin-bottom:12px}.records-card{padding:4px 13px}.listrow{padding:13px 0}.listrow button{min-height:44px}.eventkind{display:block;font-size:11px;letter-spacing:.04em;color:var(--violet);margin-bottom:4px}.eventkind.removed{color:var(--red)}.eventtitle{display:block}.profile-card{padding:16px}.profile-status{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:15px;padding-top:13px;border-top:1px solid var(--line)}.profile-status .status{font-size:11px}.switch{min-height:52px}.lock{padding:25px 10px}.lock .brand{width:84px;height:84px;margin-bottom:14px}.lock p{font-size:14px}.primary{background:var(--primary)}.app-only .wrap{max-width:510px;padding:12px 20px}.app-only .layout{display:block}.app-only .side,.app-only footer,.app-only .mast .tag{display:none}.app-only .content{height:calc(100dvh - 210px);min-height:230px}.app-only .mast .eyebrow{font-size:10px}.app-only .mast{margin-bottom:12px}.app-only .mast .brand{width:39px;height:39px}.app-only .mast .brandname{font-size:15px}.app-only .viewbtn{white-space:nowrap}.app-only .phone{border-radius:18px}
@media(max-width:800px){.wrap{padding:12px;max-width:480px}.layout{grid-template-columns:1fr;gap:20px}.mast{gap:8px;margin-bottom:12px}.mast .brand{width:41px;height:41px}.mast .brandname{font-size:16px}.mast .eyebrow{font-size:9px}.mast .identity{gap:8px}.viewbtn{font-size:11px;white-space:nowrap;padding:8px}.content{height: min(700px,calc(100dvh - 190px));min-height:300px;max-height:none;padding:14px}.nav{position:static}.side h1{font-size:28px}.app-only .wrap{padding:8px}.app-only .content{height:calc(100dvh - 170px);min-height:260px}.app-only .mast .identity{gap:6px}.hero-title{font-size:20px}.panel{padding:16px}}@media(max-width:380px){.mast .viewbtn{font-size:10px;padding:6px}.mast .brandname{font-size:14px}.mast .brand{width:34px;height:34px}.heading h1{font-size:24px}.profile-status{flex-wrap:wrap}.quota-foot{flex-wrap:wrap}.nav button{font-size:11px}.herofoot span{font-size:11px}.herofoot .linkbtn{font-size:12px}.content{padding:12px}}
.app-only .wrap{height:100dvh;display:flex;flex-direction:column}.app-only .mast{flex-shrink:0}.app-only .layout{flex:1;min-height:0}.app-only .phone{height:100%;min-height:0}.app-only .top{flex-shrink:0}.app-only .content{height:auto;min-height:0;flex:1}

/* Hybrid preview: native chat colors are independent of brand palette. */
.wrap{max-width:1050px}.mast{margin-bottom:18px}.layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}.appcolumn,.botcolumn{min-width:0}.botlabel{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}.botlabel small{font-size:11px}.controlbar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;background:var(--surface);border:1px solid var(--line);border-radius:14px}.viewgroup{display:flex;gap:4px;flex-wrap:wrap}.viewgroup button{border-radius:9px;padding:9px 11px;min-height:39px;background:transparent;font-size:13px;color:var(--muted)}.viewgroup .chosen{background:#2a203c;color:var(--violet);font-weight:700}.demotoggles{display:flex;flex-wrap:wrap;gap:13px;font-size:12px;color:var(--muted)}.demotoggles label{display:flex;align-items:center;gap:6px}.demotoggles input{accent-color:var(--primary);width:17px;height:17px}.introline{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:var(--muted);padding:13px 1px 17px}.chatphone{height:735px;display:flex;flex-direction:column;border:1px solid #3b3745;border-radius:25px;background:#10171f;overflow:hidden;box-shadow:0 15px 60px #0006}.chathead{display:flex;align-items:center;gap:12px;background:#17212b;padding:12px 16px;min-height:70px;color:#edf4fa}.chatback{font-size:35px;line-height:1;color:#8eb7d9}.chatavatar{width:44px;height:44px;border-radius:50%;object-fit:cover}.chatname{flex:1}.chatname b{display:block;font-size:16px}.chatname small{color:#91a4b4;font-size:12px}.chatmore{font-size:25px;color:#a9bdcb}.scenario-strip{display:flex;gap:5px;padding:8px;background:#101820;border-bottom:1px solid #263746;overflow-x:auto;flex-shrink:0}.scenario-strip button{padding:8px 9px;font-size:11px;background:#1c2935;color:#b3c1ce;border-radius:8px;white-space:nowrap;min-height:35px}.scenario-strip .selected{background:#30445a;color:#e9f3fd}.chatbody{padding:14px 13px;flex:1;min-height:0;overflow-y:auto;background:radial-gradient(ellipse at 15% 25%,#1a2631 0,transparent 57%),#0e1821;scrollbar-width:thin}.tgday{font-size:11px;color:#c0cbd5;background:#233343;border-radius:10px;padding:4px 12px;width:max-content;margin:0 auto 16px}.outbubble{background:#294762;color:#e8f2f9;padding:9px 12px;border-radius:13px 13px 3px 13px;margin:0 0 12px auto;width:max-content;font-size:14px}.outbubble small{margin-left:8px;font-size:10px;color:#b1c7d9}.bubble{background:#182734;color:#edf4fb;border-radius:14px 14px 14px 4px;padding:11px 12px 7px;max-width:100%;font-size:14px;overflow:hidden}.bubble h3{font-size:16px;margin-top:8px}.bubble p{margin:8px 0;line-height:1.45}.tgtime{text-align:right;color:#8fa7ba;font-size:10px;margin-top:8px}.tg-banner{display:flex;align-items:center;justify-content:space-between;gap:10px;background:linear-gradient(120deg,#1e1729,#111016);border:1px solid #453253;border-radius:9px;padding:15px 12px;min-height:112px;overflow:hidden}.tg-banner img{height:88px;width:88px;border-radius:13px;object-fit:cover}.banner-copy{min-width:0}.banner-kicker{color:var(--violet);font-size:10px;letter-spacing:.13em;font-weight:800}.banner-copy strong{display:block;font-size:22px;line-height:1.08;letter-spacing:-.035em;margin:8px 0}.banner-copy small{font-size:10px;color:#b8a7cd;letter-spacing:.07em}.tgmuted{color:#a7b9c8;font-size:12px}.tgstatus{display:flex;gap:7px;align-items:center;font-size:12px;margin-top:13px;color:#82dfad}.tgstatus span{width:7px;height:7px;border-radius:50%;background:currentColor}.tgstatus.off{color:#ffc47c}.tgkeys{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:5px}.tgkeys button,.tgkeys a{background:#23394a;color:#d1e8fa;padding:10px 7px;font-size:13px;font-weight:600;min-height:42px;border:0;text-align:center;border-radius:7px;text-decoration:none;display:flex;justify-content:center;align-items:center;line-height:1.3}.tgkeys .full{grid-column:1/-1}.tgkeys button:first-child,.tgkeys a:first-child{background:#294b63;color:#e1f3ff}.chatcompose{display:flex;align-items:center;gap:10px;padding:9px 12px;background:#17212b;color:#91a4b4;flex-shrink:0}.chatmenu{background:#4c8ab6;color:white;font-size:12px;font-weight:700;border-radius:20px;padding:8px 10px}.chatplaceholder{flex:1;font-size:13px}.replykeys{background:#17212b;display:flex;padding:0 10px 10px;gap:6px}.replykeys button{flex:1;background:#233442;color:#edf4fa;border-radius:6px;min-height:36px;font-size:12px}.eventcap{font-size:11px;letter-spacing:.08em;font-weight:800}.redcap{color:#ff9ba8}.violetcap{color:var(--violet)}.tgquote{padding:9px 11px;background:#203342;border-radius:6px;border-left:3px solid var(--violet);margin:10px 0}.tgquote small{font-size:11px;color:#b8c9d6}.tgquote p{margin:4px 0}.redquote{border-left-color:var(--red)}.greenquote{border-left-color:var(--green)}.tgfile{display:flex;align-items:center;gap:10px;padding:12px 0}.fileicon{display:grid;place-items:center;width:40px;height:40px;background:#31516c;border-radius:50%;color:#d7efff}.tgfile small{display:block;font-size:11px;color:#a7b9c8}.tg-limit{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #344451;font-size:13px}.app-phone{height:735px}.app-phone .content{flex:1;min-height:0;height:auto}.app-phone .top{flex-shrink:0}.appback{font-size:23px}.view-app .botcolumn,.view-bot .appcolumn{display:none}.view-app .layout,.view-bot .layout{grid-template-columns:minmax(0,480px);justify-content:center}.view-app .wrap,.view-bot .wrap{max-width:790px}.foot{margin-top:16px}.chatphone,.app-phone{height: min(780px,max(640px,calc(100dvh - 205px)))}
@media(max-width:800px){.wrap{max-width:510px;padding:12px}.layout{grid-template-columns:1fr}.controlbar{padding:8px;gap:6px}.viewgroup{width:100%}.viewgroup button{flex:1;font-size:12px;padding:8px 4px}.demotoggles{gap:8px;font-size:11px}.introline{padding:10px 0;display:block}.introline span+span{display:none}.chatphone,.app-phone{height:max(520px,calc(100dvh - 217px));border-radius:18px}.chatbody{padding:11px 9px}.banner-copy strong{font-size:20px}.tg-banner img{width:74px;height:74px}.tgkeys button,.tgkeys a{font-size:12px}.botlabel{margin-bottom:6px}.view-both .appcolumn{margin-top:8px}.mast .tag{display:none}}

/* Keep all quick actions visible in the design preview. */
.chatphone{height:max(805px, min(840px, calc(100dvh - 170px)))}.app-phone{height:max(805px, min(840px, calc(100dvh - 170px)))}@media(max-width:800px){.chatphone{height:790px}.app-phone{height:max(540px,calc(100dvh - 217px))}.tgday{margin-bottom:10px}.chatbody{padding-top:9px}.tg-banner{min-height:100px;padding:10px}.outbubble{margin-bottom:8px}.bubble p{margin:6px 0}.tgstatus{margin-top:9px}}

/* V1.3: text bot only; approved Mini App unchanged. */
.chatphone .bubble,.chatphone .tgkeys{width:min(100%,360px);max-width:100%}
.chatphone .bubble{padding:10px 12px 6px;border-radius:12px 12px 12px 3px;background:#182734;font-size:14px}
.chatphone .bubble h3{font-size:16px;margin:0 0 7px;line-height:1.35;font-weight:700;letter-spacing:0}
.chatphone .bubble p{margin:5px 0;line-height:1.45}
.chatphone .native-status{margin-top:13px;font-size:13px}
.chatphone .native-status p{margin:4px 0}.chatphone .good{color:#82dfad}.chatphone .attention{color:#ffc47c}
.chatphone .tgkeys{gap:4px;margin-top:4px}.chatphone .tgkeys button,.chatphone .tgkeys a{background:#233747;color:#d8e9f7;font-size:13px;font-weight:500;border-radius:6px;min-height:40px;padding:9px 6px}
.chatphone .tgkeys button:first-child,.chatphone .tgkeys a:first-child{background:#294459;color:#e1f3ff}
.chatphone .tgkeys button:hover,.chatphone .tgkeys a:hover{background:#354f63}
.chatphone .tgquote{margin:8px 0;padding:7px 9px}.chatphone .tgtime{margin-top:5px}
.chatphone .chatbody{background:#0e1821;padding:12px 12px;}
.chatphone{height: max(615px,min(805px,calc(100dvh - 180px)))}
@media(max-width:800px){.chatphone{height:640px}.chatphone .chatbody{padding:10px 9px}.chatphone .tgkeys button,.chatphone .tgkeys a{font-size:12px}}

/* V1.4 — compact Mini App-inspired media card, text bot only. */
.chatphone .bot-brand-card{position:relative;overflow:hidden;background:linear-gradient(115deg,#271c38,#191621 88%);border:1px solid #49365d;border-radius:11px;padding:13px 14px 12px;margin:0 0 10px;color:#f5f3fa;isolation:isolate}
.chatphone .bot-brand-card:after{content:'';position:absolute;width:168px;height:168px;border:1px solid #bb8cff20;border-radius:50%;right:-69px;top:-93px;box-shadow:0 0 0 19px #bb8cff08,0 0 0 39px #bb8cff05;z-index:-1}
.chatphone .bot-brand-top{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.chatphone .bot-brand-mark{width:55px;height:55px;object-fit:contain;flex-shrink:0;border:0;border-radius:0;background:transparent;mix-blend-mode:screen;clip-path:polygon(7% 59%,16% 33%,41% 12%,62% 13%,88% 28%,96% 48%,85% 66%,61% 88%,34% 88%,6% 64%)}
.chatphone .bot-brand-word{font-size:16px;font-weight:850;letter-spacing:.045em;line-height:1.15}
.chatphone .bot-brand-kicker{color:#bb8cff;font-size:9px;font-weight:750;letter-spacing:.12em;margin-top:3px}
.chatphone .bot-brand-title{font-size:21px;line-height:1.15;font-weight:760;letter-spacing:-.035em;margin:0 0 5px}
.chatphone .bot-brand-sub{font-size:11.5px;color:#c4b8d3;line-height:1.4}
.chatphone .bot-brand-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid #49365d;margin-top:12px;padding-top:9px;font-size:11px;color:#d7c4f2}
.chatphone .bot-brand-foot strong{color:#bb8cff;font-size:11px;font-weight:700}
.chatphone .native-status{margin-top:5px;font-size:13px}
.chatphone .brand-caption{padding:0 1px}.chatphone .brand-caption .native-status p{margin:4px 0}
@media(max-width:380px){.chatphone .bot-brand-title{font-size:19px}.chatphone .bot-brand-card{padding:11px}.chatphone .bot-brand-foot{font-size:10px}}

/* V1.6: same logo treatment as the approved text-bot card. */
.mast .brand,.app-phone .brand{object-fit:contain;border:0;border-radius:0;background:transparent;mix-blend-mode:screen;clip-path:polygon(7% 59%,16% 33%,41% 12%,62% 13%,88% 28%,96% 48%,85% 66%,61% 88%,34% 88%,6% 64%)}

/* Live standalone layout */
body{background:var(--bg)}.app-shell{width:min(100%,600px);height:100dvh;display:flex;flex-direction:column;margin:auto;background:#101015}.app-shell .content{height:auto;min-height:0;max-height:none;flex:1;overflow:auto}.app-shell .top{flex-shrink:0}.app-shell .nav{position:static;padding-bottom:max(8px,env(safe-area-inset-bottom));flex-shrink:0}.app-shell .brand{mix-blend-mode:screen;object-fit:contain;background:transparent;border:0}.app-shell .content .brand{border-radius:0}.app-shell .nav button{min-height:55px}.app-shell select{background:var(--raised);color:var(--ink);border:1px solid var(--line);border-radius:10px;padding:10px;max-width:100%}.app-shell .listrow{overflow-wrap:anywhere}.app-shell .listrow b{display:block}.app-shell .message-body{white-space:pre-wrap;overflow-wrap:anywhere}.app-shell .bar span{width:0}.app-shell progress{width:100%;height:8px;accent-color:var(--primary)}.app-shell .hero .brand{width:58px;height:58px}.app-shell button:disabled{opacity:.5;cursor:default}.app-shell .tile{font-size:20px}.app-shell .loading{padding:30px;text-align:center;color:var(--muted)}.app-shell .nav svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8}
.app-shell [hidden]{display:none!important}
.manage-row{display:grid;gap:4px;padding-bottom:8px}.small-action{align-self:start;justify-self:start;background:#21192e;color:#bb8cff;border:1px solid #49365d;border-radius:9px;padding:8px 12px;font:inherit;cursor:pointer}.card>.secondary{margin-top:8px}.card>.primary{margin-top:8px}

.media-preview{display:block;max-width:100%;width:100%;max-height:55vh;object-fit:contain;border-radius:12px;margin-top:12px;}
