/* ============================================================
   Grok Bot — dark glass UI
   ============================================================ */
:root{
  --bg:#09090b;
  --bg-2:#0d0d12;
  --panel:rgba(22,22,28,.72);
  --panel-solid:#15151b;
  --stroke:rgba(255,255,255,.09);
  --stroke-strong:rgba(255,255,255,.15);
  --text:#f4f4f5;
  --text-2:#c9c9d1;
  --muted:#8b8b98;
  --accent:#a78bfa;
  --accent-2:#6366f1;
  --accent-soft:rgba(139,92,246,.16);
  --user-grad:linear-gradient(135deg,#7c5cf5 0%,#5b53e8 55%,#4f46e5 100%);
  --radius:22px;
  --safe-b:env(safe-area-inset-bottom,0px);
  --safe-t:env(safe-area-inset-top,0px);
  --font:"Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Segoe UI",system-ui,sans-serif;
  --mono:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,"Liberation Mono",monospace;
}
*,*::before,*::after{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--bg);color:var(--text);font-family:var(--font);
  font-size:16px;line-height:1.6;letter-spacing:-.01em;
  overflow:hidden;overscroll-behavior:none;
  -webkit-font-smoothing:antialiased;
}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;touch-action:manipulation}
textarea{font:inherit;color:inherit}
svg{display:block}
::selection{background:rgba(139,92,246,.35)}

/* ---------- app frame ---------- */
.app{
  position:relative;display:flex;flex-direction:column;
  height:100vh;height:100dvh;width:100%;
  isolation:isolate;overflow:hidden;
}

