/* SARION 2 workspace: presentation only. Every rule is scoped to body.sarion2 (or the s2-* classes public/interface/workspace.js sets),
   so pages without that class keep their shipped look. Service behaviour stays in public/index.html; nothing here hides a control
   a user needs (each compact form keeps the same element, id and handler).
   Layout states (set by workspace.js on <body>):
     s2-app          signed in (#content visible)
     s2-drawer-open  the text chat is open and not minimised
     s2-conversing   s2-drawer-open and a conversation is on screen (messages exist, or the user is typing): the orb collapses to a bar
     s2-fullscreen   the conversation fills the viewport (drawer header button, Escape to leave)
   --s2-top is the bottom edge of the top bar in px (measured by workspace.js). */

body.sarion2 { padding: 20px; align-items: flex-start; }
.sarion2 .shell { width: min(1480px, 100%); min-height: calc(100dvh - 40px); border-radius: 20px; box-shadow: 0 24px 80px #0006; background: var(--s2-panel); border-color: var(--s2-line); }
.sarion2 .topbar { padding: 14px 24px; gap: 20px; background: var(--s2-panel); border-color: var(--s2-line); }
.sarion2 .brand { flex: 0 0 auto; }
.sarion2 .content { grid-template-columns: 264px minmax(0,1fr); }
.sarion2 .sidebar { grid-column: 1; grid-row: 1; border-right: 1px solid var(--s2-line); background: var(--s2-bg); padding: 22px 16px; }
.sarion2 .chat-panel { grid-column: 2; grid-row: 1; border: 0; padding: 24px; min-width: 0; }

/* ── The original wordmark (exact artwork, a raster on black). On light surfaces it sits on its own black plaque. ── */
.sarion2 .brand .s2-wordmark { width: 156px; }
/* Dark: the artwork's black ground is blended away (lighten keeps every gold pixel exactly as supplied). */
:root:not([data-theme="light"]) .sarion2 .s2-wordmark { mix-blend-mode: lighten; }
:root[data-theme="light"] .sarion2 .s2-wordmark { padding: 6px 10px; border-radius: 10px; box-sizing: content-box; }
/* Entrance from the Graphics Studio logo-motion study (exports/runtime/logo-motion.mjs + studio.css): the exact raster is revealed
   as a unit along the baton's direction; no letterform is redrawn. Skipped under reduced motion. */
.s2-logo-enter { animation: s2-logo-entrance 1.2s cubic-bezier(.2,.7,.2,1) both; }
@keyframes s2-logo-entrance { from { opacity: 0; clip-path: inset(0 100% 0 0); transform: translateY(5px); } to { opacity: 1; clip-path: inset(0 0 0 0); transform: translateY(0); } }

/* ── Sign-in: the wordmark as the hero. The page's own heading stays for assistive technology. ── */
.sarion2 .s2-hero-mark { width: min(340px, 78vw); margin: 0 auto 18px; }
.sarion2 .s2-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; padding: 0; }
.sarion2 #loginView p { color: var(--s2-muted) !important; }

