/* ==========================================================================
   MegaMind V2 demo — SAX Workbench design language
   Adopted from megamind-mockup.html ("SAX Workbench v5"):
   Sora / Inter / JetBrains Mono / Source Serif 4, warm-paper light theme,
   charcoal dark theme, gold accent + per-bot brand colors (--bot / --bot-2).
   ========================================================================== */

:root {
  --bg: #FAF8F2;
  --surface: #FFFFFF;
  --surface-2: #F4F0E6;
  --surface-3: #ECE5D2;
  --hairline: rgba(61, 57, 41, 0.08);
  --hairline-strong: rgba(61, 57, 41, 0.16);
  --text: #2a2620;
  --text-2: #5e564a;
  --text-3: #9c958a;
  --gold: #c89a3a;
  --gold-2: #8a6920;
  --gold-soft: rgba(200, 154, 58, 0.10);
  --gold-edge: rgba(200, 154, 58, 0.32);
  --blue: #4a7da8;
  --rose: #b8746a;
  --green: #5e8a4e;
  --purple: #8a6db8;
  --user-bubble: #efe9d8;
  --r: 10px; --r-sm: 6px; --r-lg: 16px;
  /* Prod font treatment (ADDENDUM 4): Manrope-led stack, Inter fallback */
  --font-body: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
  --letter-spacing-body: 0.012em;   /* prod letter-spacing */
  --font-size: 14px;
  --line: 1.5;
  /* active bot brand colors — set from JS on bot switch */
  --bot: #332A7E;
  --bot-2: #007AA6;
  --bot-ink: #007AA6;
  --bot-soft: rgba(51, 42, 126, 0.08);
  --bot-edge: rgba(51, 42, 126, 0.32);
}
[data-theme="dark"] {
  --bg: #1a1814; --surface: #211f1a; --surface-2: #2a2620; --surface-3: #322d24;
  --hairline: rgba(247, 243, 237, 0.08); --hairline-strong: rgba(247, 243, 237, 0.16);
  --text: #f4efe3; --text-2: #b8b0a0; --text-3: #7a7468;
  --gold: #d9b057; --gold-2: #f0c875;
  --user-bubble: #3a3528;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--font-body); font-size: var(--font-size);
  color: var(--text); background: var(--bg);
  line-height: var(--line);
  letter-spacing: var(--letter-spacing-body);
  font-weight: 480;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  display: grid;
  grid-template-columns: var(--nav-w, 264px) 1fr;
  grid-template-rows: 100vh;
  transition: background 0.3s, color 0.3s, grid-template-columns 0.25s cubic-bezier(.2,.8,.2,1);
}

/* ============ SIDEBAR ============ */
aside.nav { background: var(--surface); border-right: 1px solid var(--hairline); padding: 12px 0; display: flex; flex-direction: column; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 16px 12px; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 700; }
.brand-name { font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 600; line-height: 1.1; }
.brand-name .sub { display: block; font-family: var(--font-mono); font-size: 8.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.14em; font-weight: 400; margin-top: 2px; }
.live-chip { margin-left: auto; padding: 2px 6px; background: rgba(94,138,78,0.12); color: var(--green); border-radius: 4px; font-family: var(--font-mono); font-size: 8.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.live-chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(94,138,78,0.4); } 50% { box-shadow: 0 0 0 5px rgba(94,138,78,0); } }

.new-chat-btn { margin: 0 12px 10px; padding: 8px 12px; background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #fff; border: none; border-radius: 7px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: filter 0.15s, transform 0.1s; }
.new-chat-btn:hover { filter: brightness(1.06); }
.new-chat-btn:active { transform: scale(0.985); }
.new-chat-btn svg { width: 13px; height: 13px; }

.nav-scroll { flex: 1; overflow-y: auto; padding-bottom: 8px; }
.nav-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); padding: 12px 16px 4px; display: flex; align-items: center; justify-content: space-between; }
.nav-label .add { color: var(--text-3); cursor: pointer; font-size: 12px; }
.nav-label .add:hover { color: var(--rose); }

/* Bot rows with brand-color identity */
.nav-bot { display: flex; align-items: center; gap: 9px; padding: 6px 16px; color: var(--text-2); cursor: pointer; font-size: 12.5px; border-left: 2px solid transparent; transition: background 0.12s; position: relative; }
.nav-bot:hover { background: var(--gold-soft); color: var(--text); }
.nav-bot.active { color: var(--text); font-weight: 500; border-left-color: var(--bb, var(--gold)); background: color-mix(in srgb, var(--bb, var(--gold)) 7%, transparent); }
.nav-bot img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: var(--surface-2); border: 1px solid var(--hairline); flex-shrink: 0; }
.nav-bot.active img { border-color: var(--bb, var(--gold)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bb, var(--gold)) 25%, transparent); }
.nav-bot .bot-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-bot .bot-role { font-family: var(--font-mono); font-size: 8.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.nav-bot .brand-dot { width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, var(--bb, var(--gold)), var(--bb2, var(--gold-2))); flex-shrink: 0; }

/* Session rows */
.nav-recent { display: flex; padding: 6px 16px; color: var(--text-2); font-size: 12px; cursor: pointer; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.nav-recent:hover { background: var(--gold-soft); color: var(--text); }
.nav-recent.active { background: var(--gold-soft); color: var(--text); font-weight: 500; }
.nav-recent img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--hairline); }
.nav-recent .t { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-recent .ago { font-family: var(--font-mono); font-size: 9px; color: var(--text-3); flex-shrink: 0; }
.nav-recent .del { color: var(--text-3); flex-shrink: 0; opacity: 0; padding: 0 2px; font-size: 13px; line-height: 1; }
.nav-recent:hover .del { opacity: 1; }
.nav-recent .del:hover { color: var(--rose); }
.nav-empty { padding: 8px 16px; color: var(--text-3); font-size: 11px; font-style: italic; }

.nav-user { padding: 10px 12px; border-top: 1px solid var(--hairline); display: flex; align-items: center; gap: 10px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--bot), var(--bot-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.nav-user-text { flex: 1; min-width: 0; }
.nav-user-name { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-user-meta { font-size: 9px; color: var(--text-3); font-family: var(--font-mono); letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 26px; height: 26px; background: transparent; border: none; border-radius: 6px; color: var(--text-3); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 15px; height: 15px; }

/* ============ MAIN ============ */
main { display: grid; grid-template-rows: 48px 1fr; overflow: hidden; position: relative; }
.topbar { background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--hairline); padding: 10px 24px; display: flex; align-items: center; gap: 14px; z-index: 50; }
.crumb { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb b { color: var(--text-2); font-weight: 600; }
.crumb .sep { margin: 0 8px; opacity: 0.4; }
.v2-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; background: linear-gradient(135deg, rgba(138,109,184,0.12), rgba(74,125,168,0.12)); border: 1px solid rgba(138,109,184,0.3); border-radius: 100px; font-family: var(--font-mono); font-size: 10px; color: var(--purple); text-transform: uppercase; letter-spacing: 0.1em; }
.v2-pill .pulse { width: 5px; height: 5px; border-radius: 50%; background: var(--purple); animation: live-pulse 1.4s ease-in-out infinite; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tbtn { height: 28px; padding: 0 10px; border: 1px solid var(--hairline); background: var(--surface); color: var(--text-2); border-radius: 7px; font: inherit; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s; }
.tbtn:hover { border-color: var(--gold-edge); color: var(--text); background: var(--gold-soft); }
.tbtn svg { width: 12px; height: 12px; }
.tbtn.icon-only { width: 28px; padding: 0; justify-content: center; }
.tbtn.primary { background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #fff; border-color: var(--gold-2); }

.chat-col { overflow: hidden; display: flex; flex-direction: column; position: relative; }
.conv-scroll { flex: 1; overflow-y: auto; padding: 24px 32px; }
.conv-inner { max-width: 800px; margin: 0 auto; }

/* ============ HERO (empty state) ============ */
.hero { padding: 28px 0 16px; animation: msg-in 0.4s ease; }
.hero-art { width: 168px; height: 168px; margin: 0 0 10px -10px; position: relative; }
.hero-art::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--bot-2) 16%, transparent), transparent 70%); }
.hero-art img { width: 100%; height: 100%; object-fit: contain; position: relative; filter: drop-shadow(0 10px 22px rgba(0,0,0,0.22)); animation: hero-float 5s ease-in-out infinite; }
@keyframes hero-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.home-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 12px; }
.home-greet { font-family: var(--font-serif); font-size: clamp(32px, 4vw, 44px); font-weight: 400; line-height: 1.1; letter-spacing: -0.015em; margin: 0; }
.home-greet em { font-style: italic; background: linear-gradient(120deg, var(--bot), var(--bot-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
[data-theme="dark"] .home-greet em { filter: brightness(1.7); }
.home-sub { font-size: 14.5px; color: var(--text-2); margin-top: 8px; }

.starters { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.starter { text-align: left; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r); padding: 12px 14px; cursor: pointer; font: inherit; color: var(--text); transition: all 0.15s; }
.starter:hover { border-color: var(--bot-edge); box-shadow: 0 4px 14px rgba(61,57,41,0.06); transform: translateY(-1px); }
.starter-label { font-family: var(--font-mono); font-size: 9px; color: var(--bot-ink); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 3px; }
[data-theme="dark"] .starter-label { filter: brightness(1.6); }
.starter-text { font-size: 13px; line-height: 1.45; color: var(--text-2); }

/* Mini bot switcher strip under starters */
.bot-strip { margin-top: 28px; display: flex; gap: 8px; flex-wrap: wrap; }
.bot-pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 5px; border-radius: 100px; border: 1px solid var(--hairline); background: var(--surface); font: inherit; font-size: 12px; color: var(--text-2); cursor: pointer; transition: all 0.15s; }
.bot-pill img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.bot-pill:hover { border-color: color-mix(in srgb, var(--bb, var(--gold)) 45%, transparent); color: var(--text); transform: translateY(-1px); }
.bot-pill.active { border-color: var(--bb, var(--gold)); background: color-mix(in srgb, var(--bb, var(--gold)) 8%, var(--surface)); color: var(--text); font-weight: 600; }

/* ============ CONVERSATION ============ */
.conv-header { padding-bottom: 14px; margin-bottom: 22px; border-bottom: 1px solid var(--hairline); display: flex; gap: 12px; align-items: flex-start; }
.conv-header-text { flex: 1; min-width: 0; }
.conv-title { font-family: var(--font-serif); font-size: 20px; font-weight: 600; line-height: 1.3; margin: 0 0 6px; }
.conv-context { display: flex; gap: 8px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.12em; }
.ctxpill { padding: 2px 8px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 100px; display: inline-flex; align-items: center; }
.ctxpill img { width: 14px; height: 14px; border-radius: 50%; object-fit: cover; margin-right: 5px; }
#convBotPill { color: var(--bot-ink); border-color: var(--bot-edge); }

.messages { display: flex; flex-direction: column; gap: var(--msg-gap, 22px); padding-bottom: 12px; }
.msg { display: flex; gap: 12px; animation: msg-in 0.3s ease; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.msg-avatar { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; overflow: hidden; }
.msg-avatar.user { background: var(--user-bubble); color: var(--text); }
.msg-avatar.bot { background: var(--surface-2); }
.msg-avatar.bot img { width: 100%; height: 100%; object-fit: cover; }
.msg-avatar.system { background: var(--surface-2); color: var(--text-3); border: 1px dashed var(--hairline-strong); }
.msg-bubble { flex: 1; min-width: 0; }
.msg-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.msg-name { font-size: 13px; font-weight: 600; }
.msg-name .sub { font-family: var(--font-mono); font-size: 9px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.12em; margin-left: 6px; font-weight: 400; }
.msg-time { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); }
.msg-content { font-size: 14.5px; line-height: 1.65; overflow-wrap: break-word; }
.msg.user .msg-content { background: var(--user-bubble); border-radius: 10px; padding: 10px 14px; display: inline-block; white-space: pre-wrap; }
.msg.system .msg-content { color: var(--text-2); font-size: 12.5px; font-style: italic; padding: 8px 12px; background: var(--surface-2); border-radius: 8px; display: inline-block; }

/* Markdown body */
.md-body p { margin: 0 0 10px; }
.md-body p:last-child { margin-bottom: 0; }
.md-body h1, .md-body h2, .md-body h3, .md-body h4 { font-family: var(--font-serif); margin: 18px 0 8px; line-height: 1.3; }
.md-body h1 { font-size: 21px; } .md-body h2 { font-size: 18px; } .md-body h3 { font-size: 16px; } .md-body h4 { font-size: 14.5px; }
.md-body ul, .md-body ol { margin: 0 0 10px; padding-left: 22px; }
.md-body li { margin-bottom: 3px; }
.md-body a { color: var(--bot-ink); text-decoration-color: color-mix(in srgb, var(--bot-ink) 40%, transparent); }
[data-theme="dark"] .md-body a { filter: brightness(1.5); }
.md-body blockquote { margin: 10px 0; padding: 6px 14px; border-left: 2px solid var(--gold); background: var(--surface-2); border-radius: 0 8px 8px 0; color: var(--text-2); }
.md-body hr { border: none; border-top: 1px solid var(--hairline-strong); margin: 16px 0; }
.md-body table { border-collapse: collapse; margin: 10px 0; font-size: 13px; max-width: 100%; display: block; overflow-x: auto; }
.md-body th, .md-body td { border: 1px solid var(--hairline-strong); padding: 6px 10px; text-align: left; }
.md-body th { background: var(--surface-2); font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); }
.md-body img { max-width: 100%; border-radius: 10px; border: 1px solid var(--hairline); box-shadow: 0 8px 24px rgba(0,0,0,0.12); margin: 8px 0; }
.md-body code { font-family: var(--font-mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--hairline); padding: 1px 5px; border-radius: 4px; }
.md-body pre { margin: 10px 0; border-radius: 10px; border: 1px solid var(--hairline-strong); overflow: hidden; background: #211f1a; }
[data-theme="dark"] .md-body pre { background: #14120e; }
.md-body pre code { display: block; background: transparent; border: none; padding: 12px 14px; overflow-x: auto; color: #f4efe3; line-height: 1.55; }
.codebar { display: flex; align-items: center; justify-content: space-between; padding: 5px 12px; background: rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.08); font-family: var(--font-mono); font-size: 9.5px; color: rgba(244,239,227,0.55); text-transform: uppercase; letter-spacing: 0.12em; }
.codebar button { background: transparent; border: none; color: rgba(244,239,227,0.55); font-family: var(--font-mono); font-size: 9.5px; cursor: pointer; text-transform: uppercase; letter-spacing: 0.12em; padding: 2px 4px; }
.codebar button:hover { color: #f4efe3; }

/* streaming caret */
.msg-content.streaming .md-body > :last-child::after,
.msg-content.streaming .md-body:empty::after { content: '▎'; color: var(--bot-ink); animation: blink 0.9s steps(2) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }

/* user attachments echo */
.msg-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg-attachments .attach-chip { background: var(--surface); }

/* ============ THINKING STRIP ============ */
.thinking-strip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: 100px; margin-top: 2px; box-shadow: 0 2px 10px rgba(61,57,41,0.05); }
.thinking-orb { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--bot-2), var(--bot)); animation: orb-pulse 1.6s ease-in-out infinite; flex-shrink: 0; }
@keyframes orb-pulse { 0%,100% { transform: scale(0.8); opacity: 0.75; } 50% { transform: scale(1.05); opacity: 1; } }
.thinking-text { font-size: 12.5px; color: var(--text-2); }
.thinking-text .phase { transition: opacity 0.3s; }
.thinking-text .node { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; margin-left: 8px; }
.thinking-elapsed { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); border-left: 1px solid var(--hairline-strong); padding-left: 10px; }

/* ============ V2: reasoning stream + tool chips ============ */
.reasoning { margin: 0 0 10px; border: 1px dashed var(--hairline-strong); border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.reasoning summary { cursor: pointer; padding: 7px 12px; font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--purple); display: flex; align-items: center; gap: 6px; list-style: none; }
.reasoning summary::-webkit-details-marker { display: none; }
.reasoning summary::before { content: "◐"; }
.reasoning[open] summary { border-bottom: 1px dashed var(--hairline); }
.reasoning .reasoning-body { padding: 10px 14px; font-family: var(--font-serif); font-style: italic; font-size: 13.5px; color: var(--text-2); line-height: 1.6; white-space: pre-wrap; max-height: 220px; overflow-y: auto; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.tool-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 11px; border-radius: 100px; border: 1px solid var(--hairline-strong); background: var(--surface); font-family: var(--font-body); font-size: 11px; color: var(--text-2); letter-spacing: 0; animation: msg-in 0.25s ease; }
.tool-chip .spin { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--gold-soft); border-top-color: var(--gold); animation: spin 0.8s linear infinite; }
.tool-chip.done { border-color: rgba(94,138,78,0.35); color: var(--green); }
.tool-chip.done::before { content: "✓"; font-size: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ HANDOFF ============ */
.handoff-row { margin-top: 12px; }
.handoff-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 100px; border: 1.5px solid var(--hb, var(--gold)); background: color-mix(in srgb, var(--hb, var(--gold)) 8%, var(--surface)); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.15s; box-shadow: 0 2px 12px color-mix(in srgb, var(--hb, var(--gold)) 18%, transparent); }
.handoff-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px color-mix(in srgb, var(--hb, var(--gold)) 30%, transparent); }
.handoff-btn img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.handoff-btn .arr { color: var(--hb, var(--gold)); }
.handoff-note { font-family: var(--font-mono); font-size: 9px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.12em; margin-top: 5px; }

