/* =====================================================
   AskPC — Design System (v25 — ChatGPT-style + AskPC Colors)
   ===================================================== */

:root {
  --brand:        #4f46e5;
  --brand-2:      #06b6d4;
  --brand-soft:   #eef2ff;
  --accent:       #10b981;
  --warn:         #f59e0b;
  --danger:       #ef4444;

  --bg:           #ffffff;
  --bg-soft:      #f8fafc;
  --bg-elev:      #ffffff;
  --bg-chat:      #f5f7fa;
  --bg-status:    #eef2f7;
  --surface:      #f1f5f9;
  --border:       #e2e8f0;
  --text:         #0f172a;
  --text-soft:    #475569;
  --text-muted:   #94a3b8;

  --radius-sm:    8px;
  --radius:       14px;
  --radius-lg:    22px;
  --radius-full:  999px;

  --shadow-xs:    0 1px 2px rgba(15,23,42,.04);
  --shadow-sm:    0 2px 8px rgba(15,23,42,.06);
  --shadow-md:    0 8px 24px rgba(15,23,42,.08);
  --shadow-lg:    0 20px 50px rgba(15,23,42,.12);

  --t-fast:       .15s ease;
  --t:            .25s cubic-bezier(.4,0,.2,1);
  --t-slow:       .45s cubic-bezier(.4,0,.2,1);

  --font-ar:      'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
  --font-en:      'Inter', system-ui, -apple-system, sans-serif;
  --header-h:     68px;
}

[data-theme="dark"] {
  --bg:           #0b1220;
  --bg-soft:      #0f172a;
  --bg-elev:      #111c33;
  --bg-chat:      #0d1524;
  --bg-status:    #131e33;
  --surface:      #16233d;
  --border:       #1e2a47;
  --text:         #e6ecf5;
  --text-soft:    #a7b3c9;
  --text-muted:   #6b7a94;
  --brand-soft:   #1a2342;

  --shadow-xs:    0 1px 2px rgba(0,0,0,.4);
  --shadow-sm:    0 2px 8px rgba(0,0,0,.45);
  --shadow-md:    0 8px 24px rgba(0,0,0,.5);
  --shadow-lg:    0 20px 50px rgba(0,0,0,.6);
}

/* =====================================================
   Reset & Base
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background var(--t), color var(--t);
  overflow-x: hidden;
}

/* ✅ فقط عند وجود محادثة فعلية → نُجمّد الموقع */
body.has-chat-page.has-conversation {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

body.has-chat-page.has-conversation .site-main {
  height: calc(100dvh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow: hidden;
  padding: 0;
}

html[lang="en"] body { font-family: var(--font-en); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.site-main { padding: 0; }

/* =====================================================
   Header
   ===================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background var(--t), border-color var(--t);
}

.header-inner {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 0;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 20px; color: var(--text); flex-shrink: 0;
}
.brand-robot { color: var(--brand); display: inline-flex; }
.brand-robot.small .robot-svg { width: 28px; height: 28px; }

.robot-svg { transition: transform var(--t); }
.robot-svg .eye { animation: blink 4s infinite; transform-origin: center; }
.robot-svg .eye-right { animation-delay: .08s; }
.robot-svg .antenna-dot { animation: pulse 2.5s ease-in-out infinite; transform-origin: center; }

@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes pulse { 0%, 100% { opacity: .4; transform: scale(1); } 50% { opacity: 1; transform: scale(1.3); } }

body.is-typing .robot-svg { transform: rotate(-4deg); }
body.is-typing .robot-svg .eye { animation-duration: 1.4s; }
body.is-thinking .robot-svg { animation: think 1.2s ease-in-out infinite; }
@keyframes think {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(3deg) translateY(-2px); }
}
body.is-solved .robot-svg { animation: happy .8s ease-out; }
@keyframes happy {
  0% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

.main-nav {
  display: flex; gap: 4px; font-size: 14.5px;
  flex: 1; justify-content: center;
}
.main-nav a {
  padding: 8px 14px; border-radius: var(--radius-full);
  color: var(--text-soft);
  transition: background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { background: var(--surface); color: var(--text); }

.main-nav .mobile-login,
.main-nav .mobile-logout,
.main-nav .mobile-account { display: none; }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: transparent; color: var(--text-soft);
  border: 1px solid transparent;
  transition: background var(--t-fast), color var(--t-fast);
  position: relative; overflow: hidden;
}
.icon-btn:hover { background: var(--surface); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }

#themeToggle .icon-sun, #themeToggle .icon-moon {
  position: absolute;
  transition: opacity var(--t), transform var(--t);
  transform-origin: center;
}
#themeToggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }
#themeToggle .icon-sun  { opacity: 0; transform: rotate(-90deg) scale(.5); }
[data-theme="dark"] #themeToggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
[data-theme="dark"] #themeToggle .icon-sun  { opacity: 1; transform: rotate(0) scale(1); }

.avatar-btn {
  width: 40px; height: 40px; padding: 0;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  overflow: hidden; cursor: pointer;
}
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

.user-menu { position: relative; }
.user-dropdown {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0;
  min-width: 200px; padding: 8px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  display: flex; flex-direction: column;
  animation: fadeDown var(--t) both; z-index: 60;
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.user-dropdown a {
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-soft); font-size: 14px;
}
.user-dropdown a:hover { background: var(--surface); color: var(--text); }
.user-dropdown a.danger { color: var(--danger); }
.user-dropdown hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }

.hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 42px; height: 42px; padding: 0;
  position: relative; background: transparent;
  border: 1px solid transparent; border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--t-fast);
  z-index: 100;
}
.hamburger:hover { background: var(--surface); }
.hamburger:active { transform: scale(.95); }
.hamburger span {
  display: block; width: 22px; height: 2.5px;
  background: currentColor; border-radius: 3px;
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .3s, width .3s;
  transform-origin: center; pointer-events: none;
}
body.menu-open .hamburger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
body.menu-open .hamburger span:nth-child(2) { opacity: 0; width: 0; }
body.menu-open .hamburger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.menu-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .5);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t);
  z-index: 45;
  top: var(--header-h);
}
body.menu-open .menu-backdrop { opacity: 1; pointer-events: auto; }

/* =====================================================
   Buttons
   ===================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-full);
  font-weight: 600; font-size: 14.5px;
  border: 1px solid transparent;
  transition: all var(--t-fast);
  cursor: pointer; white-space: nowrap;
  line-height: 1.4; text-decoration: none;
  font-family: inherit;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 4px 14px rgba(79,70,229,.25);
}
.btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--brand) 90%, black); }

.btn-ghost {
  background: transparent; color: var(--text-soft);
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) { background: var(--surface); color: var(--text); }

.btn-soft { background: var(--brand-soft); color: var(--brand); }

/* =====================================================
   ✅ Chat Shell — وضع المحادثة الفعلي
   ===================================================== */
.chat-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  background: var(--bg);
  transition: background var(--t), height var(--t);
}

/* قبل البحث → الموقع يعمل طبيعي */
body:not(.has-conversation) .chat-shell {
  min-height: auto;
  overflow: visible;
}

/* ✅ بعد البحث → وضع viewport محدود */
body.has-chat-page.has-conversation .chat-shell {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  background: var(--bg-chat);
  position: relative;
}

/* =====================================================
   ✅ StatusBar — ثابت في الأعلى
   ===================================================== */
.status-bar {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding: 22px 16px 12px;
  animation: fadeUp var(--t) both;
  background: transparent;
}

body:not(.has-conversation) .status-bar { display: none; }
.status-bar[hidden] { display: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.status-bar-inner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 5px 5px 16px;
  background: var(--bg-status);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  max-width: 100%;
  flex-wrap: wrap;
}
html[dir="rtl"] .status-bar-inner {
  padding: 5px 16px 5px 5px;
}

.status-mode {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  transition: background var(--t-fast), color var(--t-fast);
}
.status-mode.brief {
  background: color-mix(in srgb, var(--brand-2) 15%, transparent);
  color: var(--brand-2);
}
.status-mode.deep {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
}

.status-sep { color: var(--text-muted); font-weight: 400; }

.status-confidence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
}
.status-confidence strong { color: var(--text); font-weight: 700; }
.status-confidence .conf-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
  background: var(--text-muted);
  transition: background var(--t-fast);
}