/* ── Voice stage and the Intelligence Core ── */
.sarion2 .voice-stage { position: relative; padding: 8px 0 20px; gap: 16px; }
.sarion2 .voice-stage::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: min(560px, 100%); transform: translateX(-50%); background: radial-gradient(closest-side, #d1bb9024, #d1bb900a 55%, transparent); pointer-events: none; }
:root[data-theme="light"] .sarion2 .voice-stage::before { background: radial-gradient(closest-side, #71571f1c, transparent); }
.sarion2 .s2-stage-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0; color: var(--s2-accent); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; }
.sarion2 #orb { width: min(340px, 100%); height: auto; aspect-ratio: 1; border: 0; border-radius: 50%; box-shadow: none; background: transparent; cursor: pointer; }
.sarion2 #orb:focus-visible { outline-offset: -6px; }
.sarion2 #orb > .s2-legacy-voice-decoration { display: none !important; }
.sarion2 #orb::before, .sarion2 #orb::after { display: none; }
.s2-core { position: absolute; inset: 0; pointer-events: none; }
.s2-core canvas { width: 100%; height: 100%; display: block; }
.s2-core [data-core-fallback] { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.s2-core [data-core-fallback] svg { width: 80%; height: 85%; }
.s2-core [data-core-fallback] span { font-size: 11px; color: var(--s2-muted); }
/* No WebGL module yet (loading, hidden, or failed): a still, gold-ringed form so the stage is never empty. */
.s2-core[data-rendering=text]::after { content: ''; position: absolute; inset: 16%; border-radius: 50%; background: radial-gradient(circle at 38% 34%, #3a3f44, #12161a 62%, #0a0d10); box-shadow: inset 0 0 0 1px #d1bb9055, 0 0 40px #d1bb9018; }
.s2-core-status { margin: 0 auto; max-width: 48ch; color: var(--s2-text); text-align: center; font: 400 19px/1.4 Georgia, 'Times New Roman', serif; }
.sarion2 .voice-status { color: var(--s2-muted); }
.sarion2 .voice-button { background: var(--s2-accent); color: var(--s2-accent-ink); border: 1px solid var(--s2-accent); border-radius: 12px; box-shadow: none; padding: 12px 26px; font-weight: 600; }
.sarion2 .voice-button.listening { background: var(--s2-listen); color: var(--s2-bg); border-color: var(--s2-listen); }

/* State glyph (Graphics Studio micro-interaction studies 01-06: signal bars for voice and work). Driven by body[data-s2-state]. */
.s2-signal { display: inline-flex; align-items: center; gap: 3px; height: 18px; color: var(--s2-accent); }
.s2-signal i { display: block; width: 3px; height: 40%; border-radius: 2px; background: currentColor; opacity: .55; }
.s2-signal i:nth-child(2), .s2-signal i:nth-child(4) { height: 70%; }
.s2-signal i:nth-child(3) { height: 100%; }
body[data-s2-state=listening] .s2-signal, body[data-s2-state=speaking] .s2-signal { color: var(--s2-listen); }
body:is([data-s2-state=listening],[data-s2-state=speaking],[data-s2-state=processing],[data-s2-state=streaming],[data-s2-state=executing],[data-s2-state=attentive]) .s2-signal i { opacity: 1; animation: s2-signal .85s ease-in-out infinite alternate; }
body:is([data-s2-state=processing],[data-s2-state=executing],[data-s2-state=attentive]) .s2-signal i { animation-duration: 1.6s; }
.s2-signal i:nth-child(even) { animation-delay: -.4s !important; }
body:is([data-s2-state=error],[data-s2-state=disconnected]) .s2-signal { color: var(--s2-danger); }
@keyframes s2-signal { to { transform: scaleY(.4); } }

/* Expanded (full-view) voice stage: Codex's dialog, unchanged in behaviour. */
.s2-view-toggle { font-family: inherit; background: transparent; border: 1px solid var(--s2-line); color: var(--s2-muted); border-radius: 10px; padding: 8px 14px; font-size: 13px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.s2-view-toggle svg { width: 16px; height: 16px; flex: 0 0 auto; }
.sarion2 .voice-stage > .s2-view-toggle { position: absolute; top: 0; right: 0; z-index: 2; }
.sarion2 .voice-stage.s2-expanded { position: fixed; inset: 0; z-index: 11000; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(ellipse at 50% 40%, #1d242b, var(--s2-bg) 70%); padding: max(24px,env(safe-area-inset-top)) 20px max(24px,env(safe-area-inset-bottom)); }
.sarion2 .s2-expanded::before { display: none; }
.sarion2 .s2-expanded #orb { width: min(560px, 86vw, 52dvh); flex-shrink: 0; }
.sarion2 .s2-expanded > .s2-view-toggle { position: absolute; top: max(16px,env(safe-area-inset-top)); right: 16px; }

/* ── Messages and the drawer ── */
.sarion2 .message { border-radius: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.sarion2 .message.assistant { background: transparent; color: var(--s2-text); border-color: var(--s2-line); }
.sarion2 .message.user { background: var(--s2-raised); color: var(--s2-text); border-color: var(--s2-line); }
.sarion2 .drawer-messages { padding: 20px clamp(14px,3vw,48px); overscroll-behavior: contain; }
.sarion2 .drawer-header, .sarion2 .drawer-compose { background: var(--s2-panel); border-color: var(--s2-line); }
.sarion2 .chat-drawer { background: var(--s2-bg); border-color: var(--s2-line); }
@media (min-width: 760px) { body.sarion2 #chatDrawer.chat-drawer { position: relative; } } /* anchors "Jump to latest"; below 760px the drawer is already fixed */
.sarion2 .drawer-input { background: var(--s2-bg); color: var(--s2-text); border-color: var(--s2-line); }
.sarion2 .drawer-send-btn { background: var(--s2-accent); color: var(--s2-accent-ink); border: 0; }
.sarion2 .drawer-attach-btn { color: var(--s2-text); background: var(--s2-raised); border-color: var(--s2-line); }
.sarion2 .caps-toggle-btn, .sarion2 .mobile-nav-btn { border-color: var(--s2-line); color: var(--s2-text); background: var(--s2-panel); border-radius: 9px; }

/* Drawer header: one row everywhere (brief item 6). Title and usage pill share the line; every button is a 44px target. */
.sarion2 .drawer-header { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 18px; min-height: 56px; }
.sarion2 .drawer-header .drawer-title { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--s2-muted); letter-spacing: .12em; }
.sarion2 .drawer-header .usage-pill { flex: 0 1 auto; min-width: 0; min-height: 0; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 5px 10px; }
.sarion2 .drawer-header > div { flex: 0 0 auto; display: flex; align-items: center; gap: 2px; }
.sarion2 .drawer-header .drawer-close { margin: 0 !important; min-width: 44px; min-height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }
.sarion2 .drawer-header .drawer-close svg { width: 18px; height: 18px; }
#drawerFullscreenBtn .s2-icon-exit { display: none; }
#drawerFullscreenBtn[aria-pressed=true] .s2-icon-enter { display: none; }
#drawerFullscreenBtn[aria-pressed=true] .s2-icon-exit { display: block; }

/* "Jump to latest" (brief item 4): shown only while the user has scrolled up and something new arrived. */
.s2-jump-latest { font-family: inherit; position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--s2-compose-h, 84px) + 12px); z-index: 3; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--s2-accent); background: var(--s2-panel); color: var(--s2-text); font-size: 13px; box-shadow: 0 8px 24px #0006; cursor: pointer; }

.sarion2 .login-view { min-height: min(760px, calc(100dvh - 100px)); padding: 40px 20px; }
.sarion2 #authPortal { width: min(440px,100%) !important; background: var(--s2-panel) !important; border-color: var(--s2-line) !important; box-shadow: 0 20px 80px #0004 !important; padding: 28px !important; }
.sarion2 #authPortal input { background: var(--s2-bg) !important; color: var(--s2-text) !important; border-color: var(--s2-line) !important; padding: 12px !important; }
.sarion2 #authPortal label { color: var(--s2-muted) !important; }
.sarion2 #authPortal #tabRegister { color: var(--s2-muted) !important; }
.sarion2 .sarion-tasks { max-width: 960px; padding: 24px; color: var(--s2-text); }
.sarion2 .sarion-tasks__item { background: var(--s2-panel); border-color: var(--s2-line); border-radius: 14px; padding: 18px; }
.sarion2 .sarion-tasks__meta, .sarion2 .sarion-tasks__header p { color: var(--s2-muted); }
.sarion2 .sarion-tasks button { border-color: var(--s2-line); }
.sarion2 .sarion-tasks input, .sarion2 .sarion-tasks select { background: var(--s2-bg); color: var(--s2-text); border-color: var(--s2-line); }

.s2-module-nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--s2-line); }
.s2-module-nav a, .s2-module-nav button { display: flex; align-items: center; flex: 0 1 auto; white-space: nowrap; min-height: 44px; min-width: 0; text-align: left; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--s2-text); font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1.2; text-decoration: none; cursor: pointer; }
.s2-module-nav a:hover, .s2-module-nav button:hover { background: var(--s2-raised); }

/* The caption under the button repeats the heading ("Ready when you are."): workspace.js marks it only while the two say the same thing, so an
   error or "Still listening" from the voice code still shows. */
.sarion2 .voice-stage > .s2-dup-status { display: none; }

/* Keep the install prompt available outside active work surfaces. */
body.sarion2:has(#chatDrawer.open) .sarion-install,
body.sarion2:has(#tasksRoot .sarion-tasks) .sarion-install { display: none; }

/* ── Desktop (900px+): a fixed-height workspace. Sidebar left; stage and conversation right; only the message list scrolls. ── */
@media (min-width: 900px) {
  body.sarion2.s2-app { padding: 16px; height: 100dvh; overflow: hidden; display: block; }
  .s2-app .shell { display: grid; grid-template-columns: 264px minmax(0,1fr); grid-template-rows: auto minmax(0,1fr) auto; height: calc(100dvh - 32px); min-height: 0; margin: 0 auto; }
  .s2-app .topbar { grid-column: 1 / -1; grid-row: 1; }
  .s2-app #content { display: contents; }
  .s2-app .sidebar { grid-column: 1; grid-row: 2 / 4; min-height: 0; overflow-y: auto; }
  /* Workspace modules stay in reach at the foot of the sidebar while the chat list scrolls above them. */
  .s2-app .sidebar { display: flex; flex-direction: column; }
  .s2-app .sidebar .s2-module-nav { position: sticky; bottom: -22px; margin-top: auto; padding: 12px 0 22px; background: var(--s2-bg); z-index: 1; }
  .s2-app .chat-panel { grid-column: 2; grid-row: 2; min-height: 0; overflow-y: auto; }
  .s2-app #chatDrawer { grid-column: 2; grid-row: 3; margin: 0 20px 20px; border-radius: 16px; max-height: 42dvh; min-height: 0; overflow: hidden; }
  .s2-app #chatDrawer.collapsed { max-height: none; }
  /* Conversation open: the stage becomes a band, the conversation takes the rest. */
  body.s2-app.s2-drawer-open .shell { grid-template-rows: auto auto minmax(0,1fr); }
  .s2-drawer-open .chat-panel { overflow: visible; padding: 14px 24px; justify-content: flex-start; }
  .s2-drawer-open #chatDrawer { height: auto; max-height: none; }
  body.s2-app.s2-drawer-open .shell.swapped { grid-template-rows: auto minmax(0,1fr) auto; }
  .s2-drawer-open .shell.swapped #chatDrawer { grid-row: 2; margin: 20px 20px 0; }
  .s2-drawer-open .shell.swapped .chat-panel { grid-row: 3; }
  .s2-drawer-open .voice-stage:not(.s2-expanded) { display: grid; grid-template-columns: 96px minmax(0,1fr) auto; grid-template-areas: "orb eyebrow toggle" "orb status toggle" "orb compose toggle"; column-gap: 20px; row-gap: 4px; align-items: center; justify-items: start; padding: 0; }
  .s2-drawer-open .voice-stage:not(.s2-expanded)::before { display: none; }
  .s2-drawer-open .voice-stage:not(.s2-expanded) #orb { grid-area: orb; width: 96px; }
  .s2-drawer-open .voice-stage:not(.s2-expanded) > .s2-stage-eyebrow { grid-area: eyebrow; align-self: end; }
  .s2-drawer-open .voice-stage:not(.s2-expanded) > .s2-core-status { grid-area: status; margin: 0; text-align: left; font-size: 17px; }
  .s2-drawer-open .voice-stage:not(.s2-expanded) > .compose { grid-area: compose; margin: 0; }
  .s2-drawer-open .voice-stage:not(.s2-expanded) > .s2-view-toggle { grid-area: toggle; position: static; }
  .s2-drawer-open .voice-stage:not(.s2-expanded) > :is(#voiceStatus, #voiceModelNote, .model-chip, .persona-chip, .voice-controls) { display: none !important; }
  .s2-drawer-open .voice-stage:not(.s2-expanded) .voice-button { padding: 9px 18px; min-height: 44px; }
}

/* ── Phones and small tablets (below 900px) ── */
@media (max-width: 899px) {
  body.sarion2 { padding: 0; }
  .sarion2 .shell { min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .sarion2 .content { grid-template-columns: minmax(0,1fr); }
  .sarion2 .chat-panel { grid-column: 1; grid-row: 1; padding: 16px 16px 20px; }
  .sarion2 .sidebar { grid-column: 1; grid-row: 2; border: 0; border-top: 1px solid var(--s2-line); }
  .sarion2 .topbar { padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
  .sarion2 .brand .s2-wordmark { width: 124px; }
  .sarion2 #orb { width: min(300px, 74vw); }
  .sarion2 .voice-stage > .s2-view-toggle { position: static; justify-self: end; }
  .s2-core-status { font-size: 17px; }

  /* Conversation on screen: the orb collapses into a 64px bar under the top bar (orb, state, voice button) and the conversation
     fills everything below it. The page itself no longer scrolls; the message list is the one scroll container. */
  html:has(body.s2-conversing), body.sarion2.s2-conversing { overflow: hidden; height: 100dvh; }
  .s2-conversing .voice-stage:not(.s2-expanded) { position: fixed; z-index: 101; top: var(--s2-top, 60px); left: 0; right: 0; height: 64px; display: flex; flex-direction: row; align-items: center; gap: 8px; padding: 0 10px 0 6px; background: var(--s2-panel); border-bottom: 1px solid var(--s2-line); }
  .s2-conversing .voice-stage:not(.s2-expanded)::before { display: none; }
  .s2-conversing .voice-stage:not(.s2-expanded) #orb { order: 0; flex: 0 0 52px; width: 52px; }
  .s2-conversing .voice-stage:not(.s2-expanded) > .s2-stage-eyebrow { order: 1; flex: 1 1 auto; min-width: 0; overflow: hidden; }
  .s2-conversing .voice-stage:not(.s2-expanded) > .s2-stage-eyebrow { gap: 7px; }
  .s2-conversing .voice-stage:not(.s2-expanded) > .s2-stage-eyebrow .s2-eyebrow-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .1em; }
  /* The full sentence stays the live status for assistive technology; the bar shows the one-word state. */
  .s2-conversing .voice-stage:not(.s2-expanded) > .s2-core-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
  .s2-conversing .voice-stage:not(.s2-expanded) > .compose { order: 3; margin: 0; flex: 0 0 auto; }
  .s2-conversing .voice-stage:not(.s2-expanded) .voice-button { min-width: 0; padding: 0 14px; min-height: 44px; font-size: 13px; white-space: nowrap; border-radius: 10px; }
  .s2-conversing .voice-stage:not(.s2-expanded) > .s2-view-toggle,
  .s2-conversing .voice-stage:not(.s2-expanded) > :is(#voiceStatus, #voiceModelNote, .model-chip, .persona-chip, .voice-controls) { display: none !important; }
  body.s2-conversing .shell #chatDrawer.chat-drawer { position: fixed; z-index: 100; top: calc(var(--s2-top, 60px) + 64px); bottom: 0; left: 0; right: 0; height: auto; min-height: 0; max-height: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; animation: none; padding-bottom: env(safe-area-inset-bottom, 0); }
}
/* With the keyboard up the visible height is small: give all of it to the conversation. */
@media (max-width: 899px) and (max-height: 520px) {
  .s2-conversing .voice-stage:not(.s2-expanded) { display: none !important; }
  body.s2-conversing .shell #chatDrawer.chat-drawer { top: 0; z-index: 10400; }
}
@media (max-width: 520px) {
  /* The title gives its place to the usage pill when there is one; it stays readable to assistive technology. */
  .sarion2 .drawer-header { padding: 4px 6px 4px 12px; gap: 6px; }
  .sarion2 .drawer-header:has(.usage-pill:not([hidden])) .drawer-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sarion2 .drawer-header .usage-pill { font-size: 9.5px; letter-spacing: .03em; padding: 4px 8px; }
}

/* ── Full-screen conversation (brief item 5), any width ── */
html:has(body.s2-fullscreen), body.sarion2.s2-fullscreen { overflow: hidden; }
body.s2-fullscreen .shell #chatDrawer.chat-drawer { position: fixed; inset: 0; z-index: 10500; margin: 0; height: auto; min-height: 0; max-height: none; border: 0; border-radius: 0; box-shadow: none; animation: none; padding-top: env(safe-area-inset-top, 0); padding-bottom: env(safe-area-inset-bottom, 0); }
body.s2-fullscreen .drawer-messages { padding-inline: max(14px, calc((100% - 880px) / 2)); }
body.s2-fullscreen .drawer-compose { padding-inline: max(14px, calc((100% - 880px) / 2)); }

/* ── Small, old laptops (1366x600 and 1280x560 at 100% zoom, 75% zoom at about 1821x800): the whole stage fits with no scrolling. ──
   The orb takes whatever height the chrome and the controls leave, Model and Persona share one row, and gaps shrink. */
@media (min-width: 761px) and (max-height: 860px) {
  body.sarion2 { padding: 8px; }
  .sarion2 .shell { min-height: calc(100dvh - 16px); }
  .sarion2 .topbar { padding: 8px 20px; }
  .sarion2 .chat-panel { padding: 8px 24px; }
  .sarion2 .voice-stage { padding: 0; gap: 6px; grid-template-columns: repeat(2, max-content); justify-content: center; column-gap: 12px; }
  .sarion2 .voice-stage > :not(.s2-view-toggle) { grid-column: 1 / -1; }
  .sarion2 .voice-stage > .model-chip-center, .sarion2 .voice-stage > .persona-chip-center { margin: 0; min-height: 44px; grid-column: auto; }
  .sarion2 .persona-chip-center .persona-pill { min-height: 44px; padding: 0 14px 0 12px; font-size: 11.5px; } /* the same 44px pill as Model beside it */
  .sarion2 .voice-stage > .model-chip-center { justify-self: end; }
  .sarion2 .voice-stage > .persona-chip-center { justify-self: start; }
  .sarion2 .voice-stage > .model-chip-center:has(+ .persona-chip-center[hidden]),
  .sarion2 .voice-stage > .model-chip-center[hidden] + .persona-chip-center { grid-column: 1 / -1; justify-self: center; }
  .sarion2 #orb { width: min(340px, 100%, max(120px, calc(100dvh - var(--s2-stage-chrome, 346px)))); }
  .sarion2 .s2-core-status { font-size: 16px; line-height: 1.3; }
  .sarion2 .voice-button { padding: 8px 24px; min-height: 44px; }
  .sarion2 .voice-stage .voice-status, .sarion2 .voice-stage .s2-stage-eyebrow { margin: 0; line-height: 1.2; }
}

/* ── Short desktop windows: the sidebar spends its height on the chat list (at least 5 chats at 1366x600, 4 at 1280x560). ── */
@media (min-width: 900px) and (max-height: 860px) {
  .s2-app .sidebar { padding: 12px 16px 0; }
  .s2-app .sidebar > div:first-child { margin-bottom: 8px !important; }
  .s2-app .projects-section { margin-bottom: 6px; }
  .s2-app .projects-toggle { min-height: 36px; padding: 4px; }
  .s2-app .projects-new { width: 32px; height: 32px; }
  .s2-app .projects-empty { padding: 0 12px 2px; }
  .s2-app .chat-view-all { margin-top: 6px; padding: 6px 12px; }
  .s2-app .sidebar .s2-module-nav { margin-top: 6px; padding: 4px 0 8px; bottom: 0; }
  .s2-app .sidebar .s2-module-nav a { min-height: 36px; }
}

/* ── Scrollbars follow the theme: thin and quiet, never the browser's light-grey default. ── */
.sarion2 .chat-panel, .sarion2 .sidebar, .sarion2 .chat-list, .sarion2 .projects-list, .sarion2 .drawer-messages, .sarion2 .voice-stage.s2-expanded {
  scrollbar-width: thin; scrollbar-color: var(--s2-line) transparent;
}
.sarion2 .chat-panel::-webkit-scrollbar, .sarion2 .sidebar::-webkit-scrollbar, .sarion2 .chat-list::-webkit-scrollbar, .sarion2 .projects-list::-webkit-scrollbar,
.sarion2 .drawer-messages::-webkit-scrollbar, .sarion2 .voice-stage.s2-expanded::-webkit-scrollbar { width: 8px; height: 8px; }
.sarion2 .chat-panel::-webkit-scrollbar-track, .sarion2 .sidebar::-webkit-scrollbar-track, .sarion2 .chat-list::-webkit-scrollbar-track,
.sarion2 .projects-list::-webkit-scrollbar-track, .sarion2 .drawer-messages::-webkit-scrollbar-track { background: transparent; }
.sarion2 .chat-panel::-webkit-scrollbar-thumb, .sarion2 .sidebar::-webkit-scrollbar-thumb, .sarion2 .chat-list::-webkit-scrollbar-thumb,
.sarion2 .projects-list::-webkit-scrollbar-thumb, .sarion2 .drawer-messages::-webkit-scrollbar-thumb { background: var(--s2-line); border-radius: 8px; }