/* ============ GENERATION PANEL (doc / excel / image jobs) ============ */
.gen-card { margin-top: 12px; border: 1px solid var(--gold-edge); border-radius: 12px; background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--gold) 4%, var(--surface))); overflow: hidden; position: relative; animation: msg-in 0.3s ease; }
.gen-card.running::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); background-size: 200% 100%; animation: gen-sheen 1.6s linear infinite; }
@keyframes gen-sheen { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.gen-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.gen-kind { font-family: var(--font-mono); font-size: 9px; font-weight: 600; color: var(--gold-2); background: var(--gold-soft); padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.14em; flex-shrink: 0; }
[data-theme="dark"] .gen-kind { color: var(--gold); }
.gen-title { font-family: var(--font-serif); font-size: 14.5px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gen-elapsed { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); flex-shrink: 0; }
.gen-status { display: flex; align-items: center; gap: 9px; padding: 0 14px 12px; font-size: 12.5px; color: var(--text-2); }
.gen-status .spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--gold-soft); border-top-color: var(--gold); animation: spin 0.8s linear infinite; flex-shrink: 0; }
.gen-codeline { margin: 0 14px 12px; padding: 6px 10px; background: #211f1a; color: #d8d0bc; border-radius: 7px; font-family: var(--font-mono); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gen-codeline .lines { color: var(--gold); }
.gen-done { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--hairline); }
.gen-file-ico { width: 38px; height: 38px; border-radius: 9px; background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.05em; flex-shrink: 0; }
.gen-file-ico.xlsx { background: linear-gradient(135deg, #2e7d4f, #1d5c38); }
.gen-file-ico.docx { background: linear-gradient(135deg, #2b579a, #1c3c6e); }
.gen-file-ico.pdf  { background: linear-gradient(135deg, #b8504a, #8e352f); }
.gen-file-ico.pptx { background: linear-gradient(135deg, #c4502e, #963a1f); }
.gen-file-meta { flex: 1; min-width: 0; }
.gen-file-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gen-file-sub { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 1px; }
.gen-actions { display: flex; gap: 6px; flex-shrink: 0; }
.gen-btn { height: 28px; padding: 0 12px; border-radius: 7px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.gen-btn.primary { background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #fff; border: 1px solid var(--gold-2); }
.gen-btn.ghost { background: var(--surface); color: var(--text-2); border: 1px solid var(--hairline); }
.gen-btn.ghost:hover { border-color: var(--gold-edge); color: var(--text); }
.gen-error { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--rose); font-size: 12.5px; border-top: 1px solid rgba(184,116,106,0.25); background: rgba(184,116,106,0.06); }
.gen-error .retry { margin-left: auto; }
.gen-img { display: block; width: 100%; max-height: 420px; object-fit: contain; background: var(--surface-2); border-top: 1px solid var(--hairline); }

/* ============ COMPOSER ============ */
.chat-composer-wrap { padding: 12px 32px 10px; border-top: 1px solid var(--hairline); position: relative; background: var(--bg); }
.composer-card { max-width: 800px; margin: 0 auto; border: 1px solid var(--hairline-strong); border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 8px 32px rgba(61,57,41,0.06); overflow: hidden; transition: all 0.2s; position: relative; }
.composer-card:focus-within { border-color: var(--bot-edge); box-shadow: 0 8px 32px rgba(61,57,41,0.08), 0 0 0 4px var(--bot-soft); }
.composer-card.dragging::after { content: "Drop files to attach"; position: absolute; inset: 0; background: var(--gold-soft); border: 2px dashed var(--gold); border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 12px; color: var(--gold-2); text-transform: uppercase; letter-spacing: 0.12em; z-index: 10; }
.composer-input { width: 100%; border: none; background: transparent; padding: 16px 20px 4px; font-family: var(--font-serif); font-size: 16.5px; line-height: 1.5; color: var(--text); outline: none; resize: none; min-height: 54px; max-height: 200px; display: block; }
.composer-input::placeholder { color: var(--text-3); font-style: italic; }
.composer-tray { display: flex; align-items: center; padding: 8px 12px; gap: 6px; border-top: 1px solid var(--hairline); flex-wrap: wrap; }
.ctag { height: 26px; padding: 0 10px; border-radius: 100px; border: 1px solid var(--hairline); background: transparent; font: inherit; font-size: 11px; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.ctag:hover { border-color: var(--bot-edge); color: var(--text); background: var(--bot-soft); }
.ctag.active { background: var(--bot-soft); border-color: var(--bot-edge); color: var(--text); }
.ctag svg { width: 11px; height: 11px; }
.ctag .agent-mini { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; margin-right: 2px; }
.filesession-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 100px; background: rgba(94,138,78,0.1); border: 1px solid rgba(94,138,78,0.3); font-family: var(--font-mono); font-size: 9px; color: var(--green); text-transform: uppercase; letter-spacing: 0.08em; }
.filesession-chip svg { width: 10px; height: 10px; }
.composer-send { margin-left: auto; height: 28px; padding: 0 14px; border: none; border-radius: 7px; background: linear-gradient(135deg, var(--bot), var(--bot-2)); color: #fff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: filter 0.15s, transform 0.1s, opacity 0.2s; }
.composer-send:hover { filter: brightness(1.12); }
.composer-send:active { transform: scale(0.97); }
.composer-send:disabled { opacity: 0.5; cursor: default; filter: none; }
.composer-send svg { width: 12px; height: 12px; }
.composer-hint { max-width: 800px; margin: 6px auto 0; font-family: var(--font-mono); font-size: 9px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; text-align: center; }

.composer-attachments { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; }
.attach-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 6px; font-size: 11px; max-width: 240px; }
.attach-chip .att-type { font-family: var(--font-mono); font-size: 9px; color: var(--gold-2); padding: 1px 4px; background: var(--surface); border-radius: 3px; text-transform: uppercase; flex-shrink: 0; }
[data-theme="dark"] .attach-chip .att-type { color: var(--gold); }
.attach-chip .att-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach-chip .att-x { color: var(--text-3); cursor: pointer; padding: 0 2px; border: none; background: transparent; font-size: 13px; line-height: 1; }
.attach-chip .att-x:hover { color: var(--rose); }
.attach-chip img.thumb { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; }

/* ============ SETTINGS DRAWER ============ */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(20, 18, 14, 0.4); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 92vw; background: var(--surface); border-left: 1px solid var(--hairline-strong); z-index: 210; transform: translateX(102%); transition: transform 0.3s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; box-shadow: -16px 0 48px rgba(0,0,0,0.12); }
.drawer.show { transform: translateX(0); }
.drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--hairline); display: flex; align-items: center; }
.drawer-title { font-family: var(--font-serif); font-size: 20px; font-weight: 600; flex: 1; }
.drawer-close { background: transparent; border: none; color: var(--text-3); cursor: pointer; font-size: 22px; padding: 2px 8px; }
.drawer-close:hover { color: var(--text); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 32px; }
.settings-section { margin-bottom: 28px; }
.settings-section-h { font-family: var(--font-serif); font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.settings-section-sub { font-size: 12px; color: var(--text-2); margin-bottom: 12px; }
.settings-section-sub code { font-family: var(--font-mono); font-size: 11px; background: var(--surface-2); padding: 1px 4px; border-radius: 3px; }
.settings-row { display: flex; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--hairline); gap: 14px; }
.settings-row:last-child { border-bottom: none; }
.settings-row .label { flex: 1; min-width: 0; }
.settings-row .name { font-size: 13px; font-weight: 500; }
.settings-row .desc { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.settings-row .desc.mono { font-family: var(--font-mono); font-size: 10.5px; word-break: break-all; }
.preview-tag { font-family: var(--font-mono); font-size: 8px; color: var(--purple); background: rgba(138,109,184,0.12); padding: 1px 6px; border-radius: 100px; letter-spacing: 0.1em; vertical-align: 2px; }
.toggle { position: relative; width: 36px; height: 20px; background: var(--surface-3); border-radius: 100px; cursor: pointer; transition: background 0.15s; flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; background: var(--surface); border-radius: 50%; transition: left 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.toggle.on { background: var(--purple); }
.toggle.on::after { left: 18px; }
.select { padding: 6px 10px; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-sm); font: inherit; font-size: 12px; color: var(--text); cursor: pointer; }
.form-row { margin-bottom: 14px; }
.form-lbl { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 5px; display: block; }
.form-input { width: 100%; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-sm); font: inherit; font-size: 13px; color: var(--text); outline: none; }
.form-input:focus { border-color: var(--gold-edge); }
.endpoint-list { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); line-height: 2; }
.endpoint-list b { color: var(--text-2); font-weight: 600; }
.endpoint-list .row { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--hairline); padding: 3px 0; }
.endpoint-list .url { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: right; }

/* ============ TOASTS ============ */
.toast-host { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; background: #2a2620; color: #f4efe3; border: 1px solid rgba(247,243,237,0.14); border-radius: 10px; padding: 10px 14px; font-size: 13px; box-shadow: 0 12px 40px rgba(0,0,0,0.3); animation: toast-in 0.3s cubic-bezier(.2,.8,.2,1); max-width: 520px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.toast.err { border-color: rgba(184,116,106,0.5); }
.toast.err::before { content: "⚠"; color: var(--rose); }
.toast.ok::before { content: "✓"; color: #8fc97a; }
.toast .toast-act { background: transparent; border: 1px solid rgba(247,243,237,0.25); color: #f4efe3; border-radius: 6px; padding: 3px 10px; font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; flex-shrink: 0; }
.toast .toast-act:hover { background: rgba(247,243,237,0.1); }
.toast.leaving { opacity: 0; transform: translateY(8px); transition: all 0.25s; }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* small-screen starters fallback (full mobile pass lives in the V2.3 block below) */
@media (max-width: 760px) {
  .starters { grid-template-columns: 1fr; }
}

/* ==========================================================================
   V2.1 ADDITIONS — collapsible sidebar, brain link, tabs/artifacts, doc-gen
   wizard + ticker, conference theater, lightbox, share modal, command
   palette, voice, message footers, customization vars, $500k polish.
   ========================================================================== */

/* ---------- density ---------- */
[data-density="compact"] { --msg-gap: 13px; }
[data-density="compact"] .msg-content { font-size: calc(var(--font-size) + 0.2px); line-height: calc(var(--line) - 0.06); }
[data-density="compact"] .conv-scroll { padding: 16px 28px; }
[data-density="compact"] .msg-bubble .msg-meta { margin-bottom: 2px; }

/* ---------- collapsible sidebar ---------- */
body.nav-collapsed { --nav-w: 66px; }
.collapse-btn { margin-left: 2px; }
.collapse-btn svg { transition: transform 0.25s; }
body.nav-collapsed .collapse-btn svg { transform: rotate(180deg); }
body.nav-collapsed .brand-name, body.nav-collapsed .live-chip,
body.nav-collapsed .new-chat-btn .label, body.nav-collapsed .nav-brain .label,
body.nav-collapsed .nav-label, body.nav-collapsed .nav-tabs,
body.nav-collapsed .nav-recents, body.nav-collapsed .nav-artifacts,
body.nav-collapsed #navSessionsWrap, body.nav-collapsed #navArtifactsWrap,
body.nav-collapsed .nav-bot .bot-name, body.nav-collapsed .nav-bot .brand-dot,
body.nav-collapsed .nav-user-text { display: none; }
body.nav-collapsed .brand { padding: 4px 10px 12px; justify-content: center; }
body.nav-collapsed .new-chat-btn { padding: 8px; justify-content: center; margin: 0 10px 10px; }
body.nav-collapsed .nav-brain { justify-content: center; padding: 8px; margin: 0 10px 6px; }
body.nav-collapsed .nav-bot { justify-content: center; padding: 6px 0; border-left-width: 0; }
body.nav-collapsed .nav-bot img { width: 30px; height: 30px; }
body.nav-collapsed .nav-user { flex-direction: column; gap: 6px; padding: 10px 6px; }

/* ---------- brain nav link ---------- */
.nav-brain { display: flex; align-items: center; gap: 9px; margin: 0 12px 8px; padding: 8px 12px; border-radius: 9px; text-decoration: none; color: var(--text-2); border: 1px solid var(--hairline); background: linear-gradient(135deg, rgba(138,109,184,0.08), rgba(74,125,168,0.08)); transition: all 0.15s; font-size: 12.5px; }
.nav-brain:hover { border-color: rgba(138,109,184,0.45); color: var(--text); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(138,109,184,0.15); }
.nav-brain .label { font-weight: 600; }
.nav-brain .label .sub { display: block; font-family: var(--font-mono); font-size: 8.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 400; margin-top: 1px; }

/* ---------- sidebar tabs + artifacts ---------- */
.nav-tabs { display: flex; gap: 4px; margin: 12px 12px 0; padding: 3px; background: var(--surface-2); border-radius: 8px; }
.nav-tab { flex: 1; height: 24px; border: none; border-radius: 6px; background: transparent; font: inherit; font-size: 11px; font-weight: 500; color: var(--text-3); cursor: pointer; transition: all 0.15s; }
.nav-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.08); font-weight: 600; }
.nav-artifacts { padding-bottom: 6px; }
.art-row { display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 16px; cursor: default; }
.art-row:hover { background: var(--gold-soft); }
.art-meta { flex: 1; min-width: 0; }
.art-name { font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-sub { font-family: var(--font-mono); font-size: 8.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 1px; }
.art-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; flex-shrink: 0; }
.art-row:hover .art-actions { opacity: 1; }
.art-btn { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--text-3); border-radius: 5px; font-size: 12px; cursor: pointer; text-decoration: none; padding: 0; }
.art-btn:hover { background: var(--surface-2); color: var(--text); }
.art-btn.del:hover { color: var(--rose); }
.gen-file-ico.sm { width: 28px; height: 28px; border-radius: 7px; font-size: 7.5px; }
.art-skel { height: 42px; margin: 6px 12px; border-radius: 9px; }

/* ---------- skeleton shimmer ---------- */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- topbar badges ---------- */
.collab-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; background: rgba(94,138,78,0.12); border: 1px solid rgba(94,138,78,0.4); border-radius: 100px; font-family: var(--font-mono); font-size: 10px; color: var(--green); text-transform: uppercase; letter-spacing: 0.1em; }
.collab-badge .pulse { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: live-pulse 1.4s ease-in-out infinite; }
.readonly-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; background: var(--surface-2); border: 1px solid var(--hairline-strong); border-radius: 100px; font-family: var(--font-mono); font-size: 10px; color: var(--text-3); letter-spacing: 0.1em; }

/* ---------- message footer ---------- */
.msg-footer { margin-top: 8px; font-family: var(--font-mono); font-size: 9.5px; color: var(--text-3); letter-spacing: 0.04em; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.transfer-badge { font-family: var(--font-mono); font-size: 8.5px; color: var(--purple); background: rgba(138,109,184,0.12); border: 1px solid rgba(138,109,184,0.3); padding: 1px 7px; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.1em; }
.brain-chip { font-family: var(--font-mono); font-size: 9px; color: var(--purple); background: rgba(138,109,184,0.1); padding: 1px 7px; border-radius: 100px; cursor: help; }

/* ---------- doc-gen wizard + rolling code ticker ---------- */
.gen-card.wizard { border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.gen-card.wizard::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 30%, color-mix(in srgb, var(--gold) 9%, transparent) 48%, color-mix(in srgb, var(--gold-2) 13%, transparent) 52%, transparent 70%); background-size: 220% 100%; animation: wiz-sheen 2.2s ease-in-out infinite; border-radius: 12px; }
@keyframes wiz-sheen { from { background-position: 180% 0; } to { background-position: -180% 0; } }
.gen-wizard { display: flex; align-items: center; gap: 10px; padding: 2px 14px 12px; font-size: 12.5px; color: var(--text-2); }
.wiz-orb { display: inline-flex; gap: 3px; align-items: center; }
.wiz-orb span { width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-2)); animation: wiz-bounce 1.1s ease-in-out infinite; }
.wiz-orb span:nth-child(2) { animation-delay: 0.15s; }
.wiz-orb span:nth-child(3) { animation-delay: 0.3s; }
@keyframes wiz-bounce { 0%,100% { transform: translateY(0) scale(0.85); opacity: 0.6; } 50% { transform: translateY(-4px) scale(1.05); opacity: 1; } }
.wiz-phase { transition: opacity 0.3s; }
.wiz-lines { margin-left: auto; font-family: var(--font-mono); font-size: 9.5px; color: var(--gold-2); background: var(--gold-soft); padding: 1px 8px; border-radius: 100px; }
[data-theme="dark"] .wiz-lines { color: var(--gold); }
/* rolling code ticker — fixed ~6-line window, append-only DOM, smooth auto-scroll (ADDENDUM 10 §1.4) */
.gen-ticker { margin: 0 14px 12px; padding: 8px 12px; background: #16140f; border-radius: 9px; font-family: var(--font-mono); font-size: 10px; line-height: 1.55; border: 1px solid rgba(255,255,255,0.05); max-height: 104px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28%); mask-image: linear-gradient(to bottom, transparent 0, #000 28%); }
.gen-ticker .tl { color: #c9c0a8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0.72; animation: ticker-in 0.25s ease; }
.gen-ticker .tl:last-child { color: #f0e8d2; }
.gen-ticker .tl:last-child::after { content: '▎'; color: var(--gold); animation: blink 0.9s steps(2) infinite; }
@keyframes ticker-in { from { transform: translateY(5px); opacity: 0; } }
.gen-card.reveal { animation: card-reveal 0.45s cubic-bezier(.2,.9,.3,1.2); }
@keyframes card-reveal { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }

/* ---------- conference-call takeover theater ---------- */
.conf-overlay { position: fixed; inset: 0; z-index: 600; background: rgba(16,14,10,0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.32s; }
.conf-overlay.show { opacity: 1; }
.conf-card { background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: 22px; padding: 38px 52px 32px; text-align: center; box-shadow: 0 40px 120px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.04) inset; transform: translateY(10px) scale(0.97); transition: transform 0.35s cubic-bezier(.2,.9,.3,1.15); max-width: 520px; }
.conf-overlay.show .conf-card { transform: none; }
.conf-avatars { display: flex; align-items: center; justify-content: center; gap: 26px; margin-bottom: 22px; }
.conf-av { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.conf-av img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); box-shadow: 0 8px 30px rgba(0,0,0,0.25); position: relative; z-index: 1; }
.conf-ring { position: absolute; top: -7px; left: 50%; transform: translateX(-50%); width: 98px; height: 98px; border-radius: 50%; border: 2px solid var(--gold); opacity: 0; }
.conf-av.to .conf-ring { animation: conf-ring 1.5s ease-out infinite; }
.conf-overlay.joined .conf-av .conf-ring { animation: none; opacity: 0; }
.conf-overlay.joined .conf-av.to img { border-color: var(--green); box-shadow: 0 0 0 4px rgba(94,138,78,0.3), 0 8px 30px rgba(0,0,0,0.25); }
@keyframes conf-ring { 0% { transform: translateX(-50%) scale(0.85); opacity: 0.8; } 100% { transform: translateX(-50%) scale(1.35); opacity: 0; } }
.conf-name { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-2); }
.conf-line { display: flex; gap: 7px; align-items: center; padding-bottom: 26px; }
.conf-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); opacity: 0.25; animation: conf-dial 1.4s ease-in-out infinite; }
.conf-dot:nth-child(2) { animation-delay: 0.12s; }
.conf-dot:nth-child(3) { animation-delay: 0.24s; }
.conf-dot:nth-child(4) { animation-delay: 0.36s; }
.conf-dot:nth-child(5) { animation-delay: 0.48s; }
@keyframes conf-dial { 0%,100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.15); } }
.conf-overlay.joined .conf-dot { background: var(--green); opacity: 1; animation: none; }
.conf-status { font-family: var(--font-serif); font-size: 19px; font-weight: 600; margin-bottom: 6px; }
.conf-sub { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.12em; }