.status-bar-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 4px;
}

.status-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--t-fast);
}
.status-btn:hover {
  background: var(--bg-elev);
  color: var(--text);
}
.status-btn .fav-star {
  font-size: 15px;
  line-height: 1;
  color: var(--text-muted);
  transition: color var(--t-fast), transform var(--t-fast);
}
.status-btn:hover .fav-star {
  color: var(--brand);
  transform: scale(1.15);
}
.status-btn.is-saved {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand);
}
.status-btn.is-saved .fav-star { color: var(--warn); }

/* =====================================================
   ✅ Chat Scroll — منطقة التمرير الوحيدة
   ===================================================== */
.chat-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 16px 180px;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  background: transparent;
}

body:not(.has-conversation) .chat-scroll {
  padding: 0;
  overflow: visible;
}

.chat-scroll::-webkit-scrollbar { width: 6px; }
.chat-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

body.has-conversation .welcome { display: none; }

/* ✅ Chat Stream */
.chat-stream {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 26px;
  flex: 1 0 auto;
}

body:not(.has-conversation) .chat-stream {
  max-width: 100%;
  gap: 0;
}

/* =====================================================
   ✅ Welcome — شاشة البداية
   ===================================================== */
.welcome {
  width: 100%;
  max-width: 780px;
  margin: 60px auto 40px;
  text-align: center;
  transition: opacity var(--t), transform var(--t);
}

.welcome .hero-robot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--brand-soft), transparent 70%);
  color: var(--brand);
  margin-bottom: 22px;
  position: relative;
}

.welcome .hero-robot .robot-svg { width: 72px; height: 72px; }

.welcome .hero-robot::after {
  content: "";
  position: absolute; inset: -12px;
  border-radius: 50%;
  border: 2px dashed color-mix(in srgb, var(--brand) 30%, transparent);
  animation: spin 20s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.welcome h1 {
  font-size: 27px;
  line-height: 1.55;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -.01em;
  color: var(--text);
}

.welcome h1 .accent {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.welcome p {
  color: var(--text-soft);
  font-size: 15.5px;
  line-height: 1.9;
  margin: 0 auto;
  max-width: 650px;
}

.welcome p strong { color: var(--text); font-weight: 600; }

/* =====================================================
   ✅ Turn (سؤال/إجابة)
   ===================================================== */
.stream-turn { animation: streamTurnIn .3s ease both; }

@keyframes streamTurnIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ✅ رسالة المستخدم — فقاعة بحجم النص فقط */
.stream-turn.user-turn {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  margin: 0 0 8px;
}

.stream-user {
  display: inline-block;
  max-width: 75%;
  background: var(--brand);
  color: #fff;
  padding: 11px 17px;
  border-radius: 18px;
  border-end-start-radius: 6px;
  font-size: 15px;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  box-shadow: 0 4px 14px rgba(79,70,229,.2);
  text-align: start;
}

/* ✅ إجابة البوت — شفافة بدون حاوية */
.stream-turn.bot-turn {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  margin: 0 0 12px;
}

.stream-bot {
  width: 100%;
  max-width: 100%;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.9;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.stream-loading .stream-bot { min-height: 60px; }

/* =====================================================
   ✅ Quick Replies
   ===================================================== */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.quick-reply {
  display: inline-flex; align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border));
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
  font-family: inherit;
  white-space: nowrap;
}
.quick-reply:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  transform: translateY(-1px);
}
.quick-reply:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* =====================================================
   ✅ Typing Indicator
   ===================================================== */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 0;
}
.typing-indicator .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  display: inline-block;
  animation: typingDot 1.2s infinite both;
}
.typing-indicator .dot:nth-child(2) { animation-delay: .15s; }
.typing-indicator .dot:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* =====================================================
   ✅ Rating Stars
   ===================================================== */
.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  padding: 12px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.rating-stars-label {
  font-size: 13.5px;
  color: var(--text-soft);
  font-weight: 600;
  margin-inline-end: 8px;
}

.rating-star {
  background: transparent;
  border: 0;
  padding: 2px 4px;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  transition: color var(--t-fast), transform var(--t-fast);
  font-family: inherit;
}

.rating-star:hover,
.rating-star.hover {
  color: var(--warn);
  transform: scale(1.15);
}

