:root{--radius: .625rem;--background: oklch(.985 0 0);--foreground: oklch(.12 0 0);--card: oklch(1 0 0);--card-foreground: oklch(.12 0 0);--popover: oklch(1 0 0);--popover-foreground: oklch(.12 0 0);--primary: oklch(.12 0 0);--primary-foreground: oklch(.985 0 0);--secondary: oklch(.965 0 0);--secondary-foreground: oklch(.38 0 0);--muted: oklch(.94 0 0);--muted-foreground: oklch(.58 0 0);--accent: oklch(.965 0 0);--accent-foreground: oklch(.12 0 0);--destructive: oklch(.55 .15 25);--border: oklch(.9 0 0);--input: oklch(.9 0 0);--ring: oklch(.5 0 0);--sidebar: oklch(.97 0 0);--sidebar-foreground: oklch(.38 0 0);--sidebar-primary: oklch(.12 0 0);--sidebar-primary-foreground: oklch(.985 0 0);--sidebar-accent: oklch(.12 0 0 / .06);--sidebar-accent-foreground: oklch(.12 0 0);--sidebar-border: oklch(.88 0 0);--sidebar-ring: oklch(.5 0 0);--shadow-card: 0 1px 3px oklch(0 0 0 / .05), 0 1px 1px oklch(0 0 0 / .03);--shadow-float: 0 8px 24px -6px oklch(0 0 0 / .1), 0 2px 8px -2px oklch(0 0 0 / .04);--shadow-composer: 0 1px 2px oklch(0 0 0 / .04);--shadow-composer-focus: 0 0 0 1px oklch(0 0 0 / .06), 0 2px 8px -2px oklch(0 0 0 / .06);--shadow-inset: inset 0 1px 1px oklch(0 0 0 / .03);--shadow-glow: 0 0 20px oklch(0 0 0 / .08);--ease-spring: cubic-bezier(.22, 1, .36, 1);--ease-bounce: cubic-bezier(.34, 1.56, .64, 1);--ease-smooth: cubic-bezier(.4, 0, .2, 1)}.dark{--background: oklch(.195 0 0);--foreground: oklch(.94 0 0);--card: oklch(.225 0 0);--card-foreground: oklch(.94 0 0);--popover: oklch(.225 0 0);--popover-foreground: oklch(.94 0 0);--primary: oklch(.94 0 0);--primary-foreground: oklch(.195 0 0);--secondary: oklch(.26 0 0);--secondary-foreground: oklch(.75 0 0);--muted: oklch(.165 0 0);--muted-foreground: oklch(.6 0 0);--accent: oklch(.26 0 0);--accent-foreground: oklch(.94 0 0);--destructive: oklch(.7 .15 25);--border: oklch(.27 0 0);--input: oklch(.27 0 0);--ring: oklch(.45 0 0);--sidebar: oklch(.175 0 0);--sidebar-foreground: oklch(.78 0 0);--sidebar-primary: oklch(.94 0 0);--sidebar-primary-foreground: oklch(.195 0 0);--sidebar-accent: oklch(.94 0 0 / .06);--sidebar-accent-foreground: oklch(.94 0 0);--sidebar-border: oklch(.25 0 0);--sidebar-ring: oklch(.45 0 0);--shadow-card: inset 0 1px 0 oklch(1 0 0 / .04), 0 1px 2px oklch(0 0 0 / .2), 0 .5px 1px oklch(0 0 0 / .15);--shadow-float: 0 0 0 1px oklch(1 0 0 / .06), 0 16px 48px -6px oklch(0 0 0 / .35), 0 6px 12px -2px oklch(0 0 0 / .2);--shadow-composer: 0 1px 3px oklch(0 0 0 / .2), inset 0 1px 0 oklch(1 0 0 / .03);--shadow-composer-focus: 0 0 0 1px oklch(1 0 0 / .1), 0 4px 16px -4px oklch(0 0 0 / .3), inset 0 1px 0 oklch(1 0 0 / .04)}@keyframes fade-up{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@keyframes dot-pulse{0%,60%,to{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}@keyframes message-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes thinking-dot{0%,60%,to{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}@keyframes glow-pulse{0%,to{box-shadow:0 0 #3275b400}50%{box-shadow:0 0 0 3px #3275b414}}@keyframes subtle-lift{0%{transform:translateY(0);box-shadow:var(--shadow-card)}to{transform:translateY(-1px);box-shadow:var(--shadow-float)}}*{box-sizing:border-box;margin:0;border-color:var(--border)}html,body{height:100%}body{font-family:Geist,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;background:var(--sidebar);color:var(--foreground);-webkit-font-smoothing:antialiased;font-feature-settings:"ss01","ss02","cv01";overflow:hidden}button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}textarea{font:inherit;color:inherit;background:none;border:0;outline:none;resize:none}svg{width:1em;height:1em;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}.app{display:flex;height:100dvh}.sidebar{width:260px;background:var(--sidebar);color:var(--sidebar-foreground);display:flex;flex-direction:column;padding:12px 8px;transition:margin .3s var(--ease-spring);flex:none}.sidebar.closed{margin-left:-260px}.sb-head{display:flex;justify-content:space-between;align-items:center;padding:0 4px 8px}.icon-btn{width:32px;height:32px;display:grid;place-items:center;border-radius:8px;color:color-mix(in oklab,var(--sidebar-foreground) 60%,transparent);transition:.15s}.icon-btn:hover{background:var(--sidebar-accent);color:var(--sidebar-foreground)}.new-chat{display:flex;align-items:center;gap:8px;height:32px;padding:0 10px;border:1px solid var(--sidebar-border);border-radius:8px;font-size:13px;font-weight:500;color:color-mix(in oklab,var(--sidebar-foreground) 70%,transparent);transition:.15s;width:100%}.new-chat:hover{background:var(--sidebar-accent)}.hist{flex:1;overflow:auto;margin-top:12px}.hist-label{font-size:11px;padding:4px 10px;color:color-mix(in oklab,var(--sidebar-foreground) 40%,transparent)}.hist-item{display:block;width:100%;text-align:left;padding:7px 10px;border-radius:8px;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:.15s;animation:fade-up .25s var(--ease-spring) both}.hist-item:hover,.hist-item.active{background:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.sb-foot{border-top:1px solid var(--sidebar-border);padding-top:8px}.main{flex:1;min-width:0;display:flex;flex-direction:column;background:var(--background);border-radius:16px 0 0 16px;border-left:1px solid color-mix(in oklab,var(--border) 40%,transparent);transition:.3s var(--ease-spring)}.sidebar.closed+.main{border-radius:0}header{height:56px;display:flex;align-items:center;gap:8px;padding:0 12px;background:var(--sidebar)}.chip{display:flex;align-items:center;gap:6px;height:32px;padding:0 10px;border-radius:8px;border:1px solid var(--border);font-size:13px;color:var(--muted-foreground);transition:.15s}.chip:hover{color:var(--foreground);background:var(--accent)}.chat{flex:1;overflow:auto;scroll-behavior:smooth}.chat-inner{max-width:768px;margin:0 auto;padding:24px 16px;display:flex;flex-direction:column;gap:24px;min-height:100%}.empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;text-align:center}.greet-t{font-size:30px;font-weight:600;letter-spacing:-.02em;opacity:0;animation:greet .5s var(--ease-spring) .35s forwards}.greet-s{margin-top:12px;font-size:14px;color:color-mix(in oklab,var(--muted-foreground) 80%,transparent);opacity:0;animation:greet .5s var(--ease-spring) .5s forwards}@keyframes greet{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}.sugs{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%;margin-top:32px}.sug{padding:12px 16px;text-align:left;font-size:12px;line-height:1.6;border-radius:12px;border:1px solid color-mix(in oklab,var(--border) 50%,transparent);background:color-mix(in oklab,var(--card) 30%,transparent);color:var(--muted-foreground);transition:.2s;opacity:0;animation:sugin .4s var(--ease-spring) forwards}@keyframes sugin{0%{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}.sug:hover{color:var(--foreground);background:var(--accent);animation-fill-mode:forwards;transform:translateY(-1px);box-shadow:var(--shadow-float)}.msg{display:flex;animation:message-in .3s cubic-bezier(.16,1,.3,1) both}.msg.user{justify-content:flex-end}.bubble{font-size:13px;line-height:1.65;max-width:80%;white-space:pre-wrap;word-break:break-word}.user .bubble{background:var(--secondary);padding:8px 14px;border-radius:16px}.bot{display:flex;gap:12px;align-items:flex-start}.avatar{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;border:1px solid var(--border);background:var(--card);flex:none;font-size:13px;color:var(--muted-foreground)}.bot .bubble{max-width:100%;padding-top:4px}.bot pre{background:var(--muted);padding:12px;border-radius:10px;overflow:auto;margin:8px 0;font:12px/1.6 ui-monospace,SF Mono,monospace}.thinking{display:flex;gap:4px;padding:10px 0}.thinking i{width:5px;height:5px;border-radius:50%;background:var(--muted-foreground);animation:thinking-dot 1.4s ease-in-out infinite}.thinking i:nth-child(2){animation-delay:.2s}.thinking i:nth-child(3){animation-delay:.4s}.shimmer-text{background:linear-gradient(90deg,var(--muted-foreground) 40%,var(--foreground) 50%,var(--muted-foreground) 60%);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:shimmer 2s linear infinite;font-size:13px}.caret{display:inline-block;width:6px;height:14px;background:var(--foreground);vertical-align:-2px;animation:fade-in .6s ease infinite alternate}.composer-wrap{max-width:768px;width:100%;margin:0 auto;padding:0 16px 16px}.composer{border-radius:16px;border:1px solid color-mix(in oklab,var(--border) 30%,transparent);background:color-mix(in oklab,var(--card) 70%,transparent);box-shadow:var(--shadow-composer);transition:box-shadow .3s}.composer:focus-within{box-shadow:var(--shadow-composer-focus);animation:glow-pulse 2s ease-in-out infinite}.composer textarea{display:block;width:100%;min-height:96px;max-height:240px;padding:14px 16px 6px;font-size:13px;line-height:1.6}.composer textarea::placeholder{color:color-mix(in oklab,var(--muted-foreground) 35%,transparent)}.c-foot{display:flex;justify-content:space-between;align-items:center;padding:0 12px 12px}.send{width:28px;height:28px;border-radius:12px;background:var(--foreground);color:var(--background);display:grid;place-items:center;transition:.2s}.send:hover{opacity:.85}.send:active{transform:scale(.95)}.send:disabled{background:var(--muted);color:color-mix(in oklab,var(--muted-foreground) 25%,transparent);cursor:not-allowed}.model{font-size:12px;color:var(--muted-foreground)}@media(max-width:768px){.sidebar{position:fixed;z-index:20;height:100%}.main{border-radius:0}.sugs{display:flex;overflow-x:auto}.sug{min-width:200px;white-space:nowrap}}html,body{touch-action:pan-x pan-y}header{padding-top:env(safe-area-inset-top);height:calc(56px + env(safe-area-inset-top))}.composer-wrap{padding-bottom:calc(16px + env(safe-area-inset-bottom))}@media(max-width:768px){.sidebar{box-shadow:var(--shadow-float)}.sidebar.closed{box-shadow:none}}.hist-row{position:relative}.hist-row .hist-item{padding-right:34px}.hist-del{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:26px;height:26px;display:grid;place-items:center;border-radius:6px;opacity:0;color:var(--muted-foreground);transition:.15s;font-size:14px}.hist-row:hover .hist-del,.hist-del:focus-visible{opacity:1}.hist-del:hover{background:var(--sidebar-accent);color:var(--foreground)}@media(hover:none){.hist-del{opacity:.55}}.bot .bubble{white-space:normal}.bubble p{margin:0 0 .6em}.bubble p:last-child{margin:0}.bubble ul,.bubble ol{padding-left:1.4em;margin:0 0 .6em}.bubble li{margin:.2em 0}.bubble a{text-decoration:underline;text-underline-offset:2px}.bubble code{font:12px ui-monospace,SF Mono,monospace;background:var(--muted);padding:1px 5px;border-radius:5px}.bot pre code{background:none;padding:0}.bubble.err{color:var(--destructive)}.bubble .note{font-size:12px;color:var(--muted-foreground);margin-top:4px}.hide{display:none!important}.new-chat:disabled{opacity:.4;cursor:not-allowed}.new-chat:disabled:hover{background:none}.dlg-back{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:16px;background:#00000080;animation:fade-in .15s ease both}.dlg{width:100%;max-width:450px;background:var(--popover);color:var(--popover-foreground);border:1px solid color-mix(in oklab,var(--border) 70%,transparent);border-radius:14px;padding:24px;box-shadow:var(--shadow-float);animation:dlg-in .2s var(--ease-spring) both}@keyframes dlg-in{0%{opacity:0;transform:scale(.96) translateY(4px)}to{opacity:1;transform:none}}.dlg h3{font-size:16px;font-weight:600;letter-spacing:-.01em}.dlg p{margin-top:8px;font-size:14px;line-height:1.55;color:var(--muted-foreground)}.dlg-act{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}.btn-out,.btn-dark{height:36px;padding:0 16px;border-radius:8px;font-size:14px;font-weight:500;transition:.15s}.btn-out{border:1px solid color-mix(in oklab,var(--foreground) 35%,transparent)}.btn-out:hover{background:var(--accent)}.btn-dark{background:#060606;color:#fff;border:1px solid color-mix(in oklab,var(--foreground) 12%,transparent)}.dark .btn-dark{background:#030303}.btn-dark:hover{opacity:.88}.btn-out:focus-visible,.btn-dark:focus-visible{outline:2px solid var(--ring);outline-offset:2px}.ttl{display:block;min-width:0;max-width:calc(100% - 52px);height:32px;padding:0 10px;border-radius:8px;font-size:14px;font-weight:500;color:var(--foreground);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;transition:background .15s,color .15s}.ttl.muted{color:var(--muted-foreground);font-weight:400;cursor:default}.ttl:not(.muted):hover{background:var(--sidebar-accent)}.ttl.baru{animation:fade-up .3s var(--ease-spring) both}.ttl-input{height:32px;min-width:0;width:min(320px,calc(100% - 60px));padding:0 10px;border-radius:8px;border:1px solid var(--border);background:var(--background);color:var(--foreground);font:inherit;font-size:14px;font-weight:500;outline:none}.ttl-input:focus{border-color:var(--ring)}.sug{min-width:0;white-space:normal;overflow-wrap:anywhere;padding:14px 16px;line-height:1.5}@media(max-width:768px){.sugs{display:grid;grid-template-columns:1fr 1fr;gap:8px;overflow:visible;margin-top:24px}.sug{min-width:0;white-space:normal;padding:12px;font-size:12px}}@media(max-width:340px){.sugs{grid-template-columns:1fr}}

/* Hilangkan highlight/garis biru saat elemen ditekan */
*{-webkit-tap-highlight-color:transparent}
button,a,input,textarea,select,[tabindex]{outline:none!important}
button,.hist-item,.sug,.avatar,.icon-btn{-webkit-user-select:none;user-select:none}

/* Desktop/laptop: hilangkan tombol tutup sidebar yang ada di dalam sidebar */
@media(min-width:769px){#toggle{display:none}}

/* Dialog laporan bug */
.fb{position:relative;max-width:520px}
.fb h3{padding-right:36px}
.fb-x{position:absolute;top:16px;right:16px;width:32px;height:32px;display:grid;place-items:center;border-radius:8px;color:var(--muted-foreground);transition:.15s;font-size:16px}
.fb-x:hover{background:var(--accent);color:var(--foreground)}
.fb-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.fb-chip{padding:8px 14px;border-radius:999px;border:1px solid color-mix(in oklab,var(--foreground) 18%,transparent);font-size:13px;transition:.15s}
.fb-chip:hover{background:var(--accent)}
.fb-chip.on{background:var(--accent);border-color:color-mix(in oklab,var(--foreground) 55%,transparent)}
.fb-text{display:block;width:100%;min-height:104px;margin-top:16px;padding:12px 14px;border:1px solid color-mix(in oklab,var(--foreground) 18%,transparent);border-radius:12px;font-size:14px;line-height:1.5;resize:vertical}
.fb-text::placeholder{color:var(--muted-foreground)}
.fb-text:focus{border-color:var(--ring)}
.fb-msg{margin-top:12px;font-size:13px}
.fb-msg:empty{display:none}
.fb-msg.bad{color:var(--destructive)}
.fb .btn-dark:disabled{opacity:.4;cursor:not-allowed}
.sb-foot .new-chat{margin-bottom:2px}

/* Ikon balasan/thinking: bentuk bintang pixel, hitam di tema terang, putih di tema gelap */
.avatar{width:26px;height:22px;border:0;border-radius:0;background:var(--foreground);color:transparent;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 11' shape-rendering='crispEdges'%3E%3Cpath d='M11 0h1v1h-1zM10 1h3v1h-3zM4 2h1v1h-1zM11 2h1v1h-1zM3 3h3v1h-3zM3 4h3v1h-3zM1 5h7v1h-7zM0 6h9v1h-9zM1 7h7v1h-7zM3 8h3v1h-3zM3 9h3v1h-3zM4 10h1v1h-1z'/%3E%3C/svg%3E") center/100% 100% no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 11' shape-rendering='crispEdges'%3E%3Cpath d='M11 0h1v1h-1zM10 1h3v1h-3zM4 2h1v1h-1zM11 2h1v1h-1zM3 3h3v1h-3zM3 4h3v1h-3zM1 5h7v1h-7zM0 6h9v1h-9zM1 7h7v1h-7zM3 8h3v1h-3zM3 9h3v1h-3zM4 10h1v1h-1z'/%3E%3C/svg%3E") center/100% 100% no-repeat;margin-top:3px}
.avatar svg{display:none}

/* Thought / Analysis / Reasoning (bisa dibuka-tutup dengan panah >) */
.tko{margin:0 0 10px}
.tko summary{display:flex;align-items:center;gap:6px;cursor:pointer;list-style:none;font-size:12px;color:var(--muted-foreground);padding:3px 0;-webkit-user-select:none;user-select:none}
.tko summary::-webkit-details-marker{display:none}
.tko>summary svg{font-size:13px;transition:transform .15s}
.tko[open]>summary svg{transform:rotate(90deg)}
.tko>summary b{font-weight:500;color:var(--foreground)}
.tks{margin:2px 0 0 19px;display:flex;flex-direction:column;gap:2px}
.tk summary{display:flex;align-items:center;gap:6px;cursor:pointer;list-style:none;font-size:12px;color:var(--muted-foreground);padding:3px 0;-webkit-user-select:none;user-select:none}
.tk summary::-webkit-details-marker{display:none}
.tk summary svg{font-size:13px;transition:transform .15s}
.tk[open] summary svg{transform:rotate(90deg)}
.tk summary b{font-weight:500;color:var(--foreground)}
.tk summary span{opacity:.8}
.tk-b{font-size:12px;line-height:1.6;color:var(--muted-foreground);padding:2px 0 6px 19px}

.disc{margin:10px 0 0;padding:0 8px;text-align:center;font-size:12px;line-height:1.3;color:var(--muted-foreground);user-select:none;-webkit-user-select:none}

.acts{display:flex;align-items:center;gap:4px;margin-top:12px}
.acts button{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;color:var(--muted-foreground);transition:background .15s,color .15s}
.acts button:hover{background:var(--sidebar-accent);color:var(--foreground)}
.acts button[aria-pressed=true]{color:var(--foreground)}
.acts button[aria-pressed=true] svg{fill:currentColor}
.acts svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.acts .tm{margin-left:auto;font-size:13px;color:var(--muted-foreground);padding-right:4px}
@media(hover:hover){.msg.bot .acts{opacity:0;transition:opacity .18s}.msg.bot:hover .acts,.msg.bot .acts:focus-within{opacity:1}}

.dk-back{position:fixed;inset:0;z-index:80;background:rgba(0,0,0,.45);display:flex;align-items:flex-end;justify-content:center;animation:dk-fade .2s ease both}
.dk-back.out{background:transparent;transition:background .22s}
.dk-sheet{width:100%;max-width:640px;max-height:72dvh;overflow-y:auto;overscroll-behavior:contain;background:var(--background);color:var(--foreground);border-radius:22px 22px 0 0;padding:6px 20px calc(20px + env(safe-area-inset-bottom));box-shadow:0 -8px 30px rgba(0,0,0,.25);animation:dk-up .26s cubic-bezier(.2,.8,.2,1) both;will-change:transform}
.dk-grab{display:flex;justify-content:center;padding:10px 0 14px;cursor:grab;touch-action:none}
.dk-grab span{width:44px;height:5px;border-radius:3px;background:color-mix(in oklab,var(--foreground) 25%,transparent)}
.dk-sheet h3{margin:0 0 14px;font-size:18px;font-weight:600}
.dk-chips{display:flex;flex-wrap:wrap;gap:8px}
.dk-act{display:flex;justify-content:flex-end;margin-top:18px}
@keyframes dk-up{from{transform:translateY(100%)}to{transform:none}}
@keyframes dk-fade{from{opacity:0}to{opacity:1}}

.ttl-mb{width:28px;height:28px;flex:none;border-radius:8px;display:grid;place-items:center;color:var(--muted-foreground);transition:background .15s}
.ttl-mb[hidden]{display:none}
.ttl-mb:hover,.ttl-mb[aria-expanded=true]{background:var(--sidebar-accent);color:var(--foreground)}
.ttl-mb svg,.tt-item svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.tt-menu{position:fixed;z-index:75;min-width:230px;padding:8px;background:var(--popover);color:var(--popover-foreground);border:1px solid color-mix(in oklab,var(--border) 80%,transparent);border-radius:16px;box-shadow:var(--shadow-float,0 10px 30px rgba(0,0,0,.18));animation:fade-up .16s var(--ease-spring,ease) both}
.tt-item{display:flex;align-items:center;gap:12px;width:100%;height:42px;padding:0 12px;border-radius:10px;font-size:15px;color:var(--foreground);text-align:left}
.tt-item:hover{background:var(--sidebar-accent)}
.tt-item.del{color:#e5484d}
.tt-sep{height:1px;margin:6px 4px;background:color-mix(in oklab,var(--border) 80%,transparent)}
.tt-toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);background:var(--foreground);color:var(--background);padding:10px 16px;border-radius:10px;font-size:13px;z-index:90}
.tt-item:disabled{opacity:.4;cursor:default}.tt-item:disabled:hover{background:transparent}

.art-st{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--muted-foreground);margin:10px 0 8px}
.art-st b{font-weight:500}.art-sep{opacity:.6}
.art-dot{width:10px;height:10px;border-radius:2px;background:var(--muted-foreground);animation:art-p 1s ease-in-out infinite}
@keyframes art-p{50%{opacity:.25}}
.art{margin:10px 0;max-width:420px;width:100%}
.art-card{display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;border-radius:14px;text-align:left;background:color-mix(in oklab,var(--foreground) 4%,var(--background));border:1px solid color-mix(in oklab,var(--border) 70%,transparent);transition:background .15s,border-color .15s}
.art-card:hover{background:color-mix(in oklab,var(--foreground) 7%,var(--background))}
.art.on .art-card{border-color:color-mix(in oklab,var(--foreground) 30%,transparent)}
.art-card:disabled{cursor:default;opacity:.7}
.art-ic{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;flex:none;background:#fbecc9;color:#b45309}
.dark .art-ic{background:#3b2f17;color:#fbbf24}
.art-ic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.art-meta{display:flex;flex-direction:column;min-width:0;gap:1px}
.art-meta b{font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.art-meta small{font-size:12.5px;color:var(--muted-foreground)}
/* panel kode di sisi kanan */
.apanel{--h-t:#d9480f;--h-a:#a16207;--h-s:#4d7c0f;--h-c:#6b7280;--h-k:#7c3aed;--h-n:#c2410c;display:flex;flex-direction:column;min-width:0;background:var(--background);border-left:1px solid color-mix(in oklab,var(--border) 70%,transparent);animation:ap-in .26s var(--ease-spring) both}
.dark .apanel{--h-t:#ff7a45;--h-a:#ffd166;--h-s:#e8e2c1;--h-c:#7d8590;--h-k:#c792ea;--h-n:#f78c6c}
@keyframes ap-in{from{opacity:0;transform:translateX(28px)}}
@media (min-width:900px){.apanel{flex:0 0 min(50%,860px);width:min(50%,860px)}.apanel.full{position:fixed;inset:0;width:auto;z-index:70;border-left:0}}
@media (max-width:899px){.apanel{position:fixed;inset:0;z-index:70;border-left:0}.ap-ex{display:none}}
.ap-h{display:flex;align-items:center;gap:8px;height:52px;padding:0 10px 0 12px;flex:none;border-bottom:1px solid color-mix(in oklab,var(--border) 60%,transparent)}
.ap-seg{display:flex;gap:2px;padding:3px;border-radius:10px;background:color-mix(in oklab,var(--foreground) 7%,transparent);flex:none}
.ap-seg button{width:32px;height:28px;border-radius:8px;display:grid;place-items:center;color:var(--muted-foreground);transition:background .15s,color .15s}
.ap-seg button.on{background:var(--background);color:var(--foreground);box-shadow:0 1px 2px rgba(0,0,0,.12)}
.apanel svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.ap-ti{flex:1;min-width:0;display:flex;font-size:14px;white-space:nowrap}
.ap-ti b{font-weight:500;overflow:hidden;text-overflow:ellipsis;min-width:0}
.ap-ti span{color:var(--muted-foreground);flex:none;white-space:pre}
.ap-split{position:relative;display:flex;align-items:center;border-radius:9px;background:color-mix(in oklab,var(--foreground) 7%,transparent);flex:none}
.ap-cp{height:30px;padding:0 12px;font-size:14px;border-radius:9px 0 0 9px;min-width:62px}
.ap-more{height:30px;width:28px;display:grid;place-items:center;border-left:1px solid color-mix(in oklab,var(--foreground) 12%,transparent);border-radius:0 9px 9px 0}
.ap-cp:hover,.ap-more:hover,.ap-ex:hover,.ap-x:hover{background:color-mix(in oklab,var(--foreground) 8%,transparent)}
.ap-ex,.ap-x{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;flex:none;color:var(--muted-foreground)}
.ap-ex:hover,.ap-x:hover{color:var(--foreground)}
.ap-menu{position:absolute;right:0;top:36px;min-width:170px;padding:6px;border-radius:12px;background:var(--background);border:1px solid color-mix(in oklab,var(--border) 80%,transparent);box-shadow:0 10px 30px rgba(0,0,0,.16);z-index:3}
.ap-menu[hidden]{display:none}
.ap-menu button{display:block;width:100%;text-align:left;padding:8px 10px;border-radius:8px;font-size:14px}
.ap-menu button:hover{background:var(--sidebar-accent)}
.ap-b{flex:1;min-height:0;position:relative}
.ap-pv,.ap-code{position:absolute;inset:0}
.ap-pv[hidden],.ap-code[hidden]{display:none}
.ap-pv iframe{display:block;width:100%;height:100%;border:0;background:#fff}
.ap-code{overflow:auto;padding:12px 0;font:13px/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--foreground)}
.apanel .cl{display:flex;align-items:flex-start}
.apanel .no{width:48px;flex:none;text-align:right;padding-right:14px;color:var(--muted-foreground);opacity:.7;user-select:none;-webkit-user-select:none}
.apanel .tx{flex:1;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere;padding-right:14px}
.apanel i{font-style:normal}.h-t{color:var(--h-t)}.h-a{color:var(--h-a)}.h-s{color:var(--h-s)}.h-c{color:var(--h-c)}.h-k{color:var(--h-k)}.h-n{color:var(--h-n)}

.sh-sheet{padding-left:0;padding-right:0}
.sh-h{margin:0 20px 6px;text-align:center;font-size:24px;font-weight:600}
.sh-s{margin:0 20px 16px;text-align:center;font-size:14px;color:var(--muted-foreground);line-height:1.4}
.sh-car{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding:0 20px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.sh-car::-webkit-scrollbar,.sh-apps::-webkit-scrollbar{display:none}
.sh-sl{flex:0 0 100%;scroll-snap-align:center;border-radius:20px;height:190px;display:grid;place-items:center}
.sh-cd{width:68%;min-height:128px;background:#000;color:#fff;border:1px solid rgba(255,255,255,.14);border-radius:18px;padding:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;box-shadow:0 8px 22px rgba(0,0,0,.35)}
.sh-ct{max-width:100%;font-size:13px;line-height:1.3;color:rgba(255,255,255,.65);text-align:center;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.sh-br{display:flex;align-items:center;gap:12px}
.sh-br b{font-size:26px;font-weight:800;letter-spacing:.08em;color:#fff}
.sh-lg{width:44px;height:44px;border-radius:8px;overflow:hidden;display:block;flex:none}.sh-lg svg{display:block;width:100%;height:100%}
.sh-dots{display:flex;justify-content:center;gap:8px;margin:14px 0 16px}
.sh-dots i{width:8px;height:8px;border-radius:50%;background:color-mix(in oklab,var(--foreground) 25%,transparent)}
.sh-dots i.on{background:#6b8cff}
.sh-line{height:1px;background:color-mix(in oklab,var(--border) 85%,transparent);margin-bottom:16px}
.sh-apps{display:flex;gap:6px;overflow-x:auto;padding:0 14px 4px;scrollbar-width:none}
.sh-app{flex:none;width:84px;display:flex;flex-direction:column;align-items:center;gap:8px;font-size:13px;color:var(--foreground);text-align:center}
.sh-ic{width:58px;height:58px;border-radius:15px;display:grid;place-items:center}
.sh-ic svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.sh-wrap{position:relative}
.sh-car{cursor:grab;user-select:none;-webkit-user-select:none}
.sh-car.drag{cursor:grabbing}
.sh-nav{display:none;position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:36px;height:36px;border-radius:50%;place-items:center;background:rgba(0,0,0,.55);color:#fff;border:1px solid rgba(255,255,255,.2)}
.sh-nav.l{left:28px}.sh-nav.r{right:28px}
.sh-nav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.sh-nav:hover{background:rgba(0,0,0,.75)}
@media(hover:hover) and (pointer:fine){.sh-nav{display:grid}}
.sh-dots i{cursor:pointer;position:relative}.sh-dots i::after{content:"";position:absolute;inset:-6px}
.dk-sheet,.pf-menu,.st-main,.art-code,.tt-menu,.sh-apps,.sh-car,.dk-chips{scrollbar-width:none;-ms-overflow-style:none}
.dk-sheet::-webkit-scrollbar,.pf-menu::-webkit-scrollbar,.st-main::-webkit-scrollbar,.art-code::-webkit-scrollbar,.tt-menu::-webkit-scrollbar,.sh-apps::-webkit-scrollbar,.sh-car::-webkit-scrollbar,.dk-chips::-webkit-scrollbar{display:none;width:0;height:0}

.model{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 8px;border-radius:10px;font-size:13px;font-weight:500;color:var(--foreground);transition:background .15s}
.model:hover,.model[aria-expanded=true]{background:var(--sidebar-accent)}
.mdl-lg{width:15px;height:13px;display:block;flex:none}.mdl-lg svg{display:block;width:100%;height:100%}
.mdl-ch{width:14px;height:14px;fill:none;stroke:var(--muted-foreground);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}
.model[aria-expanded=true] .mdl-ch{transform:rotate(180deg)}
.mdl-pop{position:fixed;z-index:85;min-width:200px;padding:6px;background:var(--popover);color:var(--popover-foreground);border:1px solid color-mix(in oklab,var(--border) 80%,transparent);border-radius:14px;box-shadow:var(--shadow-float,0 10px 30px rgba(0,0,0,.2));animation:fade-up .15s var(--ease-spring,ease) both}
.mdl-it{display:flex;align-items:center;gap:12px;width:100%;height:42px;padding:0 10px;border-radius:10px;font-size:14px;color:var(--foreground);text-align:left}
.mdl-it:hover,.mdl-it[aria-selected=true]{background:var(--sidebar-accent)}
.mdl-nm{flex:1}
.mdl-ck{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.mdl-it.off{cursor:not-allowed}.mdl-it.off:hover{background:transparent}.mdl-it.off .mdl-nm{color:var(--muted-foreground);opacity:.75}

.acts .a-src{width:auto;height:34px;padding:0 12px 0 5px;margin-left:4px;display:inline-flex;align-items:center;gap:8px;border-radius:999px;background:var(--sidebar-accent);color:var(--foreground);font-size:14px;font-weight:500;white-space:nowrap}
.acts .a-src:hover{background:color-mix(in oklab,var(--sidebar-accent) 80%,var(--foreground) 12%)}
.src-fv{display:inline-flex}
.src-fv i,.src-ic{display:grid;place-items:center;overflow:hidden;font-style:normal;background:var(--background);border:2px solid var(--sidebar-accent);color:var(--foreground);font-size:11px;font-weight:700}
.src-fv i{width:24px;height:24px;border-radius:50%}.src-fv i+i{margin-left:-8px}
.src-fv img,.src-ic img{width:100%;height:100%;object-fit:cover;display:block}
.src-fv b,.src-ic b{font-weight:700}
.src-list{display:flex;flex-direction:column;gap:2px}
.src-it{display:flex;gap:12px;align-items:flex-start;padding:12px 8px;border-radius:12px;text-decoration:none;color:inherit}
.src-it:hover{background:var(--sidebar-accent)}
.src-ic{flex:none;width:32px;height:32px;border-radius:50%;margin-top:2px}
.src-tx{min-width:0;display:flex;flex-direction:column;gap:2px}
.src-tx b{font-size:15px;font-weight:600;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.src-tx small{font-size:13px;color:var(--muted-foreground)}
.src-tx em{font-style:normal;font-size:13px;color:var(--muted-foreground);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}

.acts{flex-wrap:nowrap;gap:2px}
.acts .tm{white-space:nowrap;flex:none;margin-left:auto}
.acts .a-src{flex:none;height:30px;padding:0 10px 0 4px;margin-left:6px;gap:6px;font-size:13px}
.acts .a-src>span:last-child{line-height:1}
.src-fv i{width:20px;height:20px;border-width:1.5px;font-size:10px}.src-fv i+i{margin-left:-7px}
@media (max-width:480px){.acts button{width:30px;height:30px}.acts .a-src{height:30px}.acts svg{width:17px;height:17px}.acts .tm{font-size:12px;padding-right:0}}
@media (max-width:330px){.acts{flex-wrap:wrap}}
/* chip sumber: satu baris dengan tombol, ringkas di layar sempit */
.acts{flex-wrap:nowrap}
.acts .a-src{flex:none;height:32px;padding:0 11px 0 4px;gap:7px;font-size:14px}
.src-fv i{width:22px;height:22px}.src-fv i+i{margin-left:-9px}
.acts .tm{margin-left:auto;flex:none;font-size:13px;padding-left:6px}
@media (max-width:480px){
  .acts{gap:0}
  .acts button{width:32px;height:32px}
  .acts .a-src{width:auto;height:32px;margin-left:6px;padding:0 10px 0 4px;gap:6px;font-size:13px}
  .src-fv i{width:20px;height:20px}.src-fv i+i{margin-left:-8px}
  .src-fv i:nth-child(3){display:none}
  .acts .tm{font-size:12px;padding-left:4px}
}
.acts{width:100%}

/* chip hanya logo; jam tetap menempel di tepi kanan */
.acts .a-src{padding:0 8px 0 4px;gap:0;margin-left:6px}
.acts .tm{margin-left:auto;flex:none;position:static}
@media (max-width:480px){.acts .a-src{padding:0 7px 0 4px}.src-fv i:nth-child(3){display:inline-grid}}
.msg.bot .bubble{flex:1 1 auto;min-width:0}

/* laptop: sidebar tertutup jadi rel ikon (logo, New chat, Delete, foto profil) */
.tg-lg{display:none}
@media (min-width:769px){
  #toggle2{display:none}
  #toggle{display:grid;position:relative}
  .sidebar{overflow:hidden}
  .sidebar.closed{margin-left:0;width:56px;padding:12px 0;align-items:center;transition:width .3s var(--ease-spring)}
  .sidebar.closed+.main{border-radius:16px 0 0 16px}
  .sidebar.closed .sb-head{justify-content:center;padding:0 0 8px;width:100%}
  .sidebar.closed .sb-head>.icon{display:none}
  .sidebar.closed .new-chat{width:40px;height:40px;padding:0;justify-content:center;gap:0;border:0;font-size:0;border-radius:10px;margin:0 0 2px}
  .sidebar.closed .hist{display:none}
  .sidebar.closed .sb-foot{margin-top:auto;border-top:0;padding:0;width:100%;display:flex;justify-content:center}
  .sidebar.closed .pf-card{width:auto;padding:4px;gap:0}
  .sidebar.closed .pf-txt,.sidebar.closed .pf-chev{display:none}
  .sidebar.closed .pf-av{width:32px;height:32px;border-radius:50%;font-size:12px}
}
@media (min-width:769px) and (hover:hover) and (pointer:fine){
  #toggle .tg-lg{display:grid;place-items:center;position:absolute;inset:0;pointer-events:none;transition:opacity .16s ease,transform .22s var(--ease-spring)}
  #toggle .tg-lg svg{width:22px;height:19px;display:block}
  #toggle .tg-ic{transition:opacity .16s ease,transform .22s var(--ease-spring)}
  .sidebar:not(.closed) #toggle .tg-lg{display:none}
  .sidebar.closed #toggle:not(.near):not(:hover):not(:focus-visible){background:transparent}
  .sidebar.closed #toggle:not(.near):not(:hover):not(:focus-visible) .tg-ic{opacity:0;transform:scale(.6)}
  .sidebar.closed #toggle.near .tg-lg,.sidebar.closed #toggle:hover .tg-lg,.sidebar.closed #toggle:focus-visible .tg-lg{opacity:0;transform:scale(.6)}
}

/* scrollbar riwayat: tipis, bulat, tanpa panah, hanya muncul saat digulir */
.hist::-webkit-scrollbar{width:10px;height:10px}
.hist::-webkit-scrollbar-button{display:none;width:0;height:0}
.hist::-webkit-scrollbar-corner,.hist::-webkit-scrollbar-track{background:transparent}
.hist::-webkit-scrollbar-thumb{background-color:transparent;border:2px solid transparent;background-clip:padding-box;border-radius:999px;transition:background-color .3s ease}
.hist.scrolling::-webkit-scrollbar-thumb{background-color:color-mix(in oklab,var(--sidebar-foreground) 38%,transparent)}
.hist.scrolling::-webkit-scrollbar-thumb:hover{background-color:color-mix(in oklab,var(--sidebar-foreground) 55%,transparent)}
@supports not selector(::-webkit-scrollbar){
  .hist{scrollbar-width:thin;scrollbar-color:transparent transparent}
  .hist.scrolling{scrollbar-color:color-mix(in oklab,var(--sidebar-foreground) 38%,transparent) transparent}
}

/* judul diketik: huruf baru muncul memudar satu per satu */
.ttl .tc{white-space:pre;animation:ttl-ch .14s ease-out both}
@keyframes ttl-ch{from{opacity:0}to{opacity:1}}

/* panel kode di HP: lembar dari bawah, tab berlabel, bisa ditarik turun */
.ap-grab,.ap-lb{display:none}
@media (max-width:899px){
  body.art-open::before{content:"";position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:69;animation:ap-fade .25s ease both}
  @keyframes ap-fade{from{opacity:0}}
  @keyframes ap-up{from{transform:translateY(100%)}}
  .apanel{top:10px;border-radius:20px 20px 0 0;box-shadow:0 -10px 40px rgba(0,0,0,.25);animation:ap-up .3s var(--ease-spring) both;overflow:hidden}
  .ap-grab{display:flex;justify-content:center;padding:8px 0 2px;flex:none;touch-action:none}
  .ap-grab span{width:38px;height:4px;border-radius:99px;background:color-mix(in oklab,var(--foreground) 22%,transparent)}
  .ap-h{height:auto;flex-wrap:wrap;gap:8px 6px;padding:2px 10px 10px 16px;border-bottom:0;touch-action:none}
  .ap-ti{order:1;flex:1 1 0;flex-direction:column;font-size:16px;font-weight:600;white-space:normal;gap:1px}
  .ap-ti b{font-weight:600;white-space:nowrap}
  .ap-ti span{font-size:12.5px;font-weight:400}
  .ap-split{order:2}.ap-x{order:3;width:36px;height:36px;background:color-mix(in oklab,var(--foreground) 7%,transparent);border-radius:50%;color:var(--foreground)}
  .ap-seg{order:4;flex:1 1 100%;margin-right:6px;padding:3px}
  .ap-seg button{flex:1;width:auto;height:34px;gap:8px;font-size:14px;font-weight:500}
  .ap-lb{display:inline}
  .ap-cp,.ap-more{height:34px}
  .ap-b{margin-bottom:env(safe-area-inset-bottom);border-top:1px solid color-mix(in oklab,var(--border) 60%,transparent)}
  .ap-code{font-size:12px;padding:10px 0}
  .apanel .no{width:38px;padding-right:10px}
  .ap-menu{top:40px}
}

.ap-ti span::before{content:" \00B7 ";white-space:pre}
@media (max-width:899px){
  .ap-ti span::before{content:none}
  .apanel .ap-ex{display:none}
  .ap-seg button{display:flex;align-items:center;justify-content:center}
}

/* pembatas panel (laptop): geser kiri-kanan */
.ap-rs{display:none}
@media (min-width:900px){
  .apanel{position:relative;min-width:380px;max-width:calc(100% - 420px)}
  .apanel.full{position:fixed;max-width:none}
  .ap-rs{display:block;position:absolute;left:-5px;top:0;bottom:0;width:10px;cursor:col-resize;z-index:6;touch-action:none;outline:none}
  .ap-rs::after{content:"";position:absolute;left:4px;top:0;bottom:0;width:2px;background:transparent;transition:background .15s}
  .ap-rs:hover::after,.ap-rs.on::after,.ap-rs:focus-visible::after{background:color-mix(in oklab,var(--foreground) 30%,transparent)}
  .apanel.full .ap-rs{display:none}
  body.ap-drag{cursor:col-resize;user-select:none;-webkit-user-select:none}
  body.ap-drag iframe{pointer-events:none}
}
/* layar penuh selalu menimpa lebar hasil geser */
.apanel.full{position:fixed!important;inset:0!important;width:auto!important;max-width:none!important;min-width:0!important;flex:none!important;z-index:70}

/* scrollbar chat: tipis, bulat, tanpa panah, memanjang sampai bawah, hanya muncul saat digulir */
@media (hover:hover) and (pointer:fine){
  .main{position:relative}
  body.vs-on #chat{scrollbar-width:none}
  body.vs-on #chat::-webkit-scrollbar{display:none}
  .vs{position:absolute;right:0;bottom:4px;width:22px;z-index:5;opacity:0;pointer-events:none;transition:opacity .25s ease}
  .vs.on{opacity:1;pointer-events:auto}
  .vs-th{position:absolute;right:7px;top:0;width:6px;border-radius:999px;background:color-mix(in oklab,var(--foreground) 38%,transparent);transition:width .15s ease,background .15s ease,right .15s ease;cursor:default}
  .vs:hover .vs-th,.vs.drag .vs-th{width:8px;right:6px;background:color-mix(in oklab,var(--foreground) 55%,transparent)}
}
/* tombol + dan lampiran */
.c-left{display:flex;align-items:center;gap:2px;min-width:0}
.plus{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;flex:none;color:var(--muted-foreground);transition:background .15s,color .15s}
.plus:hover{background:var(--sidebar-accent);color:var(--foreground)}
.plus svg,.att-chip svg,.att-file svg,.pl-menu svg,.pl-tiles svg,.pl-row svg{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.plus svg{width:20px;height:20px}
.composer.drop{box-shadow:0 0 0 2px color-mix(in oklab,var(--foreground) 35%,transparent)}
.att-tray{display:flex;flex-wrap:wrap;gap:8px;padding:12px 12px 0}
.att-tray[hidden]{display:none}
.att-chip{position:relative;display:flex;align-items:center;gap:8px;border-radius:12px;background:var(--sidebar-accent);color:var(--foreground);max-width:100%}
.att-chip.is-img{width:64px;height:64px;overflow:visible}
.att-chip.is-img img{width:100%;height:100%;object-fit:cover;border-radius:12px;display:block}
.att-chip.is-file{padding:8px 34px 8px 10px;font-size:13px;max-width:220px}
.att-chip.is-file svg{width:18px;height:18px;flex:none}
.att-chip.is-file b{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.att-x{position:absolute;top:-6px;right:-6px;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:var(--foreground);color:var(--background);box-shadow:0 1px 4px rgba(0,0,0,.3)}
.att-x svg{width:12px;height:12px;stroke-width:2.4}
.att-chip.is-file .att-x{top:50%;right:8px;transform:translateY(-50%);background:transparent;color:var(--muted-foreground);box-shadow:none}
.att-row{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:6px;justify-content:flex-end}
.att-row img{max-width:180px;max-height:180px;border-radius:12px;display:block;object-fit:cover}
.att-file{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:10px;background:color-mix(in oklab,var(--foreground) 8%,transparent);font-size:12.5px;max-width:100%}
.att-file svg{width:16px;height:16px;flex:none}.att-file b{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pl-menu{position:fixed;z-index:90;min-width:220px;padding:6px;border-radius:14px;background:var(--background);border:1px solid color-mix(in oklab,var(--border) 80%,transparent);box-shadow:0 12px 34px rgba(0,0,0,.18);animation:ap-fade .12s ease both}
.pl-menu button{display:flex;align-items:center;gap:12px;width:100%;padding:9px 10px;border-radius:9px;font-size:14px;text-align:left}
.pl-menu button:hover{background:var(--sidebar-accent)}
.pl-menu svg{width:17px;height:17px;flex:none;color:var(--muted-foreground)}
.pl-sep{height:1px;margin:5px 6px;background:color-mix(in oklab,var(--border) 70%,transparent)}
.pl-h{display:flex;align-items:center;justify-content:space-between;margin:2px 4px 12px}.pl-h h3{font-size:18px;font-weight:600}
.pl-tiles{display:flex;gap:12px;margin:0 4px 14px}
.pl-tiles button{width:84px;height:84px;border-radius:18px;display:grid;place-items:center;background:var(--sidebar-accent);color:var(--foreground)}
.pl-tiles svg{width:26px;height:26px}
.pl-row{display:flex;align-items:center;gap:16px;width:100%;padding:14px 8px;font-size:17px;font-weight:500;text-align:left;border-radius:12px}
.pl-row svg{width:22px;height:22px}
.at-toast{position:fixed;left:50%;bottom:96px;transform:translateX(-50%);z-index:95;padding:10px 16px;border-radius:12px;background:var(--foreground);color:var(--background);font-size:13.5px;box-shadow:0 8px 24px rgba(0,0,0,.25);animation:ap-fade .2s ease both;max-width:calc(100% - 32px);text-align:center}
.at-toast.out{opacity:0;transition:opacity .25s}
@keyframes ap-fade{from{opacity:0}}

/* pratinjau gambar lampiran: buka besar dan tutup */
.att-chip.is-img img,.att-row img{cursor:zoom-in}
.lb{position:fixed;inset:0;z-index:100;display:grid;place-items:center;background:var(--background);padding:calc(64px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom))}
.lb img{display:block;max-width:calc(100vw - 48px);max-height:calc(100dvh - 96px);object-fit:contain;border-radius:10px;cursor:zoom-out;box-shadow:0 8px 40px rgba(0,0,0,.16);will-change:transform}
.lb-x{position:fixed;top:calc(16px + env(safe-area-inset-top));right:16px;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:var(--background);color:var(--foreground);border:1px solid color-mix(in oklab,var(--border) 80%,transparent);box-shadow:0 1px 8px rgba(0,0,0,.12);z-index:1}
.lb-x:hover{background:var(--sidebar-accent)}
.lb-x svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* HP: pratinjau gambar memenuhi layar, tanpa kotak */
@media (max-width:768px),(pointer:coarse){
  .lb{padding:0;background:#000}
  .lb img{width:100vw;height:100dvh;max-width:100vw;max-height:100dvh;border-radius:0;box-shadow:none;object-fit:contain}
  .lb-x{background:rgba(0,0,0,.55);color:#fff;border:0;box-shadow:none;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
  .lb-x:hover{background:rgba(0,0,0,.7)}
}

/* gambar terkirim tampil sendiri, tanpa kotak gelembung */
.msg.user.has-att{flex-direction:column;align-items:flex-end;gap:6px}
.msg.user.has-att .att-row{margin:0}
.msg.user.has-att .att-row img{max-width:min(260px,70vw);max-height:160px}

/* foto lampiran: tidak bisa ditekan lama / diseret / dipilih */
.att-chip img,.att-row img,.lb img,.lb{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;-webkit-tap-highlight-color:transparent}


/* ===== Halaman paket (dalam index, tanpa pindah halaman) ===== */
#pkt{position:fixed;inset:0;z-index:70;overflow-y:auto;-webkit-overflow-scrolling:touch;font-family:Geist,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;background:var(--bg);color:var(--fg);animation:fade-in .18s ease both}
#pkt[hidden]{display:none!important}
#pkt .pk-in{padding:56px 16px 48px;min-height:100%}
#pkt button{font:inherit}
#pkt .pk-back{position:fixed;top:calc(14px + env(safe-area-inset-top));left:14px;z-index:5;color:var(--muted);font-size:14px;border:1px solid var(--line);border-radius:999px;padding:8px 14px;background:var(--bg);cursor:pointer}
#pkt .pk-back:hover{background:var(--fg);color:var(--on)}
#pkt{--fg-rgb:17,17,17; --bg:#fafafa; --fg:#111; --on:#fff; --line: rgba(var(--fg-rgb),.14); --muted:#6b6b6b; --foot:#8a8a8a; --glow:rgba(0,0,0,.12);}
.dark #pkt{--fg-rgb:255,255,255; --bg:#000; --fg:#fff; --on:#000; --muted:#9a9a9a; --foot:#6b6b6b; --glow:rgba(255,255,255,.18);}
#pkt .pk-head{text-align: center; max-width: 600px; margin: 0 auto 32px;}
#pkt .eyebrow{display: inline-block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
    border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--muted);
    background: rgba(var(--fg-rgb),.04);}
#pkt .pk-head h1{margin-top: 0; font-size: clamp(30px, 7vw, 52px); font-weight: 700;
    letter-spacing: -0.035em; line-height: 1.08;
    background: linear-gradient(180deg, var(--fg) 30%, color-mix(in srgb, var(--fg) 45%, var(--bg)));
    -webkit-background-clip: text; background-clip: text; color: transparent;}
#pkt .pk-head p{margin-top: 14px; color: var(--muted); font-size: 16px; line-height: 1.55;}
#pkt .toggle{display: flex; width: fit-content; margin: 0 auto 48px; padding: 4px;
    border: 1px solid var(--line); border-radius: 999px; background: rgba(var(--fg-rgb),.04);}
#pkt .toggle button{all: unset; cursor: pointer; padding: 9px 20px; border-radius: 999px;
    font-size: 14px; font-weight: 500; color: var(--muted); transition: .2s;}
#pkt .toggle button.on{background: var(--fg); color: var(--on);}
#pkt .toggle small{font-size: 11px; font-weight: 600; margin-left: 6px; opacity: .7;}
#pkt .grid{display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 22px; max-width: 1020px; margin: 0 auto; align-items: stretch;}
#pkt .card{position: relative; display: flex; flex-direction: column;
    padding: 34px 28px 28px; border-radius: 24px;
    background: linear-gradient(160deg, rgba(var(--fg-rgb),.09), rgba(var(--fg-rgb),.02) 55%, rgba(var(--fg-rgb),.04));
    border: 1px solid var(--line);
    backdrop-filter: blur(6px);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
    overflow: hidden;}
#pkt .card::before{content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--fg-rgb),.6), transparent);}
#pkt .card:hover{transform: translateY(-8px); border-color: rgba(var(--fg-rgb),.5); box-shadow: 0 24px 60px -20px var(--glow);}
#pkt .badge{position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
    background: var(--fg); color: var(--on); padding: 5px 11px; border-radius: 999px;}
#pkt .icon{width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
    border: 1px solid var(--line); background: rgba(var(--fg-rgb),.06); margin-bottom: 20px;}
#pkt .icon svg{width: 22px; height: 22px; stroke: var(--fg); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;}
#pkt .card h2{font-size: 22px; font-weight: 650; letter-spacing: -0.01em;}
#pkt .model{display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600;
    letter-spacing: .04em; padding: 4px 11px; border-radius: 999px;
    border: 1px solid rgba(var(--fg-rgb),.3); color: var(--fg); background: rgba(var(--fg-rgb),.06);}
#pkt .ver{font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0;}
#pkt .desc{margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--muted); min-height: 42px;}
#pkt .price{margin: 24px 0 6px; display: flex; align-items: baseline; gap: 6px;}
#pkt .price .amount{font-size: 46px; font-weight: 700; letter-spacing: -0.04em; line-height: 1;}
#pkt .price .per{font-size: 14px; color: var(--muted);}
#pkt .note{font-size: 12px; color: var(--muted); height: 16px; margin-bottom: 24px;}
#pkt hr{border: none; height: 1px; background: var(--line); margin-bottom: 22px;}
#pkt .pk-ul{list-style: none; flex: 1; display: grid; gap: 13px; margin-bottom: 30px;}
#pkt .pk-ul li{display: flex; gap: 12px; align-items: center; font-size: 15px; line-height: 1.35;}
#pkt .pk-ul li .tick{flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(var(--fg-rgb),.12);}
#pkt .tick svg{width: 11px; height: 11px; stroke: var(--fg); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;}
#pkt .cta{all: unset; box-sizing: border-box; width: 100%; text-align: center; cursor: pointer;
    padding: 15px; border-radius: 14px; font-size: 15px; font-weight: 600;
    border: 1px solid rgba(var(--fg-rgb),.4); color: var(--fg); transition: .2s;}
#pkt .cta:hover{background: var(--fg); color: var(--on);}
#pkt .pk-foot{text-align: center; margin-top: 48px; font-size: 13px; color: var(--foot);}
@media (max-width: 640px) {#pkt .card:hover{ transform: none; }
  }
#pkt .acc{text-align:center;margin:0 auto 22px;font-size:14px;color:var(--muted)}
#pkt .acc b{color:var(--fg);font-weight:600}
#pkt .card.now{border-color:rgba(var(--fg-rgb),.55)}
#pkt .card.now .cta{opacity:.55;cursor:default;pointer-events:none}
#pkt .badge{top:10px!important}
#pkt .badge.cur{left:18px;right:auto}
#pkt .sk{display:block;height:12px;border-radius:999px;background:linear-gradient(90deg,rgba(var(--fg-rgb),.08) 30%,rgba(var(--fg-rgb),.2) 50%,rgba(var(--fg-rgb),.08) 70%);background-size:200% 100%;animation:pkskl 1.6s linear infinite}
#pkt .sk-price{width:120px;height:40px;border-radius:12px}
#pkt .sk-list li .tick{background:rgba(var(--fg-rgb),.08)}
#pkt .cta[disabled]{opacity:.5;cursor:default;pointer-events:none}
@keyframes pkskl{from{background-position:200% 0}to{background-position:-200% 0}}


:where(#pkt *){padding:0;box-sizing:border-box}

/* tombol kembali halaman paket */
#pkt .pk-back{display:inline-flex;align-items:center;gap:4px;height:40px;padding:0 18px 0 10px;border-radius:999px;border:1px solid var(--line);background:color-mix(in srgb,var(--bg) 82%,transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:var(--fg);font-size:14px;font-weight:500;letter-spacing:-.005em;box-shadow:0 2px 10px -4px var(--glow);cursor:pointer;transition:background .18s,border-color .18s,transform .15s;-webkit-tap-highlight-color:transparent}
#pkt .pk-back svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s}
#pkt .pk-back:hover{background:rgba(var(--fg-rgb),.08);border-color:rgba(var(--fg-rgb),.3);color:var(--fg)}
#pkt .pk-back:hover svg{transform:translateX(-3px)}
#pkt .pk-back:active{transform:scale(.96)}
#pkt .pk-back:focus-visible{outline:2px solid rgba(var(--fg-rgb),.5);outline-offset:2px}
@media(max-width:640px){#pkt .pk-back{height:38px;padding:0 16px 0 8px;font-size:13.5px}}

/* pencarian obrolan di sidebar */
.sb-head .sb-sbtn{margin-left:auto}
.sb-head .sb-sbtn.on{background:color-mix(in oklab,var(--sidebar-foreground) 10%,transparent);color:var(--sidebar-foreground)}
.sb-search{display:flex;align-items:center;gap:8px;height:34px;padding:0 6px 0 10px;margin:0 0 6px;border:1px solid var(--sidebar-border);border-radius:8px;background:color-mix(in oklab,var(--sidebar-foreground) 4%,transparent);transition:border-color .15s}
.sb-search[hidden]{display:none}
.sb-search:focus-within{border-color:color-mix(in oklab,var(--sidebar-foreground) 35%,transparent)}
.sb-search>svg{width:15px;height:15px;flex:none;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;opacity:.5}
.sb-search input{flex:1;min-width:0;height:100%;border:0;outline:0;background:transparent;color:var(--sidebar-foreground);font:inherit;font-size:13px}
.sb-search input::placeholder{color:color-mix(in oklab,var(--sidebar-foreground) 40%,transparent)}
.sb-search button{width:24px;height:24px;display:none;place-items:center;border-radius:6px;color:color-mix(in oklab,var(--sidebar-foreground) 55%,transparent)}
.sb-search.has button{display:grid}
.sb-search button:hover{background:color-mix(in oklab,var(--sidebar-foreground) 10%,transparent)}
.sb-search button svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
@media (max-width:768px){.sb-search input{font-size:16px}}
@media (min-width:769px){.sidebar.closed .sb-sbtn,.sidebar.closed .sb-search{display:none!important}}

/* halaman awal: logo + sapaan + kotak ketik di tengah; turun ke bawah saat chat pertama */
.main{position:relative}
.main.home{justify-content:center;padding-bottom:7vh}
.main.home>header{position:absolute;top:0;left:0;right:0;z-index:2}
.main.home .chat,.main.home .chat-inner,.main.home .empty{display:contents}
.main.home .hm-logo,.main.home .greet-t,.main.home .greet-s{width:100%;max-width:768px;margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;box-sizing:border-box;text-align:center}
.main.home .hm-logo{order:1;display:flex;justify-content:center;margin-bottom:18px;animation:greet .5s var(--ease-spring) .15s both}
.main.home .hm-logo svg{width:64px;height:auto;display:block}
.main.home .greet-t{order:2;font-size:34px;line-height:1.15;font-weight:600}
.main.home .greet-s{order:3;margin-top:8px;margin-bottom:22px;font-size:15px}
.main.home .composer-wrap{order:4;padding-bottom:0}
.main.home .sugs{order:5;width:100%;max-width:768px;margin:16px auto 0;padding:0 16px;box-sizing:border-box}
.hm-logo{display:none}
.main.home .disc{display:none}
@media (max-width:768px){
  .main.home{justify-content:flex-start;padding-top:calc(22vh);padding-bottom:0}
  .main.home .hm-logo{justify-content:flex-start}
  .main.home .hm-logo svg{width:56px}
  .main.home .greet-t,.main.home .greet-s{text-align:left;font-size:34px;font-weight:500}
  .main.home .greet-t{margin-bottom:0}
  .main.home .greet-s{font-size:34px;color:var(--muted-foreground);margin:0 auto 24px;line-height:1.15}
}
/* tombol model: hanya gambar */
.model{padding:0 8px;gap:4px}
.mdl-lg{width:22px;height:19px}

/* kotak ketik lebih kecil */
.composer textarea{min-height:44px;padding:14px 16px 2px}
.c-foot{padding:0 10px 10px}
.main.home .greet-s{margin-bottom:18px}

/* hp: naik ke atas supaya 4 kotak saran terlihat semua */
@media (max-width:768px){
  .main.home{padding-top:84px}
  .main.home .hm-logo{margin-bottom:12px}
  .main.home .hm-logo svg{width:46px}
  .main.home .greet-t,.main.home .greet-s{font-size:30px}
  .main.home .greet-s{margin-bottom:16px}
  .main.home .sugs{margin-top:12px;gap:8px}
  .main.home .sug{padding:12px 14px;min-height:0}
}

/* saran: daftar teks ber-ikon (hp), disembunyikan di laptop */
.main.home .sugs{display:flex;flex-direction:column;gap:2px;margin-top:14px}
.main.home .sug{display:flex;align-items:center;gap:14px;width:100%;padding:10px 6px;min-height:0;border:0;background:none;box-shadow:none;border-radius:10px;font-size:15.5px;line-height:1.3;text-align:left;color:color-mix(in oklab,var(--foreground) 72%,transparent)}
.main.home .sug svg{width:18px;height:18px;flex:none;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;opacity:.75}
.main.home .sug:active{background:color-mix(in oklab,var(--foreground) 6%,transparent)}
@media (hover:hover){.main.home .sug:hover{background:color-mix(in oklab,var(--foreground) 5%,transparent)}}
@media (min-width:769px){.main.home .sugs{display:none}}

/* laptop: tampilan awal seperti contoh (rata kiri, kotak satu baris, saran ber-ikon) */
.main.home .greet-b{color:var(--muted-foreground)}
@media (min-width:769px){
  .main.home .sugs{display:flex!important;flex-direction:column;gap:0;margin-top:14px;order:5}
  .main.home .hm-logo,.main.home .greet-t,.main.home .sugs{padding-left:36px;padding-right:36px;text-align:left}
  .main.home .hm-logo{justify-content:flex-start;margin-bottom:20px}
  .main.home .hm-logo svg{width:52px}
  .main.home .greet-t{font-size:32px;line-height:1.2;font-weight:500;letter-spacing:-.02em;margin-bottom:26px}
  .main.home .greet-b{color:inherit}
  .main.home .sug{font-size:14.5px;padding:10px 4px;gap:14px}
  .main.home .composer{display:flex;align-items:center;gap:6px;padding:8px 10px 8px 12px;border-radius:14px;min-height:58px}
  .main.home .composer .c-foot,.main.home .composer .c-left{display:contents}
  .main.home .composer .plus{order:1}
  .main.home .composer textarea{order:2;flex:1;min-width:0;min-height:40px;padding:10px 6px}
  .main.home .composer .model{order:3}
  .main.home .composer .send{order:4}
}

/* tengah otomatis di semua ukuran layar */
.main.home{justify-content:flex-start!important;padding-top:56px!important;padding-bottom:0!important;overflow-y:auto}
.main.home::before,.main.home::after{content:"";display:block;flex:1 1 0;min-height:0;order:0}
.main.home::before{flex-grow:1}
.main.home::after{flex-grow:1.35;order:9}
@media (max-width:768px){
  .main.home .hm-logo svg{width:clamp(40px,12vw,56px)}
  .main.home .greet-t,.main.home .greet-s{font-size:clamp(25px,8.2vw,34px)}
  .main.home .sug{font-size:clamp(14px,4.2vw,15.5px)}
}

/* nama panjang dipotong (tanpa geser), dan jarak sapaan ke kotak ketik */
.main.home{overflow-x:hidden}
.main.home .greet-t{margin-bottom:22px;overflow:hidden}
.main.home .greet-a{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}

/* jendela cari obrolan */
.srch-back{position:fixed;inset:0;z-index:90;display:flex;align-items:flex-start;justify-content:center;padding:12vh 16px 16px;background:rgba(0,0,0,.38);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);animation:srchIn .16s ease both}
.srch-back.out{animation:srchOut .16s ease both}
.srch{width:100%;max-width:580px;max-height:min(520px,76vh);display:flex;flex-direction:column;background:var(--popover);color:var(--popover-foreground);border:1px solid color-mix(in oklab,var(--border) 70%,transparent);border-radius:16px;box-shadow:0 24px 70px -18px rgba(0,0,0,.45);overflow:hidden;animation:srchPop .2s var(--ease-spring) both}
.srch-h{display:flex;align-items:center;gap:10px;padding:0 14px;height:54px;border-bottom:1px solid color-mix(in oklab,var(--border) 60%,transparent);flex:none}
.srch-si svg{width:18px;height:18px;display:block;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;opacity:.5}
.srch-h input{flex:1;min-width:0;height:100%;border:0;outline:0;background:transparent;color:inherit;font:inherit;font-size:15px}
.srch-h input::placeholder{color:color-mix(in oklab,var(--muted-foreground) 70%,transparent)}
.srch-x{width:28px;height:28px;display:grid;place-items:center;border-radius:8px;color:var(--muted-foreground)}
.srch-x svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
.srch-x:hover{background:color-mix(in oklab,var(--foreground) 8%,transparent)}
.srch-cancel{display:none;font-size:15px;color:var(--foreground);padding:6px 2px}
.srch-l{overflow-y:auto;padding:8px;flex:1;overscroll-behavior:contain}
.srch-lb{font-size:11.5px;letter-spacing:.02em;padding:10px 10px 6px;color:var(--muted-foreground)}
.srch-it{display:flex;align-items:center;gap:12px;width:100%;padding:9px 10px;border-radius:10px;text-align:left;color:inherit;transition:background .1s}
.srch-it.on{background:color-mix(in oklab,var(--foreground) 7%,transparent)}
.srch-ic{flex:none;width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:color-mix(in oklab,var(--foreground) 6%,transparent);color:color-mix(in oklab,var(--foreground) 65%,transparent)}
.srch-ic svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.srch-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.srch-t{font-size:14px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.srch-new .srch-t{flex:1}
.srch-sn{font-size:12.5px;color:var(--muted-foreground);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.srch-d{flex:none;font-size:12px;color:var(--muted-foreground)}
.srch mark{background:color-mix(in oklab,#facc15 45%,transparent);color:inherit;border-radius:3px;padding:0 1px}
.srch-em{padding:34px 16px;text-align:center;font-size:14px;color:var(--muted-foreground)}
.srch-em b{color:var(--foreground);font-weight:600;word-break:break-word}
@keyframes srchIn{from{opacity:0}to{opacity:1}}
@keyframes srchOut{from{opacity:1}to{opacity:0}}
@keyframes srchPop{from{opacity:0;transform:translateY(-8px) scale(.98)}to{opacity:1;transform:none}}
@media (max-width:768px){
  .srch-back{padding:0;background:var(--popover);-webkit-backdrop-filter:none;backdrop-filter:none;align-items:stretch}
  .srch{max-width:none;max-height:none;height:100%;border:0;border-radius:0;box-shadow:none;animation:srchIn .16s ease both}
  .srch-h{height:58px;padding:0 14px}
  .srch-h input{font-size:16px}
  .srch-x{display:none}
  .srch-cancel{display:block}
  .srch-it{padding:11px 10px}
}


/* jendela cari: tanpa ikon kotak, baris teks bersih */
.srch-it{padding:10px 12px;gap:14px}
.srch-new{margin-bottom:2px}
.srch-new .srch-ic{width:20px;height:20px;background:none;border-radius:0;color:var(--foreground)}
.srch-new .srch-ic svg{width:18px;height:18px}
.srch-new .srch-t{font-weight:500}
.srch-lb{padding:12px 12px 6px}

/* tanpa tanda panah di semua scrollbar */
*::-webkit-scrollbar{width:9px;height:9px}
*::-webkit-scrollbar-track{background:transparent}
*::-webkit-scrollbar-thumb{background:color-mix(in oklab,var(--foreground) 22%,transparent);border-radius:999px;border:2px solid transparent;background-clip:padding-box}
*::-webkit-scrollbar-thumb:hover{background:color-mix(in oklab,var(--foreground) 38%,transparent);background-clip:padding-box}
*::-webkit-scrollbar-button{display:none;width:0;height:0}
*::-webkit-scrollbar-corner{background:transparent}
@supports not selector(::-webkit-scrollbar){*{scrollbar-width:thin;scrollbar-color:color-mix(in oklab,var(--foreground) 25%,transparent) transparent}}
/* halaman awal: judul "New chat" ikut turun saat digulir (tidak hilang) */
.main.home{padding-top:0!important}
.main.home>header{position:sticky!important;top:0;left:auto;right:auto;flex:none;z-index:5}

/* "Obrolan baru" menempel di atas daftar hasil, tidak ikut tergulir */
.srch-pin{flex:none;padding:8px 8px 6px;border-bottom:1px solid color-mix(in oklab,var(--border) 55%,transparent);background:var(--popover)}
.srch-pin .srch-new{margin-bottom:0}
.srch-l{padding-top:4px}

/* judul "New chat" selalu paling atas (di depan jarak otomatis) */
.main.home>header{order:-1!important}

/* menu Context di sidebar */
.ctx-h{position:relative}
.ctx-chev{width:14px;height:14px;margin-left:auto;flex:none;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;opacity:.55;transition:transform .2s}
.ctx-h.open .ctx-chev{transform:rotate(180deg)}
.ctx-sub{margin:2px 0 4px 20px;padding-left:10px;border-left:1px solid var(--sidebar-border);display:flex;flex-direction:column;gap:1px}
.ctx-sub[hidden]{display:none}
.ctx-it{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;height:34px;padding:0 8px;border-radius:8px;font-size:13.5px;text-align:left;color:color-mix(in oklab,var(--sidebar-foreground) 85%,transparent)}
.ctx-it:hover{background:color-mix(in oklab,var(--sidebar-foreground) 7%,transparent)}
.ctx-it em{font-style:normal;font-size:10.5px;font-weight:500;padding:2px 8px;border-radius:999px;background:color-mix(in oklab,var(--sidebar-foreground) 9%,transparent);color:color-mix(in oklab,var(--sidebar-foreground) 65%,transparent);white-space:nowrap}
@media (min-width:769px){.sidebar.closed .ctx{display:none}}

/* teks sidebar lebih gelap (tidak abu-abu pucat) */
.sidebar .new-chat,.sidebar .ctx-it,.sidebar .ctx-it span,.sidebar .hist-item,.sidebar .hist-item *,.sidebar #theme,.sidebar #bugBtn{color:var(--foreground)}
.sidebar .new-chat:disabled{opacity:.4}
.sidebar .hist-label{color:color-mix(in oklab,var(--foreground) 55%,transparent)}
.sidebar .ctx-it em{color:color-mix(in oklab,var(--foreground) 70%,transparent)}
.sidebar .ctx-chev{opacity:.7}
.sidebar .sb-sbtn,.sidebar #toggle{color:var(--foreground)}

/* garis menu Context: gradasi biru, hijau, ungu */
.ctx-sub{border-left:2px solid transparent;border-image:linear-gradient(to bottom,#5bb4f6 0%,#5ed88f 50%,#6446da 100%) 1}

/* bagian Projects dan Chats di sidebar */
.sb-sec-h{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:8px 6px 2px 12px;flex:none}
.sb-sec-t{font-size:12.5px;font-weight:500;letter-spacing:.01em;color:color-mix(in oklab,var(--foreground) 78%,transparent)}
.sb-tog{display:inline-flex;align-items:center;gap:4px;padding:4px 0;cursor:pointer}
.sb-chev{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s;transform:rotate(90deg);opacity:.7}
.sb-tog.shut .sb-chev{transform:rotate(0)}
.sb-sec-a{display:flex;align-items:center;gap:2px}
.sb-sec-a button{width:26px;height:26px;display:grid;place-items:center;border-radius:7px;color:color-mix(in oklab,var(--foreground) 65%,transparent)}
.sb-sec-a button svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sb-sec-a button svg circle{fill:currentColor;stroke:none}
.sb-sec-a button:hover{background:color-mix(in oklab,var(--foreground) 8%,transparent);color:var(--foreground)}
.sb-sec{flex:none}
.prj-list{max-height:30vh;overflow-y:auto;padding:0 4px}
.prj-em{font-size:12.5px;padding:6px 8px;color:color-mix(in oklab,var(--foreground) 50%,transparent)}
.prj-it{display:flex!important;align-items:center;gap:10px}
.prj-ic{font-size:15px;width:20px;text-align:center;flex:none}
.prj-nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
.prj-cnt{font-size:11.5px;opacity:.55}
.prj-sub{margin:1px 0 4px 18px;padding-left:8px;border-left:1px solid var(--sidebar-border);display:flex;flex-direction:column}
.prj-newc{display:flex;align-items:center;gap:8px;height:32px;padding:0 8px;border-radius:8px;font-size:13px;color:color-mix(in oklab,var(--foreground) 72%,transparent);text-align:left}
.prj-newc:hover{background:color-mix(in oklab,var(--foreground) 7%,transparent);color:var(--foreground)}
.prj-newc svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
.hist[hidden]{display:none}
.hm-prj{align-self:center;max-width:100%;margin:0 auto 12px;padding:5px 12px;border-radius:999px;font-size:13px;background:color-mix(in oklab,var(--foreground) 7%,transparent);color:var(--foreground);order:0}
.main.home .hm-prj{order:1;margin:0 auto 10px;width:auto}
@media (max-width:768px){.main.home .hm-prj{margin-left:16px;margin-right:auto;align-self:flex-start}}
@media (min-width:769px){.main.home .hm-prj{margin-left:36px;margin-right:auto;align-self:flex-start;max-width:700px}}
@media (min-width:769px){.sidebar.closed #prjSec,.sidebar.closed #chSecH{display:none}}
/* menu titik tiga */
.sb-pop{position:fixed;z-index:96;min-width:180px;padding:6px;border-radius:12px;background:var(--popover);color:var(--popover-foreground);border:1px solid var(--border);box-shadow:0 14px 40px -10px rgba(0,0,0,.35);animation:srchPop .14s ease both}
.sb-pop button{display:block;width:100%;text-align:left;padding:9px 10px;border-radius:8px;font-size:13.5px}
.sb-pop button:hover{background:color-mix(in oklab,var(--foreground) 8%,transparent)}
/* jendela Buat proyek baru */
.pd-back{position:fixed;inset:0;z-index:92;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(0,0,0,.4);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);animation:srchIn .16s ease both}
.pd-back.out{animation:srchOut .18s ease both}
.pd{width:100%;max-width:460px;max-height:92vh;overflow-y:auto;padding:26px 24px 20px;border-radius:20px;background:var(--popover);color:var(--popover-foreground);box-shadow:0 28px 80px -18px rgba(0,0,0,.5);animation:srchPop .22s var(--ease-spring) both}
.pd-grab{display:none}
.pd-t{font-size:20px;font-weight:600;letter-spacing:-.01em}
.pd-s{margin-top:6px;font-size:14px;color:var(--muted-foreground)}
.pd-nr{display:flex;align-items:center;gap:12px;margin-top:22px}
.pd-ib{flex:none;width:46px;height:46px;border-radius:50%;display:grid;place-items:center;font-size:22px;background:color-mix(in oklab,var(--foreground) 7%,transparent);color:color-mix(in oklab,var(--foreground) 70%,transparent)}
.pd-ib svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pd-ib:hover{background:color-mix(in oklab,var(--foreground) 12%,transparent)}
.pd-in{flex:1;min-width:0;height:46px;border:0;outline:0;background:transparent;color:inherit;font:inherit;font-size:16px;font-weight:500}
.pd-in::placeholder{color:color-mix(in oklab,var(--muted-foreground) 80%,transparent)}
.pd-eg{display:grid;grid-template-columns:repeat(6,1fr);gap:4px;margin-top:10px;padding:8px;border-radius:12px;background:color-mix(in oklab,var(--foreground) 5%,transparent)}
.pd-eg[hidden]{display:none}
.pd-eg button{height:38px;border-radius:8px;font-size:20px}
.pd-eg button:hover{background:color-mix(in oklab,var(--foreground) 10%,transparent)}
.pd-sl{margin-top:22px;font-size:14px;color:var(--muted-foreground)}
.pd-ch{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.pd-chip{display:inline-flex;align-items:center;gap:8px;height:38px;padding:0 14px;border-radius:10px;font-size:14px;background:color-mix(in oklab,var(--foreground) 6%,transparent);transition:background .12s}
.pd-chip b{font-weight:500}
.pd-chip:hover{background:color-mix(in oklab,var(--foreground) 11%,transparent)}
.pd-hr{height:1px;background:color-mix(in oklab,var(--border) 70%,transparent);margin:22px 0 16px}
.pd-btn{display:block;width:100%;height:44px;border-radius:12px;font-size:15px;font-weight:500}
.pd-create{background:var(--foreground);color:var(--background)}
.pd-create:disabled{background:color-mix(in oklab,var(--foreground) 9%,transparent);color:color-mix(in oklab,var(--foreground) 35%,transparent);cursor:not-allowed}
.pd-cancel{margin-top:8px;border:1px solid var(--border)}
@media (max-width:768px){
  .pd-back{align-items:flex-end;padding:0}
  .pd{max-width:none;border-radius:22px 22px 0 0;padding:10px 20px calc(18px + env(safe-area-inset-bottom));animation:pdUp .26s cubic-bezier(.22,1,.36,1) both}
  .pd-grab{display:block;width:40px;height:4px;border-radius:999px;margin:0 auto 16px;background:color-mix(in oklab,var(--foreground) 20%,transparent)}
  .pd-t{font-size:19px}
}
@keyframes pdUp{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}


/* profil tetap di bawah walau daftar Chats ditutup */
.sidebar>.sb-foot{margin-top:auto}

/* halaman proyek */
.prj-cv{margin-left:auto;flex:none;width:22px;height:22px;display:grid;place-items:center;border-radius:6px;opacity:.55}
.prj-cv:hover{opacity:1;background:color-mix(in oklab,var(--foreground) 8%,transparent)}
.prj-cv svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s}
.prj-cv.on svg{transform:rotate(90deg)}
.pj{position:absolute;inset:0;z-index:6;display:flex;flex-direction:column;background:var(--background);color:var(--foreground);animation:srchIn .16s ease both}
.pj-top{flex:none;height:52px;display:flex;align-items:center;padding:0 12px}
.pj-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;width:100%;max-width:760px;margin:0 auto;padding:8px 24px 28px}
.pj-hd{display:flex;align-items:center;gap:14px;min-width:0}
.pj-ic{flex:none;width:46px;height:46px;border-radius:50%;display:grid;place-items:center;font-size:23px;background:color-mix(in oklab,var(--foreground) 7%,transparent)}
.pj-nm{flex:1;min-width:0;margin:0;font-size:clamp(22px,6vw,30px);font-weight:500;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pj-more{flex:none;width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:color-mix(in oklab,var(--foreground) 7%,transparent);color:var(--foreground)}
.pj-more:hover{background:color-mix(in oklab,var(--foreground) 12%,transparent)}
.pj-more svg{width:20px;height:20px;fill:currentColor}
.pj-tabs{display:grid;grid-template-columns:1fr 1fr;margin-top:24px;border-bottom:1px solid color-mix(in oklab,var(--foreground) 12%,transparent)}
.pj-tab{padding:13px 0;font-size:15px;color:color-mix(in oklab,var(--foreground) 52%,transparent);border-bottom:2px solid transparent;margin-bottom:-1px;transition:color .15s}
.pj-tab.on{color:var(--foreground);border-bottom-color:var(--foreground)}
.pj-pane{padding-top:8px}
.pj-em{display:flex;flex-direction:column;align-items:center;text-align:center;padding:64px 16px 24px}
.pj-em svg{width:64px;height:64px;fill:none;stroke:var(--foreground);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;margin-bottom:22px}
.pj-et{font-size:20px;font-weight:600;margin-bottom:10px}
.pj-es{max-width:320px;font-size:15px;line-height:1.5;color:color-mix(in oklab,var(--foreground) 55%,transparent)}
.pj-ls{display:flex;flex-direction:column;padding-top:6px}
.pj-ci{display:flex;align-items:center;gap:12px;width:100%;padding:14px 4px;text-align:left;border-bottom:1px solid color-mix(in oklab,var(--foreground) 8%,transparent)}
.pj-ci:hover{background:color-mix(in oklab,var(--foreground) 4%,transparent)}
.pj-ct{flex:1;min-width:0;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pj-cd{flex:none;font-size:12.5px;color:color-mix(in oklab,var(--foreground) 50%,transparent)}
.pj-sec{padding:20px 0 0}
.pj-sec.tap{cursor:pointer}
.pj-sl{font-size:16px;font-weight:500;margin-bottom:8px}
.pj-sv{font-size:15.5px;line-height:1.5;color:color-mix(in oklab,var(--foreground) 55%,transparent);white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden}
.pj-sv[hidden]{display:none}
.pj-btn{display:block;width:100%;height:46px;margin-top:20px;border-radius:12px;font-size:15px;font-weight:500;background:color-mix(in oklab,var(--foreground) 7%,transparent);color:var(--foreground)}
.pj-btn:hover{background:color-mix(in oklab,var(--foreground) 11%,transparent)}
.pj-btn.pri{background:var(--foreground);color:var(--background)}
.pj-btn.pri:hover{opacity:.88}
.pj-btn[hidden]{display:none}
.pj-ck{display:flex;align-items:flex-start;gap:12px;font-size:15.5px;line-height:1.45;color:color-mix(in oklab,var(--foreground) 55%,transparent);cursor:pointer}
.pj-ck input{flex:none;width:20px;height:20px;margin:1px 0 0;accent-color:#2f8cdc}
.pj-hr{margin:26px 0 22px;border-top:1px dashed color-mix(in oklab,var(--foreground) 18%,transparent)}
.pj-nf{font-size:19px;font-weight:500}
.pj-ed textarea{width:100%;padding:12px 14px;border-radius:12px;border:1px solid color-mix(in oklab,var(--foreground) 16%,transparent);background:transparent;color:inherit;font:inherit;font-size:15px;line-height:1.5;resize:vertical;outline:0}
.pj-ed textarea:focus{border-color:var(--foreground)}
.pj-er{display:flex;gap:10px;justify-content:flex-end;margin-top:10px}
.pj-btn2{height:40px;padding:0 18px;border-radius:10px;font-size:14.5px;font-weight:500;background:color-mix(in oklab,var(--foreground) 7%,transparent);color:var(--foreground)}
.pj-btn2.pri{background:var(--foreground);color:var(--background)}
.pj-comp{flex:none;width:100%;max-width:760px;margin:0 auto;padding:8px 16px 16px}
.pj-comp[hidden]{display:none}
.pj-cbox{display:flex;align-items:flex-end;gap:8px;padding:8px 8px 8px 16px;border-radius:20px;border:1px solid color-mix(in oklab,var(--foreground) 12%,transparent);background:var(--card);box-shadow:0 2px 10px -4px rgba(0,0,0,.12)}
.pj-cbox textarea{flex:1;min-width:0;max-height:160px;border:0;outline:0;resize:none;background:transparent;color:inherit;font:inherit;font-size:16px;line-height:1.5;padding:7px 0}
.pj-send{flex:none;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--foreground);color:var(--background);transition:opacity .15s}
.pj-send:disabled{opacity:.3;cursor:default}
.pj-send svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
@media (max-width:768px){.pj-body{padding:4px 20px 24px}}

.pj-dl{position:relative;max-width:480px;padding:26px 28px 24px}
.pj-dx{position:absolute;top:18px;right:18px;width:36px;height:36px;display:grid;place-items:center;border-radius:10px;color:inherit;opacity:.7}
.pj-dx:hover{opacity:1;background:color-mix(in oklab,var(--foreground) 7%,transparent)}
.pj-dx svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.pj-dt{margin:0 0 26px;text-align:center;font-size:22px;font-weight:600}
.pj-dl1{font-size:16px;font-weight:500;margin:0 0 10px}
.pj-sel{display:flex;align-items:center;gap:12px;width:100%;height:50px;padding:0 16px;border-radius:14px;border:1px solid color-mix(in oklab,var(--foreground) 14%,transparent);font-size:16px;text-align:left;color:inherit;background:transparent}
.pj-sel.on{background:color-mix(in oklab,var(--foreground) 5%,transparent)}
.pj-sel>svg{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.pj-sel>span{flex:1;min-width:0}
.pj-cv2{width:16px!important;height:16px!important;opacity:.6;transition:transform .15s}
.pj-sel.on .pj-cv2{transform:rotate(180deg)}
.pj-sd{margin:14px 0 0;font-size:15.5px;color:color-mix(in oklab,var(--foreground) 62%,transparent)}
.pj-dhr{margin:24px 0 22px;border-top:1px solid color-mix(in oklab,var(--foreground) 12%,transparent)}
.pj-dl textarea{width:100%;padding:13px 15px;border-radius:14px;border:1px solid color-mix(in oklab,var(--foreground) 14%,transparent);background:transparent;color:inherit;font:inherit;font-size:16px;line-height:1.5;resize:vertical;outline:0;min-height:110px}
.pj-dl textarea:focus{border-color:var(--foreground)}
.pj-chips{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 26px}
.pj-chip{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 14px;border-radius:999px;border:1px solid color-mix(in oklab,var(--foreground) 14%,transparent);font-size:15.5px;color:color-mix(in oklab,var(--foreground) 55%,transparent)}
.pj-chip:hover{background:color-mix(in oklab,var(--foreground) 5%,transparent);color:var(--foreground)}
.pj-chip svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pj-rs{padding:0 12px}
.pj-save{height:46px;padding:0 26px;border-radius:12px;font-size:16px;font-weight:500;background:var(--foreground);color:var(--background)}
.pj-save:hover{opacity:.88}
.pj-menu{position:absolute;z-index:3;padding:6px;border-radius:14px;background:var(--popover);color:var(--popover-foreground);border:1px solid color-mix(in oklab,var(--foreground) 12%,transparent);box-shadow:0 14px 40px -10px rgba(0,0,0,.35)}
.pj-mh{padding:10px 12px 6px;font-size:13.5px;color:color-mix(in oklab,var(--foreground) 40%,transparent)}
.pj-mi{display:flex;align-items:center;justify-content:space-between;width:100%;height:42px;padding:0 12px;border-radius:10px;font-size:16px;text-align:left}
.pj-mi:hover,.pj-mi.on{background:color-mix(in oklab,var(--foreground) 6%,transparent)}
.pj-mi svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pj-body,.pj-dl{scrollbar-width:none;-ms-overflow-style:none}
.pj-body::-webkit-scrollbar,.pj-dl::-webkit-scrollbar{display:none;width:0;height:0}

/* menu obrolan + arsip/dibagikan */
.hist-more svg{width:16px;height:16px}
.hist-more svg circle{fill:currentColor;stroke:none}
.hist-pin{position:absolute;right:34px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:18px;height:18px;opacity:.55;pointer-events:none}
.hist-pin svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hist-row:hover .hist-pin{opacity:0}
.hist-row{position:relative}
.hist-ren{display:block;width:100%;min-width:0;height:36px;padding:0 10px;border-radius:8px;border:1px solid color-mix(in oklab,var(--foreground) 30%,transparent);background:var(--background);color:var(--foreground);font:inherit;font-size:14px;outline:0}
.cm-pop{position:fixed;z-index:97;min-width:220px;max-width:calc(100vw - 16px);padding:6px;border-radius:16px;background:var(--popover);color:var(--popover-foreground);border:1px solid color-mix(in oklab,var(--foreground) 12%,transparent);box-shadow:0 18px 50px -12px rgba(0,0,0,.4);animation:srchPop .14s ease both}
.cm-it{display:flex;align-items:center;gap:14px;width:100%;height:44px;padding:0 12px;border-radius:10px;font-size:15.5px;text-align:left;color:inherit}
.cm-it:hover{background:color-mix(in oklab,var(--foreground) 7%,transparent)}
.cm-it svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.cm-it>span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cm-rt{display:grid;place-items:center;font-style:normal;opacity:.7}
.cm-rt svg{width:16px;height:16px}
.cm-em{width:20px;text-align:center;font-size:17px;line-height:1}
.cm-it.del{color:#d33}
.cm-bk{font-weight:500}
.cm-sep{height:1px;margin:4px 6px;background:color-mix(in oklab,var(--foreground) 10%,transparent)}
.sidebar.sub-open>:not(.sb-head):not(.sb-sub):not(.sb-foot){display:none!important}
.sidebar.closed .sb-sub{display:none}
.sb-sub{flex:1;min-height:0;overflow-y:auto;padding:8px 8px 8px;display:flex;flex-direction:column}
.sb-sub[hidden]{display:none}
.sb-back{align-self:flex-start;display:inline-flex;align-items:center;gap:8px;height:38px;padding:0 16px;margin:4px 0 6px 4px;border-radius:12px;background:var(--foreground);color:var(--background);font-size:14.5px;font-weight:500}
.sb-back svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sb-sub .pj-tabs{margin-top:12px}
.sb-sub .pj-tab{padding:11px 0;font-size:14.5px;color:color-mix(in oklab,var(--foreground) 55%,transparent)}
.sb-sub .pj-tab.on{color:var(--foreground)}
.sb-sl{padding-top:10px}
.cm-it>.cm-em{flex:none;width:20px}

/* skills */
.composer-wrap{position:relative}
.sk-act{display:flex;align-items:center;gap:8px;width:max-content;max-width:100%;margin:0 0 8px;padding:6px 6px 6px 12px;border-radius:999px;font-size:13.5px;font-weight:500;background:color-mix(in oklab,var(--foreground) 7%,transparent);color:var(--foreground)}
.sk-act[hidden],.sk-pop[hidden]{display:none}
.sk-act svg{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sk-act span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sk-act button{width:22px;height:22px;display:grid;place-items:center;border-radius:50%;color:inherit;opacity:.65}
.sk-act button:hover{opacity:1;background:color-mix(in oklab,var(--foreground) 12%,transparent)}
.sk-act button svg{width:12px;height:12px}
.sk-pop{position:absolute;left:16px;right:16px;bottom:100%;z-index:20;max-height:160px;overflow-y:auto;padding:6px;margin-bottom:6px;border-radius:16px;background:var(--popover);color:var(--popover-foreground);border:1px solid color-mix(in oklab,var(--foreground) 12%,transparent);box-shadow:0 18px 50px -12px rgba(0,0,0,.4);scrollbar-width:none}
.sk-pop::-webkit-scrollbar{display:none}
.sk-op{display:block;width:100%;padding:9px 12px;border-radius:10px;text-align:left;color:inherit}
.sk-op b{display:block;font-size:15px;font-weight:600}
.sk-op span{display:block;font-size:13px;margin-top:1px;color:color-mix(in oklab,var(--foreground) 58%,transparent);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sk-op.hi,.sk-op:hover{background:color-mix(in oklab,var(--foreground) 7%,transparent)}
.sk-ic svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.sk-new{flex:none;height:38px;padding:0 16px;border-radius:12px;font-size:14.5px;font-weight:500;background:var(--foreground);color:var(--background)}
.sk-new:hover{opacity:.88}
.sk-sub{margin:16px 0 4px;font-size:15px;line-height:1.5;color:color-mix(in oklab,var(--foreground) 60%,transparent)}
.sk-card{margin-top:12px;padding:16px;border-radius:16px;border:1px solid color-mix(in oklab,var(--foreground) 12%,transparent);background:var(--card);transition:opacity .15s}
.sk-card.off{opacity:.6}
.sk-row{display:flex;align-items:center;gap:10px}
.sk-n{flex:1;min-width:0;font-size:16px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sk-tag{flex:none;padding:2px 8px;border-radius:999px;font-size:11.5px;background:color-mix(in oklab,var(--foreground) 8%,transparent);color:color-mix(in oklab,var(--foreground) 65%,transparent)}
.sk-row .sk-n{flex:0 1 auto}
.sk-row .sk-sw{margin-left:auto}
.sk-d{margin:6px 0 0;font-size:14.5px;line-height:1.45;color:color-mix(in oklab,var(--foreground) 62%,transparent)}
.sk-btns{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.sk-btn{height:36px;padding:0 14px;border-radius:10px;font-size:14px;font-weight:500;background:color-mix(in oklab,var(--foreground) 7%,transparent);color:var(--foreground)}
.sk-btn:hover{background:color-mix(in oklab,var(--foreground) 12%,transparent)}
.sk-btn.pri{background:var(--foreground);color:var(--background)}
.sk-btn.dg{color:#d33}
.sk-btn:disabled{opacity:.35;cursor:default}
.sk-sw{flex:none;position:relative;width:42px;height:24px;border-radius:999px;background:color-mix(in oklab,var(--foreground) 22%,transparent);transition:background .18s}
.sk-sw::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:transform .18s}
.sk-sw[aria-checked="true"]{background:#2f8cdc}
.sk-sw[aria-checked="true"]::after{transform:translateX(18px)}
.sk-lb{font-size:15px;font-weight:500;margin:16px 0 8px}
.sk-in{width:100%;height:46px;padding:0 14px;border-radius:12px;border:1px solid color-mix(in oklab,var(--foreground) 14%,transparent);background:transparent;color:inherit;font:inherit;font-size:16px;outline:0}
.sk-in:focus{border-color:var(--foreground)}
.sk-ro{white-space:pre-wrap;font-size:15px;line-height:1.55;color:color-mix(in oklab,var(--foreground) 75%,transparent);margin:0}
@media (min-width:769px){.pj-top{display:none}.pj-body{padding-top:36px}}

/* connectors */
.pj-chip.on{background:var(--foreground);color:var(--background);border-color:var(--foreground)}
.pj-dl .pj-chips{margin:0 0 6px}
.cn-warn{margin:12px 0 0;padding:10px 12px;border-radius:12px;font-size:13.5px;line-height:1.45;background:color-mix(in oklab,#e0a100 16%,transparent);color:var(--foreground)}
.cn-warn[hidden]{display:none}
.cn-hint{margin:10px 0 0;font-size:13.5px;line-height:1.45;color:color-mix(in oklab,var(--foreground) 58%,transparent)}
.sk-d{overflow-wrap:anywhere}
.pj-em svg{width:56px;height:56px;fill:none;stroke:var(--foreground);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.cn-dl textarea,.sk-dl textarea{resize:none;height:120px;min-height:0;max-height:120px;overflow-y:auto}

/* keyboard */
html.kb .app{height:var(--vvh);margin-top:var(--vvt,0px)}
html.kb,html.kb body{overflow:hidden}

html.kb-home .app{height:var(--hfix)}
html.kb-home,html.kb-home body{overflow:hidden}

/* halaman proyek: tampilan baru */
.pj::before{content:"";position:absolute;left:0;right:0;top:0;height:300px;pointer-events:none;z-index:0;background:radial-gradient(60% 100% at 30% 0,color-mix(in oklab,#5bb4f6 15%,transparent),transparent 70%),radial-gradient(45% 85% at 90% 0,color-mix(in oklab,#6446da 11%,transparent),transparent 70%)}
.pj>*{position:relative;z-index:1}
.pj-hd{gap:16px}
.pj-ic{width:58px;height:58px;font-size:29px;background:var(--card);border:1px solid color-mix(in oklab,var(--foreground) 10%,transparent);box-shadow:0 6px 20px -10px rgba(0,0,0,.3)}
.pj-nb{flex:1;min-width:0}
.pj-nb .pj-nm{display:block;font-size:clamp(22px,6vw,30px);line-height:1.15}
.pj-meta{margin-top:4px;font-size:13.5px;color:color-mix(in oklab,var(--foreground) 55%,transparent);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pj-more{background:var(--card);border:1px solid color-mix(in oklab,var(--foreground) 10%,transparent)}
.pj .pj-tabs{gap:4px;padding:4px;margin-top:24px;border:0;border-radius:14px;background:color-mix(in oklab,var(--foreground) 6%,transparent)}
.pj .pj-tab{display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 0;margin:0;border:0;border-radius:10px;font-size:14.5px;font-weight:500}
.pj .pj-tab.on{background:var(--background);color:var(--foreground);box-shadow:0 1px 4px rgba(0,0,0,.14)}
.pj-bd{padding:1px 8px;border-radius:999px;font-size:12px;background:color-mix(in oklab,var(--foreground) 9%,transparent)}
.pj-pane{padding-top:6px}
.pj-ls{gap:8px;padding-top:14px}
.pj-ci{gap:12px;padding:14px 14px 14px 16px;border:1px solid color-mix(in oklab,var(--foreground) 9%,transparent);border-radius:16px;background:var(--card);transition:border-color .15s,transform .15s,box-shadow .15s}
.pj-ci:hover{background:var(--card);border-color:color-mix(in oklab,var(--foreground) 22%,transparent);transform:translateY(-1px);box-shadow:0 8px 22px -14px rgba(0,0,0,.35)}
.pj-cm{flex:1;min-width:0;display:block}
.pj-cm .pj-ct{display:block;font-size:15.5px;font-weight:500}
.pj-cs{display:block;margin-top:3px;font-size:13.5px;color:color-mix(in oklab,var(--foreground) 52%,transparent);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pj-cr2{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:3px}
.pj-cn{font-size:11.5px;color:color-mix(in oklab,var(--foreground) 45%,transparent)}
.pj-ch2{flex:none;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;opacity:.4}
.pj-card{margin-top:12px;padding:16px;border-radius:16px;border:1px solid color-mix(in oklab,var(--foreground) 10%,transparent);background:var(--card)}
.pj-card.tap{cursor:pointer;transition:border-color .15s}
.pj-card.tap:hover{border-color:color-mix(in oklab,var(--foreground) 24%,transparent)}
.pj-card .pj-sl{margin:0}
.pj-card .pj-sv{margin-top:6px}
.pj-card .pj-sv.ph{color:color-mix(in oklab,var(--foreground) 42%,transparent)}
.pj-ch{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:30px}
.pj-mini{height:30px;padding:0 13px;border-radius:9px;font-size:13px;font-weight:500;background:color-mix(in oklab,var(--foreground) 8%,transparent);color:var(--foreground)}
.pj-mini:hover{background:color-mix(in oklab,var(--foreground) 14%,transparent)}
.pj-cx{display:flex;align-items:center;gap:16px}
.pj-cxt{flex:1;min-width:0}
.pj-files{border-style:dashed;text-align:center;padding:26px 16px 20px}
.pj-files>svg{width:30px;height:30px;margin:0 auto 10px;display:block;fill:none;stroke:color-mix(in oklab,var(--foreground) 50%,transparent);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.pj-files .pj-btn{margin-top:16px}
.pj-cbox{border-radius:22px;box-shadow:0 10px 32px -14px rgba(0,0,0,.28);transition:border-color .15s}
.pj-cbox:focus-within{border-color:color-mix(in oklab,var(--foreground) 35%,transparent)}

/* skeleton kartu (Skills & Connectors) */
.sh-b{display:block;border-radius:8px;--b:color-mix(in oklab,var(--foreground) 8%,transparent);--h:color-mix(in oklab,var(--foreground) 16%,transparent);background:linear-gradient(100deg,var(--b) 30%,var(--h) 50%,var(--b) 70%) 100% 0/300% 100%;animation:sklS 1.5s ease-in-out infinite}
.sh-sw{margin-left:auto;flex:none;width:42px;height:24px;border-radius:999px}
.sh-card .sk-row{align-items:center}

/* tombol sidebar di header sedikit lebih besar */
header #toggle2{width:40px;height:40px;border-radius:10px}
header #toggle2 svg{font-size:22px!important}
.pj-top .icon-btn{width:40px;height:40px;border-radius:10px}
.pj-top .icon-btn svg{font-size:22px}
/* ikon di dalam sidebar (cari & tutup sidebar) sedikit lebih besar */
.sidebar:not(.closed) .sb-head .icon-btn{width:40px;height:40px;border-radius:10px}
.sidebar:not(.closed) .sb-head .icon-btn svg{font-size:22px!important}

/* memori */
.mm-t{margin:0;font-size:15.5px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.mm-card .sk-d{margin-top:8px}
.mm-dl textarea{resize:none;height:120px;min-height:0;max-height:120px;overflow-y:auto}
.mm-cnt{margin-top:6px;text-align:right;font-size:12.5px;color:color-mix(in oklab,var(--foreground) 50%,transparent)}
.mm-all{margin-top:18px;color:#d33;background:transparent;border:1px solid color-mix(in oklab,#d33 35%,transparent)}
.mm-all:hover{background:color-mix(in oklab,#d33 8%,transparent)}
#mmPage .pj-cx{margin-top:14px}

/* instruksi umum */
.gi-card{padding:18px}
.gi-tones{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:10px}
.gi-tone{padding:10px 6px;border-radius:10px;border:1px solid var(--border,rgba(0,0,0,.12));background:transparent;color:var(--foreground);font:inherit;font-size:14px;cursor:pointer}
.gi-tone.on{background:var(--foreground);color:var(--background,#fff);border-color:var(--foreground)}
#giPage .pj-sd{margin-top:10px}
#giPage textarea{display:block;width:100%;box-sizing:border-box;margin-top:8px;resize:none;height:130px;overflow-y:auto}
#giPage .pj-chips{margin-top:10px}
#giPage .pj-save:disabled{cursor:default}
@media (max-width:480px){.gi-tones{grid-template-columns:repeat(2,1fr)}}
#giPage textarea{border:1px solid var(--border,rgba(0,0,0,.12));border-radius:12px;padding:10px 12px;background:transparent;color:var(--foreground);font:inherit;font-size:15px;outline:none}
#giPage textarea:focus{border-color:color-mix(in oklab,var(--foreground) 45%,transparent)}

/* brand sidebar */
.sb-brand{margin-left:8px;font-size:20px;font-weight:700;letter-spacing:-.03em;line-height:1;background:linear-gradient(100deg,var(--foreground) 30%,color-mix(in oklab,var(--foreground) 55%,#6d5dfc) 100%);-webkit-background-clip:text;background-clip:text;color:transparent;white-space:nowrap}
.sidebar.closed .sb-head>.sb-brand{display:none}
.sb-brand{font-weight:800;font-size:21px;letter-spacing:-.035em;}
.sb-brand{text-shadow:none;-webkit-text-stroke:0;font-variation-settings:"wght" 850}

/* drop overlay */
#dropOv{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;pointer-events:none;opacity:0;visibility:hidden;background:color-mix(in oklab,var(--background) 45%,transparent);-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0);transition:opacity .22s ease,backdrop-filter .28s ease,-webkit-backdrop-filter .28s ease,visibility 0s linear .28s}
#dropOv.on{opacity:1;visibility:visible;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transition:opacity .22s ease,backdrop-filter .28s ease,-webkit-backdrop-filter .28s ease,visibility 0s}
#dropOv .dr-box{display:flex;flex-direction:column;align-items:center;gap:12px;color:var(--foreground);font-size:15px;font-weight:500;transform:scale(.94) translateY(6px);transition:transform .35s var(--ease-spring)}
#dropOv.on .dr-box{transform:none}
#dropOv svg{width:40px;height:40px;stroke-width:2.2}
#dropOv.on svg{animation:drUp 1.1s ease-in-out infinite}
@keyframes drUp{0%,100%{transform:translateY(3px)}50%{transform:translateY(-6px)}}

/* tanpa logo & tanpa "Thinking" setelah jawaban */
.msg.bot>.avatar{display:none!important}
.msg.bot{gap:0}
.bubble .tko{display:none!important}
/* ===== rapikan tata letak sidebar ===== */
.sidebar:not(.closed){padding:14px 10px 10px}
.sidebar:not(.closed) .sb-head{padding:2px 6px 14px}
.sidebar:not(.closed) #newChat{height:42px;border-radius:12px;gap:10px;padding:0 14px;font-size:14px;font-weight:600;background:var(--foreground);color:var(--background);border:0;box-shadow:0 1px 2px rgba(0,0,0,.12);justify-content:flex-start}
.sidebar:not(.closed) #newChat:hover{opacity:.9;background:var(--foreground)}
.sidebar:not(.closed) #newChat svg{font-size:17px!important}
.sidebar:not(.closed) #delAll,.sidebar:not(.closed) #ctxBtn,.sidebar:not(.closed) #bugBtn,.sidebar:not(.closed) #theme{height:40px;border-radius:10px;padding:0 14px;gap:12px;font-size:14px;font-weight:500;margin-top:2px!important;color:color-mix(in oklab,var(--sidebar-foreground) 85%,transparent)}
.sidebar:not(.closed) #ctx{margin-top:2px}
.sidebar:not(.closed) .sb-sec-h{padding:0 6px 0 14px;height:34px;margin-top:14px}
.sidebar:not(.closed) .sb-sec-t{font-size:11.5px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:color-mix(in oklab,var(--sidebar-foreground) 55%,transparent)}
.sidebar:not(.closed) .sb-sec-a button{width:30px;height:30px;border-radius:8px}
.sidebar:not(.closed) .prj-list>*{font-size:14px}
.sidebar:not(.closed) .hist{margin-top:2px;padding-bottom:6px}
.sidebar:not(.closed) .hist-label{font-size:11.5px;padding:10px 14px 4px;font-weight:500;color:color-mix(in oklab,var(--sidebar-foreground) 45%,transparent)}
.sidebar:not(.closed) .hist-item{height:40px;display:flex;align-items:center;padding:0 38px 0 14px;font-size:14px;border-radius:10px}
.sidebar:not(.closed) .hist-item.active{font-weight:600;background:color-mix(in oklab,var(--sidebar-foreground) 10%,transparent)}
.sidebar:not(.closed) .sb-foot{margin-top:6px;padding-top:8px}
.sidebar:not(.closed) .ctx-it{height:38px}
.sidebar:not(.closed) .hist-item{display:block;line-height:40px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar:not(.closed) .prj-list>.hist-label,.sidebar:not(.closed) .prj-empty{padding-left:14px}
.sidebar:not(.closed) .sb-foot{margin-top:auto!important}
.sidebar:not(.closed) .hist{flex:0 1 auto}
.sidebar:not(.closed) .hist[hidden]{display:none}
/* jangan gepeng saat daftar chat dibuka/tutup */
.sidebar>*:not(.hist){flex-shrink:0}
.sidebar .new-chat,.sidebar .sb-sec,.sidebar .sb-sec-h,.sidebar .ctx{flex-shrink:0}
.sidebar:not(.closed) .hist{flex:1 1 0;min-height:0}
.sidebar:not(.closed) #newChat{min-height:42px;flex:none}
.sidebar:not(.closed) #delAll,.sidebar:not(.closed) #ctxBtn{min-height:40px;flex:none}
.sidebar:not(.closed) #ctx{flex:none;min-height:40px}
.sidebar:not(.closed) .sb-sec,.sidebar:not(.closed) .sb-sec-h,.sidebar:not(.closed) .sb-foot{flex:none}
.sidebar:not(.closed) .hist{overflow-y:auto;overscroll-behavior:contain}
.sidebar .sb-foot,.sidebar:not(.closed) .sb-foot{border-top:0!important}

/* animasi buka/tutup menu Context */
.ctx-sub.opening{animation:ctxOpen .32s cubic-bezier(.22,1,.36,1) both;transform-origin:top;overflow:hidden}
.ctx-sub.opening .ctx-it{animation:ctxIt .34s cubic-bezier(.22,1,.36,1) both}
.ctx-sub.opening .ctx-it:nth-child(2){animation-delay:.04s}
.ctx-sub.opening .ctx-it:nth-child(3){animation-delay:.08s}
.ctx-sub.opening .ctx-it:nth-child(4){animation-delay:.12s}
.ctx-sub.closing{animation:ctxClose .2s ease both;overflow:hidden;pointer-events:none}
@keyframes ctxOpen{from{opacity:0;max-height:0;transform:translateY(-6px)}to{opacity:1;max-height:160px;transform:none}}
@keyframes ctxClose{from{opacity:1;max-height:160px}to{opacity:0;max-height:0;transform:translateY(-6px)}}
@keyframes ctxIt{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:none}}


/* tombol ulangi jawaban */
.acts .a-rg.spin svg{animation:rgSpin .6s ease-in-out}
@keyframes rgSpin{to{transform:rotate(360deg)}}
/* animasi di samping "Thinking..." (orbit) */
.bubble .shimmer-text::before{content:"";display:inline-block;width:16px;height:16px;margin-right:9px;vertical-align:-3px;border-radius:50%;background:conic-gradient(from 0deg,rgba(167,139,250,0) 0deg,#a78bfa 110deg,#4ade80 230deg,#38bdf8 340deg,#38bdf8 360deg);-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));animation:thOrbit .9s linear infinite}
@keyframes thOrbit{to{transform:rotate(360deg)}}