/* ---------- office-viewer lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 560; background: rgba(16,14,10,0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 4vh 4vw; opacity: 0; transition: opacity 0.25s; }
.lightbox.show { opacity: 1; }
.lightbox-card { width: min(1100px, 100%); height: 100%; background: var(--surface); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 40px 120px rgba(0,0,0,0.5); transform: translateY(12px); transition: transform 0.3s cubic-bezier(.2,.8,.2,1); }
.lightbox.show .lightbox-card { transform: none; }
.lightbox-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--hairline); }
.lightbox-name { font-family: var(--font-serif); font-size: 15.5px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lightbox-frame { flex: 1; border: none; width: 100%; background: #fff; }

/* ---------- share modal ---------- */
.modal { position: fixed; inset: 0; z-index: 580; background: rgba(16,14,10,0.5); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.22s; }
.modal.show { opacity: 1; }
.modal-card { width: min(440px, 92vw); background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: 18px; box-shadow: 0 30px 90px rgba(0,0,0,0.4); transform: translateY(8px); transition: transform 0.25s cubic-bezier(.2,.8,.2,1); overflow: hidden; }
.modal.show .modal-card { transform: none; }
.modal-head { display: flex; align-items: center; padding: 16px 20px 10px; }
.modal-title { font-family: var(--font-serif); font-size: 18px; font-weight: 600; flex: 1; }
.share-modes { display: flex; flex-direction: column; gap: 8px; padding: 6px 16px 18px; }
.share-mode { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 10px; text-align: left; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface); font: inherit; color: var(--text); cursor: pointer; transition: all 0.15s; }
.share-mode:hover { border-color: var(--gold-edge); background: var(--gold-soft); transform: translateY(-1px); }
.share-mode .sm-ico { grid-row: 1 / 3; font-size: 19px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border-radius: 9px; }
.share-mode .sm-name { font-size: 13.5px; font-weight: 600; }
.share-mode .sm-desc { grid-column: 2; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* ---------- command palette (⌘K) ---------- */
.cmdk { position: fixed; inset: 0; z-index: 640; background: rgba(16,14,10,0.45); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); display: flex; align-items: flex-start; justify-content: center; padding-top: 16vh; opacity: 0; transition: opacity 0.18s; }
.cmdk.show { opacity: 1; }
.cmdk-card { width: min(520px, 92vw); background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 90px rgba(0,0,0,0.45); transform: translateY(-6px); transition: transform 0.22s cubic-bezier(.2,.8,.2,1); }
.cmdk.show .cmdk-card { transform: none; }
.cmdk-input { width: 100%; border: none; outline: none; background: transparent; padding: 16px 20px; font-family: var(--font-serif); font-size: 17px; color: var(--text); border-bottom: 1px solid var(--hairline); }
.cmdk-input::placeholder { color: var(--text-3); font-style: italic; }
.cmdk-list { max-height: 320px; overflow-y: auto; padding: 6px; }
.cmdk-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.cmdk-item img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.cmdk-item .n { font-weight: 600; font-size: 13.5px; }
.cmdk-item .r { color: var(--text-3); font-size: 11.5px; flex: 1; }
.cmdk-item .d { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; }
.cmdk-item.sel { background: var(--gold-soft); outline: 1px solid var(--gold-edge); }
.cmdk-item.current .n::after { content: " ·"; color: var(--green); }
.cmdk-empty { padding: 18px; text-align: center; color: var(--text-3); font-size: 12.5px; font-style: italic; }
.cmdk-hint { padding: 8px 16px; border-top: 1px solid var(--hairline); font-family: var(--font-mono); font-size: 9px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- voice (mic / convo / tts) ---------- */
.mic-btn, .convo-btn { position: relative; width: 30px; padding: 0; justify-content: center; }
.mic-btn svg, .convo-btn svg { width: 13px; height: 13px; }
.mic-btn.listening { border-color: var(--rose); color: var(--rose); background: rgba(184,116,106,0.08); }
.mic-btn.listening::before { content: ""; position: absolute; inset: -3px; border-radius: 100px; border: 2px solid rgba(184,116,106, calc(0.25 + var(--lvl, 0) * 0.7)); transform: scale(calc(1 + var(--lvl, 0) * 0.22)); transition: transform 0.1s; pointer-events: none; }
.mic-btn.busy { opacity: 0.55; pointer-events: none; }
.convo-btn.active { border-color: var(--green); color: var(--green); background: rgba(94,138,78,0.1); box-shadow: 0 0 0 3px rgba(94,138,78,0.12); }
body.tts-speaking .convo-btn.active { animation: speak-pulse 1.1s ease-in-out infinite; }
@keyframes speak-pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(94,138,78,0.12); } 50% { box-shadow: 0 0 0 6px rgba(94,138,78,0.05); } }
.max-chip { font-weight: 600; }
.max-chip.active { border-color: var(--purple); color: var(--purple); background: rgba(138,109,184,0.1); }
.attach-chip.pending .spin { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--gold-soft); border-top-color: var(--gold); animation: spin 0.8s linear infinite; flex-shrink: 0; }
.attach-chip .att-sub { font-family: var(--font-mono); font-size: 9px; color: var(--text-3); font-style: italic; }

/* ---------- range + color inputs (settings) ---------- */
.range { width: 130px; accent-color: var(--gold); }
.color-input { width: 38px; height: 26px; padding: 0; border: 1px solid var(--hairline-strong); border-radius: 6px; background: var(--surface-2); cursor: pointer; }

/* ---------- $500k polish: hero gradient, entrance, depth ---------- */
.hero { position: relative; }
.hero-glow { position: absolute; top: -60px; left: -120px; width: 480px; height: 380px; border-radius: 50%; pointer-events: none; background: conic-gradient(from 0deg, color-mix(in srgb, var(--bot) 14%, transparent), color-mix(in srgb, var(--gold) 12%, transparent), color-mix(in srgb, var(--bot-2) 14%, transparent), color-mix(in srgb, var(--bot) 14%, transparent)); filter: blur(70px); animation: hero-spin 14s linear infinite; opacity: 0.8; z-index: 0; }
@keyframes hero-spin { to { transform: rotate(360deg); } }
.hero > *:not(.hero-glow) { position: relative; z-index: 1; }
.home-greet em { background-size: 200% auto; animation: greet-sheen 5s ease-in-out infinite alternate; }
@keyframes greet-sheen { from { background-position: 0% center; } to { background-position: 100% center; } }
.starter { animation: starter-in 0.5s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--stagger, 0ms); }
@keyframes starter-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.composer-card { box-shadow: 0 8px 32px rgba(61,57,41,0.06), 0 1px 2px rgba(61,57,41,0.05); }
.topbar { box-shadow: 0 1px 0 var(--hairline); }
.gen-card, .thinking-strip, .reasoning { box-shadow: 0 2px 12px rgba(61,57,41,0.04); }
[data-theme="dark"] .gen-card, [data-theme="dark"] .thinking-strip { box-shadow: 0 2px 14px rgba(0,0,0,0.25); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .hero-glow { animation: none; }
  .gen-card.wizard::after { animation: none; background: none; }
  .skeleton { animation: none; }
}

/* small screens */
@media (max-width: 860px) {
  .conf-card { padding: 26px 22px 22px; }
  .conf-av img { width: 64px; height: 64px; }
  .lightbox { padding: 2vh 2vw; }
}

/* ==========================================================================
   V2.2 — Memory/Skills marks, uniform LARGER bot avatars, Skills page +
   wizard, infra-free chrome. Edits ONLY index.html/app.js/styles.css.
   ========================================================================== */

/* ---------- Memory mark (replaces 🧠 emoji) ---------- */
.memory-mark { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex-shrink: 0; color: var(--purple); }
.memory-mark svg { width: 20px; height: 20px; }
.nav-brain:hover .memory-mark { color: #6a4fa0; }
[data-theme="dark"] .memory-mark { color: #b59ce0; }

/* ---------- Skills nav button (matches .nav-brain) ---------- */
.nav-skills { display: flex; align-items: center; gap: 9px; margin: 0 12px 8px; padding: 8px 12px; border-radius: 9px; text-align: left; width: calc(100% - 24px); cursor: pointer; color: var(--text-2); border: 1px solid var(--hairline); background: linear-gradient(135deg, rgba(200,154,58,0.08), rgba(94,138,78,0.07)); transition: all 0.15s; font: inherit; font-size: 12.5px; }
.nav-skills:hover { border-color: var(--gold-edge); color: var(--text); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(200,154,58,0.14); }
.nav-skills.active { border-color: var(--gold-edge); color: var(--text); background: var(--gold-soft); }
.skills-mark { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex-shrink: 0; color: var(--gold-2); }
.skills-mark svg { width: 19px; height: 19px; }
[data-theme="dark"] .skills-mark { color: var(--gold); }
.nav-skills .label { font-weight: 600; }
.nav-skills .label .sub { display: block; font-family: var(--font-mono); font-size: 8.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 400; margin-top: 1px; }
body.nav-collapsed .nav-skills { justify-content: center; padding: 8px; margin: 0 10px 6px; width: auto; }
body.nav-collapsed .nav-skills .label { display: none; }

/* ---------- UNIFORM, LARGER bot avatars (matched set) ----------
   ADDENDUM 6: all 8 robot PNGs are now uniform 512×512 padded canvases
   (done at image level), so every avatar renders in an IDENTICAL frame —
   square source into square frame, dead-center, no per-bot bias needed. */
.bot-frame, .nav-bot img, .bot-pill img, .nav-recent img,
.ctxpill img, .cmdk-item img, .handoff-btn img,
.msg-avatar.bot, .conf-av img, .ctag .agent-mini {
  background: radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--bb, var(--bot-2)) 16%, var(--surface-2)), var(--surface-2) 72%);
}
/* identical frames: uniform square canvases render 1:1, centered */
.nav-bot img, .bot-pill img, .nav-recent img, .ctxpill img,
.cmdk-item img, .handoff-btn img, .msg-avatar.bot img,
.conf-av img, .ctag .agent-mini, .hero-art img {
  object-fit: contain !important;
  object-position: center;
}
/* LARGER sidebar bot rows (expanded) */
.nav-bot { padding: 8px 16px; gap: 11px; }
.nav-bot img { width: 38px; height: 38px; border-radius: 11px; padding: 2px; border: 1px solid var(--hairline); }
.nav-bot.active img { box-shadow: 0 0 0 2px color-mix(in srgb, var(--bb, var(--gold)) 30%, transparent); }
.nav-bot .bot-name { font-size: 13px; }
/* LARGER collapsed icon rail */
body.nav-collapsed .nav-bot { padding: 7px 0; }
body.nav-collapsed .nav-bot img { width: 44px; height: 44px; border-radius: 13px; }
/* session rows a touch larger / framed */
.nav-recent img { width: 26px; height: 26px; border-radius: 8px; padding: 1px; }
/* message + pill avatars: framed square, whole-bot */
.msg-avatar.bot { border: 1px solid var(--hairline); }
.bot-pill img { width: 30px; height: 30px; border-radius: 9px; padding: 1px; }
.cmdk-item img { border-radius: 9px; padding: 1px; }
.handoff-btn img { border-radius: 9px; }
.conf-av img { border-radius: 22px; padding: 4px; }

/* ---------- max-chip: never name the model ---------- */
/* (label/title set in markup; gated to Tom in JS) */

/* ---------- SKILLS PAGE ---------- */
.skills-page { position: absolute; inset: 48px 0 0 0; background: var(--bg); z-index: 40; overflow: hidden; display: flex; flex-direction: column; animation: msg-in 0.3s ease; }
.skills-scroll { flex: 1; overflow-y: auto; padding: 30px 32px 60px; }
.skills-inner { max-width: 920px; margin: 0 auto; }
.skills-hero { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 26px; }
.skills-hero-text { flex: 1; min-width: 0; }
.skills-title { font-family: var(--font-serif); font-size: clamp(26px, 3vw, 34px); font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.skills-sub { font-size: 14px; line-height: 1.6; color: var(--text-2); margin: 0; max-width: 640px; }
.skills-create-btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border: none; border-radius: 9px; background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: filter 0.15s, transform 0.1s; box-shadow: 0 4px 16px rgba(200,154,58,0.22); }
.skills-create-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.skills-create-btn svg { width: 15px; height: 15px; }
.skills-group { margin-bottom: 30px; }
.skills-group-h { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.skill-card { border: 1px solid var(--hairline); border-radius: 14px; background: var(--surface); padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 8px; transition: all 0.16s; position: relative; overflow: hidden; animation: msg-in 0.3s ease; }
.skill-card:hover { border-color: var(--gold-edge); box-shadow: 0 8px 24px rgba(61,57,41,0.07); transform: translateY(-1px); }
.skill-card.off { opacity: 0.62; }
.skill-card-head { display: flex; align-items: flex-start; gap: 10px; }
.skill-card-ico { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--gold-soft), color-mix(in srgb, var(--gold) 14%, transparent)); color: var(--gold-2); }
[data-theme="dark"] .skill-card-ico { color: var(--gold); }
.skill-card-ico svg { width: 17px; height: 17px; }
.skill-card-name { font-family: var(--font-serif); font-size: 15.5px; font-weight: 600; line-height: 1.25; flex: 1; min-width: 0; }
.skill-card-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.5; flex: 1; }
.skill-card-foot { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--hairline); }
.skill-scope { font-family: var(--font-mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.1em; padding: 2px 8px; border-radius: 100px; color: var(--text-3); background: var(--surface-2); }
.skill-scope.org { color: var(--green); background: rgba(94,138,78,0.1); }
.skill-card-foot .toggle { margin-left: auto; }
.skill-toggle-label { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); }
.skill-toggle-label.on { color: var(--green); }
.skills-empty { grid-column: 1 / -1; padding: 26px; text-align: center; color: var(--text-3); font-size: 13px; font-style: italic; border: 1px dashed var(--hairline-strong); border-radius: 14px; }
.skills-empty.error { color: var(--rose); border-color: rgba(184,116,106,0.35); font-style: normal; }
.skill-skel { height: 118px; border-radius: 14px; }