.rating-star.selected { color: var(--warn); }

.rating-stars.rated {
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-elev));
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent);
  font-weight: 600;
  gap: 8px;
}

.rating-stars.rated .rating-stars-label {
  color: var(--accent);
  font-size: 14.5px;
  margin-inline-end: 0;
}

/* =====================================================
   ✅ Composer — ثابت في الأسفل
   ===================================================== */
.composer-wrap {
  flex-shrink: 0;
  padding: 16px 16px 24px;
  background: var(--bg);
  border-top: 0;
  transition: background var(--t);
}

body:not(.has-conversation) .composer-wrap {
  padding: 0 16px 50px;
  background: transparent;
}

body.has-chat-page.has-conversation .composer-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 16px 24px;
  background: linear-gradient(to top,
    var(--bg-chat) 60%,
    color-mix(in srgb, var(--bg-chat) 0%, transparent)
  );
  z-index: 30;
}

.composer {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
}

/* ✅ Search Box */
.composer .search-box {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-height: 60px;
  background: var(--bg-elev);
  border: 1.5px solid var(--border);
  border-radius: 28px;
  padding: 8px 10px;
  box-shadow:
    0 2px 8px rgba(15,23,42,.05),
    0 8px 25px rgba(15,23,42,.05);
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}

.composer .search-box:focus-within {
  border-color: color-mix(in srgb, var(--brand) 50%, var(--border));
  box-shadow:
    0 2px 10px rgba(79,70,229,.06),
    0 8px 30px rgba(79,70,229,.08);
}

.composer .search-box.mode-deep {
  border-color: var(--brand);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--brand) 5%, var(--bg-elev)),
    color-mix(in srgb, var(--brand-2) 5%, var(--bg-elev))
  );
}

.composer .search-box.mode-deep .search-submit {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

/* ✅ Textarea */
.composer .search-box textarea {
  flex: 1;
  min-height: 42px;
  max-height: 180px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 8px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}
.composer .search-box textarea::placeholder { color: var(--text-muted); }

/* ✅ Search Submit */
.composer .search-submit {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
  margin-bottom: 1px;
}
.composer .search-submit:hover {
  background: color-mix(in srgb, var(--brand) 90%, black);
  transform: scale(1.05);
}
.composer .search-submit:disabled {
  opacity: .35;
  cursor: default;
  transform: none;
}

/* ✅ Search Modes — داخل search-box */
.composer .search-modes {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  padding-bottom: 3px;
  background: transparent;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  align-self: center;
  margin-bottom: 3px;
}

.composer .search-mode-btn {
  padding: 6px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
  line-height: 1.3;
}
.composer .search-mode-btn:hover {
  background: var(--surface);
  color: var(--text);
}
.composer .search-mode-btn.active {
  background: var(--brand-soft);
  color: var(--brand);
}
.composer .search-mode-btn[data-mode="deep"].active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
}

/* ✅ Replay Button */
.composer .replay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
  margin-bottom: 1px;
}
.composer .replay-btn:hover {
  background: var(--surface);
  color: var(--brand);
  transform: rotate(-25deg);
}
.composer .replay-btn svg { width: 18px; height: 18px; }
.composer .replay-btn[hidden] { display: none; }

/* ✅ End Chat Button */
.composer .end-chat-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--danger);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
  margin-bottom: 1px;
}
.composer .end-chat-btn:hover {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  transform: scale(1.08);
}
.composer .end-chat-btn[hidden] { display: none; }

/* =====================================================
   Markdown
   ===================================================== */
.ai-text { white-space: normal; word-wrap: break-word; overflow-wrap: anywhere; }
.ai-text > *:first-child { margin-top: 0; }
.ai-text > *:last-child  { margin-bottom: 0; }
.ai-text strong { color: var(--brand); font-weight: 700; }
.ai-text em { color: var(--text-soft); font-style: italic; }

.md-h2, .md-h3, .md-h4 { color: var(--text); font-weight: 700; line-height: 1.45; }
.md-h2 { font-size: 22px; margin: 24px 0 10px; }
.md-h3 { font-size: 19px; margin: 22px 0 9px; }
.md-h4 { font-size: 17px; margin: 18px 0 8px; }

.md-ul, .md-ol { margin: 12px 0 18px; padding-inline-start: 25px; }
.md-ul li, .md-ol li { margin: 6px 0; padding-inline-start: 4px; }
.md-ul li::marker, .md-ol li::marker { color: var(--brand); font-weight: 700; }
.md-ol { list-style: decimal; }
.md-ul { list-style: disc; }

.askpc-code {
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #0b1220;
}
.code-head {
  min-height: 36px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 6px 10px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.code-language {
  color: #9aa8bd;
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  direction: ltr;
}
.code-copy {
  border: 0; background: transparent;
  color: #cbd5e1;
  font: 12px/1.4 var(--font-ar);
  padding: 5px 8px; border-radius: 6px; cursor: pointer;
}
.code-copy:hover { background: rgba(255,255,255,.08); }
.askpc-code pre {
  margin: 0; padding: 15px 16px;
  overflow-x: auto; color: #e6ecf5;
  font: 13.5px/1.65 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre; text-align: left;
}
.inline-code {
  background: var(--surface); color: var(--brand);
  padding: 2px 7px; border-radius: 5px;
  border: 1px solid var(--border);
  font: 13px/1.4 'JetBrains Mono', ui-monospace, monospace;
  direction: ltr;
}

#streamingText::after {
  content: "▎"; display: inline-block;
  color: var(--brand); margin-inline-start: 2px;
  animation: streamingCursor .8s ease-in-out infinite;
  font-weight: 400;
}
@keyframes streamingCursor { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }

/* =====================================================
   Smart Loading
   ===================================================== */
