/* ===== form control reset (Android/Chrome konsisten) ===== */
button,input,select,textarea{
  -webkit-appearance:none;appearance:none;font:inherit;color:inherit;
  background-image:none;border-radius:12px;box-shadow:none;
  -webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;
}
button{cursor:pointer;border:0;background-color:transparent}
input,textarea{background-color:transparent}
/* v10: tidak ada lagi kotak outline (biru di Chrome Android / merah di desktop)
   saat tombol diklik/disentuh. Fokus tetap terasa lewat perubahan background
   di :hover/:active masing-masing tombol, bukan lewat kotak outline. */
button:focus,button:focus-visible,button:active,
a:focus,a:focus-visible,a:active,
.profile:focus,.profile:focus-visible,.profile:active,
.conv:focus,.card:focus{outline:none;box-shadow:none;-webkit-tap-highlight-color:transparent}
input:focus-visible,textarea:focus-visible{outline:none}
/* ============ LiliAI — Luxury dark/red design system ============ */
@font-face{font-family:'Inter';src:url('/static/fonts/inter-400.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:'Playfair';src:url('/static/fonts/playfair-700.woff2') format('woff2');font-weight:700;font-display:swap}
@font-face{font-family:'JBMono';src:url('/static/fonts/jetbrains-500.woff2') format('woff2');font-weight:500;font-display:swap}

:root{
  --ink:#070406; --ink-2:#0c0709; --plate:#120a0e;
  --line:rgba(232,189,143,.13); --line-hot:rgba(255,61,85,.32);
  --red:#ff3d55; --red-deep:#a10b21; --gold:#e8bd8f; --gold-dim:rgba(232,189,143,.62);
  --txt:#f6eef0; --txt-2:#cbb9bf; --muted:#b3a0a7;
  --card:linear-gradient(160deg,rgba(28,15,20,.92),rgba(12,7,9,.94));
  --shadow-lg:0 40px 120px rgba(0,0,0,.7), 0 2px 0 rgba(255,255,255,.03) inset;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;color:var(--txt);font:15px/1.62 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  background:#0e0e10;
  -webkit-font-smoothing:antialiased;letter-spacing:.01em;
}
body:before{content:none}
a{color:var(--gold);text-decoration:none;transition:.18s}
a:hover{color:#fff2e6}
::selection{background:rgba(255,61,85,.34)}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:linear-gradient(#3a1a23,#240f16);border-radius:99px;border:2px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-thumb:hover{background:#5a2230}
::-webkit-scrollbar-track{background:transparent}

.app{position:relative;z-index:1;display:grid;grid-template-columns:296px 1fr;height:100vh}

/* sidebar */
.side{background:#151517;border-right:1px solid #26262a;
  display:flex;flex-direction:column;min-height:0}
.brand{display:flex;align-items:center;gap:12px;padding:18px 18px 14px}
.brand img{width:32px;height:32px}
.brand h1{font-size:18px;margin:0;color:#fff}
.brand small{display:block;color:var(--gold-dim);font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;margin-top:-2px}
.newchat{margin:6px 14px 12px;padding:12px 14px;border-radius:14px;cursor:pointer;font-size:13.5px;font-weight:600;
  color:#ffe9ec;background:linear-gradient(140deg,rgba(255,61,85,.20),rgba(161,11,33,.16));
  border:1px solid var(--line-hot);letter-spacing:.02em;display:flex;align-items:center;gap:9px;transition:.18s}
.newchat:hover{transform:translateY(-1px);border-color:rgba(255,61,85,.55);box-shadow:0 12px 30px rgba(255,61,85,.22)}
.sec-label{padding:8px 20px 4px;font-size:10px;letter-spacing:.18em;text-transform:uppercase;color:#7a656d}
.convs{overflow-y:auto;flex:1;padding:2px 10px 10px;min-height:0}
.conv{padding:10px 11px;border-radius:12px;color:var(--txt-2);cursor:pointer;font-size:13px;
  display:flex;align-items:center;gap:8px;border:1px solid transparent;transition:.15s}
.conv .t{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.conv:hover{background:rgba(255,255,255,.035);border-color:var(--line);color:#fff}
.conv.active{background:linear-gradient(100deg,rgba(255,61,85,.16),rgba(255,61,85,.04));border-color:var(--line-hot);color:#fff}
.conv .del{opacity:0;font-size:11px;color:var(--muted);padding:2px 4px;border-radius:6px}
.conv:hover .del{opacity:.8}
.conv .del:hover{color:#ff8b97;background:rgba(255,61,85,.14)}
.sidefoot{border-top:1px solid var(--line);padding:13px 14px 15px;background:linear-gradient(0deg,rgba(0,0,0,.3),transparent)}
.who{display:flex;align-items:center;gap:10px}
.ava{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;font-size:13px;font-weight:700;
  background:linear-gradient(145deg,rgba(255,61,85,.28),rgba(161,11,33,.22));color:#ffd9dd;border:1px solid var(--line-hot)}
.who .meta{min-width:0;flex:1}
.who .meta b{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.who .meta span{font-size:11px;color:var(--muted);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pill{font-size:10.5px;padding:4px 9px;border-radius:999px;background:rgba(255,255,255,.04);
  border:1px solid var(--line);color:var(--gold);white-space:nowrap;font-variant-numeric:tabular-nums}
.pill.low{color:#ffd166;border-color:rgba(255,209,102,.35)}
.pill.out{color:#ff8b97;border-color:rgba(255,61,85,.45);background:rgba(255,61,85,.10)}
.sidebtns{display:flex;gap:14px;margin-top:9px;align-items:center}
.linkbtn{background:none;border:0;color:#a08b93;font-size:12px;cursor:pointer;padding:4px 0;letter-spacing:.02em}
.linkbtn:hover{color:var(--red)}
.linkbtn.acc{color:var(--gold)}

/* main */
.main{display:flex;flex-direction:column;min-height:0;min-width:0}
.top{height:56px;display:flex;align-items:center;gap:12px;padding:0 18px;border-bottom:1px solid #26262a;
  background:#121214;z-index:5}
.top .title{font-size:15px}
.top .sub{font-size:11px;color:var(--muted);letter-spacing:.1em;text-transform:uppercase;margin-left:auto}
.badge-model{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--gold-dim);
  border:1px solid var(--line);border-radius:999px;padding:5px 11px;background:rgba(232,189,143,.05)}
.badge-model i{width:6px;height:6px;border-radius:50%;background:#3ddc84;box-shadow:0 0 8px #3ddc84;font-style:normal}
.stream{flex:1;overflow-y:auto;padding:30px 22px 6px;min-height:0;scroll-behavior:smooth}
.wrap{max-width:820px;margin:0 auto}

/* hero */
.hero{max-width:520px;margin:14vh auto 0;text-align:center}
.hero .mark{width:48px;height:48px;margin:0 auto 12px}
.hero .eyebrow{display:inline-flex;align-items:center;gap:8px;padding:6px 14px;border:1px solid var(--line);
  border-radius:999px;color:var(--gold-dim);font-size:11px;letter-spacing:.14em;text-transform:uppercase;
  background:rgba(232,189,143,.045);margin-bottom:20px}
.hero h2{font-size:24px;line-height:1.2;margin:0 0 8px;color:#fff}
.hero p{color:var(--muted);margin:0 auto;font-size:14px}
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;text-align:left}
.card{position:relative;border:1px solid var(--line);border-radius:16px;padding:15px 15px 16px;
  background:var(--card);cursor:pointer;transition:.2s;overflow:hidden}
.card:before{content:"";position:absolute;inset:0;background:radial-gradient(240px 90px at 10% 0%,rgba(255,61,85,.16),transparent 70%);
  opacity:0;transition:.25s}
.card:hover{transform:translateY(-2px);border-color:var(--line-hot);box-shadow:0 18px 40px rgba(0,0,0,.5)}
.card:hover:before{opacity:1}
.card .ic{font-size:16px;margin-bottom:8px;opacity:.9}
.card b{display:block;font-size:13.5px;margin-bottom:4px}
.card span{font-size:12px;color:var(--muted);line-height:1.5}

/* messages */
.msg{display:flex;gap:14px;margin:0 0 30px;animation:rise .3s ease both}
@keyframes rise{from{opacity:0;transform:translateY(6px)}}
.msg .av{width:36px;height:36px;flex:0 0 36px;border-radius:12px;display:grid;place-items:center;font-size:12.5px;font-weight:700}
.msg.user .av{background:linear-gradient(145deg,#2a1720,#1a0f14);color:#ffc9d0;border:1px solid var(--line)}
.msg.bot .av{background:linear-gradient(145deg,rgba(255,61,85,.26),rgba(122,4,20,.34));border:1px solid var(--line-hot);color:#fff}
.msg .body{min-width:0;flex:1}
.msg .name{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:#826d75;margin:0 0 6px}
.msg.user .bubble{display:inline-block;padding:11px 15px;border-radius:14px 14px 14px 4px;
  background:#1f1f23;
  border:1px solid #2a2a2e;white-space:pre-wrap;word-break:break-word}
.msg.bot .bubble{padding:2px;color:#ececef;word-break:break-word}
.attachments{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.att{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:rgba(255,255,255,.03);max-width:230px}
.att img{display:block;max-width:230px;max-height:180px;object-fit:cover}
.att .fname{font-size:11.5px;padding:7px 10px;color:var(--gold-dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cursor:after{content:"";display:inline-block;width:7px;height:15px;margin-left:3px;vertical-align:-2px;
  background:var(--red);animation:blink 1s steps(2) infinite}
@keyframes blink{50%{opacity:0}}
.typing{display:inline-flex;gap:5px;padding:8px 0}
.typing i{width:6px;height:6px;border-radius:50%;background:var(--red);opacity:.35;animation:tp 1.1s infinite}
.typing i:nth-child(2){animation-delay:.16s}.typing i:nth-child(3){animation-delay:.32s}
@keyframes tp{40%{opacity:1;transform:translateY(-3px)}}

/* markdown */
.md{font-size:15px;line-height:1.7}
.md>*:first-child{margin-top:0}.md>*:last-child{margin-bottom:0}
.md h1,.md h2,.md h3,.md h4{line-height:1.3;margin:18px 0 8px}
.md h1{font-size:24px}.md h2{font-size:20px}.md h3{font-size:17px}
.md h4{font-size:15px;letter-spacing:.05em;text-transform:uppercase;color:var(--gold)}
.md p{margin:10px 0}
.md ul,.md ol{margin:10px 0 10px 4px;padding-left:20px}
.md li{margin:4px 0}
.md li::marker{color:var(--red)}
.md a{color:var(--gold);border-bottom:1px dotted rgba(232,189,143,.4)}
.md strong{color:#fff;font-weight:650}
.md hr{border:0;height:1px;background:linear-gradient(90deg,var(--line-hot),transparent);margin:22px 0}
.md blockquote{margin:14px 0;padding:10px 16px;border-left:2px solid var(--gold);background:rgba(232,189,143,.05);
  border-radius:0 10px 10px 0;color:#e6d5d0;font-style:italic}
.md code{font-family:JBMono,ui-monospace,monospace;font-size:13px;background:rgba(255,61,85,.10);
  border:1px solid rgba(255,61,85,.16);color:#ffd6dc;padding:2px 6px;border-radius:6px}
.md table{width:100%;border-collapse:separate;border-spacing:0;margin:16px 0;font-size:13.5px;
  border:1px solid var(--line);border-radius:12px;overflow:hidden}
.md th{background:rgba(255,61,85,.10);color:#ffd9dd;text-align:left;font-weight:600;font-size:12px;
  letter-spacing:.06em;text-transform:uppercase;padding:9px 12px;border-bottom:1px solid var(--line)}
.md td{padding:10px 13px;border-bottom:1px solid rgba(255,255,255,.06);color:#e9dde1}
.md tr:last-child td{border-bottom:0}
.md tr:hover td{background:rgba(255,255,255,.025)}
.md img{max-width:100%;border-radius:12px;border:1px solid var(--line);margin:10px 0;display:block}
.codecard{margin:14px 0;border:1px solid var(--line);border-radius:13px;overflow:hidden;background:#0d1119}
.codebar{display:flex;align-items:center;justify-content:space-between;padding:7px 12px;
  background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.01));border-bottom:1px solid var(--line)}
.codebar span{font-family:JBMono,monospace;font-size:11px;color:var(--gold-dim);letter-spacing:.08em;text-transform:uppercase}
.codebar button{background:rgba(255,255,255,.05);border:1px solid var(--line);color:#cfbcc2;font-size:11px;
  padding:3px 9px;border-radius:7px;cursor:pointer;transition:.15s}
.codebar button:hover{color:#fff;border-color:var(--line-hot);background:rgba(255,61,85,.16)}
.codecard pre{margin:0;padding:14px 16px;overflow:auto;font-family:JBMono,ui-monospace,monospace;font-size:12.8px;line-height:1.65}
.codecard pre code{background:none;border:0;padding:0;font-size:inherit;color:#cfd8e3}

/* composer */
.composer{padding:12px 22px 20px;background:linear-gradient(0deg,rgba(7,4,6,.96) 62%,transparent)}
.cwrap{max-width:820px;margin:0 auto;border:1px solid var(--line);border-radius:20px;
  background:linear-gradient(165deg,rgba(24,13,18,.96),rgba(12,7,9,.97));
  box-shadow:var(--shadow-lg);padding:10px 10px 10px 16px;transition:.2s}
.cwrap:focus-within{border-color:rgba(255,61,85,.42);box-shadow:0 0 0 4px rgba(255,61,85,.08),var(--shadow-lg)}
.crow{display:flex;align-items:flex-end;gap:10px}
textarea#inp{flex:1;resize:none;border:0;outline:none;background:transparent;color:var(--txt);
  min-height:26px;max-height:190px;padding:7px 0;font-size:15px;font-family:inherit}
textarea#inp::placeholder{color:#7d686f}
.iconbtn{width:38px;height:38px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.04);
  color:#d6c4ca;cursor:pointer;display:grid;place-items:center;transition:.16s;font-size:15px}
.iconbtn:hover{color:#fff;border-color:var(--line-hot);background:rgba(255,61,85,.14)}
.send{width:40px;height:40px;border-radius:13px;border:0;cursor:pointer;display:grid;place-items:center;font-size:16px;
  color:#fff;background:linear-gradient(145deg,#ff4762,#9d0a1f);box-shadow:0 10px 26px rgba(255,61,85,.30);transition:.18s}
.send:hover{transform:translateY(-1px);box-shadow:0 14px 32px rgba(255,61,85,.42)}
.send:disabled{opacity:.4;cursor:not-allowed;transform:none;box-shadow:none}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.chip{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:10px;padding:5px 8px;
  font-size:11.5px;color:var(--txt-2);background:rgba(255,255,255,.04);max-width:240px}
.chip img{width:26px;height:26px;border-radius:6px;object-fit:cover}
.chip .x{cursor:pointer;color:var(--muted)}
.chip .x:hover{color:var(--red)}
.hint{max-width:820px;margin:9px auto 0;font-size:11px;color:#8c757d;text-align:center}

/* modal */
.mask{position:fixed;inset:0;background:rgba(4,2,3,.82);backdrop-filter:blur(10px);display:none;place-items:center;z-index:60}
.mask.on{display:grid}
.modal{width:min(420px,94vw);border-radius:22px;padding:26px;border:1px solid var(--line);
  background:linear-gradient(170deg,rgba(26,14,19,.99),rgba(9,5,7,.99));box-shadow:0 50px 140px rgba(0,0,0,.8)}
.modal .mhead{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.modal .mhead img{width:40px;height:40px}
.modal h3{font-family:Playfair,Georgia,serif;margin:0;font-size:21px}
.modal p.s{color:var(--muted);font-size:12.5px;margin:2px 0 0}
.field{margin-bottom:12px}
.field label{display:block;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:#9c858d;margin-bottom:6px}
.field input{width:100%;padding:12px 13px;border-radius:12px;border:1px solid var(--line);background:rgba(0,0,0,.35);
  color:var(--txt);outline:none;font-size:14px;transition:.16s}
.field input:focus{border-color:rgba(255,61,85,.5);box-shadow:0 0 0 3px rgba(255,61,85,.1)}
.btn{width:100%;padding:12px;border-radius:12px;border:0;cursor:pointer;font-weight:650;font-size:14px;
  color:#fff;background:linear-gradient(145deg,#ff4762,#9d0a1f);box-shadow:0 12px 30px rgba(255,61,85,.28);margin-top:6px;transition:.18s}
.btn:hover{transform:translateY(-1px)}
.btn.ghost{background:rgba(255,255,255,.04);border:1px solid var(--line);color:#e2d0d5;box-shadow:none}
.tabs{display:flex;gap:4px;margin-bottom:16px;background:rgba(0,0,0,.35);padding:4px;border-radius:12px;border:1px solid var(--line)}
.tabs button{flex:1;padding:9px;border:0;border-radius:9px;background:transparent;color:#9c858d;cursor:pointer;font-size:13px;transition:.15s}
.tabs button.on{background:linear-gradient(140deg,rgba(255,61,85,.22),rgba(161,11,33,.16));color:#ffe4e8}
.err{color:#ff8b97;font-size:12px;min-height:16px;margin-top:9px}
.bene{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}
.bene div{border:1px solid var(--line);border-radius:11px;padding:8px 6px;text-align:center;font-size:10.5px;color:var(--muted)}
.bene b{display:block;color:var(--gold);font-size:13px;font-family:Playfair,serif}

.burger{display:none;width:36px;height:36px;border-radius:11px;border:1px solid var(--line);background:rgba(255,255,255,.04);
  color:#e2d0d5;place-items:center;cursor:pointer;font-size:15px}
.toast{position:fixed;bottom:22px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;
  background:linear-gradient(150deg,rgba(30,16,21,.98),rgba(12,7,9,.98));border:1px solid var(--line-hot);
  color:#ffe4e8;padding:11px 18px;border-radius:14px;font-size:13px;transition:.22s;z-index:80;box-shadow:0 20px 60px rgba(0,0,0,.6)}
.toast.on{opacity:1;transform:translate(-50%,0)}

@media (max-width:900px){
  .app{grid-template-columns:1fr}
  .side{position:fixed;inset:0 auto 0 0;width:286px;transform:translateX(-102%);transition:transform .24s ease;z-index:50}
  .side.open{transform:none;box-shadow:40px 0 90px rgba(0,0,0,.7)}
  .burger{display:grid}
  .cards{grid-template-columns:1fr}
  .hero h2{font-size:33px}
  .stream{padding:22px 14px 4px}
  .composer{padding:10px 14px 16px}
  .top{padding:0 14px;height:58px}
  .top .sub{display:none}
}

/* sidebar scrim + close */
.scrim{position:fixed;inset:0;background:rgba(4,2,3,.62);backdrop-filter:blur(3px);opacity:0;pointer-events:none;transition:.2s;z-index:45}
.scrim.on{opacity:1;pointer-events:auto}
.xclose{margin-left:auto;width:30px;height:30px;border-radius:9px;border:1px solid var(--line);
  background:rgba(255,255,255,.04);color:#cbb9bf;cursor:pointer;display:none;place-items:center;font-size:12px}
.xclose:hover{color:#fff;border-color:var(--line-hot)}
@media (max-width:900px){.xclose{display:grid}}

/* chat fullscreen — tidak ada scroll di luar area pesan */
html,body{height:100%;overflow:hidden;overscroll-behavior:none}
.app{height:100dvh;max-height:100dvh;overflow:hidden}
.main{height:100dvh;min-height:0;overflow:hidden}
.stream{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.composer{flex:0 0 auto}
.side{height:100dvh;max-height:100dvh;overflow:hidden}
.convs{min-height:0;overflow-y:auto;overscroll-behavior:contain}
@supports (height: 100svh){ .app,.main,.side{height:100svh;max-height:100svh} }
@media (max-width:900px){ body{position:fixed;inset:0;width:100%} }

/* tabel & kode: isi boleh panjang, tampilan tidak melebar */
.md{overflow-wrap:anywhere}
.md table{table-layout:fixed;width:100%;max-width:100%;border-collapse:separate}
.md th,.md td{white-space:normal;word-break:break-word;overflow-wrap:anywhere;vertical-align:top;padding:9px 12px}
.md .tablewrap{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
.md pre{max-width:100%;overflow-x:auto}
.md code{white-space:pre-wrap;word-break:break-word}
.md img{max-width:100%;height:auto}

/* ===== polish v2: pesan, lampiran, kode ===== */
.msg{display:flex;gap:13px;margin:0 0 22px}
.msg .av{width:32px;height:32px;flex:0 0 32px;border-radius:10px;display:grid;place-items:center;
  font-size:12px;font-weight:700;letter-spacing:.02em;box-shadow:0 4px 14px rgba(0,0,0,.35)}
.msg.user .av{background:linear-gradient(145deg,#2b1a22,#180e13);color:#ffc9d0;border:1px solid rgba(255,255,255,.08)}
.msg.bot .av{background:linear-gradient(145deg,#ff4762,#8c0718);color:#fff;border:1px solid rgba(255,255,255,.14)}
.msg .name{display:flex;align-items:center;gap:8px;font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;
  color:#8d777f;margin:0 0 7px;font-weight:600}
.msg .name .dot{width:5px;height:5px;border-radius:50%;background:#3ddc84;box-shadow:0 0 6px rgba(61,220,132,.7)}
.msg.user .bubble{background:linear-gradient(150deg,rgba(255,255,255,.065),rgba(255,255,255,.025));
  border:1px solid rgba(255,255,255,.09);border-radius:16px 16px 6px 16px;padding:12px 16px;
  box-shadow:0 8px 24px rgba(0,0,0,.25);font-size:14.5px;line-height:1.65}
.msg.bot .bubble{border-left:2px solid rgba(255,61,85,.5);padding:2px 4px 2px 15px}

/* kartu lampiran */
.attachments{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.att{display:flex;align-items:center;gap:11px;border:1px solid rgba(255,255,255,.10);border-radius:13px;
  background:linear-gradient(160deg,rgba(30,16,21,.85),rgba(14,9,12,.9));padding:10px 12px;min-width:210px;
  max-width:300px;transition:.18s;text-decoration:none}
.att:hover{border-color:rgba(255,61,85,.45);transform:translateY(-1px);box-shadow:0 10px 26px rgba(0,0,0,.35)}
.att .thumb{width:38px;height:38px;border-radius:9px;display:grid;place-items:center;font-size:16px;
  background:rgba(255,61,85,.12);border:1px solid rgba(255,61,85,.22);flex:0 0 38px}
.att img.thumb{object-fit:cover;width:38px;height:38px;border-radius:9px}
.att .meta{min-width:0}
.att .meta b{display:block;font-size:12.8px;color:#f4e9ec;font-weight:600;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis;max-width:190px}
.att .meta span{font-size:11px;color:#9c868e;letter-spacing:.02em}
.att .icodl{margin-left:auto;color:#c9b6bd;font-size:14px}

/* blok kode */
.codecard{border-radius:12px;border:1px solid rgba(255,255,255,.09);box-shadow:0 10px 28px rgba(0,0,0,.3)}
.codebar{padding:8px 12px}
.codebar span{font-size:10.5px;letter-spacing:.12em}
.codebar button{font-size:10.5px;padding:4px 10px;border-radius:7px}
.codecard pre{padding:14px 16px}

/* composer lebih rapi */
.cwrap{border-radius:18px;padding:12px 12px 12px 16px}
textarea#inp{font-size:15px}
.send{width:38px;height:38px;border-radius:11px}
.hint{font-size:11px;color:#8a747c}

/* hero dalam chat */
.hero h2{font-size:34px}
.hero .mark{width:78px;height:78px}
.hero p{font-size:14px}

/* profil tunggal + menu
   v9: menu jadi popup ke ATAS profil, bukan mendorong ke bawah.
   Sebelumnya menu ada di paling bawah sidebar (height 100dvh, overflow:hidden),
   jadi saat dibuka menu kepotong di bawah layar dan terlihat seperti tombol rusak. */
.sidefoot{padding:10px 12px 12px;position:relative}
.profile{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:13px;cursor:pointer;
  border:1px solid transparent;transition:.16s;user-select:none;touch-action:manipulation}
.profile:hover{background:rgba(255,255,255,.045);border-color:rgba(255,255,255,.08)}
.profile.open{background:rgba(255,255,255,.05);border-color:rgba(255,61,85,.30)}
.profile .ava{width:32px;height:32px;flex:0 0 32px;border-radius:10px;display:grid;place-items:center;
  font-size:12.5px;font-weight:700;background:linear-gradient(145deg,rgba(255,61,85,.3),rgba(161,11,33,.24));
  color:#ffd9dd;border:1px solid rgba(255,61,85,.28)}
.profile .pmeta{min-width:0;flex:1}
.profile .pmeta b{display:block;font-size:12.8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile .pmeta span{display:block;font-size:10.5px;color:#9c868e;letter-spacing:.06em;text-transform:uppercase;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile .chev{color:#8c757d;font-size:11px;transition:.2s}
.profile.open .chev{transform:rotate(180deg)}
.pmenu{display:none;position:absolute;left:12px;right:12px;bottom:calc(100% - 4px);z-index:60;
  max-height:min(320px,60dvh);overflow-y:auto;padding:6px;border-radius:12px;border:1px solid rgba(255,255,255,.08);
  background:linear-gradient(170deg,#160d12,#0c0809);box-shadow:0 18px 40px rgba(0,0,0,.5)}
.pmenu.on{display:block}
/* tombol: samakan perilaku sentuh di Android, iOS, dan desktop.
   touch-action:manipulation menghilangkan delay double-tap-zoom di Android Chrome
   yang membuat tombol terasa tidak merespons, tanpa menambah handler touch ganda. */
button,.newchat,.send,.iconbtn,.burger,.xclose,.profile,.pmenu a,.pmenu button,
.conv,.card,a{
  touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.pmenu a,.pmenu button{display:flex;align-items:center;gap:9px;width:100%;text-align:left;padding:9px 10px;
  border-radius:9px;font-size:12.8px;color:#d9cdd2;background:transparent;border:0;cursor:pointer}
.pmenu a:hover,.pmenu button:hover{background:rgba(255,61,85,.12);color:#fff}
.pmenu span{width:16px;color:#c39a6a;font-size:12px}

/* Kotak penalaran (thinking) ala bot Hermes */
.thinking{margin:0 0 12px;border:1px solid rgba(232,189,143,.25);border-radius:12px;background:rgba(232,189,143,.06);padding:8px 12px}
.thinking summary{cursor:pointer;font-size:13px;color:#e8bd8f;list-style:none}
.thinking summary::-webkit-details-marker{display:none}
.thinking-body{white-space:pre-wrap;font-size:13px;line-height:1.6;color:#c9b8bd;margin-top:8px;max-height:320px;overflow-y:auto}

/* Mode Agen aktif */
#agentBtn.active{border-color:rgba(232,189,143,.7);background:rgba(232,189,143,.15);color:#e8bd8f}

/* v15: halaman chat disederhanakan (permintaan user 2026-10-29) —
   override terakhir supaya menang atas aturan desain lama di atas. */
body{background:#0e0e10 !important}
.side{background:#151517 !important;box-shadow:none !important}
.hero h2{font-size:24px !important}
.hero .mark{width:48px !important;height:48px !important}
.hero .cards{display:none !important}
.msg.user .bubble{background:#1f1f23 !important;border:1px solid #2a2a2e !important;box-shadow:none !important}
.msg.bot .bubble{border-left:0 !important;padding:2px !important}
.att{background:#1a1a1e !important;box-shadow:none !important}
.att:hover{transform:none !important;box-shadow:none !important}

/* v16: tabel markdown — lebar mengikuti isi teks, tidak dilipat ke bawah.
   Layar/chat tetap lebarnya (wrap 820px), tabel yang lebar digeser kiri-kanan
   di dalam .tablewrap, bukan memaksa halaman melebar. */
.md .tablewrap{display:block;overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
.md table{table-layout:auto !important;width:max-content !important;min-width:100% !important;max-width:none !important}
.md th,.md td{white-space:nowrap !important;word-break:normal !important}
.hero .eyebrow{display:inline-block;padding:5px 12px;border:1px solid #2a2a2e;border-radius:999px;color:#e8bd8f;font-size:11px;letter-spacing:.14em;text-transform:uppercase;margin-bottom:14px}
.hero-examples{color:#8a8a90 !important;font-size:12.5px !important;margin-top:12px !important}

/* v17: composer pin bawah + pesan AI rata kiri + followup checklist */
/* Composer menempel di bawah, tidak ikut naik: tinggi textarea dibatasi,
   setelah itu scroll di dalam textarea, tombol tetap di baris pertama. */
.composer{position:sticky;bottom:0;z-index:10;background:#0e0e10 !important}
.crow{align-items:flex-start !important}
textarea#inp{max-height:140px !important;overflow-y:hidden}
/* Pesan AI dari ujung kiri: tanpa avatar, tanpa padding kiri, wrap rata kiri */
.stream{padding-left:16px !important}
.wrap{margin:0 !important;max-width:960px !important}
.msg.bot .av{display:none !important}
.msg.bot .bubble{padding:0 !important}
.msg.bot .name{margin-left:0 !important}
.msg.bot .body{margin-left:0 !important}
/* Checklist pertanyaan lanjutan */
.followups{margin:14px 0 0;border:1px solid #2a2a2e;border-radius:12px;padding:12px}
.fu-title{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:#e8bd8f;margin-bottom:8px}
.fu-item{display:flex;gap:9px;align-items:flex-start;padding:6px 0;cursor:pointer;font-size:14px;color:#ececef}
.fu-item input{width:16px;height:16px;flex:0 0 16px;margin-top:2px;accent-color:#e8bd8f;appearance:auto !important;-webkit-appearance:auto !important}
.fu-send{margin-top:10px;padding:9px 14px;border-radius:10px;background:#e8bd8f;color:#111;font-weight:650;cursor:pointer;border:0}
.fu-send:hover{filter:brightness(1.1)}
/* Thinking body sekarang markdown, bukan teks mentah */
.thinking-body{white-space:normal !important}
.thinking-body p{margin:6px 0}

/* v18: pesan user kanan, logo AI tetap di atas chat, load-failed guard CSS */
/* Logo AI di top bar: selalu terlihat di atas chat, juga saat sidebar tertutup di HP */
.top{position:sticky;top:0;z-index:20}
.top-logo{width:28px;height:28px;flex:0 0 28px}
/* Pesan user di kanan (seperti Telegram/WhatsApp), pesan AI tetap di kiri */
.msg.user .body{text-align:right !important}
.msg.user .bubble{text-align:left !important}
.msg.user .name{text-align:right !important}
.msg.user .attachments{justify-content:flex-end !important}
.msg.user{flex-direction:row-reverse}
.msg.user .av{margin-left:0}

/* v19: sambutan baru + logo AI di header atas jawaban (bukan avatar kiri) */
.hero .mark{width:36px !important;height:36px !important}
.bot-logo{width:18px;height:18px;flex:0 0 18px}
.msg.bot .name{display:flex !important;align-items:center !important;gap:8px !important}