/* ---------- SKILL WIZARD MODAL ---------- */
.skill-modal .skill-card { width: min(560px, 94vw); background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: 18px; box-shadow: 0 30px 90px rgba(0,0,0,0.4); transform: translateY(8px); transition: transform 0.25s cubic-bezier(.2,.8,.2,1); overflow: visible; max-height: 90vh; display: flex; flex-direction: column; padding: 0; }
.skill-modal.show .skill-card { transform: none; }
.skill-step { padding: 4px 22px 22px; overflow-y: auto; }
.skill-lead { font-size: 13.5px; line-height: 1.6; color: var(--text-2); margin: 4px 0 14px; }
.skill-idea-input, .skill-textarea { width: 100%; font-family: var(--font-serif); font-size: 14.5px; line-height: 1.55; }
.skill-idea-input { padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--hairline-strong); border-radius: 12px; color: var(--text); outline: none; resize: vertical; min-height: 92px; }
.skill-idea-input:focus { border-color: var(--gold-edge); }
.skill-idea-input::placeholder { color: var(--text-3); font-style: italic; }
.skill-textarea { resize: vertical; min-height: 60px; font-family: var(--font-body); font-size: 13px; }
.skill-examples { margin: 14px 0 4px; display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.skill-ex-label { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); width: 100%; }
.skill-ex { text-align: left; padding: 7px 11px; border: 1px solid var(--hairline); border-radius: 100px; background: var(--surface); font: inherit; font-size: 11.5px; color: var(--text-2); cursor: pointer; transition: all 0.14s; }
.skill-ex:hover { border-color: var(--gold-edge); color: var(--text); background: var(--gold-soft); }
.skill-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.skill-actions .gen-btn { height: 34px; padding: 0 16px; font-size: 13px; }
.skill-actions .gen-btn svg { width: 13px; height: 13px; }
.skill-drafting { display: flex; align-items: center; gap: 12px; padding: 26px 4px 8px; font-family: var(--font-serif); font-size: 16px; color: var(--text); }
.skill-draft-hint { font-size: 12.5px; color: var(--text-3); padding: 0 4px 22px; }
.skill-share-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.skill-share-text { display: flex; flex-direction: column; gap: 2px; }
.skill-share-text b { font-size: 13px; font-weight: 600; }
.skill-share-text span { font-size: 11.5px; color: var(--text-3); }
.skill-modal .form-lbl { margin-bottom: 6px; }
.skill-modal .modal-head { padding: 18px 22px 8px; }

body.nav-collapsed .nav-brain .memory-mark { margin: 0; }

/* ==========================================================================
   V2.3 — Entra login gate, prod font softening (sidebar), Temporal Brain icon,
   Workflows, prompt suggestions, topic-shift modal, full mobile responsive.
   ========================================================================== */

/* ---------- softer SIDEBAR rendering (ADDENDUM 4) ---------- */
aside.nav {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.01em;
}
aside.nav .nav-bot, aside.nav .nav-recent, aside.nav .nav-user-name,
aside.nav .nav-skills .label, aside.nav .nav-brain .label,
aside.nav .new-chat-btn .label {
  font-weight: 460;          /* slightly lighter than before — less harsh */
  letter-spacing: 0.01em;
}
aside.nav .nav-bot.active, aside.nav .nav-recent.active { font-weight: 560; }
aside.nav .brand-name { font-weight: 560; letter-spacing: 0.005em; }

/* ---------- auth gate: hide app shell until signed in ---------- */
body.auth-pending > .mobile-hamburger,
body.auth-pending > aside.nav,
body.auth-pending > main,
body.auth-pending > .drawer,
body.auth-pending > .drawer-backdrop { display: none !important; }
.mm-auth-overlay { display: flex; }
.mm-auth-overlay.hidden { display: none !important; }

/* ---------- ENTRA LOGIN OVERLAY (recreated from prod mm-auth design) ---------- */
.mm-auth-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: radial-gradient(1200px 800px at 70% 10%, #14201f 0%, #0c1413 45%, #080b0b 100%);
  align-items: center; justify-content: center;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  color: #e6edf3; overflow: hidden;
}
.mm-auth-bg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.7; }
.mm-auth-vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 700px at 50% 45%, transparent 30%, rgba(0,0,0,0.55) 100%); }