.smart-loading {
  text-align: center;
  padding: 20px 0;
  max-width: 480px;
  margin: 0 auto;
}
.smart-loading-robot { margin-bottom: 20px; display: flex; justify-content: center; }
.smart-robot { position: relative; width: 70px; height: 70px; }
.smart-robot-head {
  width: 62px; height: 48px; margin: 0 auto;
  background: var(--brand-soft);
  border: 2.5px solid var(--brand);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: space-around;
  padding: 0 10px; position: relative;
  animation: smartRobotBreathe 2.2s ease-in-out infinite;
}
.smart-robot-head::before {
  content: ""; position: absolute;
  top: -9px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 7px; background: var(--brand); border-radius: 2px;
}
.smart-robot-head::after {
  content: ""; position: absolute;
  top: -13px; left: 50%; transform: translateX(-50%);
  width: 7px; height: 7px; background: var(--brand);
  border-radius: 50%;
  animation: smartAntennaPulse 1.4s ease-in-out infinite;
}
.smart-robot-eye {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand);
  animation: smartEyeBlink 3s infinite;
}
.smart-robot-eye:nth-child(2) { animation-delay: .1s; }
.smart-robot-thinking { display: flex; justify-content: center; gap: 5px; margin-top: 8px; }
.smart-robot-thinking span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand-2);
  animation: smartThoughtBubble 1.4s ease-in-out infinite both;
}
.smart-robot-thinking span:nth-child(2) { animation-delay: .2s; }
.smart-robot-thinking span:nth-child(3) { animation-delay: .4s; }

@keyframes smartRobotBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes smartEyeBlink { 0%, 90%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.15); } }
@keyframes smartAntennaPulse {
  0%, 100% { opacity: .4; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.4); }
}
@keyframes smartThoughtBubble {
  0%, 60%, 100% { transform: translateY(0); opacity: .35; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.smart-loading-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  margin-bottom: 20px;
  display: inline-flex; align-items: center; gap: 8px;
}
.smart-title-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent);
  animation: smartTitlePulse 1.6s ease-out infinite;
}
@keyframes smartTitlePulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent); }
  100% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--brand) 0%, transparent); }
}
.smart-stages {
  display: flex; flex-direction: column; gap: 6px;
  text-align: start; max-width: 340px;
  margin: 0 auto; padding: 0 8px;
}
.smart-stage {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--radius);
  background: transparent; border: 1px solid transparent;
  color: var(--text-muted); font-size: 14px;
  transition: all var(--t); opacity: .5;
}
.smart-stage.active {
  background: var(--brand-soft);
  border-color: color-mix(in srgb, var(--brand) 25%, transparent);
  color: var(--brand); font-weight: 600;
  opacity: 1; transform: translateX(-3px);
}
.smart-stage.done { color: var(--accent); opacity: .85; }
.smart-stage-icon { font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; }
.smart-stage-text { flex: 1; }
.smart-stage-status { width: 16px; height: 16px; border-radius: 50%; position: relative; flex-shrink: 0; }
.smart-stage.active .smart-stage-status {
  border: 2px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
.smart-stage.done .smart-stage-status::before {
  content: "✓"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 12px; font-weight: 700;
}
[data-theme="dark"] .smart-stage.active { background: color-mix(in srgb, var(--brand) 15%, transparent); }

/* =====================================================
   FAQ Home Section
   ===================================================== */
.faq-home-section {
  padding: 60px 0 40px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}
.faq-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; margin-bottom: 28px; flex-wrap: wrap;
}
.faq-title { font-size: clamp(22px, 3vw, 28px); font-weight: 700; margin: 0 0 4px; }
.faq-subtitle { color: var(--text-soft); margin: 0; font-size: 14.5px; }