/* ---------- ambient background ---------- */
.aura{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none}
.aura::before{
  content:"";position:absolute;inset:0;
  background:
    radial-gradient(120% 70% at 50% -10%,rgba(124,92,245,.16),transparent 62%),
    radial-gradient(90% 60% at 90% 110%,rgba(79,70,229,.13),transparent 60%);
}
.orb{position:absolute;border-radius:50%;filter:blur(64px);opacity:.5;will-change:transform}
.orb-a{width:340px;height:340px;left:-120px;top:-140px;background:radial-gradient(circle,#7c3aed 0%,rgba(124,58,237,0) 70%);animation:float1 18s ease-in-out infinite}
.orb-b{width:320px;height:320px;right:-140px;top:22%;background:radial-gradient(circle,#4338ca 0%,rgba(67,56,202,0) 70%);animation:float2 22s ease-in-out infinite}
.orb-c{width:280px;height:280px;left:20%;bottom:-160px;background:radial-gradient(circle,#a855f7 0%,rgba(168,85,247,0) 70%);opacity:.28;animation:float3 26s ease-in-out infinite}
.grain{
  position:absolute;inset:0;opacity:.22;mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
@keyframes float1{0%,100%{transform:translate3d(0,0,0)}50%{transform:translate3d(28px,34px,0)}}
@keyframes float2{0%,100%{transform:translate3d(0,0,0)}50%{transform:translate3d(-34px,-26px,0)}}
@keyframes float3{0%,100%{transform:translate3d(0,0,0)}50%{transform:translate3d(22px,-30px,0)}}

/* ---------- topbar ---------- */
.topbar{
  position:relative;z-index:20;flex:0 0 auto;
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:calc(var(--safe-t) + 10px) 14px 10px;
  background:linear-gradient(180deg,rgba(9,9,11,.92),rgba(9,9,11,.55) 70%,rgba(9,9,11,0));
  backdrop-filter:blur(18px) saturate(140%);
  -webkit-backdrop-filter:blur(18px) saturate(140%);
}
.topbar::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.08),transparent);
}
.brand{display:flex;align-items:center;gap:11px;padding:4px 6px 4px 2px;border-radius:16px;min-width:0}
.brand:active{background:rgba(255,255,255,.04)}
.brand-mark{display:block;width:38px;height:38px;flex:0 0 auto;filter:drop-shadow(0 6px 14px rgba(109,74,240,.35))}
.brand-mark svg{width:100%;height:100%}
.brand-text{display:flex;flex-direction:column;align-items:flex-start;min-width:0;gap:1px}
.brand-title{font-size:16px;font-weight:650;letter-spacing:-.02em;line-height:1.2}
.brand-sub{
  display:inline-flex;align-items:center;gap:5px;
  font-size:11.5px;font-weight:520;color:var(--text-2);
  padding:2px 7px 2px 6px;margin-left:-1px;border-radius:999px;
  background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.07);
  max-width:190px;
}
.brand-sub #modelName{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand-sub .dot{width:5px;height:5px;border-radius:50%;background:#a78bfa;box-shadow:0 0 8px rgba(167,139,250,.9);flex:0 0 auto}
.brand-sub .chev{width:12px;height:12px;opacity:.55;flex:0 0 auto}

.top-actions{display:flex;align-items:center;gap:2px;flex:0 0 auto}
.ghost-btn{
  position:relative;display:grid;place-items:center;
  width:40px;height:40px;border-radius:14px;color:var(--text-2);
  transition:background .18s ease,color .18s ease,transform .18s ease;
}
.ghost-btn svg{width:21px;height:21px}
.ghost-btn:hover{background:rgba(255,255,255,.06);color:#fff}
.ghost-btn:active{transform:scale(.93)}
.ghost-btn.small{width:34px;height:34px;border-radius:12px}
.ghost-btn.small svg{width:17px;height:17px}
.avatar{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:linear-gradient(135deg,rgba(167,139,250,.28),rgba(99,102,241,.25));color:#ddd6fe}
.avatar svg{width:15px;height:15px}
.status-dot{
  position:absolute;right:6px;bottom:6px;width:8px;height:8px;border-radius:50%;
  background:#52525b;border:1.5px solid #0b0b0f;transition:background .25s ease,box-shadow .25s ease;
}
.status-dot.on{background:#34d399;box-shadow:0 0 9px rgba(52,211,153,.75)}
.status-dot.off{background:#f59e0b;box-shadow:0 0 9px rgba(245,158,11,.55)}

/* ---------- banner ---------- */
.banner{
  position:relative;z-index:19;flex:0 0 auto;
  display:flex;align-items:flex-start;gap:8px;
  margin:2px 12px 6px;padding:10px 10px 10px 12px;
  border-radius:16px;font-size:12.5px;line-height:1.5;color:#e6e1ff;
  background:linear-gradient(135deg,rgba(124,92,245,.2),rgba(60,52,140,.20));
  border:1px solid rgba(167,139,250,.28);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  animation:slideDown .28s ease both;
}
.banner[hidden]{display:none}
.banner > svg{width:17px;height:17px;flex:0 0 auto;margin-top:1px;color:#c4b5fd}
.banner span{flex:1 1 auto;padding-top:1px}
.banner b{font-weight:650}
.banner-close{flex:0 0 auto;width:24px;height:24px;display:grid;place-items:center;border-radius:8px;color:#c4b5fd;opacity:.8}
.banner-close svg{width:13px;height:13px}
.banner-close:hover{background:rgba(255,255,255,.08)}
.banner-login{
  display:inline-flex;align-items:center;margin-left:5px;padding:4px 11px;border-radius:999px;
  font-size:11.5px;font-weight:650;color:#f5f3ff;
  background:rgba(167,139,250,.26);border:1px solid rgba(167,139,250,.5);
  vertical-align:middle;
}
.banner-login:active{transform:scale(.96)}
@keyframes slideDown{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

/* ---------- chat ---------- */
.chat{
  position:relative;z-index:10;flex:1 1 auto;min-height:0;
  overflow-y:auto;overflow-x:hidden;
  -webkit-overflow-scrolling:touch;overscroll-behavior-y:contain;
  scrollbar-width:none;
  padding:4px 0 20px;
}
.chat::-webkit-scrollbar{display:none}
.chat-inner{display:flex;flex-direction:column;gap:18px;width:100%;max-width:760px;margin:0 auto;padding:8px 16px 4px}

/* ---------- welcome ---------- */
.welcome{
  position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:0;padding:24px 22px 30px;text-align:center;
  transition:opacity .35s ease,transform .45s cubic-bezier(.22,1,.36,1);
}
.welcome.hide{opacity:0;visibility:hidden;transform:translateY(-14px) scale(.985);pointer-events:none}
.welcome-mark{position:relative;width:92px;height:92px;margin-bottom:22px;display:grid;place-items:center}
.welcome-mark svg{width:78px;height:78px;position:relative;z-index:2;filter:drop-shadow(0 10px 30px rgba(139,92,246,.55))}
.welcome-mark .halo{
  position:absolute;inset:-26px;border-radius:50%;
  background:radial-gradient(circle,rgba(139,92,246,.32),rgba(99,102,241,.10) 45%,transparent 70%);
  animation:pulseHalo 5s ease-in-out infinite;
}
@keyframes pulseHalo{0%,100%{transform:scale(1);opacity:.85}50%{transform:scale(1.12);opacity:1}}
.welcome-title{
  margin:0 0 10px;font-size:27px;line-height:1.28;font-weight:700;letter-spacing:-.035em;
  background:linear-gradient(180deg,#fff 20%,#cbc6e6 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.welcome-sub{margin:0 0 26px;font-size:13.5px;line-height:1.65;color:var(--text-2)}
.welcome-sub b{color:#d8ccff;font-weight:650}
.welcome-sub .muted{color:var(--muted);font-size:12.5px}
.chips{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:400px}
.chip{
  display:inline-flex;align-items:center;gap:7px;
  padding:9px 14px;border-radius:999px;
  font-size:13px;font-weight:520;color:#e4e2ef;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.085);
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  transition:transform .16s ease,background .2s ease,border-color .2s ease,box-shadow .2s ease;
  animation:chipIn .45s cubic-bezier(.22,1,.36,1) both;
}
.chip svg{width:15px;height:15px;color:#b9a6ff;flex:0 0 auto}
.chip:nth-child(1){animation-delay:.05s}
.chip:nth-child(2){animation-delay:.1s}
.chip:nth-child(3){animation-delay:.15s}
.chip:nth-child(4){animation-delay:.2s}
.chip:hover{background:rgba(139,92,246,.14);border-color:rgba(167,139,250,.35);box-shadow:0 6px 20px -10px rgba(124,92,245,.8)}
.chip:active{transform:scale(.96)}
@keyframes chipIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* ---------- messages ---------- */
.msg{display:flex;gap:10px;animation:msgIn .34s cubic-bezier(.22,1,.36,1) both}
@keyframes msgIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.msg.user{justify-content:flex-end}
.msg .who{
  flex:0 0 auto;width:30px;height:30px;border-radius:10px;display:grid;place-items:center;
  margin-top:2px;background:linear-gradient(135deg,rgba(139,92,246,.22),rgba(79,70,229,.16));
  border:1px solid rgba(167,139,250,.22);color:#c4b5fd;
}
.msg .who svg{width:17px;height:17px}
.msg .col{min-width:0;max-width:calc(100% - 44px);display:flex;flex-direction:column;gap:5px;align-items:flex-start}.msg.user .col{align-items:flex-end}
.bubble{
  position:relative;max-width:100%;min-width:0;
  padding:11px 15px;border-radius:20px;
  font-size:15px;line-height:1.62;letter-spacing:-.005em;
  word-break:break-word;overflow-wrap:anywhere;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.075);
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  box-shadow:0 1px 0 rgba(255,255,255,.04) inset,0 10px 26px -22px #000;
}
.msg.assistant .bubble{border-top-left-radius:7px}
.msg.user .bubble{
  border-top-right-radius:7px;
  background:var(--user-grad);
  border-color:rgba(255,255,255,.14);
  color:#fff;
  box-shadow:0 10px 26px -16px rgba(99,102,241,.75),0 1px 0 rgba(255,255,255,.18) inset;
}
.msg .meta{
  display:flex;align-items:center;gap:8px;
  font-size:10.5px;color:#6f6f7d;padding:0 4px;
}
.msg .meta .model-tag{opacity:.75}
.msg.user .bubble.plain{white-space:pre-wrap}
.msg .error-box{
  display:flex;gap:10px;align-items:flex-start;
  padding:11px 13px;border-radius:16px;font-size:13px;line-height:1.55;
  background:rgba(248,113,113,.09);border:1px solid rgba(248,113,113,.28);color:#fecaca;
}
.msg .error-box svg{width:16px;height:16px;flex:0 0 auto;margin-top:2px;color:#f87171}
.msg .error-box b{display:block;color:#fee2e2;font-weight:650;margin-bottom:2px}
.msg .retry{
  margin-top:7px;display:inline-flex;align-items:center;gap:6px;
  font-size:12px;font-weight:600;color:#c4b5fd;
  padding:6px 12px;border-radius:999px;background:rgba(139,92,246,.14);border:1px solid rgba(167,139,250,.28);
}
.msg .retry svg{width:13px;height:13px}

/* actions under assistant bubble */
.msg-actions{display:flex;gap:4px;padding:1px 2px 0;opacity:0;transition:opacity .2s ease}
.msg.assistant:hover .msg-actions,.msg.assistant:focus-within .msg-actions,.msg-actions.show{opacity:1}
.mini-btn{
  display:inline-flex;align-items:center;gap:5px;height:27px;padding:0 9px;border-radius:9px;
  font-size:11.5px;font-weight:520;color:#9d9dab;transition:background .16s ease,color .16s ease;
}
.mini-btn svg{width:13px;height:13px}
.mini-btn:hover{background:rgba(255,255,255,.07);color:#e4e4e7}
.mini-btn.done{color:#34d399}
@media (hover:none){.msg-actions{opacity:1}}

/* typing */
.typing{display:inline-flex;align-items:center;gap:4px;min-height:22px}
.typing i{width:6px;height:6px;border-radius:50%;background:#a78bfa;opacity:.45;animation:typePulse 1.3s ease-in-out infinite}
.typing i:nth-child(2){animation-delay:.16s}
.typing i:nth-child(3){animation-delay:.32s}
@keyframes typePulse{0%,60%,100%{transform:translateY(0) scale(.9);opacity:.35}30%{transform:translateY(-4px) scale(1);opacity:1}}
.thinking-label{font-size:11.5px;color:#8b8b98;margin-left:8px;letter-spacing:-.01em}
.caret{
  display:inline-block;width:2px;height:1.02em;margin-left:1px;vertical-align:-2px;border-radius:2px;
  background:#a78bfa;animation:blink 1.05s steps(1) infinite;
}
@keyframes blink{0%,49%{opacity:1}50%,100%{opacity:0}}

/* ---------- markdown ---------- */
.md{font-size:15px;line-height:1.68;min-width:0;max-width:100%}
.md > *:first-child{margin-top:0}
.md > *:last-child{margin-bottom:0}
.md p{margin:0 0 .78em}
.md h1,.md h2,.md h3{margin:1.15em 0 .5em;line-height:1.35;font-weight:680;letter-spacing:-.02em}
.md h1{font-size:19px}
.md h2{font-size:17px}
.md h3{font-size:15.5px}
.md strong{font-weight:680;color:#fff}
.msg.user .md strong{color:#fff}
.md em{font-style:italic;color:#e9e6f5}
.md a{color:#b9a6ff;text-decoration:none;border-bottom:1px solid rgba(185,166,255,.35)}
.md ul,.md ol{margin:0 0 .8em;padding-left:1.25em}
.md li{margin:.22em 0}
.md li::marker{color:#8b7bd8}
.md blockquote{
  margin:.7em 0;padding:.55em .95em;border-left:2px solid rgba(167,139,250,.55);
  background:rgba(139,92,246,.08);border-radius:0 12px 12px 0;color:#d6d2e6;
}
.md hr{border:0;height:1px;background:rgba(255,255,255,.1);margin:1.1em 0}
.md code:not(pre code){
  font-family:var(--mono);font-size:.86em;
  padding:.14em .42em;border-radius:6px;
  background:rgba(139,92,246,.16);color:#ddd0ff;border:1px solid rgba(167,139,250,.16);
}
.msg.user .md code:not(pre code){background:rgba(0,0,0,.25);color:#fff;border-color:rgba(255,255,255,.2)}
.codeblock{
  margin:.75em 0;border-radius:14px;overflow:hidden;max-width:100%;
  background:#0c0c11;border:1px solid rgba(255,255,255,.09);
  box-shadow:0 16px 30px -26px #000;
}
.codeblock-head{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:7px 8px 7px 13px;background:rgba(255,255,255,.035);
  border-bottom:1px solid rgba(255,255,255,.06);
}
.codeblock-lang{font-size:10.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#8b8b98}
.code-copy{
  display:inline-flex;align-items:center;gap:5px;height:25px;padding:0 9px;border-radius:8px;
  font-size:11px;font-weight:540;color:#a1a1aa;transition:background .15s ease,color .15s ease;
}
.code-copy svg{width:12px;height:12px}
.code-copy:hover{background:rgba(255,255,255,.08);color:#fff}
.code-copy.done{color:#34d399}
.codeblock pre{
  margin:0;padding:13px 14px;overflow-x:auto;max-width:100%;
  font-family:var(--mono);font-size:12.5px;line-height:1.62;color:#e2e0ec;
  -webkit-overflow-scrolling:touch;tab-size:2;
}
.codeblock pre::-webkit-scrollbar{height:4px}
.codeblock pre::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:4px}
.md table{width:100%;border-collapse:collapse;margin:.6em 0;font-size:13.5px;display:block;overflow-x:auto}
.md th,.md td{border:1px solid rgba(255,255,255,.1);padding:6px 10px;text-align:left}
.md th{background:rgba(255,255,255,.045);font-weight:620}

/* ---------- scroll to bottom ---------- */
.scroll-bottom{
  position:absolute;z-index:15;right:50%;transform:translate(50%,10px);
  bottom:calc(var(--safe-b) + 106px);
  width:38px;height:38px;border-radius:50%;display:grid;place-items:center;
  background:rgba(28,28,36,.9);border:1px solid rgba(255,255,255,.12);
  color:#d4d4d8;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  box-shadow:0 12px 26px -14px #000;
  opacity:0;pointer-events:none;transition:opacity .22s ease,transform .22s ease;
}
.scroll-bottom svg{width:19px;height:19px}
.scroll-bottom.show{opacity:1;pointer-events:auto;transform:translate(50%,0)}
.scroll-bottom:active{transform:translate(50%,0) scale(.92)}
.scroll-badge{
  position:absolute;top:-6px;right:-4px;min-width:16px;height:16px;padding:0 4px;
  display:grid;place-items:center;border-radius:999px;
  background:linear-gradient(135deg,#a78bfa,#6366f1);color:#fff;
  font-size:9.5px;font-weight:700;box-shadow:0 0 0 2px #0b0b0f;
}

/* ---------- composer ---------- */
.composer-wrap{
  position:relative;z-index:18;flex:0 0 auto;
  padding:6px 12px calc(var(--safe-b) + 8px);
  background:linear-gradient(180deg,rgba(9,9,11,0),rgba(9,9,11,.75) 30%,rgba(9,9,11,.96));
}
.composer{
  display:flex;align-items:flex-end;gap:8px;
  width:100%;max-width:760px;margin:0 auto;
  padding:7px 7px 7px 16px;border-radius:26px;
  background:rgba(26,26,33,.86);
  border:1px solid rgba(255,255,255,.11);
  backdrop-filter:blur(22px) saturate(150%);-webkit-backdrop-filter:blur(22px) saturate(150%);
  box-shadow:0 18px 44px -22px rgba(0,0,0,.9),0 1px 0 rgba(255,255,255,.06) inset;
  transition:border-color .2s ease,box-shadow .2s ease;
}
.composer:focus-within{
  border-color:rgba(167,139,250,.42);
  box-shadow:0 18px 44px -22px rgba(0,0,0,.9),0 0 0 3px rgba(139,92,246,.12),0 1px 0 rgba(255,255,255,.06) inset;
}
.composer textarea{
  flex:1 1 auto;min-width:0;border:0;background:transparent;outline:none;resize:none;
  font-size:16px;line-height:1.5;max-height:132px;padding:9px 0;color:var(--text);
  letter-spacing:-.01em;
}
.composer textarea::placeholder{color:#6f6f7d}
.send-btn{
  flex:0 0 auto;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;
  color:#fff;background:linear-gradient(135deg,#a78bfa,#6366f1);
  box-shadow:0 8px 20px -8px rgba(124,92,245,.9);
  transition:opacity .2s ease,transform .16s ease,filter .2s ease;
}
.send-btn svg{width:19px;height:19px}
.send-btn .ico-stop{display:none}
.send-btn:disabled{opacity:.32;box-shadow:none;filter:saturate(.4)}
.send-btn:not(:disabled):active{transform:scale(.92)}
.composer.busy .send-btn{background:rgba(255,255,255,.1);box-shadow:none;border:1px solid rgba(255,255,255,.14)}
.composer.busy .send-btn .ico-send{display:none}
.composer.busy .send-btn .ico-stop{display:block}
.composer-hint{
  margin:7px auto 0;max-width:760px;text-align:center;
  font-size:10.5px;color:#5f5f6b;letter-spacing:-.01em;
}

.noscript{position:fixed;inset:auto 16px 16px;padding:14px;border-radius:14px;background:#2a1a1a;color:#fca5a5;z-index:99;text-align:center}

/* ---------- sheets ---------- */
.sheet-backdrop{
  position:fixed;inset:0;z-index:40;background:rgba(3,3,6,.6);
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
  opacity:0;transition:opacity .26s ease;
}
.sheet-backdrop.show{opacity:1}
.sheet{
  position:fixed;z-index:41;left:0;right:0;bottom:0;
  max-height:82vh;overflow-y:auto;
  padding:8px 16px calc(var(--safe-b) + 18px);
  background:linear-gradient(180deg,rgba(24,24,31,.98),rgba(14,14,19,.99));
  border-top-left-radius:26px;border-top-right-radius:26px;
  border:1px solid rgba(255,255,255,.1);border-bottom:0;
  box-shadow:0 -22px 60px -20px rgba(0,0,0,.85);
  transform:translateY(102%);transition:transform .34s cubic-bezier(.22,1,.36,1);
  scrollbar-width:none;
}
.sheet::-webkit-scrollbar{display:none}
.sheet.open{transform:translateY(0)}
.sheet-grab{width:38px;height:4px;border-radius:99px;background:rgba(255,255,255,.16);margin:4px auto 10px}
.sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:2px 2px 12px}
.sheet-head h2{margin:0 0 3px;font-size:17px;font-weight:680;letter-spacing:-.02em}
.sheet-head p{margin:0;font-size:12px;color:var(--muted)}
.sheet-list{display:flex;flex-direction:column;gap:7px}
.model-item{
  display:flex;align-items:flex-start;gap:11px;width:100%;text-align:left;
  padding:12px 13px;border-radius:16px;
  background:rgba(255,255,255,.032);border:1px solid rgba(255,255,255,.07);
  transition:background .16s ease,border-color .16s ease,transform .12s ease;
}
.model-item:active{transform:scale(.985)}
.model-item:hover{background:rgba(255,255,255,.055)}
.model-item.active{background:rgba(139,92,246,.13);border-color:rgba(167,139,250,.42)}
.model-item .m-glyph{
  flex:0 0 auto;width:30px;height:30px;border-radius:10px;display:grid;place-items:center;
  background:linear-gradient(135deg,rgba(167,139,250,.22),rgba(99,102,241,.15));
  border:1px solid rgba(167,139,250,.2);color:#c4b5fd;font-size:12px;font-weight:700;
}
.model-item .m-body{flex:1 1 auto;min-width:0}
.model-item .m-name{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:14px;font-weight:620;letter-spacing:-.02em}
.model-item .m-desc{font-size:11.5px;line-height:1.5;color:#9a9aa8;margin-top:2px}
.model-item .m-check{
  flex:0 0 auto;width:19px;height:19px;border-radius:50%;display:grid;place-items:center;
  border:1.5px solid rgba(255,255,255,.2);color:transparent;margin-top:5px;
}
.model-item.active .m-check{background:linear-gradient(135deg,#a78bfa,#6366f1);border-color:transparent;color:#fff}
.model-item .m-check svg{width:11px;height:11px}
.tag{
  display:inline-block;font-size:9.5px;font-weight:650;letter-spacing:.02em;
  padding:1.5px 6px;border-radius:999px;color:#c4b5fd;
  background:rgba(139,92,246,.16);border:1px solid rgba(167,139,250,.24);
}
.tag.green{color:#6ee7b7;background:rgba(16,185,129,.14);border-color:rgba(52,211,153,.24)}
.tag.blue{color:#93c5fd;background:rgba(59,130,246,.14);border-color:rgba(96,165,250,.24)}
.tag.gray{color:#c9c9d4;background:rgba(255,255,255,.09);border-color:rgba(255,255,255,.16)}
.sheet-foot{margin:12px 2px 0;font-size:11px;color:#666673;text-align:center}

.account-body{display:flex;flex-direction:column;gap:10px;padding-bottom:4px}
.account-card{
  display:flex;align-items:center;gap:12px;
  padding:14px;border-radius:18px;
  background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.075);
}
.account-card .a-avatar{
  width:42px;height:42px;border-radius:14px;display:grid;place-items:center;font-weight:700;font-size:16px;
  background:linear-gradient(135deg,#7c5cf5,#4f46e5);color:#fff;text-transform:uppercase;
}
.account-card .a-name{font-size:14.5px;font-weight:640;letter-spacing:-.02em}
.account-card .a-sub{font-size:11.5px;color:var(--muted);margin-top:1px}
.usage-bar{height:6px;border-radius:99px;background:rgba(255,255,255,.08);overflow:hidden;margin-top:9px}
.usage-bar span{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#a78bfa,#6366f1);transition:width .5s ease}
.account-note{font-size:12px;line-height:1.6;color:#9a9aa8;padding:0 3px}
.account-note b{color:#d4d4d8;font-weight:620}
.big-btn{
  display:flex;align-items:center;justify-content:center;gap:8px;width:100%;
  height:46px;border-radius:15px;font-size:14px;font-weight:640;
  color:#fff;background:linear-gradient(135deg,#8b5cf6,#4f46e5);
  box-shadow:0 14px 30px -16px rgba(124,92,245,.9);
}
.big-btn svg{width:17px;height:17px}
.big-btn.ghost{background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.1);color:#e4e4e7;box-shadow:none;font-weight:560}
.big-btn:active{transform:scale(.985)}

/* ---------- desktop ---------- */
@media (min-width:720px){
  .topbar{padding-left:max(24px,calc((100% - 760px)/2));padding-right:max(24px,calc((100% - 760px)/2))}
  .banner{width:calc(100% - 48px);max-width:736px;margin-left:auto;margin-right:auto}
  .composer-wrap{padding-left:24px;padding-right:24px}
  .sheet{left:50%;right:auto;transform:translate(-50%,102%);width:440px;bottom:24px;border-radius:26px;border-bottom:1px solid rgba(255,255,255,.1)}
  .sheet.open{transform:translate(-50%,0)}
  .msg .col{max-width:min(78%,640px)}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}