.mm-auth-topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; }
.mm-auth-brand { display: flex; align-items: center; gap: 12px; }
.mm-auth-emblem { width: 40px; height: 40px; flex: 0 0 auto; filter: drop-shadow(0 2px 8px rgba(52,230,196,0.25)); }
.mm-auth-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.mm-auth-brand-name { font-size: 16px; font-weight: 700; letter-spacing: 0.02em; }
.mm-auth-brand-sub { font-size: 11px; color: #8b97a7; letter-spacing: 0.04em; }
.mm-auth-help { font-size: 12px; color: #8b97a7; }
.mm-auth-help a { color: #34e6c4; text-decoration: none; }
.mm-auth-help a:hover { text-decoration: underline; }

.mm-auth-card { position: relative; z-index: 4; text-align: center;
  width: min(420px, 92vw); padding: 8px 28px 36px;
  display: flex; flex-direction: column; align-items: center; }
.mm-auth-robot { position: relative; height: 360px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 6px; }
.mm-auth-robot::before { content: ''; position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(52,230,196,0.20) 0%, rgba(52,230,196,0.05) 45%, transparent 70%); }
.mm-auth-robot img { position: relative; height: 352px; width: auto; object-fit: contain;
  animation: mm-auth-float 4s ease-in-out infinite;
  filter: drop-shadow(0 24px 40px rgba(0,0,0,0.5)); }
@keyframes mm-auth-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.mm-auth-card h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; margin: 6px 0 4px; color: #f4f8fb; }
.mm-auth-sub { font-size: 14px; color: #9aa7b6; margin-bottom: 22px; }
.mm-auth-btn-wrap { width: 100%; display: flex; justify-content: center; }
.mm-auth-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 26px; border-radius: 12px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #ffffff, #eef3f6); color: #1a2733;
  font: inherit; font-size: 15px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4); transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
}
.mm-auth-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(52,230,196,0.22); filter: brightness(1.02); }
.mm-auth-btn:active { transform: translateY(0); }
.mm-auth-btn:disabled { opacity: 0.65; cursor: default; transform: none; }
.mm-auth-msg { min-height: 18px; margin: 14px 0 0; font-size: 12.5px; color: #9aa7b6; white-space: pre-line; line-height: 1.5; max-width: 360px; }
.mm-auth-msg.err { color: #ffb4ab; }
.mm-auth-guest { margin-top: 12px; background: transparent; border: none; color: #8b97a7;
  font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.mm-auth-guest:hover { color: #cdd6df; }

.mm-auth-trust { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; margin-top: 20px; font-size: 11px; color: #8b97a7; }
.mm-auth-trust-item { display: inline-flex; align-items: center; gap: 6px; }
.mm-auth-trust-item svg { width: 13px; height: 13px; flex: 0 0 auto; fill: none; stroke: rgba(52,230,196,0.85); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.mm-auth-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between;
  padding: 14px 28px; font-size: 11px; color: rgba(139,151,167,0.7); }
.mm-auth-foot-links { display: flex; flex-wrap: wrap; gap: 16px; }
.mm-auth-foot a { color: rgba(139,151,167,0.8); text-decoration: none; }
.mm-auth-foot a:hover { color: #e6edf3; }

@media (max-width: 560px) {
  .mm-auth-foot { justify-content: center; text-align: center; }
  .mm-auth-card h1 { font-size: 26px; }
  .mm-auth-robot { height: 300px; }
  .mm-auth-robot img { height: 290px; }
  .mm-auth-robot::before { width: 280px; height: 280px; }
  .mm-auth-topbar .mm-auth-brand-text { display: none; }
}

/* ---------- signed-in identity card + sign-out (settings) ---------- */
.signed-in-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px;
  border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface-2); }
.signed-in-card .avatar { width: 40px; height: 40px; font-size: 14px; }
.signed-in-meta { min-width: 0; }
.signed-in-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.signed-in-sub { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form-input.readonly { background: var(--surface-2); color: var(--text-2); cursor: default; }
.signout-btn { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px;
  border: 1px solid var(--hairline-strong); border-radius: 9px; background: var(--surface);
  color: var(--text-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s; }
.signout-btn:hover { border-color: var(--rose); color: var(--rose); background: rgba(184,116,106,0.06); }
.signout-btn svg { width: 15px; height: 15px; }

/* ---------- TEMPORAL BRAIN animated icon (ADDENDUM 4) ---------- */
.tbrain-mark { color: var(--purple); overflow: visible; }
.tbrain-mark svg { overflow: visible; }
.tb-orbit { transform-box: fill-box; transform-origin: center; }
.tb-orbit-1 { animation: tb-spin 9s linear infinite; }
.tb-orbit-2 { animation: tb-spin 11s linear infinite reverse; }
.tb-core { transform-box: fill-box; transform-origin: center; animation: tb-pulse 2.6s ease-in-out infinite; }
.tb-node { transform-box: fill-box; transform-origin: center; animation: tb-twinkle 3s ease-in-out infinite; }
.tb-node.tb-n2 { animation-delay: 0.5s; }
.tb-node.tb-n3 { animation-delay: 1s; }
.tb-node.tb-n4 { animation-delay: 1.6s; }
.tb-link { opacity: 0.6; }
@keyframes tb-spin { to { transform: rotate(360deg); } }
@keyframes tb-pulse { 0%,100% { transform: scale(1); filter: none; } 50% { transform: scale(1.22); filter: drop-shadow(0 0 5px rgba(138,109,184,0.55)); } }
@keyframes tb-twinkle { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }
.nav-brain:hover .tbrain-mark .tb-core { filter: drop-shadow(0 0 7px rgba(52,230,196,0.7)); }
.nav-brain:hover .tbrain-mark { color: #6a4fa0; }
@media (prefers-reduced-motion: reduce) {
  .tb-orbit-1, .tb-orbit-2, .tb-core, .tb-node { animation: none !important; }
  .mm-auth-robot img { animation: none !important; }
}

/* ---------- Workflows nav button mark ---------- */
.flows-mark { color: var(--blue); }
[data-theme="dark"] .flows-mark { color: #7da8d4; }

/* ---------- skill tier badges + scope pills ---------- */
.skill-scope.dept { color: var(--blue); background: rgba(74,125,168,0.12); }
.skills-group-note { font-size: 12px; color: var(--text-3); margin: -6px 0 12px; }
.skill-share-row.col { flex-direction: column; align-items: stretch; gap: 10px; cursor: default; }
.skill-scope-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.scope-pill { flex: 1; min-width: 96px; padding: 9px 12px; border: 1px solid var(--hairline-strong); border-radius: 10px;
  background: var(--surface); color: var(--text-2); font: inherit; font-size: 12.5px; cursor: pointer; transition: all 0.14s; }
.scope-pill:hover { border-color: var(--gold-edge); color: var(--text); }
.scope-pill.active { border-color: var(--gold-edge); background: var(--gold-soft); color: var(--text); font-weight: 600; }

/* ---------- Workflows page + cards ---------- */
.flows-page .skill-card-ico.flow-ico { background: linear-gradient(135deg, rgba(74,125,168,0.14), rgba(74,125,168,0.06)); color: var(--blue); }
[data-theme="dark"] .flows-page .flow-ico { color: #7da8d4; }
.flow-steps { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); line-height: 1.6; word-break: break-word; }
.flow-run-btn { padding: 5px 12px; border: 1px solid var(--hairline-strong); border-radius: 8px; background: var(--surface);
  color: var(--text-2); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.14s; }
.flow-run-btn:hover { border-color: var(--blue); color: var(--blue); background: rgba(74,125,168,0.06); }
.flow-run-btn:disabled { opacity: 0.6; cursor: default; }
.flow-card .skill-card-foot .toggle { margin-left: auto; }

/* ---------- PROMPT SUGGESTION bar (ADDENDUM 5) ---------- */
.suggest-bar { display: flex; align-items: center; gap: 10px; max-width: 800px; margin: 8px auto 0; padding: 8px 12px;
  border: 1px solid var(--gold-edge); border-radius: 10px; background: var(--gold-soft);
  font-size: 12.5px; color: var(--text-2); animation: msg-in 0.25s ease; }
.suggest-ico { color: var(--gold-2); display: inline-flex; flex-shrink: 0; }
.suggest-ico svg { width: 15px; height: 15px; }
.suggest-text { flex: 1; min-width: 0; line-height: 1.45; }
.suggest-accept { flex-shrink: 0; padding: 4px 12px; border: none; border-radius: 7px;
  background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #fff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.suggest-accept:hover { filter: brightness(1.06); }
.suggest-dismiss { flex-shrink: 0; background: transparent; border: none; color: var(--text-3); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.suggest-dismiss:hover { color: var(--text); }
.paste-nudge { border-color: var(--hairline-strong); background: var(--surface-2); }

/* ---------- TOPIC-SHIFT modal (non-dismissable) ---------- */
.topic-modal { z-index: 650; }
.topic-card { width: min(440px, 92vw); text-align: center; padding: 30px 28px 26px;
  background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.4); }
.topic-ico { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gold-soft), rgba(138,109,184,0.12)); color: var(--purple); }
.topic-ico svg { width: 26px; height: 26px; }
.topic-title { font-family: var(--font-serif); font-size: 21px; font-weight: 600; margin: 0 0 8px; }
.topic-body { font-size: 13.5px; line-height: 1.6; color: var(--text-2); margin: 0 0 22px; }
.topic-actions { display: flex; gap: 10px; justify-content: center; }
.topic-actions .gen-btn { height: 38px; padding: 0 18px; font-size: 13.5px; }

/* ---------- mobile hamburger + slide-over scrim ---------- */
.mobile-hamburger { display: none; position: fixed; top: 8px; left: 10px; z-index: 220;
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--text-2); cursor: pointer; align-items: center; justify-content: center; }
.mobile-hamburger svg { width: 22px; height: 22px; }
.nav-scrim { display: none; position: fixed; inset: 0; z-index: 150;
  background: rgba(20,18,14,0.45); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; transition: opacity 0.25s; }
.nav-scrim.show { opacity: 1; }

/* ==========================================================================
   FULL MOBILE RESPONSIVE (ADDENDUM 3) — <760px: slide-over sidebar, full-width
   chat/composer, scaled hero/avatars, full-screen settings, ≥44px tap targets.
   Replaces the old 860px collapse. Test target: 380px.
   ========================================================================== */
@media (max-width: 760px) {
  /* single-column app; sidebar becomes an off-canvas drawer */
  body { grid-template-columns: 1fr; }
  .mobile-hamburger { display: flex; }
  .nav-scrim { display: block; pointer-events: none; }
  body.nav-open .nav-scrim { pointer-events: auto; }

  aside.nav {
    display: flex !important;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 200;
    width: 84vw; max-width: 320px;
    transform: translateX(-104%); transition: transform 0.28s cubic-bezier(.2,.8,.2,1);
    box-shadow: 16px 0 48px rgba(0,0,0,0.18);
  }
  body.nav-open aside.nav { transform: translateX(0); }
  /* never let the desktop collapse state hide drawer contents on mobile */
  body.nav-collapsed aside.nav { width: 84vw; max-width: 320px; }
  body.nav-collapsed .brand-name, body.nav-collapsed .live-chip,
  body.nav-collapsed .nav-bot .bot-name, body.nav-collapsed .nav-skills .label,
  body.nav-collapsed .nav-brain .label { display: revert; }
  .collapse-btn { display: none; }

  /* top bar makes room for the hamburger */
  .topbar { padding-left: 58px; }
  .crumb { font-size: 10px; }

  /* full-width chat + composer */
  main { grid-template-rows: 48px 1fr; }
  .conv-scroll { padding: 16px 14px; }
  .conv-inner, .messages { max-width: 100%; }
  .chat-composer-wrap { padding: 8px 10px 10px; }
  .composer-card { max-width: 100%; }
  .composer-hint { font-size: 8px; }

  /* scaled hero + avatars */
  .hero-art img, #heroImg { max-height: 150px; }
  .home-greet { font-size: clamp(26px, 8vw, 36px); }
  .home-sub { font-size: 13px; }
  .starters { grid-template-columns: 1fr; gap: 8px; }
  .bot-strip { gap: 6px; }
  .bot-pill { font-size: 11px; }

  /* settings + wizards full-screen */
  .drawer { width: 100vw; max-width: 100vw; border-left: none; }
  .skill-modal .skill-card, .modal-card.skill-card { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
  .topic-card { width: 92vw; }

  /* skills/workflows pages fit + single-column grids */
  .skills-page, .flows-page { inset: 48px 0 0 0; }
  .skills-scroll { padding: 20px 14px 50px; }
  .skills-hero { flex-direction: column; gap: 12px; }
  .skills-create-btn { align-self: flex-start; }
  .skills-grid { grid-template-columns: 1fr; }

  /* voice + doc panels fit */
  .gen-card { max-width: 100%; }
  .lightbox-card { width: 96vw; height: 90vh; }

  /* ≥44px tap targets */
  .ctag, .composer-send, .tbtn, .nav-bot, .nav-recent, .icon-btn,
  .scope-pill, .flow-run-btn, .skills-create-btn, .mm-auth-btn,
  .topic-actions .gen-btn, .suggest-accept { min-height: 44px; }
  .icon-btn { width: 40px; height: 40px; }
  .composer-send { min-width: 64px; }

  /* suggestion bar fits */
  .suggest-bar { max-width: 100%; }
}

@media (max-width: 420px) {
  .topbar-actions .tbtn span { display: none; }   /* icon-only at very small widths */
  .home-greet { font-size: 26px; }
  .mm-auth-card { padding: 8px 16px 28px; }
}

/* ==========================================================================
   V2.4 (ADDENDUM 6) — brand logo mark, logo-palette accents, user menu +
   usage modal, preview drawer, message actions, specialists checklist,
   sidebar footer links, first-run walkthrough spotlight.
   ========================================================================== */

/* ---------- sidebar brand: the glowing cloud-robot mark ---------- */
.brand-mark.brand-logo {
  width: 30px; height: 30px; border-radius: 9px; padding: 0;
  background: radial-gradient(circle at 50% 40%, #0B1B33, #060B17 78%);
  overflow: hidden; position: relative; flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(79,168,255,0.18), 0 2px 8px rgba(6,11,23,0.35);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}
.brand-mark.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand:hover .brand-mark.brand-logo {
  box-shadow: 0 0 0 1px rgba(79,168,255,0.45), 0 0 14px rgba(79,168,255,0.45), 0 0 30px rgba(79,168,255,0.18);
  transform: translateY(-1px);
}

/* ---------- accent presets (Workbench golds + MegaMind logo palette) ---------- */
.accent-presets { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 4px; }
.accent-swatch { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 5px;
  border: 1px solid var(--hairline); border-radius: 100px; background: var(--surface);
  font: inherit; font-size: 11px; color: var(--text-2); cursor: pointer; transition: all 0.14s; }
.accent-swatch:hover { border-color: var(--gold-edge); color: var(--text); }
.accent-swatch.active { border-color: var(--sw, var(--gold)); background: color-mix(in srgb, var(--sw, var(--gold)) 9%, var(--surface)); color: var(--text); font-weight: 600; }
.accent-swatch .sw-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--sw, var(--gold)); border: 1px solid var(--hairline-strong); flex-shrink: 0; }

/* ---------- sidebar footer links (IT Support / Learn / Show me how?) ---------- */
.nav-footer-links { padding: 8px 0 2px; border-top: 1px solid var(--hairline); }
.nav-footer-links .nav-skills { margin: 0 12px 6px; text-decoration: none; }
.nav-footer-links .nav-ext { background: var(--surface); }
.nav-footer-links .nav-ext:hover { background: var(--gold-soft); }
.ext-mark { color: var(--text-3); }
.nav-ext:hover .ext-mark { color: var(--gold-2); }
[data-theme="dark"] .nav-ext:hover .ext-mark { color: var(--gold); }
body.nav-collapsed .nav-footer-links .nav-skills { justify-content: center; padding: 8px; margin: 0 10px 6px; width: auto; }
body.nav-collapsed .nav-footer-links .label { display: none; }

/* ---------- user menu (bottom-left account popover) ---------- */
.nav-user { position: relative; }
.nav-user-id { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  background: transparent; border: none; padding: 4px 6px; margin: -4px 0 -4px -6px;
  border-radius: 9px; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.nav-user-id:hover, .nav-user-id.open { background: var(--surface-2); }
.user-menu { position: absolute; left: 10px; bottom: calc(100% + 6px); z-index: 230;
  min-width: 190px; background: var(--surface); border: 1px solid var(--hairline-strong);
  border-radius: 12px; box-shadow: 0 14px 44px rgba(0,0,0,0.18); padding: 5px; animation: msg-in 0.16s ease; }
.user-menu-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 11px;
  border: none; background: transparent; border-radius: 8px; font: inherit; font-size: 12.5px;
  color: var(--text-2); cursor: pointer; text-align: left; }
.user-menu-item:hover { background: var(--gold-soft); color: var(--text); }
.user-menu-item svg { width: 15px; height: 15px; flex-shrink: 0; }
#umSignOut:hover { background: rgba(184,116,106,0.08); color: var(--rose); }

/* ---------- usage modal ---------- */
.usage-modal .modal-card { width: min(480px, 92vw); }
.usage-body { padding: 4px 20px 22px; }
.usage-lead { font-size: 13.5px; line-height: 1.6; color: var(--text-2); margin: 2px 0 16px; }
.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.usage-stat { border: 1px solid var(--hairline); border-radius: 12px; padding: 14px 12px; background: var(--surface-2); text-align: center; }
.usage-stat .us-v { font-family: var(--font-serif); font-size: 22px; font-weight: 600; line-height: 1.15; }
.usage-stat .us-k { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-3); margin-top: 5px; }
.usage-stat .us-sub { font-size: 10px; color: var(--text-3); margin-top: 2px; }

/* ---------- PREVIEW DRAWER (artifacts / SharePoint / web) ---------- */
.preview-backdrop { position: fixed; inset: 0; background: rgba(20,18,14,0.4); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 540; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.preview-backdrop.show { opacity: 1; pointer-events: auto; }
.preview-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 94vw);
  background: var(--surface); border-left: 1px solid var(--hairline-strong); z-index: 550;
  transform: translateX(103%); transition: transform 0.3s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column; box-shadow: -24px 0 70px rgba(0,0,0,0.2); }
.preview-drawer.show { transform: translateX(0); }
.preview-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--hairline); flex-shrink: 0; }
.preview-title { font-family: var(--font-serif); font-size: 15.5px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-btn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--hairline); border-radius: 8px; color: var(--text-3); background: var(--surface); text-decoration: none; flex-shrink: 0; }
.pv-btn:hover { border-color: var(--gold-edge); color: var(--text); background: var(--gold-soft); }
.pv-btn svg { width: 14px; height: 14px; }
.preview-body { flex: 1; min-height: 0; background: var(--surface-2); display: flex; flex-direction: column; overflow: auto; position: relative; }
.preview-body iframe { flex: 1; width: 100%; border: none; background: #fff; display: block; min-height: 0; }
.preview-body video { width: 100%; max-height: 100%; background: #000; }
.preview-body .pv-pad { padding: 18px; text-align: center; }
.preview-body .pv-pad img { max-width: 100%; border-radius: 10px; box-shadow: 0 10px 32px rgba(0,0,0,0.18); }
.pv-text { flex: 1; margin: 0; padding: 18px 20px; font-family: var(--font-mono); font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; color: var(--text); overflow: auto; }
.pv-loading { display: flex; align-items: center; justify-content: center; gap: 12px; flex: 1; color: var(--text-2); font-size: 13px; padding: 40px; }
.pv-card { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 12px; padding: 40px 28px; text-align: center; }
.pv-card-ico { font-size: 44px; }
.pv-card-name { font-family: var(--font-serif); font-size: 16px; font-weight: 600; max-width: 420px; word-break: break-word; }
.pv-card-sub { font-size: 12.5px; color: var(--text-3); max-width: 400px; line-height: 1.55; }
.pv-card .gen-btn { height: 36px; padding: 0 18px; font-size: 13px; margin-top: 6px; }
.pv-webnote { padding: 8px 16px; font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); border-bottom: 1px solid var(--hairline); background: var(--surface); flex-shrink: 0; }

/* ---------- message actions (Copy / 👍 👎 / Retry) ---------- */
.msg-actions { display: flex; gap: 3px; margin-top: 6px; opacity: 0; transition: opacity 0.18s; }
.msg.bot:hover .msg-actions, .msg.bot:focus-within .msg-actions { opacity: 1; }
.msg-act { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; border-radius: 7px; color: var(--text-3); cursor: pointer; transition: all 0.13s; padding: 0; }
.msg-act svg { width: 14px; height: 14px; }
.msg-act:hover { background: var(--surface-2); color: var(--text); }
.msg-act.ok { color: var(--green); }
.msg-act.active { color: var(--green); background: rgba(94,138,78,0.1); }
.msg-act.active.down { color: var(--rose); background: rgba(184,116,106,0.1); }

/* ---------- specialists shown checklist (settings) ---------- */
.bot-visibility { display: flex; flex-direction: column; gap: 4px; }
.bot-vis-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; transition: background 0.12s; }
.bot-vis-row:hover { background: var(--surface-2); }
.bot-vis-row.off { opacity: 0.55; }
.bot-vis-row img { width: 30px; height: 30px; border-radius: 9px; object-fit: contain; background: var(--surface-2); border: 1px solid var(--hairline); flex-shrink: 0; }
.bv-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bv-name { font-size: 12.5px; font-weight: 600; }
.bv-role { font-family: var(--font-mono); font-size: 8.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.bv-check { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; flex-shrink: 0; }

/* ---------- TUTORIAL v2.7 §H.21 — robot guide + spotlight + canned demos ---------- */
.tour-overlay { position: fixed; inset: 0; z-index: 900; opacity: 0; transition: opacity 0.25s; }
.tour-overlay.show { opacity: 1; }
.tour-dim { position: absolute; inset: 0; background: rgba(14,12,9,0.62);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.tour-ring { position: absolute; border-radius: 13px; pointer-events: none;
  box-shadow: 0 0 0 2px var(--gold), 0 0 26px rgba(200,154,58,0.55);
  transition: left 0.32s cubic-bezier(.2,.8,.2,1), top 0.32s cubic-bezier(.2,.8,.2,1),
              width 0.32s cubic-bezier(.2,.8,.2,1), height 0.32s cubic-bezier(.2,.8,.2,1); }
.tour-card { position: absolute; background: var(--surface); color: var(--text);
  border: 1px solid var(--hairline-strong); border-radius: 20px; padding: 20px 22px 14px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.45);
  max-height: 88vh; overflow-y: auto;
  transition: left 0.3s cubic-bezier(.2,.8,.2,1), top 0.3s cubic-bezier(.2,.8,.2,1); }
.tour-card.centered { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(560px, 92vw) !important; }
.tour-guide { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.tour-robot { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; flex-shrink: 0;
  background: var(--gold-soft); border: 1px solid var(--gold-edge);
  box-shadow: 0 6px 18px rgba(11,27,51,0.25); animation: tourBob 3.2s ease-in-out infinite; }
@keyframes tourBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.tour-count { font-family: var(--font-mono); font-size: 10px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 3px; font-weight: 700; }
.tour-title { font-family: var(--font-serif); font-size: 22px; font-weight: 600; margin: 0; line-height: 1.2; }
.tour-body { font-size: 14.5px; line-height: 1.65; color: var(--text-2); margin: 0 0 12px; min-height: 3.2em; cursor: pointer; }
.tour-body.typing::after { content: '▍'; color: var(--gold); animation: tourCaret 0.8s steps(1) infinite; }
@keyframes tourCaret { 50% { opacity: 0; } }
/* the movie screen */
.tour-demo { margin: 0 0 12px; }
.tour-demo-screen { height: 216px; overflow: auto; border: 1px solid var(--hairline);
  border-radius: 14px; padding: 12px; background: color-mix(in srgb, var(--text) 4%, var(--bg, var(--surface)));
  position: relative; }
.tour-demo-caption { margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: var(--text-2);
  padding: 7px 11px; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 9px 9px 0; }
/* fake cursor + click ripple */
.tour-cursor { position: absolute; width: 26px; height: 26px; z-index: 12; pointer-events: none;
  transition-property: left, top; transition-timing-function: cubic-bezier(.3,.7,.3,1); transition-duration: 0.7s;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4)); margin: -4px 0 0 -4px; }
.tour-cursor svg { width: 100%; height: 100%; }
.tour-cursor.press { transform: scale(0.82); }
.tour-ripple { position: absolute; width: 18px; height: 18px; border-radius: 50%; z-index: 11; pointer-events: none;
  transform: translate(-50%, -50%); border: 2.5px solid var(--gold); opacity: 0; }
.tour-ripple.go { animation: tourRipple 0.55s ease-out; }
@keyframes tourRipple { 0% { opacity: 0.95; scale: 0.5; } 100% { opacity: 0; scale: 3; } }
/* arrow from card to control */
.tour-arrow { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.tour-arrow .ta-line { fill: none; stroke: var(--gold); stroke-width: 2.6; stroke-linecap: round;
  stroke-dasharray: 7 7; animation: tourDash 0.9s linear infinite; }
.tour-arrow .ta-head { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
@keyframes tourDash { to { stroke-dashoffset: -28; } }
/* ask-the-robot row */
.tour-ask { display: flex; gap: 8px; margin-bottom: 10px; }
.tour-ask-input { flex: 1; height: 34px; font-size: 13px; }
.tour-ask-btn { height: 34px; padding: 0 16px; flex-shrink: 0; }
.tour-ask-answer { font-size: 13px; line-height: 1.55; color: var(--text-2); white-space: pre-wrap;
  border: 1px solid var(--hairline); border-radius: 11px; padding: 10px 12px; margin-bottom: 10px;
  background: color-mix(in srgb, var(--text) 3%, var(--surface)); max-height: 180px; overflow-y: auto; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-skip { background: transparent; border: none; color: var(--text-3); font: inherit; font-size: 12px; cursor: pointer; padding: 4px 2px; text-decoration: underline; text-underline-offset: 2px; }
.tour-skip:hover { color: var(--text); }
.tour-replay { display: inline-flex; align-items: center; gap: 6px; background: transparent;
  border: 1px solid var(--hairline-strong); border-radius: 999px; color: var(--text-2); font: inherit;
  font-size: 12px; font-weight: 600; cursor: pointer; padding: 5px 13px; transition: all 0.13s; }
.tour-replay:hover { color: var(--text); border-color: var(--gold-edge); background: var(--gold-soft); }
.tour-replay svg { width: 13px; height: 13px; }
.tour-nav { display: flex; gap: 8px; }
.tour-nav .gen-btn { height: 36px; padding: 0 18px; font-size: 13px; }
.tour-nav .gen-btn:disabled { opacity: 0.45; cursor: default; }
/* mid-demo highlight on real settings rows */
.tour-mini-hl { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 10px; }

/* ---------- demo-screen building blocks (all canned) ---------- */
.dm-note { font-size: 13px; color: var(--text-2); padding: 8px 4px; }
.dm-note.dim { color: var(--text-3); font-style: italic; }
.dm-chat { display: flex; flex-direction: column; gap: 8px; }
.dm-bubble { max-width: 92%; padding: 9px 12px; border-radius: 13px; font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; }
.dm-bubble.user { align-self: flex-end; background: var(--gold-soft); border: 1px solid var(--gold-edge); border-bottom-right-radius: 5px; }
.dm-bubble.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--hairline); border-bottom-left-radius: 5px; }
.dm-streaming::after { content: '▍'; color: var(--gold); animation: tourCaret 0.8s steps(1) infinite; }
.dm-attachrow { display: flex; }
.dm-filechip { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--hairline-strong); border-radius: 9px; padding: 6px 11px; background: var(--surface); }
.dm-filechip svg { width: 14px; height: 14px; color: var(--gold); }
.dm-filechip i { font-style: normal; color: var(--text-3); font-weight: 400; font-size: 11px; }
.dm-vp { display: flex; flex-direction: column; gap: 6px; }
.dm-vp-row { display: flex; align-items: center; gap: 9px; border: 1px solid var(--hairline); border-radius: 10px; padding: 8px 11px; font-size: 12px; background: var(--surface); }
.dm-vp-row b { font-size: 12.5px; }
.dm-vp-row span { color: var(--text-3); flex: 1; }
.dm-toggle { width: 30px; height: 17px; border-radius: 999px; background: var(--hairline-strong); position: relative; flex-shrink: 0; transition: background 0.18s; }
.dm-toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: left 0.18s; }
.dm-toggle.on { background: var(--gold); }
.dm-toggle.on::after { left: 15px; }
.dm-orbwrap { display: flex; align-items: center; gap: 10px; margin-top: 10px; justify-content: center; }
.dm-orb { width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #b59ce0, #6f7fd0 55%, #34e6c4);
  box-shadow: 0 0 24px rgba(111,127,208,0.8); animation: dmOrb 1.4s ease-in-out infinite; }
@keyframes dmOrb { 0%,100% { transform: scale(1); } 50% { transform: scale(1.16); } }
.dm-orblbl { font-size: 12px; color: var(--text-2); font-style: italic; }
.dm-skills { display: flex; flex-direction: column; gap: 10px; }
.dm-chiprow { display: flex; gap: 7px; flex-wrap: wrap; }
.dm-chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 6px 12px;
  border-radius: 999px; border: 1px solid var(--gold-edge); background: var(--gold-soft); position: relative; z-index: 2; }