.faq-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.faq-card {
  display: flex; gap: 12px; padding: 16px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--t-fast);
  min-height: 120px;
}
.faq-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
  box-shadow: var(--shadow-md);
}
.faq-card-icon {
  font-size: 22px; flex-shrink: 0;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center;
}
.faq-card-content { flex: 1; min-width: 0; }
.faq-card-title {
  font-size: 14.5px; font-weight: 600;
  margin: 0 0 6px; color: var(--text); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.faq-card-preview {
  font-size: 12.5px; color: var(--text-soft);
  margin: 0 0 8px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.faq-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.faq-tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px; background: var(--surface);
  color: var(--text-muted); border-radius: var(--radius-full);
  font-size: 10.5px; font-weight: 500;
}
.faq-tag-problem { background: var(--brand-soft); color: var(--brand); }

/* =====================================================
   KB
   ===================================================== */
.kb-new-hero {
  padding: 48px 0 24px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.kb-new-hero h1 { font-size: clamp(24px, 3.5vw, 36px); margin: 0 0 8px; text-align: center; }
.kb-new-hero p {
  color: var(--text-soft); text-align: center;
  margin: 0 0 28px; font-size: 15px;
}
.kb-search-panel {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  margin: 0 auto; box-shadow: var(--shadow-sm);
  width: 100%; max-width: 100%;
}
.kb-search-row { margin-bottom: 14px; }
.kb-search-input-wrap { position: relative; }
.kb-search-icon {
  position: absolute; inset-inline-start: 18px;
  top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}
.kb-search-input-wrap input {
  width: 100%; padding: 15px 18px;
  padding-inline-start: 52px;
  padding-inline-end: 52px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px; outline: none;
  transition: all var(--t-fast);
  font-family: inherit; color: var(--text);
}
.kb-search-input-wrap input:focus {
  border-color: var(--brand); background: var(--bg-elev);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent);
}
.kb-search-clear {
  position: absolute; inset-inline-end: 14px;
  top: 50%; transform: translateY(-50%);
  background: var(--surface); border: 0;
  color: var(--text-muted); font-size: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
}
.kb-search-clear:hover { background: var(--danger); color: #fff; }
.kb-search-clear.visible { display: inline-flex; }

.kb-filters-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.kb-filter-chip-group { flex: 1; min-width: 140px; }
.kb-filter-select {
  width: 100%; padding: 12px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-family: inherit;
  color: var(--text); cursor: pointer; outline: none;
  transition: all var(--t-fast); appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  background-size: 10px;
}
html[dir="ltr"] .kb-filter-select { background-position: right 14px center; }
.kb-filter-select:focus { border-color: var(--brand); background-color: var(--bg-elev); }
.kb-filter-select:hover { border-color: color-mix(in srgb, var(--brand) 40%, transparent); }

.kb-clear-btn {
  padding: 12px 18px; background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast); white-space: nowrap;
}
.kb-clear-btn:hover {
  border-color: var(--danger); color: var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}
.kb-results-count {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 13.5px; color: var(--text-muted); text-align: center;
}
.kb-new-results { padding: 40px 0 60px; }
.kb-new-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kb-new-card {
  display: flex; flex-direction: column;
  padding: 16px; background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--t-fast); min-height: 200px;
}
.kb-new-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
  box-shadow: var(--shadow-md);
}
.kb-new-card-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 10px;
}
.kb-new-card-icon {
  font-size: 22px; width: 40px; height: 40px;
  border-radius: 12px; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center;
}
.kb-new-card-os {
  font-size: 10.5px; font-weight: 600;
  padding: 3px 8px; background: var(--surface);
  color: var(--text-muted); border-radius: var(--radius-full);
}
.kb-new-card-title {
  font-size: 14.5px; font-weight: 600;
  margin: 0 0 8px; line-height: 1.5; color: var(--text);
}
.kb-new-card-title a { color: inherit; }
.kb-new-card-title a:hover { color: var(--brand); }
.kb-new-card-preview {
  font-size: 13px; color: var(--text-soft);
  margin: 0 0 12px; line-height: 1.6; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.kb-new-card-footer {
  display: flex; align-items: center;
  justify-content: space-between;
  padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 12px;
}
.kb-new-card-views { color: var(--text-muted); }
.kb-new-card-link { color: var(--brand); font-weight: 600; }
.kb-new-card-link:hover { text-decoration: underline; }
.kb-empty {
  grid-column: 1 / -1; text-align: center;
  padding: 60px 20px; background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.kb-empty-icon { font-size: 48px; margin-bottom: 16px; opacity: .5; }
.kb-empty h3 { margin: 0 0 8px; }
.kb-empty p { color: var(--text-soft); margin: 0; }

/* =====================================================
   FAQ Single
   ===================================================== */
.faq-single { padding: 60px 0; }
.back-link {
  display: inline-block; color: var(--text-muted);
  font-size: 14px; margin-bottom: 24px;
}
.back-link:hover { color: var(--brand); }
.faq-article {
  max-width: 820px; margin: 0 auto;
  padding: 40px; background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.faq-article h1 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 8px; line-height: 1.4; }
.faq-en { color: var(--text-muted); font-size: 14.5px; margin: 0 0 20px; }
.faq-meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 24px; padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.faq-answer { font-size: 16px; line-height: 1.9; color: var(--text); margin-bottom: 24px; }
.faq-en-details {
  background: var(--bg-soft); padding: 16px;
  border-radius: var(--radius); margin-bottom: 24px;
}
.faq-en-details summary { cursor: pointer; font-weight: 600; color: var(--text-soft); }
.faq-en-details > div {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-soft); line-height: 1.7;
}
.faq-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* =====================================================
   Account
   ===================================================== */
.account-layout {
  display: grid; grid-template-columns: 240px 1fr;
  gap: 32px; padding-top: 32px;
}
.account-nav { display: flex; flex-direction: column; gap: 4px; }
.account-nav a {
  padding: 12px 16px; border-radius: var(--radius);
  color: var(--text-soft); font-size: 14.5px;
}
.account-nav a:hover { background: var(--surface); color: var(--text); }
.account-nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

.account-panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.account-panel h2 { margin: 0 0 20px; font-size: 20px; }

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13.5px; margin-bottom: 6px; color: var(--text-soft); }
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft); outline: 0;
  transition: border-color var(--t-fast);
  color: var(--text); font-family: inherit;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus { border-color: var(--brand); }

.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  transition: opacity .25s ease, transform .25s ease, border-color var(--t-fast), background var(--t-fast);
}
.history-item:hover { border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.history-item.removing { opacity: 0; transform: translateX(20px); pointer-events: none; }
.history-item .info { flex: 1; min-width: 0; }
.history-item .query {
  font-weight: 500; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.history-item .query a { color: inherit; }
.history-item .query a:hover { color: var(--brand); }
.history-item .meta { font-size: 12.5px; color: var(--text-muted); }
.history-item .actions { display: flex; gap: 4px; flex-shrink: 0; }
.history-item .icon-action {
  background: transparent; border: 0;
  color: var(--text-muted); padding: 8px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), color var(--t-fast);
  cursor: pointer;
}
.history-item .icon-action:hover { background: var(--surface); color: var(--text); }
.history-item .icon-action.replay:hover { color: var(--brand); }
.history-item .icon-action.remove:hover { color: var(--danger); }
.history-item .icon-action.open-question-btn {
  color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  background: color-mix(in srgb, var(--brand) 5%, transparent);
}
.history-item .icon-action.open-question-btn:hover {
  background: var(--brand); color: #fff; border-color: var(--brand);
}

.q-status {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--radius-full);
  font-size: 11.5px; font-weight: 600; line-height: 1.5;
}
.q-status.new         { background: color-mix(in srgb, var(--brand) 15%, transparent); color: var(--brand); }
.q-status.in_progress { background: color-mix(in srgb, var(--warn) 15%, transparent); color: #b45309; }
.q-status.answered    { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.q-status.done        { background: var(--surface); color: var(--text-muted); }
.q-status.closed      { background: var(--surface); color: var(--text-muted); }
[data-theme="dark"] .q-status.in_progress { color: #fbbf24; }

.question-thread {
  display: flex; flex-direction: column; gap: 14px;
  padding: 16px 0; max-height: 55vh; overflow-y: auto;
}
.question-thread::-webkit-scrollbar { width: 5px; }
.question-thread::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.question-msg {
  display: flex; gap: 10px; align-items: flex-start;
  animation: streamTurnIn var(--t) both;
}
.question-msg.user { flex-direction: row-reverse; }
.question-msg.admin { flex-direction: row; }

.q-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; flex-shrink: 0;
  overflow: hidden;
}
.q-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.q-avatar.with-image { padding: 0; background: transparent; }
.question-msg.user .q-avatar { background: var(--brand); color: #fff; }

.q-bubble {
  max-width: min(560px, 80%);
  padding: 12px 16px; border-radius: 14px;
  font-size: 14.5px; line-height: 1.7;
  background: var(--bg-soft); border: 1px solid var(--border);
}
.question-msg.user .q-bubble {
  background: var(--brand); color: #fff; border-color: var(--brand);
}
.q-time { font-size: 11.5px; opacity: .7; margin-top: 4px; }

.q-composer {
  display: flex; gap: 8px; padding: 14px 0 0;
  border-top: 1px solid var(--border); margin-top: 20px;
}
.q-composer input, .q-composer textarea {
  flex: 1; padding: 11px 15px; border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text);
  font-size: 14.5px; font-family: inherit;
  outline: 0; resize: none;
}
.q-composer input:focus, .q-composer textarea:focus { border-color: var(--brand); }

.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 12px; }
.avatar-pick {
  padding: 12px; border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft); cursor: pointer;
  transition: all var(--t-fast);
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}
.avatar-pick:hover { border-color: color-mix(in srgb, var(--brand) 50%, transparent); }
.avatar-pick:active { transform: scale(.97); }
.avatar-pick img { width: 48px; height: 48px; margin-bottom: 6px; }
.avatar-pick span { display: block; text-align: center; font-size: 12px; color: var(--text-muted); }
.avatar-pick.selected {
  border-color: var(--brand) !important;
  background: var(--brand-soft) !important;
  transform: scale(1.03);
}
.avatar-pick.selected::after {
  content: "✓";
  position: absolute; top: 6px; inset-inline-end: 6px;
  width: 20px; height: 20px;
  background: var(--brand); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}

/* =====================================================
   Integrate
   ===================================================== */
.integrate-hero { padding: 60px 0 32px; text-align: center; }
.integrate-hero h1 { font-size: clamp(26px, 3.5vw, 40px); margin: 0 0 12px; }
.integrate-hero p { color: var(--text-soft); max-width: 640px; margin: 0 auto; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin: 40px 0;
}
.feature {
  padding: 24px; background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); text-align: center;
}
.feature-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand);
  margin-bottom: 12px; font-size: 22px; font-weight: 700;
}
.feature h3 { font-size: 16px; margin: 0 0 6px; }
.feature p { font-size: 14px; color: var(--text-soft); margin: 0; }

.features-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 12px !important; margin: 30px 0 !important;
}
.features-grid-compact .feature { padding: 20px 16px !important; }
.features-grid-compact .feature-icon {
  width: 42px !important; height: 42px !important;
  font-size: 20px !important; margin-bottom: 8px !important;
}
.features-grid-compact .feature h3 { font-size: 15px !important; }
.features-grid-compact .feature p { font-size: 13px !important; }

.integrate-steps { text-align: center; margin: 50px 0; }
.integrate-steps h2 { font-size: clamp(22px, 3vw, 28px); margin: 0 0 8px; }
.integrate-steps > p { color: var(--text-soft); margin: 0 0 32px; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.step-card {
  padding: 24px 20px; background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center; position: relative;
  transition: transform var(--t-fast), border-color var(--t-fast);
}
.step-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
}
.step-number {
  width: 48px; height: 48px; margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(79,70,229,.3);
}
.step-card h4 { font-size: 16px; margin: 0 0 6px; }
.step-card p { font-size: 13.5px; color: var(--text-soft); margin: 0; }

.request-card {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff; padding: 40px; border-radius: var(--radius-lg);
  text-align: center; margin: 40px 0;
}
.request-card h2 { margin: 0 0 12px; font-size: 26px; }
.request-card p { margin: 0 0 24px; opacity: .95; }
.request-card .btn { background: #fff; color: var(--brand); font-weight: 700; padding: 14px 28px; }
.request-card .btn:hover { background: #f1f5f9; }

.request-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600;
}
.request-status.pending  { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.request-status.approved { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.request-status.rejected { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }

/* =====================================================
   Widget Launcher
   ===================================================== */
.askpc-widget-launcher {
  position: fixed; bottom: 24px; inset-inline-end: 24px;
  width: 60px; height: 60px; border-radius: var(--radius-full);
  background: var(--brand); color: #fff; border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 32px rgba(79,70,229,.35);
  z-index: 90; transition: transform var(--t);
}
.askpc-widget-launcher:hover { transform: scale(1.06); }
.askpc-widget-launcher .robot-svg { width: 34px; height: 34px; }

/* =====================================================
   Footer
   ===================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 40px 0 24px;
  margin-top: 0;
}
body.has-conversation .site-footer { display: none; }

.footer-inner {
  display: grid; grid-template-columns: 1.5fr 1fr auto;
  gap: 32px; align-items: center;
}
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand strong { display: block; margin-bottom: 4px; }
.footer-brand p { margin: 0; color: var(--text-soft); font-size: 14px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--text-soft); font-size: 14.5px; }
.footer-links a:hover { color: var(--brand); }
.footer-links a[href*="founder"] { color: var(--brand); font-weight: 600; }
.footer-links a[href*="founder"]:hover { color: var(--brand-2); }
.footer-copy { color: var(--text-muted); font-size: 13px; }

/* =====================================================
   Utilities
   ===================================================== */
[hidden] { display: none !important; }
.text-muted { color: var(--text-muted); }

/* =====================================================
   Toasts
   ===================================================== */
.toast-stack {
  position: fixed; top: 20px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 10px;
  z-index: 200;
  max-width: min(420px, calc(100vw - 32px));
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 14px 20px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-elev) 95%, transparent);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .15);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 14px; font-weight: 500;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
  pointer-events: auto;
  animation: toastInTop var(--t) both;
}
.toast.success { border-inline-start: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg-elev)); color: var(--accent); font-weight: 600; }
.toast.error { border-inline-start: 4px solid var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--bg-elev)); color: var(--danger); font-weight: 600; }
.toast.warn { border-inline-start: 4px solid var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--bg-elev)); color: #b45309; font-weight: 600; }
.toast.info { border-inline-start: 4px solid var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--bg-elev)); color: var(--brand); font-weight: 600; }
[data-theme="dark"] .toast.warn { color: #fbbf24; }

@keyframes toastInTop {
  from { opacity: 0; transform: translateY(-30px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* =====================================================
   Badges & Chips
   ===================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600;
  background: var(--surface); color: var(--text-muted);
  line-height: 1.6;
}
.badge.primary { background: var(--brand-soft); color: var(--brand); }
.badge.success { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.badge.warn    { background: color-mix(in srgb, var(--warn) 15%, transparent);   color: var(--warn);   }
.badge.danger  { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-full);
  background: transparent; border: 1px solid var(--border);
  color: var(--text-soft); font-size: 13px;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
}
.chip:hover { background: var(--surface); color: var(--text); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.chip.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); font-weight: 600; }

/* =====================================================
   Table
   ===================================================== */
.table-wrap {
  width: 100%; overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: start; }
.table thead th {
  background: var(--bg-soft); color: var(--text-soft);
  font-weight: 600; font-size: 13px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap; text-align: start;
}
.table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text); vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--bg-soft); }