.dm-chip.dim { opacity: 0.55; border-color: var(--hairline-strong); background: var(--surface); }
.dm-dock { min-height: 46px; border: 2px dashed var(--hairline-strong); border-radius: 12px;
  display: flex; align-items: center; padding: 7px 10px; gap: 7px; transition: all 0.2s; }
.dm-dock.filled { border-style: solid; border-color: var(--gold-edge); background: var(--gold-soft); }
.dm-dock-hint { font-size: 11.5px; color: var(--text-3); font-style: italic; }
.dm-arts { display: flex; gap: 10px; }
.dm-artlist { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.dm-art { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--hairline); border-radius: 10px; padding: 8px 10px; background: var(--surface); }
.dm-ft { font-family: var(--font-mono); font-size: 8px; font-weight: 800; color: #fff; border-radius: 5px; padding: 3px 5px; }
.dm-ft.xl { background: #1d7044; } .dm-ft.dx { background: #2b579a; } .dm-ft.pf { background: #b3261e; }
.dm-preview { flex: 1.1; border: 1px solid var(--gold-edge); border-radius: 10px; background: var(--surface); overflow: hidden; }
.dm-prevhead { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; font-weight: 700; padding: 7px 10px; border-bottom: 1px solid var(--hairline); }
.dm-dl { font-size: 10.5px; color: var(--gold); font-weight: 700; }
.dm-page { padding: 10px; display: flex; flex-direction: column; gap: 7px; }
.dm-page i { display: block; height: 7px; border-radius: 4px; background: var(--hairline-strong); width: 86%; }
.dm-share { display: flex; flex-direction: column; gap: 9px; }
.dm-share-h { font-size: 13px; font-weight: 700; }
.dm-linkrow { display: flex; gap: 7px; align-items: center; }
.dm-link { flex: 1; font-family: var(--font-mono); font-size: 11px; color: var(--text-2); border: 1px solid var(--hairline); border-radius: 8px; padding: 7px 10px; background: var(--surface); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-btn { font: inherit; font-size: 11.5px; font-weight: 700; border: 1px solid var(--hairline-strong); border-radius: 8px; background: var(--surface); color: var(--text); padding: 6px 12px; cursor: default; }
.dm-btn.primary { background: var(--gold); border-color: var(--gold); color: #fff; }
.dm-btn.danger { color: #c0392b; border-color: rgba(192,57,43,0.4); }
.dm-share-opts { display: flex; gap: 6px; }
.dm-share-opts span { font-size: 11px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--text-3); }
.dm-share-opts span.sel { border-color: var(--gold-edge); background: var(--gold-soft); color: var(--text); font-weight: 700; }
.dm-toast { align-self: flex-start; font-size: 11.5px; font-weight: 600; border-radius: 9px; padding: 7px 12px;
  background: var(--gold-soft); border: 1px solid var(--gold-edge); animation: dmToastIn 0.3s ease-out; }
@keyframes dmToastIn { from { opacity: 0; transform: translateY(6px); } }
.dm-sess { display: flex; flex-direction: column; gap: 9px; }
.dm-sessrow { display: flex; align-items: center; gap: 8px; border: 1px solid var(--hairline); border-radius: 11px; padding: 9px 12px; background: var(--surface); transition: opacity 0.5s, transform 0.5s; }
.dm-sessrow.gone { opacity: 0; transform: translateX(26px); }
.dm-sesstitle { flex: 1; font-size: 12.5px; font-weight: 600; }
.dm-sesstitle.editing { border-bottom: 1.5px solid var(--gold); }
.dm-sessacts { display: flex; gap: 4px; }
.dm-ract { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--text-3); border-radius: 7px; cursor: default; }
.dm-ract svg { width: 14px; height: 14px; }
.dm-ract.on { color: var(--gold); }
.dm-confirm { font-size: 12px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--hairline-strong); border-radius: 10px; padding: 8px 11px; background: var(--surface); }
.dm-actrow { display: flex; align-items: center; gap: 3px; }
.dm-copied { font-size: 11px; color: var(--gold); font-weight: 700; margin-left: 5px; }
.dm-offer { font-size: 12px; line-height: 1.5; border: 1px solid var(--gold-edge); background: var(--gold-soft); border-radius: 11px; padding: 9px 12px; animation: dmToastIn 0.3s ease-out; }
.dm-offer b { color: var(--gold); }
.dm-swatches { display: flex; gap: 10px; padding: 8px 2px; }
.dm-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--hairline-strong); display: inline-block; }
.dm-issue { display: flex; flex-direction: column; gap: 8px; }
.dm-formrow { display: flex; flex-direction: column; gap: 3px; }
.dm-formrow label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); }
.dm-fakesel, .dm-fakeinput { font-size: 12px; border: 1px solid var(--hairline); border-radius: 8px; padding: 7px 10px; background: var(--surface); min-height: 16px; }
.dm-formrow.checks { flex-direction: row; gap: 8px; }
.dm-check { font-size: 11px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--text-3); }
.dm-check.on { border-color: var(--gold-edge); background: var(--gold-soft); color: var(--text); font-weight: 600; }
.dm-issue .dm-btn.primary { align-self: flex-start; }
.dm-space { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.dm-galaxy { position: relative; flex: 1; min-height: 130px; border-radius: 11px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, #182742, #0b1424 70%);
  transform: scale(0.94); transition: transform 1.6s cubic-bezier(.2,.7,.2,1); }
.dm-galaxy.zoom { transform: scale(1.22); }
.dm-star { position: absolute; width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #b59ce0, #6f7fd0 60%, #34e6c4);
  box-shadow: 0 0 12px rgba(111,127,208,0.9); }
.dm-star.big { width: 17px; height: 17px; box-shadow: 0 0 20px rgba(180,156,224,1); }
.dm-star.sm { width: 7px; height: 7px; }
.dm-starlbl { position: absolute; font-size: 9.5px; font-weight: 600; color: #cfe0ff; background: rgba(11,27,51,0.72);
  border: 1px solid rgba(120,150,220,0.35); border-radius: 6px; padding: 2px 6px; white-space: nowrap; animation: dmToastIn 0.5s ease-out; }
.dm-scenecap { font-size: 12px; color: var(--text-2); font-style: italic; }
.dm-narr { display: flex; flex-direction: column; gap: 9px; }
.dm-narr-h { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; }
.dm-narr-h img { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; }
.dm-memcard { display: flex; flex-direction: column; gap: 9px; }
.dm-memrow { display: flex; align-items: center; gap: 9px; border: 1px solid var(--hairline); border-radius: 11px; padding: 9px 12px; background: var(--surface); transition: opacity 0.5s, transform 0.5s; }
.dm-memrow.gone { opacity: 0; transform: scale(0.85); }
.dm-memtext { flex: 1; font-size: 12.5px; }

/* ---------- §H.21b "Ask about MegaMind" help bubble (bottom right, above release pill) ---------- */
.help-bubble { position: fixed; right: 14px; bottom: 52px; z-index: 95; }
.help-bubble-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--hairline-strong);
  border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px;
  font-weight: 700; padding: 7px 15px 7px 8px; cursor: pointer; box-shadow: 0 8px 26px rgba(0,0,0,0.22);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.help-bubble-btn:hover { transform: translateY(-2px); border-color: var(--gold-edge); box-shadow: 0 12px 32px rgba(0,0,0,0.28); }
.help-bubble-btn.open { border-color: var(--gold-edge); }
.help-bubble-btn img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--gold-soft); }
.help-panel { position: absolute; bottom: 50px; right: 0; width: min(370px, calc(100vw - 28px));
  height: min(480px, 72vh); display: flex; flex-direction: column; border: 1px solid var(--hairline-strong);
  border-radius: 18px; background: var(--surface); box-shadow: 0 26px 70px rgba(0,0,0,0.38); overflow: hidden;
  animation: dmToastIn 0.22s ease-out; }
.help-panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--hairline);
  background: linear-gradient(135deg, var(--gold-soft), transparent); }
.help-panel-head img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.hp-meta { flex: 1; min-width: 0; }
.hp-title { font-size: 13.5px; font-weight: 700; }
.hp-sub { font-size: 11px; color: var(--text-3); }
.help-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.help-msg { max-width: 88%; padding: 8px 12px; border-radius: 13px; font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; }
.help-msg.user { align-self: flex-end; background: var(--gold-soft); border: 1px solid var(--gold-edge); border-bottom-right-radius: 5px; }
.help-msg.bot { align-self: flex-start; background: color-mix(in srgb, var(--text) 4%, var(--surface)); border: 1px solid var(--hairline); border-bottom-left-radius: 5px; }
.help-msg.hm-busy { color: var(--text-3); animation: hmPulse 1.1s ease-in-out infinite; }
@keyframes hmPulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
.help-input-row { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--hairline); }
.help-input-row .form-input { flex: 1; height: 36px; font-size: 13px; }
.help-send { width: 38px; height: 36px; padding: 0; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.help-send svg { width: 16px; height: 16px; }

/* ---------- "Show me how?" searchable mini-tour list ---------- */
.tour-list-modal .modal-card { width: min(460px, 92vw); }
.tour-list-wrap { padding: 2px 16px 18px; }
.tour-search { margin-bottom: 10px; }
.tour-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; }
.tour-item { display: flex; flex-direction: column; gap: 1px; text-align: left; padding: 10px 13px;
  border: 1px solid var(--hairline); border-radius: 11px; background: var(--surface);
  font: inherit; color: var(--text); cursor: pointer; transition: all 0.13s; }
.tour-item:hover { border-color: var(--gold-edge); background: var(--gold-soft); transform: translateY(-1px); }
.tour-item.full { border-color: var(--gold-edge); background: color-mix(in srgb, var(--gold) 6%, var(--surface)); }
.tour-item .ti-name { font-size: 13px; font-weight: 600; }
.tour-item .ti-sub { font-size: 11.5px; color: var(--text-3); }
.tour-empty { padding: 18px; text-align: center; color: var(--text-3); font-size: 12.5px; font-style: italic; }

/* ---------- mobile adjustments for the new chrome ---------- */
@media (max-width: 760px) {
  .msg-actions { opacity: 1; }                  /* always visible on touch */
  .msg-act { width: 34px; height: 34px; }
  .preview-drawer { width: 100vw; }
  .user-menu { left: 12px; right: 12px; min-width: 0; }
  .nav-footer-links .nav-skills { min-height: 44px; }
  .tour-card { width: min(92vw, 420px) !important; }
  .tour-demo-screen { height: 170px; }
  .tour-robot { width: 44px; height: 44px; }
  .tour-title { font-size: 18px; }
  .help-bubble-btn .hb-label { display: none; }
  .help-bubble-btn { padding: 7px 8px; border-radius: 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-ring, .tour-card, .tour-cursor { transition: none !important; }
  .tour-robot, .dm-orb, .tour-arrow .ta-line { animation: none !important; }
}

/* ============================================================================
   ADDENDUM 10 — v2.6 wave 1 (chat UX core)
   ============================================================================ */

/* ---------- §5.2 user messages dock RIGHT (v1 style), bot messages stay left ---------- */
.msg.user { flex-direction: row-reverse; }
.msg.user .msg-bubble { display: flex; flex-direction: column; align-items: flex-end; }
.msg.user .msg-meta { flex-direction: row-reverse; }
.msg.user .msg-attachments { justify-content: flex-end; }
.msg.user .msg-content { text-align: left; max-width: 100%; }

/* ---------- §0.1 conference re-send chip (compact, dimmer user bubble) ---------- */
.msg.user.resend .msg-bubble { align-items: flex-end; }
.resend-chip { display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; padding: 6px 13px; background: var(--user-bubble); border: 1px dashed var(--hairline-strong); border-radius: 100px; opacity: 0.74; font-size: 12px; color: var(--text-2); }
.resend-chip .rs-arrow { color: var(--bot-ink); font-weight: 700; }
.resend-chip .rs-label { font-weight: 600; white-space: nowrap; }
.resend-chip .rs-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }

/* ---------- §2.1 tool/status chips: stable nodes, soft state transitions ---------- */
.tool-chip { transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease; }
.tool-chip.done .spin { display: none; }
.reasoning .reasoning-body { scroll-behavior: smooth; }

/* ---------- §4.5 refined system-notice icon ---------- */
.msg-avatar.system svg { width: 14px; height: 14px; }

/* ---------- §4.6 recents: model name under the title, lighter italics ---------- */
.nav-recent .t-title { display: block; overflow: hidden; text-overflow: ellipsis; }
.nav-recent .t-model { display: block; font-size: 10px; font-style: italic; color: var(--text-3); font-weight: 400; line-height: 1.35; }

/* ---------- §3/§4 composer popovers (voice + model) ---------- */
.chat-composer-wrap { position: relative; }
.composer-popover { position: absolute; bottom: calc(100% + 8px); right: 18px; width: 304px; max-height: 400px; overflow-y: auto; background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: 14px; box-shadow: 0 18px 48px rgba(0,0,0,0.20); padding: 10px; z-index: 80; opacity: 0; transform: translateY(6px); transition: opacity 0.16s ease, transform 0.16s ease; }
.composer-popover.show { opacity: 1; transform: translateY(0); }
.vp-h { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-3); padding: 4px 8px 6px; }
.vp-h.sub { margin-top: 8px; border-top: 1px solid var(--hairline); padding-top: 10px; }
.vp-option, .vp-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 10px; background: transparent; border: none; font: inherit; text-align: left; color: var(--text); }
.vp-option { cursor: pointer; }
.vp-option:hover { background: var(--bot-soft); }
.vp-option.active { background: var(--gold-soft); }
.vp-option.active .vp-dot { background: var(--gold); border-color: var(--gold); }
.vp-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--hairline-strong); flex-shrink: 0; transition: background 0.15s, border-color 0.15s; }
.vp-ico { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-2); }
.vp-ico svg { width: 14px; height: 14px; }
.vp-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.vp-name { font-size: 12.5px; font-weight: 600; }
.vp-desc { font-size: 11px; color: var(--text-3); }
.vp-action.active { background: rgba(184,116,106,0.10); }
.vp-action.active .vp-ico { color: var(--rose); }
.vp-voices { display: flex; flex-direction: column; gap: 2px; }
.mic-btn.active { border-color: var(--bot-edge); color: var(--bot-ink); background: var(--bot-soft); }
.model-chip svg { color: var(--gold-2); }
[data-theme="dark"] .model-chip svg { color: var(--gold); }

/* ---------- §3.2 voice nebula — right-docked, audio-reactive orb ---------- */
.nebula-dock { position: fixed; right: 16px; top: 50%; transform: translateY(-50%) translateX(18px); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; opacity: 0; transition: opacity 0.28s ease, transform 0.28s ease; }
.nebula-dock.show { opacity: 1; transform: translateY(-50%) translateX(0); }
.nebula-dock canvas { width: 92px; height: 92px; filter: saturate(1.25); }
.nebula-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); background: var(--surface); border: 1px solid var(--hairline); padding: 2px 8px; border-radius: 100px; white-space: nowrap; }
@media (max-width: 760px) {
  .nebula-dock { right: 8px; top: auto; bottom: 140px; transform: translateX(18px); }
  .nebula-dock.show { transform: translateX(0); }
  .nebula-dock canvas { width: 64px; height: 64px; }
  .composer-popover { right: 8px; left: 8px; width: auto; }
  .resend-chip .rs-text { max-width: 180px; }
}

/* ---------- §5.1 message-details checkboxes ---------- */
.meta-checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.meta-check { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--hairline-strong); border-radius: 100px; font-size: 12px; color: var(--text-2); cursor: pointer; user-select: none; transition: background 0.15s, border-color 0.15s; }
.meta-check.on { background: var(--gold-soft); border-color: var(--gold-edge); color: var(--text); }
.meta-check input { accent-color: var(--gold); margin: 0; }

/* ---------- §5.3 citation footnote links ---------- */
.md-body a.cite-ref { font-size: 0.82em; vertical-align: super; text-decoration: none; padding: 0 2px; color: var(--bot-ink); }
.md-body a.cite-ref:hover { text-decoration: underline; }

/* ---------- §5.4 Graph profile photo avatars (initials remain the fallback) ---------- */
.avatar, .msg-avatar.user { overflow: hidden; }
.avatar-photo { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }

/* ---------- §1.1 stream-time doc wizard chip ---------- */
.gen-card.docprep { margin-top: 10px; }

/* ==========================================================================
   WAVE 2 — ADDENDUM 10 §6 §7 §8 §9 §10 (artifacts, skills, hero cards, sessions)
   ========================================================================== */

/* ---------- §9 recents: favorites group + hover row actions ---------- */
.nav-sublabel { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); padding: 8px 16px 2px; }
.nav-recent .row-acts { display: none; align-items: center; gap: 2px; flex-shrink: 0; }
.nav-recent:hover .row-acts { display: inline-flex; }
.nav-recent:hover .ago { display: none; }
.nav-recent .ract { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--text-3); border-radius: 5px; cursor: pointer; padding: 0; font-size: 13px; line-height: 1; }
.nav-recent .ract svg { width: 12px; height: 12px; }
.nav-recent .ract:hover { background: var(--surface-2); color: var(--text); }
.nav-recent .ract.del:hover { color: var(--rose); }
.nav-recent .ract.fav-btn.on { color: var(--gold); }
.nav-recent.fav .ract.fav-btn { display: inline-flex; }
.nav-recent .ren-input { flex: 1; min-width: 0; font: inherit; font-size: 12px; color: var(--text); background: var(--surface); border: 1px solid var(--gold-edge); border-radius: 5px; padding: 2px 6px; outline: none; }