/* =====================================================
   Tabs
   ===================================================== */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 10px 16px;
  background: transparent; border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-soft); font-size: 14.5px; font-weight: 500;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap; font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* =====================================================
   Modal
   ===================================================== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 130;
}
.modal {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.modal-title { margin: 0; font-size: 17px; font-weight: 700; }
.modal-close {
  background: transparent; border: 0;
  color: var(--text-muted);
  width: 32px; height: 32px; border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.modal-close:hover { background: var(--surface); color: var(--text); }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end;
  gap: 8px; flex-wrap: wrap;
}

/* =====================================================
   Favorite Button
   ===================================================== */
.btn-favorite {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: var(--radius-full);
  background: transparent; color: var(--text-soft);
  border: 1px solid var(--border);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
}
.btn-favorite:hover {
  background: var(--brand-soft); color: var(--brand);
  border-color: var(--brand);
}
.btn-favorite .fav-star {
  font-size: 16px; line-height: 1;
  transition: transform var(--t-fast), color var(--t-fast);
  color: var(--text-muted);
}
.btn-favorite:hover .fav-star { color: var(--brand); transform: scale(1.15); }
.btn-favorite.is-saved { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.btn-favorite.is-saved .fav-star { color: var(--warn); }
.btn-favorite:disabled { opacity: .7; cursor: wait; }

.favorite-item .icon-action.remove-fav { color: var(--text-muted); }
.favorite-item .icon-action.remove-fav:hover {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}
.favorite-item { transition: opacity .25s ease, border-color var(--t-fast), background var(--t-fast); }

.question-item .query { white-space: normal !important; line-height: 1.5; }
.question-item .meta {
  margin-top: 6px;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}

/* =====================================================
   Responsive — Tablet (≤1024px)
   ===================================================== */
@media (max-width: 1024px) {
  .container { width: calc(100% - 32px); }
  .account-layout { grid-template-columns: 200px 1fr; gap: 20px; }
  .faq-grid { grid-template-columns: repeat(2, 1fr); }
  .kb-new-grid { grid-template-columns: repeat(2, 1fr); }
  .kb-filter-chip-group { min-width: 160px; }
}

/* =====================================================
   Responsive — Mobile Large (≤900px)
   ===================================================== */
@media (max-width: 900px) {
  .main-nav {
    position: fixed !important;
    top: var(--header-h) !important;
    inset-inline: 0 !important;
    background: var(--bg-elev) !important;
    border-bottom: 1px solid var(--border) !important;
    flex-direction: column !important;
    padding: 16px !important;
    gap: 2px !important;
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden;
    transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .25s !important;
    box-shadow: var(--shadow-md) !important;
    max-height: calc(100dvh - var(--header-h)) !important;
    overflow-y: auto !important;
    z-index: 46 !important;
  }
  body.menu-open .main-nav {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible;
  }
  .main-nav a {
    padding: 14px 16px !important;
    border-radius: var(--radius) !important;
    font-size: 15px !important;
    font-weight: 500;
    color: var(--text);
  }
  .main-nav a:hover, .main-nav a.active { background: var(--surface); color: var(--text); }
  .main-nav .mobile-login {
    display: flex !important;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff !important;
    justify-content: center;
    margin-top: 8px;
    font-weight: 700;
  }
  .main-nav .mobile-login:hover { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff !important; }
  .main-nav .mobile-logout {
    display: flex !important;
    color: var(--danger) !important;
    margin-top: 8px;
    border-top: 1px solid var(--border);
    padding-top: 16px !important;
  }
  .main-nav .mobile-logout:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger) !important; }
  .main-nav .mobile-account {
    display: flex !important;
    background: var(--surface);
    color: var(--text) !important;
    justify-content: center;
    margin-top: 8px;
    font-weight: 600;
  }
  .main-nav .mobile-account:hover { background: var(--brand-soft); color: var(--brand) !important; }

  .hamburger { display: inline-flex !important; }
  .header-actions > .btn-ghost,
  .header-actions > .user-menu { display: none !important; }

  .account-layout { grid-template-columns: 1fr; gap: 20px; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; gap: 20px; }
  .footer-brand { justify-content: center; }
  .footer-links { justify-content: center; }

  .welcome { padding: 40px 0 20px; }
  .welcome .hero-robot { width: 80px; height: 80px; margin-bottom: 16px; }
  .welcome .hero-robot .robot-svg { width: 56px; height: 56px; }
  .welcome h1 { font-size: 22px; }
  .welcome p { font-size: 14.5px; padding: 0 8px; }

  .chat-scroll { padding: 16px 12px 160px; }
  .composer-wrap { padding: 12px 12px 20px; }

  .status-bar { padding: 18px 12px 10px; }
  .status-bar-inner { padding: 5px 14px; font-size: 12.5px; }
  .status-mode { font-size: 11.5px; }

  .composer .search-modes {
    display: inline-flex !important;
    order: 0;
    width: auto;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
  }
  .composer .search-box { flex-wrap: nowrap; padding: 6px 8px; }
  html[dir="rtl"] .composer .search-box { padding: 6px 8px; }
  .composer .search-box textarea { font-size: 15px; padding: 10px 6px; }
  .composer .search-submit { width: 38px; height: 38px; min-width: 38px; }
  .composer .end-chat-btn { width: 36px; height: 36px; }
  .composer .replay-btn { width: 36px; height: 36px; }
  .composer .search-mode-btn { padding: 5px 8px; font-size: 11.5px; }

  .stream-user { max-width: 88%; font-size: 14.5px; padding: 11px 16px; }
  .stream-bot { font-size: 15px; }

  .rating-star { font-size: 22px; }
  .rating-stars { padding: 10px 14px; }
}

/* =====================================================
   Responsive — Mobile Small (≤640px)
   ===================================================== */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { width: calc(100% - 24px); }

  .chat-scroll { padding: 12px 8px 150px; }
  .composer-wrap { padding: 10px 8px 16px; }

  .welcome { margin: 40px auto 30px; }
  .welcome h1 { font-size: 20px; margin-bottom: 8px; }
  .welcome p { font-size: 13.5px; margin-bottom: 0; }

  .chat-stream { gap: 18px; }
  .stream-user { max-width: 92%; font-size: 14px; padding: 10px 14px; border-radius: 16px; }
  .stream-bot { font-size: 14.5px; line-height: 1.85; }

  .status-bar { padding: 14px 8px 8px; }
  .status-bar-inner { padding: 4px 12px; font-size: 12px; gap: 8px; }
  .status-mode { font-size: 11px; padding: 2px 8px; }
  .status-btn { padding: 5px 10px; font-size: 11.5px; }
  .status-bar-divider { height: 14px; }

  .composer .search-box {
    min-height: 54px;
    border-radius: 27px;
    padding: 6px 8px;
    gap: 6px;
  }
  .composer .search-box textarea {
    font-size: 14.5px;
    padding: 9px 4px;
    min-height: 38px;
  }
  .composer .search-submit { width: 36px; height: 36px; min-width: 36px; }
  .composer .end-chat-btn { width: 34px; height: 34px; }
  .composer .replay-btn { width: 34px; height: 34px; }
  .composer .search-mode-btn { padding: 5px 7px; font-size: 11px; }

  .rating-star { font-size: 20px; padding: 2px 3px; }
  .rating-stars { padding: 10px 12px; }
  .rating-stars-label { font-size: 12.5px; }

  .faq-home-section { padding: 40px 0 30px; }
  .faq-grid { grid-template-columns: 1fr; gap: 10px; }
  .faq-card { padding: 14px; min-height: auto; }
  .faq-card-icon { width: 38px; height: 38px; font-size: 18px; }
  .faq-card-title { font-size: 14px; }
  .faq-card-preview { font-size: 12.5px; }

  .kb-new-hero { padding: 32px 0 20px; }
  .kb-search-panel { padding: 14px; border-radius: var(--radius); }
  .kb-search-input-wrap input {
    padding: 13px 16px;
    padding-inline-start: 46px;
    padding-inline-end: 46px;
    font-size: 14px;
  }
  .kb-search-icon { inset-inline-start: 16px; width: 16px; height: 16px; }
  .kb-filters-row { gap: 8px; }
  .kb-filter-chip-group { min-width: 100%; flex: 1 1 100%; }
  .kb-filter-select { padding: 11px 14px; font-size: 13px; }
  .kb-clear-btn { flex: 1 1 100%; padding: 11px 14px; font-size: 13px; }

  .kb-new-grid { grid-template-columns: 1fr; gap: 12px; }
  .kb-new-card { padding: 16px; min-height: auto; }
  .kb-new-card-icon { width: 38px; height: 38px; font-size: 18px; }
  .kb-new-card-title { font-size: 14px; }
  .kb-new-card-preview { font-size: 12.5px; -webkit-line-clamp: 2; }

  .faq-article { padding: 24px 18px; }
  .faq-actions { flex-direction: column; }
  .faq-actions .btn { width: 100%; }

  .integrate-steps { margin: 30px 0; }
  .steps-grid { grid-template-columns: 1fr; gap: 12px; }

  .account-panel { padding: 20px 16px; }
  .account-nav {
    flex-direction: row; overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .account-nav a { white-space: nowrap; padding: 10px 14px; font-size: 13.5px; }

  .avatar-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
  .avatar-pick { padding: 10px; }
  .avatar-pick img { width: 40px; height: 40px; }

  .history-item { padding: 12px 14px; gap: 10px; }
  .history-item .query { font-size: 14px; }

  .features-grid { grid-template-columns: 1fr; gap: 12px; margin: 24px 0; }
  .feature { padding: 20px; }

  .request-card { padding: 28px 20px; margin: 24px 0; }
  .request-card h2 { font-size: 22px; }

  .footer-brand { flex-direction: column; align-items: center; text-align: center; }
  .footer-links { flex-direction: column; gap: 10px; }

  .askpc-widget-launcher { width: 52px; height: 52px; bottom: 16px; inset-inline-end: 16px; }
  .askpc-widget-launcher .robot-svg { width: 28px; height: 28px; }

  .smart-loading { padding: 16px 12px; }
  .smart-robot { width: 56px; height: 56px; }
  .smart-robot-head { width: 50px; height: 40px; border-radius: 12px; }
  .smart-robot-head::after { width: 6px; height: 6px; }
  .smart-robot-eye { width: 6px; height: 6px; }
  .smart-loading-title { font-size: 14px; }
  .smart-stage { padding: 8px 12px; font-size: 13px; }
  .smart-stage-icon { font-size: 14px; width: 18px; }

  .toast-stack { top: 76px; max-width: calc(100vw - 24px); }
  .toast { padding: 12px 16px; font-size: 13px; }

  .modal-backdrop { padding: 12px; align-items: flex-end; }
  .modal {
    width: 100%; max-height: calc(100vh - 24px);
    border-end-start-radius: 0; border-end-end-radius: 0;
  }
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .btn { width: 100%; }

  .tab { padding: 9px 12px; font-size: 13.5px; }
  .table thead th, .table tbody td { padding: 10px 12px; font-size: 13px; }

  .btn-favorite { padding: 7px 12px; font-size: 13px; }
  .btn-favorite .fav-star { font-size: 15px; }

  .question-msg .q-bubble { max-width: 90%; font-size: 14px; }
  .q-avatar { width: 32px; height: 32px; font-size: 14px; }
}

/* =====================================================
   Responsive — Extra Small (≤400px)
   ===================================================== */
@media (max-width: 400px) {
  .welcome h1 { font-size: 18px; }
  .brand-name { display: none; }
  .container { width: calc(100% - 16px); }
  .chat-scroll { padding: 10px 6px 140px; }
  .composer-wrap { padding: 8px 6px 14px; }
  .stream-user { font-size: 13.5px; padding: 9px 13px; }
  .stream-bot { font-size: 14px; }
  .kb-filter-chip-group { min-width: 100%; flex: 1 1 100%; }
  .rating-star { font-size: 18px; }
  .composer .search-mode-btn { display: none; }
}

/* =====================================================
   Reduced Motion
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}