/* ---------- §9 hydration skeleton + still-syncing note ---------- */
.hydrate-skel { display: flex; flex-direction: column; gap: 14px; padding: 18px 4px; }
.hs-row { display: flex; }
.hs-row.user { justify-content: flex-end; }
.hs-bubble { height: 36px; border-radius: 12px; }
.hydrate-note { text-align: center; padding: 48px 20px; color: var(--text-2); }
.hydrate-note .hn-title { font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.hydrate-note .hn-sub { font-size: 12.5px; color: var(--text-3); margin-bottom: 14px; }

/* ---------- §6 in-chat artifact chips (raw URLs never render) ---------- */
.art-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 6px; margin: 2px 0; background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: 9px; cursor: pointer; vertical-align: middle; max-width: 100%; transition: border-color 0.15s, background 0.15s; }
.art-chip:hover { border-color: var(--gold-edge); background: var(--gold-soft); }
.art-chip .gen-file-ico.sm { width: 22px; height: 22px; border-radius: 6px; font-size: 6.5px; }
/* v2.7.2: real document thumbnails — an icon that earned a thumb shows the page image */
.gen-file-ico.has-thumb { background: #fff; padding: 0; overflow: hidden; border: 1px solid var(--hairline-strong); }
.gen-file-ico.has-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.art-chip-name { font-size: 12px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.art-chip-open { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bot-ink); flex-shrink: 0; }

/* ---------- §6 sidebar "open the library" + label actions ---------- */
.nav-label-acts { display: inline-flex; gap: 8px; }
.art-open-lib { display: flex; align-items: center; gap: 8px; width: calc(100% - 24px); margin: 2px 12px 8px; padding: 7px 10px; background: var(--gold-soft); color: var(--text); border: 1px solid var(--gold-edge); border-radius: 8px; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; transition: filter 0.15s; }
.art-open-lib:hover { filter: brightness(1.04); }
.art-open-lib svg { width: 13px; height: 13px; color: var(--gold-2); flex-shrink: 0; }

/* ---------- §6 preview tabs ---------- */
.preview-tabs { display: flex; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--hairline); overflow-x: auto; flex-shrink: 0; scrollbar-width: thin; }
.pv-tab { flex-shrink: 0; max-width: 200px; padding: 4px 11px; border: 1px solid var(--hairline-strong); border-radius: 100px; background: transparent; color: var(--text-2); font: inherit; font-size: 11.5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background 0.15s, border-color 0.15s; display: inline-flex; align-items: center; gap: 6px; }
.pv-tab-thumb { width: 16px; height: 16px; border-radius: 4px; object-fit: cover; object-position: top; flex-shrink: 0; background: #fff; border: 1px solid var(--hairline-strong); }
.pv-tab:hover { background: var(--surface-2); color: var(--text); }
.pv-tab.active { background: var(--gold-soft); border-color: var(--gold-edge); color: var(--text); font-weight: 600; }

/* ---------- §7 skills bar above the composer ---------- */
.skills-bar { display: flex; align-items: center; gap: 8px; max-width: 800px; margin: 0 auto 8px; flex-wrap: wrap; }
.skills-bar.sb-row { margin-top: -2px; }
.sb-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--hairline-strong); border-radius: 100px; background: var(--surface); color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; max-width: 280px; }
.sb-chip:hover { border-color: var(--gold-edge); background: var(--gold-soft); color: var(--text); }
.sb-chip .sb-bolt { font-size: 11px; }
.sb-chip .sb-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-chip.primary { background: var(--gold-soft); border-color: var(--gold-edge); color: var(--text); font-weight: 600; }
.sb-chip.expander svg { width: 12px; height: 12px; transition: transform 0.18s; }
.sb-chip.expander.open svg { transform: rotate(180deg); }
.sb-chip.expander.open { background: var(--surface-2); color: var(--text); }

/* ---------- §7 locked skills + explainer modal ---------- */
.skill-card.locked { cursor: pointer; }
.skill-card.locked .skill-card-ico, .skill-card.locked .skill-card-name { opacity: 0.72; }
.skill-card.locked .skill-card-desc { opacity: 0.6; }
.skill-card:not(.locked) { cursor: pointer; }
.lock-badge { margin-left: auto; color: var(--text-3); display: inline-flex; }
.lock-badge svg { width: 14px; height: 14px; }
.skill-scope.other { color: var(--purple); background: rgba(138,109,184,0.12); }
.skill-scope.lockpill { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); }
.skill-scope.lockpill svg { width: 10px; height: 10px; }
.skill-info-body { padding: 4px 2px 12px; }
.skill-info-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.skill-info-desc { font-size: 13px; color: var(--text-2); margin: 0 0 14px; }
.skill-info-h { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.skill-info-instr { font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; max-height: 220px; overflow-y: auto; line-height: 1.55; }
.skill-info-locknote { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--hairline-strong); border-radius: 10px; background: rgba(138,109,184,0.08); color: var(--text-2); font-size: 12px; }
.skill-info-locknote svg { width: 15px; height: 15px; color: var(--purple); flex-shrink: 0; }
.gen-btn.primary:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }

/* ---------- §8 employee / people hero cards ---------- */
.emp-card { margin-top: 12px; background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: var(--r-lg); padding: 16px; max-width: 480px; box-shadow: 0 6px 22px rgba(0,0,0,0.05); animation: card-reveal 0.35s ease both; }
@keyframes card-reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.emp-hero { display: flex; align-items: center; gap: 14px; }
.emp-photo { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--bot), var(--bot-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 600; flex-shrink: 0; overflow: hidden; border: 2px solid var(--surface); box-shadow: 0 0 0 2px var(--bot-edge); }
.emp-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.emp-id { min-width: 0; }
.emp-name { font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 600; color: var(--text); }
.emp-sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.emp-mail { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); margin-top: 3px; word-break: break-all; }
.emp-org { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.org-label { display: block; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.org-chain { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.org-node { display: inline-flex; flex-direction: column; padding: 5px 10px; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 8px; max-width: 160px; }
.org-node.me { background: var(--bot-soft); border-color: var(--bot-edge); }
.org-name { font-size: 11.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-title { font-size: 9.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-arrow { color: var(--text-3); display: inline-flex; flex-shrink: 0; }
.org-arrow svg { width: 11px; height: 11px; }
.emp-actions { display: flex; gap: 8px; margin-top: 14px; }
.emp-actions .gen-btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.emp-actions .gen-btn svg { width: 13px; height: 13px; }

/* ---------- §10 walkthrough "don't show again" ---------- */
.tour-dontshow { display: flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 11.5px; color: var(--text-3); cursor: pointer; user-select: none; }
.tour-dontshow input { accent-color: var(--gold); margin: 0; }

@media (max-width: 760px) {
  .nav-recent .row-acts { display: inline-flex; }   /* no hover on touch */
  .art-chip-name { max-width: 150px; }
  .skills-bar { padding: 0 4px; }
  .emp-card { max-width: 100%; }
}

/* ============================================================================
   v2.7 WAVE (ADDENDUM 11)
   ============================================================================ */

/* ---------- §H.33 brand (single-line "MegaMind AI") + §H.14 generous mark ---------- */
.brand-mark.brand-logo { width: 38px; height: 38px; border-radius: 10px; overflow: hidden; }
.brand-mark.brand-logo img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- §B lock badges in the rail ---------- */
.nav-bot.locked { opacity: 0.62; }
.nav-bot .bot-lock { display: inline-flex; width: 15px; height: 15px; color: var(--text-3); flex-shrink: 0; }
.nav-bot .bot-lock svg { width: 100%; height: 100%; }

/* ---------- §A.39 reroute notice ---------- */
.reroute-note { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding: 8px 12px; border: 1px solid var(--hairline); border-left: 3px solid var(--bot, #888); border-radius: 10px; background: var(--surface-2); font-size: 12px; color: var(--text-2); }
.reroute-note svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--text-3); }
.reroute-note .rr-text b { color: var(--text); }
.rr-override { margin-left: auto; flex-shrink: 0; border: 1px solid var(--hairline); background: var(--surface); color: var(--text); font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.rr-override:hover { border-color: var(--bot-edge); color: var(--bot-ink); }

/* ---------- §H.37 STOP button ---------- */
.composer-send.stop { background: #b8746a; border-color: #b8746a; }
.composer-send.stop:hover { background: #a4625a; }

/* ---------- §H.45 citation chips ---------- */
.cite-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px 1px 5px; margin: 0 2px; border: 1px solid var(--hairline); border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 10.5px; font-weight: 600; text-decoration: none; vertical-align: 1px; }
.cite-chip svg { width: 10px; height: 10px; }
.cite-chip:hover { border-color: var(--bot-edge); color: var(--bot-ink); }

/* ---------- §H.16 Prompt Assistant ---------- */
#suggestBar .suggest-text { font-style: normal; }

/* ---------- topbar links (§H.34/36) ---------- */
.topbar-actions { gap: 6px; }
.topbar-actions a.tbtn { text-decoration: none; }
@media (max-width: 980px) { .topbar-actions .tbtn:not(.icon-only):not(#shareBtn) { display: none; } }

/* ---------- §H.27 corpus pill + panel ---------- */
.corpus-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; margin-left: 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--cp, #888) 45%, transparent); background: color-mix(in srgb, var(--cp, #888) 9%, transparent); color: var(--text-2); font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.corpus-pill .cp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cp, #888); box-shadow: 0 0 7px var(--cp, #888); }
.corpus-pill:hover { color: var(--text); }
.corpus-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 92vw); background: var(--surface); border-left: 1px solid var(--hairline); z-index: 95; display: flex; flex-direction: column; transform: translateX(102%); transition: transform 0.24s ease; box-shadow: -18px 0 50px rgba(0,0,0,0.22); }
.corpus-panel.show { transform: none; }
.corpus-status { font-size: 11px; color: var(--text-3); margin-left: auto; margin-right: 8px; }
.corpus-search-row { display: flex; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--hairline); }
.corpus-search-row .form-input { flex: 1; }
.corpus-results { flex: 1; overflow-y: auto; padding: 14px; font-size: 13px; }
.corpus-md a { color: var(--bot-ink); }

/* ---------- §H.28 hero counts ---------- */
.hero-counts { margin: 2px 0 14px; font-size: 12.5px; color: var(--text-3); letter-spacing: 0.02em; }

/* ---------- §H.40 calendar visual ---------- */
.cal-visual, .od-visual, .viz-visual { margin-top: 12px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.cal-head, .od-head, .viz-head { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-bottom: 1px solid var(--hairline); font-size: 12.5px; font-weight: 700; color: var(--text); }
.cal-head svg, .od-head svg { width: 15px; height: 15px; color: var(--bot-ink); flex-shrink: 0; }
.cal-people { font-weight: 500; color: var(--text-3); font-size: 11.5px; margin-left: auto; }
.cal-grid { display: flex; gap: 12px; padding: 12px; overflow-x: auto; }
.cal-day { min-width: 130px; }
.cal-day-h { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 7px; }
.cal-slot { display: block; width: 100%; margin-bottom: 6px; padding: 7px 10px; border: 1px solid var(--hairline); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; text-align: left; }
.cal-slot:hover:not(.busy) { border-color: var(--bot-edge); background: var(--bot-soft); }
.cal-slot.busy { opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }
.cal-slot.picked { border-color: var(--bot-ink); background: var(--bot-soft); }
.cal-hint { padding: 0 13px 11px; font-size: 11px; color: var(--text-3); }
.cal-empty { padding: 16px; font-size: 12.5px; color: var(--text-3); }

/* ---------- §H.41 onedrive tree ---------- */
.od-tree { max-height: 320px; overflow-y: auto; padding: 8px 6px; }
.od-row { display: flex; align-items: center; gap: 8px; padding: 5.5px 10px; border-radius: 7px; font-size: 12.5px; color: var(--text); }
.od-row.clickable, .od-row.folder { cursor: pointer; }
.od-row.clickable:hover, .od-row.folder:hover { background: var(--bot-soft); }
.od-ico { display: inline-flex; width: 15px; height: 15px; color: var(--text-3); flex-shrink: 0; }
.od-row.folder .od-ico { color: var(--gold, #c89a3a); }
.od-ico svg { width: 100%; height: 100%; }
.od-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-size, .od-date { margin-left: auto; font-size: 10.5px; color: var(--text-3); flex-shrink: 0; }
.od-size + .od-date { margin-left: 8px; }
.od-kids[hidden] { display: none; }

/* ---------- §H.43 infographics ---------- */
.viz-head .viz-title { flex: 1; }
.viz-acts { display: inline-flex; gap: 4px; }
.viz-body { padding: 12px; }
.viz-body canvas { display: block; }
.viz-fallback { display: grid; gap: 6px; }
.vf-row { display: flex; justify-content: space-between; padding: 7px 10px; border: 1px solid var(--hairline); border-radius: 8px; font-size: 12.5px; }
.vf-k { color: var(--text-2); } .vf-v { font-weight: 700; color: var(--text); }

/* ---------- §F resolution panel + countdown + TimeZest ---------- */
.res-panel { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface-2); }
.res-h { font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 9px; }
.res-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.res-btns .gen-btn { display: inline-flex; align-items: center; gap: 6px; }
.res-btns svg { width: 14px; height: 14px; }
.tech-countdown { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; justify-content: center; padding: 8px 14px; background: color-mix(in srgb, #b8746a 14%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, #b8746a 40%, transparent); font-size: 12.5px; color: var(--text); }
.tech-countdown b { font-variant-numeric: tabular-nums; }
.tz-card { width: min(720px, 94vw); }
.tz-frame { width: 100%; height: min(58vh, 520px); border: 0; border-radius: 10px; background: #fff; }
.tz-nourl { padding: 26px 10px; font-size: 13px; color: var(--text-2); text-align: center; }
.tz-actions { align-items: center; }
.tz-note { margin-right: auto; font-size: 11.5px; color: var(--text-3); }

/* ---------- §E issue + use-case modals ---------- */
.issue-body, .uc-body { max-height: min(62vh, 640px); overflow-y: auto; padding-right: 4px; }
.issue-shot { margin-top: 10px; }
.issue-shot img { max-width: 100%; max-height: 180px; border-radius: 10px; border: 1px solid var(--hairline); }
.issue-shot-status { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.uc-card { width: min(640px, 94vw); }
.uc-tags { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--hairline); }
.uc-tags-h { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); margin-bottom: 8px; }
.uc-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.uc-checks label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.uc-checks input { accent-color: var(--gold, #c89a3a); }

/* ---------- §H.17 bot carousel ---------- */
/* v2.8 §C — v1-style TRANSPARENT carousel: blurred/faded backdrop, no card
   chrome, robot portraits gliding horizontally, name + role caption only. */
.bot-carousel { position: fixed; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center; background: rgba(7, 9, 16, 0.8); backdrop-filter: blur(22px) saturate(0.85); -webkit-backdrop-filter: blur(22px) saturate(0.85); opacity: 0; transition: opacity 0.3s ease; }
.bot-carousel.show { opacity: 1; }
.car-track { position: relative; display: flex; align-items: center; justify-content: center; width: min(1100px, 94vw); height: min(66vh, 560px); }
.car-card { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 280px; padding: 0; border: none; background: transparent; box-shadow: none; cursor: pointer; transition: transform 0.55s cubic-bezier(0.22, 0.8, 0.26, 1), opacity 0.55s ease, filter 0.55s ease; transform: translateX(calc(var(--off) * 260px)) scale(0.62); opacity: 0; filter: blur(2px) saturate(0.6); }
.car-card.center { transform: translateX(0) scale(1); opacity: 1; filter: none; z-index: 3; }
.car-card.near { z-index: 2; opacity: 0.45; filter: blur(1px) saturate(0.65); transform: translateX(calc(var(--off) * 260px)) scale(0.74); }
.car-card.far { z-index: 1; opacity: 0.1; }
.car-card img { width: 230px; height: 230px; object-fit: contain; background: transparent; filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.55)) drop-shadow(0 6px 16px color-mix(in srgb, var(--cc, #888) 35%, transparent)); }
.car-card.center img { animation: carFloat 2.6s ease-in-out infinite; }
@keyframes carFloat { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-14px) scale(1.04); } }
.car-name { font-size: 26px; font-weight: 800; letter-spacing: 0.04em; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6); display: inline-flex; align-items: center; gap: 7px; }
.car-name svg { width: 16px; height: 16px; color: #c9cfdd; }
.car-role { font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--cc, var(--gold)) 75%, #fff); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55); }
@media (prefers-reduced-motion: reduce) {
  .car-card { transition: none; }
  .car-card.center img { animation: none; }
}
.car-arrow { position: relative; z-index: 5; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--hairline); background: var(--surface); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; margin: 0 8px; }
.car-arrow svg { width: 20px; height: 20px; }
.car-arrow:hover { border-color: var(--bot-edge); color: var(--bot-ink); }
.car-hint { position: absolute; bottom: 7vh; left: 0; right: 0; text-align: center; font-size: 12px; color: #cfd6e4; }

/* ---------- §H.18 pinned skill chips ---------- */
.pinned-dock { position: absolute; left: 14px; top: 86px; z-index: 24; display: flex; flex-direction: column; gap: 8px; max-width: 200px; }
.pin-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--gold-edge, rgba(200,154,58,0.32)); background: var(--surface); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.10); text-align: left; }
.pin-chip:hover { border-color: var(--gold, #c89a3a); }
.pin-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.pin-x { margin-left: 2px; color: var(--text-3); font-size: 13px; line-height: 1; }
.pin-x:hover { color: #b8746a; }
.pinned-dropzone { position: absolute; left: 10px; top: 70px; bottom: 160px; width: 190px; z-index: 23; display: none; align-items: center; justify-content: center; border: 2px dashed var(--gold-edge, rgba(200,154,58,0.4)); border-radius: 16px; background: color-mix(in srgb, var(--gold, #c89a3a) 7%, transparent); color: var(--text-2); font-size: 12.5px; font-weight: 600; text-align: center; padding: 10px; }
body.skill-dragging .pinned-dropzone { display: flex; }
.pinned-dropzone.over { border-color: var(--gold, #c89a3a); background: color-mix(in srgb, var(--gold, #c89a3a) 14%, transparent); }
.chat-col { position: relative; }
@media (max-width: 1100px) { .pinned-dock, .pinned-dropzone { display: none !important; } }

/* ---------- §H.29 release notes pill ---------- */
.release-pill { position: fixed; bottom: 14px; right: 14px; z-index: 80; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--surface); color: var(--text-2); font-size: 11.5px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,0.16); }
.release-pill:hover { color: var(--text); border-color: var(--gold-edge, rgba(200,154,58,0.4)); }
.release-panel { position: fixed; bottom: 52px; right: 14px; z-index: 81; width: min(420px, 92vw); max-height: min(58vh, 560px); display: flex; flex-direction: column; border: 1px solid var(--hairline); border-radius: 14px; background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,0.3); opacity: 0; transform: translateY(8px); transition: opacity 0.18s ease, transform 0.18s ease; overflow: hidden; }
.release-panel.show { opacity: 1; transform: none; }
.rel-h { padding: 12px 16px; font-size: 13px; font-weight: 800; border-bottom: 1px solid var(--hairline); }
.rel-body { overflow-y: auto; padding: 6px 16px 14px; }
.rel-month summary { cursor: pointer; padding: 9px 0; font-size: 12.5px; font-weight: 700; color: var(--text); }
.rel-ver { padding: 4px 0 10px 12px; border-left: 2px solid var(--hairline); margin: 0 0 8px 4px; }
.rel-ver-h { display: flex; align-items: baseline; gap: 8px; font-size: 12px; }
.rel-ver-h span { color: var(--text-3); font-size: 10.5px; }
.rel-ver-h em { color: var(--text-2); font-style: normal; }
.rel-ver ul { margin: 6px 0 0; padding-left: 18px; font-size: 11.8px; color: var(--text-2); }
.rel-ver li { margin-bottom: 3px; }

/* ---------- §H.26 maintenance + broadcast ---------- */
.maint-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(8, 10, 16, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.maint-card { text-align: center; max-width: 420px; padding: 30px; color: #f3f4f8; }
.maint-card img { width: 110px; height: 110px; object-fit: contain; border-radius: 22px; margin-bottom: 16px; }
.maint-card h2 { margin: 0 0 8px; font-size: 22px; }
.maint-card p { margin: 0; font-size: 14px; color: #c4c9d6; }
.broadcast-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 150; display: flex; align-items: center; gap: 12px; justify-content: center; padding: 9px 44px 9px 16px; font-size: 13px; font-weight: 600; color: #fff; background: linear-gradient(90deg, #2b6cb0, #4FA8FF); }
.broadcast-bar[data-type="warning"], .broadcast-bar[data-type="maintenance"] { background: linear-gradient(90deg, #b7791f, #ecc94b); color: #1a1a14; }
.broadcast-bar[data-type="error"] { background: linear-gradient(90deg, #9b2c2c, #e53e3e); }
.broadcast-bar[data-type="success"] { background: linear-gradient(90deg, #276749, #48bb78); }
.broadcast-bar .drawer-close { position: absolute; right: 10px; color: inherit; }

/* ---------- §H.30 image shimmer + blur-up ---------- */
.gen-shimmer { position: relative; width: 100%; max-width: 420px; height: 200px; margin-top: 10px; border-radius: 12px; overflow: hidden; background: linear-gradient(120deg, var(--surface-2) 30%, color-mix(in srgb, var(--bot, #888) 14%, var(--surface-2)) 50%, var(--surface-2) 70%); background-size: 220% 100%; animation: mmShimmer 1.6s ease-in-out infinite; }
.gen-shimmer span { position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 40%, color-mix(in srgb, var(--bot-2, #aaa) 18%, transparent), transparent 60%); animation: mmShimmerDrift 3.4s ease-in-out infinite alternate; }
@keyframes mmShimmer { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
@keyframes mmShimmerDrift { from { transform: translate(0, 0) scale(1); } to { transform: translate(14%, 8%) scale(1.15); } }
img.gen-img.blur-up { transition: filter 0.5s ease; }
@media (prefers-reduced-motion: reduce) { .gen-shimmer, .gen-shimmer span { animation: none; } }

/* ---------- §H.38 clickable attachment chips ---------- */
.attach-chip.clickable { cursor: pointer; }
.attach-chip.clickable:hover { border-color: var(--bot-edge); }

/* ---------- §H.46 usage per-bot rows ---------- */
.usage-bots-h { margin: 16px 0 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); }
.usage-bots { display: grid; gap: 6px; }
.usage-bot-row { display: flex; align-items: center; gap: 10px; padding: 7px 11px; border: 1px solid var(--hairline); border-radius: 10px; font-size: 12.5px; }
.usage-bot-row img { width: 26px; height: 26px; object-fit: contain; }
.ub-name { font-weight: 700; color: var(--text); }
.ub-stats { margin-left: auto; color: var(--text-2); font-size: 12px; }

/* ============================================================================
   v2.8 (ADDENDUM 12) — tutorial overhaul, demo context, What's New
   ============================================================================ */

/* §E.1: visible TUTORIAL flag on the tour card */
.tour-flag { position: absolute; top: -11px; left: 22px; padding: 3px 12px; border-radius: 999px; background: var(--gold, #c89a3a); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: 0.22em; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); z-index: 2; }

/* §E.4: skip-section button sits with Back/Next */
.tour-skip-section { font-size: 12px; opacity: 0.85; }

/* §E.5: canned demo conversation — hide the real messages, keep their listeners */
.messages.tour-demo-ctx > :not(#tourDemoConvo) { display: none !important; }
#tourDemoConvo .msg-actions { opacity: 1; }

/* §D / shortcuts demo: composer flash when Ctrl+/ lands */
.tour-kbd-flash { box-shadow: 0 0 0 3px var(--gold-edge, rgba(200, 154, 58, 0.4)), 0 12px 40px rgba(0, 0, 0, 0.18) !important; transition: box-shadow 0.25s ease; }

/* §E.3: section index in the Show Me How modal */
.tour-sec { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: 10px; padding: 9px 12px; border: 1px solid var(--gold-edge, rgba(200, 154, 58, 0.35)); border-radius: 10px; background: var(--gold-soft, rgba(200, 154, 58, 0.08)); cursor: pointer; text-align: left; }
.tour-sec:hover { border-color: var(--gold, #c89a3a); }
.tour-sec .ts-name { font-weight: 800; font-size: 13.5px; color: var(--text); }
.tour-sec .ts-count { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.tour-item.sec-sub { margin-left: 14px; width: calc(100% - 14px); }

/* keycaps */
.dm-keys { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 0 6px; }
.dm-keys kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 46px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--hairline); border-bottom-width: 3px; background: var(--surface); font-family: inherit; font-size: 19px; font-weight: 800; color: var(--text); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08); }
.dm-keys .dm-plus { font-size: 16px; color: var(--text-3); font-weight: 700; }
.dm-shortcut { text-align: center; }

/* prompt-assistant demo */
.dm-suggest { display: flex; flex-direction: column; gap: 8px; }
.dm-fakeinput.typed { min-height: 30px; }
.dm-suggestbar { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; border: 1px dashed var(--gold-edge, rgba(200, 154, 58, 0.4)); background: var(--gold-soft, rgba(200, 154, 58, 0.07)); font-size: 12px; color: var(--text-2); }
.dm-suggestbar .dm-btn { margin-left: auto; flex: none; }

/* Show Me How demo index */
.dm-index { display: flex; flex-direction: column; gap: 6px; }
.dm-ix-h { font-weight: 800; font-size: 13px; color: var(--text); margin-bottom: 2px; }
.dm-ix-sec { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border: 1px solid var(--hairline); border-radius: 9px; font-size: 12.5px; color: var(--text); background: var(--surface); }
.dm-ix-sec i { font-style: normal; font-size: 11px; color: var(--text-3); }
.dm-ix-sec.sel { border-color: var(--gold, #c89a3a); background: var(--gold-soft, rgba(200, 154, 58, 0.08)); }

/* Learn page captures + canned playing-video frame */
.dm-learn { display: flex; }
.dm-learn .dm-shot { width: 100%; border-radius: 10px; border: 1px solid var(--hairline); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.18); }
.dm-player { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--hairline); background: #000; }
.dm-player > img { width: 100%; display: block; opacity: 0.55; }
.dm-play-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.dm-playbtn { width: 54px; height: 54px; border-radius: 50%; border: none; cursor: default; background: rgba(255, 255, 255, 0.92); color: #0B1B33; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45); }
.dm-playbtn svg { width: 26px; height: 26px; }
.dm-play-overlay.playing .dm-playbtn { opacity: 0; transition: opacity 0.4s ease; }
.dm-player-bar { position: absolute; left: 0; right: 0; bottom: 26px; display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.dm-pb-time { font-size: 10.5px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); }
.dm-pb-track { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); overflow: hidden; }
.dm-pb-track i { display: block; height: 100%; width: 2%; background: var(--gold, #c89a3a); transition: width 1.6s linear; }
.dm-player-title { position: absolute; left: 0; right: 0; bottom: 4px; padding: 0 12px; font-size: 11.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8); }

/* canned browser window (IT support demo) */
.dm-browser { border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; background: var(--surface); }
.dm-tabbar { display: flex; gap: 4px; padding: 6px 8px 0; background: var(--bg-2, rgba(0, 0, 0, 0.04)); }
.dm-tab { padding: 5px 12px; border-radius: 8px 8px 0 0; font-size: 11px; color: var(--text-3); background: transparent; }
.dm-tab.on { background: var(--surface); color: var(--text); font-weight: 700; }
.dm-urlbar { padding: 6px 12px; font-size: 11px; color: var(--text-2); border-bottom: 1px solid var(--hairline); background: var(--surface); }
.dm-helpdesk { padding: 12px; }
.dm-hd-title { font-weight: 800; font-size: 14px; color: var(--text); margin-bottom: 8px; }
.dm-hd-row { padding: 8px 10px; margin-top: 6px; border: 1px solid var(--hairline); border-radius: 9px; font-size: 12.5px; color: var(--text); cursor: default; }
.dm-hd-row.sel { border-color: var(--gold, #c89a3a); background: var(--gold-soft, rgba(200, 154, 58, 0.08)); }

/* sharing demo extras */
.dm-share-note { font-size: 12px; color: var(--text-2); padding: 6px 2px; }
.dm-collab-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.05em; color: #1d8a4e; border: 1px solid rgba(29, 138, 78, 0.4); background: rgba(29, 138, 78, 0.08); }
.dm-collab-badge .dm-dot { width: 7px; height: 7px; border-radius: 50%; background: #1d8a4e; animation: dmPulse 1.4s ease-in-out infinite; }
@keyframes dmPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.dm-peoplerow { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.dm-peoplerow .dm-fakeinput { flex: 1; }
.dm-person { display: flex; align-items: center; gap: 8px; padding: 6px 9px; margin-top: 6px; border: 1px solid var(--hairline); border-radius: 9px; font-size: 12.5px; color: var(--text); transition: opacity 0.4s ease, transform 0.4s ease; }
.dm-person.gone { opacity: 0; transform: translateX(14px); }
.dm-pava { width: 22px; height: 22px; border-radius: 50%; background: var(--gold-soft, rgba(200, 154, 58, 0.15)); color: var(--gold, #c89a3a); font-size: 9.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.dm-px { margin-left: auto; border: none; background: none; color: var(--text-3); font-size: 15px; cursor: default; }

/* copy / clipboard demo */
.dm-clip { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* conference demo */
.dm-conf { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 999px; border: 1px dashed var(--gold-edge, rgba(200, 154, 58, 0.45)); font-size: 11.5px; color: var(--text-2); margin: 4px 0; }
.dm-confdot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold, #c89a3a); animation: dmPulse 1.2s ease-in-out infinite; }
.dm-confnote { font-size: 11px; color: var(--text-3); padding-top: 4px; }

/* doc-gen demo */
.dm-genjob { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--hairline); border-radius: 10px; font-size: 12.5px; color: var(--text-2); margin: 6px 0; }
.dm-genspin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--gold-soft, rgba(200, 154, 58, 0.25)); border-top-color: var(--gold, #c89a3a); animation: dmSpin 0.9s linear infinite; }
@keyframes dmSpin { to { transform: rotate(360deg); } }
.dm-artdone { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--gold-edge, rgba(200, 154, 58, 0.4)); border-radius: 10px; font-size: 12.5px; color: var(--text); background: var(--gold-soft, rgba(200, 154, 58, 0.06)); margin: 6px 0; }
.dm-artdone .dm-btn { margin-left: auto; }

/* mini specialist carousel demo */
.dm-caro { overflow: hidden; text-align: center; padding: 8px 0 4px; }
.dm-caro-track { display: inline-flex; align-items: center; gap: 14px; transition: transform 0.8s cubic-bezier(0.22, 0.8, 0.26, 1); }
.dm-caro-track img { width: 56px; height: 56px; object-fit: contain; opacity: 0.45; filter: saturate(0.6); transition: all 0.6s ease; }
.dm-caro-track img.big { width: 92px; height: 92px; opacity: 1; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.3)); }
.dm-caro-name { margin-top: 6px; font-size: 12.5px; font-weight: 800; color: var(--text); }

/* skills screen demo */
.dm-skpage { display: flex; flex-direction: column; gap: 6px; }
.dm-skgroup { font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-top: 4px; }
.dm-skcard { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid var(--hairline); border-radius: 10px; font-size: 12px; color: var(--text-2); }
.dm-skcard b { color: var(--text); font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; }
.dm-skcard b svg { width: 12px; height: 12px; color: var(--text-3); }
.dm-skcard span { flex: 1; }
.dm-skcard .dm-btn { flex: none; }
.dm-skcard.locked { opacity: 0.85; }

/* memory gauge demo */
.dm-gaugewrap { display: flex; flex-direction: column; gap: 10px; padding: 8px 2px; }
.dm-gauge { height: 12px; border-radius: 6px; background: var(--hairline); overflow: hidden; }
.dm-gauge i { display: block; height: 100%; width: 8%; border-radius: 6px; background: linear-gradient(90deg, #8a6db8, #6f7fd0, #34e6c4); transition: width 1.6s cubic-bezier(0.22, 0.8, 0.26, 1); }
.dm-gaugelbl b { display: block; font-size: 13px; color: var(--text); }
.dm-gaugelbl span { font-size: 11.5px; color: var(--text-3); }

/* memory check-in demo */
.dm-checkin .dm-chiprow { margin-top: 8px; }
.dm-chip.sel { border-color: var(--gold, #c89a3a); background: var(--gold-soft, rgba(200, 154, 58, 0.1)); color: var(--text); }

/* account menu / usage demo */
.dm-menu { display: flex; flex-direction: column; max-width: 220px; }
.dm-usage { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dm-stat { padding: 10px; border: 1px solid var(--hairline); border-radius: 10px; text-align: center; }
.dm-stat b { display: block; font-size: 19px; color: var(--text); }
.dm-stat span { font-size: 10.5px; color: var(--text-3); }

/* What's New — modal list + demo list share wn-item */
.whats-new-list { max-height: min(58vh, 460px); overflow: auto; padding: 4px 18px 18px; }
.dm-wn { display: flex; flex-direction: column; }
.wn-item { display: flex; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--hairline); }
.wn-item:last-child { border-bottom: none; }
.wn-date { flex: none; width: 84px; font-size: 11px; color: var(--text-3); padding-top: 2px; }
.wn-title { font-size: 13.5px; font-weight: 800; color: var(--text); }
.wn-body { font-size: 12.5px; color: var(--text-2); line-height: 1.5; margin-top: 2px; }
.wn-empty { padding: 18px 4px; font-size: 13px; color: var(--text-3); }
