@font-face {
  font-family: 'Cascadia Code';
  src: url(font.e22ef4471965d76eae7b.woff2) format('woff2');
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
}

@font-face {
  font-family: 'Cascadia Code';
  src: url(font.30074669ff17c9104cdc.woff2) format('woff2');
  font-style: italic;
  font-weight: 200 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --surface-canvas: #1b1b1b;
  --surface-workspace-content: #1e1e1e;
  --surface-sidebar: #202020;
  --surface-session-list: var(--surface-panel);
  --surface-panel: #242424;
  --surface-raised: #292929;
  --surface-overlay: #2e2e2e;
  --text-primary: #dedede;
  --text-secondary: #a3a3a3;
  --text-tertiary: #787878;
  --border-subtle: #363636;
  --border-strong: #4a4a4a;
  --accent-primary: #3c85c9;
  --accent-hover: #4a92d4;
  --accent-text: #8fc5f8;
  --accent-action: #2c6da8;
  --accent-action-hover: #3476b4;
  --accent-fast: #fdc001;
  --state-success: #58a86d;
  --state-warning: #d0a24f;
  --state-danger: #e2767f;
  --state-info: #65a3d8;
  --focus-ring-color: color-mix(in srgb, var(--accent-primary) 72%, white);
  --shadow-floating: 0 8px 24px rgb(0 0 0 / 22%);
  --shadow-overlay: 0 16px 40px rgb(0 0 0 / 34%);
  --layer-workspace-chrome: 6;
  --layer-workspace-modal: 1000;
  --radius-control: 6px;
  --radius-panel: 10px;
  --radius-floating: 12px;
  --radius-popup: 16px;
  --motion-fast: 140ms;
  --motion-standard: 200ms;
  --motion-emphasized: 280ms;
  --motion-exit: 180ms;
  --motion-session-panel: var(--motion-emphasized) var(--ease-drawer);
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --border-faint: #2b2b2b;
  --surface-active: rgb(255 255 255 / 9%);
  --accent-soft-bg: color-mix(in srgb, var(--accent-primary) 16%, transparent);
  --sl-icon-size: 14px;

  --bg: var(--surface-canvas);
  --panel: var(--surface-sidebar);
  --panel-2: var(--surface-raised);
  --panel-3: var(--surface-panel);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --border: var(--border-subtle);
  --accent: var(--accent-primary);
  --hover: rgb(255 255 255 / 6%);
  --soft-shadow: var(--shadow-floating);
  --danger: var(--state-danger);
  --line-num: var(--text-tertiary);
  --chat-capsule-skill-text: color-mix(in srgb, var(--accent-primary) 62%, var(--text-primary));
  --chat-capsule-skill-bg: color-mix(in srgb, var(--accent-primary) 12%, transparent);
  --chat-capsule-goal-text: color-mix(in srgb, var(--state-success) 68%, var(--text-primary));
  --chat-capsule-goal-bg: color-mix(in srgb, var(--state-success) 13%, transparent);
  --wm-safe-area-top: env(safe-area-inset-top, 0px);
  --wm-safe-area-right: env(safe-area-inset-right, 0px);
  --wm-safe-area-left: env(safe-area-inset-left, 0px);
  --wm-safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --mobile-floating-control-lane: 60px;
  /* Shared workbench chrome geometry. */
  --workbench-titlebar-height: 36px;
  --workbench-tabbar-height: 34px;
  --workbench-control-height: 28px;
  /* Title bar height; consumed by fixed overlays mounted outside .workspace. */
  --chat-menu-header-height: 32px;
}

.theme-light {
  color-scheme: light;
  --surface-canvas: #f3f3f3;
  --surface-workspace-content: #ffffff;
  --surface-sidebar: #f7f7f7;
  --surface-session-list: var(--surface-sidebar);
  --surface-panel: #fafafa;
  --surface-raised: #f0f0f0;
  --surface-overlay: #ffffff;
  --text-primary: #242424;
  --text-secondary: #6f6f6f;
  --text-tertiary: #8a8a8a;
  --border-subtle: #dedede;
  --border-strong: #c2c2c2;
  --accent-primary: #286fae;
  --accent-hover: #205e96;
  --accent-text: var(--accent-primary);
  --accent-action: var(--accent-primary);
  --accent-action-hover: var(--accent-hover);
  --state-success: #347d4b;
  --state-warning: #9b6a13;
  --state-danger: #c93c48;
  --state-info: #367fab;
  --focus-ring-color: color-mix(in srgb, var(--accent-primary) 78%, black);
  --shadow-floating: 0 8px 24px rgb(0 0 0 / 12%);
  --shadow-overlay: 0 16px 40px rgb(0 0 0 / 18%);
  --radius-control: 6px;
  --radius-panel: 10px;
  --radius-floating: 12px;
  --motion-fast: 140ms;
  --motion-standard: 200ms;
  --motion-emphasized: 280ms;
  --motion-exit: 180ms;
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --border-faint: #e4e4e4;
  --surface-active: rgb(21 31 43 / 10%);
  --accent-soft-bg: color-mix(in srgb, var(--accent-primary) 14%, transparent);
  --sl-icon-size: 14px;

  --bg: var(--surface-canvas);
  --panel: var(--surface-sidebar);
  --panel-2: var(--surface-raised);
  --panel-3: var(--surface-panel);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --border: var(--border-subtle);
  --accent: var(--accent-primary);
  --hover: rgb(21 31 43 / 6%);
  --soft-shadow: var(--shadow-floating);
  --danger: var(--state-danger);
  --line-num: var(--text-tertiary);
}

:root {
  --font-ui: "Segoe UI", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "Cascadia Code", monospace;
  --reading-font-size: 14px;
  --reading-font-weight: 400;
  --reading-line-height: 1.625;
  --reading-inline-code-size: 0.92em;
  --reading-code-font-size: 13px;
  --reading-code-line-height: 1.6;
  --reading-code-tab-size: 4;
  --reading-text: light-dark(#2b2b2b, #d4d4d4);
  --reading-inline-code-background: light-dark(#ececec, #323232);
}

:root[data-reading-typography="desktop"] {
  --font-ui: "Segoe UI", "WheelMaker Noto Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --reading-font-size: 15px;
  --reading-font-weight: 350;
  --reading-line-height: 1.6;
  --reading-inline-code-size: 0.9em;
  --reading-code-font-size: 13.5px;
}

:root[data-reading-typography="mobile"] {
  --font-ui: system-ui, sans-serif;
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) {
  font-family: var(--font-ui);
  font-size: var(--reading-font-size);
  line-height: var(--reading-line-height);
  font-weight: var(--reading-font-weight);
  letter-spacing: normal;
  color: var(--reading-text);
}

.article-body {
  --reading-table-line: var(--line);
  --reading-table-header: var(--panel);
  --reading-table-heading-text: var(--muted);
  --reading-table-margin: 20px 0;
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) .table-scroll {
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: auto;
  margin: var(--reading-table-margin, 0 0 12px);
  border: 1px solid var(--reading-table-line, var(--border-subtle));
  border-radius: 7px;
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) table {
  width: 100%;
  min-width: 400px;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) :is(th, td) {
  padding: 8px 13px;
  border-bottom: 1px solid var(--reading-table-line, var(--border-subtle));
  border-right: 1px solid var(--reading-table-line, var(--border-subtle));
  overflow-wrap: anywhere;
  vertical-align: top;
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) :is(th, td):last-child {
  border-right: 0;
}

:is(.chat-main-message, .wheelmaker-markdown-export) :is(th, td) .chat-file-link {
  display: inline-grid;
  grid-template-columns: 13px minmax(0, 1fr);
  column-gap: 5px;
  max-width: 100%;
  vertical-align: top;
}

:is(.chat-main-message, .wheelmaker-markdown-export) :is(th, td) .chat-file-link-icon {
  margin: 0;
  align-self: start;
  height: 1lh;
  vertical-align: baseline;
}

.chat-file-link-label { min-width: 0; }
.chat-file-link-tail { white-space: nowrap; }

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) th {
  font-weight: 500;
  background: var(--reading-table-header, var(--surface-panel));
  color: var(--reading-table-heading-text, var(--text-secondary));
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) tr:last-child td {
  border-bottom: 0;
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) p {
  margin: 0 0 0.25em;
}

:is(.chat-main-message, .markdown-preview, .article-body, .markdown-html-export-body) > p {
  margin-top: 0.5em;
}

:is(.chat-main-message, .markdown-preview, .article-body, .markdown-html-export-body) > p + p {
  margin-top: 1em;
}

:is(.chat-main-message, .markdown-preview, .article-body, .markdown-html-export-body) > :is(h1, h2, h3) + p {
  margin-top: 0;
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) :is(ul, ol) {
  margin: 0;
  padding-inline-start: 1.625em;
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) li {
  padding-inline-start: 0.375em;
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) :is(strong, h1, h2, h3, h4, h5, h6) {
  font-weight: 700;
  color: light-dark(currentColor, #f0f0f0);
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) :is(a, code, pre) strong {
  color: inherit;
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) :is(h1, h2, h3, h4, h5, h6) {
  margin: var(--reading-font-size) 0 calc(var(--reading-font-size) / 4);
  line-height: calc(var(--reading-font-size) * 1.75);
  letter-spacing: normal;
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) h1 {
  font-size: 1.5em;
  line-height: calc(var(--reading-font-size) * 2);
  margin-bottom: calc(var(--reading-font-size) / 2);
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) h2 {
  font-size: 1.25em;
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) h3 {
  font-size: 1.125em;
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) h4 {
  font-size: 1em;
  line-height: calc(var(--reading-font-size) * 1.5);
  margin-bottom: 0;
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) :is(h5, h6) {
  font-size: 1em;
  line-height: inherit;
  margin: 0;
}

:is(.chat-main-message, .markdown-preview, .article-body, .markdown-html-export-body) > :first-child {
  margin-top: 0;
}

:is(.chat-main-message, .markdown-preview, .article-body, .markdown-html-export-body) > :last-child {
  margin-bottom: 0;
}

:is(.chat-main-message, .markdown-preview, .article-body, .wheelmaker-markdown-export) code:not(:where(pre code, .wm-shiki-code)) {
  font-family: var(--font-mono);
  font-size: var(--reading-inline-code-size);
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--reading-inline-code-background);
  color: var(--reading-text);
  letter-spacing: normal;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  white-space: break-spaces;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Unicode ranges follow each bundled subset's cmap. See ORIGIN.md. */

@font-face {
  font-family: "WheelMaker Noto Sans SC";
  src: url(font.d3b796d1783852d1fa1c.woff2) format("woff2");
  font-style: normal;
  font-weight: 350 700;
  font-display: swap;
  unicode-range: U+B7, U+2014, U+2018-2019, U+201C-201D, U+2026, U+3000-303F, U+4E00-4E01, U+4E03,
    U+4E07-4E0B, U+4E0D-4E0E, U+4E11, U+4E13-4E14, U+4E16, U+4E18-4E1D, U+4E22, U+4E24-4E25, U+4E27,
    U+4E2A-4E2B, U+4E2D, U+4E30, U+4E32, U+4E34, U+4E38-4E3B, U+4E3D-4E3E, U+4E43, U+4E45, U+4E48-4E49,
    U+4E4B-4E50, U+4E52-4E54, U+4E56, U+4E58-4E59, U+4E5D-4E61, U+4E66, U+4E70-4E71, U+4E73, U+4E7E,
    U+4E86, U+4E88-4E89, U+4E8B-4E8C, U+4E8E-4E8F, U+4E91-4E92, U+4E94-4E95, U+4E9A-4E9B, U+4EA1-4EA2,
    U+4EA4-4EA9, U+4EAB-4EAE, U+4EB2, U+4EBA, U+4EBF-4EC1, U+4EC5-4EC7, U+4ECA-4ECB, U+4ECD-4ECE, U+4ED1,
    U+4ED3-4ED9, U+4EDF, U+4EE3-4EE5, U+4EEA, U+4EEC, U+4EF0, U+4EF2, U+4EF6-4EF7, U+4EFB, U+4EFD, U+4EFF,
    U+4F01, U+4F0A, U+4F0D-4F11, U+4F17-4F1A, U+4F1E-4F20, U+4F24, U+4F26, U+4F2A, U+4F2F-4F30, U+4F34,
    U+4F36, U+4F38, U+4F3A, U+4F3C, U+4F43, U+4F46, U+4F4D-4F51, U+4F53, U+4F55, U+4F59, U+4F5B-4F5C,
    U+4F60, U+4F63, U+4F69, U+4F6C, U+4F6F-4F70, U+4F73, U+4F7F, U+4F84, U+4F88, U+4F8B, U+4F8D, U+4F97,
    U+4F9B, U+4F9D, U+4FA0, U+4FA3, U+4FA5-4FA9, U+4FAE-4FAF, U+4FB5, U+4FBF, U+4FC3-4FC4, U+4FCA,
    U+4FCF-4FD0, U+4FD7-4FD8, U+4FDD-4FDE, U+4FE1, U+4FE9, U+4FED-4FEF, U+4FF1, U+4FFA, U+500D, U+5012,
    U+5014, U+5018-501A, U+501F, U+5021, U+5026, U+502A, U+503A, U+503C, U+503E, U+5047, U+504F, U+505A,
    U+505C, U+5065, U+5076-5077, U+507F-5080, U+5085, U+5088, U+508D, U+50A3, U+50A8, U+50AC, U+50B2,
    U+50BB, U+50CF, U+50DA, U+50E7, U+50F3, U+50F5, U+50FB, U+5112, U+5121, U+513F, U+5141, U+5143-5146,
    U+5148-5149, U+514B, U+514D, U+5151, U+5154, U+515A, U+515C, U+5162, U+5165, U+5168, U+516B-516D,
    U+5170-5171, U+5173-5179, U+517B-517D, U+5180, U+5185, U+5188-5189, U+518C-518D, U+5192, U+5195,
    U+5197, U+5199, U+519B-519C, U+51A0, U+51A4, U+51AC, U+51AF-51B0, U+51B2-51B3, U+51B5-51B7, U+51BB,
    U+51C0, U+51C4, U+51C6, U+51C9, U+51CB-51CC, U+51CF, U+51D1, U+51DB, U+51DD, U+51E0-51E1, U+51E4,
    U+51ED, U+51EF-51F0, U+51F3, U+51F6, U+51F8-51FB, U+51FD, U+51FF-5201, U+5203, U+5206-5207, U+520A,
    U+5211-5212, U+5217-521B, U+521D, U+5220, U+5224, U+5228-5229, U+522B, U+522E, U+5230, U+5236-523B,
    U+523D, U+5241-5243, U+524A, U+524D, U+5250-5251, U+5254, U+5256, U+5265, U+5267, U+5269-526A, U+526F,
    U+5272, U+527F, U+5288, U+529B, U+529D-52A1, U+52A3, U+52A8-52AB, U+52B1-52B3, U+52BF, U+52C3, U+52C7,
    U+52C9, U+52CB, U+52D2, U+52D8, U+52DF, U+52E4, U+52FA, U+52FE-5300, U+5305-5306, U+5308, U+5316-5317,
    U+5319, U+531D, U+5320-5321, U+5323, U+532A, U+5339-533B, U+533F, U+5341, U+5343, U+5347-534A,
    U+534E-534F, U+5351-5353, U+5355-5357, U+535A, U+535C, U+535E, U+5360-5362, U+5364, U+5367, U+536B,
    U+536F-5371, U+5373-5375, U+5377-5378, U+537F, U+5382, U+5384-5386, U+5389, U+538B-538C, U+5395,
    U+5398, U+539A, U+539F, U+53A2, U+53A6, U+53A8-53A9, U+53BB, U+53BF, U+53C1-53C2, U+53C8-53CD, U+53D1,
    U+53D4, U+53D6-53D9, U+53DB, U+53E0, U+53E3-53E6, U+53EA-53F0, U+53F2-53F3, U+53F6-53F9, U+53FC,
    U+5401, U+5403-5404, U+5408-540A, U+540C-5411, U+5413, U+5415, U+5417, U+541B, U+541D-5420,
    U+5426-5429, U+542B-542F, U+5431, U+5434-5435, U+5438-5439, U+543B-543C, U+543E, U+5440, U+5446,
    U+5448, U+544A, U+5450, U+5455, U+5458, U+545B-545C, U+5462, U+5468, U+5473, U+5475, U+5478,
    U+547B-547D, U+5480, U+5486, U+548B-548C, U+548E-5490, U+5492, U+5495-5496, U+5499, U+54A8, U+54AC,
    U+54AF, U+54B1, U+54B3, U+54B8, U+54BD, U+54C0-54C1, U+54C4, U+54C6-54C9, U+54CD-54CE, U+54D1, U+54D7,
    U+54DF, U+54E5-54E6, U+54E8-54EA, U+54ED-54EE, U+54F2, U+54FA, U+54FC, U+5501, U+5506-5507, U+5509,
    U+5510, U+5524, U+552C, U+552E-552F, U+5531, U+553E, U+5543-5544, U+5546, U+554A, U+5561, U+5564-5566,
    U+556A, U+556E, U+5578, U+557C, U+5580, U+5582, U+5584, U+5587, U+5589-558A, U+5598, U+559C-559D,
    U+55A7, U+55B3, U+55B7, U+55BB, U+55C5, U+55D3, U+55DC, U+55E1, U+55E3, U+55FD, U+5609, U+560E,
    U+5618, U+561B, U+5631-5632, U+5634, U+5636, U+563B, U+563F, U+564E, U+5668, U+566A, U+566C, U+5676,
    U+568E-568F, U+56A3, U+56B7, U+56BC, U+56CA, U+56DA-56DB, U+56DE, U+56E0, U+56E2, U+56E4, U+56ED,
    U+56F0-56F1, U+56F4, U+56FA, U+56FD-56FE, U+5703, U+5706, U+5708, U+571F, U+5723, U+5728, U+572D,
    U+5730, U+573A, U+573E, U+5740, U+5747, U+574A, U+574D-5751, U+5757, U+575A-575B, U+575D-5761, U+5764,
    U+5766, U+576A, U+576F, U+5777, U+5782-5784, U+578B, U+5792, U+579B, U+57A2-57A3, U+57A6, U+57AB,
    U+57AE, U+57C2-57C3, U+57CB, U+57CE, U+57D4, U+57DF-57E0, U+57F9-57FA, U+5802, U+5806, U+5811, U+5815,
    U+5821, U+5824, U+582A, U+5830, U+5835, U+584C, U+5851, U+5854, U+5858, U+585E, U+586B, U+5883,
    U+5885, U+5892-5893, U+5899, U+589E-589F, U+58A8-58A9, U+58C1, U+58D5, U+58E4, U+58EB-58EC, U+58EE,
    U+58F0, U+58F3, U+58F6, U+58F9, U+5904, U+5907, U+590D, U+590F, U+5915-5916, U+591A, U+591C, U+591F,
    U+5927, U+5929-592B, U+592E-592F, U+5931, U+5934, U+5937-593A, U+5944, U+5947-5949, U+594B,
    U+594E-594F, U+5951, U+5954, U+5956-5957, U+5960, U+5962, U+5965, U+5973-5974, U+5976, U+5978-5979,
    U+597D, U+5982, U+5984, U+5986-5988, U+598A, U+5992-5993, U+5996, U+5999, U+59A5, U+59A8, U+59AE,
    U+59B9, U+59BB, U+59C6, U+59CB, U+59D0-59D1, U+59D3-59D4, U+59DA, U+59DC, U+59E5, U+59E8, U+59EC,
    U+59FB, U+59FF, U+5A01, U+5A03-5A04, U+5A07, U+5A18, U+5A1C, U+5A1F-5A20, U+5A25, U+5A29, U+5A31,
    U+5A36, U+5A46, U+5A49, U+5A5A, U+5A6A, U+5A74, U+5A76, U+5A7F, U+5A92, U+5A9A, U+5AB3, U+5AC1-5AC2,
    U+5AC9, U+5ACC, U+5AE1, U+5AE9, U+5B50, U+5B54-5B55, U+5B57-5B59, U+5B5C-5B5D, U+5B5F, U+5B63-5B64,
    U+5B66, U+5B69-5B6A, U+5B70, U+5B75, U+5B7A, U+5B7D, U+5B81, U+5B83, U+5B85, U+5B87-5B89, U+5B8B-5B8C,
    U+5B8F, U+5B97-5B9E, U+5BA0-5BA4, U+5BA6, U+5BAA-5BAB, U+5BB0, U+5BB3-5BB6, U+5BB9, U+5BBD-5BBF,
    U+5BC2, U+5BC4-5BC7, U+5BCC, U+5BD0, U+5BD2-5BD3, U+5BDD-5BDF, U+5BE1, U+5BE5, U+5BE8, U+5BF8-5BFC,
    U+5BFF, U+5C01, U+5C04, U+5C06, U+5C09-5C0A, U+5C0F, U+5C11, U+5C14, U+5C16, U+5C18, U+5C1A, U+5C1D,
    U+5C24, U+5C27, U+5C31, U+5C38-5C3A, U+5C3C-5C42, U+5C45, U+5C48-5C4B, U+5C4E-5C4F, U+5C51, U+5C55,
    U+5C5E, U+5C60-5C61, U+5C65, U+5C6F, U+5C71, U+5C79, U+5C7F, U+5C81-5C82, U+5C94, U+5C97, U+5C9B,
    U+5CA9, U+5CAD, U+5CB3, U+5CB8, U+5CBF, U+5CD9, U+5CE1, U+5CE6, U+5CE8, U+5CEA, U+5CED, U+5CF0,
    U+5CFB, U+5D07, U+5D0E, U+5D14, U+5D16, U+5D29, U+5D2D, U+5D4C, U+5DCD, U+5DDD-5DDE, U+5DE1-5DE2,
    U+5DE5-5DE9, U+5DEB, U+5DEE, U+5DF1-5DF4, U+5DF7, U+5DFE, U+5E01-5E03, U+5E05-5E06, U+5E08, U+5E0C,
    U+5E10, U+5E15-5E16, U+5E18, U+5E1A-5E1D, U+5E26-5E27, U+5E2D-5E2E, U+5E38, U+5E3D, U+5E42, U+5E45,
    U+5E4C, U+5E55, U+5E62, U+5E72-5E74, U+5E76, U+5E78, U+5E7B-5E7D, U+5E7F, U+5E84, U+5E86-5E87, U+5E8A,
    U+5E8F-5E90, U+5E93-5E95, U+5E97, U+5E99-5E9A, U+5E9C, U+5E9E-5E9F, U+5EA6-5EA7, U+5EAD, U+5EB6-5EB8,
    U+5EC9-5ECA, U+5ED3, U+5ED6, U+5EF6-5EF7, U+5EFA, U+5F00, U+5F02-5F04, U+5F0A, U+5F0F, U+5F13, U+5F15,
    U+5F17-5F18, U+5F1B, U+5F1F-5F20, U+5F25-5F27, U+5F2F, U+5F31, U+5F39-5F3A, U+5F52-5F53, U+5F55,
    U+5F5D, U+5F62, U+5F64, U+5F66, U+5F69-5F6A, U+5F6C-5F6D, U+5F70-5F71, U+5F79, U+5F7B-5F7C,
    U+5F80-5F81, U+5F84-5F85, U+5F88, U+5F8A-5F8B, U+5F90, U+5F92, U+5F97-5F98, U+5FA1, U+5FAA, U+5FAE,
    U+5FB7, U+5FBD, U+5FC3, U+5FC5-5FC6, U+5FCC-5FCD, U+5FD7-5FD9, U+5FE0, U+5FE7, U+5FEB, U+5FF1, U+5FF5,
    U+5FFB, U+5FFD, U+5FFF-6002, U+600E, U+6012, U+6014-6016, U+601C-601D, U+6020, U+6025, U+6027-6028,
    U+602A, U+602F, U+603B, U+6043, U+604B, U+604D, U+6050, U+6052, U+6055, U+6062, U+6064, U+6068-6069,
    U+606B-606D, U+606F-6070, U+6073, U+6076, U+607C, U+607F, U+6084, U+6089, U+608D, U+6094, U+609F-60A0,
    U+60A3, U+60A6, U+60A8, U+60AC, U+60AF, U+60B2, U+60B8, U+60BC, U+60C5, U+60CA-60CB, U+60D1, U+60D5,
    U+60DC, U+60DF-60E0, U+60E6-60E9, U+60EB, U+60ED-60F0, U+60F3, U+60F6, U+60F9-60FA, U+6101,
    U+6108-6109, U+610F, U+611A, U+611F, U+6124, U+6127, U+613F, U+6148, U+614C, U+614E, U+6151, U+6155,
    U+6162, U+6167-6168, U+6170, U+6177, U+618B, U+618E, U+61A8, U+61BE, U+61C2, U+61C8, U+61CA, U+61D2,
    U+61E6, U+6208, U+620A, U+620C-6212, U+6216, U+6218, U+621A, U+622A, U+622E, U+6233-6234, U+6237,
    U+623F-6241, U+6247, U+624B, U+624D-624E, U+6251-6254, U+6258, U+625B, U+6263, U+6266-6267, U+6269,
    U+626B-6270, U+6273, U+6276, U+6279, U+627C, U+627E-6280, U+6284, U+6289-628A, U+6291-6293,
    U+6295-6298, U+629A-629B, U+62A0-62A2, U+62A4-62A5, U+62A8, U+62AB-62AC, U+62B1, U+62B5, U+62B9,
    U+62BC-62BD, U+62BF, U+62C2, U+62C4-62C9, U+62CC-62CE, U+62D0, U+62D2-62D4, U+62D6, U+62D8-62D9,
    U+62DB-62DC, U+62DF, U+62E2-62E3, U+62E5-62E9, U+62EC-62ED, U+62EF, U+62F1, U+62F3-62F4, U+62F7,
    U+62FC-62FF, U+6301-6302, U+6307, U+6309, U+630E, U+6311, U+6316, U+631A-631B, U+631D-6321,
    U+6323-6325, U+6328, U+632A-632B, U+632F, U+633A, U+633D, U+6342, U+6345-6346, U+6349, U+634C-6350,
    U+6355, U+635E-635F, U+6361-6363, U+6367, U+636E, U+6376-6377, U+637B, U+6380, U+6382, U+6387-6389,
    U+638C, U+638F-6390, U+6392, U+6396, U+6398, U+63A0, U+63A2-63A3, U+63A5, U+63A7-63AA, U+63B3,
    U+63B7-63B8, U+63BA, U+63C9, U+63CD, U+63CF-63D0, U+63D2, U+63D6, U+63E1, U+63E3, U+63E9-63EA, U+63ED,
    U+63F4, U+63FD, U+6400-6402, U+6405, U+640F-6410, U+6413-6414, U+641C, U+641E, U+642A, U+642C-642D,
    U+643A, U+643D, U+6444, U+6446-6448, U+644A, U+6454, U+6458, U+6467, U+6469, U+6478-6479, U+6482,
    U+6485, U+6487, U+6491-6492, U+6495, U+649E, U+64A4, U+64A9, U+64AC-64AE, U+64B0, U+64B5, U+64BC,
    U+64C2, U+64C5, U+64CD-64CE, U+64D2, U+64DE, U+64E6, U+6500, U+6512, U+6518, U+652B, U+652F, U+6536,
    U+6539, U+653B, U+653E-653F, U+6545, U+6548, U+654C, U+654F, U+6551, U+6556, U+6559, U+655B,
    U+655D-655E, U+6562-6563, U+6566, U+656C, U+6570, U+6572, U+6574, U+6577, U+6587, U+658B-658C, U+6591,
    U+6597, U+6599, U+659C, U+659F, U+65A1, U+65A4-65A5, U+65A7, U+65A9, U+65AD, U+65AF-65B0, U+65B9,
    U+65BD, U+65C1, U+65C5, U+65CB, U+65CF, U+65D7, U+65E0, U+65E2, U+65E5-65E9, U+65EC-65ED, U+65F1,
    U+65F6-65F7, U+65FA, U+6602, U+6606, U+660C, U+660E-660F, U+6613-6614, U+661F-6620, U+6625,
    U+6627-6628, U+662D, U+662F, U+663C, U+663E, U+6643, U+664B-664C, U+6652-6653, U+6655, U+665A, U+6664,
    U+6666, U+6668, U+666E-6670, U+6674, U+6676, U+667A, U+667E, U+6682, U+6687, U+6691, U+6696-6697,
    U+66AE, U+66B4, U+66D9, U+66DD, U+66F0, U+66F2-66F4, U+66F9, U+66FC, U+66FE-6700, U+6708-6709, U+670B,
    U+670D, U+6714, U+6717, U+671B, U+671D, U+671F, U+6728, U+672A-672D, U+672F, U+6731, U+6734-6735,
    U+673A, U+673D, U+6740, U+6742-6743, U+6746, U+6749, U+674E-6751, U+6756, U+675C, U+675F-6761, U+6765,
    U+6768, U+676D, U+676F-6770, U+677E-677F, U+6781, U+6784, U+6789, U+6790, U+6795, U+6797, U+679A,
    U+679C-679D, U+67A2-67A3, U+67AA-67AB, U+67AF, U+67B6-67B7, U+67C4, U+67CF-67D4, U+67DC, U+67DE,
    U+67E0, U+67E5, U+67EC, U+67EF, U+67F1, U+67F3-67F4, U+67FF, U+6805, U+6807-6808, U+680B, U+680F,
    U+6811, U+6813, U+6816-6817, U+6821, U+682A, U+6837-6839, U+683C-683D, U+6842-6843, U+6845-6846,
    U+6848, U+684C, U+6850-6851, U+6853-6854, U+6863, U+6865, U+6868-6869, U+6876, U+6881, U+6885-6886,
    U+6897, U+68A2, U+68A6-68A8, U+68AD, U+68AF-68B0, U+68B3, U+68C0, U+68C9, U+68CB, U+68CD, U+68D2,
    U+68D5, U+68D8, U+68DA, U+68E0, U+68EE, U+68F1, U+68F5, U+68FA, U+6905, U+690D-690E, U+6912, U+692D,
    U+6930, U+693D, U+693F, U+6954, U+695A, U+695E, U+6977, U+697C, U+6982, U+6986, U+6994, U+699C,
    U+69A8, U+69B4, U+69B7, U+69D0, U+69DB, U+69FD, U+6A0A, U+6A1F, U+6A21, U+6A2A, U+6A31, U+6A47,
    U+6A59, U+6A61, U+6A71, U+6A80, U+6A84, U+6AAC, U+6B20-6B23, U+6B27, U+6B32, U+6B3A, U+6B3E, U+6B47,
    U+6B49, U+6B4C, U+6B62-6B67, U+6B6A, U+6B79, U+6B7B-6B7C, U+6B83, U+6B86, U+6B89-6B8B, U+6B96,
    U+6BB4-6BB5, U+6BB7, U+6BBF, U+6BC1, U+6BC5, U+6BCB, U+6BCD, U+6BCF, U+6BD2, U+6BD4-6BD7, U+6BD9,
    U+6BDB, U+6BE1, U+6BEB, U+6BEF, U+6C0F, U+6C11, U+6C13-6C14, U+6C16, U+6C1B, U+6C1F, U+6C22,
    U+6C26-6C28, U+6C2E-6C30, U+6C34, U+6C38, U+6C40-6C42, U+6C47, U+6C49, U+6C50, U+6C55, U+6C57, U+6C5B,
    U+6C5D-6C61, U+6C64, U+6C6A, U+6C70, U+6C72, U+6C79, U+6C7D-6C7E, U+6C81-6C83, U+6C88-6C89, U+6C8F,
    U+6C99, U+6C9B, U+6C9F, U+6CA1, U+6CA4-6CA7, U+6CAA-6CAB, U+6CAE, U+6CB3, U+6CB8-6CB9, U+6CBB-6CBF,
    U+6CC4-6CC5, U+6CC9-6CCA, U+6CCC, U+6CD5, U+6CDB, U+6CDE, U+6CE1-6CE3, U+6CE5, U+6CE8, U+6CEA, U+6CF0,
    U+6CF3, U+6CF5, U+6CFB-6CFD, U+6D01, U+6D0B, U+6D12, U+6D17, U+6D1B, U+6D1E, U+6D25, U+6D2A,
    U+6D31-6D32, U+6D3B-6D3E, U+6D41, U+6D45-6D47, U+6D4A-6D4B, U+6D4E, U+6D51, U+6D53, U+6D59-6D5A,
    U+6D66, U+6D69-6D6A, U+6D6E, U+6D74, U+6D77-6D78, U+6D82, U+6D85, U+6D88-6D89, U+6D8C, U+6D8E, U+6D95,
    U+6D9B, U+6D9D, U+6D9F, U+6DA1, U+6DA3-6DA4, U+6DA6-6DAA, U+6DAF, U+6DB2, U+6DB5, U+6DB8, U+6DC0,
    U+6DC4, U+6DC6, U+6DCB-6DCC, U+6DD1, U+6DD6, U+6DD8, U+6DE1, U+6DE4, U+6DEB-6DEC, U+6DEE, U+6DF1,
    U+6DF3, U+6DF7, U+6DF9, U+6DFB, U+6E05, U+6E0A, U+6E0D, U+6E10, U+6E14, U+6E17, U+6E1D, U+6E20-6E21,
    U+6E23-6E24, U+6E29, U+6E2D, U+6E2F, U+6E34, U+6E38, U+6E3A, U+6E43, U+6E4D, U+6E56, U+6E58, U+6E5B,
    U+6E7E-6E7F, U+6E83, U+6E85, U+6E89, U+6E90, U+6E9C, U+6EA2, U+6EAA, U+6EAF, U+6EB6, U+6EBA, U+6EC1,
    U+6EC7, U+6ECB, U+6ED1, U+6ED3-6ED4, U+6EDA, U+6EDE, U+6EE1, U+6EE4-6EE6, U+6EE8-6EE9, U+6EF4, U+6F02,
    U+6F06, U+6F0F, U+6F13-6F14, U+6F20, U+6F2B, U+6F31, U+6F33, U+6F3E, U+6F4D, U+6F58, U+6F5C, U+6F5E,
    U+6F66, U+6F6D-6F6E, U+6F84, U+6F88, U+6F8E, U+6F9C, U+6FA1, U+6FB3, U+6FC0, U+6FD2, U+7011, U+704C,
    U+706B, U+706D, U+706F-7070, U+7075-7076, U+7078, U+707C, U+707E-707F, U+7089-708A, U+708E, U+7092,
    U+7094-7095, U+7099, U+70AC-70AF, U+70B3, U+70B8-70B9, U+70BC-70BD, U+70C1-70C3, U+70C8, U+70D8-70D9,
    U+70DB, U+70DF, U+70E4, U+70E6-70E7, U+70E9, U+70EB-70ED, U+70EF, U+70F7, U+70F9, U+70FD, U+7109-710A,
    U+7115, U+7119-711A, U+7126, U+7130, U+7136, U+714C, U+714E, U+715E, U+7164, U+7167, U+716E, U+717D,
    U+7184, U+718A, U+718F, U+7194, U+7199, U+719F, U+71AC, U+71C3, U+71CE, U+71D5, U+71E5, U+7206,
    U+722A, U+722C, U+7231, U+7235-7239, U+723D, U+7247-7248, U+724C, U+7259, U+725B, U+725F, U+7261-7262,
    U+7267, U+7269, U+7272, U+7275, U+7279-727A, U+7280-7281, U+728A, U+72AC, U+72AF, U+72B6, U+72B9,
    U+72C2, U+72C4, U+72C8, U+72D0, U+72D7, U+72D9, U+72DE, U+72E0-72E1, U+72EC-72EE, U+72F0-72F1, U+72F8,
    U+72FC, U+730E, U+7316, U+731B-731C, U+7329-732B, U+732E, U+7334, U+733E-733F, U+736D, U+7384, U+7387,
    U+7389, U+738B, U+7396, U+739B, U+73A9, U+73AB, U+73AF-73B0, U+73B2, U+73BB, U+73CA, U+73CD, U+73D0,
    U+73E0, U+73ED, U+7403, U+7405-7406, U+7409, U+7410, U+7422, U+7433-7436, U+743C, U+745A, U+745E-745F,
    U+7470, U+7476, U+7483, U+74DC, U+74E2-74E4, U+74E6, U+74EE, U+74F6-74F7, U+7504, U+7518, U+751A,
    U+751C, U+751F, U+7525, U+7528-7529, U+752B, U+752D, U+7530-7533, U+7535, U+7537-7538, U+753B, U+7545,
    U+754C, U+754F, U+7554, U+7559, U+755C, U+7565-7566, U+756A, U+7574, U+7578, U+7586, U+758F, U+7591,
    U+7597, U+7599-759A, U+759F, U+75A1, U+75A4-75A5, U+75AB, U+75AE-75AF, U+75B2, U+75B5, U+75B9,
    U+75BC-75BE, U+75C5, U+75C7-75CA, U+75D2, U+75D4-75D5, U+75D8, U+75DB, U+75DE, U+75E2, U+75EA, U+75F0,
    U+75F4, U+75F9, U+7601, U+761F, U+7624, U+7626, U+7629-762B, U+7634, U+7638, U+764C, U+7663, U+7678,
    U+767B, U+767D-767E, U+7682, U+7684, U+7686-7687, U+768B, U+7691, U+7696, U+76AE, U+76B1, U+76BF,
    U+76C2, U+76C5-76C6, U+76C8, U+76CA, U+76CE-76D2, U+76D4, U+76D6-76D8, U+76DB, U+76DF, U+76EE-76EF,
    U+76F2, U+76F4, U+76F8, U+76FC, U+76FE, U+7701, U+7709, U+770B, U+771F-7720, U+7728-7729, U+772F,
    U+7736-7737, U+773A, U+773C, U+7740-7741, U+775B, U+7761, U+7763, U+7766, U+776B-776C, U+7779,
    U+7784-7785, U+778E, U+7792, U+77A5, U+77A7, U+77A9-77AA, U+77AC, U+77B3, U+77BB, U+77D7, U+77DB,
    U+77E2-77E3, U+77E5, U+77E9, U+77EB, U+77ED-77EE, U+77F3, U+77FD-77FF, U+7801-7802, U+780C-780D,
    U+7812, U+7814, U+7816, U+781A, U+7827, U+7830, U+7834, U+7837-7838, U+783E, U+7840, U+7845, U+7852,
    U+7855, U+785D, U+786B-786C, U+786E, U+7877, U+787C, U+7889, U+788C-788E, U+7891, U+7897-7898, U+789F,
    U+78A7, U+78B0-78B1, U+78B3-78B4, U+78BE, U+78C1, U+78C5, U+78CA-78CB, U+78D0, U+78D5, U+78E8, U+78F7,
    U+78FA, U+7901, U+793A, U+793C, U+793E, U+7941, U+7948, U+7956, U+795D-795F, U+7965, U+7968, U+796D,
    U+7977-7978, U+7981, U+7984, U+798F, U+79B9, U+79BB, U+79BD-79BE, U+79C0-79C1, U+79C3, U+79C6, U+79C9,
    U+79CB, U+79CD, U+79D1-79D2, U+79D8, U+79DF, U+79E4, U+79E6-79E7, U+79E9, U+79EF-79F0, U+79F8, U+79FB,
    U+79FD, U+7A00, U+7A0B, U+7A0D-7A0E, U+7A17, U+7A1A, U+7A20, U+7A33, U+7A3B-7A3D, U+7A3F, U+7A46,
    U+7A57, U+7A74, U+7A76-7A77, U+7A7A, U+7A7F, U+7A81, U+7A83-7A84, U+7A8D, U+7A91-7A92, U+7A96-7A98,
    U+7A9C-7A9D, U+7A9F, U+7AA5, U+7ABF, U+7ACB, U+7AD6, U+7AD9, U+7ADE-7AE0, U+7AE3, U+7AE5, U+7AED,
    U+7AEF, U+7AF9, U+7AFF, U+7B06, U+7B0B, U+7B11, U+7B14, U+7B1B, U+7B26, U+7B28, U+7B2C, U+7B3A,
    U+7B3C, U+7B49, U+7B4B, U+7B4F-7B52, U+7B54, U+7B56, U+7B5B, U+7B77, U+7B79, U+7B7E, U+7B80, U+7B8D,
    U+7B94-7B95, U+7B97, U+7BA1, U+7BA9, U+7BAD, U+7BB1, U+7BC6-7BC7, U+7BD3, U+7BD9, U+7BE1, U+7BEE,
    U+7BF1, U+7BF7, U+7C07, U+7C27, U+7C3F, U+7C4D, U+7C73, U+7C7B, U+7C7D, U+7C89, U+7C92, U+7C95,
    U+7C97-7C98, U+7C9F, U+7CA4-7CA5, U+7CAA, U+7CAE, U+7CB1, U+7CB3, U+7CB9, U+7CBE, U+7CCA, U+7CD5-7CD6,
    U+7CD9, U+7CDC, U+7CDF-7CE0, U+7CEF, U+7CFB, U+7D0A, U+7D20, U+7D22, U+7D27, U+7D2B, U+7D2F, U+7D6E,
    U+7E41, U+7E82, U+7EA0, U+7EA2, U+7EA4, U+7EA6-7EA7, U+7EAA-7EAC, U+7EAF, U+7EB1-7EB3, U+7EB5-7EBA,
    U+7EBD, U+7EBF, U+7EC3-7EC8, U+7ECA, U+7ECD-7ECF, U+7ED1-7ED3, U+7ED5, U+7ED8-7EDA, U+7EDC-7EDF,
    U+7EE2-7EE3, U+7EE5-7EE7, U+7EE9-7EEA, U+7EED, U+7EF0, U+7EF3-7EF5, U+7EF7-7EF8, U+7EFC-7EFD,
    U+7EFF-7F00, U+7F04-7F06, U+7F09, U+7F0E, U+7F13-7F16, U+7F18, U+7F1A, U+7F1D, U+7F20, U+7F28-7F29,
    U+7F2E, U+7F34, U+7F38, U+7F3A, U+7F50-7F51, U+7F55, U+7F57, U+7F5A, U+7F62, U+7F69-7F6A, U+7F6E,
    U+7F72, U+7F8A, U+7F8C, U+7F8E, U+7F94, U+7F9A, U+7F9E, U+7FA1, U+7FA4, U+7FB9, U+7FBD, U+7FC1,
    U+7FC5, U+7FCC, U+7FD4, U+7FD8, U+7FDF-7FE0, U+7FF0-7FF1, U+7FFB-7FFC, U+8000-8001, U+8003, U+8005,
    U+800C-800D, U+8010, U+8015, U+8017-8019, U+802A, U+8033, U+8036, U+8038, U+803B, U+803D, U+803F,
    U+8042, U+804A-804C, U+8054, U+8058, U+805A, U+806A, U+8083-8084, U+8086-8087, U+8089, U+808B-808C,
    U+8096, U+8098, U+809A-809B, U+809D, U+80A0-80A2, U+80A4-80A5, U+80A9-80AA, U+80AE-80AF, U+80B2,
    U+80BA, U+80BE-80C1, U+80C3, U+80C6, U+80CC, U+80CE, U+80D6, U+80DA, U+80DC, U+80DE, U+80E1,
    U+80EF-80F0, U+80F3, U+80F6, U+80F8, U+80FA, U+80FD, U+8102, U+8106, U+8109-810A, U+810F-8111, U+8113,
    U+8116, U+811A, U+812F, U+8131, U+8138, U+813E, U+8146, U+814A-814B, U+8150-8151, U+8154-8155, U+8165,
    U+816E, U+8170, U+8179-817B, U+817E-8180, U+818A, U+818F, U+8198, U+819B-819D, U+81A8, U+81B3, U+81C0,
    U+81C2-81C3, U+81C6, U+81E3, U+81EA, U+81ED, U+81F3-81F4, U+81FB-81FC, U+8200, U+8205-8206,
    U+820C-820D, U+8212, U+8214, U+821C, U+821E-821F, U+822A, U+822C, U+8230-8231, U+8235-8237, U+8239,
    U+8247, U+8258, U+826F-8270, U+8272-8273, U+827A, U+827E, U+8282, U+828B, U+828D, U+8292, U+829C-829D,
    U+82A5-82A6, U+82AC-82AD, U+82AF, U+82B1, U+82B3, U+82B9, U+82BD, U+82C7, U+82CD, U+82CF, U+82D1,
    U+82D4, U+82D7, U+82DB, U+82DE-82DF, U+82E5-82E6, U+82EB, U+82EF, U+82F1, U+82F9, U+8301-8305, U+830E,
    U+8327-8328, U+832B-832C, U+8335-8336, U+8338-8339, U+8346, U+8349, U+8350, U+8352, U+8354, U+835A,
    U+8361, U+8363-8364, U+8367, U+836B, U+836F, U+8377, U+8386, U+8389, U+838E, U+83AB, U+83B1-83B2,
    U+83B7, U+83B9, U+83BD, U+83C7, U+83CA, U+83CC, U+83CF, U+83DC, U+83E0, U+83E9, U+83F1-83F2, U+8404,
    U+840C-840E, U+841D, U+8424-8425, U+8427-8428, U+843D, U+8457, U+845B, U+8461, U+8463, U+846B-846C,
    U+8471, U+8475, U+8482, U+848B, U+8499, U+849C, U+84B2, U+84B8, U+84C4, U+84C9, U+84D1, U+84D6,
    U+84DD, U+84DF, U+84EC, U+8511, U+8513, U+8517, U+851A, U+8521, U+852B-852C, U+8537, U+853C-853D,
    U+8549-854A, U+8574, U+857E, U+8584, U+859B, U+85AA, U+85AF, U+85C9, U+85CF-85D0, U+85D5, U+85E4,
    U+85E9, U+85FB, U+8611, U+8638, U+864E-8651, U+865A, U+865E, U+866B, U+8671, U+8679, U+867D-867E,
    U+8680-8682, U+868A, U+868C, U+8695, U+869C, U+86A4, U+86C0, U+86C6-86C7, U+86CA-86CB, U+86D4, U+86D9,
    U+86DB, U+86E4, U+86EE, U+86F0, U+86F9, U+86FE, U+8700, U+8702, U+8712, U+8715, U+8717-8718, U+871C,
    U+8721, U+8747, U+8749, U+874E, U+8757, U+8774, U+8776, U+878D, U+879F, U+87BA, U+87F9, U+8815,
    U+8822, U+8840, U+8845, U+884C-884D, U+8854, U+8857, U+8859, U+8861, U+8863, U+8865, U+8868,
    U+886B-886C, U+8870, U+8877, U+8881, U+8884, U+888B, U+888D, U+8892, U+8896, U+889C, U+88AB, U+88AD,
    U+88B1, U+88C1-88C2, U+88C5, U+88D4-88D5, U+88D9, U+88E4, U+88F3-88F4, U+88F8-88F9, U+8902, U+8910,
    U+8912, U+8925, U+892A, U+8944, U+895F, U+897F, U+8981, U+8986, U+89C1-89C2, U+89C4-89C6, U+89C8-89C9,
    U+89D2, U+89E3, U+89E6, U+8A00, U+8A79, U+8A89-8A8A, U+8A93, U+8B66, U+8B6C, U+8BA1-8BA5, U+8BA8-8BA9,
    U+8BAB, U+8BAD-8BB0, U+8BB2-8BB3, U+8BB6, U+8BB8-8BBA, U+8BBC-8BC1, U+8BC4-8BC6, U+8BC8-8BCA,
    U+8BCC-8BCD, U+8BD1, U+8BD5, U+8BD7, U+8BDA-8BDB, U+8BDD-8BDE, U+8BE1-8BE3, U+8BE5-8BE7, U+8BEB-8BED,
    U+8BEF, U+8BF1-8BF2, U+8BF4-8BF5, U+8BF7-8BF8, U+8BFA-8BFB, U+8BFD-8BFE, U+8C01, U+8C03, U+8C05-8C06,
    U+8C08, U+8C0A-8C0B, U+8C0D-8C0E, U+8C10, U+8C13, U+8C17, U+8C1A, U+8C1C, U+8C22-8C24, U+8C26,
    U+8C28-8C29, U+8C2C-8C2D, U+8C30-8C31, U+8C34, U+8C37, U+8C41, U+8C46, U+8C4C, U+8C61-8C62,
    U+8C6A-8C6B, U+8C79-8C7A, U+8C89, U+8C8C, U+8D1D-8D1F, U+8D21-8D31, U+8D34-8D35, U+8D37-8D3A, U+8D3C,
    U+8D3E-8D3F, U+8D41-8D44, U+8D4A-8D4C, U+8D4E-8D50, U+8D54, U+8D56, U+8D58, U+8D5A-8D5B, U+8D5E,
    U+8D60-8D64, U+8D66, U+8D6B, U+8D70, U+8D74-8D77, U+8D81, U+8D85, U+8D8A-8D8B, U+8D9F, U+8DA3,
    U+8DB3-8DB4, U+8DBE, U+8DC3, U+8DCB-8DCC, U+8DD1, U+8DDD, U+8DDF, U+8DE8, U+8DEA, U+8DEF, U+8DF3,
    U+8DF5, U+8DFA, U+8E0A, U+8E0C, U+8E0F, U+8E1E, U+8E22, U+8E29-8E2A, U+8E44, U+8E48, U+8E4B, U+8E66,
    U+8E6C-8E6D, U+8E72, U+8E7F, U+8E81, U+8E87, U+8EAB-8EAC, U+8EAF, U+8EB2, U+8EBA, U+8F66-8F69, U+8F6C,
    U+8F6E-8F70, U+8F74, U+8F7B, U+8F7D, U+8F7F, U+8F83, U+8F85-8F86, U+8F88-8F8A, U+8F90-8F91, U+8F93,
    U+8F95-8F97, U+8F99, U+8F9B-8F9C, U+8F9E-8F9F, U+8FA3, U+8FA8-8FA9, U+8FAB, U+8FB0-8FB1, U+8FB9,
    U+8FBD-8FBE, U+8FC1-8FC2, U+8FC4-8FC5, U+8FC7-8FC8, U+8FCE, U+8FD0-8FD1, U+8FD4, U+8FD8-8FD9,
    U+8FDB-8FDF, U+8FE2, U+8FEA-8FEB, U+8FED, U+8FF0, U+8FF7-8FF9, U+8FFD, U+9000-9003, U+9006,
    U+9009-900A, U+900F-9010, U+9012, U+9014, U+9017, U+901A-901B, U+901D-9020, U+9022, U+902E, U+9038,
    U+903B-903C, U+903E, U+9041-9042, U+9047, U+904D, U+904F, U+9053, U+9057, U+9063, U+9065, U+906D-906E,
    U+9075, U+907F-9080, U+9091, U+9093, U+90A2-90A3, U+90A6, U+90AA, U+90AE-90AF, U+90B1, U+90B5, U+90B9,
    U+90BB, U+90C1, U+90CA, U+90CE, U+90D1, U+90DD, U+90E1, U+90E7-90E8, U+90ED, U+90F4, U+90F8, U+90FD,
    U+9102, U+9119, U+9149, U+914B-914D, U+9152, U+9157, U+915A, U+915D-915E, U+9163, U+9165, U+916A,
    U+916C, U+916E, U+9171, U+9175-9178, U+917F, U+9187, U+9189, U+918B, U+9192, U+919A-919B, U+91C7,
    U+91C9-91CA, U+91CC-91CF, U+91D1, U+91DC, U+9274, U+9488-9489, U+948E, U+9492-9493, U+9499,
    U+949D-94A2, U+94A5-94A9, U+94AE, U+94B1, U+94B3, U+94B5, U+94BB, U+94BE, U+94C0-94C3, U+94C5-94C6,
    U+94DC-94DD, U+94E1, U+94E3, U+94EC-94ED, U+94F0-94F2, U+94F6, U+94F8, U+94FA, U+94FE, U+9500-9501,
    U+9504-9505, U+9508, U+950B-950C, U+9510-9511, U+9517, U+9519-951A, U+9521, U+9523-9526, U+9528,
    U+952D-9530, U+9539, U+953B, U+9540-9541, U+9547, U+954A, U+954D, U+9550-9551, U+955C, U+9563, U+956D,
    U+9570, U+9576, U+957F, U+95E8, U+95EA, U+95ED-95F0, U+95F2, U+95F4, U+95F7-95FB, U+95FD, U+9600-9602,
    U+9605, U+9609, U+960E, U+9610-9611, U+9614, U+961C, U+961F, U+962E, U+9632-9636, U+963B, U+963F-9640,
    U+9644-9648, U+964B-964D, U+9650, U+9655, U+965B, U+9661-9662, U+9664, U+9668-966A, U+9675-9677,
    U+9685-9686, U+968B, U+968F-9690, U+9694, U+9698-9699, U+969C, U+96A7, U+96B6, U+96BE, U+96C0-96C1,
    U+96C4-96C7, U+96CC-96CD, U+96CF, U+96D5, U+96E8, U+96EA, U+96F6-96F7, U+96F9, U+96FE, U+9700, U+9704,
    U+9707, U+9709, U+970D, U+9713, U+9716, U+971C, U+971E, U+9732, U+9738-9739, U+9752, U+9756, U+9759,
    U+975B, U+975E, U+9760-9762, U+9769, U+9773-9774, U+9776, U+978B, U+978D, U+9798, U+97A0, U+97AD,
    U+97E6-97E7, U+97E9, U+97ED, U+97F3, U+97F5-97F6, U+9875-9877, U+9879-987B, U+987D-987F, U+9881-9882,
    U+9884-9888, U+988A, U+9890-9891, U+9893, U+9896-9898, U+989C-989D, U+98A0, U+98A4, U+98A7, U+98CE,
    U+98D8, U+98DE-98DF, U+9910, U+9965, U+996D-9972, U+9975-9976, U+997A, U+997C, U+997F, U+9981,
    U+9985-9986, U+9988, U+998B, U+998F, U+9992, U+9996, U+9999, U+9A6C-9A71, U+9A73-9A74, U+9A76, U+9A79,
    U+9A7B-9A7C, U+9A7E, U+9A82, U+9A84, U+9A86-9A87, U+9A8B-9A8C, U+9A8F, U+9A91, U+9A97, U+9A9A, U+9AA1,
    U+9AA4, U+9AA8, U+9AB8, U+9AD3, U+9AD8, U+9B03, U+9B3C, U+9B41-9B42, U+9B44, U+9B4F, U+9B54, U+9C7C,
    U+9C81, U+9C8D, U+9C9C, U+9CA4, U+9CB8, U+9CC3, U+9CD6, U+9CDE, U+9E1F, U+9E21, U+9E23, U+9E25-9E26,
    U+9E2D, U+9E2F, U+9E33, U+9E35, U+9E3D, U+9E3F, U+9E43, U+9E45, U+9E4A, U+9E4F, U+9E64, U+9E70,
    U+9E7F, U+9E93, U+9EA6, U+9EBB, U+9EC4, U+9ECD-9ECE, U+9ED1, U+9ED4, U+9ED8, U+9F0E, U+9F13, U+9F20,
    U+9F3B, U+9F50, U+9F7F, U+9F84, U+9F8B, U+9F99-9F9A, U+9F9F, U+FF01-FF60;
}

@font-face {
  font-family: "WheelMaker Noto Sans SC";
  src: url(font.1856ba3678b6bd8261fb.woff2) format("woff2");
  font-style: normal;
  font-weight: 350 700;
  font-display: swap;
  unicode-range: U+4E0C, U+4E10, U+4E15, U+4E1E, U+4E28, U+4E2C, U+4E36, U+4E3F, U+4E47, U+4E5C, U+4E69,
    U+4E8D, U+4E93, U+4E98, U+4E9F-4EA0, U+4EB3, U+4EB5, U+4EBB, U+4EC2-4EC4, U+4EC9, U+4EDD-4EDE, U+4EE1,
    U+4EE8, U+4EEB, U+4EF3, U+4EF5, U+4F09, U+4F1B, U+4F22, U+4F25, U+4F27, U+4F2B, U+4F32, U+4F3D,
    U+4F57-4F58, U+4F5A, U+4F5D-4F5F, U+4F64-4F65, U+4F67, U+4F74, U+4F76, U+4F7B-4F7C, U+4F7E, U+4F83,
    U+4F89, U+4F8F, U+4F91, U+4F94, U+4FAA, U+4FAC, U+4FC5, U+4FCE, U+4FD1, U+4FDA, U+4FDC, U+4FDF,
    U+4FE3, U+4FE6, U+4FE8, U+4FEA, U+4FF3, U+4FF8, U+4FFE, U+500C, U+500F, U+501C, U+5025, U+5028-5029,
    U+502C-502E, U+5043, U+5048, U+504C, U+504E, U+5055, U+506C, U+507B, U+507E, U+50A5, U+50A7, U+50A9,
    U+50BA, U+50D6, U+50E6, U+50EC-50EE, U+5106-5107, U+510B, U+5140, U+5155-5156, U+516E, U+5181-5182,
    U+5196, U+51A2, U+51A5, U+51AB, U+51B1, U+51BC-51BD, U+51C7, U+51EB, U+51F5, U+51FC, U+5202, U+5208,
    U+520D-520E, U+5216, U+522D, U+5233, U+523F-5240, U+524C, U+525C, U+525E, U+5261, U+527D, U+5281-5282,
    U+5290, U+5293, U+52A2, U+52AC-52AD, U+52BE, U+52D0, U+52D6, U+52F0, U+52F9, U+530D, U+530F-5310,
    U+5315, U+531A, U+5326, U+532E, U+533E, U+5345, U+535F, U+5363, U+5366, U+5369, U+536E, U+537A,
    U+538D, U+539D, U+53A3, U+53A5, U+53AE, U+53B6, U+53DF, U+53E8-53E9, U+53F1, U+53F5, U+53FB, U+53FD,
    U+5406, U+5412, U+5416, U+5421, U+5423, U+5432, U+5443, U+544B, U+5452-5454, U+5456-5457, U+5459,
    U+5464, U+5466, U+5471-5472, U+5476-5477, U+5482, U+5484, U+5494, U+549A-549B, U+549D, U+54A3-54A4,
    U+54A6-54A7, U+54A9-54AB, U+54AD, U+54B4, U+54BB, U+54BF, U+54C2, U+54CC, U+54CF-54D0, U+54D2-54D5,
    U+54D9-54DA, U+54DC-54DE, U+54E7, U+54F3, U+54FD, U+54FF, U+550F, U+5511, U+5514, U+551B, U+5520,
    U+5522-5523, U+5527, U+552A, U+5530, U+5533, U+5537, U+553C, U+553F, U+5541, U+5549, U+5550,
    U+5555-5556, U+555C, U+5567, U+556C-556D, U+5575-5577, U+557B, U+557E, U+5581, U+5583, U+5588, U+558B,
    U+558F, U+5591, U+5594, U+5599, U+559F, U+55B1, U+55B5, U+55B9, U+55BD-55BE, U+55C4, U+55C9,
    U+55CC-55CD, U+55D1-55D2, U+55D4, U+55D6, U+55DD, U+55DF, U+55E4-55E6, U+55E8, U+55EA-55EC, U+55EF,
    U+55F2-55F3, U+55F5, U+55F7, U+55FE, U+5600-5601, U+5608, U+560C, U+560F, U+561E-561F, U+5623-5624,
    U+5627, U+562C-562D, U+5639, U+564C-564D, U+5654, U+5657-5659, U+565C, U+5662, U+5664, U+5669, U+566B,
    U+5671, U+567B-567C, U+5685-5686, U+5693, U+56AF, U+56D4, U+56D7, U+56DD, U+56DF, U+56E1, U+56EB,
    U+56F5, U+56F9, U+56FF, U+5704, U+5709-570A, U+571C, U+5729-572A, U+572C, U+572E-572F, U+5733, U+5739,
    U+573B, U+5742, U+574C, U+575C, U+5768-5769, U+576B, U+576D, U+5773, U+5776, U+577B-577C, U+5785-5786,
    U+578C, U+5793, U+57A0-57A1, U+57A4, U+57A7, U+57A9, U+57AD, U+57B2, U+57B4, U+57B8, U+57CF, U+57D2,
    U+57D5, U+57D8-57DA, U+57DD, U+57E4, U+57ED, U+57EF, U+57F4, U+57F8, U+57FD, U+5800, U+5807, U+580B,
    U+580D, U+5819, U+581E, U+5820, U+5844, U+584D, U+5865, U+586C, U+587E, U+5880-5881, U+5889, U+589A,
    U+58BC, U+58C5, U+58D1, U+5902, U+5914, U+5919, U+5924-5925, U+592D, U+593C, U+5941-5942, U+5955,
    U+5958, U+595A, U+5981, U+5983, U+598D, U+5997, U+599E, U+59A3-59A4, U+59A9-59AB, U+59AF, U+59B2,
    U+59BE, U+59CA, U+59D2, U+59D7-59D8, U+59DD, U+59E3, U+59F9, U+5A05-5A06, U+5A08-5A09, U+5A0C, U+5A11,
    U+5A13, U+5A23, U+5A32, U+5A34, U+5A3C, U+5A40, U+5A4A, U+5A55, U+5A62, U+5A67, U+5A75, U+5A77,
    U+5A7A, U+5A9B, U+5AAA, U+5AB2, U+5AB5, U+5AB8, U+5ABE, U+5AD2, U+5AD4, U+5AD6, U+5AD8, U+5ADC,
    U+5AE0, U+5AE3, U+5AE6, U+5AEB, U+5AF1, U+5B09, U+5B16-5B17, U+5B32, U+5B34, U+5B37, U+5B40, U+5B51,
    U+5B53, U+5B5A-5B5B, U+5B62, U+5B65, U+5B6C, U+5B71, U+5B73, U+5B80, U+5B84, U+5B93, U+5B95, U+5BA5,
    U+5BB8, U+5BE4, U+5BEE, U+5BF0, U+5C15, U+5C1C, U+5C22, U+5C25, U+5C2C, U+5C34, U+5C3B, U+5C50,
    U+5C59, U+5C63, U+5C66, U+5C6E, U+5C7A, U+5C88, U+5C8C-5C8D, U+5C90-5C91, U+5C96, U+5C98-5C9A, U+5C9C,
    U+5CA2-5CA3, U+5CAB-5CAC, U+5CB1, U+5CB5, U+5CB7, U+5CBD, U+5CC1, U+5CC4, U+5CCB, U+5CD2, U+5CE4-5CE5,
    U+5D02-5D03, U+5D06, U+5D1B, U+5D1E, U+5D24, U+5D26-5D27, U+5D2E, U+5D34, U+5D3D-5D3E, U+5D47,
    U+5D4A-5D4B, U+5D58, U+5D5B, U+5D5D, U+5D69, U+5D6B-5D6C, U+5D6F, U+5D74, U+5D82, U+5D99, U+5D9D,
    U+5DB7, U+5DC5, U+5DDB, U+5DEF, U+5DFD, U+5E0F, U+5E11, U+5E14, U+5E19, U+5E31, U+5E37, U+5E3B-5E3C,
    U+5E44, U+5E54, U+5E5B, U+5E5E, U+5E61, U+5E7A, U+5E80, U+5E8B, U+5E91, U+5E96, U+5EA0, U+5EA5,
    U+5EB3, U+5EB5, U+5EB9, U+5EBE, U+5ED1-5ED2, U+5EDB, U+5EE8, U+5EEA, U+5EF4, U+5EFE-5EFF, U+5F01,
    U+5F08, U+5F0B, U+5F11, U+5F29-5F2A, U+5F2D, U+5F3C, U+5F40, U+5F50, U+5F56-5F58, U+5F61, U+5F73,
    U+5F77, U+5F82, U+5F87, U+5F89, U+5F8C, U+5F95, U+5F99, U+5F9C, U+5FA8, U+5FAD, U+5FB5, U+5FBC,
    U+5FC4, U+5FC9, U+5FCF-5FD2, U+5FD6, U+5FDD, U+5FE1, U+5FE4, U+5FEA, U+5FED-5FEE, U+5FF8, U+5FFE,
    U+6003-6006, U+600A, U+600D, U+600F, U+6019, U+601B, U+6021, U+6026, U+6029, U+602B, U+6035, U+603C,
    U+603F, U+6041-6042, U+6059-605A, U+605D, U+6063, U+6067, U+606A, U+6078-607B, U+607D, U+6083, U+608C,
    U+6092, U+6096, U+609A-609B, U+609D, U+60AB, U+60AD, U+60B1, U+60B4, U+60BB, U+60C6, U+60D8, U+60DA,
    U+60DD, U+60EC, U+60F4, U+6100, U+6106, U+610D-610E, U+6115, U+6120, U+6123, U+6126, U+612B, U+614A,
    U+615D, U+6175, U+6194, U+619D, U+61A7, U+61A9, U+61AC, U+61B7, U+61CB, U+61D1, U+61D4, U+61F5,
    U+61FF, U+6206, U+620B, U+6215, U+6217, U+621B, U+621F, U+6221-6222, U+6224-6225, U+622C, U+623D-623E,
    U+6243, U+6248-6249, U+624C, U+626A, U+629F, U+62BB, U+62CA, U+62D7, U+62DA, U+62EE, U+62F6, U+6308,
    U+6322, U+6332, U+6339, U+6343, U+634B, U+6369, U+636D, U+6371, U+637A, U+638A, U+638E, U+63AC-63AE,
    U+63B0, U+63B4, U+63BC, U+63BE, U+63C4, U+63C6, U+63CE, U+63DE, U+63E0, U+63F2, U+63F6, U+63F8,
    U+63FF, U+640B-640C, U+641B, U+6420-6421, U+6426, U+6434, U+643F, U+6441, U+6445, U+6452, U+645E,
    U+646D, U+647A, U+6484, U+6496, U+6499, U+64B7-64B8, U+64BA, U+64C0, U+64D0, U+64D7-64D8, U+64E2,
    U+64E4, U+6509, U+6525, U+652E, U+6534-6535, U+6538, U+6549, U+6555, U+656B, U+6590, U+6593, U+659B,
    U+65AB, U+65BC, U+65C3-65C4, U+65C6, U+65CC, U+65CE, U+65D2, U+65D6, U+65EE-65F0, U+6600, U+6603,
    U+660A, U+6615, U+6619, U+661D, U+6631, U+6634-6636, U+6641, U+664F, U+6654, U+6656-6657, U+665F,
    U+6661, U+6677, U+6684, U+668C, U+669D, U+66A7-66A8, U+66B9, U+66BE, U+66DB-66DC, U+66E6, U+66E9,
    U+66F7, U+670A, U+6710, U+6715, U+6726, U+6748, U+674C, U+6753, U+675E, U+6769-676A, U+6772-6773,
    U+6775, U+6777, U+677C, U+6787, U+678B, U+6798, U+679E, U+67A5, U+67A7-67A8, U+67AD, U+67B0, U+67B3,
    U+67B5, U+67B8, U+67C1, U+67C3, U+67D8-67DA, U+67DD, U+67E2, U+67E9, U+67F0, U+67FD, U+6800,
    U+6809-680A, U+680C, U+680E, U+681D, U+6829, U+6832-6833, U+683E, U+6840-6841, U+6844, U+6849-684A,
    U+684E, U+6855, U+6860-6862, U+6864, U+6866-6867, U+686B, U+6874, U+6877, U+6883, U+688F, U+6893,
    U+68B5, U+68C2, U+68E3, U+68F0, U+68F9, U+68FC, U+6901, U+690B, U+6910, U+691F-6920, U+6924, U+6934,
    U+6939, U+6942, U+6957, U+695D, U+6960, U+6963, U+6966, U+696B, U+696E, U+6971, U+6978-6979, U+6980,
    U+6984, U+6987-6989, U+698D, U+6995, U+6998, U+699B, U+69A7, U+69AB, U+69AD, U+69B1, U+69BB, U+69C1,
    U+69CA, U+69CC, U+69CE, U+69D4, U+69DF-69E0, U+69ED, U+69F2, U+69FF, U+6A17-6A18, U+6A28, U+6A2F,
    U+6A35, U+6A3D-6A3E, U+6A44, U+6A50, U+6A58, U+6A5B, U+6A65, U+6A79, U+6A7C, U+6A8E, U+6A90-6A91,
    U+6A97, U+6AA0, U+6AA9, U+6AAB, U+6B24, U+6B37, U+6B39, U+6B43, U+6B46, U+6B59, U+6B81-6B82, U+6B84,
    U+6B87, U+6B8D, U+6B92-6B93, U+6B9A-6B9B, U+6BA1, U+6BAA, U+6BB3, U+6BC2, U+6BD3, U+6BEA, U+6BF3,
    U+6BF5, U+6BF9, U+6BFD, U+6C05-6C07, U+6C0D, U+6C10, U+6C15, U+6C18-6C1A, U+6C21, U+6C24, U+6C29-6C2A,
    U+6C32, U+6C35, U+6C3D, U+6C46, U+6C4A, U+6C54, U+6C5C, U+6C68-6C69, U+6C74, U+6C76, U+6C85-6C86,
    U+6C8C, U+6C90, U+6C93-6C94, U+6CA3, U+6CA9, U+6CAD, U+6CB1-6CB2, U+6CD0, U+6CD3-6CD4, U+6CD6-6CD7,
    U+6CE0, U+6CEB, U+6CEE-6CEF, U+6CF1, U+6CF6-6CF8, U+6CFA, U+6CFE, U+6D04, U+6D07, U+6D0C, U+6D0E,
    U+6D19-6D1A, U+6D27, U+6D2B, U+6D2E, U+6D33, U+6D35, U+6D39, U+6D43, U+6D48, U+6D4D, U+6D4F, U+6D52,
    U+6D54, U+6D5C, U+6D5E, U+6D60, U+6D63, U+6D6F, U+6D7C, U+6D91, U+6D93-6D94, U+6D9E, U+6DA0, U+6DAB,
    U+6DAE, U+6DBF, U+6DC5, U+6DC7, U+6DD9, U+6DDD-6DDE, U+6DE0, U+6DE6, U+6DFC, U+6E0C, U+6E0E, U+6E11,
    U+6E16, U+6E1A, U+6E25, U+6E2B, U+6E32, U+6E44, U+6E4E, U+6E53-6E54, U+6E5F, U+6E6B, U+6E6E, U+6E86,
    U+6E8F, U+6E98, U+6E9F, U+6EA5, U+6EA7, U+6EB1-6EB2, U+6EB4, U+6EB7, U+6EBB, U+6EBD, U+6EC2, U+6ECF,
    U+6ED5, U+6ED7, U+6EDF-6EE0, U+6EE2, U+6EF9, U+6F09, U+6F15, U+6F24, U+6F29-6F2A, U+6F2D, U+6F2F,
    U+6F36, U+6F46-6F47, U+6F4B, U+6F62, U+6F72, U+6F74, U+6F78, U+6F7A, U+6F7C, U+6F89, U+6F8C-6F8D,
    U+6FA7, U+6FB6, U+6FB9, U+6FC2, U+6FC9, U+6FD1, U+6FDE, U+6FE0-6FE1, U+6FEE-6FEF, U+701A-701B, U+7023,
    U+7035, U+7039, U+704F, U+705E, U+706C, U+7080, U+7085, U+7096, U+709C-709D, U+70AB, U+70B1, U+70B7,
    U+70BB, U+70C0, U+70CA, U+70E8, U+7110, U+7113, U+7116, U+7118, U+712F, U+7131, U+7145, U+714A,
    U+715C, U+7166, U+7168, U+7172-7173, U+7178, U+717A, U+7198, U+71A0, U+71A8, U+71B3, U+71B5, U+71B9,
    U+71D4, U+71E0, U+71E7, U+71EE, U+71F9, U+721D, U+7228, U+7230, U+723B, U+723F, U+724D, U+7252,
    U+7256, U+725D, U+7266, U+726E-726F, U+727E-727F, U+7284, U+728B, U+728D, U+728F, U+7292, U+729F,
    U+72AD, U+72B0, U+72B4, U+72B7-72B8, U+72C1, U+72C3, U+72CD-72CE, U+72D2, U+72E8-72E9, U+72EF,
    U+72F2-72F4, U+72F7, U+72FA-72FB, U+7301, U+7303, U+730A, U+7313, U+7315, U+7317, U+731D-731E,
    U+7321-7322, U+7325, U+732C, U+7331, U+7337-7339, U+734D, U+7350, U+7352, U+7357, U+7360, U+736C,
    U+736F, U+737E, U+738E, U+7391, U+739F, U+73A2, U+73AE, U+73B3, U+73B7, U+73BA, U+73C0, U+73C2,
    U+73C8-73C9, U+73CF, U+73D1, U+73D9, U+73DE, U+73E5, U+73E7, U+73E9, U+73F2, U+740A, U+740F,
    U+741A-741B, U+7425-7426, U+7428, U+742A, U+742C, U+742E, U+7430, U+7441, U+7455, U+7457, U+7459,
    U+745B-745C, U+746D, U+7477, U+747E, U+7480-7481, U+7487, U+748B, U+748E, U+7490, U+749C, U+749E,
    U+74A7-74A9, U+74BA, U+74D2, U+74DE, U+74E0, U+74EF, U+74F4, U+74FF, U+750D, U+750F, U+7511, U+7513,
    U+7519, U+752C, U+752F, U+753A, U+753E, U+7540, U+7548, U+754B, U+754E, U+755A-755B, U+7572, U+7579,
    U+757F, U+7583, U+758B, U+7592, U+7594, U+7596, U+759D, U+75A0, U+75A3, U+75AC, U+75B0-75B1,
    U+75B3-75B4, U+75B8, U+75C2-75C4, U+75CD, U+75D6, U+75E3-75E4, U+75E6-75E8, U+75EB, U+75F1, U+75FC,
    U+75FF-7600, U+7603, U+7605, U+760A, U+760C, U+7610, U+7615, U+7617-7619, U+761B, U+7620, U+7622,
    U+7625, U+762D, U+7630, U+7633, U+7635, U+763C, U+763E-7640, U+7643, U+764D, U+7654, U+7656, U+765C,
    U+765E, U+766B, U+766F, U+7688, U+768E, U+7693, U+7699, U+76A4, U+76B2, U+76B4, U+76CD, U+76E5,
    U+76F1, U+76F9, U+7704, U+7707-7708, U+770D, U+7719-771A, U+7722, U+7726, U+772D, U+7735, U+7738,
    U+7743, U+7747, U+7750-7751, U+775A, U+7762, U+7765, U+7768, U+777D-7780, U+778C-778D, U+7791,
    U+779F-77A0, U+77A2, U+77B0, U+77B5, U+77BD, U+77BF, U+77CD, U+77DC, U+77E7, U+77EC, U+77F6, U+77F8,
    U+7800, U+7809, U+7811, U+7817-7818, U+781C-781D, U+781F, U+7823, U+7825-7826, U+7829, U+782C-782D,
    U+7839-783C, U+7847, U+784C, U+784E, U+7850, U+7856-7857, U+786A, U+786D, U+7887, U+7893, U+789A-789C,
    U+78A1, U+78A3, U+78A5, U+78B2, U+78B9, U+78C9, U+78D4, U+78D9, U+78EC, U+78F2, U+78F4, U+7905,
    U+7913, U+791E, U+7924, U+7934, U+793B, U+7940, U+7946, U+7949, U+7953, U+7957, U+795A-795C, U+7960,
    U+7962, U+7967, U+796F, U+797A, U+7980, U+7985, U+798A, U+799A, U+79A7, U+79B3, U+79BA, U+79D5,
    U+79E3, U+79EB, U+79ED, U+7A02-7A03, U+7A06, U+7A14, U+7A1E, U+7A23, U+7A37, U+7A39, U+7A51, U+7A70,
    U+7A78-7A79, U+7A80, U+7A86, U+7A88, U+7A95, U+7AA0, U+7AA6, U+7AA8, U+7AAC-7AAD, U+7AB3, U+7AE6,
    U+7AFA, U+7AFD, U+7B03-7B04, U+7B08, U+7B0A, U+7B0F, U+7B15, U+7B19, U+7B1E, U+7B20, U+7B24-7B25,
    U+7B2A-7B2B, U+7B2E, U+7B31, U+7B33, U+7B38, U+7B3E, U+7B45, U+7B47, U+7B4C, U+7B58, U+7B5A, U+7B5D,
    U+7B60, U+7B62, U+7B6E, U+7B71-7B72, U+7B75, U+7B7B, U+7B85, U+7B90, U+7B9C-7B9D, U+7BA2, U+7BA6-7BA8,
    U+7BAA-7BAC, U+7BB4, U+7BB8, U+7BC1, U+7BCC, U+7BD1, U+7BDA, U+7BDD, U+7BE5-7BE6, U+7BEA, U+7BFC,
    U+7BFE, U+7C0B-7C0C, U+7C0F, U+7C16, U+7C1F, U+7C26, U+7C2A, U+7C38, U+7C40-7C41, U+7C74, U+7C7C,
    U+7C91, U+7C9C-7C9E, U+7CA2, U+7CB2, U+7CBC-7CBD, U+7CC1, U+7CC5, U+7CC7-7CC8, U+7CCC-7CCD, U+7CD7,
    U+7CE8, U+7CF8, U+7D77, U+7DA6, U+7DAE, U+7E3B, U+7E47, U+7E9B, U+7E9F, U+7EA1, U+7EA3, U+7EA5,
    U+7EA8-7EA9, U+7EAD, U+7EB0, U+7EBE, U+7EC0-7EC2, U+7EC9, U+7ECB-7ECC, U+7ED0, U+7ED4, U+7ED7, U+7EDB,
    U+7EE0-7EE1, U+7EE8, U+7EEB, U+7EEE-7EEF, U+7EF1-7EF2, U+7EF6, U+7EFA-7EFB, U+7EFE, U+7F01-7F03,
    U+7F07-7F08, U+7F0B-7F0D, U+7F0F, U+7F11-7F12, U+7F17, U+7F19, U+7F1B-7F1C, U+7F1F, U+7F21-7F27,
    U+7F2A-7F2D, U+7F2F-7F33, U+7F35-7F36, U+7F42, U+7F44-7F45, U+7F54, U+7F58, U+7F5F, U+7F61, U+7F68,
    U+7F71, U+7F74, U+7F79, U+7F7E, U+7F81, U+7F9D, U+7F9F, U+7FA7, U+7FAF-7FB0, U+7FB2, U+7FB8, U+7FBC,
    U+7FBF, U+7FCA, U+7FCE, U+7FD5, U+7FE1, U+7FE5-7FE6, U+7FE9, U+7FEE, U+7FF3, U+8004, U+8006, U+800B,
    U+8012, U+8014, U+8016, U+801C, U+8020, U+8022, U+8025-8029, U+8031, U+8035, U+8037, U+8043, U+8046,
    U+804D, U+8052, U+8069, U+8071, U+807F-8080, U+8093, U+809C, U+809F, U+80AB, U+80AD, U+80B1, U+80B4,
    U+80B7, U+80BC-80BD, U+80C2, U+80C4, U+80CD, U+80D7, U+80D9, U+80DB, U+80DD, U+80E4-80E5, U+80E7-80ED,
    U+80F1-80F2, U+80F4, U+80FC, U+810D-810E, U+8112, U+8114, U+8118, U+811E, U+812C, U+8132, U+8136,
    U+8148, U+814C, U+8153, U+8159-815A, U+8160, U+8167, U+8169, U+816D, U+8171, U+8174, U+817C-817D,
    U+8182, U+8188, U+8191, U+81A3, U+81A6, U+81AA, U+81BA-81BB, U+81C1, U+81CA, U+81CC, U+81E7, U+81EC,
    U+81FE, U+8201-8202, U+8204, U+8210, U+821B, U+8221-8223, U+8228, U+822B, U+822D, U+822F, U+8233-8234,
    U+8238, U+823B, U+823E, U+8244, U+8249, U+824B, U+824F, U+825A, U+825F, U+8268, U+826E, U+8274,
    U+8279, U+827D, U+827F, U+8284, U+8288, U+828A, U+828E-828F, U+8291, U+8297-8299, U+829F, U+82A1,
    U+82A4, U+82A8-82AB, U+82AE, U+82B0, U+82B4, U+82B7-82B8, U+82BE, U+82C1, U+82C4, U+82C8, U+82CA-82CC,
    U+82CE, U+82D2-82D3, U+82D5, U+82D8, U+82DC, U+82E0-82E1, U+82E3-82E4, U+82F4, U+82F7, U+82FB,
    U+8306-8309, U+830C, U+830F, U+8311, U+8314-8315, U+8317, U+831A-831C, U+832D, U+832F, U+8331,
    U+8333-8334, U+833A, U+833C, U+8340, U+8343, U+8347, U+834F, U+8351, U+835B-835C, U+835E-8360,
    U+8365-8366, U+8368-836A, U+836C-836E, U+8378, U+837B-837D, U+8385, U+8392-8393, U+8398, U+839B-839C,
    U+839E, U+83A0, U+83A8-83AA, U+83B0, U+83B3-83B4, U+83B6, U+83B8, U+83BA, U+83BC, U+83C0-83C1, U+83C5,
    U+83D4, U+83D6, U+83D8, U+83DD, U+83DF, U+83E1, U+83E5, U+83EA, U+83F0, U+83F8-83F9, U+83FD, U+8401,
    U+8403, U+8406, U+840B, U+840F, U+8411, U+8418, U+841C, U+8426, U+8431, U+8438, U+843C, U+8446,
    U+8451, U+8459-845A, U+845C, U+8469, U+846D, U+8473, U+8476, U+8478, U+847A, U+8487-8489, U+848C,
    U+848E, U+8497, U+84A1, U+84AF, U+84B4, U+84B9-84BA, U+84BD, U+84BF, U+84C1, U+84CA, U+84CD, U+84D0,
    U+84D3, U+84E0, U+84E3, U+84E5-84E6, U+84F0, U+84FC, U+84FF, U+850C, U+851F, U+8538-853B, U+8543,
    U+8548, U+8556, U+8559, U+855E, U+8564, U+8568, U+8572, U+8579-857B, U+8585, U+8587, U+858F, U+859C,
    U+85A4, U+85A8, U+85AE, U+85B0, U+85B7, U+85B9, U+85C1, U+85D3, U+85DC, U+85FF, U+8605, U+8616,
    U+8627, U+8629, U+863C, U+864D, U+8654, U+8662, U+866C, U+866E, U+867A-867C, U+867F, U+868B, U+868D,
    U+8693, U+869D, U+86A3, U+86A7-86AA, U+86AC, U+86AF-86B1, U+86B4-86B6, U+86BA, U+86C4, U+86C9,
    U+86CE-86D1, U+86D8, U+86DE-86DF, U+86E9, U+86ED, U+86F1-86F4, U+86F8, U+8703, U+8707-870A, U+870D,
    U+8713, U+871A, U+871E, U+8722-8723, U+8725, U+8729, U+872E, U+8731, U+8734, U+8737, U+873B,
    U+873E-873F, U+8748, U+874C, U+8753, U+8759, U+8760, U+8763-8765, U+876E, U+8770, U+877B-877E,
    U+8782-8783, U+8785, U+8788, U+878B, U+8793, U+8797, U+87A8, U+87AB-87AD, U+87AF, U+87B3, U+87B5,
    U+87BD, U+87C0, U+87C6, U+87CA-87CB, U+87D1-87D3, U+87DB, U+87E0, U+87E5, U+87EA, U+87EE, U+87FE,
    U+8803, U+880A, U+8813, U+8816, U+881B, U+8821, U+8832, U+8839, U+883C, U+8844, U+8862, U+8864,
    U+8869, U+886E, U+8872, U+887D-887F, U+8882, U+8885, U+8888, U+88A2, U+88A4, U+88B7, U+88BC, U+88C6,
    U+88C9, U+88CE, U+88D2, U+88D8, U+88DF, U+88E2-88E3, U+88E5, U+88E8, U+88F0-88F1, U+88FC, U+88FE,
    U+890A, U+8913, U+8919-891B, U+8921, U+892B, U+8930, U+8934, U+8936, U+8941, U+895E, U+8966, U+897B,
    U+8983, U+89C7, U+89CA-89CC, U+89CE-89D1, U+89D6, U+89DA, U+89DC, U+89DE, U+89E5, U+89EB, U+89EF,
    U+89F3, U+8A07, U+8A3E, U+8A48, U+8B07, U+8B26, U+8BA0, U+8BA6-8BA7, U+8BAA, U+8BB4-8BB5, U+8BB7,
    U+8BC2-8BC3, U+8BCB, U+8BCE-8BCF, U+8BD2-8BD4, U+8BD6, U+8BD8-8BD9, U+8BDC, U+8BDF-8BE0, U+8BE4,
    U+8BE8-8BE9, U+8BEE, U+8BF0, U+8BF3, U+8BF6, U+8BF9, U+8BFC, U+8BFF-8C00, U+8C02, U+8C04, U+8C07,
    U+8C0C, U+8C0F, U+8C11-8C12, U+8C14-8C16, U+8C18-8C19, U+8C1B, U+8C1D, U+8C1F-8C21, U+8C25, U+8C27,
    U+8C2A-8C2B, U+8C2E-8C2F, U+8C32-8C33, U+8C35-8C36, U+8C47, U+8C49, U+8C55, U+8C5A, U+8C73, U+8C78,
    U+8C82, U+8C85, U+8C8A, U+8C94, U+8C98, U+8D32-8D33, U+8D36, U+8D3B, U+8D3D, U+8D40, U+8D45-8D49,
    U+8D4D, U+8D53, U+8D55, U+8D59, U+8D5C-8D5D, U+8D67, U+8D6D, U+8D73, U+8D84, U+8D91, U+8D94, U+8DB1,
    U+8DB5, U+8DB8, U+8DBA, U+8DBC, U+8DBF, U+8DC4, U+8DC6, U+8DCE-8DCF, U+8DD6-8DD7, U+8DDA-8DDB, U+8DDE,
    U+8DE3-8DE4, U+8DEB-8DEC, U+8DF7-8DF9, U+8DFB, U+8DFD, U+8E05, U+8E09, U+8E14, U+8E1D, U+8E1F, U+8E23,
    U+8E2C, U+8E2E-8E2F, U+8E31, U+8E35, U+8E39-8E3A, U+8E3D, U+8E40-8E42, U+8E47, U+8E49-8E4A,
    U+8E51-8E52, U+8E59, U+8E69, U+8E6F-8E70, U+8E74, U+8E76, U+8E7C, U+8E85, U+8E8F-8E90, U+8E94, U+8E9C,
    U+8E9E, U+8ECE, U+8F6B, U+8F6D, U+8F71-8F73, U+8F75-8F7A, U+8F7C, U+8F7E, U+8F81-8F82, U+8F84, U+8F87,
    U+8F8B, U+8F8D-8F8F, U+8F94, U+8F98, U+8F9A, U+8FB6, U+8FD3, U+8FD5, U+8FE4-8FE6, U+8FE8-8FE9, U+8FEE,
    U+8FF3, U+9004-9005, U+900B, U+900D, U+9011, U+9016, U+9021, U+9026, U+902D, U+902F, U+9035-9036,
    U+9044, U+9050-9052, U+9058, U+905B, U+9062, U+9068, U+9074, U+907D, U+9082-9083, U+9088, U+908B,
    U+9095, U+9097, U+9099, U+909B, U+909D, U+90A1, U+90AC, U+90B0, U+90B3-90B4, U+90B6, U+90B8, U+90BA,
    U+90BE, U+90C4-90C5, U+90C7, U+90CF-90D0, U+90D3, U+90D7, U+90DB-90DC, U+90E2, U+90E6, U+90EB, U+90EF,
    U+90FE, U+9104, U+911E, U+9122-9123, U+912F, U+9131, U+9139, U+9143, U+9146, U+914A, U+914E-9150,
    U+9161-9162, U+9164, U+9169, U+916F-9170, U+9172, U+9174, U+9179, U+917D-917E, U+9185, U+918C-918D,
    U+9190-9191, U+91A2-91A3, U+91AA, U+91AD-91AF, U+91B4-91B5, U+91BA, U+928E, U+92AE, U+92C8, U+933E,
    U+936A, U+938F, U+93CA, U+93D6, U+943E, U+946B, U+9485-9487, U+948A-948D, U+948F-9490, U+9494-9495,
    U+9497, U+949A-949C, U+94A3-94A4, U+94AA-94AD, U+94AF-94B0, U+94B2, U+94B4, U+94B6-94BA, U+94BC-94BD,
    U+94BF, U+94C4, U+94C8-94CE, U+94D0-94D2, U+94D5-94D9, U+94DB, U+94DE-94E0, U+94E2, U+94E4-94E5,
    U+94E7-94EB, U+94EE-94EF, U+94F3-94F5, U+94F7, U+94F9, U+94FC-94FD, U+94FF, U+9502-9503, U+9506-9507,
    U+9509-950A, U+950D-950F, U+9512-9516, U+9518, U+951B, U+951D-951F, U+9522, U+9529-952C, U+9531-9532,
    U+9534-9538, U+953A, U+953C, U+953E-953F, U+9542, U+9544-9546, U+9549, U+954C, U+954E-954F,
    U+9552-9554, U+9556-9559, U+955B, U+955D-955F, U+9561-9562, U+9564-956C, U+956F, U+9571-9573, U+95E9,
    U+95EB, U+95F1, U+95F3, U+95F5-95F6, U+95FC, U+95FE, U+9603-9604, U+9606, U+9608, U+960A-960D, U+960F,
    U+9612, U+9615-9617, U+9619-961A, U+961D, U+9621-9622, U+962A, U+9631, U+963C-963D, U+9642, U+9649,
    U+9654, U+965F, U+9667, U+966C, U+9672, U+9674, U+9688, U+968D, U+9697, U+96B0, U+96B3, U+96B9,
    U+96BC-96BD, U+96C9, U+96CE, U+96D2, U+96E0, U+96E9, U+96EF, U+96F3, U+9701, U+9706, U+9708,
    U+970E-970F, U+972A, U+972D, U+9730, U+973E, U+9753, U+9765, U+977C, U+9785, U+9791-9792, U+9794,
    U+97A3, U+97AB, U+97AF, U+97B2, U+97B4, U+97EA-97EC, U+9878, U+987C, U+9880, U+9883, U+9889,
    U+988C-988D, U+988F, U+9894, U+989A-989B, U+989E-989F, U+98A1-98A2, U+98A5-98A6, U+98D1-98D3, U+98D5,
    U+98D9-98DA, U+98E7-98E8, U+990D, U+992E, U+9954-9955, U+9963, U+9967-996C, U+9974, U+9977, U+997D,
    U+9980, U+9984, U+9987, U+998A, U+998D, U+9990-9991, U+9993-9995, U+9997-9998, U+99A5, U+99A8, U+9A75,
    U+9A77-9A78, U+9A7A, U+9A7D, U+9A7F-9A81, U+9A85, U+9A88, U+9A8A, U+9A90, U+9A92-9A93, U+9A96, U+9A98,
    U+9A9B-9AA0, U+9AA2-9AA3, U+9AA5, U+9AA7, U+9AB0-9AB1, U+9AB6-9AB7, U+9ABA, U+9ABC, U+9AC0-9AC2,
    U+9AC5, U+9ACB-9ACC, U+9AD1, U+9ADF, U+9AE1, U+9AE6, U+9AEB, U+9AED, U+9AEF, U+9AF9, U+9AFB, U+9B08,
    U+9B0F, U+9B13, U+9B1F, U+9B23, U+9B2F, U+9B32, U+9B3B, U+9B43, U+9B45, U+9B47-9B49, U+9B4D, U+9B51,
    U+9C7F, U+9C82, U+9C85-9C88, U+9C8B, U+9C8E, U+9C90-9C92, U+9C94-9C95, U+9C9A-9C9B, U+9C9E-9CA3,
    U+9CA5-9CA9, U+9CAB, U+9CAD-9CAE, U+9CB0-9CB7, U+9CBA-9CBD, U+9CC4-9CC7, U+9CCA-9CD0, U+9CD3-9CD5,
    U+9CD7-9CD9, U+9CDC-9CDD, U+9CDF, U+9CE2, U+9E20, U+9E22, U+9E28-9E2C, U+9E31-9E32, U+9E36-9E3A,
    U+9E3E, U+9E41-9E42, U+9E44, U+9E46-9E49, U+9E4B-9E4C, U+9E4E, U+9E51, U+9E55, U+9E57-9E58,
    U+9E5A-9E5C, U+9E5E, U+9E63, U+9E66-9E6D, U+9E71, U+9E73, U+9E7E, U+9E82, U+9E87-9E88, U+9E8B, U+9E92,
    U+9E9D, U+9E9F, U+9EB4, U+9EB8, U+9EBD-9EBE, U+9EC9, U+9ECF, U+9EDB-9EDD, U+9EDF-9EE0, U+9EE2, U+9EE5,
    U+9EE7, U+9EE9-9EEA, U+9EEF, U+9EF9, U+9EFB-9EFC, U+9EFE, U+9F0B, U+9F0D, U+9F10, U+9F17, U+9F19,
    U+9F22, U+9F2C, U+9F2F, U+9F37, U+9F39, U+9F3D-9F3E, U+9F44, U+9F51, U+9F80, U+9F83, U+9F85-9F8A,
    U+9F8C, U+9F9B, U+9FA0;
}



pre, code, kbd, samp {
  font-family: var(--font-mono);
}

:where(button, input, select, textarea, summary, label, [role='button'], [role='tab']) {
  font-family: var(--font-ui);
}

* {
  box-sizing: border-box;
}

button,
[role='button'],
[role='menuitemradio'],
[role='option'] {
  -webkit-tap-highlight-color: transparent;
}

/* Action controls use selection, hover and pressed feedback instead of focus rings. */
:where(
  button,
  a,
  summary,
  [role='button'],
  [role='menuitem'],
  [role='menuitemcheckbox'],
  [role='menuitemradio'],
  [role='option'],
  [tabindex]
):not(input, select, textarea, [contenteditable]):focus {
  outline: none;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: 2px;
}

html,
body,
#root {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--surface-canvas);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.4;
}

/* Match transparent Android gesture navigation to the reading surface. */
html {
  background: var(--surface-workspace-content);
}

/* The frameless exe window has no OS border; paint a 1px edge ring so the app
   boundary stays visible against a matching desktop background. Desktop host
   in light mode only: browsers provide their own chrome and the dark theme
   already separates from the desktop. */
html.wm-desktop-host.theme-light body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.page {
  display: flex;
  flex-direction: column;
}

.app-error-screen {
  height: 100%;
  padding: 24px;
  overflow: auto;
}

.connect {
  margin: auto;
  width: min(480px, calc(100vw - 32px));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-floating);
  background: var(--surface-panel);
  box-shadow: var(--shadow-floating);
  padding: 24px;
}

.connect h3 {
  margin: 0 0 14px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.input {
  width: 100%;
  min-height: 36px;
  margin-top: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  background: var(--surface-canvas);
  color: var(--text-primary);
  padding: 8px 10px;
  font: inherit;
  outline: none;
  transition: border-color var(--motion-fast) var(--ease-standard), background var(--motion-fast) var(--ease-standard);
}

.input:hover {
  border-color: var(--border-strong);
}

.input:focus {
  border-color: var(--accent-primary);
}

.button {
  margin-top: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: var(--accent-action);
  color: #fff;
  padding: 8px 16px;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  transition: background var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard), opacity var(--motion-fast) var(--ease-standard);
}

.button:hover:not(:disabled) {
  background: var(--accent-action-hover);
}

.button:active:not(:disabled) {
  filter: brightness(0.94);
}

.button:disabled {
  cursor: default;
  opacity: 0.55;
}

.button.secondary {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.button.secondary:hover {
  background: var(--hover);
  border-color: var(--text-secondary);
  opacity: 1;
}

.error {
  color: var(--state-danger);
  margin-top: 10px;
}

@media (max-width: 520px) {
  .connect {
    width: calc(100vw - 24px);
  }
}

@keyframes floatingDockRailPulse {
  0% {
    opacity: 1;
    transform: scaleY(0.96);
    box-shadow: 0 0 0 color-mix(in srgb, var(--accent-primary) 0%, transparent);
  }
  100% {
    opacity: 0.78;
    transform: scaleY(1);
    box-shadow: 0 0 24px color-mix(in srgb, var(--accent-primary) 44%, transparent);
  }
}

.section-title {
  height: 30px;
  display: flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  padding: 0 10px;
  border-bottom: 1px solid var(--border-subtle);
  flex: 0 0 auto;
}

.list {
  overflow: auto;
  min-height: 0;
}

.archived-session-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.archived-session-cancel {
  flex: 0 0 auto;
  height: 24px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 76%, transparent);
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  padding: 0 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}

.archived-session-cancel:hover {
  background: var(--hover);
  color: var(--text-primary);
}

.archived-session-row-wrap {
  z-index: 0;
}

.archived-session-row-wrap.selected {
  z-index: 2;
}

.archived-session-restore-popover {
  position: absolute;
  top: 28px;
  right: 4px;
  z-index: 8;
  width: 142px;
}

.archived-session-empty {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.archived-session-error-list {
  margin-bottom: 8px;
}

.app-rename-dialog {
  width: min(460px, calc(100vw - 28px));
}

.app-rename-input {
  width: 100%;
  min-width: 0;
  height: 34px;
  margin-top: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--text-primary);
  background: var(--surface-panel);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.app-rename-input:focus {
  border-color: color-mix(in srgb, #8a63d2 58%, var(--border-subtle));
  box-shadow: 0 0 0 2px color-mix(in srgb, #8a63d2 18%, transparent);
}

.app-html-export-name-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 10px;
}

.app-html-export-name-input {
  margin-top: 0;
  border-radius: 7px 0 0 7px;
}

.app-html-export-name-suffix {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--border-subtle);
  border-left: 0;
  border-radius: 0 7px 7px 0;
  background: var(--surface-raised);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  user-select: none;
}

.label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.caret {
  width: 16px;
  flex: 0 0 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
}

.node-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  object-fit: contain;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.seti-glyph {
  font-family: 'wm-seti', monospace;
  font-size: 15px;
  line-height: 1;
}

.node-icon.sl-icon {
  color: #dcb67a;
}

.block,
.muted {
  color: var(--text-secondary);
  font-size: 12px;
}

.block {
  padding: 10px;
}

.scroll-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior-x: contain;
}

.empty-card {
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--surface-panel);
  padding: 14px;
  max-width: 560px;
}

.empty-title {
  font-size: 13px;
  font-weight: 700;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-secondary) 48%, transparent);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
  background: transparent;
}

/* Non-auto standard properties override WebKit scrollbar parts in Chromium. */
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--text-secondary) 48%, transparent) transparent;
  }
}

@keyframes wmFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes wmSlideInLeft {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

:root {
  --segmented-track: color-mix(in srgb, var(--surface-overlay) 55%, transparent);
  --segmented-edge: color-mix(in srgb, var(--border-strong) 80%, transparent);
  --segmented-selected-fill: color-mix(in srgb, var(--text-primary) 14%, var(--surface-panel));
  --segmented-selected-text: #69b7ff;
  --segmented-selected-edge: inset 0 0 0 1px color-mix(in srgb, var(--text-primary) 8%, transparent);
}

.theme-light {
  --segmented-track: color-mix(in srgb, var(--surface-raised) 70%, transparent);
  --segmented-selected-fill: color-mix(in srgb, var(--text-primary) 8%, var(--surface-overlay));
  --segmented-selected-text: #226bb0;
}

:is(.segmented-control, .chat-prompt-diff-view-mode),
:is(.chat-hub-workbench, .chat-hub-workbench-mobile) .chat-hub-tabs {
  border: 1px solid var(--segmented-edge);
  border-radius: 999px;
  background: var(--segmented-track);
}

.segmented-control,
.chat-hub-skills-scope,
.preview-workbench-content-kind-menu {
  --selection-state-background: var(--segmented-selected-fill);
}

.preview-workbench-content-kind-menu {
  --selection-state-text: var(--segmented-selected-text);
}

.segmented-control {
  flex-shrink: 0;
  display: inline-flex; align-items: stretch; gap: 2px; width: max-content; max-width: 100%;
  padding: 3px; overflow-x: auto; scrollbar-width: none;
}
.segmented-control > button {
  flex: 1 0 auto; min-width: 0; min-height: 28px; padding: 4px 11px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-secondary); font: inherit; font-size: 11px; font-weight: 600;
  line-height: 18px; white-space: nowrap; cursor: pointer;
}
.segmented-control > button:not([aria-selected='true'], [aria-checked='true'], :disabled):hover {
  color: var(--text-primary);
}
.segmented-control > button:is([aria-selected='true'], [aria-checked='true']),
.chat-prompt-diff-view-mode-button[aria-pressed='true'],
.chat-hub-management .chat-hub-scope-option[aria-pressed='true'],
.workbench-tab.active .workbench-tab-open,
.overlay-surface .preview-workbench-tabs-overflow-open[aria-checked='true'],
.preview-titlebar .preview-workbench-content-kind.active,
.preview-workbench-content-kind-picker.rail .preview-workbench-content-kind.active,
:is(.chat-hub-workbench, .chat-hub-workbench-mobile) .chat-hub-tabs button[aria-selected='true'] {
  color: var(--segmented-selected-text);
}

.segmented-control > button:is([aria-selected='true'], [aria-checked='true']),
.chat-prompt-diff-view-mode-button[aria-pressed='true'],
.chat-hub-management .chat-hub-scope-option[aria-pressed='true'],
.overlay-surface .preview-workbench-tabs-overflow-row.active,
.overlay-surface.preview-workbench-content-kind-menu [role='menuitemradio'][aria-checked='true'],
.preview-titlebar .preview-workbench-content-kind.active,
.preview-workbench-content-kind-picker.rail .preview-workbench-content-kind.active::before,
.chat-hub-tabs::before,
:is(.segmented-control, .chat-prompt-diff-view-mode, .chat-hub-skills-scope, .preview-workbench-content-kind-menu .session-surface-body)[data-selection-animating='true']::after {
  background: var(--segmented-selected-fill);
  box-shadow: var(--segmented-selected-edge);
}

.chat-hub-management .chat-hub-scope-option[aria-pressed='true'] {
  border-radius: 12px;
}

.segmented-control > button:disabled { opacity: .45; cursor: default; }

:is(.segmented-control, .chat-hub-tabs, .chat-prompt-diff-view-mode, .preview-workbench-content-kind-tabs, .chat-hub-skills-scope) > button:focus-visible,
.workbench-tab-open:focus-visible {
  outline: 1px solid var(--focus-ring-color);
  outline-offset: -2px;
}

/* Shared hover tooltip (GlobalTooltip in web/src/common/Tooltip). Transient-layer
   material per docs/wiki/frontend-interaction/visual-language.md: smoked surface-overlay,
   6px radius, 11px text, motion tokens with reduced-motion fallback. */
.sl-tooltip {
  position: fixed;
  z-index: 1000;
  max-width: 260px;
  padding: 5px 9px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-overlay) 88%, transparent);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border: 1px solid var(--border-faint);
  box-shadow: var(--shadow-floating);
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px) scale(0.98);
  transition:
    opacity var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.sl-tooltip.visible {
  opacity: 1;
  transform: none;
}

.sl-tooltip[data-placement='bottom']:not(.visible) {
  transform: translateY(-2px) scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .sl-tooltip {
    transition: none;
    transform: none;
  }
}

@media (prefers-reduced-transparency) {
  .sl-tooltip {
    background: var(--surface-overlay);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}



.page,
.workspace {
  --desktop-window-controls-width: 138px;
  --desktop-top-surface: color-mix(in srgb, var(--surface-sidebar) 62%, var(--surface-panel));
  --chat-session-panel-width: 360px;
  --session-widget-rail-width: 36px;
  --preview-navigation-rail-width: 42px;
  --chat-header-end-padding: 12px;
  --chat-header-trigger-end-padding: 6px;
  --chat-menu-header-gap: 6px;
  --chat-menu-icon-button-size: 30px;
  --chat-menu-icon-button-radius: 6px;
  width: 100%;
  height: 100%;
  background: var(--surface-canvas);
  color: var(--text-primary);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.page.theme-light,
.workspace.theme-light {
  --desktop-top-surface: var(--surface-workspace-content);
}

.workspace {
  display: flex;
  flex-direction: column;
  animation: wmFadeIn var(--motion-standard) var(--ease-out);
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--wm-safe-area-bottom));
  transform: translateX(-50%);
  z-index: 240;
  max-width: min(420px, calc(100vw - 32px));
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 86%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-panel) 94%, var(--surface-canvas));
  color: var(--text-primary);
  box-shadow: 0 12px 28px color-mix(in srgb, #000 22%, transparent);
  font-size: 12px;
  line-height: 1.35;
  -webkit-user-select: text;
  user-select: text;
  animation: app-toast-in var(--motion-standard) var(--ease-out) both;
}

.app-toast.app-toast-exit {
  animation: app-toast-out var(--motion-fast) var(--ease-standard) both;
}

.app-retry-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--wm-safe-area-bottom));
  z-index: 241;
  width: max-content;
  max-width: min(520px, calc(100vw - 32px));
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 7px 6px 12px;
  transform: translateX(-50%);
  border: 1px solid color-mix(in srgb, var(--danger, #df6674) 45%, var(--border-subtle));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-panel) 96%, var(--surface-canvas));
  color: var(--text-primary);
  box-shadow: 0 12px 28px color-mix(in srgb, #000 22%, transparent);
  font-size: 12px;
  line-height: 1.35;
  animation: app-toast-in var(--motion-standard) var(--ease-out) both;
}

/* Keep the retry notice clear of a simultaneous status toast. */
.app-retry-toast:has(~ .app-toast:not([data-composer-anchored])) {
  bottom: calc(72px + var(--wm-safe-area-bottom));
}

@keyframes app-toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes app-toast-out {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-toast,
  .app-retry-toast,
  .app-toast.app-toast-exit {
    animation: none;
  }
}

.app-retry-toast-message {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  -webkit-user-select: text;
  user-select: text;
}

.app-retry-toast button {
  appearance: none;
  flex: 0 0 auto;
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.app-retry-toast button:hover,
.app-retry-toast button:focus-visible {
  background: var(--hover);
  color: var(--text-primary);
}

.desktop-window-controls {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 80;
  width: var(--desktop-window-controls-width);
  height: 32px;
  display: inline-flex;
  align-items: stretch;
  justify-content: flex-end;
  color: var(--text-primary);
  background: var(--desktop-top-surface);
  border-left: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.desktop-titlebar-button {
  width: 46px;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: color-mix(in srgb, var(--text-primary) 78%, var(--text-secondary));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  padding: 0;
  transition: background-color var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard);
}

.desktop-titlebar-button:hover {
  background: var(--hover);
  color: var(--text-primary);
}

.desktop-titlebar-close:hover {
  background: #c42b1c;
  color: #ffffff;
}

.desktop-titlebar-button .sl-icon {
  line-height: 1;
}

.desktop-drag-region {
  cursor: default;
}

.chat-menu-icon-button {
  appearance: none;
  width: var(--chat-menu-icon-button-size);
  height: var(--chat-menu-icon-button-size);
  flex: 0 0 var(--chat-menu-icon-button-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--chat-menu-icon-button-radius);
  padding: 0;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
}

.chat-menu-icon-button:focus-visible,
.chat-menu-icon-button[aria-expanded='true'] {
  background: var(--hover);
  color: var(--text-primary);
  outline: none;
}

@media (hover: hover) {
  .chat-menu-icon-button:hover {
    background: var(--hover);
    color: var(--text-primary);
  }
}

.chat-menu-icon-button .sl-icon {
  width: 14px;
  height: 14px;
}

.desktop-shell {
  --desktop-side-surface: var(--surface-session-list);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-canvas);
  position: relative;
}

.desktop-shell > .body {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
}

.desktop-primary-workspace {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.desktop-primary-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.desktop-primary-body > .workspace-right {
  min-width: 0;
}

/* Hubs and Settings share a navigation column and expand to the right for detail. */
.desktop-hub-host {
  position: absolute;
  /* The shell body already starts below the shared desktop titlebar. */
  inset: 0;
  z-index: 59;
  overflow: hidden;
  pointer-events: none;
}

.desktop-management-surface {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--management-rail-width);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--border-subtle);
  background: var(--surface-panel);
  pointer-events: auto;
  transform: translateX(0);
  transition: transform var(--motion-emphasized) var(--ease-out);
}

.desktop-management-surface.is-expanded {
  width: 100%;
  border-right: 0;
}

.management-pane-header-mobile { padding-top: calc(var(--wm-safe-area-top, 0px) + 7px); }

@starting-style {
  .desktop-management-surface {
    transform: translateX(-100%);
  }
}

.desktop-management-surface.sl-menu-exit {
  animation: none;
  transform: translateX(-100%);
  transition-duration: var(--motion-exit);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .desktop-management-surface,
  .desktop-management-surface.sl-menu-exit {
    transform: none;
    transition: none;
  }
}

.desktop-shell[data-inline-preview-maximized='true'] .desktop-primary-workspace {
  flex: 0 0 auto;
  width: var(--chat-session-panel-width);
  overflow: visible;
}

.desktop-shell[data-inline-preview-maximized='true'][data-sessions-collapsed='true'] .desktop-primary-workspace {
  width: 0;
}

.desktop-shell[data-inline-preview-maximized='true'] .workspace-right {
  display: none;
}

.floating-control-stack-layer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 71;
}

.floating-control-drag-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: rgba(0, 0, 0, 0.13);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity var(--motion-fast) var(--ease-standard);
}

.floating-control-stack-layer[data-drag-state='dragging'] .floating-control-drag-backdrop {
  opacity: 1;
}

.floating-control-dock-rail {
  position: absolute;
  top: calc(var(--wm-safe-area-top) + 14px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  z-index: 0;
  width: 3px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  background: color-mix(in srgb, var(--accent-primary) 62%, transparent);
  box-shadow: 0 0 0 color-mix(in srgb, var(--accent-primary) 0%, transparent);
  transform: scaleY(0.92);
  transform-origin: center;
  transition: opacity var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.floating-control-dock-rail.left {
  left: 0;
}

.floating-control-dock-rail.right {
  right: 0;
}

.floating-control-stack-layer[data-drag-state='dragging'] .floating-control-dock-rail {
  opacity: 0.36;
  transform: scaleY(1);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent-primary) 20%, transparent);
}

.floating-control-stack-layer[data-drag-state='dragging'][data-side='left'] .floating-control-dock-rail.left,
.floating-control-stack-layer[data-drag-state='dragging'][data-side='right'] .floating-control-dock-rail.right {
  opacity: 0.78;
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent-primary) 34%, transparent);
}

.floating-control-stack-layer[data-side-pulse='left'] .floating-control-dock-rail.left,
.floating-control-stack-layer[data-side-pulse='right'] .floating-control-dock-rail.right {
  animation: floatingDockRailPulse var(--motion-fast) var(--ease-out);
}

.floating-control-stack {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  transition: scale var(--motion-fast) var(--ease-standard);
}

.floating-control-stack[data-side='right'] {
  right: calc(env(safe-area-inset-right, 0px) + 6px);
  left: auto;
}

.floating-control-stack[data-side='left'] {
  left: calc(env(safe-area-inset-left, 0px) + 6px);
  right: auto;
}

.floating-control-stack[data-drag-state='dragging'] {
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.28));
  will-change: transform;
}

.floating-nav-button {
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 60%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-panel) 24%, transparent);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  box-shadow: 0 2px 10px rgb(0 0 0 / 8%);
  color: color-mix(in srgb, var(--accent-primary) 88%, var(--text-primary));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--motion-standard) var(--ease-standard),
    border-color var(--motion-standard) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.floating-nav-button .sl-icon {
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 40%));
}

.floating-nav-button:active {
  transform: scale(0.96);
}

.floating-nav-expanded-anchor {
  position: relative;
  width: 48px;
  height: 48px;
}

.floating-nav-card {
  position: absolute;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 0;
  padding: 2px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 65%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-overlay) 72%, transparent);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 10%),
    0 1px 2px rgb(0 0 0 / 8%),
    var(--shadow-floating);
  transform-origin: bottom right;
  animation: floating-nav-card-in var(--motion-standard) var(--ease-out);
}

.floating-nav-preview-items {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.floating-nav-preview-items::-webkit-scrollbar { display: none; }

.floating-control-stack[data-side='left'] .floating-nav-card {
  right: auto;
  left: 0;
  transform-origin: bottom left;
}

@keyframes floating-nav-card-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.floating-nav-card-item {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.floating-nav-card-item:hover {
  background: var(--hover);
  color: var(--text-primary);
}

.floating-nav-card-item:active {
  transform: scale(0.96);
}

.floating-nav-card-item:disabled {
  opacity: .45;
  cursor: default;
}

.floating-nav-card-item[data-active='true'] {
  background: var(--accent-soft-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-primary) 30%, transparent);
  color: color-mix(in srgb, var(--accent-primary) 88%, var(--text-primary));
}

.floating-nav-unread-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--state-success);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--surface-panel) 78%, transparent),
    0 0 10px color-mix(in srgb, var(--state-success) 34%, transparent);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .topbar-menu-surface,
  .floating-nav-card,
  .floating-nav-button,
  .floating-nav-card-item,
  .floating-control-drag-backdrop,
  .floating-control-dock-rail,
  .floating-control-stack {
    animation: none;
    transition-property: background, background-color, border-color, color, box-shadow, outline-color, opacity;
  }
}

.chat-preview-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 12px;
  height: 12px;
  /* The top padding optically centers the count inside the pill. */
  padding: 1px 3px 0;
  border-radius: 999px;
  background: var(--accent-action);
  color: #fff;
  font-size: 8px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 12px;
  text-align: center;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--surface-panel) 78%, transparent);
  pointer-events: none;
}

.breadcrumb-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
}

.breadcrumb-project-name {
  flex: 0 0 auto;
  max-width: none;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 54%, transparent);
  border-radius: 8px;
  padding: 1px 8px;
  background: color-mix(in srgb, var(--accent-primary) 13%, var(--surface-panel));
  white-space: nowrap;
  font-weight: 700;
  color: color-mix(in srgb, var(--accent-primary) 78%, var(--text-primary));
}

.breadcrumb-current {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}

.sidebar-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface-sidebar);
}

.workspace-left .sidebar-scroll {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: auto;
}

.sidebar-title-row {
  position: relative;
  flex: 0 0 var(--chat-menu-header-height);
  min-height: var(--chat-menu-header-height);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-sidebar);
  display: flex;
  align-items: center;
  gap: var(--chat-menu-header-gap);
  padding: 0 8px;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.sidebar-title-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sidebar-setting-row {
  background: transparent;
}

.sidebar-setting-select {
  max-width: 180px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 80%, transparent);
  border-radius: 6px;
  background: var(--surface-panel);
  color: var(--text-primary);
  padding: 4px 8px;
  font-size: 12px;
  outline: none;
  transition: border-color var(--motion-fast) var(--ease-standard), background var(--motion-fast) var(--ease-standard);
}

.sidebar-setting-select:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 50%, var(--border-subtle));
}

.sidebar-setting-select:focus {
  border-color: var(--accent-primary);
}

.body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.workspace-left {
  position: relative;
  flex: 0 0 var(--chat-session-panel-width);
  z-index: var(--layer-workspace-chrome);
  width: var(--chat-session-panel-width);
  min-width: 0;
  max-width: none;
  border-right: 1px solid var(--border-subtle);
  border-color: var(--border-subtle);
  background: var(--surface-sidebar);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  animation: wmSlideInLeft var(--motion-standard) var(--ease-out);
  transition:
    flex-basis var(--motion-session-panel),
    border-right-color var(--motion-standard) var(--ease-standard);
}

.workspace-left-content {
  position: relative;
  flex: 1 1 auto;
  width: var(--chat-session-panel-width);
  min-width: 0;
  max-width: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workspace-left.is-collapsed {
  flex-basis: 0;
  border-right-width: 0;
  border-right-color: transparent;
}

.workspace-right {
  flex: 1;
  min-width: 420px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior-x: none;
  background: var(--surface-workspace-content);
  animation: wmFadeIn var(--motion-standard) var(--ease-out);
}

.archived-session-header {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px 6px 7px;
}

/* Full-page management surfaces enter and leave through the same edge. */
.mobile-side-page {
  transform: translateX(0);
  transition: transform var(--motion-emphasized) var(--ease-out);
}

@starting-style {
  .mobile-side-page {
    transform: translateX(100%);
  }
}

.mobile-side-page.sl-menu-exit {
  animation: none;
  transform: translateX(100%);
  transition-duration: var(--motion-exit);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .mobile-side-page,
  .mobile-side-page.sl-menu-exit {
    transform: none;
    transition: none;
  }
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgb(4 9 16 / 0%);
  opacity: 0;
  pointer-events: none;
  z-index: 43;
  backdrop-filter: blur(0);
  transition: background var(--motion-session-panel), backdrop-filter var(--motion-session-panel);
}

.drawer-overlay.show {
  background: rgb(4 9 16 / 48%);
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(2px);
}

.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(440px, calc(100vw - var(--mobile-floating-control-lane) - env(safe-area-inset-right, 0px)));
  border-right: 1px solid var(--border-subtle);
  border-color: var(--border-subtle);
  background: var(--surface-sidebar);
  transform: translateX(-100%);
  display: flex;
  flex-direction: column;
  min-height: 0;
  z-index: 50;
  box-shadow: var(--shadow-overlay);
  transition: transform var(--motion-session-panel);
}

.drawer .sidebar-scroll {
  scrollbar-gutter: auto;
}

.narrow-shell[data-floating-control-side='left'] .drawer {
  inset: 0 0 0 auto;
  width: min(440px, calc(100vw - var(--mobile-floating-control-lane) - env(safe-area-inset-left, 0px)));
  border-right: none;
  border-left: 1px solid var(--border-subtle);
  transform: translateX(100%);
}

.drawer.show {
  transform: translateX(0);
  box-shadow: 8px 0 28px rgba(0, 0, 0, 0.38);
}

.narrow-shell[data-floating-control-side='left'] .drawer.show {
  transform: translateX(0);
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.38);
}

.narrow-shell .body {
  position: relative;
}

.narrow-shell .workspace-right {
  width: 100%;
  min-width: 0;
}

.connect-titlebar {
  height: 32px;
  display: flex;
  align-items: center;
  padding-left: 12px;
  background: var(--desktop-top-surface);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  -webkit-user-select: none;
  user-select: none;
}

/* Brand launch layer. Always the same deep navy as the Android native splash
   (APP_BACKGROUND_COLOR rgb(11,18,32)) so the native/exe overlay cross-fade is
   seamless; the workspace theme only appears once connected. The layer stays
   mounted across every pre-session state (status, token form, manual connect
   retry) so the sweep never stops mid-flow. */
.app-launch-screen {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1220;
}

.app-launch-screen.exiting {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  animation: wm-launch-exit var(--motion-emphasized) var(--ease-out) forwards;
}

@keyframes wm-launch-exit {
  to {
    opacity: 0;
  }
}

.app-launch-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The desktop connect titlebar eats 32px at the top; compensate so the mark
   sits at the true window center, matching the exe overlay, the Android
   splash, and the exit overlay exactly. */
.has-connect-titlebar .app-launch-mark {
  transform: translateY(-16px);
}

.app-launch-logo {
  position: relative;
  display: block;
}

.app-launch-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 164, 250, 0.26), rgba(46, 164, 250, 0) 65%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Status text and the token form hang from the mark itself, so the whole
   composition follows the logo wherever it is centered. */
.app-launch-content {
  position: absolute;
  top: calc(100% + 26px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.app-launch-status {
  white-space: nowrap;
  color: rgba(235, 240, 250, 0.66);
  font-size: 13px;
  letter-spacing: 0.01em;
}

.app-launch-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(300px, calc(100vw - 64px));
}

.app-launch-input {
  min-height: 36px;
  border: 1px solid rgba(235, 240, 250, 0.22);
  border-radius: var(--radius-control, 8px);
  background: rgba(235, 240, 250, 0.06);
  color: #f3f6fb;
  padding: 8px 12px;
  font: inherit;
  outline: none;
  transition: border-color var(--motion-fast) var(--ease-standard);
}

.app-launch-input::placeholder {
  color: rgba(235, 240, 250, 0.4);
}

.app-launch-input:hover:not(:disabled) {
  border-color: rgba(235, 240, 250, 0.38);
}

.app-launch-input:focus {
  border-color: #2ea4fa;
}

.app-launch-input:disabled {
  opacity: 0.55;
}

.app-launch-button {
  min-height: 36px;
  border: 0;
  border-radius: var(--radius-control, 8px);
  background: var(--accent-action);
  color: #fff;
  padding: 8px 16px;
  font: inherit;
  cursor: pointer;
  transition: background-color var(--motion-fast) var(--ease-standard);
}

.app-launch-button:hover:not(:disabled) {
  background: var(--accent-action-hover);
}

.app-launch-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.app-launch-error {
  max-width: 320px;
  color: #ff9d94;
  font-size: 12px;
  text-align: center;
}

/* Idle loop: a soft highlight band parallel to the white slash sweeps the
   assembled mark left to right, then rests before the next pass. */
.app-launch-shine {
  transform: translateX(-940px);
  animation: wm-launch-shine-sweep 2.1s var(--ease-standard) 250ms infinite;
}

@keyframes wm-launch-shine-sweep {
  0% {
    transform: translateX(-940px);
  }
  55% {
    transform: translateX(940px);
  }
  100% {
    transform: translateX(940px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-launch-shine {
    animation: none;
    transform: translateX(-940px);
  }

  .app-launch-screen.exiting {
    animation-duration: 0ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  .drawer,
  .drawer-overlay,
  .workspace-left {
    transition-duration: 0ms;
  }
}

.workspace-right > .content:has(> .chat-title-bar) {
  animation: workspacePageEnter var(--motion-standard) var(--ease-out);
}

.topbar-menu-surface {
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-popup);
  background: color-mix(in srgb, var(--surface-overlay) 88%, transparent);
  box-shadow: var(--shadow-overlay);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  padding: 4px;
  transform-origin: var(--popover-origin, top center);
  animation: sl-menu-in var(--motion-fast) var(--ease-out);
}

.app-menu-root {
  position: relative;
  flex: 0 0 auto;
}

.app-toolbar-root {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.app-menu-trigger {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.app-menu-trigger:focus-visible,
.app-menu-trigger[aria-expanded='true'] {
  background: var(--hover);
  color: var(--text-primary);
  outline: none;
}

@media (hover: hover) {
  .app-menu-trigger:hover {
    background: var(--hover);
    color: var(--text-primary);
  }
}

.app-toolbar-button {
  position: relative;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.app-toolbar-button:hover,
.app-toolbar-button:focus-visible {
  background: var(--hover);
  color: var(--text-primary);
  outline: none;
}

.app-toolbar-button:active,
.app-menu-trigger:active {
  transform: translateY(1px);
}

.app-toolbar-button:disabled {
  color: var(--text-tertiary);
  cursor: default;
  opacity: 0.72;
}

.app-toolbar-button.app-toolbar-version {
  width: auto;
  min-width: 46px;
  flex-basis: auto;
  padding: 0 7px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  white-space: nowrap;
  max-width: 140px;
}

.app-toolbar-version > [data-client-update-label] {
  overflow: hidden;
  text-overflow: ellipsis;
}

.management-pane-header-mobile .app-toolbar-version {
  max-width: 110px;
}

.client-update-corner-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  box-shadow: 0 0 0 2px var(--surface-panel);
}

.app-product-mark {
  width: 20px;
  height: 20px;
  display: block;
}

.app-menu-trigger .app-product-mark {
  width: 19px;
  height: 19px;
}

.chat-menu-product-button {
  color: var(--text-secondary);
}

.chat-menu-product-button .app-product-mark {
  width: 18px;
  height: 18px;
}

.client-update-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--state-danger);
}

@keyframes workspacePageEnter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-right > .content:has(> .chat-title-bar) {
    animation: none;
  }

  .workspace-left {
    animation: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar-menu-surface {
    background: var(--surface-overlay);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

}

input,
textarea,
[contenteditable='true'],
[contenteditable='true'] *,
.chat-main-message,
.chat-main-message *,
.chat-prompt-user,
.chat-prompt-user *,
.chat-thought-content,
.code-wrap,
.wm-shiki-line-content,
.wm-shiki-line-content * {
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  user-select: text;
}

[data-context-menu-target='true'],
[data-context-menu-target='true'] *,
[data-context-menu-action='true'],
[data-context-menu-action='true'] *,
[data-context-menu-surface='true'],
[data-context-menu-surface='true'] * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.mobile-settings-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  min-width: 0;
  min-height: 0;
  background: var(--surface-canvas);
  color: var(--text-primary);
}

.mobile-settings-panel {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-color: var(--border-subtle);
  background: var(--surface-panel);
  color: var(--text-primary);
}

.settings-screen-panel-row {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
}

.mobile-settings-leading {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

.mobile-settings-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + 16px);
  background: var(--surface-panel);
}

.mobile-settings-group {
  overflow: visible;
  background: transparent;
}

.desktop-settings-screen {
  display: flex;
}

.settings-desktop-split {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
}

.settings-desktop-layout {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-panel);
}

.settings-desktop-root {
  flex: 0 0 var(--management-rail-width);
  width: var(--management-rail-width);
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.settings-desktop-root-content {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0 16px;
}

.settings-desktop-detail-pane {
  flex: 1 1 0;
  min-width: 360px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid color-mix(in srgb, var(--border-subtle) 70%, transparent);
  background: color-mix(in srgb, var(--surface-canvas) 55%, var(--surface-panel));
}

.settings-desktop-detail-head {
  width: 100%;
  padding-inline: 32px;
}

.settings-desktop-detail-heading {
  min-width: 0;
}

.settings-desktop-breadcrumb {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.settings-desktop-breadcrumb span {
  margin-inline: 8px;
  color: var(--text-tertiary);
}

.settings-desktop-detail-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.settings-detail-page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  container: settings-detail / inline-size;
}

.settings-detail-page-body-only {
  padding: 0;
}

.settings-detail-row {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-bottom: 0;
  background: transparent;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease-standard);
}

.settings-metadata-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  border: 0;
}

.settings-metadata-card:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 22%, var(--border-subtle));
}

.settings-metadata-line {
  font-size: 11px;
  line-height: 1.25;
}

.settings-metadata-line-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.settings-metadata-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.settings-connection-value {
  overflow-wrap: anywhere;
  color: var(--text-secondary);
}

.agent-package-status {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 80%, transparent);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.settings-detail-action-btn {
  flex: 0 0 auto;
  min-width: 58px;
  min-height: 28px;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 35%, var(--border-subtle));
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--accent-primary) 10%, var(--surface-panel));
  color: var(--text-primary);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  padding: 0 9px;
}

.settings-detail-action-btn.danger {
  border-color: color-mix(in srgb, var(--state-danger) 42%, var(--border-subtle));
  background: color-mix(in srgb, var(--state-danger) 10%, var(--surface-panel));
}

.settings-detail-action-btn:hover:not(:disabled) {
  background: var(--hover);
}

.settings-detail-action-btn:disabled {
  cursor: default;
  opacity: 0.56;
}

.settings-skills-empty {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.settings-skills-detail-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 7px;
  margin: 12px 14px 0;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.settings-skills-detail-status .sl-icon {
  color: var(--accent-primary);
  width: 12px;
  height: 12px;
}

.settings-skills-detail-body {
  display: grid;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  gap: 12px;
  overflow: auto;
  padding: 12px 14px 18px;
}

.settings-skills-detail-section {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.settings-skills-detail-section-title {
  color: color-mix(in srgb, var(--text-primary) 78%, var(--accent-primary));
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  text-transform: uppercase;
}

.settings-skills-detail-meta {
  display: grid;
  min-width: 0;
  gap: 0;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 72%, transparent);
  border-radius: 6px;
  overflow: hidden;
}

.settings-skills-detail-meta-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: start;
  min-width: 0;
  gap: 8px;
  border-top: 1px solid color-mix(in srgb, var(--border-subtle) 58%, transparent);
  padding: 6px 8px;
}

.settings-skills-detail-meta-row:first-child {
  border-top: 0;
}

.settings-skills-detail-meta-row span:first-child {
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 750;
}

.settings-skills-detail-meta-row span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.skill-detail-markdown {
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 76%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-panel) 88%, black 6%);
  color: var(--text-primary);
  padding: 12px;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.55;
}

.settings-skills-detail-files {
  display: grid;
  min-width: 0;
  gap: 0;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 72%, transparent);
  border-radius: 6px;
  overflow: hidden;
}

.settings-skills-detail-file {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 8px;
  border-top: 1px solid color-mix(in srgb, var(--border-subtle) 58%, transparent);
  padding: 6px 8px;
  color: var(--text-secondary);
  font-size: 10.5px;
}

.settings-skills-detail-file:first-child {
  border-top: 0;
}

.settings-skills-detail-file span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.settings-skills-detail-file span:last-child {
  color: var(--text-secondary);
  font-size: 10px;
}

.settings-database-dump {
  margin: 0;
  max-height: min(62vh, 520px);
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-panel);
  color: var(--text-primary);
  background: color-mix(in srgb, var(--surface-raised) 82%, var(--surface-panel));
  box-shadow: 0 1px 0 color-mix(in srgb, #fff 6%, transparent) inset;
  white-space: pre;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
}

.settings-database-storage-summary {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
}

.settings-database-storage-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.settings-database-storage-label,
.settings-database-storage-note {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.25;
}

.settings-database-storage-metric strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.settings-database-store-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 96px;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  font-size: 12px;
}

.settings-database-store-list-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 96px;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  font-size: 11px;
  border-bottom: 1px solid color-mix(in srgb, var(--border-subtle) 80%, transparent);
  color: var(--text-secondary);
  text-transform: uppercase;
}

.settings-database-store-row + .settings-database-store-row {
  border-top: 1px solid color-mix(in srgb, var(--border-subtle) 55%, transparent);
}

.settings-database-store-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
}

.settings-database-session-files {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.settings-database-session-files-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.settings-database-session-files-path {
  margin: 3px 0 0;
  color: var(--text-secondary);
  font: 10px/1.35 var(--font-mono);
  overflow-wrap: anywhere;
}

.settings-database-session-files-status {
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-size: 11px;
}

.settings-database-session-files-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.settings-database-session-files-metrics > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 78%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-raised) 72%, transparent);
}

.settings-database-session-files-metrics strong {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.2;
}

.settings-database-session-files-toggle {
  justify-self: start;
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.settings-database-session-files-toggle:hover {
  text-decoration: underline;
}

.settings-database-session-files-list {
  display: grid;
  gap: 6px;
  max-height: 300px;
  overflow: auto;
}

.settings-database-session-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid color-mix(in srgb, var(--border-subtle) 55%, transparent);
}

.settings-database-session-file-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.settings-database-session-file-main strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-database-session-file-main span {
  overflow: hidden;
  color: var(--text-secondary);
  font: 10px/1.35 var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-database-session-file-meta {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 3px;
  color: var(--text-secondary);
  font-size: 10px;
  text-align: right;
}

@media (max-width: 720px) {
  .settings-skills-detail-body {
    padding: 10px 10px calc(env(safe-area-inset-bottom, 0px) + 14px);
  }

  .settings-skills-detail-meta-row {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .settings-database-storage-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-database-store-list-header,
  .settings-database-store-row {
    grid-template-columns: minmax(0, 1fr) 52px 78px;
  }

  .settings-database-session-file-row {
    align-items: flex-start;
  }
}

.settings-list {
  display: grid;
  width: 100%;
  margin: 0;
  gap: 18px;
  padding: 8px 10px 24px;
}

.settings-section {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.settings-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-transform: none;
}

.settings-section-title::after {
  content: '';
  flex: 1 1 auto;
  display: block;
  height: 1px;
  background: color-mix(in srgb, var(--border-subtle) 55%, transparent);
}

.settings-row {
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  border-bottom: 0;
  transition: background var(--motion-fast) var(--ease-standard);
}

.settings-row > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.settings-row-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  opacity: 0.85;
  transition: color var(--motion-fast) var(--ease-standard),
    opacity var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.settings-row:hover .settings-row-icon {
  color: var(--accent-primary);
  opacity: 1;
}

.settings-danger-row {
  color: var(--state-danger);
  cursor: pointer;
  font-weight: 600;
}

.settings-danger-row:hover {
  background: color-mix(in srgb, var(--state-danger) 10%, transparent);
  box-shadow: inset 2px 0 0 var(--state-danger);
}

.settings-danger-row:hover .settings-row-icon {
  color: var(--state-danger);
  opacity: 1;
}

.mobile-settings-content-transition {
  min-width: 0;
  min-height: 100%;
}

/* settings workbench tokens */
.settings-workbench-screen {
  background: var(--surface-canvas);
}

.settings-workbench-panel {
  border-color: var(--border-subtle);
  background: var(--surface-panel);
}

.settings-danger-row,
.settings-danger-row .settings-row-icon {
  color: var(--state-danger);
}

.settings-list .sidebar-setting-select {
  max-width: 48%;
  height: 30px;
  padding: 0 10px;
  border-color: var(--border-subtle);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  color: var(--text-primary);
  font-size: 14px;
}

.settings-log-level-controls .sidebar-setting-select {
  max-width: none;
}

.settings-list .sidebar-setting-select:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--accent-primary) 58%, var(--border-subtle));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-primary) 20%, transparent);
}

.settings-metadata-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-panel);
  background: color-mix(in srgb, var(--surface-raised) 82%, var(--surface-panel));
  padding: 10px 0;
  display: grid;
  gap: 7px;
  box-shadow: 0 1px 0 color-mix(in srgb, #fff 6%, transparent) inset;
  transition: border-color var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.settings-database-storage-metric {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-panel);
  background: color-mix(in srgb, var(--surface-raised) 82%, var(--surface-panel));
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  box-shadow: 0 1px 0 color-mix(in srgb, #fff 6%, transparent) inset;
}

.settings-database-store-list {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-panel);
  background: color-mix(in srgb, var(--surface-raised) 82%, var(--surface-panel));
  overflow: hidden;
  box-shadow: 0 1px 0 color-mix(in srgb, #fff 6%, transparent) inset;
}

/* ============================================================
   Unified settings kit — canonical vocabulary for the four
   settings pages. Solid instrument-panel surfaces, hairline
   borders, ghost controls (accent only on active/selected),
   mono data treatment. Lives last so it is authoritative.
   Panel radius is 8px here on purpose (see visual-language),
   without touching the global --radius-panel token.
   ============================================================ */

.set-mono {
  font-family: var(--font-mono);
}

.set-num {
  font-variant-numeric: tabular-nums;
}

/* ---- card / surface ---- */
.set-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface-panel);
  box-shadow: none;
}

.set-card--tight {
  gap: 7px;
  padding: 10px;
}

.set-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.set-card-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
}

.set-card-subtitle {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 11px;
}

.set-card-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

/* ---- buttons: ghost by default, accent only when active/selected ---- */

/* active/selected/running — the only states that earn accent */

/* ---- status: one dot + label vocabulary across all pages ---- */
.set-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 550;
  line-height: 1;
}

.set-status::before {
  content: '';
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.set-status.is-ok {
  color: var(--state-success);
}

.set-status.is-running {
  color: var(--accent-primary);
}

.set-status.is-running::before {
  animation: set-status-pulse 1.4s ease-in-out infinite;
}

.set-status.is-warn {
  color: var(--state-warning);
}

.set-status.is-error {
  color: var(--state-danger);
}

.set-status.is-idle {
  color: var(--text-tertiary);
}

@keyframes set-status-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .set-status.is-running::before {
    animation: none;
  }
}

/* ---- disclosure: chevron + title + count, expandable body ---- */
.set-disclosure {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.set-disclosure-btn {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 28px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}

.set-disclosure-btn:hover {
  background: var(--hover);
}

.set-disclosure-btn .sl-icon {
  flex: 0 0 auto;
  color: var(--text-tertiary);
  transition: transform var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}

.set-disclosure-btn[aria-expanded='true'] .sl-icon {
  transform: rotate(90deg);
  color: var(--text-secondary);
}

.set-disclosure-body {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding-left: 22px;
}

/* ---- labeled form field ---- */
.set-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.set-field-label {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 550;
}

.set-field-control,
.set-field input,
.set-field select,
.set-card input:not([type='checkbox']),
.set-card select {
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  transition: border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.set-field-control:focus,
.set-field input:focus,
.set-field select:focus,
.set-card input:not([type='checkbox']):focus,
.set-card select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent-primary) 60%, var(--border-subtle));
  box-shadow: 0 0 0 2px var(--focus-ring-color);
}

/* ---- telemetry key/value row ---- */
.set-kv {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  font-size: 11.5px;
}

.set-kv-key {
  color: var(--text-tertiary);
}

.set-kv-value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-primary);
}

.set-kv-value.set-mono {
  font-size: 11px;
}

/* ---- error / notice text ---- */
.set-error {
  color: var(--state-danger);
  font-size: 11.5px;
  line-height: 1.3;
}

.set-muted {
  color: var(--text-secondary);
  font-size: 11.5px;
}

.settings-row-chevron {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  transition: transform var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}

/* checkboxes / selects aligned to the kit's ghost control language */
.settings-workbench-panel input[type='checkbox'] {
  accent-color: var(--accent-primary);
}

/* ---- settings root rows: toggle switch, notes, log-level nav, compact secrets ---- */
.settings-switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--text-tertiary) 45%, var(--border-subtle));
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-tertiary) 38%, var(--surface-raised));
  box-shadow: inset 0 1px 2px color-mix(in srgb, #000 22%, transparent);
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.settings-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px color-mix(in srgb, #000 40%, transparent);
  transition: transform var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.settings-switch:checked {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  box-shadow: none;
}

.settings-switch:checked::after {
  transform: translateX(16px);
}

.settings-switch:disabled {
  opacity: 0.55;
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  .settings-switch,
  .settings-switch::after,
  .settings-row,
  .settings-row-nav-btn {
    transition: none;
  }
}

.settings-row-note {
  padding: 6px 12px 8px;
  border-bottom: 0;
  color: var(--text-secondary);
  font-size: 11.5px;
  line-height: 1.35;
}

.settings-row-note-error {
  color: var(--state-danger);
}

.settings-log-level-controls {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.settings-row-nav-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-tertiary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
  -webkit-tap-highlight-color: transparent;
}

.settings-row-nav-btn:hover {
  background: var(--hover);
  border-color: color-mix(in srgb, var(--accent-primary) 42%, var(--border-subtle));
  color: var(--accent-primary);
}

.settings-row-nav-btn .sl-icon {
  width: 14px;
  height: 14px;
}

/* compact secret editor rows adopt the settings-row rhythm inside sections */
.settings-section-rows .secret-compact-row {
  min-height: 44px;
  gap: 8px;
  padding: 0 8px;
  border-bottom: 0;
}

.settings-section-rows .secret-compact-status {
  width: 16px;
  color: var(--text-secondary);
}

.settings-section-rows .secret-compact-status.configured {
  color: var(--state-success);
}

.settings-section-rows .secret-compact-label {
  flex: 0 0 auto;
  min-width: 0;
  color: var(--text-primary);
  font-size: 12px;
}

.settings-section-rows .secret-compact-input {
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  font-size: 12px;
}

.settings-section-rows .secret-compact-input:focus-visible {
  border-color: color-mix(in srgb, var(--accent-primary) 58%, var(--border-subtle));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-primary) 20%, transparent);
}

.settings-section-rows .secret-compact-set {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  color: var(--text-secondary);
  font-size: 11px;
}

.settings-section-rows .secret-compact-set:hover:not(:disabled) {
  background: var(--hover);
  color: var(--text-primary);
}

.settings-section-rows .secret-compact-clear {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-control);
}

.settings-section-rows .secret-compact-clear:hover:not(:disabled) {
  color: var(--state-danger);
  background: color-mix(in srgb, var(--state-danger) 10%, transparent);
}

/* ---- port relay settings page (built on set-card / set-btn / set-status) ---- */

/* ---- device sessions settings page (set-card / set-btn / set-status / set-kv) ---- */
.device-settings-section {
  min-width: 0;
  padding-top: 24px;
}

.device-settings-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.device-settings-section-description {
  padding-block: 8px 0;
}

.device-hub-head {
  justify-content: space-between;
}

.device-hub-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.device-hub-status {
  flex-shrink: 0;
  white-space: nowrap;
}

.device-hub-status.is-online {
  color: var(--accent-primary);
}

.device-hub-card .set-kv-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.device-sessions-stack {
  display: grid;
  gap: 10px;
}

.device-sessions-head {
  flex-wrap: wrap;
  row-gap: 8px;
}

.device-session-card {
  gap: 10px;
}

.device-session-name {
  max-width: min(280px, 48vw);
}

.device-session-meta {
  gap: 7px 18px;
}

@media (min-width: 640px) {
  .device-session-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.device-sessions-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.device-sessions-empty-icon {
  flex: 0 0 auto;
  color: var(--text-tertiary);
}

.device-sessions-empty-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.device-sessions-skeleton {
  display: grid;
  gap: 9px;
  min-height: 108px;
  align-content: start;
}

.device-sessions-skeleton-line {
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border-subtle) 62%, transparent);
}

.device-sessions-skeleton-title {
  width: 34%;
  height: 12px;
  margin-bottom: 2px;
}

.device-sessions-skeleton-short {
  width: 62%;
}

/* ---- settings root sub-groups (voice input / speech) ---- */
.settings-subsection {
  min-width: 0;
}

.settings-subsection-rows .secret-compact-row {
  flex-wrap: nowrap;
}

.settings-subsection-rows .secret-compact-input {
  flex: 1 1 auto;
  min-width: 0;
  order: 0;
}

/* ---- database page danger zone ---- */
.database-clear-card {
  border-color: color-mix(in srgb, var(--state-danger) 32%, var(--border-subtle));
}

.database-clear-note {
  line-height: 1.4;
}

/* ---- database page lazy stats: empty placeholder + Show/Export actions ---- */
.settings-database-storage-empty {
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 78%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 84%, transparent);
  color: var(--text-secondary);
  font-size: 12px;
}

.settings-database-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---- release publishing page (unified kit) ---- */
.release-publish-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0 0 20px;
}

.release-publish-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 12px;
}

.release-publish-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-size: 12px;
}

.release-publish-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.release-publish-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.release-publish-task {
  grid-template-columns: minmax(0, 1fr);
}

.release-publish-task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 20px;
}

.release-publish-task-meta > .set-kv {
  grid-template-columns: auto minmax(0, 1fr);
}

.release-publish-job-log {
  max-height: min(480px, 60dvh);
  margin: 0;
  overflow: auto;
  padding: 10px;
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--surface-panel) 90%, #000 10%);
  color: var(--text-secondary);
  font: 11px/1.5 var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---- keyboard shortcut command index ---- */
.keyboard-shortcuts-detail {
  display: grid;
  align-content: start;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0 0 20px;
}

.keyboard-shortcuts-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.keyboard-shortcuts-summary > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.keyboard-shortcuts-summary strong {
  color: var(--text-primary);
  font-size: 12px;
}

.keyboard-shortcuts-summary span {
  color: var(--text-tertiary);
  font-size: 11px;
}

.keyboard-shortcuts-reset-confirm {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--state-warning) 38%, var(--border-subtle));
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--state-warning) 7%, var(--surface-panel));
  color: var(--text-secondary);
  font-size: 11px;
}

.keyboard-shortcuts-reset-confirm span {
  margin-right: auto;
}

.keyboard-shortcut-binding {
  min-width: 64px;
  min-height: 30px;
  padding: 3px 6px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 92%, transparent);
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--surface-raised) 92%, transparent);
  color: var(--text-tertiary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
  box-shadow: 0 1px 0 color-mix(in srgb, #fff 5%, transparent) inset;
}

.keyboard-shortcut-binding:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 38%, var(--border-subtle));
  background: var(--hover);
}

.keyboard-shortcut-keycaps {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.keyboard-shortcut-keycaps kbd {
  min-width: 22px;
  padding: 3px 5px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 96%, transparent);
  border-bottom-color: color-mix(in srgb, var(--text-tertiary) 46%, var(--border-subtle));
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface-raised) 94%, var(--surface-panel));
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 1px 0 color-mix(in srgb, #fff 7%, transparent) inset;
}

.keyboard-shortcut-plus {
  color: var(--text-tertiary);
  font-size: 9px;
}

.keyboard-shortcut-conflict {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: -2px;
  padding-top: 7px;
  border-top: 1px solid color-mix(in srgb, var(--state-warning) 25%, transparent);
  color: var(--state-warning);
  font-size: 10.5px;
}

.keyboard-shortcut-feedback {
  min-height: 30px;
  padding: 7px 9px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 72%, transparent);
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--surface-raised) 86%, transparent);
  color: var(--text-secondary);
  font-size: 10.5px;
  line-height: 1.35;
}

.keyboard-shortcut-feedback.is-warning {
  border-color: color-mix(in srgb, var(--state-warning) 30%, var(--border-subtle));
  color: var(--state-warning);
}

.keyboard-shortcut-feedback.is-error {
  border-color: color-mix(in srgb, var(--state-danger) 30%, var(--border-subtle));
  color: var(--state-danger);
}

.keyboard-shortcuts-live-region {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ============================================================
   Settings visual refresh — one content track, spacing-led groups,
   and flat root sections. Feature-specific controls retain their
   semantic borders, while navigation rows use whitespace and state.
   ============================================================ */

.settings-section-rows {
  overflow: hidden;
  border: 0;
  border-block: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.settings-row:hover {
  background: color-mix(in srgb, var(--hover) 72%, transparent);
  box-shadow: none;
}

.settings-subsection-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-disclosure-status {
  flex: 0 0 auto;
  margin-left: auto;
}

.settings-subsection-trigger .settings-row-chevron {
  flex: 0 0 auto;
  width: 14px;
  color: var(--text-tertiary);
  transition: none;
}

.settings-subsection-rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  padding: 0 0 4px 24px;
}

.settings-subsection-rows[hidden] {
  display: none;
}

/* ============================================================
   Settings detail visual refresh — one track, semantic surfaces,
   aligned headings, and shared controls for every detail route.
   ============================================================ */

.settings-detail-body > * {
  min-width: 0;
  max-width: var(--management-content-max-width, 840px);
  width: min(100%, var(--management-content-max-width, 840px));
  margin-inline: auto;
}

.settings-detail-stack {
  display: grid;
  min-width: 0;
  gap: 0;
}

.settings-detail-body .set-section-surface {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.settings-detail-body .set-card {
  gap: 14px;
  padding: 22px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.settings-detail-body .set-card-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.settings-detail-body .set-section-title::after {
  display: none;
}

.settings-detail-body .set-card-subtitle {
  font-weight: 400;
  white-space: normal;
  font-size: 12px;
  line-height: 1.5;
}

.settings-detail-body .set-kv-value.set-mono,
.settings-detail-body .set-field-label {
  font-size: 13px;
  font-weight: 400;
}

.settings-detail-body .set-card-head {
  gap: 10px;
  min-height: 28px;
}

.settings-detail-body .set-card-head > .sl-icon {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.settings-page-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.settings-section-heading {
  margin: 0;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.settings-detail-body h3.set-section-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.settings-page-footnote {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-top: 20px;
  font-size: 12px;
}

.settings-detail-body .set-muted {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

/* Section titles own the only decorative rule: it starts after the title. */
.set-section-title {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 8px;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
}

.set-section-title::after {
  content: '';
  display: block;
  flex: 1 1 auto;
  min-width: 16px;
  height: 1px;
  margin-left: 4px;
  background: color-mix(in srgb, var(--border-subtle) 78%, transparent);
}

h2.set-section-title,
h3.set-section-title {
  margin: 0;
  padding: 0;
}

.set-section-title .set-card-title,
.set-section-title .set-card-subtitle {
  flex: 0 1 auto;
}

.settings-detail-body .set-section-title > .sl-icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
}

.settings-detail-body .set-section-data {
  min-width: 0;
}

.settings-detail-body .set-section-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.settings-detail-body .set-status {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  font-size: 13px;
  font-weight: 400;
}

.settings-detail-body .set-section-feedback {
  min-width: 0;
}

.settings-detail-body .set-error.set-section-feedback,
.settings-detail-body .error.set-section-feedback {
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--state-danger) 34%, var(--border-subtle));
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--state-danger) 10%, transparent);
}

.settings-detail-body .set-section-empty {
  color: var(--text-secondary);
}

.settings-detail-body .set-field {
  gap: 6px;
}

.settings-detail-body .set-field-control {
  height: 36px;
  min-height: 34px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 400;
}

.settings-detail-body .set-field input {
  height: 36px;
  font-size: 14px;
  border-radius: 4px;
}

.settings-detail-body .set-field select {
  height: 36px;
  font-size: 13px;
  border-radius: 4px;
}

.settings-detail-body .set-card input:not([type='checkbox']) {
  height: 36px;
  font-size: 14px;
  border-radius: 4px;
}

.settings-detail-body .set-card select {
  height: 36px;
  font-size: 13px;
  border-radius: 4px;
}

.settings-detail-body .set-kv {
  line-height: 1.5;
  min-height: 22px;
  font-size: 12px;
}

.settings-detail-body .settings-metadata-list {
  border: 0;
  gap: 0;
}

.settings-detail-body .agent-package-status.set-status {
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 11px;
  line-height: 1;
}

.settings-detail-body .settings-database-storage-summary {
  margin: 0;
  gap: 16px;
  padding-top: 24px;
}

.settings-detail-body .settings-database-storage-metric.set-section-surface {
  padding: 4px 0;
  background: transparent;
}

.settings-detail-body .settings-database-store-list.set-section-surface {
  overflow: hidden;
  border-block: 1px solid var(--border-subtle);
  background: transparent;
}

.settings-detail-body .settings-database-dump.set-section-surface {
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--surface-panel);
  font-size: 12px;
  padding: 12px;
}

.settings-detail-body > .release-publish-page,
.settings-detail-body > .keyboard-shortcuts-detail {
  margin-block: 0;
  padding: 0 0 20px;
  gap: 0;
}

.settings-detail-body .keyboard-shortcuts-summary {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
}

.keyboard-map-header-actions,
.keyboard-map-close-hint,
.keyboard-map-editor-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.keyboard-map-close-hint { color: var(--text-secondary); font-size: 12px; }
.settings-detail-body .keyboard-map-close-hint kbd {
  padding: 3px 5px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--surface-raised);
}
.keyboard-map-container { container: shortcut-map / inline-size; }
.keyboard-map { position: relative; isolation: isolate; }
.keyboard-map-leaders {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  color: color-mix(in srgb, var(--text-secondary) 68%, var(--surface-panel));
}
.keyboard-map-leaders path { fill: none; stroke: currentColor; }
.keyboard-map-leaders circle { fill: currentColor; }
.keyboard-map-leaders [data-highlighted] { color: var(--accent-primary); stroke-width: 2; }
.keyboard-map-toolbar-bindings { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 38px; }
.keyboard-map-callout { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.keyboard-map-callout > span { color: var(--text-secondary); font-size: 12px; }
.keyboard-map-callout button { max-width: 100%; }
.keyboard-map-callout .keyboard-shortcut-keycaps { flex-wrap: wrap; justify-content: center; }
.keyboard-map-callout .keyboard-shortcut-keycaps kbd { min-width: auto; padding-inline: 3px; }
.settings-detail-body .keyboard-shortcuts-detail .keyboard-shortcut-binding {
  border: 1px solid var(--border-subtle);
  background: var(--surface-raised);
}
.settings-detail-body .keyboard-shortcuts-detail .keyboard-shortcut-binding:is(:hover, [aria-pressed='true']) {
  border-color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 9%, var(--surface-raised));
  color: var(--text-primary);
}
.keyboard-map-workspace { overflow: hidden; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--surface-sidebar); }
.keyboard-map-topbar, .keyboard-map-panes, .keyboard-map-pane-bindings { display: grid; grid-template-columns: 19% 24% minmax(0, 1fr); }
.keyboard-map-topbar { align-items: center; padding: 6px; }
.keyboard-map-sessions-label, .keyboard-map-chat-label { display: flex; align-items: center; gap: 5px; padding-inline: 6px; font-size: 11px; font-weight: 600; }
.keyboard-map-tools { display: flex; align-items: center; gap: 5px; min-width: 0; }
.keyboard-map-modules {
  display: grid;
  grid-template-columns: .85fr .75fr 1.15fr 1.2fr .9fr .9fr;
  flex: 1;
  gap: 2px;
  min-width: 0;
  padding: 2px;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--surface-raised);
}
.keyboard-map-modules > span { display: grid; place-items: center; min-height: 22px; border-radius: 12px; font-size: 11px; color: var(--text-secondary); }
.keyboard-map-modules > span:first-child { color: var(--text-primary); background: color-mix(in srgb, var(--accent-primary) 16%, var(--surface-raised)); }
.keyboard-map-fullscreen { display: grid; place-items: center; flex: 0 0 25px; min-height: 25px; border-radius: 6px; }
.keyboard-map-workspace [data-highlighted] { outline: 1px solid var(--accent-primary); outline-offset: -1px; color: var(--text-primary); }
.keyboard-map-panes { min-height: 112px; }
.keyboard-map-sessions, .keyboard-map-chat > div, .keyboard-map-preview > div { display: grid; align-content: start; gap: 7px; }
.keyboard-map-sessions { padding: 14px 10px; }
.keyboard-map-chat, .keyboard-map-preview { border: 1px solid var(--border-subtle); border-bottom: 0; background: var(--surface-workspace-content); }
.keyboard-map-chat { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 14px 10px; border-radius: 9px 9px 0 0; }
.keyboard-map-chat > span { height: 20px; border: 1px solid var(--border-subtle); border-radius: 6px; }
.keyboard-map-preview { margin-left: 5px; border-radius: 9px 0 0 0; }
.keyboard-map-preview > span { display: block; padding: 4px 8px; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); font-size: 11px; }
.keyboard-map-preview > div { padding: 12px 10px; }
.keyboard-map-panes i { height: 4px; width: 85%; border-radius: 4px; background: var(--border-subtle); }
.keyboard-map-panes i:nth-child(2n) { width: 64%; }
.keyboard-map-panes i:nth-child(3n) { width: 45%; }
.keyboard-map-pane-bindings { margin-top: 22px; }
.keyboard-map-pane-bindings > :last-child { grid-column: 3; }
.keyboard-map-pane-bindings button { order: -1; }
.keyboard-map-extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-subtle); }
.keyboard-map-group h3 { margin: 0 0 6px; font-size: 13px; font-weight: 650; }
.keyboard-map-list-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); font-size: 12px; }
.keyboard-map-editor {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--accent-primary) 8%, var(--surface-raised));
  color: var(--text-secondary);
  font-size: 12px;
}
.keyboard-map-editor strong { color: var(--text-primary); }
.keyboard-map-editor .keyboard-shortcut-conflict { margin: 0; padding: 0; border: 0; background: none; }

@container shortcut-map (max-width: 620px) {
  .keyboard-map-toolbar-bindings { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 10px; margin-bottom: 12px; }
  .keyboard-map-topbar { grid-template-columns: 1fr 1fr; gap: 5px; }
  .keyboard-map-tools { grid-column: 1 / -1; }
  .keyboard-map-panes, .keyboard-map-pane-bindings { grid-template-columns: 26% 23% minmax(0, 1fr); }
  .keyboard-map-leaders g:not([data-pane]) { display: none; }
}

@media (max-width: 1000px) {
  .keyboard-map-extra { grid-template-columns: minmax(0, 1fr); }
}

.settings-detail-body .debug-log-detail {
  height: auto;
  min-height: 0;
}

.settings-detail-body .debug-log-list.set-section-surface {
  border: 1px solid color-mix(in srgb, var(--border-subtle) 84%, transparent);
  border-radius: 8px;
  background: var(--surface-panel);
}

@media (max-width: 720px) {
  .settings-detail-body > *,
  .settings-detail-body > .settings-detail-stack {
    width: 100%;
  }
}

@media (max-width: 560px) {

  .settings-detail-body .set-section-title::after {
    min-width: 12px;
  }

  .settings-detail-body .settings-database-storage-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-detail-body .settings-database-store-list-header,
  .settings-detail-body .settings-database-store-row {
    grid-template-columns: minmax(0, 1fr) 52px 78px;
  }
}

/* Shared detail content follows the same centered reading column as Hubs. */
.settings-detail-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 13px;
  padding: 28px 32px 40px;
  scrollbar-gutter: auto;
  color: var(--text-primary);
}

.settings-detail-body .settings-maintenance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 20px;
  min-height: 68px;
  padding-block: 14px;
}

.settings-maintenance-row + .settings-maintenance-row {
  border-top: 1px solid var(--border-subtle);
}

.settings-maintenance-row > div {
  min-width: 0;
}

.settings-maintenance-row p {
  margin: 4px 0 0;
}

.settings-detail-body .settings-metadata-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
  padding: 24px 0;
}

.settings-detail-body h3.settings-metadata-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.settings-detail-body .settings-metadata-card > .set-status {
  grid-column: 2;
  grid-row: 1;
  font-size: 12px;
}

.settings-metadata-card > .set-status,
.settings-metadata-card > .settings-connection-value,
.settings-metadata-card > .settings-metadata-title {
  grid-column: 2;
}

.settings-detail-body .settings-connection-value {
  font-size: 13px;
  line-height: 1.5;
}

.settings-detail-body .settings-database-storage-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 32px;
}

.settings-detail-body .settings-database-storage-metric {
  grid-template-columns: minmax(72px, 1fr) minmax(0, 1fr);
  align-items: baseline;
  padding: 10px 0;
}

.settings-detail-body .settings-database-storage-metric strong {
  font-size: 13px;
  font-weight: 500;
}

.settings-detail-body .settings-database-storage-note {
  grid-column: 1 / -1;
}

.settings-detail-body .settings-database-store-list-header {
  font-size: 13px;
  text-transform: none;
}

.settings-detail-body .settings-database-store-row {
  font-size: 13px;
  padding-block: 13px;
}

.settings-detail-body .settings-database-storage-label,
.settings-detail-body .settings-database-session-files-status,
.settings-detail-body .settings-database-session-files-toggle {
  font-size: 13px;
}

.settings-detail-body .database-clear-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.database-clear-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.settings-detail-body .settings-database-session-files {
  border-block: 0;
  padding: 22px 0;
  gap: 16px;
}

.settings-detail-body .settings-database-session-files-metrics > div {
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 4px;
}

.settings-detail-body .settings-database-dump {
  font-size: 12px;
  max-height: 160px;
}

.settings-database-dump-section {
  display: grid;
  gap: 10px;
}

.settings-database-session-files-status[data-available='true'] {
  color: var(--state-success);
}

.settings-detail-body .keyboard-shortcut-keycaps kbd {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 400;
  box-shadow: none;
}

.settings-detail-body .keyboard-shortcut-binding {
  padding-inline: 10px;
  background: transparent;
  box-shadow: none;
  min-height: 32px;
  border-radius: 4px;
}

.settings-detail-body .release-publish-page .set-field,
.settings-detail-body .wiki-access-field {
  display: grid;
  align-items: center;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 8px 16px;
}

.settings-detail-body .wiki-access-field .set-field-note {
  grid-column: 2;
}

.settings-detail-body .wiki-access-toggle-label {
  font-size: 13px;
  font-weight: 400;
}

.settings-detail-body .wiki-access-actions a {
  text-decoration: none;
}

.settings-detail-body .wiki-access-toggle-note {
  font-size: 12px;
}

.settings-detail-body .set-field-note {
  font-size: 12px;
  line-height: 1.5;
}

.settings-detail-body .wiki-access-card-head .set-section-title {
  flex: 0 1 auto;
  margin-right: 4px;
}

.settings-detail-body .release-publish-page .set-muted {
  font-size: 12px;
}

.release-publish-check-note {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.settings-detail-body .release-publish-version,
.settings-detail-body .release-publish-temporary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 20px;
}

.release-publish-version .release-publish-options,
.release-publish-temporary > p:first-child {
  grid-column: 1 / -1;
}

.release-publish-version .release-publish-actions {
  grid-column: 2;
  grid-row: 2;
}

.release-publish-temporary .release-publish-actions {
  grid-column: 2;
  grid-row: 2 / 4;
}

.release-publish-temporary > .set-muted:not(:first-child) {
  grid-column: 1;
}

.settings-detail-body .release-publish-storage {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(90px, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.settings-detail-body .release-publish-storage .set-kv {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.release-publish-storage .set-kv-value {
  font-size: 16px;
}

.settings-detail-body .release-publish-job-log {
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  padding: 12px;
  border-radius: 4px;
}

.settings-detail-body .set-card-body {
  gap: 14px;
}

.settings-detail-body .device-session-meta {
  position: relative;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
  gap: 10px 32px;
  padding-top: 2px;
}

.settings-detail-body .device-session-card .set-section-title {
  flex: 1 1 auto;
  justify-content: flex-start;
}

.settings-detail-body .device-session-name {
  font-size: 14px;
  font-weight: 600;
}

.settings-detail-body .device-hub-name {
  font-size: 14px;
  font-weight: 600;
}

.settings-detail-body .device-hub-card .device-session-meta {
  grid-auto-flow: row;
  grid-template-rows: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@container settings-detail (max-width: 540px) {
  .settings-detail-body .device-hub-card .device-session-meta {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .settings-detail-body .device-hub-card .device-session-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .device-sessions-stack .overlay-button {
    min-height: 44px;
  }
}

@container settings-detail (max-width: 540px) {
  .settings-detail-body .release-publish-version,
  .settings-detail-body .release-publish-temporary,
  .settings-detail-body .release-publish-storage,
  .settings-detail-body .database-clear-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .release-publish-version .release-publish-actions,
  .release-publish-temporary .release-publish-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .settings-detail-body .device-session-meta > :nth-child(n + 4) {
    padding-left: 0;
  }

  .settings-detail-body .device-session-meta::after {
    display: none;
  }

  .settings-detail-body .set-card-head {
    flex-wrap: wrap;
  }

  .settings-detail-body .set-card-title {
    white-space: normal;
  }

  .settings-detail-body .set-card-head > .set-section-title:has(> .set-card-subtitle) {
    display: grid;
    flex: 1 1 180px;
    gap: 4px;
  }

  .settings-detail-body .device-session-meta {
    grid-auto-flow: row;
    grid-template-rows: none;
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-detail-body .keyboard-shortcut-command,
  .settings-detail-body .release-publish-page .set-field,
  .settings-detail-body .wiki-access-field {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-detail-body .wiki-access-field .set-field-note {
    grid-column: 1;
  }

  .settings-detail-body .wiki-access-link-row {
    grid-template-columns: minmax(0, 1fr);
  }

}

.mobile-settings-screen .settings-page-title-row:empty {
  display: none;
}

.wiki-access-description {
  max-width: 64ch;
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.wiki-access-inline-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.wiki-access-inline-message .sl-icon {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--text-tertiary);
}

.wiki-access-inline-message.set-error .sl-icon {
  color: var(--state-danger);
}

.wiki-access-form {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.wiki-access-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 12px;
}

.wiki-access-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 9px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: border-color var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard);
}

.wiki-access-toggle:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 34%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent-primary) 4%, var(--surface-raised));
}

.wiki-access-toggle-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.wiki-access-toggle-label {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.wiki-access-toggle-note {
  color: var(--text-tertiary);
  font-size: 11px;
  line-height: 1.35;
}

.wiki-access-fields {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.wiki-access-field {
  min-width: 0;
}

.wiki-access-field .set-field-control {
  width: 100%;
}

.set-field-note {
  color: var(--text-tertiary);
  font-size: 11px;
  line-height: 1.4;
}

.wiki-access-public-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 22%, var(--border-subtle));
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--accent-primary) 7%, var(--surface-raised));
  color: var(--text-secondary);
  font-size: 11.5px;
  line-height: 1.45;
}

.wiki-access-public-note .sl-icon {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--accent-primary);
}

.wiki-access-form-actions {
  padding-top: 2px;
}

.wiki-access-save-status {
  gap: 5px;
  margin-left: 2px;
}

.wiki-access-save-status .sl-icon {
  flex: 0 0 auto;
}

.wiki-access-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.wiki-access-link {
  width: 100%;
  min-width: 0;
}

.wiki-access-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.wiki-access-hint {
  margin: 0;
}

@media (max-width: 560px) {
  .wiki-access-toggle {
    align-items: flex-start;
  }

  .wiki-access-toggle .settings-switch {
    margin-top: 1px;
  }

  .wiki-access-link-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .wiki-access-actions {
    width: 100%;
  }
}

.chat-api-settings {
  margin-top: 12px;
  border-top: 1px solid var(--border-color, #8883);
  padding-top: 10px;
}
.chat-api-settings > summary {
  cursor: pointer;
  font-weight: 600;
}
.chat-api-settings-body,
.chat-api-key-form,
.chat-api-key-form fieldset {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.chat-api-settings-body {
  padding-top: 10px;
}
.chat-api-key-form fieldset {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--border-color, #8883);
  border-radius: 6px;
}
.chat-api-key-form label,
.chat-api-created-key label {
  display: grid;
  gap: 5px;
  font-size: 12px;
}
.chat-api-key-form input:not([type='checkbox']),
.chat-api-key-form select,
.chat-api-created-key input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.chat-api-setting-row,
.chat-api-key-actions,
.chat-api-effort-options {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.chat-api-setting-row {
  justify-content: space-between;
}
.chat-api-key-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color, #8883);
}
.chat-api-key-row strong,
.chat-api-key-row .chat-hub-settings-hint {
  display: block;
  overflow-wrap: anywhere;
}
.chat-api-key-actions {
  margin-top: 6px;
}
.chat-api-effort-options label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.settings-detail-body .settings-section-heading {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}
.settings-detail-body .settings-metadata-card > .settings-metadata-title {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}
.settings-detail-body .settings-metadata-card > .settings-connection-value {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.settings-detail-body .device-session-meta > :nth-child(n + 4) {
  padding-left: 0;
}
.settings-detail-body .settings-database-store-list {
  padding-top: 18px;
}
.settings-detail-body .settings-database-store-name {
  font-size: 12px;
}
.settings-detail-body .settings-database-dump-section {
  gap: 12px;
  padding: 22px 0 0;
}
.settings-detail-body .database-clear-card .set-card-title,
.settings-detail-body .database-clear-card h3.set-section-title {
  font-size: 15px;
}
.settings-detail-body .wiki-access-toggle {
  padding: 10px 0;
  min-height: 68px;
  border-radius: 0;
}
.settings-detail-body .wiki-access-fields {
  gap: 18px;
  padding-top: 12px;
}
.settings-detail-body .wiki-access-form-actions {
  padding-top: 8px;
}
.settings-detail-body .release-publish-options {
  gap: 12px 24px;
}
@media (max-width: 600px) {
  .settings-detail-body .set-card-head {
    flex-wrap: nowrap;
  }
  .settings-detail-body .set-card-head > .set-section-title:has(> .set-card-subtitle) {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
  }
  .settings-detail-body .wiki-access-field,
  .settings-detail-body .release-publish-page .set-field {
    grid-template-columns: minmax(0, 1fr);
  }
  .settings-detail-body .wiki-access-field .set-field-note {
    grid-column: 1;
  }
  .settings-detail-body .release-publish-options {
    flex-direction: column;
    align-items: stretch;
  }
  .settings-detail-body .release-publish-options label {
    justify-content: flex-start;
  }
  .settings-detail-body .release-publish-actions {
    width: 100%;
  }
  .settings-detail-body .release-publish-storage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-detail-body .release-publish-storage .release-publish-actions {
    grid-column: 1/-1;
    flex-wrap: wrap;
  }
  .settings-detail-body .device-session-meta {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    grid-template-rows: none;
  }
  .settings-detail-body .device-session-card .set-card-head {
    flex-wrap: wrap;
  }
  .settings-detail-body .device-session-card .set-card-head > .set-section-title {
    flex: 1 1 180px;
  }
  .settings-detail-body .settings-database-storage-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
  .settings-detail-body .settings-database-store-list-header {
    display: none;
  }
  .settings-detail-body .settings-database-store-row {
    grid-template-columns: 1fr auto;
  }
  .settings-detail-body .settings-database-store-name {
    grid-column: 1/-1;
    overflow-wrap: anywhere;
  }
  .settings-detail-body .settings-database-store-row > :nth-child(2)::before {
    content: 'Rows ';
    color: var(--text-secondary);
  }
  .settings-detail-body .settings-database-store-row > :nth-child(3)::before {
    content: 'Approx ';
    color: var(--text-secondary);
  }
  .settings-detail-body .database-clear-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

.port-relay-frame-surface {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  color: var(--text-primary);
}

.port-relay-frame {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border: 0;
  background: #ffffff;
}

.debug-log-detail {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.debug-log-list {
  min-height: 0;
  display: grid;
  gap: 4px;
}

.debug-log-empty {
  padding: 14px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-panel);
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--surface-raised) 82%, var(--surface-panel));
  font-size: 12px;
}

.debug-log-line {
  border: 1px solid var(--border-subtle);
  border-left: 3px solid color-mix(in srgb, var(--text-secondary) 72%, transparent);
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--surface-raised) 76%, var(--surface-panel));
  color: color-mix(in srgb, var(--text-primary) 90%, var(--text-secondary));
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.35;
  padding: 6px 7px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.debug-log-line.info {
  border-left-color: color-mix(in srgb, var(--accent-primary) 72%, transparent);
}

.debug-log-line.warn {
  border-left-color: var(--state-warning);
}

.debug-log-line.error {
  border-left-color: var(--state-danger);
}

.debug-log-detail-footer {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--surface-panel) 96%, transparent);
  padding: 10px 2px 2px;
  display: grid;
  gap: 8px;
}

.debug-log-category-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.debug-log-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.debug-log-upload-status {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Debug logs share the Settings detail track instead of adding another card. */

.settings-detail-body > .debug-log-detail .debug-log-empty {
  border-radius: var(--radius-control);
  background: transparent;
}

.settings-detail-body > .debug-log-detail .debug-log-detail-footer {
  padding: 10px 0 2px;
  background: transparent;
}

/* Settings detail visual refresh — logs keep one readable data surface and
   leave the section title and action footer on the shared Settings rhythm. */
.settings-detail-body > .debug-log-detail {
  height: auto;
  gap: 0;
}

.settings-detail-body > .debug-log-detail .debug-log-list.set-section-surface {
  gap: 0;
  border-block: 1px solid var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 6px 14px;
  background: var(--surface-panel);
}

.settings-detail-body > .debug-log-detail .debug-log-empty.set-section-empty {
  padding: 8px 0;
  border: 0;
  background: transparent;
}

.settings-detail-body > .debug-log-detail .debug-log-line {
  border-radius: 0;
  background: transparent;
  font-family: var(--font-mono);
  border: 0;
  display: grid;
  font-size: 12px;
  line-height: 1.6;
  min-height: 44px;
  align-content: center;
  padding: 12px 0;
  color: var(--text-primary);
  grid-template-columns: 100px 48px minmax(0, 1fr);
  gap: 12px;
}

.debug-log-time {
  color: var(--text-secondary);
}

.debug-log-level {
  text-transform: uppercase;
}

.debug-log-line.info .debug-log-level {
  color: var(--state-info);
}

.debug-log-message {
  min-width: 0;
  overflow-wrap: anywhere;
}

@container settings-detail (max-width: 540px) {
  .settings-detail-body > .debug-log-detail .debug-log-line {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 4px 10px;
  }

  .debug-log-message {
    grid-column: 1 / -1;
  }
}

.debug-log-toolbar {
  justify-content: flex-start;
}

.debug-log-toolbar .debug-log-category-label {
  gap: 12px;
  font-weight: 400;
}

.debug-log-toolbar .debug-log-category-label select {
  width: 136px;
  max-width: none;
}

.debug-log-toolbar > .set-muted {
  margin-left: 8px;
}

.debug-log-toolbar .debug-log-actions {
  margin-left: auto;
}

.debug-log-toolbar .debug-log-category-label .set-section-title {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 400;
}

.settings-detail-body > .debug-log-detail .debug-log-detail-footer.set-section-actions {
  padding: 8px 0 0;
  border-top: 0;
  background: transparent;
}

.settings-detail-body .debug-log-toolbar {
  padding: 20px 0 18px;
  gap: 12px;
}

.settings-detail-body > .debug-log-detail .debug-log-line + .debug-log-line {
  border-top: 1px solid var(--border-subtle);
}

.debug-log-line.warn .debug-log-level {
  color: var(--state-warning);
}

.debug-log-line.error .debug-log-level {
  color: var(--state-danger);
}

@media (max-width: 600px) {
  .settings-detail-body .debug-log-toolbar {
    display: flex;
    flex-wrap: wrap;
  }
  .settings-detail-body .debug-log-toolbar > .set-muted {
    margin-left: auto;
  }
  .settings-detail-body .debug-log-actions {
    width: 100%;
    margin: 0;
  }
  .settings-detail-body > .debug-log-detail .debug-log-line {
    grid-template-columns: 1fr auto;
  }
  .settings-detail-body .debug-log-message {
    grid-column: 1/-1;
    overflow-wrap: anywhere;
  }
}

.workbench-chrome {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  color: var(--text-primary);
  background: var(--surface-workspace-content);
}

.workbench-chrome-toolbar {
  display: grid;
  grid-template-columns: var(--workbench-control-height) minmax(80px, 1fr) auto;
  flex: 0 0 var(--workbench-titlebar-height);
  height: var(--workbench-titlebar-height);
  min-height: var(--workbench-titlebar-height);
  max-height: var(--workbench-titlebar-height);
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 8px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-sidebar);
}

.workbench-chrome-toolbar.no-close {
  grid-template-columns: minmax(80px, 1fr) auto;
}

.workbench-chrome-toolbar.has-leading,
.workbench-chrome-toolbar.no-close.has-leading {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.workbench-chrome-toolbar.no-title {
  grid-template-columns: minmax(0, 1fr) auto;
}

.workbench-chrome-toolbar.no-title.has-leading {
  grid-template-columns: minmax(0, 1fr) auto;
}

.workbench-chrome-toolbar.no-title.has-leading:not(.no-close) {
  grid-template-columns: var(--workbench-control-height) minmax(0, 1fr) auto;
}

.workbench-chrome-toolbar.no-title.has-leading:not(.no-close) .workbench-chrome-leading {
  grid-column: 2;
}

.workbench-chrome-toolbar.no-title.has-leading:not(.no-close) .workbench-chrome-actions {
  grid-column: 3;
}

.workbench-chrome-leading {
  min-width: 0;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 4px;
}

.workbench-chrome-toolbar.has-leading .workbench-chrome-leading {
  grid-column: 1;
}

.workbench-chrome-toolbar.has-leading .workbench-chrome-title {
  grid-column: 2;
  text-align: center;
}

.workbench-chrome-toolbar.has-leading .workbench-chrome-actions {
  grid-column: 3;
  justify-self: end;
}

.workbench-chrome-toolbar.no-title .workbench-chrome-leading {
  grid-column: 1;
  width: 100%;
}

.workbench-chrome-toolbar.no-title .workbench-chrome-actions {
  grid-column: 2;
  justify-self: end;
  flex: 0 0 auto;
}

.workbench-chrome-title {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-workbench-content-kind-picker {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
}

.preview-workbench-content-kind-tabs {
  min-width: 0;
  max-width: 100%;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: stretch;
  height: 100%;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.preview-workbench-content-kind-tabs::-webkit-scrollbar {
  display: none;
}

.preview-workbench-content-kind-more {
  flex: 0 0 24px;
  width: 24px;
  height: var(--workbench-control-height);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.preview-workbench-content-kind-more:hover,
.preview-workbench-content-kind-more[aria-expanded='true'] {
  background: var(--hover);
  color: var(--text-primary);
}

.preview-workbench-content-kind-menu {
  position: fixed;
  z-index: 140;
  min-width: min(180px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  display: grid;
  padding: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  background: var(--surface-panel);
  color: var(--text-primary);
  box-shadow: var(--shadow-overlay);
}

.preview-workbench-content-kind-menu > button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border: 0;
  border-radius: 4px;
  padding: 4px 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.preview-workbench-content-kind-menu > button:hover:not(:disabled),
.preview-workbench-content-kind-menu > button[aria-checked='true'] {
  background: var(--hover);
  color: var(--accent-primary);
}

.preview-workbench-content-kind-menu > button:disabled {
  opacity: 0.45;
  cursor: default;
}

.preview-workbench-content-actions[hidden] {
  display: none;
}

.preview-workbench-content-kind-menu-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
}

.preview-workbench-content-kind {
  position: relative;
  min-width: 0;
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  width: 36px;
  justify-content: center;
  padding: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  transition:
    color var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}

.preview-workbench-content-kind:not(.active):is(:hover, :focus-visible):not(:disabled) {
  color: var(--text-primary);
  background: var(--hover);
}

.preview-workbench-content-kind.active {
  color: var(--text-primary);
  background: transparent;
}

.preview-workbench-content-kind.active::after {
  content: '';
  position: absolute;
  inset: auto 8px 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-primary);
}

.preview-workbench-content-kind:disabled {
  opacity: 0.45;
  cursor: default;
}

.preview-workbench-content-kind .sl-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.preview-workbench-content-kind-count {
  position: absolute;
  top: 1px;
  right: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 14px;
  height: 14px;
  box-sizing: border-box;
  padding-inline: 3px;
  border-radius: 4px;
  background: var(--surface-raised);
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.preview-workbench-content-kind-menu .preview-workbench-content-kind-count {
  position: static;
  margin-left: auto;
}

.preview-workbench-content-kind-picker.rail {
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
  width: 42px;
  height: auto;
}

.preview-workbench-content-kind-bar,
.preview-workbench-content-kind-collapse {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface-panel);
}

.preview-workbench-content-kind-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 100%;
  height: 42px;
  padding: 0;
  color: var(--state-info);
  background: var(--accent-soft-bg);
  cursor: pointer;
}

.preview-workbench-content-kind-collapse:hover,
.preview-workbench-content-kind-collapse:focus-visible {
  color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 24%, transparent);
}

.preview-workbench-content-kind-picker.rail .preview-workbench-content-kind-tabs {
  flex: 0 0 auto;
  flex-direction: column;
  height: auto;
  gap: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.preview-workbench-content-kind-picker.rail .preview-workbench-content-kind {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  isolation: isolate;
}

.preview-workbench-content-kind-picker.rail .preview-workbench-content-kind:is(.active, :hover, :focus-visible) {
  background: transparent;
}

.preview-workbench-content-kind-picker.rail .preview-workbench-content-kind::before {
  content: '';
  position: absolute;
  inset: 3px;
  z-index: -1;
  border-radius: 999px;
}

.preview-workbench-content-kind-picker.rail .preview-workbench-content-kind:not(.active, :disabled):is(:hover, :focus-visible)::before {
  background: var(--hover);
}

.preview-workbench-content-kind-picker.rail .preview-workbench-content-kind + .preview-workbench-content-kind {
  border-top: 1px solid var(--border-subtle);
}

.preview-workbench-content-kind-picker.rail .preview-workbench-content-kind.active::after {
  display: none;
}

.preview-workbench-content-kind-picker.rail .preview-workbench-content-kind .sl-icon {
  display: block;
  width: 20px;
  height: 20px;
}

.workbench-chrome-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
}

.workbench-chrome-action-group {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
}

.workbench-chrome-action-group:empty {
  display: none;
}

.preview-workbench-host-actions {
  margin-left: 2px;
}

.workbench-chrome .chat-preview-icon-button {
  width: var(--workbench-control-height);
  height: var(--workbench-control-height);
  border-radius: var(--radius-control);
}

.workbench-chrome-icon-button,
.workbench-chrome-fullscreen-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
}

.workbench-chrome-icon-button {
  width: var(--workbench-control-height);
  height: var(--workbench-control-height);
  border-radius: var(--radius-control);
}

.workbench-chrome-icon-button:hover,
.workbench-chrome-fullscreen-toggle:hover {
  color: var(--text-primary);
  background: var(--hover);
}

.workbench-chrome-tabs {
  display: flex;
  flex: 0 0 var(--workbench-tabbar-height);
  align-items: center;
  gap: 4px;
  padding: 3px 4px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  border-bottom: 1px solid var(--border-faint);
  background: var(--surface-sidebar);
  scrollbar-width: none;
}

.workbench-chrome-tabs::-webkit-scrollbar {
  display: none;
}

.workbench-chrome-tabs-row {
  display: flex;
  flex: 0 0 var(--workbench-tabbar-height);
  align-items: stretch;
  min-width: 0;
  border-bottom: 1px solid var(--border-faint);
  background: var(--surface-sidebar);
}

.workbench-chrome-tabs-row > .workbench-chrome-tabs {
  flex: 1 1 auto;
  min-width: 0;
  border-bottom: 0;
  background: transparent;
}

.workbench-chrome-tabs-accessory {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 4px;
}

.workbench-chrome-inline-toolbar {
  align-items: center;
  gap: 4px;
  padding: 0 4px 0 0;
}

.workbench-chrome-inline-toolbar > .workbench-chrome-actions,
.workbench-chrome-inline-toolbar > .workbench-chrome-close {
  flex: 0 0 auto;
}

.workbench-tab {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  flex: 0 0 auto;
  min-width: 104px;
  max-width: 190px;
  height: var(--workbench-control-height);
  border-radius: var(--radius-control);
  color: var(--text-secondary);
  background: transparent;
}

.workbench-tab.no-close {
  grid-template-columns: minmax(0, 1fr);
}

.workbench-tab:hover {
  color: var(--text-primary);
  background: var(--hover);
}

.workbench-tab.active {
  color: var(--text-primary);
  background: var(--surface-active);
}

.workbench-tab-open,
.workbench-tab-close {
  min-width: 0;
  height: 100%;
  border: 0;
  border-radius: inherit;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.workbench-tab-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  overflow: hidden;
  text-align: left;
  white-space: nowrap;
  font-size: 12px;
}

.workbench-tab.active .workbench-tab-open {
  font-weight: 500;
}

.workbench-tab-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-tab-close {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 24px;
  opacity: 0;
}

.workbench-tab:hover .workbench-tab-close,
.workbench-tab.active .workbench-tab-close,
.workbench-tab:focus-within .workbench-tab-close {
  opacity: 0.8;
}

.workbench-tab-close:hover {
  color: var(--state-danger);
  background: var(--hover);
  opacity: 1;
}

.preview-workbench-terminal {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.preview-workbench-terminal[hidden] {
  display: none;
}

@media (pointer: coarse) {
  .workbench-tab-close {
    opacity: 0.65;
  }
}

.workbench-chrome-body {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.workbench-chrome-content-row {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.workbench-chrome-companion-drawer,
.workbench-chrome-companion-main {
  min-width: 0;
  min-height: 0;
}

.workbench-chrome-companion-drawer {
  flex: 0 0 min(360px, calc(100% - 56px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workbench-chrome-companion-main {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workbench-chrome-companion-main > .workbench-chrome-tabs,
.workbench-chrome-companion-main > .workbench-chrome-tabs-row {
  flex: 0 0 var(--workbench-tabbar-height);
}

.workbench-chrome-companion-main > .workbench-chrome-body {
  flex: 1 1 auto;
}

.preview-workbench-surface .preview-workbench-drawer-panel.is-picker {
  inset: auto;
  width: min(360px, calc(100vw - 20px));
  height: auto;
  flex: 0 0 auto;
  z-index: 11;
}

.preview-workbench-drawer-toolbar {
  flex: 0 0 auto;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-panel);
}

.preview-workbench-drawer-primary-control {
  min-width: 0;
  min-height: 28px;
  flex: 1 1 auto;
}

.preview-workbench-drawer-icon-button {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.preview-workbench-drawer-icon-button:hover:not(:disabled) {
  background: var(--hover);
  color: var(--text-primary);
}

.preview-workbench-drawer-icon-button.active {
  background: var(--accent-soft-bg);
  color: var(--accent-primary);
}

.preview-workbench-drawer-icon-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.workbench-chrome-resource-tabs {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}

.workbench-chrome-resource-tabs > .workbench-chrome-tabs {
  flex: 1 1 auto;
  align-self: stretch;
  border-bottom: 0;
  background: transparent;
}

.workbench-chrome-resource-tabs > :not(.workbench-chrome-tabs) {
  flex: 0 0 auto;
}

.preview-page-actions,
.preview-common-tools,
.preview-titlebar-tools {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
}

.preview-page-actions,
.terminal-workbench .workbench-chrome-inline-toolbar > .workbench-chrome-actions {
  padding-left: 6px;
  margin-left: 4px;
  border-left: 1px solid var(--border-subtle);
}

.preview-common-tools.desktop {
  padding-inline: 4px;
}

.preview-common-tools .chat-preview-icon-button {
  width: 28px;
  height: 28px;
}

.preview-titlebar-tools {
  align-self: stretch;
  gap: 0;
}

.preview-titlebar {
  position: relative;
  width: max(0px, calc(var(--preview-titlebar-width, 0px) - var(--chat-window-controls-reserve, 0px)));
  max-width: calc(100vw - var(--chat-session-panel-width) - var(--chat-window-controls-reserve, 0px));
  height: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding-left: 4px;
  overflow: hidden;
}

.preview-titlebar::before {
  content: '';
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 1px;
  background: var(--border-subtle);
  pointer-events: none;
}

.preview-titlebar > .preview-titlebar-tools {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: auto;
}

.desktop-shell[data-inline-preview-maximized='true'][data-sessions-collapsed='true'] .preview-titlebar::before {
  background: transparent;
}

.chat-title-actions:has(> .preview-titlebar) {
  align-self: stretch;
  gap: 0;
}

.preview-titlebar-tools > .preview-common-tools.desktop {
  margin-left: auto;
  align-self: stretch;
  gap: 0;
  padding-inline: 0;
}

.preview-titlebar-tools .preview-common-tools.desktop .chat-preview-icon-button {
  width: 46px;
  height: 100%;
  border-radius: 0;
}

.desktop-shell > .chat-title-bar:has(.preview-titlebar) {
  padding-right: var(--chat-window-controls-reserve, 0px);
}

.preview-workbench-surface.desktop > .workbench-chrome-body > .preview-common-tools {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 10;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface-panel);
}

.preview-workbench-inner-navigation {
  position: absolute;
  top: calc(var(--workbench-tabbar-height) + 8px);
  left: 8px;
  z-index: 10;
}

.preview-workbench-surface.has-inner-navigation:not(.companion-layout) .preview-workbench-body {
  padding-left: 58px;
}

.preview-workbench-surface.desktop.has-inner-navigation > .workbench-chrome-content-row {
  padding-left: 58px;
}

.preview-workbench-surface.companion-layout .preview-workbench-inner-navigation,
.preview-workbench-surface.is-focused .preview-workbench-inner-navigation {
  top: 8px;
}

.preview-workbench-surface.is-focused .preview-workbench-body {
  padding-left: 0;
}

.preview-workbench-surface.desktop.fullscreen-layout .preview-workbench-inner-navigation {
  inset: 0 auto 0 0;
  width: 52px;
  box-sizing: border-box;
  border-right: 1px solid var(--border-subtle);
  background: var(--surface-sidebar);
}

.preview-workbench-surface.desktop.fullscreen-layout.has-inner-navigation > .workbench-chrome-content-row {
  padding-left: 52px;
}

.preview-workbench-surface.desktop.fullscreen-layout:not(.companion-layout) > .workbench-chrome-tabs-row {
  margin-left: 52px;
}

.preview-workbench-surface.desktop.fullscreen-layout.has-inner-navigation:not(.companion-layout) .preview-workbench-body {
  padding-left: 52px;
}

.preview-workbench-surface.fullscreen-layout .preview-workbench-content-kind-picker.rail {
  width: 100%;
  height: 100%;
}

.preview-workbench-surface.fullscreen-layout .preview-workbench-content-kind-picker.rail .preview-workbench-content-kind-tabs {
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.preview-workbench-surface.fullscreen-layout .preview-workbench-content-kind-bar,
.preview-workbench-surface.fullscreen-layout .preview-workbench-content-kind-collapse {
  border: 0;
  border-radius: 0;
}

.preview-workbench-surface.fullscreen-layout .preview-workbench-content-kind-bar {
  background: transparent;
}

.preview-workbench-surface.fullscreen-layout .preview-workbench-content-kind-collapse {
  flex-basis: 48px;
  height: 48px;
}

.preview-workbench-surface.fullscreen-layout .preview-workbench-content-kind-picker.rail .preview-workbench-content-kind {
  flex: 0 0 48px;
  width: 100%;
  height: 48px;
  border: 0;
}

.preview-workbench-surface.fullscreen-layout .preview-workbench-content-kind-picker.rail .preview-workbench-content-kind.active::after {
  display: none;
}

.preview-workbench-surface.fullscreen-layout .preview-workbench-content-kind-picker.rail .sl-icon {
  width: 22px;
  height: 22px;
}

.preview-workbench-surface.fullscreen-layout .preview-workbench-content-kind-count {
  display: none;
}

.preview-workbench-surface.fullscreen-layout [data-preview-content-kind='browser'] .preview-workbench-content-kind-count {
  display: grid;
  top: 3px;
  right: 4px;
}

.preview-empty-resource-label {
  padding-inline: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.preview-workbench-surface .terminal-keybar {
  border-top-color: var(--border-subtle);
  background: var(--surface-workspace-content);
}

.preview-workbench-surface .terminal-keybar button {
  border-color: var(--border-subtle);
  border-radius: var(--radius-control);
  background: var(--surface-sidebar);
  color: var(--text-secondary);
}

.preview-workbench-surface .terminal-keybar button[aria-pressed='true'] {
  border-color: var(--accent-primary);
  background: var(--accent-soft-bg);
  color: var(--accent-primary);
}

.workbench-popover {
  z-index: 140;
  min-width: min(240px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-popup);
  background: var(--surface-panel);
  color: var(--text-primary);
  box-shadow: var(--shadow-overlay);
  font-size: 12px;
}

.workbench-popover.preview-workbench-tabs-overflow-list {
  right: auto;
  min-width: min(260px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  box-shadow: var(--shadow-overlay);
}

.preview-file-breadcrumbs {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
  height: 26px;
  overflow: hidden;
  -webkit-app-region: no-drag;
}

.preview-breadcrumb-track {
  isolation: isolate;
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 0;
  height: 24px;
  padding-right: 4px;
  box-sizing: border-box;
}

.preview-breadcrumb-measure {
  position: absolute;
  display: flex;
  width: max-content;
  visibility: hidden;
  pointer-events: none;
}

.preview-breadcrumb-measure-part {
  display: flex;
  flex: none;
  align-items: center;
}

.preview-breadcrumb-segment {
  position: relative;
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  box-sizing: border-box;
  min-width: 0;
  max-width: 200px;
  height: 24px;
  padding: 4px 6px 4px 10px;
  border: 0;
  border-radius: 0;
  --preview-breadcrumb-fill: color-mix(in srgb, var(--text-primary) 4%, var(--preview-breadcrumb-surface, var(--surface-sidebar)));
  background: var(--preview-breadcrumb-fill);
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
}

.preview-breadcrumb-segment:first-child,
.preview-breadcrumb-measure-part:nth-child(2) > .preview-breadcrumb-segment {
  padding-left: 6px;
}

.preview-breadcrumb-track > .preview-breadcrumb-segment:nth-child(even) {
  --preview-breadcrumb-fill: color-mix(in srgb, var(--text-primary) 7%, var(--preview-breadcrumb-surface, var(--surface-sidebar)));
}

.preview-breadcrumb-segment::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset-block: 0;
  right: -4px;
  width: 4px;
  background: var(--preview-breadcrumb-fill);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.preview-breadcrumb-track > .preview-breadcrumb-segment:not(:last-child)::after {
  pointer-events: none;
}

.preview-breadcrumb-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

button.preview-breadcrumb-segment {
  cursor: pointer;
}

.preview-breadcrumb-segment.current,
.preview-breadcrumb-track > .preview-breadcrumb-segment.current {
  flex: 0 0 auto;
  min-width: 0;
  max-width: min(260px, calc(100% - 4px));
  --preview-breadcrumb-fill: color-mix(in srgb, var(--text-primary) 8%, var(--preview-breadcrumb-surface, var(--surface-sidebar)));
  color: var(--text-primary);
  font-weight: 500;
}

.preview-breadcrumb-track:has(> .preview-breadcrumb-overflow) > .current {
  max-width: min(260px, calc(100% - 28px));
}

.preview-breadcrumb-measure .preview-breadcrumb-segment {
  flex-shrink: 0;
}

.preview-breadcrumb-measure-part:not(:nth-child(2)) > .preview-breadcrumb-segment {
  padding-left: 10px;
}

.preview-breadcrumb-measure-part:first-child > .preview-breadcrumb-segment {
  padding-left: 6px;
}

.preview-breadcrumb-measure > .current {
  padding-right: 10px;
}

.preview-breadcrumb-overflow {
  flex: 0 0 24px;
  width: 24px;
}

.preview-breadcrumb-track > button.preview-breadcrumb-segment:is(:hover, :focus-visible, [aria-expanded='true']) {
  --preview-breadcrumb-fill: color-mix(in srgb, var(--text-primary) 13%, var(--preview-breadcrumb-surface, var(--surface-sidebar)));
  color: var(--text-primary);
}

.preview-file-breadcrumbs.external .preview-breadcrumb-track {
  padding-right: 0;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-secondary);
}

.preview-breadcrumb-external-parent {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-breadcrumb-external-file {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--text-primary);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-breadcrumb-picker .preview-breadcrumb-tree {
  height: auto;
  overflow: visible;
}

.preview-breadcrumb-picker .session-action-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}



.desktop-inline-preview-pane {
  --chat-file-peek-width: var(--chat-inline-preview-width, 520px);
  position: relative;
  width: var(--chat-inline-preview-width, 520px);
  min-width: 0;
  max-width: min(1520px, 80vw);
  flex: 0 0 var(--chat-inline-preview-width, 520px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  border-left: 1px solid var(--border-subtle);
  padding-left: 0;
  background: var(--surface-workspace-content);
  overflow: hidden;
  transition:
    flex-basis var(--motion-emphasized) var(--ease-drawer),
    width var(--motion-emphasized) var(--ease-drawer),
    margin-right var(--motion-emphasized) var(--ease-drawer),
    border-left-color var(--motion-standard) var(--ease-standard);
}

.desktop-shell[data-chat-fixed-preview='true'] .desktop-inline-preview-pane,
.desktop-inline-preview-pane.is-collapsed {
  max-width: none;
}

.desktop-inline-preview-pane.is-resizing {
  transition: none;
}

.preview-editor-resize-handle {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 9;
  width: 4px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
}

.preview-editor-resize-handle::after {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 1px;
  width: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-primary) 64%, transparent);
  opacity: 0;
  transition: opacity var(--motion-fast) var(--ease-standard);
}

.preview-editor-resize-handle:hover::after,
.preview-editor-resize-handle.resizing::after {
  opacity: 1;
}

.chat-file-peek-surface {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface-workspace-content);
  color: var(--text-primary);
}

.desktop-inline-preview-editor {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.desktop-inline-preview-editor.is-maximized {
  width: 100%;
  height: 100%;
}

/* Keep the document at its full width as it slides into the expanding pane. */
.desktop-inline-preview-pane > .desktop-inline-preview-editor:not(.is-maximized) {
  align-self: flex-end;
  width: var(--chat-inline-preview-width, 520px);
  transform: translateX(0);
  transition: transform var(--motion-emphasized) var(--ease-drawer);
}

.desktop-inline-preview-pane.is-collapsed > .desktop-inline-preview-editor:not(.is-maximized) {
  transform: translateX(100%);
}

@starting-style {
  .desktop-inline-preview-pane.is-open > .desktop-inline-preview-editor:not(.is-maximized) {
    transform: translateX(100%);
  }
}

.desktop-preview-peek {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow: visible;
  margin-left: 0;
  background: var(--desktop-top-surface);
}

.desktop-preview-peek > .preview-navigation-dock:not(.is-pinned) {
  top: 6px;
  right: calc(100% + 12px);
}

.desktop-preview-peek > .preview-navigation-dock.is-pinned {
  top: auto;
  margin-top: 0;
  height: 100%;
}

.desktop-shell[data-inline-preview-maximized='true'] .desktop-preview-peek {
  flex: 1 1 0;
}

.desktop-shell[data-inline-preview-maximized='true'] .desktop-inline-preview-pane {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  border-left: 0;
  padding-left: 0;
  transition: none;
}

.desktop-shell[data-inline-preview-maximized='true'] .preview-editor-resize-handle {
  display: none;
}

.desktop-shell[data-inline-preview-maximized='true'] .desktop-preview-peek > .preview-navigation-dock {
  display: none;
}

.desktop-preview-peek:has(> .preview-navigation-dock.is-pinned) {
  column-gap: 0;
  margin-right: 12px;
  margin-bottom: 12px;
}

.preview-navigation-dock {
  position: absolute;
  top: 8px;
  right: calc(100% + 8px);
  z-index: var(--layer-workspace-chrome);
  width: 0;
  min-width: 0;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
  /* Hand the layout space back from Preview without briefly reserving both widths. */
  transition: width var(--motion-emphasized) var(--ease-drawer);
}

.preview-navigation-dock.is-pinned {
  position: relative;
  inset: auto;
  order: -1;
  width: 360px;
  overflow: hidden;
  flex-direction: row-reverse;
  align-self: stretch;
  height: 100%;
  background: transparent;
  pointer-events: auto;
}

/* The external rail shares the pane's straight edge; internal rails stay framed. */
.desktop-preview-peek .preview-workbench-content-kind-bar {
  box-sizing: border-box;
  border-right: 0;
  border-radius: 6px 0 0 6px;
  background: var(--desktop-side-surface);
}

.desktop-preview-peek .preview-workbench-content-kind-picker.rail .preview-workbench-content-kind {
  width: 100%;
}

.preview-navigation-dock-panel {
  width: min(360px, min(62vw, calc(100vw - 116px)));
  flex-shrink: 0;
  max-height: min(68vh, 640px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
}

.preview-navigation-dock-panel.is-picker {
  inset: auto;
  width: min(360px, calc(100vw - 20px));
}

.preview-navigation-dock-panel {
  animation: preview-navigation-dock-in var(--motion-standard) var(--ease-out);
}

.preview-navigation-dock-panel.exiting {
  animation: preview-navigation-dock-out var(--motion-exit) var(--ease-out) forwards;
  pointer-events: none;
  user-select: none;
}

.preview-navigation-dock.is-pinned .preview-navigation-dock-panel {
  flex: 0 0 360px;
  width: 360px;
  max-width: 360px;
  height: 100%;
  max-height: none;
  box-sizing: border-box;
  border: 0;
  border-radius: var(--chat-action-group-radius, var(--radius-popup));
  background: var(--chat-action-group-background, var(--surface-overlay));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--chat-action-group-shadow);
  animation: none;
}

.preview-navigation-dock.is-pinned .preview-navigation-dock-content,
.preview-navigation-dock.is-pinned .preview-navigation-dock-toolbar {
  background: transparent;
}

.preview-workbench-drawer-icon-button[data-preview-navigation-pin].active {
  background: transparent;
  color: var(--accent-primary);
}

.preview-navigation-dock-toolbar {
  flex: 0 0 var(--workbench-titlebar-height);
  height: var(--workbench-titlebar-height);
  min-height: var(--workbench-titlebar-height);
  max-height: var(--workbench-titlebar-height);
  display: flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  padding: 0 8px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-panel);
}

.preview-navigation-dock-title {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-navigation-dock-content {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: auto;
  animation: preview-navigation-dock-content-in var(--motion-fast) var(--ease-out) 30ms both;
}

.preview-navigation-dock-content .chat-session-outline {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 10px 8px 16px;
  scrollbar-gutter: stable;
}

.preview-navigation-dock-content .preview-workbench-file-tree-content,
.preview-navigation-dock-content .git-history-panel {
  min-height: 0;
}

@keyframes preview-navigation-dock-in {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes preview-navigation-dock-out {
  to {
    opacity: 0;
    transform: translateX(8px);
  }
}

@keyframes preview-navigation-dock-content-in {
  from {
    opacity: 0.86;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .preview-navigation-dock-panel,
  .preview-navigation-dock-panel.exiting,
  .preview-navigation-dock-content {
    animation: none;
  }

  .desktop-inline-preview-pane,
  .desktop-preview-peek,
  .preview-navigation-dock {
    transition: none;
  }
}

.preview-workbench-pane.entering {
  animation: preview-workbench-pane-in var(--motion-standard) var(--ease-drawer);
}

.preview-workbench-pane.exiting {
  animation: preview-workbench-pane-out var(--motion-exit) var(--ease-standard) forwards;
  pointer-events: none;
  user-select: none;
}

.desktop-inline-preview-pane.entering,
.desktop-inline-preview-pane.exiting {
  animation: none;
}

.desktop-inline-preview-pane.is-collapsed,
.desktop-inline-preview-pane.exiting {
  min-width: 0;
  width: 0;
  flex-basis: 0;
  padding-left: 0;
  border-left-color: transparent;
  pointer-events: none;
}

.desktop-inline-preview-pane.exiting {
  pointer-events: none;
  user-select: none;
}

@keyframes preview-workbench-pane-in {
  from {
    opacity: 0.94;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes preview-workbench-pane-out {
  to {
    opacity: 0;
    transform: translateX(12px);
  }
}

.preview-workbench-document-surface {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.chat-file-peek-scroll {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: auto;
  background: var(--surface-workspace-content);
}

.preview-workbench-render-cache {
  min-width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.preview-workbench-rendered-tab {
  min-width: 100%;
  flex: 1;
  min-height: 0;
}

.preview-zoom-extent,
.preview-zoom-content {
  display: contents;
}

.preview-zoom-extent[data-preview-zoom-enabled] {
  display: block;
  position: relative;
  flex: none;
  /* Unscaled overflow must not leave phantom scroll space when zooming out. */
  overflow: clip;
}

.preview-zoom-content[data-preview-zoom] {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  min-width: 0;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

.preview-zoom-content > :is(.html-preview, .wiki-preview, .port-relay-frame-surface) {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

.preview-zoom-content[data-preview-zoom] > :is(.html-preview, .wiki-preview, .port-relay-frame-surface) {
  height: var(--preview-viewport-height, 100%);
  min-height: 0;
  width: 100%;
}

.preview-workbench-rendered-tab .preview-zoom-content[data-preview-zoom] > .port-relay-frame-surface {
  position: static;
  max-width: none;
  max-height: none;
  height: var(--preview-viewport-height, 100%);
}

.preview-zoom-indicator {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 4;
  min-width: 56px;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 78%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-panel) 78%, transparent);
  color: var(--text-secondary);
  box-shadow: var(--shadow-floating);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .preview-zoom-indicator:hover {
    color: var(--text-primary);
    background: color-mix(in srgb, var(--surface-panel) 94%, transparent);
  }
}

.preview-workbench-body:has(.preview-workbench-search-hud) .preview-zoom-indicator {
  top: 64px;
}

.preview-editor-resize-handle::before {
  content: '';
  position: absolute;
  top: var(--preview-resize-body-top, 70px);
  left: 0;
  bottom: 0;
  width: 8px;
}

/* Only the body needs room outside native child-window content. */
.desktop-inline-preview-pane .preview-workbench-body {
  padding-left: 8px;
}

.desktop-inline-preview-pane .preview-workbench-surface:not(.has-inner-navigation) .preview-workbench-body:has(> .preview-workbench-terminal:not([hidden])) {
  padding-left: 0;
}

.desktop-shell[data-inline-preview-maximized='true'] .desktop-inline-preview-pane .preview-workbench-body {
  padding-left: 0;
}

.preview-workbench-rendered-tab.active {
  display: flex;
  flex-direction: column;
  animation: preview-workbench-content-in var(--motion-fast) var(--ease-out);
}

@keyframes preview-workbench-content-in {
  from {
    opacity: 0.86;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-file-workbench-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.chat-file-workbench-empty .sl-icon {
  width: 24px;
  height: 24px;
  opacity: 0.75;
}

.chat-file-workbench-empty-action {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 78%, transparent);
  border-radius: 6px;
  background: var(--surface-panel);
  color: var(--text-primary);
  padding: 0 10px;
  font-size: 12px;
}

.chat-file-workbench-empty-action:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--accent-primary) 46%, transparent);
  background: color-mix(in srgb, var(--accent-primary) 14%, var(--surface-panel));
}

.chat-file-workbench-empty-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chat-file-workbench-empty-action .sl-icon {
  width: 14px;
  height: 14px;
  opacity: 0.9;
}

.preview-workbench-surface.desktop {
  --workbench-titlebar-height: var(--chat-menu-header-height);
}

.desktop-shell .preview-workbench-surface.desktop > .workbench-chrome-toolbar {
  background: var(--desktop-top-surface);
}

.desktop-shell[data-desktop-window-controls='true'] .preview-workbench-surface.desktop > .workbench-chrome-toolbar {
  padding-right: calc(var(--desktop-window-controls-width) + 10px);
  background: var(--desktop-top-surface);
}

.preview-workbench-tabs-overflow {
  position: relative;
  display: flex;
  align-items: center;
}

.preview-workbench-tabs-overflow-button {
  width: var(--workbench-control-height);
  height: var(--workbench-control-height);
  margin: 0 4px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
}

.preview-workbench-tabs-overflow-button:hover {
  background: var(--hover);
  color: var(--text-primary);
}

.preview-workbench-tabs-overflow-button.active {
  color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 14%, transparent);
}

.preview-workbench-tabs-overflow-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  border-radius: 5px;
}

.preview-workbench-tabs-overflow-open {
  min-width: 0;
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-primary);
  padding: 0 6px;
  font-size: 12px;
  text-align: left;
}

.preview-workbench-tabs-overflow-open:hover {
  background: var(--hover);
}

.preview-workbench-tabs-overflow-close {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  opacity: 0.72;
}

.preview-workbench-tabs-overflow-close:hover {
  opacity: 1;
  color: var(--state-danger);
  background: var(--hover);
}

.preview-workbench-action-menu-item {
  width: 100%;
  min-height: 30px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-primary);
  padding: 0 8px;
  font: inherit;
  font-size: 12px;
  text-align: left;
}

.preview-workbench-action-menu-item:hover:not(:disabled),
.preview-workbench-action-menu-item:focus-visible {
  background: var(--hover);
}

.preview-workbench-action-menu-item:disabled {
  color: var(--text-secondary);
  cursor: default;
}

.preview-tab-context-menu-separator {
  height: 1px;
  margin: 4px 6px;
  background: var(--border-subtle);
}

.preview-tab-context-menu {
  position: fixed;
  z-index: 140;
  min-width: min(204px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  display: grid;
  gap: 1px;
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 78%, transparent);
  border-radius: 7px;
  background: var(--surface-panel);
  box-shadow: 0 14px 34px color-mix(in srgb, #000 32%, transparent);
  transform-origin: top left;
  animation: sl-menu-in var(--motion-fast) var(--ease-out);
}

.preview-tab-context-menu.sl-menu-exit {
  /* Keep the portal mounted for the shared motion-exit duration. */
  animation: sl-menu-out var(--motion-exit) var(--ease-out) forwards;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .preview-tab-context-menu {
    animation: none;
  }
}

.preview-workbench-search-bar {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-panel);
  padding: 4px 8px;
  color: var(--text-secondary);
  animation: preview-workbench-search-in var(--motion-fast) var(--ease-out);
}

@keyframes preview-workbench-search-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.preview-workbench-tab-icon {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  opacity: 0.86;
}

.preview-workbench-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.preview-workbench-content {
  display: contents;
}

.preview-workbench-content[hidden] {
  display: none;
}

.preview-workbench-drawer-tool {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 32%, var(--border-subtle));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-overlay) 72%, transparent);
  color: var(--accent-primary);
  box-shadow: 0 2px 8px color-mix(in srgb, #000 12%, transparent);
  cursor: pointer;
}

.preview-workbench-drawer-tool > .sl-icon {
  width: 18px;
  height: 18px;
}

.preview-workbench-drawer-tool:hover {
  color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 8%, color-mix(in srgb, var(--surface-overlay) 82%, transparent));
}

.preview-workbench-drawer-tool.active {
  color: var(--accent-primary);
  border-color: color-mix(in srgb, var(--accent-primary) 46%, transparent);
  background: color-mix(in srgb, var(--accent-primary) 16%, color-mix(in srgb, var(--surface-overlay) 82%, transparent));
}

.preview-workbench-tree-tool-button {
  flex: 0 0 auto;
}

.preview-workbench-drawer-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--surface-panel);
}

.preview-workbench-drawer-empty {
  flex: 1;
  min-height: 120px;
}

.preview-workbench-surface .preview-workbench-drawer-panel {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 9;
  width: min(360px, calc(100% - 56px));
  animation: preview-workbench-drawer-in var(--motion-standard) var(--ease-out);
}

.preview-workbench-surface .preview-workbench-drawer-panel:not(.overlay-capsule-panel) {
  border-right: 1px solid var(--border-subtle);
  box-shadow: 18px 0 48px color-mix(in srgb, #000 30%, transparent);
}

.preview-workbench-surface:is(.inline-editor, .fullscreen-layout) .workbench-chrome-companion-drawer {
  flex: 0 0 min(360px, calc(100% - 56px));
  border-right: 1px solid var(--border-subtle);
  background: var(--surface-panel);
}

.preview-workbench-surface:is(.inline-editor, .fullscreen-layout) .preview-workbench-drawer-panel:not(.overlay-capsule-panel) {
  position: relative;
  inset: auto;
  z-index: 1;
  width: auto;
  height: auto;
  flex: 1 1 auto;
  border-right: 0;
  box-shadow: none;
}

.preview-workbench-drawer-panel.exiting {
  animation: preview-workbench-drawer-out var(--motion-exit) var(--ease-out) forwards;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .preview-workbench-pane.entering,
  .preview-workbench-pane.exiting,
  .preview-workbench-rendered-tab.active {
    animation: none;
  }

  .desktop-inline-preview-pane.is-collapsed,
  .desktop-inline-preview-pane.exiting {
    width: 0;
    flex-basis: 0;
  }

  .desktop-inline-preview-pane > .desktop-inline-preview-editor {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preview-workbench-search-bar,
  .preview-workbench-drawer-panel.external {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preview-workbench-surface .preview-workbench-drawer-panel,
  .preview-workbench-drawer-panel.exiting {
    animation: none;
  }
}

@keyframes preview-workbench-drawer-out {
  to {
    opacity: 0;
    transform: translateX(-10px);
  }
}

@keyframes preview-workbench-drawer-in {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.preview-workbench-drawer-search {
  box-sizing: border-box;
  flex: 0 0 44px;
  height: 44px;
  min-height: 44px;
  padding: 5px 8px;
  color: var(--text-secondary);
}

.preview-workbench-drawer-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: preview-workbench-drawer-content-in var(--motion-fast) var(--ease-out);
}

.preview-workbench-drawer-content.preview-navigation-dock-content {
  overflow: auto;
  animation: preview-navigation-dock-content-in var(--motion-fast) var(--ease-out) 30ms both;
}

@keyframes preview-workbench-drawer-content-in {
  from {
    opacity: 0.86;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .preview-workbench-drawer-content {
    animation: none;
  }
}

.preview-workbench-file-tree-content {
  height: 100%;
  min-width: 0;
  overflow: auto;
}

.preview-workbench-file-tree-content .list {
  padding: 6px 0;
}

.file-tree-root-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.preview-workbench-file-tree-content .tree-children {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid color-mix(in srgb, var(--border-subtle) 72%, transparent);
  opacity: 1;
  transform: translateY(0);
  transition:
    grid-template-rows var(--motion-standard) var(--ease-drawer),
    opacity var(--motion-exit) var(--ease-standard),
    transform var(--motion-exit) var(--ease-standard);
}

.preview-workbench-file-tree-content .tree-children > div {
  min-height: 0;
  overflow: hidden;
}

.preview-workbench-file-tree-content .tree-children.entering {
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-3px);
  pointer-events: none;
}

.preview-workbench-file-tree-content .tree-children.exiting {
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-3px);
  pointer-events: none;
}

.preview-workbench-file-tree-content .item.dir,
.preview-workbench-file-tree-content .item.file {
  min-height: 26px;
  font-size: 12px;
}

.preview-workbench-file-tree-content .item.dir .label {
  font-weight: 550;
}

.preview-workbench-file-search-children {
  border-left: 1px solid color-mix(in srgb, var(--border-subtle) 72%, transparent);
}

.preview-workbench-file-search-tree {
  padding: 6px 0;
}

.preview-workbench-file-search-node {
  width: 100%;
  min-width: 0;
  min-height: 26px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  padding-top: 3px;
  padding-right: 8px;
  padding-bottom: 3px;
  padding-left: 10px;
  text-align: left;
  font-size: 12px;
}

.preview-workbench-file-search-node.file {
  cursor: pointer;
}

.preview-workbench-file-search-node.dir {
  cursor: pointer;
}

.preview-workbench-file-search-node.dir:hover,
.preview-workbench-file-search-node.file:hover {
  background: var(--hover);
}

.preview-workbench-file-search-node .label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-workbench-file-search-empty {
  padding: 18px 10px;
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
}

.quick-file-search-project {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 40%;
  overflow: hidden;
  padding: 2px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--surface-raised);
  color: var(--text-secondary);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-file-search-results {
  min-height: 42px;
  overflow: auto;
  padding: 6px;
}

.quick-file-search-results.refreshing .quick-file-search-option {
  opacity: 0.55;
}

.quick-file-search-option {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-primary);
  padding: 5px 7px;
  text-align: left;
}

.quick-file-search-option:hover {
  background: var(--hover);
}

.quick-file-search-name,
.quick-file-search-path {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-file-search-name {
  flex: 0 1 auto;
  font-family: var(--mono-font);
  font-size: 12px;
}

.quick-file-search-path {
  flex: 1 1 auto;
  color: var(--text-secondary);
  font-family: var(--mono-font);
  font-size: 11px;
  text-align: right;
}

.quick-file-search-match {
  color: var(--accent-primary);
  font-weight: 600;
}

/* Reuse the mention-menu skeleton visuals but match the 34px flex option
   rows so the swap to real results does not shift the panel geometry. */
.quick-file-search-skeleton .chat-file-mention-skeleton-row {
  min-height: 34px;
  display: flex;
  gap: 8px;
  padding: 5px 7px;
}

.quick-file-search-skeleton .chat-file-mention-skeleton-path {
  width: 42%;
  margin-left: auto;
}

.quick-file-search-empty {
  padding: 18px 10px;
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
}

.quick-file-search-empty-hint {
  display: block;
  margin-top: 4px;
  color: var(--text-tertiary);
  font-size: 11px;
}

.preview-selection-context-menu {
  position: fixed;
  z-index: 120;
  min-width: min(108px, calc(100vw - 16px));
  border: 1px solid color-mix(in srgb, var(--border-subtle) 76%, transparent);
  border-radius: 7px;
  background: var(--surface-panel);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  padding: 4px;
  transform-origin: top left;
  animation: sl-menu-in var(--motion-fast) var(--ease-out);
}

.preview-selection-context-menu.sl-menu-exit {
  /* Keep the portal mounted for the shared motion-exit duration. */
  animation: sl-menu-out var(--motion-exit) var(--ease-out) forwards;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .preview-selection-context-menu {
    animation: none;
  }
}

.preview-selection-context-menu button {
  width: 100%;
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-primary);
  padding: 0 8px;
  text-align: left;
}

.preview-selection-context-menu button:hover {
  background: var(--hover);
}

.chat-file-peek-scroll .code-wrap.nowrap {
  width: max-content;
  min-width: 100%;
}

.chat-file-peek-scroll .diff-wrap.nowrap {
  width: max-content;
  min-width: 100%;
}

/* Paired rows fit the reading viewport; long lines wrap within each half. */
.chat-file-peek-scroll .diff-wrap.diff-side-by-side {
  width: 100%;
  min-width: 0;
}

.chat-file-peek-error {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  color: var(--state-danger);
  font-size: 13px;
  text-align: center;
}

.chat-file-peek-image-wrap {
  min-height: 100%;
}

.chat-attachment-original-wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.chat-attachment-original-image {
  width: auto;
  height: auto;
  max-width: min(100%, 1600px);
  max-height: min(78vh, 1200px);
  object-fit: contain;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface-raised);
}

.chat-attachment-preview-placeholder {
  min-height: 100%;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-content: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--text-secondary);
}

.chat-attachment-preview-placeholder .sl-icon {
  width: 32px;
  height: 32px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 82%, transparent);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: color-mix(in srgb, var(--accent-primary) 72%, var(--text-primary));
}

.chat-attachment-preview-placeholder-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.chat-attachment-preview-placeholder-title {
  min-width: 0;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attachment-preview-placeholder-meta,
.chat-attachment-preview-placeholder-status {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.chat-prompt-diff-preview {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
  background: var(--surface-workspace-content);
}

.chat-prompt-diff-overview {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  color: var(--text-secondary);
  font-size: 12px;
}

.chat-prompt-diff-overview .sl-icon {
  color: color-mix(in srgb, var(--accent-primary) 82%, var(--text-primary));
}

.chat-prompt-diff-overview > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-prompt-diff-view-mode {
  --selection-state-background: var(--segmented-selected-fill);
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  padding: 2px;
}

.chat-prompt-diff-view-mode-button {
  min-height: 22px;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.chat-prompt-diff-view-mode-button:not([aria-pressed='true']):hover {
  color: var(--text-primary);
}

.chat-prompt-diff-file {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 82%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-panel) 82%, var(--surface-panel));
  overflow: hidden;
}

.chat-prompt-diff-file-header {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  display: grid;
  grid-template-columns: 16px 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-prompt-diff-file-header:hover {
  background: var(--hover);
}

.chat-prompt-diff-file-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chat-prompt-diff-file-name,
.chat-prompt-diff-file-path {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-prompt-diff-file-name {
  font-family: var(--mono-font);
  font-size: 12px;
  color: var(--text-primary);
}

.chat-prompt-diff-file-path {
  font-family: var(--mono-font);
  font-size: 10px;
  color: var(--text-secondary);
}

.chat-prompt-diff-file-counts {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 58px;
  font-family: var(--mono-font);
  font-size: 11px;
  white-space: nowrap;
}

.chat-prompt-diff-file-counts .additions {
  color: var(--state-success);
}

.chat-prompt-diff-file-counts .deletions {
  color: var(--state-danger);
}

.chat-prompt-diff-file-body {
  border-top: 1px solid color-mix(in srgb, var(--border-subtle) 78%, transparent);
  background: var(--surface-workspace-content);
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  opacity: 1;
  transform: translateY(0);
  transition:
    grid-template-rows var(--motion-standard) var(--ease-drawer),
    opacity var(--motion-exit) var(--ease-standard),
    transform var(--motion-exit) var(--ease-standard);
}

.chat-prompt-diff-file-body > .chat-prompt-diff-file-body-inner {
  min-width: 100%;
  width: max-content;
  min-height: 0;
}

/* Match the rendered content so invalid patches retain the Inline layout. */
.chat-prompt-diff-file-body > .chat-prompt-diff-file-body-inner:has(.wm-shiki-side-by-side) {
  width: 100%;
  min-width: 0;
}

.chat-prompt-diff-file-body.entering {
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

.chat-prompt-diff-file-body.exiting {
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .chat-prompt-diff-file-body,
  .chat-prompt-diff-file-body.entering,
  .preview-workbench-file-tree-content .tree-children {
    transition: none;
    transform: none;
  }
}

.chat-prompt-diff-file-body .code-wrap {
  min-width: 100%;
}

.seti-icon svg {
  width: 16px;
  height: 16px;
}

.seti-icon svg path,
.seti-icon svg rect,
.seti-icon svg polygon,
.seti-icon svg circle {
  fill: currentColor;
}

.file-image-preview-wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.file-image-preview {
  width: auto;
  height: auto;
  max-width: min(100%, 1600px);
  max-height: min(78vh, 1200px);
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(127, 127, 127, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(127, 127, 127, 0.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(127, 127, 127, 0.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(127, 127, 127, 0.08) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

.chat-file-mention-empty {
  min-height: 32px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.chat-file-mention-option {
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
}

.chat-file-mention-option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 3px;
  padding: 0 4px 0 0;
  transition: opacity var(--motion-fast) var(--ease-standard);
}

.chat-file-mention-option:hover,
.chat-file-mention-option.active {
  background: var(--hover);
}

.chat-file-mention-option-main {
  min-width: 0;
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  display: grid;
  grid-template-columns: 16px minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 0 6px 0 10px;
  text-align: left;
  cursor: pointer;
}

.chat-file-mention-option-main .sl-icon {
  color: var(--text-secondary);
  width: 13px;
  height: 13px;
}

.chat-file-mention-preview-button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: color-mix(in srgb, var(--text-secondary) 78%, var(--text-primary));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--motion-fast) var(--ease-standard);
}

.chat-file-mention-option:hover .chat-file-mention-preview-button,
.chat-file-mention-option.active .chat-file-mention-preview-button,
.chat-file-mention-preview-button:focus-visible {
  opacity: 1;
}

/* No hover on touch: keep the preview affordance visible at all times. */
@media (hover: none) {
  .chat-file-mention-preview-button {
    opacity: 1;
  }
}

.chat-file-mention-preview-button:hover,
.chat-file-mention-preview-button:focus-visible {
  background: color-mix(in srgb, var(--accent-primary) 14%, transparent);
  color: color-mix(in srgb, var(--accent-primary) 86%, var(--text-primary));
}

.chat-file-mention-preview-button .sl-icon {
  width: 14px;
  height: 14px;
}

.chat-file-mention-path {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: color-mix(in srgb, var(--text-secondary) 74%, var(--text-primary));
}

.chat-file-mention-name {
  max-width: min(42vw, 260px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}

/* Stale-while-revalidate: keep the current list visible (dimmed) while a
   search is in flight instead of flashing a "Searching..." placeholder. */
.chat-file-mention-menu.refreshing .chat-file-mention-option-row {
  opacity: 0.55;
}

/* Structural skeleton shown only before the first results arrive; rows match
   the 30px option rows so the swap does not shift the menu geometry. */
.chat-file-mention-skeleton {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-file-mention-skeleton-row {
  display: grid;
  grid-template-columns: 16px minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 30px;
  padding: 0 6px 0 10px;
  animation: chat-file-mention-skeleton-pulse 1.6s var(--ease-standard) infinite;
}

.chat-file-mention-skeleton-icon,
.chat-file-mention-skeleton-name,
.chat-file-mention-skeleton-path {
  display: block;
  border-radius: 4px;
  background: var(--hover);
}

.chat-file-mention-skeleton-icon {
  width: 14px;
  height: 14px;
}

.chat-file-mention-skeleton-name {
  width: 88px;
  height: 12px;
}

.chat-file-mention-skeleton-row:nth-child(2n) .chat-file-mention-skeleton-name {
  width: 64px;
}

.chat-file-mention-skeleton-path {
  width: 58%;
  height: 11px;
}

@keyframes chat-file-mention-skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-file-mention-skeleton-row {
    animation: none;
  }
}

/* Preview search HUD sits above the scroll surface without displacing code. */
.preview-workbench-search-hud {
  position: absolute;
  top: 8px;
  right: 10px;
  left: 10px;
  z-index: 12;
  pointer-events: none;
}

.preview-workbench-search-hud .preview-workbench-search-bar {
  pointer-events: auto;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 36%, var(--border-subtle));
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-panel) 96%, var(--surface-workspace-content));
  box-shadow: 0 10px 26px color-mix(in srgb, #000 24%, transparent);
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}

.preview-workbench-body:has(.preview-workbench-search-hud) .chat-file-peek-scroll {
  padding-top: 54px;
}

.preview-workbench-search-hud:focus-within .preview-workbench-search-bar {
  border-color: color-mix(in srgb, var(--accent-primary) 72%, var(--border-subtle));
  box-shadow:
    0 10px 26px color-mix(in srgb, #000 24%, transparent),
    0 0 0 2px color-mix(in srgb, var(--accent-primary) 22%, transparent);
}

.preview-search-match {
  background: color-mix(in srgb, #ffd166 28%, transparent);
}

.preview-workbench-surface .chat-file-peek-scroll [data-line-number].preview-search-match {
  background: color-mix(in srgb, #ffd166 24%, transparent);
}

.preview-search-match-active {
  background: color-mix(in srgb, #ffd166 76%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, #ffd166 54%, transparent);
}

::highlight(preview-search-match) {
  background: color-mix(in srgb, #ffd166 30%, transparent);
  color: inherit;
}

::highlight(preview-search-match-active) {
  background: color-mix(in srgb, #ffd166 82%, var(--surface-raised));
  color: #231d0b;
}

.preview-workbench-surface .chat-file-peek-scroll [data-line-number].preview-search-match-active {
  background: color-mix(in srgb, #ffd166 70%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, #ffd166 54%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .preview-workbench-search-hud .preview-workbench-search-bar,
  .preview-workbench-search-input {
    transition: none;
  }
}

.native-webview-surface {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.native-webview-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  min-width: 0;
}

.native-webview-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.native-webview-toolbar button:hover:not(:disabled) {
  background: var(--hover);
}

.native-webview-toolbar button:disabled {
  opacity: 0.4;
  cursor: default;
}

.native-webview-toolbar span {
  min-width: 0;
  margin-left: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-secondary);
}

.native-webview-target { flex: 1; position: relative; min-height: 0; }
.browser-preview-toolbar input {
  flex: 1;
  min-width: 40px;
  padding: 4px 8px;
  color: var(--text-primary);
  background: var(--surface-workspace-content);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font: inherit;
  font-size: 12px;
}
.browser-preview-toolbar span { flex: 0 1 auto; max-width: 140px; }
.browser-preview-toolbar .browser-preview-session-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.native-chat-scroll { display: flex; flex-direction: column; overflow: hidden; }
.native-chat-scroll > .preview-workbench-render-cache { min-height: 0; height: 100%; flex: 1; }
.native-chat-scroll .preview-workbench-rendered-tab { display: flex; flex-direction: column; }
.native-chat-scroll .preview-workbench-rendered-tab[hidden] { display: none; }
.native-chat-scroll .preview-workbench-rendered-tab.active { animation: none; }
.native-chat-scroll .native-webview-surface { flex: 1; }
.native-webview-notice { flex-shrink: 0; padding: 6px 10px; color: var(--text-secondary); background: var(--surface-workspace-content); font-size: 12px; }
.native-prompt-notice { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.native-prompt-notice span { flex: 1; min-width: 160px; }
.native-prompt-notice button { font: inherit; color: var(--text-primary); background: transparent; border: 1px solid var(--border-subtle); border-radius: 4px; padding: 3px 8px; cursor: pointer; }

.git-history-panel {
  height: 100%;
  min-width: 0;
  overflow: auto;
  background: var(--surface-panel);
  color: var(--text-primary);
  font-size: 12px;
}

.git-history-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
}

.git-branch-picker {
  position: relative;
  min-width: 0;
  flex: 1;
}

.git-toolbar-button {
  height: 28px;
  min-width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
}

.git-branch-trigger:hover:not(:disabled) {
  background: var(--hover);
  color: var(--text-primary);
}

.git-toolbar-button:disabled {
  opacity: 0.45;
}

.git-toolbar-button.icon-only {
  padding: 0;
}

.git-branch-trigger {
  width: 100%;
  justify-content: flex-start;
  padding: 0 7px;
  color: var(--text-primary);
}

.git-branch-trigger > span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.git-branch-menu {
  position: absolute;
  top: 32px;
  left: 0;
  z-index: 6;
  width: min(290px, calc(100vw - 84px));
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--surface-overlay);
  box-shadow: 0 14px 34px color-mix(in srgb, #000 34%, transparent);
}

.git-branch-option {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 4px;
  padding: 0 7px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
}

.git-branch-option:hover {
  background: color-mix(in srgb, var(--text-primary) 7%, transparent);
}

.git-branch-check {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
}

.git-branch-check.selected {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  color: var(--surface-canvas);
}

.git-branch-option-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.git-ref-kind,
.git-count {
  color: var(--text-secondary);
  font-size: 10px;
}

.git-offline-pill,
.git-head-pill {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 1px 6px;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.2;
}

.git-head-pill {
  border-color: color-mix(in srgb, var(--accent-primary) 38%, var(--border-subtle));
  color: var(--accent-primary);
}

.git-history-section {
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 0 10px;
}

.git-section-heading,
.git-worktree-group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px 7px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.git-worktree-group + .git-worktree-group {
  margin-top: 7px;
}

.git-worktree-group-label {
  padding-bottom: 3px;
  letter-spacing: 0.04em;
}

.git-worktree-group-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.git-worktree-group-action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 0;
  border-radius: 4px;
  padding: 2px 4px;
  background: transparent;
  color: var(--accent-primary);
  font-size: 10px;
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
}

.git-worktree-group-action:hover {
  background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
}

.git-file-row {
  width: 100%;
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  padding: 3px 10px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
}

.git-file-row .node-icon {
  flex: 0 0 auto;
}

.git-file-row:hover {
  background: var(--hover);
}

.git-file-path {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.git-file-name {
  flex: 0 0 auto;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.git-file-parent {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.75;
}

.git-file-stats,
.git-commit-file-summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.git-file-stats {
  flex: 0 0 auto;
  font-family: var(--font-mono);
}

.git-worktree-group-label .git-count,
.git-section-heading .git-count {
  min-width: 16px;
  border-radius: 999px;
  padding: 1px 5px;
  background: color-mix(in srgb, var(--text-primary) 8%, transparent);
  text-align: center;
}

.git-file-stats .additions,
.git-commit-file-summary .additions {
  color: var(--state-success);
}

.git-file-stats .deletions,
.git-commit-file-summary .deletions {
  color: var(--state-danger);
}

.git-diff-file-error {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  color: var(--state-danger);
}

.git-diff-file-error > span {
  min-width: 0;
  flex: 1;
}

.git-diff-file-error button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 4px;
  padding: 3px 7px;
  background: color-mix(in srgb, var(--state-danger) 10%, transparent);
  color: currentColor;
  font-size: 11px;
  font-weight: 600;
}

.git-diff-file-error button:hover,
.git-diff-file-error button:focus-visible {
  background: color-mix(in srgb, var(--state-danger) 18%, transparent);
}

.git-history-state,
.git-history-empty {
  padding: 12px 10px;
  color: var(--text-secondary);
  text-align: center;
}

.git-inline-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 8px 7px;
  border-left: 2px solid var(--state-danger);
  padding: 6px 8px;
  background: color-mix(in srgb, var(--state-danger) 8%, transparent);
  color: var(--state-danger);
}

.git-inline-error button {
  border: 0;
  background: transparent;
  color: currentColor;
  font-weight: 600;
}

.git-timeline {
  position: relative;
  padding-left: 28px;
}

.git-timeline::before {
  content: '';
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 13px;
  width: 1px;
  background: var(--border-subtle);
}

.git-commit {
  position: relative;
  min-width: 0;
}

.git-commit-node {
  position: absolute;
  top: 13px;
  left: -18px;
  z-index: 1;
  width: 6px;
  height: 6px;
  border: 1px solid var(--text-secondary);
  border-radius: 50%;
  background: var(--surface-panel);
}

.git-commit.expanded .git-commit-node {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
}

.git-commit-head {
  min-width: 0;
}

.git-commit-head:hover {
  background: var(--hover);
}

.git-commit-copy {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  opacity: 0.7;
  padding: 0;
}

.git-commit-copy:hover {
  opacity: 1;
  color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 14%, transparent);
}

.git-commit-trigger {
  width: 100%;
  min-width: 0;
  display: block;
  border: 0;
  padding: 7px 10px 0 2px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
}

.git-commit-title {
  display: block;
  overflow: hidden;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.git-commit-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1px 10px 7px 2px;
  color: var(--text-secondary);
  font-size: 10px;
}

.git-short-sha {
  font-family: var(--font-mono);
}

.git-commit-details {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  padding: 3px 10px 10px 2px;
  color: var(--text-secondary);
  opacity: 1;
  transform: translateY(0);
  transition:
    grid-template-rows var(--motion-standard) var(--ease-drawer),
    padding var(--motion-standard) var(--ease-drawer),
    opacity var(--motion-exit) var(--ease-standard),
    transform var(--motion-exit) var(--ease-standard);
}

.git-commit-details-inner {
  min-height: 0;
  overflow: hidden;
}

.git-commit-details.entering {
  grid-template-rows: 0fr;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  transform: translateY(-3px);
  pointer-events: none;
}

.git-commit-details.exiting {
  grid-template-rows: 0fr;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  transform: translateY(-3px);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .git-commit-details {
    transition: none;
    transform: none;
  }
}

.git-commit-file-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
}
.git-commit-files {
  margin-top: 5px;
  border-top: 1px solid var(--border-subtle);
}

.git-commit-files .git-file-row {
  padding-right: 0;
  padding-left: 0;
}

.git-load-more {
  width: calc(100% - 20px);
  min-height: 30px;
  margin: 8px 10px 0;
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
}

.git-load-more:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--accent-primary) 42%, var(--border-subtle));
  color: var(--accent-primary);
}

.sidebar-title-row .chat-hub-summary {
  margin-left: 0;
  position: static;
}

.sidebar-title-row .chat-hub-summary-button {
  max-width: min(154px, 48vw);
}

.sidebar-title-row .chat-hub-popover {
  left: 12px;
  right: auto;
  width: min(340px, calc(100vw - 24px));
  min-width: 0;
  max-width: calc(100vw - 24px);
}

.chat-title-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-left: 0;
  --chat-session-toolbar-reserve: 100px;
  background: var(--desktop-top-surface);
}

/* The archive popover belongs to the toolbar, but opens below its 32px row. */
.desktop-shell > .chat-title-bar {
  overflow: visible;
  padding-left: 0;
}

.narrow-shell .chat-title-bar {
  flex: 0 0 calc(var(--wm-safe-area-top) + var(--chat-menu-header-height));
  height: calc(var(--wm-safe-area-top) + var(--chat-menu-header-height));
  min-height: calc(var(--wm-safe-area-top) + var(--chat-menu-header-height));
  max-height: calc(var(--wm-safe-area-top) + var(--chat-menu-header-height));
  gap: 0px;
  padding: var(--wm-safe-area-top) 8px 0;
}

.chat-title-bar > .chat-session-header {
  flex: 0 0 var(--chat-session-panel-width);
  width: var(--chat-session-panel-width);
  min-width: 0;
  min-height: 0;
  height: 100%;
  border-bottom: 0;
  background: transparent;
  padding: 0 calc(var(--chat-header-end-padding) + var(--chat-session-scrollbar-width, 0px)) 0 0;
  gap: 8px;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: none;
}

.desktop-shell:not([data-sessions-collapsed='true']) > .chat-title-bar > .chat-session-header {
  border-right: 0;
}

.chat-title-context {
  min-width: 0;
  width: 0;
  flex: 1 1 0;
  overflow: hidden;
}

.desktop-shell > .chat-title-bar > .chat-title-context {
  padding-right: 8px;
}

.desktop-shell[data-inline-preview-maximized='true'] .chat-title-context,
.desktop-shell[data-inline-preview-maximized='true'] .chat-session-toolbar-actions {
  display: none;
}

.desktop-shell[data-inline-preview-maximized='true'] > .chat-title-bar {
  gap: 0;
}

.desktop-shell[data-inline-preview-maximized='true'] .chat-title-actions,
.desktop-shell[data-inline-preview-maximized='true'] .preview-titlebar {
  flex: 1 1 auto;
  min-width: 0;
}

.chat-title-context .breadcrumb-title {
  min-width: 0;
}

.chat-title-context .chat-breadcrumb-title {
  flex: 0 1 auto;
  width: min(
    var(--chat-view-column-width, 800px),
    max(0px, calc(100% - var(--chat-title-content-offset, 0px))),
    var(--chat-title-content-max-width, 100%)
  );
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: var(--chat-title-content-offset, 0px);
}

.chat-title-search-context {
  position: relative;
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-title-idle {
  display: flex;
  align-items: center;
  gap: inherit;
  width: 100%;
  min-width: 0;
  transition: opacity var(--motion-fast) var(--ease-out), visibility 0s;
}

.chat-title-search-context.open > .chat-title-idle {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--motion-fast) var(--ease-out), visibility 0s linear var(--motion-fast);
}

.chat-title-search-surface {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--chat-action-group-radius);
  background: var(--chat-action-group-background);
  box-shadow: var(--chat-action-group-shadow);
  clip-path: inset(0 max(0px, calc(100% - var(--chat-search-origin-width, 44px))) 0 0 round var(--chat-action-group-radius));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    clip-path var(--motion-standard) var(--ease-out),
    opacity var(--motion-fast) var(--ease-out),
    visibility 0s linear var(--motion-standard);
}

.chat-title-search-context.open > .chat-title-search-surface {
  clip-path: inset(0 0 0 0 round var(--chat-action-group-radius));
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    clip-path var(--motion-standard) var(--ease-out),
    opacity var(--motion-fast) var(--ease-out),
    visibility 0s;
}

.chat-title-search-details {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 5;
  width: max-content;
  max-width: 100%;
}

.workspace-search-scope-picker {
  box-sizing: border-box;
  width: max-content;
  max-width: 100%;
  height: var(--chat-action-group-height);
  gap: var(--chat-action-group-gap);
  padding: var(--chat-action-group-block-inset) var(--chat-action-group-inset);
  border: 0;
  border-radius: var(--chat-action-group-radius);
  overflow: visible;
  box-shadow: inset 0 0 0 1px var(--segmented-edge);
}

.workspace-search-scope-picker > button {
  flex: 0 1 auto;
  min-width: 44px;
  height: var(--chat-action-control-size);
  min-height: var(--chat-action-control-size);
  padding-block: 0;
  padding-inline: 10px;
  font-size: 12px;
}

.workspace-search-scope-option-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-title-search-surface > .chat-title-search-bar {
  box-sizing: border-box;
  width: 100%;
  height: var(--chat-action-group-height);
  min-height: var(--chat-action-group-height);
  gap: var(--chat-action-group-gap);
  margin: 0;
  padding: var(--chat-action-group-block-inset) var(--chat-action-group-inset);
  border: 0;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
}

.chat-title-search-surface > .chat-title-search-bar .chat-search-field {
  height: var(--chat-action-control-size);
  padding-inline: 0;
}

.chat-title-search-surface > .chat-title-search-bar .search-field-submit,
.chat-title-search-surface > .chat-title-search-bar .search-action-button {
  flex-basis: var(--chat-action-control-size);
  width: var(--chat-action-control-size);
  height: var(--chat-action-control-size);
}

.chat-title-search-surface:focus-within {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-primary) 48%, var(--border-subtle));
}

.chat-title-search-bar .chat-search-input {
  height: var(--chat-action-control-size);
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  font-size: 13px;
}

.chat-title-search-bar .chat-search-input:focus {
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .chat-title-search-context > .chat-title-search-surface {
    clip-path: none;
    transition: opacity var(--motion-fast) var(--ease-out), visibility 0s linear var(--motion-fast);
  }
  .chat-title-search-context.open > .chat-title-search-surface {
    clip-path: none;
    transition: opacity var(--motion-fast) var(--ease-out), visibility 0s;
  }
}

.chat-breadcrumb-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.chat-search-toggle,
.chat-session-toolbar-button,
.chat-terminal-toggle,
.chat-wiki-toggle,
.chat-drawer-toggle {
  appearance: none;
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.chat-search-toggle:hover,
.chat-session-toolbar-button:hover:not(:disabled),
.chat-terminal-toggle:hover,
.chat-wiki-toggle:hover,
.chat-drawer-toggle:hover:not(:disabled) {
  background: var(--hover);
  color: var(--text-primary);
}

.chat-search-toggle.active,
.chat-session-toolbar-button.active,
.chat-terminal-toggle.active,
.chat-drawer-toggle.active {
  background: var(--accent-soft-bg);
  color: var(--accent-primary);
}

.chat-search-toggle.active:hover,
.chat-session-toolbar-button.active:hover:not(:disabled),
.chat-terminal-toggle.active:hover,
.chat-drawer-toggle.active:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent-primary) 24%, transparent);
  color: var(--accent-primary);
}

.chat-drawer-toggle:disabled {
  opacity: 0.52;
  cursor: default;
}

.chat-session-toolbar-button:disabled {
  opacity: 0.42;
  cursor: default;
}

.chat-session-toolbar-button:disabled:hover {
  background: transparent;
  color: var(--text-tertiary);
}

.chat-wiki-link {
  text-decoration: none;
}

.chat-breadcrumb-title .breadcrumb-project-name {
  min-width: 0;
  max-width: 35%;
  flex: 0 1 auto;
  border: 0;
  padding: 0;
  background: transparent;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.chat-breadcrumb-separator {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  color: var(--text-tertiary);
}

.chat-title-session-text {
  min-width: 0;
  flex: 1 1 0;
  color: var(--text-primary);
  font-weight: 500;
  cursor: default;
}

.chat-title-session-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-title-session-button:hover,
.chat-title-session-button.open {
  color: var(--text-primary);
}

.chat-title-outline-menu {
  position: fixed;
  left: 12px;
  top: calc(var(--wm-safe-area-top) + var(--chat-menu-header-height));
  z-index: 86;
  width: min(360px, calc(100vw - 24px));
  overflow-y: auto;
  padding: 8px;
}

.chat-title-outline-menu .chat-session-outline {
  min-width: 0;
}

.chat-session-outline {
  min-width: 0;
  min-height: 0;
  color: var(--text-primary);
}

.chat-session-outline-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chat-session-outline-item {
  min-width: 0;
}

.chat-session-outline-item[data-chat-outline-kind='prompt'] {
  margin-top: 6px;
}

.chat-session-outline-item[data-chat-outline-kind='prompt']:first-child {
  margin-top: 0;
}

.chat-session-outline-button {
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  padding: 5px 8px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.chat-session-outline-label {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chat-session-outline-item[data-chat-outline-kind='prompt'] .chat-session-outline-button {
  color: var(--text-primary);
  font-weight: 600;
}

.chat-session-outline-item[data-chat-outline-kind='prompt'] .chat-session-outline-label {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-session-outline-item[data-chat-outline-level='2'] .chat-session-outline-button {
  padding-left: 20px;
}

.chat-session-outline-item[data-chat-outline-level='3'] .chat-session-outline-button {
  padding-left: 32px;
}

.chat-session-outline-item[data-chat-outline-level='4'] .chat-session-outline-button,
.chat-session-outline-item[data-chat-outline-level='5'] .chat-session-outline-button,
.chat-session-outline-item[data-chat-outline-level='6'] .chat-session-outline-button {
  padding-left: 44px;
}

.chat-session-outline-button:hover {
  background: var(--hover);
  color: var(--text-primary);
}

.chat-session-outline-button[aria-current='true'] {
  background: var(--accent-soft-bg);
  color: var(--text-primary);
  font-weight: 600;
}

.chat-session-outline-button:active {
  transform: scale(0.985);
}

@media (prefers-reduced-motion: reduce) {
  .chat-session-outline-button {
    transition: none;
  }

  .chat-session-outline-button:active {
    transform: none;
  }
}

.chat-session-outline-empty {
  padding: 18px 12px;
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.chat-title-actions {
  flex: 0 0 auto;
  min-width: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.chat-session-toolbar-actions {
  flex: 0 0 auto;
  min-width: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  position: absolute;
  inset-block: 0;
  right: max(var(--chat-session-toolbar-right, 8px), calc(var(--chat-window-controls-reserve, 0px) + 8px));
  z-index: 2;
}

.narrow-shell .chat-session-toolbar-actions {
  position: static;
  inset-block: auto;
  right: auto;
}

.chat-preview-toolbar {
  flex: 0 0 auto;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  border-bottom: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--surface-panel) 92%, var(--surface-panel));
}

.chat-preview-icon-button {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.chat-preview-icon-button:hover {
  background: var(--hover);
  color: var(--text-primary);
}

.chat-preview-icon-button.active {
  color: var(--accent-primary);
}

.chat-preview-icon-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chat-preview-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-secondary);
}

.chat-preview-mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  padding-top: var(--wm-safe-area-top);
  background: var(--surface-workspace-content);
  color: var(--text-primary);
}

.chat-preview-mobile-overlay[hidden] {
  display: none;
}

.item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 0 10px;
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color var(--motion-fast) var(--ease-standard);
}

.item:hover {
  background: var(--hover);
}

.item.selected {
  background: color-mix(in srgb, var(--surface-panel) 52%, var(--surface-sidebar));
}

.session-list-nav {
  overflow: auto;
  scrollbar-gutter: auto;
}

.chat-header-archive-control {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.chat-header-archive-control.compact {
  justify-content: flex-end;
}

.session-archive-progress {
  margin: 0 4px 8px;
  padding: 7px 8px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 70%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-raised) 78%, transparent);
  color: var(--text-secondary);
  display: grid;
  gap: 5px;
  font-size: 11px;
  line-height: 1.3;
}

.session-archive-progress-top {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.session-archive-progress-label {
  min-width: 0;
  overflow: hidden;
  color: color-mix(in srgb, var(--text-secondary) 78%, transparent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.session-archive-progress-dismiss {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 70%, transparent);
  border-radius: 5px;
  background: transparent;
  color: color-mix(in srgb, var(--text-secondary) 72%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.session-archive-progress-dismiss:hover:not(:disabled) {
  background: var(--hover);
  color: var(--text-primary);
}

.session-archive-progress-dismiss:disabled {
  cursor: default;
  opacity: 0.42;
}

.session-archive-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: color-mix(in srgb, var(--text-primary) 82%, transparent);
  font-weight: 600;
}

.session-archive-progress-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border-subtle) 72%, transparent);
}

.session-archive-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: color-mix(in srgb, #65c27a 72%, var(--accent-primary));
}

.session-archive-progress-current,
.session-archive-summary {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.session-search-empty {
  margin: 4px 0 0 21px;
}

.session-state-marker.archived {
  color: color-mix(in srgb, #75a7df 74%, var(--text-primary));
  font-size: 11px;
}





.project-session-menu-btn.restore {
  color: color-mix(in srgb, #65c27a 78%, var(--text-primary));
}



















.wide-project-hub-0 { --hub-accent: #00a6a6; }
.wide-project-hub-1 { --hub-accent: #2f9e44; }
.wide-project-hub-2 { --hub-accent: #bc6c25; }
.wide-project-hub-3 { --hub-accent: #4f86c6; }
.wide-project-hub-4 { --hub-accent: #c879ff; }
.wide-project-hub-5 { --hub-accent: #d9480f; }
.wide-project-hub-6 { --hub-accent: #038c7f; }
.wide-project-hub-7 { --hub-accent: #7b6cb8; }

.recent-sessions-section {
  margin: 0 0 8px;
}

.chat-session-operation {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 2px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.chat-session-operation-icon {
  flex: 0 0 auto;
  color: var(--text-tertiary);
  font-size: 15px;
}

.chat-session-operation.completed .chat-session-operation-icon {
  color: var(--state-success);
}

.chat-session-operation.fork.completed .chat-session-operation-icon {
  color: var(--text-tertiary);
}

.chat-session-operation.failed .chat-session-operation-icon,
.chat-session-operation.failed .chat-session-operation-detail {
  color: var(--state-danger);
}

.chat-session-operation-label {
  color: var(--text-secondary);
  font-weight: 600;
}

.chat-session-operation-detail {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-tertiary);
}




.recent-project-session-group {
  margin: 2px 0;
}


.recent-project-session-group:first-child .recent-project-divider {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}



.recent-project-divider-hub {
  flex: 0 1 auto;
}



.recent-project-session-list {
  position: relative;
}






.chat-hidden-project-list {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed color-mix(in srgb, var(--border-subtle) 82%, transparent);
}

.chat-hidden-project-row {
  margin-bottom: 4px;
  opacity: 0.82;
}

.chat-hidden-project-row .wide-project-row {
  border: 1px dashed color-mix(in srgb, var(--border-subtle) 90%, transparent);
  background: color-mix(in srgb, var(--surface-panel) 72%, transparent);
}

.chat-hidden-project-row .wide-project-row:hover {
  background: color-mix(in srgb, var(--hover) 58%, transparent);
}

.chat-hidden-project-toggle {
  cursor: default;
  color: color-mix(in srgb, var(--text-secondary) 86%, var(--text-primary));
}

.chat-hidden-project-toggle:active {
  transform: none;
}

.chat-hidden-project-folder-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px dashed color-mix(in srgb, var(--text-secondary) 72%, transparent);
  border-radius: 4px;
  pointer-events: none;
}

.chat-hidden-project-folder {
  color: color-mix(in srgb, var(--text-secondary) 84%, transparent) !important;
  text-shadow: none !important;
  opacity: 0.72;
}

.chat-hidden-project-row .wide-project-hub-tag {
  color: color-mix(in srgb, var(--text-secondary) 78%, var(--text-primary));
}

.chat-hidden-project-restore-btn {
  opacity: 0.72;
}

.chat-hidden-project-row .wide-project-row:hover .chat-hidden-project-restore-btn {
  opacity: 1;
}














.session-state-marker {
  min-width: 9px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: color-mix(in srgb, var(--text-primary) 38%, transparent);
  flex: 0 0 auto;
}

.session-state-marker.running {
  color: #68a8e8;
  font-size: 11px;
}

.session-state-marker.running .session-state-dot {
  background: #68a8e8;
  animation: session-state-breathe 2s ease-in-out infinite;
}

@keyframes session-state-breathe {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .session-state-marker.running .session-state-dot {
    animation: none;
  }
}

.session-state-leading {
  position: absolute;
  left: -6px;
  top: 50%;
  width: 9px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: color-mix(in srgb, var(--text-primary) 38%, transparent);
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
}

.session-state-leading.running {
  left: -10px;
  width: 18px;
  color: #68a8e8;
}

.session-state-leading.permission-pending {
  left: -10px;
  width: 18px;
  color: var(--accent-primary);
  font-size: 13px;
}

.session-permission-count {
  position: absolute;
  right: -5px;
  top: -5px;
  min-width: 12px;
  height: 12px;
  padding: 0 2px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent-action);
  font-size: 8px;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
}

.session-state-leading.completed-unviewed .session-state-dot,
.wide-project-completion-dot.session-state-dot {
  background: var(--state-success);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--state-success) 18%, transparent);
}

.session-state-leading.failed-unviewed .session-state-dot {
  background: var(--state-danger);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--state-danger) 18%, transparent);
}

.session-state-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: transparent;
}

.session-state-marker.completed-unviewed .session-state-dot {
  background: var(--state-success);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--state-success) 18%, transparent);
}

.session-state-marker.failed-unviewed .session-state-dot {
  background: var(--state-danger);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--state-danger) 18%, transparent);
}

.draft-session-row-wrap.has-dismiss .draft-session-row {
  padding-right: 27px;
}

.draft-session-row.creating,
.draft-session-row.sendingFirstPrompt {
  color: color-mix(in srgb, var(--text-primary) 82%, transparent);
}

.draft-session-row.failed {
  color: color-mix(in srgb, var(--state-danger) 74%, var(--text-primary));
}

.session-state-marker.draft {
  font-size: 11px;
}

.session-state-marker.draft.creating,
.session-state-marker.draft.sendingFirstPrompt {
  color: #68a8e8;
}

.session-state-marker.draft.failed {
  color: var(--state-danger);
}

.draft-session-dismiss {
  appearance: none;
  position: absolute;
  right: 4px;
  top: 50%;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: color-mix(in srgb, var(--text-primary) 54%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.draft-session-dismiss:hover {
  background: color-mix(in srgb, var(--state-danger) 13%, var(--hover));
  color: var(--state-danger);
}



















.wide-session-agent-0 { --agent-accent: #5aa9e6; }
.wide-session-agent-1 { --agent-accent: #69db7c; }
.wide-session-agent-2 { --agent-accent: #f7b267; }
.wide-session-agent-3 { --agent-accent: #94d82d; }
.wide-session-agent-4 { --agent-accent: #ec7ab0; }
.wide-session-agent-5 { --agent-accent: #ff8787; }
.wide-session-agent-6 { --agent-accent: #ced4da; }
.wide-session-agent-7 { --agent-accent: #4c6ef5; }
.wide-session-agent-8 { --agent-accent: #22d3ee; }
.wide-session-agent-9 { --agent-accent: #845ef7; }

.project-session-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 8px 6px 23px;
  padding: 6px 8px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--state-danger) 9%, transparent);
  color: color-mix(in srgb, var(--text-primary) 74%, var(--state-danger));
  font-size: 11px;
}

.project-session-error button {
  border: none;
  border-radius: 5px;
  background: color-mix(in srgb, var(--state-danger) 16%, transparent);
  color: var(--text-primary);
  padding: 3px 7px;
  font: inherit;
  cursor: pointer;
}


.chat-hub-summary {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.chat-hub-summary-button {
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  padding: 0 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}

.chat-hub-summary-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-hub-summary-copy {
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.chat-hub-summary-count {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.chat-hub-summary-button:hover {
  background: var(--hover);
  color: var(--text-primary);
}

.chat-hub-summary-button[aria-expanded='true'] {
  background: var(--accent-soft-bg);
  color: var(--accent-primary);
}

.chat-hub-summary-button[aria-expanded='true'] .chat-hub-summary-count {
  color: var(--text-secondary);
}

.chat-hub-summary-button .sl-icon {
  flex: 0 0 auto;
}

.chat-hub-popover-stack {
  --chat-hub-popover-viewport-offset: 96px;
  --chat-hub-stack-shift: 0px;
  position: fixed;
  left: 12px;
  top: 48px;
  z-index: 86;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transform: translateX(var(--chat-hub-stack-shift));
  transition: transform var(--motion-standard) var(--ease-out);
}

.chat-hub-popover {
  width: var(--chat-hub-menu-width, min(340px, calc(100vw - 24px)));
  min-width: 0;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - var(--chat-hub-popover-viewport-offset));
  max-height: calc(100dvh - var(--chat-hub-popover-viewport-offset));
  overflow: auto;
  letter-spacing: 0;
  text-transform: none;
}

.chat-hub-skill-companion.desktop {
  width: clamp(380px, 40vw, 520px);
  max-height: calc(100vh - var(--chat-hub-popover-viewport-offset));
  max-height: calc(100dvh - var(--chat-hub-popover-viewport-offset));
  overflow: hidden;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-floating);
  background: color-mix(in srgb, var(--surface-overlay) 88%, transparent);
  box-shadow: var(--shadow-overlay);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  transform-origin: top left;
  animation: sl-menu-in var(--motion-fast) var(--ease-out);
}

@keyframes chat-hub-companion-out {
  to {
    opacity: 0;
    transform: translateX(6px) scale(0.98);
  }
}

.chat-hub-skill-companion.desktop.sl-menu-exit {
  animation: chat-hub-companion-out var(--motion-exit) var(--ease-out) forwards;
}

/* Project Skills keeps the existing Hub menu as its anchor while giving the
   project controls enough room to read side by side. The board itself owns
   horizontal scrolling; each project column owns its vertical scroll so the
   project chrome stays available while moving through a long skill list. */





.chat-hub-empty {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 2px 4px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: default;
}




.chat-hub-color-button,
.chat-hub-expand-button,
.chat-hub-color-swatch,
.chat-hub-project-row {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chat-hub-color-button {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

.chat-hub-color-button:hover,
.chat-hub-color-button[aria-expanded="true"],
.chat-hub-expand-button:hover,
.chat-hub-expand-button:focus-visible,
.chat-hub-project-row:hover {
  background: color-mix(in srgb, var(--hover) 86%, transparent);
  color: var(--text-primary);
}

.chat-hub-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--hub-accent);
  border: 1px solid color-mix(in srgb, var(--hub-accent) 68%, rgba(255, 255, 255, 0.28));
}

.chat-hub-expand-button {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  padding: 0;
  font: inherit;
}

.chat-hub-expand-chevron {
  position: relative;
  z-index: 1;
  justify-self: end;
  color: var(--text-tertiary);
  font-size: 14px;
  pointer-events: none;
  transition: transform var(--motion-fast) var(--ease-out);
}



.chat-hub-color-palette {
  --chat-hub-color-chip-width: 36px;
  --chat-hub-color-chip-height: 20px;
  --chat-hub-color-chip-radius: 6px;
  position: absolute;
  top: 30px;
  right: 0;
  z-index: 10;
  width: min(248px, calc(100% - 4px));
  margin: 0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.chat-hub-color-palette.topbar-menu-surface {
  --popover-origin: top right;
}

.chat-hub-color-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.chat-hub-color-swatch {
  --swatch-color: var(--accent-primary);
  position: relative;
  width: var(--chat-hub-color-chip-width);
  height: var(--chat-hub-color-chip-height);
  justify-self: center;
  border: 1px solid color-mix(in srgb, var(--swatch-color) 46%, var(--border-subtle));
  border-radius: var(--chat-hub-color-chip-radius);
  background: var(--swatch-color);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13);
}

.chat-hub-color-custom {
  --hub-accent: var(--accent-primary);
  --hub-custom-hue: #ff0000;
  --hub-custom-s: 100%;
  --hub-custom-v: 0%;
  --hub-custom-h: 0%;
  display: grid;
  gap: 7px;
  padding: 7px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 70%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-raised) 46%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.chat-hub-color-custom-header {
  min-height: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--chat-hub-color-chip-width);
  align-items: center;
  gap: 8px;
}

.chat-hub-color-custom-label {
  min-width: 0;
  align-self: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: color-mix(in srgb, var(--text-primary) 86%, var(--text-secondary));
  font-size: 11px;
  font-weight: 700;
}

.chat-hub-color-custom-preview {
  width: var(--chat-hub-color-chip-width);
  height: var(--chat-hub-color-chip-height);
  justify-self: end;
  border: 1px solid color-mix(in srgb, var(--hub-accent) 54%, rgba(255, 255, 255, 0.22));
  border-radius: var(--chat-hub-color-chip-radius);
  background: var(--hub-accent);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 1px 4px rgba(0, 0, 0, 0.18);
}

.chat-hub-color-sv {
  position: relative;
  aspect-ratio: 2 / 1;
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 76%, transparent);
  border-radius: 7px;
  overflow: hidden;
  cursor: pointer;
  touch-action: none;
  background:
    linear-gradient(to top, #000000, rgba(0, 0, 0, 0)),
    linear-gradient(to right, #ffffff, rgba(255, 255, 255, 0)),
    var(--hub-custom-hue);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.chat-hub-color-sv-thumb {
  position: absolute;
  left: clamp(6px, var(--hub-custom-s), calc(100% - 6px));
  top: clamp(6px, var(--hub-custom-v), calc(100% - 6px));
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.46);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.chat-hub-color-hue {
  position: relative;
  height: 14px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 70%, transparent);
  border-radius: 999px;
  cursor: pointer;
  touch-action: none;
  background: linear-gradient(to right,
    #ff0000 0%,
    #ffff00 17%,
    #00ff00 33%,
    #00ffff 50%,
    #0000ff 67%,
    #ff00ff 83%,
    #ff0000 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.chat-hub-color-hue-thumb {
  position: absolute;
  left: clamp(6px, var(--hub-custom-h), calc(100% - 6px));
  top: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: var(--hub-accent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.46);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.chat-hub-color-swatch.selected {
  border-color: color-mix(in srgb, var(--swatch-color) 64%, var(--text-primary));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 0 0 2px color-mix(in srgb, var(--surface-panel) 80%, transparent);
}

.chat-hub-color-swatch.selected::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 6px;
  width: 7px;
  height: 4px;
  border-left: 1.5px solid rgba(255, 255, 255, 0.86);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.86);
  transform: rotate(-45deg);
}

.chat-hub-color-default-badge {
  position: absolute;
  left: 3px;
  bottom: 2px;
  min-width: 10px;
  height: 9px;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.34);
  color: rgba(255, 255, 255, 0.88);
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.chat-hub-project-list {
  margin: 1px 0 3px;
  padding: 2px 0;
}

.chat-hub-project-row {
  width: 100%;
  height: 32px;
  box-sizing: border-box;
  justify-content: flex-start;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 6px;
  padding: 0 5px;
  border-radius: 5px;
  text-align: left;
  font-size: 11px;
}

.chat-hub-project-check {
  width: 14px;
  height: 14px;
  border: 1.5px solid color-mix(in srgb, var(--border-strong) 70%, transparent);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 10px;
  background: transparent;
  transition: border-color var(--motion-fast) var(--ease-standard), background var(--motion-fast) var(--ease-standard);
}

.chat-hub-project-row:not(.hidden) .chat-hub-project-check {
  border-color: color-mix(in srgb, var(--text-secondary) 70%, transparent);
  background: color-mix(in srgb, var(--text-primary) 10%, transparent);
  color: var(--text-primary);
}

.chat-hub-project-row:hover .chat-hub-project-check {
  border-color: var(--text-secondary);
}

.chat-hub-project-row.hidden .chat-hub-project-check {
  color: transparent;
}

.chat-hub-project-row.hidden .chat-hub-project-name {
  opacity: 0.45;
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--text-secondary) 50%, transparent);
}

.chat-hub-project-name,
.chat-hub-project-empty {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-hub-project-empty {
  padding: 3px 5px;
  color: var(--text-secondary);
  font-size: 11px;
}


.chat-hub-protocol-mismatch {
  padding: 6px 30px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.3;
}

/* Keep expandable Hub regions mounted through their exit so height, opacity,
   and position share one interruptible transition. */
.chat-hub-sections-transition,
.chat-hub-section-body-transition,
.chat-hub-detail-transition {
  display: grid;
  grid-template-rows: 0fr;
  min-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-3px);
  visibility: hidden;
  transition:
    grid-template-rows var(--motion-standard) var(--ease-out),
    opacity var(--motion-standard) var(--ease-out),
    transform var(--motion-standard) var(--ease-out),
    visibility 0s linear var(--motion-standard);
}

.chat-hub-sections-transition.expanded,
.chat-hub-section-body-transition.expanded,
.chat-hub-detail-transition.expanded {
  grid-template-rows: 1fr;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  visibility: visible;
  transition:
    grid-template-rows var(--motion-standard) var(--ease-out),
    opacity var(--motion-standard) var(--ease-out),
    transform var(--motion-standard) var(--ease-out),
    visibility 0s linear 0s;
}

.chat-hub-sections-transition.exiting,
.chat-hub-section-body-transition.exiting,
.chat-hub-detail-transition.exiting {
  transition:
    grid-template-rows var(--motion-exit) var(--ease-out),
    opacity var(--motion-exit) var(--ease-out),
    transform var(--motion-exit) var(--ease-out),
    visibility 0s linear var(--motion-exit);
}

.chat-hub-sections-transition.entering,
.chat-hub-section-body-transition.entering,
.chat-hub-detail-transition.entering {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  visibility: visible;
}

.chat-hub-sections-transition > .chat-hub-sections,
.chat-hub-section-body-transition > .chat-hub-section-body,
.chat-hub-detail-transition > .chat-hub-detail {
  min-height: 0;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .chat-hub-sections-transition,
  .chat-hub-section-body-transition,
  .chat-hub-detail-transition,
  .chat-hub-sections-transition.expanded,
  .chat-hub-section-body-transition.expanded,
  .chat-hub-detail-transition.expanded,
  .chat-hub-sections-transition.exiting,
  .chat-hub-section-body-transition.exiting,
  .chat-hub-detail-transition.exiting,
  .chat-hub-sections-transition.entering,
  .chat-hub-section-body-transition.entering,
  .chat-hub-detail-transition.entering,
  .chat-hub-expand-chevron,
  .chat-hub-section-chevron,
  .chat-hub-project-skill-trigger > .sl-icon,
  .chat-hub-popover-stack {
    animation: none;
    transition: none;
    transform: none;
  }
}

.chat-hub-section + .chat-hub-section {
  border-top: 1px solid color-mix(in srgb, var(--border-subtle) 30%, transparent);
}



.chat-hub-section-icon {
  flex: 0 0 auto;
  color: var(--text-tertiary);
}

.chat-hub-section-label {
  color: var(--text-primary);
  font-weight: 600;
}

.chat-hub-section-summary {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  color: var(--text-tertiary);
  font-size: 10px;
}

.chat-hub-settings-state {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.chat-hub-settings-state-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 999px;
  background: var(--text-tertiary);
}

.chat-hub-settings-state.on .chat-hub-settings-state-dot {
  background: var(--state-success);
}

.chat-hub-section-chevron {
  flex: 0 0 auto;
  color: var(--text-tertiary);
  transition: transform var(--motion-fast) var(--ease-out);
}


.chat-hub-section-body {
  margin: 0 0 4px 2px;
  padding: 2px 0 4px;
}

.chat-hub-section-body .chat-hub-project-list {
  margin-left: 0;
}

.chat-hub-settings {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-hub-flicker-row {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.chat-hub-flicker-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.chat-hub-flicker-modes {
  display: inline-flex;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 60%, transparent);
  border-radius: 6px;
  overflow: hidden;
}

.chat-hub-flicker-modes button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  cursor: pointer;
}

.chat-hub-flicker-modes button + button {
  border-left: 1px solid color-mix(in srgb, var(--border-subtle) 45%, transparent);
}

.chat-hub-flicker-modes button:hover:not(:disabled):not(.selected) {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--hover) 70%, transparent);
}

.chat-hub-flicker-modes button.selected {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--hover) 90%, transparent);
}

.chat-hub-flicker-modes button:disabled {
  cursor: default;
}

.chat-hub-flicker-modes button:disabled:not(.selected) {
  opacity: 0.5;
}

.chat-hub-settings-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-primary);
}

.chat-hub-settings-row-icon {
  color: var(--text-tertiary);
}

.chat-hub-settings-keys {
  display: flex;
  flex-direction: column;
  margin-top: 2px;
  border-top: 1px solid color-mix(in srgb, var(--border-subtle) 30%, transparent);
  padding-top: 3px;
}

.secret-compact-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 1px 2px;
}

.secret-compact-status {
  flex: 0 0 auto;
  width: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
}

.secret-compact-status.configured {
  color: var(--state-success);
}

.secret-compact-label {
  flex: 0 0 auto;
  min-width: 52px;
  font-size: 11px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secret-compact-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 22px;
  padding: 0 7px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 65%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface-canvas) 55%, transparent);
  color: var(--text-primary);
  font: inherit;
  font-size: 11px;
}

.secret-compact-input:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--accent-primary) 65%, transparent);
}

.secret-compact-input::placeholder {
  color: var(--text-tertiary);
}

.secret-compact-set {
  appearance: none;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 60%, transparent);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  border-radius: 5px;
  padding: 2px 8px;
  cursor: pointer;
}

.secret-compact-set:hover:not(:disabled) {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--hover) 80%, transparent);
}

.secret-compact-set:disabled {
  opacity: 0.45;
  cursor: default;
}

.secret-compact-clear {
  appearance: none;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
}

.secret-compact-clear:hover:not(:disabled) {
  color: var(--danger, #df6674);
  background: color-mix(in srgb, var(--hover) 80%, transparent);
}

.secret-compact-clear:disabled {
  opacity: 0.45;
  cursor: default;
}

.chat-hub-settings-hint {
  padding: 4px 2px 0;
  font-size: 10px;
  color: var(--text-tertiary);
}

.chat-hub-settings-hint.error {
  color: var(--danger, #df6674);
}






.chat-hub-action {
  appearance: none;
  min-width: 0;
  height: 40px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}


.chat-hub-action.expanded {
  background: color-mix(in srgb, var(--hover) 66%, transparent);
}

.chat-hub-disclosure-action {
  position: relative;
}

.chat-hub-update-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--surface-panel);
  pointer-events: none;
  animation: chat-hub-dot-in var(--motion-fast) var(--ease-out);
}

@keyframes chat-hub-dot-in {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .chat-hub-update-dot {
    animation: none;
  }
}

.chat-hub-action:hover:not(:disabled),
.chat-hub-action:focus-visible {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--hover) 70%, transparent);
}

.chat-hub-action:disabled {
  opacity: 0.5;
  cursor: default;
}

.chat-hub-action-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Shared hover/focus easing for every ghost control in the hub menu so state
   changes never snap. */
.chat-hub-row,
.chat-hub-color-button,
.chat-hub-section-header,
.chat-hub-action,
.chat-hub-project-row,
.chat-hub-project-skill-trigger,
.chat-hub-project-skill-option,
.chat-hub-flicker-modes button,
button.chat-hub-skill-name {
  transition: background-color var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard);
}

@media (prefers-reduced-motion: reduce) {
  .chat-hub-row,
  .chat-hub-color-button,
  .chat-hub-section-header,
  .chat-hub-action,
  .chat-hub-project-row,
  .chat-hub-project-skill-trigger,
  .chat-hub-project-skill-option,
  .chat-hub-flicker-modes button,
  button.chat-hub-skill-name {
    transition-property: background, background-color, border-color, color, box-shadow, outline-color, opacity;
  }
}

.chat-hub-action-info {
  flex: 0 0 auto;
  min-width: 18px;
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.chat-hub-version-readout {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}


.chat-hub-gateway-capsule {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 72%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-raised) 64%, transparent);
  color: var(--text-tertiary);
  font: inherit;
  line-height: 1;
  white-space: nowrap;
  pointer-events: auto;
}

button.chat-hub-gateway-capsule {
  appearance: none;
  cursor: pointer;
  transition: background-color var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard);
}

button.chat-hub-gateway-capsule:hover:not(:disabled),
button.chat-hub-gateway-capsule:focus-visible {
  background: color-mix(in srgb, var(--hover) 70%, transparent);
  border-color: color-mix(in srgb, var(--border-subtle) 90%, transparent);
}

button.chat-hub-gateway-capsule:disabled {
  cursor: default;
}

.chat-hub-gateway-capsule-label {
  color: var(--text-secondary);
  font-weight: 650;
}

.chat-hub-gateway-capsule .chat-hub-update-dot {
  top: -3px;
  right: -3px;
}

@media (prefers-reduced-motion: reduce) {
  button.chat-hub-gateway-capsule {
    transition: none;
  }
}

.chat-hub-version-action .chat-hub-action-label {
  font-variant-numeric: tabular-nums;
}




.chat-hub-detail {
  margin: 0 2px 5px;
  padding: 2px 6px 5px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-raised) 42%, transparent);
}

.chat-hub-app-count {
  color: var(--text-secondary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.chat-hub-app {
  padding: 4px 2px 7px;
  border-top: 1px solid var(--border);
}

.chat-hub-app-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  min-height: 32px;
}

.chat-hub-app-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.chat-hub-app-phase {
  font-size: 10px;
  color: var(--text-secondary);
}

.chat-hub-app-actions {
  display: flex;
  align-items: center;
}

.chat-hub-app-actions .chat-hub-action {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
}

.chat-hub-app-meta,
.chat-hub-app-status {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 8px;
  margin-bottom: 3px;
  font-size: 10px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.chat-hub-app-endpoint,
.chat-hub-app-component,
.chat-hub-app-relay {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.chat-hub-app-notice,
.chat-hub-app-status .health-degraded {
  color: var(--warning, #d8a13b);
  font-size: 10px;
}

.chat-hub-app-error,
.chat-hub-app-status .health-unhealthy,
.chat-hub-app-phase.phase-failed {
  color: var(--danger, #df6674);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.chat-hub-app-error {
  margin: 4px 0;
}

.chat-hub-app-logs pre {
  margin: 0;
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.5;
}

.chat-hub-detail-toolbar {
  height: 36px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.chat-hub-detail-empty {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 0 2px;
  color: var(--text-tertiary);
  font-size: 10px;
}

.chat-hub-detail-error {
  padding: 8px 10px;
  color: var(--danger, #df6674);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.chat-hub-mcp-toolbar-actions {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.chat-hub-mcp-import-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.chat-hub-mcp-row {
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  align-items: center;
  gap: 6px;
  padding: 3px 2px 3px 4px;
  border-radius: 5px;
}

.chat-hub-mcp-row:hover {
  background: color-mix(in srgb, var(--hover) 48%, transparent);
}

.chat-hub-mcp-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chat-hub-mcp-name,
.chat-hub-mcp-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-hub-mcp-name {
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
}

.chat-hub-mcp-meta {
  color: var(--text-tertiary);
  font-size: 9px;
}

.chat-hub-mcp-status {
  font-size: 9px;
  white-space: nowrap;
}

.chat-hub-mcp-status.state-connected {
  color: var(--state-success);
}

.chat-hub-mcp-status.state-starting,
.chat-hub-mcp-status.state-not_started {
  color: var(--text-secondary);
}

.chat-hub-mcp-status.state-failed {
  color: var(--danger, #df6674);
}

.chat-hub-mcp-status.state-disabled {
  color: var(--text-tertiary);
}

.chat-hub-mcp-actions {
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.chat-hub-mcp-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 5px 2px 7px;
  border-bottom: 1px solid color-mix(in srgb, var(--border-subtle) 35%, transparent);
}

.chat-hub-mcp-import-preview {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 2px 0 6px;
  padding: 7px;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 28%, var(--border-subtle));
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent-primary) 6%, transparent);
}

.chat-hub-mcp-import-preview-title {
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 600;
}

.chat-hub-mcp-import-preview-summary {
  color: var(--text-secondary);
  font-size: 9px;
}

.chat-hub-mcp-import-preview-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chat-hub-mcp-import-preview-item {
  min-width: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  gap: 5px;
  padding: 2px 5px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--surface-raised) 76%, transparent);
  color: var(--text-secondary);
  font-size: 9px;
}

.chat-hub-mcp-import-preview-item.is-conflict {
  opacity: 0.68;
}

.chat-hub-mcp-import-preview-item input {
  margin: 1px 0 0;
}

.chat-hub-mcp-import-preview-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.chat-hub-mcp-import-preview-copy > span,
.chat-hub-mcp-import-preview-copy > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-hub-mcp-timeout-metadata {
  color: var(--text-tertiary);
}

.chat-hub-mcp-form label,
.chat-hub-mcp-values-toolbar {
  color: var(--text-secondary);
  font-size: 9px;
}

.chat-hub-mcp-form label > span {
  display: block;
  margin-bottom: 3px;
}

.chat-hub-mcp-form small {
  color: var(--text-tertiary);
  font-size: 9px;
  font-weight: 400;
}

.chat-hub-mcp-form input:not([type='checkbox']),
.chat-hub-mcp-form select,
.chat-hub-mcp-form textarea,
.chat-hub-skill-add-repository-input-row input {
  width: 100%;
  box-sizing: border-box;
  min-height: 25px;
  padding: 4px 6px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 80%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface-panel) 70%, transparent);
  color: var(--text-primary);
  font: inherit;
  font-size: 10px;
}

.chat-hub-mcp-form textarea {
  resize: vertical;
}

.chat-hub-mcp-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 6px;
}

.chat-hub-mcp-values {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-hub-mcp-values-toolbar {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-hub-mcp-value-row {
  display: grid;
  grid-template-columns: minmax(70px, .8fr) minmax(80px, 1.2fr) max-content 24px;
  align-items: center;
  gap: 4px;
}

.chat-hub-mcp-secret-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.chat-hub-mcp-secret-toggle input {
  margin: 0;
}

.chat-hub-mcp-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

@media (max-width: 620px) {

  .chat-hub-mcp-form-grid {
    grid-template-columns: 1fr;
  }

  .chat-hub-mcp-value-row {
    grid-template-columns: minmax(70px, 1fr) minmax(80px, 1fr) max-content 24px;
  }
}

.chat-hub-npm-row,
.chat-hub-scan-row,
.chat-hub-skill-row {
  height: 32px;
  box-sizing: border-box;
  display: grid;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
  border-radius: 5px;
}

.chat-hub-npm-row {
  grid-template-columns: minmax(0, 1fr) max-content;
}

.chat-hub-skill-row {
  grid-template-columns: minmax(0, 1fr) 52px;
  min-height: 32px;
  height: auto;
}

.chat-hub-scan-row {
  grid-template-columns: minmax(0, 1fr) max-content 24px;
}

.chat-hub-npm-row:hover,
.chat-hub-skill-row:hover,
.chat-hub-scan-row:hover {
  background: color-mix(in srgb, var(--hover) 48%, transparent);
}

.chat-hub-scan-name,
.chat-hub-skill-name {
  min-width: 0;
  font-size: 11px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-hub-skill-name-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

button.chat-hub-skill-name {
  appearance: none;
  display: block;
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 2px 3px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

button.chat-hub-skill-name:hover:not(:disabled),
button.chat-hub-skill-name:focus-visible {
  color: var(--accent-primary);
  background: color-mix(in srgb, var(--hover) 64%, transparent);
}

button.chat-hub-skill-name:disabled {
  cursor: default;
}

/* Name and version read as one left-side unit; actions hug the right edge
   so uninstall always lands in the same trailing column. */
.chat-hub-npm-name-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Agent marks are transparent layers; the small badge never gets a capsule or
   filled backing, so composite profiles remain lightweight in both themes. */
.agent-icon {
  position: relative;
  display: inline-flex;
  width: var(--agent-icon-size, 16px);
  height: var(--agent-icon-size, 16px);
  flex: none;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.agent-icon-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.agent-icon-image.monochrome {
  filter: brightness(0) invert(1);
}
.theme-light .agent-icon-image.monochrome {
  filter: none;
}
.agent-icon-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  z-index: 1;
  display: inline-flex;
  width: var(--agent-icon-badge-size, 9px);
  height: var(--agent-icon-badge-size, 9px);
  align-items: center;
  justify-content: center;
  background: transparent;
  filter: drop-shadow(0 0 1px var(--surface-sidebar));
}

/* Package names reuse the session-list agent mark: the wide-session-agent-N
   variant classes (above) supply each agent's --agent-accent color. */
.chat-hub-npm-agent-tag {
  width: 18px;
  height: 18px;
  flex: none;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  line-height: 0;
  color: var(--text-primary);
}
.chat-hub-npm-agent-tag:empty {
  display: none;
}

.chat-hub-npm-package-name {
  min-width: 0;
  max-width: 220px;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 24%, var(--border-subtle));
  border-radius: 999px;
  color: var(--text-primary);
  background: color-mix(in srgb, var(--accent-primary) 8%, var(--surface-panel));
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
}

.theme-light .chat-hub-npm-agent-tag {
  color: var(--text-primary);
}

.chat-hub-npm-versions {
  flex: 0 0 auto;
  font-size: 10px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.chat-hub-npm-version-copy {
  font-variant-numeric: tabular-nums;
}

.chat-hub-npm-version-new {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 6px;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 24%, var(--border-subtle));
  border-radius: 999px;
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent-primary) 9%, var(--surface-panel));
  font-weight: 600;
}

.chat-hub-npm-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

/* The update action borrows the accent color so outdated rows read as
   actionable without a label; install and uninstall stay quiet. */

.chat-hub-action-slot {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-hub-skill-scope {
  min-width: 0;
}

.chat-hub-skill-toolbar {
  height: 36px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

/* The Show all toggle keeps the shared hover fill as its pressed state. */

.chat-hub-skill-status {
  flex: 0 0 auto;
  max-width: 106px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  color: var(--text-tertiary);
}

.chat-hub-skill-status.is-danger {
  color: var(--state-danger);
}

.chat-hub-skill-status.is-warning {
  color: var(--state-warning);
}

.chat-hub-skill-status.is-neutral {
  color: var(--text-tertiary);
}

.chat-hub-skill-row-actions {
  display: grid;
  grid-template-columns: repeat(2, 24px);
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.chat-hub-skill-action-slot {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-hub-skill-row.is-uninstalled .chat-hub-skill-name {
  color: var(--text-secondary);
}

.chat-hub-skill-row.is-removed {
  background: color-mix(in srgb, var(--state-danger) 7%, transparent);
}

.chat-hub-skill-row.is-conflict {
  background: color-mix(in srgb, var(--text-tertiary) 7%, transparent);
}

.chat-hub-skill-sources {
  display: grid;
  gap: 7px;
}

.chat-hub-skill-add-repository {
  border: 1px dashed color-mix(in srgb, var(--border-subtle) 75%, transparent);
  border-radius: 7px;
  overflow: hidden;
}

.chat-hub-skill-add-repository.is-expanded {
  border-style: solid;
  border-color: color-mix(in srgb, var(--border-subtle) 68%, transparent);
  background: color-mix(in srgb, var(--surface-panel) 75%, transparent);
}

.chat-hub-skill-add-repository-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.chat-hub-skill-add-repository-trigger:hover:not(:disabled),
.chat-hub-skill-add-repository-trigger:focus-visible {
  background: color-mix(in srgb, var(--surface-hover) 65%, transparent);
  color: var(--text-primary);
}

.chat-hub-skill-add-repository-form {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.chat-hub-skill-add-repository-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-hub-skill-add-repository-input-row input {
  min-width: 0;
  flex: 1;
}

.chat-hub-skill-add-repository-hint {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 10px;
}

.chat-hub-skill-source {
  min-width: 0;
  overflow: hidden;
}

.chat-hub-skill-source-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px 7px;
  min-height: 34px;
  padding: 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--border-subtle) 50%, transparent);
}

.chat-hub-skill-source-identity {
  min-width: 0;
  flex: 1 1 150px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.chat-hub-skill-source-identity strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}

.chat-hub-skill-source-state {
  flex: 0 0 auto;
  color: var(--text-tertiary);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-hub-skill-source-state.is-stale,
.chat-hub-skill-source-state.is-pending_removal {
  color: var(--state-warning);
}

.chat-hub-skill-source-actions {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1px;
}

.chat-hub-skill-source-disclosure {
  min-width: 0;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  height: 24px;
  border: 0;
  border-radius: 5px;
  padding: 0 4px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-hub-skill-source-disclosure:hover,
.chat-hub-skill-source-disclosure:focus-visible {
  background: color-mix(in srgb, var(--hover) 80%, transparent);
}

.chat-hub-skill-source-disclosure .sl-icon {
  flex: 0 0 14px;
  color: var(--text-tertiary);
}

.chat-hub-skill-source-disclosure strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 650;
}

.chat-hub-skill-source-status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

.chat-hub-skill-source-status-dot.is-ready {
  background: var(--state-success);
}

.chat-hub-skill-source-status-dot.is-needs-refresh,
.chat-hub-skill-source-status-dot.is-stale,
.chat-hub-skill-source-status-dot.is-pending-removal,
.chat-hub-skill-source-status-dot.is-update-available {
  background: var(--state-warning);
}

.chat-hub-skill-source-status-dot.is-error {
  background: var(--state-danger);
}

.chat-hub-skill-source-count {
  flex: 0 0 auto;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chat-hub-skill-source-update {
  flex: 0 0 auto;
  color: var(--accent-primary);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.chat-hub-skill-source-error {
  padding: 5px 7px;
  color: var(--state-warning);
  background: color-mix(in srgb, var(--state-warning) 7%, transparent);
  font-size: 9px;
}

.chat-hub-skill-source-empty {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  color: var(--text-tertiary);
  font-size: 9px;
}

/* The skill list stays mounted so collapse can animate: grid-template-rows
   0fr → 1fr, with visibility keeping collapsed content unfocusable. */
.chat-hub-skill-list-collapsible {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows var(--motion-standard) var(--ease-out),
    visibility 0s linear var(--motion-standard);
}

.chat-hub-skill-list-collapsible[data-expanded='true'] {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows var(--motion-standard) var(--ease-out);
}

.chat-hub-skill-list-collapsible > .chat-hub-skill-list {
  overflow: hidden;
  min-height: 0;
}

@media (prefers-reduced-motion: reduce) {
  .chat-hub-skill-list-collapsible {
    transition: none;
  }
}

.chat-hub-skill-source .chat-hub-skill-list {
  padding: 2px 4px;
}

.chat-hub-skill-state {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px;
  color: var(--text-tertiary);
  font-size: 10px;
}

.chat-hub-skill-state.is-error {
  color: var(--state-danger);
}

.chat-hub-skill-state.is-empty {
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 6px;
}

.chat-hub-skill-empty-cta {
  appearance: none;
  min-height: 24px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.chat-hub-skill-empty-cta:hover:not(:disabled),
.chat-hub-skill-empty-cta:focus-visible {
  background: color-mix(in srgb, var(--hover) 80%, transparent);
}

.chat-hub-skill-state button {
  margin-left: auto;
}












.chat-hub-scan-status {
  flex: 0 0 auto;
  font-size: 10px;
  color: var(--text-tertiary);
}

.chat-hub-scan-status.status-indexed {
  color: var(--state-success);
}

.chat-hub-scan-status.status-error,
.chat-hub-scan-status.status-failed {
  color: var(--danger, #df6674);
}

.chat-hub-ops-error {
  padding: 4px 2px 0;
  font-size: 10px;
  color: var(--danger, #df6674);
}

.chat-hub-footer {
  min-height: 44px;
  margin: 8px 4px 0;
  padding: 6px 6px max(6px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid color-mix(in srgb, var(--border-subtle) 70%, transparent);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-hub-footer-version {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-primary);
  font-weight: 600;
}

.chat-hub-footer-version-value {
  color: var(--accent-text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.chat-hub-color-palette.inline {
  position: static;
  width: 100%;
  max-width: none;
  box-shadow: none;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 45%, transparent);
  margin: 2px 0 4px;
}

.chat-hub-skill-companion-content {
  max-height: inherit;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-hub-skill-companion-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.chat-hub-page {
  position: fixed;
  inset: 0;
  z-index: 86;
  display: flex;
  flex-direction: column;
  background: var(--surface-panel);
}

.chat-hub-page-header {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--border-subtle) 55%, transparent);
}

.chat-hub-page-title {
  color: var(--text-primary);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-hub-page-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px calc(env(safe-area-inset-bottom, 0px) + 16px);
}

.chat-hub-page-body.skill-child {
  display: flex;
  padding: 0;
}

.chat-hub-page-body.skill-child .chat-hub-skill-companion-content {
  flex: 1;
  width: 100%;
}


@media (width < 900px) {
  .chat-hub-page-body.skill-child .chat-hub-skill-companion-content {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-hub-skill-companion.desktop {
    animation: none;
  }
}

.chat-main {
  --chat-scrollbar-gutter-width: 8px;
  --chat-edge-surface-width: var(--chat-session-panel-width);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  position: relative;
}

.chat-main > .chat-block,
.chat-main > .chat-search-bar {
  position: relative;
  z-index: 1;
}

.chat-block {
  container: chat-scroll / inline-size;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior-y: none;
  scrollbar-gutter: stable;
  padding: 20px 18px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-virtuoso-list {
  flex: 0 0 auto;
  width: 100%;
}

.chat-virtuoso-row {
  box-sizing: border-box;
  width: 100%;
}
.chat-virtuoso-row:has(.chat-main-message:last-child):has(+ .chat-virtuoso-row .chat-prompt-separator.compact:first-child) {
  --chat-row-gap: 0px;
}

.chat-view-width-fixed-800 .chat-view-content {
  width: min(var(--chat-view-column-width, 800px), 100%);
  margin-left: auto;
  margin-right: auto;
}

.chat-view-width-fixed-800 .chat-composer-content {
  width: min(var(--chat-view-column-width, 800px), 100%);
  margin-left: auto;
  margin-right: auto;
}

.chat-view-width-fixed-800 .chat-composer {
  /* Mirror the chat-block content box exactly: 18px padding plus the 8px
     classic scrollbar that .chat-block always shows (overflow-y: scroll +
     scrollbar-gutter: stable). Both columns then resolve
     min(var(--chat-view-column-width, 800px), 100%) centering and the
     edge-surface clamps against identical reference widths, so their
     left/right edges cannot drift apart when the preview squeezes the
     chat column. */
  padding-left: 18px;
  padding-right: calc(18px + var(--chat-scrollbar-gutter-width, 8px));
}

.chat-virtuoso-footer {
  flex: 0 0 auto;
  width: 100%;
}

.chat-prompt-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0 14px;
}

.chat-turn-search-highlight {
  border-radius: 8px;
  outline: 1px solid color-mix(in srgb, var(--accent-primary) 38%, var(--border-subtle));
  outline-offset: 2px;
  transition: outline-color var(--motion-fast) var(--ease-standard);
}

.chat-prompt-group + .chat-prompt-group {
}

.chat-prompt-user {
  display: inline-block;
  align-self: flex-start;
  max-width: min(920px, calc(100% - 28px));
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 26%, var(--border-subtle));
  border-radius: var(--radius-panel);
  background: color-mix(in srgb, var(--accent-primary) 12%, var(--surface-workspace-content));
  box-shadow: none;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-prompt-user-row {
  --prompt-status-width: 0px;
  --prompt-status-gap: 0px;
  display: grid;
  grid-template-columns: var(--prompt-status-width) minmax(0, max-content);
  align-self: flex-end;
  gap: 4px var(--prompt-status-gap);
  width: max-content;
  min-width: 0;
  max-width: 100%;
}

.chat-prompt-user-row[data-prompt-state] {
  --prompt-status-width: 24px;
  --prompt-status-gap: 6px;
}

.chat-prompt-user-row[data-prompt-state='undelivered'] {
  --prompt-status-width: 64px;
  --prompt-status-color: color-mix(in srgb, var(--state-danger) 76%, var(--text-secondary));
}

.chat-prompt-user-row[data-prompt-state='steered'] {
  --prompt-status-color: color-mix(in srgb, var(--state-success) 55%, var(--text-secondary));
}

.chat-prompt-user-row[data-prompt-state='steering'],
.chat-prompt-user-row[data-prompt-state='cancelling'] {
  --prompt-status-color: color-mix(in srgb, var(--state-warning) 65%, var(--text-secondary));
}

.chat-prompt-content {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
  max-width: 100%;
  gap: 7px;
}

.chat-prompt-message-actions {
  position: absolute;
  inset-inline-end: 6px;
  /* The hit area reaches the bubble while the timestamp and icon sit above it. */
  inset-block-end: calc(100% - 4px);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  user-select: none;
  opacity: 0;
  pointer-events: none;
}

.chat-prompt-message-actions .chat-prompt-action-button {
  width: 26px;
  height: 24px;
}

.chat-prompt-message-actions .chat-prompt-action-button svg {
  width: 12px;
  height: 12px;
}

.chat-prompt-content[data-prompt-actions-open] > .chat-prompt-message-actions,
.chat-prompt-content:has(:focus-visible) > .chat-prompt-message-actions {
  opacity: 1;
  pointer-events: auto;
}

@media (hover: hover) {
  .chat-prompt-content:hover > .chat-prompt-message-actions {
    opacity: 1;
    pointer-events: auto;
  }
}

.chat-prompt-meta {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  display: grid;
  place-items: center;
  width: var(--prompt-status-width);
  height: 24px;
  color: var(--prompt-status-color, var(--text-secondary));
}

.chat-prompt-status {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
}

.chat-prompt-status-responding {
  align-items: end;
}

.chat-prompt-status-trigger,
.chat-prompt-meta-action {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 24px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.chat-prompt-status-trigger::before {
  content: '';
  position: absolute;
  inset: -8px 0;
}

.chat-prompt-status-trigger[aria-expanded='true'] {
  color: var(--accent-primary);
}

.chat-prompt-status-dots {
  display: inline-flex;
  gap: 2px;
  width: 13px;
  height: 3px;
  contain: paint;
}

.chat-prompt-status-dots span {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.28;
  animation: chat-prompt-dots-wave 1.2s infinite ease-in-out;
  animation-play-state: paused;
}

.chat-prompt-status-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-prompt-status-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes chat-prompt-dots-wave {
  0%,
  80%,
  100% {
    opacity: 0.28;
  }
  40% {
    opacity: 1;
  }
}

.chat-prompt-spinner {
  animation: chat-prompt-spin 1.2s linear infinite;
  animation-play-state: paused;
}

.chat-prompt-meta[data-animating='true'] .chat-prompt-status-dots span,
.chat-prompt-meta[data-animating='true'] .chat-prompt-spinner {
  animation-play-state: running;
}

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

.chat-prompt-details {
  grid-column: 2;
  contain: inline-size;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 10px;
  min-width: 0;
  font-size: 11px;
  color: var(--text-secondary);
}

.chat-prompt-details[hidden] { display: none; }
.chat-prompt-status-label { min-width: 0; line-height: 20px; overflow-wrap: anywhere; }
.chat-prompt-meta-actions { display: inline-flex; align-items: center; flex-wrap: wrap; max-width: 100%; gap: 2px; }
.chat-prompt-meta-actions .chat-prompt-meta-action { width: 28px; color: var(--text-secondary); }

.chat-prompt-user-row[data-prompt-state='undelivered'] .chat-prompt-meta,
.chat-prompt-user-row[data-prompt-state='undelivered'] .chat-prompt-status {
  height: 28px;
}

.chat-prompt-user-row[data-prompt-state='undelivered'] .chat-prompt-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  width: var(--prompt-status-width);
}

.chat-prompt-status-trigger.delivery-label {
  width: auto;
  padding-inline: 2px;
  white-space: nowrap;
  font-size: 11px;
  line-height: 20px;
}

@media (hover: hover) and (pointer: fine) {
  .chat-prompt-status-trigger:hover,
  .chat-prompt-meta-action:hover { background: var(--hover); color: var(--text-primary); }
  .chat-prompt-meta-action.danger:hover { color: var(--state-danger); }
}

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

.chat-prompt-queue-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--surface-panel);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}

.chat-prompt-queue-action:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 44%, var(--border-subtle));
  color: var(--text-primary);
}

.chat-prompt-queue-action.danger:hover {
  border-color: color-mix(in srgb, var(--state-danger) 50%, var(--border-subtle));
  color: var(--state-danger);
}

.chat-prompt-queue-action:disabled {
  cursor: default;
  opacity: 0.46;
}

.chat-prompt-queue-action:disabled:hover {
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.chat-queue-compact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--text-secondary);
  font-size: 12px;
}

.chat-queue-compact-row.failed {
  color: color-mix(in srgb, var(--state-danger) 82%, var(--text-primary));
}

.chat-queue-compact-row .chat-prompt-queue-actions {
  margin-left: auto;
}

.chat-tool-group {
  margin: 0;
  color: var(--text-secondary);
}

.chat-tool-group-header,
.chat-thought-header {
  width: 100%;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.chat-tool-group-chevron,
.chat-thought-chevron {
  flex: 0 0 auto;
  color: var(--text-tertiary);
  opacity: 0.72;
  transition: transform var(--motion-fast) var(--ease-standard);
}

.chat-tool-group-open > .chat-tool-group-header .chat-tool-group-chevron,
.chat-thought-open > .chat-thought-header .chat-thought-chevron {
  transform: rotate(90deg);
}

.chat-tool-group-summary-icon,
.chat-thought-icon {
  flex: 0 0 auto;
  color: inherit;
  opacity: 0.82;
}

.chat-tool-group-label,
.chat-thought-title,
.chat-tool-group-row-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-tool-group-label,
.chat-thought-title {
  font-size: 12px;
}

.chat-tool-group-running .chat-tool-group-header,
.chat-thought-block.streaming .chat-thought-header {
  color: var(--text-primary);
}

.chat-tool-group-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-tool-group-list,
.chat-thought-content {
  margin: 4px 0 0 7px;
  padding-inline-start: 12px;
  border-inline-start: 1px solid var(--border-subtle);
}

.chat-tool-group-row {
  min-width: 0;
}

.chat-tool-group-row-main {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-tool-group-row-label,
.chat-tool-group-command-toggle,
.chat-tool-group-edit-toggle,
.chat-tool-group-edit-file-toggle {
  display: flex;
  min-width: 0;
  width: 100%;
  min-height: 24px;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  text-align: start;
}

.chat-tool-group-command-toggle {
  flex: 1;
}

.chat-tool-group-command-toggle,
.chat-tool-group-edit-toggle,
.chat-tool-group-edit-file-toggle {
  cursor: pointer;
}

.chat-tool-group-command-toggle:hover,
.chat-tool-group-edit-toggle:hover,
.chat-tool-group-edit-file-toggle:hover {
  background: var(--surface-active);
  color: var(--text-primary);
}

.chat-tool-group-header:focus-visible,
.chat-thought-header:focus-visible,
.chat-tool-group-command-toggle:focus-visible,
.chat-tool-group-edit-toggle:focus-visible,
.chat-tool-group-edit-file-toggle:focus-visible,
.chat-tool-group-row-main > .code-frame-copy:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--border-strong) 56%, transparent);
  outline-offset: -1px;
}

.chat-tool-group-row-label > svg,
.chat-tool-group-command-toggle > svg,
.chat-tool-group-edit-toggle > svg,
.chat-tool-group-edit-file-toggle > svg,
.chat-tool-group-status {
  flex: 0 0 auto;
}

.chat-tool-group-status {
  font-size: 11px;
}

.chat-tool-group-status.failed {
  color: var(--state-danger);
}

.chat-tool-group-edit-files {
  margin: 4px 0 4px 18px;
}

.chat-tool-group-edit-file :is(.chat-tool-group-edit-file-toggle, .chat-tool-group-row-label) > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-tool-group-edit-unavailable,
.chat-tool-group-diff-label {
  color: var(--text-secondary);
  font-size: 12px;
}

.chat-tool-group-diff-label {
  padding: 4px 10px;
}

.chat-tool-group-command {
  margin: 4px 0 4px 18px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-panel);
  background: var(--surface-panel);
}

.chat-tool-group-command pre {
  max-height: 17em;
  margin: 0;
  overflow: auto;
  padding: 8px 10px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--reading-code-font-size);
  line-height: var(--reading-code-line-height);
  tab-size: var(--reading-code-tab-size);
  white-space: pre;
}

.chat-tool-group-command code {
  font: inherit;
}

.chat-work-group {
  margin: 0;
  color: var(--text-secondary);
}

.chat-work-group-header {
  width: 100%;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  outline: none;
  position: relative;
  text-align: left;
  user-select: none;
}

.chat-work-group-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: color-mix(in srgb, var(--border-subtle) 36%, transparent);
  pointer-events: none;
}

.chat-work-group-header:hover,
.chat-work-group-header:focus-visible {
  background: transparent;
  color: var(--text-primary);
}

.chat-work-group-header:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--border-strong) 56%, transparent);
  outline-offset: -1px;
}

.chat-work-group-open .chat-work-group-header {
  background: transparent;
  color: var(--text-primary);
}

.chat-work-group-chevron {
  flex: 0 0 auto;
  color: var(--text-tertiary);
  opacity: 0.64;
  transition: transform var(--motion-fast) var(--ease-standard);
}

.chat-work-group-header:hover .chat-work-group-chevron,
.chat-work-group-header:focus-visible .chat-work-group-chevron,
.chat-work-group-open .chat-work-group-chevron {
  opacity: 0.9;
}

.chat-work-group-open .chat-work-group-chevron {
  transform: rotate(90deg);
}

.chat-work-group-label {
  min-width: 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-work-group-content {
  margin-top: 10px;
}

/* Expanded children render their own chat-view-content wrappers; keep them flush
   with the transcript column instead of re-applying the fixed-column layout. */
.chat-view-width-fixed-800 .chat-work-group .chat-view-content {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.chat-work-group-child {
  padding-bottom: 10px;
}

.chat-work-group-child.compact {
  padding-bottom: 4px;
}

.chat-work-group-child:last-child {
  padding-bottom: 0;
}

.chat-thought-block {
  margin: 0;
  color: var(--text-secondary);
}

.chat-thought-block.streaming .chat-thought-icon,
.chat-tool-group-running .chat-tool-group-summary-icon {
  animation: chatActivityPulse 1.4s ease-in-out infinite;
}

.chat-thought-content {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.chat-thought-content p {
  margin: 0 0 6px 0;
}

.chat-thought-content p:last-child {
  margin-bottom: 0;
}

@keyframes chatActivityPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .chat-work-group-chevron,
  .chat-thought-chevron,
  .chat-tool-group-chevron,
  .chat-thought-block.streaming .chat-thought-icon,
  .chat-tool-group-running .chat-tool-group-summary-icon {
    transition: none;
    animation: none;
  }
}

.chat-plan-surface {
  color: var(--text-primary);
  font-family: inherit;
  letter-spacing: 0;
}



.chat-goal-surface {
  color: var(--text-primary);
  font-family: inherit;
  letter-spacing: 0;
}

.chat-goal-details {
  min-width: 0;
  padding: 10px;
}

.chat-goal-objective {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chat-goal-objective > .sl-icon {
  margin-top: 1px;
  color: var(--accent-primary);
}

.chat-goal-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.chat-goal-stat,
.chat-goal-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.chat-goal-stat-label {
  color: color-mix(in srgb, var(--text-secondary) 78%, transparent);
}

.chat-goal-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
}

.chat-goal-status.active .chat-goal-status-dot {
  background: var(--state-success);
}

.chat-goal-status.attention .chat-goal-status-dot {
  background: var(--state-warning);
}

.chat-goal-status.complete .chat-goal-status-dot {
  background: var(--accent-primary);
}

.chat-goal-surface.mobile {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  margin: 0 14px 6px;
  overflow: hidden;
  border: 1px solid var(--border-faint);
  border-radius: 10px;
  background: var(--surface-overlay);
  box-shadow: var(--shadow-floating);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.chat-goal-mobile-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

.chat-goal-compact-trigger {
  flex: 1;
  min-width: 0;
  min-height: 32px;
  display: grid;
  grid-template-columns: 16px auto minmax(0, 1fr) 14px;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.chat-goal-compact-objective {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.chat-goal-mobile-primary,
.chat-goal-mobile-secondary {
  display: flex;
  align-items: center;
}

.chat-goal-mobile-primary {
  flex: none;
  padding-right: 4px;
}

.chat-goal-surface.mobile.expanded .chat-goal-mobile-row {
  border-bottom: 1px solid color-mix(in srgb, var(--border-subtle) 72%, transparent);
}

.chat-goal-mobile-secondary {
  justify-content: flex-end;
  gap: 2px;
  padding: 0 6px 6px;
}

.app-goal-edit-dialog {
  width: min(520px, calc(100vw - 28px));
}

.app-goal-edit-field {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 650;
}

.app-goal-edit-objective,
.app-goal-edit-budget {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--text-primary);
  background: var(--surface-panel);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.app-goal-edit-objective {
  min-height: 112px;
  resize: vertical;
  line-height: 1.45;
}

.app-goal-edit-budget {
  height: 34px;
}

.app-goal-edit-objective:focus,
.app-goal-edit-budget:focus {
  border-color: color-mix(in srgb, var(--accent-primary) 58%, var(--border-subtle));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-primary) 18%, transparent);
}

.chat-session-panel {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-session-panel-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-session-panel-header {
  flex: none;
  min-height: 36px;
}

.chat-edge-surface-header {
  display: grid;
  grid-template-columns: 22px auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 36px;
  padding: 0 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--border-subtle) 72%, transparent);
}
.chat-edge-surface-toggle,
.chat-edge-surface-toggle-spacer {
  width: 22px;
  height: 22px;
}
.chat-edge-surface-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard);
}
.chat-edge-surface-toggle:hover {
  background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
  color: var(--text-primary);
}
.chat-edge-surface-toggle:active {
  transform: translateY(1px);
}
.chat-edge-surface-title {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.collapsed .chat-edge-surface-header {
  border-bottom-color: transparent;
}

/* align the session panel title with the project-name text column below (39px) */
.chat-session-panel-header .chat-edge-surface-header {
  padding-left: 11px;
}

.chat-edge-surface-toggle,
.chat-edge-surface-toggle-spacer {
  width: 22px;
  height: 22px;
}

.chat-edge-surface-summary {
  min-width: 0;
  overflow: hidden;
  color: color-mix(in srgb, var(--text-primary) 72%, var(--text-secondary));
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-edge-surface-leading-actions,
.chat-edge-surface-actions,
.chat-edge-surface-toolbar {
  display: flex;
  align-items: center;
  min-width: 0;
}

.chat-edge-surface-actions {
  gap: 2px;
}

.chat-edge-surface-toolbar {
  grid-column: 3 / -1;
}

.chat-session-panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.chat-session-panel-sidebar {
  flex: 1;
  min-height: 0;
  display: flex;
  border-right: 1px solid var(--border-subtle);
  background: var(--desktop-top-surface);
}

.chat-session-panel-sidebar .chat-edge-surface-glass {
  border: 0;
  box-shadow: none;
  background: var(--desktop-top-surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.chat-session-global-bar {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  width: 100%;
  align-items: center;
  gap: 2px;
  padding: 0;
}

.chat-session-global-bar-leading-actions {
  grid-column: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding-left: 0;
}

.chat-session-global-bar-summary {
  grid-column: 2;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

.chat-session-global-bar-trailing-actions {
  grid-column: 3;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.chat-new-session-control {
  display: flex;
  flex: 0 0 24px;
}

.chat-header-icon-button.chat-new-session-trigger,
.chat-header-icon-button.chat-session-archive-trigger {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}

.chat-new-session-trigger.active {
  background: var(--accent-soft-bg);
  color: var(--accent-primary);
}

.chat-header-icon-button {
  appearance: none;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard);
}

.chat-header-icon-button:hover {
  border-color: color-mix(in srgb, var(--border-subtle) 80%, transparent);
  background: var(--hover);
  color: var(--text-primary);
}

.chat-header-icon-button:disabled {
  cursor: default;
  opacity: 0.4;
}

.chat-header-icon-button:disabled:hover {
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
}

.chat-edge-surface-header .chat-function-action:where(:not(.overlay-icon-button)) {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.chat-session-global-bar .chat-header-archive-control .chat-header-icon-button[aria-expanded='true'] {
  background: var(--accent-soft-bg);
  color: var(--accent-primary);
}

.chat-plan-progress {
  font-size: 11px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  white-space: nowrap;
}

@keyframes chat-plan-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .chat-plan-surface-list,
  .chat-plan-step.in-progress .chat-plan-step-marker {
    animation: none;
  }
}

.chat-plan-surface-list {
  list-style: none;
  margin: 0;
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  animation: sl-list-in var(--motion-standard) var(--ease-out);
}

.chat-plan-surface-list-transition {
  display: grid;
  grid-template-rows: 0fr;
  min-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  transition:
    grid-template-rows var(--motion-standard) var(--ease-out),
    opacity var(--motion-standard) var(--ease-out),
    visibility 0s linear var(--motion-standard);
}

.chat-plan-surface-list-transition.expanded {
  grid-template-rows: 1fr;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition:
    grid-template-rows var(--motion-standard) var(--ease-out),
    opacity var(--motion-standard) var(--ease-out),
    visibility 0s linear 0s;
}

.chat-plan-surface-list-transition.exiting {
  transition:
    grid-template-rows var(--motion-exit) var(--ease-out),
    opacity var(--motion-exit) var(--ease-out),
    visibility 0s linear var(--motion-exit);
}

.chat-plan-surface-list-transition.entering {
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: visible;
}

.chat-plan-surface-list-transition > .chat-plan-surface-list {
  min-height: 0;
  overflow-y: auto;
}

@media (prefers-reduced-motion: reduce) {
  .chat-plan-surface-list-transition,
  .chat-plan-surface-list-transition.expanded,
  .chat-plan-surface-list-transition.exiting,
  .chat-plan-surface-list-transition.entering {
    transition: none;
  }
}

.chat-plan-step {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: flex-start;
  gap: 8px;
  min-height: 21px;
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--text-primary) 82%, var(--text-secondary));
  font-size: 12px;
  line-height: 1.4;
}

.chat-plan-step-marker {
  width: 16px;
  height: 18px;
  color: var(--text-secondary);
}

.chat-plan-step.in-progress .chat-plan-step-marker,
.chat-plan-compact-marker.in-progress {
  color: var(--state-warning);
}

.chat-plan-step.in-progress .chat-plan-step-marker {
  animation: chat-plan-pulse 1.6s var(--ease-standard) infinite;
}

.chat-plan-step.completed .chat-plan-step-marker,
.chat-plan-compact-marker.completed {
  color: var(--state-success);
}

.chat-plan-step.completed .chat-plan-step-content {
  color: color-mix(in srgb, var(--state-success) 74%, var(--text-primary));
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.chat-plan-step.pending .chat-plan-step-content {
  color: color-mix(in srgb, var(--text-primary) 62%, var(--text-secondary));
}

.chat-plan-step-content {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chat-plan-surface.mobile {
  flex: 0 0 auto;
  margin: 0 14px 6px;
  position: relative;
  z-index: 2;
}

.chat-plan-compact-trigger {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--border-faint);
  border-radius: 999px;
  background: var(--surface-overlay);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--text-primary);
  display: grid;
  grid-template-columns: 18px auto minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-floating);
}

.chat-plan-compact-trigger:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 42%, var(--border-subtle));
  background: color-mix(in srgb, var(--surface-overlay) 96%, transparent);
}

.chat-plan-compact-marker {
  color: var(--text-secondary);
}

.chat-plan-compact-chevron {
  color: var(--text-secondary);
}

.chat-plan-current {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: color-mix(in srgb, var(--text-primary) 84%, var(--text-secondary));
}

.chat-plan-surface.mobile.expanded {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 84%, var(--accent-primary));
  border-radius: 10px;
  background: var(--surface-overlay);
  box-shadow: 0 10px 24px color-mix(in srgb, #000 22%, transparent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.chat-plan-surface.mobile.expanded .chat-plan-compact-trigger {
  border: none;
  border-bottom: 1px solid color-mix(in srgb, var(--border-subtle) 72%, transparent);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.chat-plan-surface.mobile .chat-plan-surface-list {
  max-height: 176px;
  overflow-y: auto;
}

.chat-plan-surface.mobile .chat-plan-surface-list-transition > .chat-plan-surface-list {
  animation: none;
}
.chat-main-message {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chat-visualization {
  width: 100%;
  height: 360px;
  margin: 12px 0;
}

.chat-visualization[data-visualization-mode='wide'] {
  position: relative;
  inset-inline-start: 50%;
  width: min(100cqw, 1024px);
  height: 540px;
  margin-inline-start: calc(min(100cqw, 1024px) / -2);
}

.chat-visualization .html-preview,
.chat-visualization .html-preview-frame {
  background: transparent;
}

.chat-visualization-unavailable {
  color: var(--text-secondary);
}

.chat-markdown-image {
  width: auto;
  max-width: 100%;
  height: auto;
}

.chat-main-message blockquote {
  margin: 0 0 10px 0;
  padding: 8px 14px;
  border-left: 3px solid color-mix(in srgb, var(--text-tertiary) 55%, transparent);
  border-radius: 0 6px 6px 0;
  background: color-mix(in srgb, var(--surface-panel) 76%, transparent);
  color: color-mix(in srgb, var(--reading-text) 86%, var(--text-secondary));
}

.chat-main-message blockquote > :first-child {
  margin-top: 0;
}

.chat-main-message blockquote > :last-child {
  margin-bottom: 0;
}

.chat-main-message li {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.chat-main-message a,
.chat-main-message a:visited {
  color: var(--accent-text);
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--motion-fast) var(--ease-standard);
}

.chat-main-message .chat-file-link {
  font-weight: 500;
}

/* Inline file references remain part of the reading selection, even though
   they own a context menu. Keep native link callouts suppressed independently
   of text selection; do not change dragging or other menu targets. */
.chat-main-message .chat-file-link,
.chat-main-message .chat-file-link * {
  -webkit-user-select: text;
  user-select: text;
}

/* A file name written as `code` inside a file link keeps the mono face
   but drops the inline-code chip so the link reads as one unit. */
.chat-main-message .chat-file-link code:not(.wm-shiki-code) {
  padding: 0;
  border-radius: 0;
  background: none;
  color: inherit;
}

.chat-main-message .chat-file-link-icon,
.chat-main-message .chat-file-link-icon * {
  -webkit-user-select: none;
  user-select: none;
}

.chat-main-message .chat-file-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  margin-right: 0.3em;
  font-size: 13px;
  line-height: 1;
  vertical-align: -0.125em;
}

.chat-main-message .chat-file-link-icon::before {
  display: block;
  width: 13px;
  height: 13px;
  line-height: 13px;
  text-align: center;
}

.chat-main-message .chat-file-link-line {
  margin-left: 2px;
  font-family: var(--font-mono);
  font-size: 0.92em;
  opacity: 0.86;
}

.chat-reply-target {
  outline: 1px solid color-mix(in srgb, var(--accent-primary) 30%, var(--border-subtle));
  outline-offset: 3px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent-primary) 5%, transparent);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    outline-color var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}

.chat-reply-target:hover {
  outline-color: color-mix(in srgb, var(--accent-primary) 48%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent-primary) 11%, transparent);
}

.chat-reply-target:focus-visible {
  background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
}

.chat-reply-target[aria-disabled='true'] {
  outline-color: color-mix(in srgb, var(--border-subtle) 72%, transparent);
  background: transparent;
  cursor: default;
}

.chat-reply-label {
  color: var(--accent-text);
}

li.chat-reply-target::marker {
  color: var(--accent-primary);
}
.chat-main-message a:hover,
.chat-main-message a:focus-visible {
  color: color-mix(in srgb, var(--accent-text) 82%, var(--text-primary));
  text-decoration: underline;
  text-decoration-color: currentColor;
}

.chat-main-message .chat-relay-code-link {
  text-decoration: none;
}

.chat-main-message a.chat-relay-code-link:hover,
.chat-main-message a.chat-relay-code-link:focus-visible {
  text-decoration: none;
}

.chat-main-message .chat-relay-code-link code {
  color: color-mix(in srgb, var(--accent-primary) 88%, var(--text-primary));
  cursor: pointer;
}

.chat-main-message .chat-relay-code-link:hover code {
  text-decoration: underline;
}

.chat-image-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.chat-inline-image {
  max-width: min(280px, 100%);
  max-height: 220px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  object-fit: cover;
}

.chat-prompt-attachment-strip {
  display: flex;
  flex-wrap: wrap;
  align-self: flex-start;
  gap: 8px;
  max-width: min(920px, 100%);
  margin-top: 2px;
}

.chat-prompt-attachment-chip {
  display: inline-grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  max-width: min(340px, 100%);
  min-height: 40px;
  padding: 3px 9px 3px 3px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 82%, var(--accent-primary));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-panel) 90%, var(--accent-primary));
  color: color-mix(in srgb, var(--text-primary) 82%, var(--text-secondary));
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.chat-prompt-attachment-chip:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 48%, var(--border-subtle));
  background: color-mix(in srgb, var(--surface-panel) 82%, var(--accent-primary));
}

.chat-prompt-attachment-icon {
  width: 32px;
  height: 32px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: color-mix(in srgb, var(--accent-primary) 74%, var(--text-primary));
}

.chat-prompt-attachment-thumb {
  width: 32px;
  height: 32px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 82%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface-raised) 80%, transparent);
  object-fit: cover;
}

.chat-prompt-attachment-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.chat-prompt-attachment-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.25;
  color: color-mix(in srgb, var(--text-primary) 86%, var(--accent-primary));
}

.chat-prompt-attachment-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.2;
  color: var(--text-secondary);
}

.chat-prompt-artifacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.chat-prompt-artifact {
  max-width: min(680px, 100%);
}

.chat-prompt-artifact-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.chat-prompt-artifact-summary:hover,
.chat-prompt-artifact-summary:focus-visible {
  color: var(--text-primary);
}

.chat-prompt-artifact-summary .sl-icon {
  flex: none;
}

.chat-prompt-artifact-files {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  margin-top: 2px;
  padding-left: 20px;
}

.chat-prompt-artifact-file {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: start;
  min-height: 23px;
  gap: 8px;
  border: none;
  border-radius: 5px;
  padding: 2px 6px 2px 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  line-height: 18px;
  text-align: left;
  cursor: pointer;
}

.chat-prompt-artifact-file:hover {
  background: var(--hover);
  color: var(--text-primary);
}

.chat-prompt-artifact-file-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  font-family: var(--mono-font);
  font-size: 11px;
  line-height: 1;
  color: color-mix(in srgb, var(--text-primary) 82%, var(--text-secondary));
}

.chat-prompt-artifact-file-status.status-a {
  color: var(--state-success);
}

.chat-prompt-artifact-file-status.status-d {
  color: var(--state-danger);
}

.chat-prompt-artifact-file-status.status-r,
.chat-prompt-artifact-file-status.status-c {
  color: var(--state-warning);
}

.chat-prompt-artifact-file-path {
  display: flex;
  min-width: 0;
  white-space: nowrap;
  font-family: var(--mono-font);
  font-size: 11px;
}

.chat-prompt-artifact-file-path > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-prompt-artifact-file-name {
  flex: 0 0 auto;
  max-width: 100%;
  color: var(--text-primary);
  font-weight: 500;
}

.chat-prompt-artifact-file-counts {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 52px;
  font-family: var(--mono-font);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chat-prompt-artifact-file-counts .additions {
  color: var(--state-success);
}

.chat-prompt-artifact-file-counts .deletions {
  color: var(--state-danger);
}

.chat-prompt-artifact-error {
  margin-top: 4px;
  padding-left: 21px;
  color: var(--state-danger);
  font-size: 11px;
}

.chat-prompt-separator {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
  gap: 8px;
}

.chat-prompt-separator hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  flex: 1;
  margin: 0;
}

.chat-prompt-separator-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.chat-prompt-stop-reason {
  display: inline-flex;
  align-items: center;
  flex: none;
  white-space: nowrap;
  height: 16px;
  padding: 0 6px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
}

.chat-prompt-stop-reason.cancelled {
  height: 20px;
  padding: 0 7px;
  border: 0;
  border-radius: 5px;
  background: var(--border-subtle);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
}

.chat-prompt-stop-reason.interrupted {
  color: color-mix(in srgb, var(--text-secondary) 84%, var(--text-primary));
}

.chat-prompt-stop-reason.failed {
  border-color: color-mix(in srgb, var(--state-danger) 58%, var(--border-subtle));
  color: var(--state-danger);
}

.chat-prompt-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.chat-prompt-action-button {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chat-prompt-action-button:hover {
  color: var(--text-primary);
  background: var(--hover);
}

.chat-prompt-action-button:disabled {
  opacity: 0.42;
  cursor: default;
}

.chat-prompt-action-button:disabled:hover {
  color: var(--text-secondary);
  background: transparent;
}

.chat-session-more-trigger[aria-expanded='true'] {
  color: var(--text-primary);
  background: var(--hover);
}

.chat-prompt-actions .chat-prompt-action-button[aria-expanded='true'] {
  color: var(--accent-text);
  background: var(--accent-soft-bg);
}

.session-surface.overlay-capsule.chat-action-menu {
  --overlay-menu-inset: 6px;
  --overlay-menu-radius: 12px;
}
.chat-share-menu-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.chat-action-menu-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-action-menu-row > span:not(.client-update-dot) {
  flex: 1 1 auto;
}

.chat-action-menu-row .sl-icon {
  flex-shrink: 0;
  color: var(--text-secondary);
}


.chat-action-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline-end: 10px;
}
.chat-action-menu .chat-action-group-heading button.chat-action-heading-button {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-height: 30px;
  gap: 5px;
  padding: 0 0 0 6px;
  border: 0;
  border-radius: var(--overlay-menu-row-radius);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
}
.chat-action-menu .chat-share-menu-body button.chat-action-menu-row {
  min-height: 40px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 14px;
}
.chat-workspace-menu-row {
  display: flex;
}
.chat-workspace-menu-row > button {
  flex: 1 1 auto;
  min-width: 0;
}
.chat-action-menu .chat-share-menu-body button.chat-workspace-menu-action {
  width: auto;
  max-width: 150px;
  flex: 0 0 auto;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  text-align: end;
}
.chat-workspace-menu-action > span:not(.client-update-dot) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-workspace-menu-action:disabled:has([data-client-update-label]) {
  opacity: .8;
}
.chat-action-menu .chat-share-menu-body .overlay-group-label {
  padding: 6px 10px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
}
.chat-action-menu .chat-share-menu-body .chat-action-session-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-block: 0;
}
.chat-action-menu .chat-action-session-label button.chat-action-locate {
  width: 32px;
  height: 32px;
  padding: 0;
}
.chat-action-menu button.chat-action-menu-row > .sl-icon { width: 16px; height: 16px; color: var(--text-secondary); }
.chat-theme-track {
  display: inline-flex;
  align-items: center;
  flex: none;
  width: 38px;
  height: 22px;
  padding: 2px;
  border-radius: 999px;
  background: var(--border-subtle);
}
.chat-action-heading-button[aria-checked='true'] .chat-theme-track {
  justify-content: flex-end;
  background: color-mix(in srgb, var(--accent-primary) 42%, var(--surface-raised));
}
.chat-action-menu .chat-theme-track > svg.sl-icon {
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 50%;
  color: #805f25;
  background: white;
}
.chat-action-heading-button[aria-checked='true'] .chat-theme-track > .sl-icon {
  color: #34485b;
  background: #daeafa;
}
.chat-action-menu .session-surface-context { padding: 5px 10px 6px; font-size: 12px; line-height: 18px; white-space: normal; overflow-wrap: anywhere; }
.chat-action-menu .chat-share-menu-body :is([role='menuitem'], .overlay-menu-section) + .overlay-menu-section {
  margin-top: 5px;
  padding-top: 6px;
}
.chat-share-format-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 0 2px 4px;
}
.chat-action-menu .chat-share-format-list button.chat-share-format {
  flex-direction: column;
  justify-content: center;
  min-height: 58px;
  padding: 2px;
  gap: 5px;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  overflow-wrap: anywhere;
}
.chat-share-format[data-format='text'] { --format-color: #a58bbb; }
.chat-share-format[data-format='image'] { --format-color: var(--state-success); }
.chat-share-format[data-format='html'] { --format-color: var(--state-warning); }
.chat-share-format[data-format='public_url'] { --format-color: var(--accent-primary); }
.chat-format-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--format-color) 13%, var(--overlay-surface-color));
}
.chat-action-menu .chat-share-format .chat-format-icon .sl-icon {
  width: 17px;
  height: 17px;
  color: color-mix(in srgb, var(--format-color) 48%, var(--text-primary));
}
.chat-action-menu .chat-share-menu-group button.chat-share-prompt-toggle {
  border-top: 1px solid var(--overlay-divider);
  border-radius: 0;
  min-height: 38px;
  font-size: 12px;
  color: var(--text-secondary);
}
.chat-action-menu .chat-share-menu-body .overlay-menu-switch::after { width: 12px; height: 12px; top: 2px; left: 2px; }
.chat-action-menu button:focus-visible, .chat-prompt-actions button:focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: -2px;
}
.chat-action-menu-row:disabled {
  opacity: .42;
  cursor: default;
}

@media (hover: hover) {
  .chat-action-menu-row:hover:not(:disabled) {
    background: var(--hover);
    color: var(--text-primary);
  }
}

.chat-action-menu-row:active:not(:disabled) {
  background: var(--surface-active);
}

.chat-prompt-result-line {
  flex-basis: 100%;
  margin-left: auto;
  font-size: 11px;
  color: var(--text-secondary);
}

.chat-prompt-result-line.failed {
  color: var(--state-danger);
}

.chat-scroll-nav {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-scroll-nav-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 65%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface-overlay) 72%, transparent);
  backdrop-filter: blur(12px) saturate(1.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--text-primary) 6%, transparent),
    var(--shadow-floating);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
  animation: chat-scroll-nav-in var(--motion-standard) var(--ease-out);
}

.chat-scroll-nav-button:hover {
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--surface-overlay) 86%, transparent);
  transform: translateY(-1px);
}

@keyframes chat-scroll-nav-in {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-scroll-nav-button {
    animation: none;
    transition: none;
  }
}

.chat-composer {
  --chat-config-popover-layer: 44;
  position: relative;
  z-index: 1;
  padding: 0 14px 4px;
  background: transparent;
}

.chat-composer.menu-open {
  z-index: 32;
}

.chat-slash-menu,
.chat-file-mention-menu {
  transform-origin: bottom center;
}

.chat-core-config-menu,
.chat-config-value-menu {
  transform-origin: bottom right;
  animation: sl-menu-in var(--motion-fast) var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .chat-core-config-menu,
  .chat-config-value-menu,
  .chat-attachment-action-tray {
    animation: none;
  }
}

.chat-composer-content {
  position: relative;
  width: 100%;
}

.chat-request-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 12px;
  color: var(--text-primary);
  overflow-wrap: anywhere;
  margin-bottom: 8px;
  max-height: min(55dvh, 440px);
  overflow: auto;
}

.chat-request-panel .overlay-header {
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 0 0 4px;
  border: 0;
}

.chat-request-panel .overlay-heading {
  flex-basis: auto;
}

.chat-request-panel .overlay-header-actions {
  gap: 4px;
  color: var(--text-secondary);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chat-request-panel .chat-question-nav {
  min-width: 44px;
  min-height: 44px;
  padding-inline: 8px;
  background: transparent;
  color: var(--text-secondary);
}

.chat-request-panel .chat-question-nav:hover:not(:disabled) {
  background: var(--hover);
  color: var(--text-primary);
}

.chat-question-summary {
  color: var(--text-secondary);
  font-size: 12px;
}

.chat-request-panel fieldset {
  display: grid;
  gap: 2px;
  counter-reset: question-option;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.chat-request-panel legend {
  margin-bottom: 8px;
  padding-inline: 4px;
}

.chat-request-panel small {
  display: block;
  color: var(--text-secondary);
}

.chat-request-option {
  display: flex;
  gap: 10px;
  align-items: baseline;
  min-height: 44px;
  padding: 11px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.4;
  text-align: start;
}

.chat-request-option::before {
  flex: 0 0 18px;
  counter-increment: question-option;
  content: counter(question-option, upper-alpha) ".";
  content: counter(question-option, upper-alpha) "." / "";
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.chat-request-option > span {
  min-width: 0;
}

@media (hover: hover) {
  .chat-request-option:hover:not(:disabled) { background: var(--hover); }
}

.chat-request-option[aria-pressed='true'],
.chat-request-option:active:not(:disabled) {
  background: var(--accent-soft-bg);
}

.chat-request-panel button:focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: -2px;
}

.chat-question-custom {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.chat-question-text-input {
  flex: 1;
  min-width: 0;
  height: 44px;
}

.chat-question-text-input:focus-visible {
  outline: 1px solid var(--focus-ring-color);
  outline-offset: -1px;
}

.chat-question-custom .overlay-button {
  flex: none;
  min-height: 44px;
}

.chat-question-reply {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  width: fit-content;
  max-width: 82%;
  margin-left: auto;
  padding: 9px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent-primary) 13%, var(--surface-panel));
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-question-reply-in-prompt {
  max-width: 100%;
}

.chat-request-error {
  color: var(--state-danger);
}

.chat-request-message,
.chat-permission-dialog-title {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-request-field :is(input, select) {
  min-height: 44px;
}

.chat-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.chat-request-actions .overlay-link[aria-disabled='true'] {
  opacity: 0.5;
}

.chat-composer-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 80%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-panel) 88%, var(--surface-raised));
  box-shadow:
    var(--shadow-floating),
    inset 0 1px 0 color-mix(in srgb, var(--text-primary) 6%, transparent);
  padding: 8px 8px 4px;
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard);
}

.chat-composer:focus-within .chat-composer-frame {
  border-color: color-mix(in srgb, var(--accent-primary) 36%, var(--border-subtle));
  box-shadow:
    var(--shadow-floating),
    inset 0 1px 0 color-mix(in srgb, var(--text-primary) 6%, transparent),
    0 0 0 1px color-mix(in srgb, var(--accent-primary) 6%, transparent);
}

.chat-composer.menu-open .chat-composer-frame {
  border-color: color-mix(in srgb, var(--accent-primary) 32%, var(--border-subtle));
}

.chat-composer-frame.drag-over {
  border-color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 7%, var(--surface-panel));
}

.chat-composer-drop-hint {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: inherit;
  background: color-mix(in srgb, var(--accent-primary) 10%, var(--surface-panel) 88%);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  animation: sl-menu-in var(--motion-fast) var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .chat-composer-drop-hint {
    animation: none;
  }
}

.chat-composer-input-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 32px;
  min-width: 0;
}

.chat-composer-input-shell {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  --chat-composer-input-pad-block: 5px;
  --chat-composer-input-pad-inline: 8px;
}

.chat-composer-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 32px;
  max-height: 180px;
  overflow-x: hidden;
  overflow-y: auto;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  padding: var(--chat-composer-input-pad-block) var(--chat-composer-input-pad-inline) 2px;
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  resize: none;
  scrollbar-gutter: stable;
}

.chat-rich-composer {
  position: relative;
  z-index: 1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-rich-composer p {
  margin: 0;
}

.chat-rich-composer-placeholder {
  position: absolute;
  inset: var(--chat-composer-input-pad-block) var(--chat-composer-input-pad-inline) auto;
  z-index: 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
}

.chat-composer-capsule,
.chat-prompt-inline-capsule {
  display: inline-flex;
  align-items: center;
  max-width: min(260px, 100%);
  gap: 2px;
  margin: 0 1px;
  padding: 1px 7px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 78%, var(--accent-primary));
  border-radius: 999px;
  vertical-align: -0.05em;
  font-size: 0.85em;
  line-height: 1.25;
  white-space: nowrap;
  transition: box-shadow var(--motion-fast) var(--ease-standard);
}

.chat-composer-capsule.skill,
.chat-prompt-inline-capsule.skill {
  border-color: color-mix(in srgb, var(--accent-primary) 30%, transparent);
  color: var(--chat-capsule-skill-text);
  background: var(--chat-capsule-skill-bg);
}

.chat-composer-capsule.goal,
.chat-prompt-inline-capsule.goal {
  border-color: color-mix(in srgb, var(--state-success) 34%, transparent);
  color: var(--chat-capsule-goal-text);
  background: var(--chat-capsule-goal-bg);
}

.chat-composer-capsule.file,
.chat-prompt-inline-capsule.file {
  max-width: 100%;
  white-space: normal;
  border-color: var(--border-subtle);
  border-radius: 7px;
  color: color-mix(in srgb, var(--text-primary) 84%, var(--text-secondary));
  background: color-mix(in srgb, var(--surface-panel) 82%, var(--accent-primary));
}

.chat-composer-capsule.selected {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-primary) 58%, transparent);
}

.chat-composer-capsule-label,
.chat-prompt-inline-capsule-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-composer-capsule.file .chat-composer-capsule-label,
.chat-prompt-inline-capsule.file .chat-prompt-inline-capsule-label {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.chat-composer-capsule-icon,
.chat-prompt-inline-capsule-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  opacity: 0.72;
}

.chat-composer-input:focus {
  outline: none;
}

.chat-slash-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  max-height: min(56dvh, 420px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 84%, transparent);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  z-index: 36;
}

.chat-file-mention-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  max-height: min(56dvh, 420px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 84%, transparent);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  z-index: 36;
}

/* Scrollable list area; the key-hints footer stays pinned below it instead
   of scrolling away with the options. */
.chat-slash-menu-body,
.chat-file-mention-menu-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-menu-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
  padding: 5px 10px 3px;
  border-top: 1px solid var(--border-faint);
  color: var(--text-tertiary);
  font-size: 10px;
  line-height: 1.4;
  user-select: none;
}

.chat-menu-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.chat-menu-hint kbd {
  font-family: inherit;
  font-size: 10px;
  line-height: 1.2;
  padding: 1px 4px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--surface-raised);
  color: var(--text-secondary);
}

.chat-slash-diagnostic {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  padding: 5px 8px 3px;
  border-top: 1px solid color-mix(in srgb, var(--warning, #d8a13b) 25%, transparent);
  color: var(--warning, #d8a13b);
  font-size: 10px;
  line-height: 1.35;
}

.chat-slash-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-slash-section + .chat-slash-section {
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px solid var(--border-faint);
}

.chat-slash-section-header {
  padding: 4px 10px 2px;
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  user-select: none;
}

.chat-slash-item {
  border: 0;
  border-radius: 8px;
  min-height: 30px;
  padding: 4px 10px;
  background: transparent;
  color: var(--text-primary);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.chat-slash-item:hover,
.chat-slash-item.active {
  background: var(--hover);
}

.chat-slash-item.disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.chat-slash-item.disabled:hover,
.chat-slash-item.disabled.active {
  background: transparent;
}

.chat-slash-icon {
  width: 16px;
  flex: 0 0 16px;
  color: var(--text-tertiary);
  text-align: center;
}

.chat-slash-item.command .chat-slash-icon {
  color: color-mix(in srgb, var(--accent-primary) 76%, var(--text-secondary));
}

.chat-slash-name {
  min-width: 0;
  flex: 0 0 auto;
  max-width: 50%;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-slash-description {
  min-width: 0;
  flex: 1 1 0;
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-slash-switch {
  width: 26px;
  height: 15px;
  padding: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-secondary) 28%, transparent);
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  transition: background var(--motion-fast) var(--ease-standard);
}

.chat-slash-switch.checked {
  background: color-mix(in srgb, #e7b84b 82%, var(--surface-panel));
}

.chat-slash-switch-knob {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--surface-panel);
  box-shadow: 0 1px 3px color-mix(in srgb, #000 32%, transparent);
  transform: translateX(0);
  transition: transform var(--motion-fast) var(--ease-standard);
}

.chat-slash-switch.checked .chat-slash-switch-knob {
  transform: translateX(11px);
}

.chat-composer-action-column {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
}

.chat-send-button {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 58%, var(--border-subtle));
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent-primary) 17%, var(--surface-panel));
  color: color-mix(in srgb, var(--accent-primary) 88%, var(--text-primary));
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition:
    transform var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}

.chat-send-button:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 82%, transparent);
  background: color-mix(in srgb, var(--accent-primary) 24%, var(--surface-panel));
  color: var(--text-primary);
}

.chat-send-button:active:not(:disabled) {
  transform: scale(0.97);
}

.chat-send-button:disabled {
  cursor: default;
  opacity: 0.55;
  box-shadow: none;
}

.chat-send-button:disabled:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 58%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent-primary) 17%, var(--surface-panel));
  color: color-mix(in srgb, var(--accent-primary) 88%, var(--text-primary));
}

.voice-input-button {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--state-success) 56%, var(--border-subtle));
  border-radius: 10px;
  background: color-mix(in srgb, var(--state-success) 13%, var(--surface-panel));
  color: color-mix(in srgb, var(--state-success) 82%, var(--text-primary));
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  overflow: visible;
  box-shadow: none;
  transition: border-color var(--motion-fast) var(--ease-standard), background var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard);
}

.voice-input-button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--state-info) 72%, var(--border-subtle));
  background: color-mix(in srgb, var(--state-success) 19%, var(--surface-panel));
  color: var(--text-primary);
}

.voice-input-button.send-with-voice {
  border-color: color-mix(in srgb, var(--accent-primary) 72%, var(--border-subtle));
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--accent-primary) 24%, var(--surface-panel)) 0%,
      color-mix(in srgb, var(--state-info) 10%, var(--surface-panel)) 100%
    );
  color: color-mix(in srgb, var(--accent-primary) 82%, var(--text-primary));
}

.voice-input-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--surface-panel);
  border-radius: 999px;
  background: var(--state-info);
  color: #f7fffc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px color-mix(in srgb, var(--state-info) 20%, transparent);
  pointer-events: none;
}

.voice-input-button.recording {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--state-info) 82%, var(--border-subtle));
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--state-info) 30%, var(--surface-panel)) 0%,
      color-mix(in srgb, var(--state-info) 14%, var(--surface-panel)) 100%
    );
}

.voice-input-button.locked-recording,
.voice-input-button.hold-recording {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--state-info) 14%, transparent);
}

.voice-input-button.locked-recording::after,
.voice-input-button.hold-recording::after {
  content: '';
  position: absolute;
  inset: -5px;
  border: 1px solid color-mix(in srgb, var(--state-info) 48%, transparent);
  border-radius: 14px;
  animation: voiceButtonPulse 1100ms ease-out infinite;
  pointer-events: none;
}

.voice-input-button.hold-recording {
  border-color: color-mix(in srgb, var(--accent-primary) 84%, var(--border-subtle));
}

.voice-input-button.cancel-intent {
  border-color: color-mix(in srgb, var(--state-danger) 82%, var(--border-subtle));
  background: color-mix(in srgb, var(--state-danger) 14%, var(--surface-panel));
  color: var(--state-danger);
}

.voice-input-button:disabled {
  cursor: default;
  opacity: 0.55;
  box-shadow: none;
}

.voice-input-error {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--state-danger) 32%, var(--border-subtle));
  border-radius: 8px;
  background: color-mix(in srgb, var(--state-danger) 7%, var(--surface-panel));
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.5;
}

.voice-input-error-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
}

.voice-input-error-hint {
  color: var(--text-secondary);
}

.voice-input-error-dismiss {
  flex-shrink: 0;
  padding: 2px 5px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
}

.voice-input-error-dismiss:hover {
  background: var(--hover);
  color: var(--text-primary);
}

.voice-recording-bar {
  position: relative;
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--state-info) 32%, var(--border-subtle));
  border-radius: 8px;
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--state-info) 16%, var(--surface-panel)) 0%,
      color-mix(in srgb, var(--surface-raised) 92%, transparent) 100%
    );
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  overflow: hidden;
  animation: sl-menu-in var(--motion-fast) var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .voice-recording-bar {
    animation: none;
  }
}

.voice-recording-bar.cancel-intent {
  border-color: color-mix(in srgb, var(--state-danger) 55%, var(--border-subtle));
  background: color-mix(in srgb, var(--state-danger) 12%, var(--surface-panel));
}

.voice-recording-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--state-info);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--state-info) 16%, transparent);
}

.voice-recording-bar.cancel-intent .voice-recording-dot {
  background: var(--state-danger);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--state-danger) 18%, transparent);
}

.voice-recording-wave {
  height: 16px;
  width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.voice-recording-wave span {
  width: 3px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.82;
  transform: scaleY(var(--voice-bar-scale, 0.7));
  animation: voiceBarPulse 920ms ease-in-out infinite;
  transform-origin: center;
}

.voice-recording-wave span:nth-child(2) {
  animation-delay: 90ms;
}

.voice-recording-wave span:nth-child(3) {
  animation-delay: 180ms;
}

.voice-recording-wave span:nth-child(4) {
  animation-delay: 270ms;
}

.voice-recording-wave span:nth-child(5) {
  animation-delay: 360ms;
}

.voice-recording-text {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-recording-time {
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
}

@keyframes voiceBarPulse {
  0%,
  100% {
    transform: scaleY(calc(var(--voice-bar-scale, 0.7) * 0.68));
    opacity: 0.62;
  }
  50% {
    transform: scaleY(calc(var(--voice-bar-scale, 0.7) * 1.08));
    opacity: 1;
  }
}

@keyframes voiceButtonPulse {
  0% {
    transform: scale(0.92);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .voice-recording-wave span {
    animation: none;
  }

  .voice-input-button.locked-recording::after,
  .voice-input-button.hold-recording::after {
    animation: none;
  }
}

.chat-composer-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  min-width: 0;
  animation: sl-menu-in var(--motion-fast) var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .chat-composer-toolbar {
    animation: none;
  }
}

.chat-composer-toolbar-actions {
  min-width: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 1 1 auto;
}

.chat-composer-tools {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-height: 24px;
  flex: 0 0 auto;
}

.chat-tool-button {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: color-mix(in srgb, var(--text-secondary) 86%, var(--text-primary));
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  line-height: 1;
  transition:
    background var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.chat-composer-stop-slot {
  display: flex;
  align-items: center;
  min-width: 0;
}

.chat-stop-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    background var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.chat-stop-pill:hover:not(:disabled),
.chat-stop-pill.armed {
  border-color: color-mix(in srgb, var(--state-danger) 45%, var(--border-subtle));
  background: color-mix(in srgb, var(--state-danger) 9%, var(--surface-raised));
}

.chat-stop-pill:active:not(:disabled) {
  transform: scale(0.96);
}

.chat-stop-pill:disabled {
  cursor: default;
}

.chat-stop-pill.cancelling {
  opacity: 0.72;
}

.chat-stop-pill-stage {
  position: relative;
  width: 30px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-stop-bike {
  transition:
    opacity var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.chat-stop-bike-wheel-anim,
.chat-stop-bike-crank {
  transform-box: fill-box;
  transform-origin: center;
}

.chat-stop-bike-wheel-anim {
  animation: chat-stop-bike-spin 0.9s linear infinite;
}

.chat-stop-bike-crank {
  animation: chat-stop-bike-spin 0.8s linear infinite;
}

/* Speed lines trailing the bike; they streak backward and stretch as they
   fade, staggered so the flow never syncs up. */
.chat-stop-bike-wind {
  opacity: 0.85;
  transition: opacity var(--motion-fast) var(--ease-standard);
}

.chat-stop-bike-wind path {
  transform-box: fill-box;
  animation: chat-stop-bike-wind 0.9s linear infinite;
}

.chat-stop-bike-wind path:nth-child(2) {
  animation-duration: 1.05s;
  animation-delay: -0.35s;
}

/* Braking: the wheels freeze mid-turn and the wind dies immediately. */
.chat-stop-pill.cancelling .chat-stop-bike-wheel-anim,
.chat-stop-pill.cancelling .chat-stop-bike-crank {
  animation-play-state: paused;
}

.chat-stop-pill.cancelling .chat-stop-bike-wind {
  opacity: 0;
}

.chat-stop-pill.cancelling .chat-stop-bike-wind path {
  animation: none;
}

.chat-stop-pill-stop-glyph {
  position: absolute;
  color: var(--state-danger);
  opacity: 0;
  transform: scale(0.7);
  transition:
    opacity var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.chat-stop-pill.armed .chat-stop-bike {
  opacity: 0;
  transform: scale(0.8);
}

.chat-stop-pill.armed .chat-stop-pill-stop-glyph {
  opacity: 1;
  transform: none;
}

@media (hover: hover) and (pointer: fine) {
  .chat-stop-pill:hover:not(:disabled) .chat-stop-bike {
    opacity: 0;
    transform: scale(0.8);
  }

  .chat-stop-pill:hover:not(:disabled) .chat-stop-pill-stop-glyph {
    opacity: 1;
    transform: none;
  }
}

.chat-stop-pill-a11y-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes chat-stop-bike-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes chat-stop-bike-wind {
  0% {
    opacity: 0;
    transform: translateX(1.5px) scaleX(0.7);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-4.5px) scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-stop-bike-wheel-anim,
  .chat-stop-bike-crank,
  .chat-stop-bike-wind path {
    animation: none;
  }

  .chat-stop-bike-wind {
    opacity: 0;
  }
}

.chat-attachment-action-tray {
  position: absolute;
  left: 28px;
  bottom: calc(100% + 6px);
  z-index: 38;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: calc(100vw - 46px);
  min-height: 34px;
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 26%, var(--border-subtle));
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-overlay) 98%, var(--surface-panel));
  box-shadow: var(--shadow-overlay);
  backdrop-filter: blur(16px) saturate(1.06);
  -webkit-backdrop-filter: blur(16px) saturate(1.06);
  transform-origin: bottom left;
  animation: sl-menu-in var(--motion-fast) var(--ease-out);
}

.chat-attachment-action-button {
  min-width: 62px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 86%, transparent);
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
}

.chat-attachment-action-button:hover {
  background: var(--hover);
}

.chat-attachment-action-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.chat-attachment-action-button .sl-icon {
  color: color-mix(in srgb, var(--accent-primary) 72%, var(--text-primary));
}

.chat-attachment-action-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.chat-tool-button:hover,
.chat-tool-button:focus-visible {
  background: var(--hover);
  color: var(--text-primary);
  box-shadow: none;
  outline: none;
}

.chat-tool-button:active:not(:disabled) {
  transform: scale(0.95);
}

.chat-tool-button:disabled {
  cursor: default;
  opacity: 0.42;
  box-shadow: none;
}

.chat-tool-button:disabled:hover {
  background: transparent;
  color: color-mix(in srgb, var(--text-secondary) 86%, var(--text-primary));
}


.chat-attachment-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: flex-start;
  max-width: 100%;
}

.chat-attachment-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface-panel);
  padding: 4px 6px 4px 4px;
  min-width: 160px;
  max-width: 260px;
  height: 44px;
  box-sizing: border-box;
  position: relative;
  animation: chat-attachment-in var(--motion-standard) var(--ease-out);
}

@keyframes chat-attachment-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.chat-attachment-preview.removing {
  opacity: 0;
  transform: translateY(2px);
  transition:
    opacity var(--motion-fast) var(--ease-out),
    transform var(--motion-fast) var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .chat-attachment-preview {
    animation: none;
  }

  .chat-attachment-preview.removing {
    transition: none;
  }
}

.chat-attachment-preview.uploading,
.chat-attachment-preview.queued {
  border-color: color-mix(in srgb, var(--accent-primary) 42%, var(--border-subtle));
}

.chat-attachment-preview.failed {
  border-color: color-mix(in srgb, var(--state-danger) 58%, var(--border-subtle));
}

.chat-attachment-thumb {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  object-fit: cover;
}

.chat-attachment-thumb.file {
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: color-mix(in srgb, var(--accent-primary) 70%, var(--text-primary));
  background: color-mix(in srgb, var(--accent-primary) 9%, var(--surface-raised));
}

.chat-attachment-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chat-attachment-name {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-attachment-status {
  color: color-mix(in srgb, var(--text-secondary) 86%, var(--text-primary));
  font-size: 10.5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-attachment-preview.failed .chat-attachment-status {
  color: var(--state-danger);
}

.chat-attachment-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.chat-attachment-progress {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--border-subtle) 70%, transparent);
}

.chat-attachment-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: color-mix(in srgb, var(--accent-primary) 75%, var(--state-info));
}

.chat-attachment-remove,
.chat-attachment-retry {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.chat-attachment-retry:hover {
  color: color-mix(in srgb, var(--accent-primary) 75%, var(--text-primary));
  border-color: color-mix(in srgb, var(--accent-primary) 55%, var(--border-subtle));
}

.chat-attachment-remove:hover {
  color: var(--state-danger);
  border-color: color-mix(in srgb, var(--state-danger) 55%, var(--border-subtle));
}

.chat-config-options-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.chat-config-options-shell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
}

.chat-config-options-shell.compact {
  gap: 4px;
}

.chat-core-config {
  flex: 0 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
}

.chat-core-config-trigger {
  height: 24px;
  min-width: 0;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-raised) 52%, transparent);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}

.chat-core-config-model,
.chat-core-config-effort,
.chat-core-config-fast-label {
  min-width: 0;
  white-space: nowrap;
}

.chat-core-config-separator {
  margin: 0 3px;
  color: var(--text-secondary);
}

.chat-core-config-fast {
  margin-left: 0;
  color: #e7b84b;
  font-size: 13px;
  line-height: 1;
  filter: drop-shadow(0 0 4px color-mix(in srgb, #e7b84b 42%, transparent));
}

.chat-core-config-trigger:hover,
.chat-core-config-trigger[aria-expanded='true'] {
  border-color: color-mix(in srgb, var(--border-subtle) 72%, transparent);
  background: color-mix(in srgb, var(--hover) 88%, var(--surface-raised));
}

.chat-config-options-shell.compact .chat-core-config {
  flex: 0 1 auto;
  min-width: 0;
}

.chat-config-options-shell.compact .chat-core-config-model {
  max-width: min(140px, 38vw);
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-config-options {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  overflow: visible;
}

.chat-context-usage-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.chat-context-usage-a11y-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chat-context-usage {
  --chat-context-used: 0%;
  --chat-context-ring-width: 1.5px;
  --chat-context-used-color: color-mix(in srgb, var(--text-primary) 72%, #ffffff);
  --chat-context-rest-color: color-mix(in srgb, var(--text-secondary) 48%, transparent);
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  aspect-ratio: 1 / 1;
  flex: 0 0 16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background:
    conic-gradient(
      var(--chat-context-used-color) var(--chat-context-used),
      var(--chat-context-rest-color) 0
    );
  -webkit-mask: radial-gradient(
    farthest-side,
    transparent calc(100% - var(--chat-context-ring-width)),
    #000 calc(100% - var(--chat-context-ring-width) + 0.35px)
  );
  mask: radial-gradient(
    farthest-side,
    transparent calc(100% - var(--chat-context-ring-width)),
    #000 calc(100% - var(--chat-context-ring-width) + 0.35px)
  );
  box-shadow: none;
  cursor: pointer;
  appearance: none;
}

.chat-context-usage:hover,
.chat-context-usage-anchor.open .chat-context-usage {
  outline: 3px solid color-mix(in srgb, var(--text-primary) 9%, transparent);
  outline-offset: 1px;
}

.chat-context-usage-popover {
  position: fixed;
  right: var(--chat-context-usage-popover-right, 24px);
  bottom: var(--chat-context-usage-popover-bottom, 96px);
  z-index: var(--chat-config-popover-layer, 44);
  width: max-content;
  min-width: 0;
  max-width: min(220px, calc(100vw - 24px));
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 86%, transparent);
  border-radius: var(--radius-popup);
  background: var(--surface-overlay);
  box-shadow: var(--shadow-overlay);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px) scale(0.98);
  transform-origin: right bottom;
  transition:
    opacity var(--motion-fast) var(--ease-out),
    transform var(--motion-fast) var(--ease-out);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.chat-context-usage:focus-visible + .chat-context-usage-popover,
.chat-context-usage-anchor.open .chat-context-usage-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Hover is a desktop-only show channel; on touch it sticks after taps and
   would ghost the tooltip back on after unrelated popups close. */
@media (hover: hover) {
  .chat-context-usage-anchor:hover .chat-context-usage-popover {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }
}

.chat-context-usage-popover-kicker {
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.2;
}

.chat-context-usage-popover-value {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.chat-config-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
}

.chat-config-overflow-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.chat-config-overflow-values {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chat-config-item-label {
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 10px;
  line-height: 1.1;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.chat-config-pill {
  max-width: 148px;
  height: 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-raised) 52%, transparent);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
}

.chat-config-pill:hover,
.chat-config-pill[aria-expanded='true'] {
  border-color: color-mix(in srgb, var(--border-subtle) 72%, transparent);
  background: color-mix(in srgb, var(--hover) 88%, var(--surface-raised));
}

.chat-config-pill:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.chat-config-pill-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-core-config-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: var(--chat-config-popover-layer);
  width: max-content;
  max-width: calc(100vw - 24px);
  height: min(44vh, 380px);
  min-height: 180px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 82%, var(--accent-primary));
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-overlay) 98%, var(--surface-panel));
  box-shadow: var(--shadow-overlay);
  backdrop-filter: blur(16px) saturate(1.06);
  -webkit-backdrop-filter: blur(16px) saturate(1.06);
  display: flex;
  flex-direction: column;
}

.chat-core-config-columns {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
}

.chat-core-config-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: max-content;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.chat-core-config-column + .chat-core-config-column {
  border-left: 1px solid color-mix(in srgb, var(--border-subtle) 72%, transparent);
}

.chat-core-config-heading {
  padding: 10px 11px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--border-subtle) 72%, transparent);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.chat-core-config-values {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
}

.chat-core-config-option {
  width: 100%;
  min-height: 30px;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-primary);
  display: grid;
  grid-template-columns: max-content 12px;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 12px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.chat-core-config-option:hover,
.chat-core-config-option.selected {
  background: var(--hover);
}

.chat-core-config-option:disabled {
  opacity: 0.68;
  cursor: wait;
}

.chat-core-config-option-label {
  min-width: 0;
  white-space: nowrap;
}

.chat-core-config-option .sl-icon {
  margin-top: 1px;
  color: var(--accent-primary);
}

.chat-core-config-check {
  visibility: hidden;
}

.chat-core-config-check.visible {
  visibility: visible;
}

.chat-core-config-empty {
  display: block;
  padding: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}

.chat-core-config-footer {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
  padding: 6px;
  border-top: 1px solid color-mix(in srgb, var(--border-subtle) 72%, transparent);
}

.chat-core-config-more-button {
  min-height: 28px;
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.chat-core-config-more-button:hover,
.chat-core-config-more-button:focus-visible {
  background: var(--hover);
  color: var(--text-primary);
  outline: none;
}

.chat-core-config-more {
  display: flex;
  flex-direction: column;
  width: max-content;
  max-width: 100%;
  min-height: 0;
  overflow-y: auto;
}

.chat-core-config-more-heading {
  padding: 10px 11px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--border-subtle) 72%, transparent);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.chat-core-config-more-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}

@media (max-width: 520px) {
  .chat-core-config-menu {
    max-width: calc(100vw - 16px);
  }
}

.chat-config-value-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: var(--chat-config-popover-layer);
  width: max-content;
  min-width: 100%;
  max-width: min(320px, calc(100vw - 24px));
  max-height: min(42vh, 360px);
  overflow-y: auto;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 82%, var(--accent-primary));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-overlay) 98%, var(--surface-panel));
  box-shadow: var(--shadow-overlay);
  backdrop-filter: blur(16px) saturate(1.06);
  -webkit-backdrop-filter: blur(16px) saturate(1.06);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px;
}

.chat-config-options .chat-config-item:first-child:not(:only-child) .chat-config-value-menu {
  left: 0;
  right: auto;
}

.chat-config-options .chat-config-item:only-child .chat-config-value-menu {
  left: auto;
  right: 0;
}

.chat-config-value-option {
  min-height: 28px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 8px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.chat-config-value-menu .chat-config-value-option {
  width: 100%;
  height: auto;
  align-items: flex-start;
  padding: 6px 8px;
  line-height: 1.25;
}

.chat-config-value-label {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
  text-align: left;
}

.chat-config-value-option:hover,
.chat-config-value-option.selected {
  background: var(--hover);
}

.chat-config-value-option:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.chat-config-value-option .sl-icon {
  color: var(--accent-primary);
  flex: 0 0 auto;
  margin-top: 1px;
}

.chat-empty-hint {
  padding: 8px 8px;
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
}

.chat-empty-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-style: normal;
}

@media (prefers-reduced-motion: reduce) {
  .chat-prompt-status-dots span,
  .chat-prompt-spinner {
    animation: none;
  }
  .chat-prompt-status-dots span { opacity: 0.7; }
}

@keyframes thinkPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes dotBlink {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

/* workspace-ui-targeted-evolution: session sidebar */









.chat-hub-popover,
.project-session-action-menu,
.session-archive-menu {
  border-color: var(--border-subtle);
  border-radius: var(--radius-floating);
  background: var(--surface-overlay);
  box-shadow: var(--shadow-overlay);
}

/* workspace-ui-temporary-layers */
.chat-config-value-menu,
.chat-core-config-menu,
.chat-slash-menu,
.chat-file-mention-menu,
.session-archive-menu,
.project-session-action-menu,
.wide-project-action-popover {
  --workspace-temporary-layer-background: color-mix(in srgb, var(--surface-overlay) 82%, transparent);
  --workspace-temporary-layer-filter: blur(12px) saturate(1.08);
  background: var(--workspace-temporary-layer-background);
  border-color: color-mix(in srgb, var(--border-subtle) 84%, transparent);
  box-shadow:
    var(--shadow-overlay),
    inset 0 1px 0 color-mix(in srgb, var(--text-primary) 8%, transparent);
  backdrop-filter: var(--workspace-temporary-layer-filter);
  -webkit-backdrop-filter: var(--workspace-temporary-layer-filter);
}

@media (width >= 900px) {
  .chat-config-value-menu,
  .chat-core-config-menu,
  .chat-slash-menu,
  .chat-file-mention-menu,
  .session-archive-menu,
  .project-session-action-menu,
  .wide-project-action-popover {
    --workspace-temporary-layer-background: color-mix(in srgb, var(--surface-overlay) 58%, transparent);
  }
}

.chat-title-outline-menu,
.chat-top-level-menu {
  transform-origin: top left;
}

.chat-top-level-menu {
  animation: sl-menu-in var(--motion-fast) var(--ease-out);
}

.chat-top-level-menu.sl-menu-exit {
  animation: sl-menu-out var(--motion-exit) var(--ease-out) forwards;
  pointer-events: none;
}

.chat-edge-surface-glass {
  position: absolute;
  z-index: 0;
  inset: 0;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 84%, transparent);
  border-radius: inherit;
  background: var(--workspace-temporary-layer-background);
  box-shadow:
    var(--shadow-overlay),
    inset 0 1px 0 color-mix(in srgb, var(--text-primary) 8%, transparent);
  backdrop-filter: var(--workspace-temporary-layer-filter);
  -webkit-backdrop-filter: var(--workspace-temporary-layer-filter);
  pointer-events: none;
}

.chat-edge-surface-content {
  position: relative;
  z-index: 1;
  min-width: 0;
}

@media (prefers-reduced-transparency: reduce) {
  .chat-edge-surface-glass,
  .chat-config-value-menu,
  .chat-slash-menu,
  .chat-file-mention-menu,
  .session-archive-menu,
  .project-session-action-menu,
  .wide-project-action-popover {
    background: var(--surface-overlay);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

}

/* workspace-ui-targeted-evolution: chat reading */
.chat-view-content {
  min-width: 0;
  max-width: 100%;
}

.narrow-shell .chat-block {
  scrollbar-gutter: auto;
  scrollbar-width: none;
}

.narrow-shell .chat-block::-webkit-scrollbar {
  width: 0;
}

.chat-turn-entry {
  animation: chatTurnEnter var(--motion-emphasized) var(--ease-out) both;
}

.chat-permission-history-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 28px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.chat-permission-history-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.chat-permission-history-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent-primary);
}

.chat-permission-history-icon-answer {
  color: var(--text-secondary);
}

.chat-permission-history-question {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-primary);
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chat-permission-history-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

@media (prefers-reduced-motion: reduce) {
  .chat-turn-entry,
.chat-hub-popover,
.project-session-action-menu,
.session-archive-menu,
.chat-top-level-menu,
.chat-top-level-menu.sl-menu-exit,
.chat-title-outline-menu {
    animation: none;
  }
}

@media (width < 900px) {

  .chat-composer-content,
  .chat-composer-frame {
    max-width: calc(100vw - 24px);
  }

  .chat-slash-menu,
  .chat-file-mention-menu,
  .chat-config-value-menu {
    max-width: calc(100vw - 24px);
    max-height: min(56dvh, 420px);
  }

  .chat-config-value-menu {
    overflow: auto;
    overscroll-behavior: contain;
  }
}

.chat-empty-hint,
.empty-card {
  color: var(--text-secondary);
  text-align: center;
}

.project-session-error,
.session-search-error {
  border: 1px solid color-mix(in srgb, var(--state-danger) 28%, var(--border-subtle));
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--state-danger) 7%, var(--surface-panel));
  color: var(--state-danger);
  padding: 8px 10px;
}

.project-session-error button,
.session-search-error button {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.session-archive-progress[role='status'] {
  border-color: var(--border-subtle);
  background: var(--surface-overlay);
  box-shadow: var(--shadow-floating);
}

.chat-session-status-overlay {
  position: absolute;
  top: 8px;
  inset-inline: 18px;
  z-index: calc(var(--layer-workspace-chrome) - 1);
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.chat-main[data-chat-search-open='true'] .chat-session-status-overlay {
  top: 54px;
}

.chat-session-status-card {
  display: grid;
  gap: 8px;
  width: min(620px, 100%);
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 30%, var(--border-subtle));
  border-radius: var(--radius-panel);
  background: var(--surface-panel);
  box-shadow: var(--shadow-floating);
  color: var(--text-secondary);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 18px;
  pointer-events: auto;
}

.chat-session-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.chat-session-status-row > span:first-child {
  flex: 1 1 140px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.chat-session-status-count {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.chat-session-status-error {
  border-color: color-mix(in srgb, var(--state-warning) 34%, var(--border-subtle));
}

.chat-session-status-error [role='alert'] {
  color: var(--text-primary);
}

.chat-session-status-card button {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid color-mix(in srgb, var(--state-warning) 44%, var(--border-subtle));
  border-radius: var(--radius-control);
  background: var(--surface-panel);
  color: var(--text-primary);
  padding: 4px 9px;
  font-size: inherit;
  line-height: 16px;
}

.chat-session-status-card button:hover:not(:disabled) {
  border-color: var(--state-warning);
  color: var(--state-warning);
}

.chat-session-status-card button:disabled {
  opacity: 0.6;
  cursor: default;
}

.chat-session-status-details {
  min-width: 0;
}

.chat-session-status-details summary {
  width: fit-content;
  padding: 4px 0;
  cursor: pointer;
}

.chat-session-status-error-body {
  max-height: min(240px, 35dvh);
  overflow: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  border-top: 1px solid var(--border-subtle);
}

.chat-session-status-error-body p {
  margin: 8px 0 0;
}

@media (max-width: 600px) {
  .chat-session-status-overlay {
    inset-inline: 10px;
  }
}

.chat-loading-progress-track {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-raised);
}

.chat-loading-progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 160ms ease-out;
}

.chat-loading-progress-track.indeterminate > span {
  width: 35%;
  animation: chatLoadingProgress 1.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .chat-loading-progress-track > span {
    transition: none;
  }

  .chat-loading-progress-track.indeterminate > span {
    animation: none;
  }
}

@keyframes chatLoadingProgress {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(300%);
  }
}


.chat-search-bar {
  display: flex;
  gap: 6px;
  min-height: 34px;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-panel);
  padding: 4px 8px;
  color: var(--text-secondary);
}

.chat-search-bar > .sl-icon {
  flex: 0 0 auto;
}

.chat-search-submit-hint {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100% - 12px);
  color: var(--text-tertiary);
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
  white-space: nowrap;
}

.chat-search-submit-hint .sl-icon {
  flex: 0 0 auto;
  color: var(--text-secondary);
}

.chat-search-match {
  background: color-mix(in srgb, #ffd166 30%, transparent);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}


.chat-view-width-fixed-800 .chat-search-bar {
  width: min(var(--chat-view-column-width, 800px), 100%);
  margin: 4px auto 0;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 78%, transparent);
  border-radius: 8px;
}

.chat-session-panel-sidebar .chat-edge-surface-header {
  grid-template-columns: minmax(0, 1fr);
  padding-left: 11px;
  /* The panel's 1px end border is outside the header's content box. */
  padding-right: calc(var(--chat-header-end-padding) - 1px);
}

.chat-session-panel-sidebar .chat-edge-surface-toolbar {
  grid-column: 1 / -1;
  grid-row: 1;
  z-index: 1;
}

.chat-session-recent-toggle {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard);
}

.chat-session-recent-toggle:hover {
  background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
  color: var(--text-primary);
}

.chat-session-recent-toggle.active {
  background: var(--accent-soft-bg);
  color: var(--accent-primary);
}

.chat-session-recent-toggle.active:hover {
  background: color-mix(in srgb, var(--accent-primary) 24%, transparent);
  color: var(--accent-primary);
}

.chat-session-panel-sidebar .chat-edge-surface-toggle-spacer {
  display: none;
}

.chat-session-panel-sidebar .chat-edge-surface-title {
  display: none;
}

.chat-file-link-context-menu {
  position: fixed;
  z-index: 140;
  min-width: min(208px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  background: var(--surface-overlay);
  box-shadow: var(--shadow-overlay);
  transform-origin: top left;
  animation: sl-menu-in var(--motion-fast) var(--ease-out);
}

.chat-file-link-context-menu.sl-menu-exit {
  animation: sl-menu-out var(--motion-exit) var(--ease-out) forwards;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .chat-file-link-context-menu {
    animation: none;
  }
}

.chat-file-link-context-menu button {
  display: flex;
  width: 100%;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  text-align: left;
}

.chat-file-link-context-menu button .sl-icon {
  flex: 0 0 auto;
  color: var(--text-secondary);
}

.chat-file-link-context-menu button:hover {
  background: var(--hover);
}



/* Search HUD: keep the control above the reading surface while content scrolls. */
.chat-main[data-chat-search-open='true'] .chat-search-hud {
  position: absolute;
  top: 8px;
  right: 8px;
  left: 8px;
  z-index: 40;
  width: auto;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 36%, var(--border-subtle));
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-panel) 96%, var(--surface-canvas));
  box-shadow: 0 10px 26px color-mix(in srgb, #000 24%, transparent);
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}

.chat-main[data-chat-search-open='true'] .chat-block {
  padding-top: calc(20px + 46px);
}

.chat-main.chat-view-width-fixed-800[data-chat-search-open='true'] .chat-search-hud {
  right: auto;
  left: 50%;
  width: min(var(--chat-view-column-width, 800px), calc(100% - 16px));
  transform: translateX(-50%);
}

.chat-search-hud:focus-within {
  border-color: color-mix(in srgb, var(--accent-primary) 72%, var(--border-subtle));
  box-shadow:
    0 10px 26px color-mix(in srgb, #000 24%, transparent),
    0 0 0 2px color-mix(in srgb, var(--accent-primary) 22%, transparent);
}

::highlight(chat-search-match) {
  background: color-mix(in srgb, #ffd166 30%, transparent);
  color: inherit;
}

::highlight(chat-search-match-active) {
  background: color-mix(in srgb, #ffd166 82%, var(--surface-raised));
  color: #231d0b;
}

.chat-search-match-active {
  background: color-mix(in srgb, #ffd166 82%, var(--surface-raised));
  color: #231d0b;
  box-shadow: 0 0 0 1px color-mix(in srgb, #ffd166 58%, transparent);
}

.chat-turn-search-highlight-active {
  outline-color: color-mix(in srgb, var(--accent-primary) 82%, var(--border-subtle));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary) 12%, transparent);
}

@media (width < 900px) {
  .chat-main[data-chat-search-open='true'] .chat-block {
    padding-top: calc(14px + 46px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-search-hud,
  .chat-search-input,
  .chat-turn-search-highlight {
    transition: none;
  }
}

/* Shared title navigation stays within the existing 32px header. */
.chat-session-header .app-toolbar-root {
  gap: 2px;
}

.chat-session-header .chat-session-global-bar {
  height: var(--chat-menu-header-height);
}

.chat-prompt-history {
  --history-text: #fff;
  --history-label: rgb(255 255 255 / 50%);
  --history-background: #242424;
  --history-border: #3d3d3d;
  --history-shadow: 0 4px 16px rgb(0 0 0 / 60%);
  --history-rail-width: 40px;
  --history-panel-max: min(320px, 100%);
  --history-toolbar-height: 30px;
  --history-list-top: calc(var(--history-expanded-inset) + var(--history-toolbar-height));
  --history-compact-top: calc(var(--history-compact-inset) + var(--history-toolbar-height));
  --history-duration: 343ms;
  --history-ease: cubic-bezier(.45, 0, .3, 1);
  position: absolute;
  z-index: 4;
  right: 16px;
  left: 16px;
  top: max(50%, calc(var(--history-outer-height) / 2 + var(--history-toolbar-height) + 4px));
  height: var(--history-outer-height);
  transform: translateY(-50%);
  pointer-events: none;
}

.theme-light .chat-prompt-history {
  --history-text: #000;
  --history-label: rgb(0 0 0 / 50%);
  --history-background: #fff;
  --history-border: #dedede;
  --history-shadow: 0 4px 12px -4px rgb(0 0 0 / 4%), 0 3px 6px -8px rgb(0 0 0 / 4%);
}

.chat-prompt-history[data-open='true'] {
  --history-duration: 543ms;
  --history-ease: cubic-bezier(.16, 1, .3, 1);
}

.chat-prompt-history-trigger {
  position: absolute;
  top: 50%;
  right: 0;
  width: min(var(--history-rail-width), 100%);
  height: var(--history-compact-height);
  transform: translateY(-50%);
  border: 0;
  padding: 0;
  background: none;
  cursor: default;
  pointer-events: auto;
}

.chat-prompt-history[data-open='true'] .chat-prompt-history-trigger {
  pointer-events: none;
}

.chat-prompt-history-panel {
  position: absolute;
  top: calc(-1 * var(--history-toolbar-height));
  right: 0;
  width: max-content;
  min-width: min(96px, 100%);
  max-width: var(--history-panel-max);
  height: calc(100% + var(--history-toolbar-height));
}

.chat-prompt-history-window {
  position: relative;
  height: 100%;
  overflow: hidden;
  clip-path: inset(var(--history-compact-top) 0 var(--history-compact-inset)
    max(0px, calc(100% - var(--history-rail-width))) round var(--radius-popup));
  transition: clip-path var(--history-duration) var(--history-ease);
}

.chat-prompt-history[data-open='true'] .chat-prompt-history-window {
  clip-path: inset(var(--history-expanded-inset) 0 round var(--radius-popup));
  pointer-events: auto;
}

.chat-prompt-history-surface {
  position: absolute;
  inset: var(--history-compact-top) 0 var(--history-compact-inset) max(0px, calc(100% - var(--history-rail-width)));
  border: .5px solid var(--history-border);
  border-radius: var(--radius-popup);
  background: color-mix(in srgb, var(--history-background) 90%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: var(--history-shadow);
  opacity: 0;
  transition: inset var(--history-duration) var(--history-ease), opacity var(--history-duration) var(--history-ease);
}

.chat-prompt-history[data-open='true'] .chat-prompt-history-surface {
  inset: var(--history-expanded-inset) 0;
  opacity: 1;
}

.chat-prompt-history-sizer,
.chat-prompt-history-row {
  box-sizing: border-box;
  font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  white-space: nowrap;
}

.chat-prompt-history-sizer {
  display: grid;
  visibility: hidden;
  overflow: hidden;
  height: 0;
  padding: 0 44px 0 24px;
}

.chat-prompt-history-toolbar {
  position: absolute;
  top: var(--history-expanded-inset);
  right: 8px;
  height: var(--history-toolbar-height);
  display: flex;
  align-items: center;
  visibility: hidden;
}

.chat-prompt-history[data-open='true'] .chat-prompt-history-toolbar {
  visibility: visible;
}

.chat-prompt-history-pin {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: var(--radius-control);
  padding: 0;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.chat-prompt-history-pin:hover {
  background: var(--hover);
  color: var(--text-primary);
}

.chat-prompt-history-pin[aria-pressed='true'] {
  color: var(--accent-primary);
}

.chat-prompt-history-list {
  position: absolute;
  top: var(--history-list-top);
  right: 0;
  width: 100%;
  height: var(--history-expanded-height);
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  --history-fade-start: var(--history-text) 0;
  --history-fade-end: var(--history-text) 100%;
}

.chat-prompt-history[data-open='true'] .chat-prompt-history-list {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--history-text) 20%, transparent) transparent;
}

.chat-prompt-history-list[data-fade-top='true'] {
  --history-fade-start: transparent 0, var(--history-text) 16px;
}

.chat-prompt-history-list[data-fade-bottom='true'] {
  --history-fade-end: var(--history-text) calc(100% - 16px), transparent 100%;
}

.chat-prompt-history-list:is([data-fade-top='true'], [data-fade-bottom='true']) {
  mask-image: linear-gradient(to bottom, var(--history-fade-start), var(--history-fade-end));
}

.chat-prompt-history-rows {
  position: relative;
  height: var(--history-content-height);
}

.chat-prompt-history-row {
  position: absolute;
  inset: -13px 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  height: 26px;
  border: 0;
  padding: 3px 8px 3px 24px;
  background: none;
  color: var(--history-label);
  text-align: right;
  pointer-events: none;
  transform: translateY(calc(var(--history-compact-y) + var(--history-compact-offset, 0px)));
  transition: transform var(--history-duration) var(--history-ease), color var(--history-duration) var(--history-ease);
}

.chat-prompt-history[data-open='true'] .chat-prompt-history-row {
  cursor: pointer;
  pointer-events: auto;
  transform: translateY(calc(var(--history-expanded-y) + var(--history-expanded-offset, 0px)));
}

.chat-prompt-history-text {
  flex: 1 1 auto;
  overflow: hidden;
  margin-right: 36px;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateX(16px);
  transition: opacity var(--history-duration) var(--history-ease), transform var(--history-duration) var(--history-ease);
}

.chat-prompt-history-marker {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 8px;
  height: 2px;
  background: color-mix(in srgb, var(--history-text) 20%, transparent);
  transform: translateY(-50%);
  transition: right var(--history-duration) var(--history-ease), width var(--history-duration) var(--history-ease),
    background-color var(--history-duration) var(--history-ease);
}

.chat-prompt-history-row[data-active='true'] .chat-prompt-history-marker {
  background: var(--history-text);
}

.chat-prompt-history[data-open='true'] .chat-prompt-history-text {
  opacity: 1;
}

.chat-prompt-history[data-open='true'] .chat-prompt-history-marker {
  right: 8px;
}

.chat-prompt-history[data-open='true'] .chat-prompt-history-row[data-hovered='true'] {
  color: var(--text-primary);
}

.chat-prompt-history[data-open='true'] .chat-prompt-history-row[data-hovered='true'] .chat-prompt-history-text {
  transform: translateX(8px);
}

.chat-prompt-history[data-open='true'] .chat-prompt-history-row[data-hovered='true'] .chat-prompt-history-marker {
  width: 16px;
  background: currentColor;
}

.chat-prompt-history[data-open='true'] .chat-prompt-history-row[data-active='true'] {
  color: var(--history-text);
  font-weight: 500;
}

.chat-prompt-history[data-open='true'] .chat-prompt-history-row[data-active='true'] .chat-prompt-history-text {
  transform: none;
}

.chat-prompt-history[data-open='true'] .chat-prompt-history-row[data-active='true'] .chat-prompt-history-marker {
  width: 24px;
  background: var(--history-text);
}

.chat-prompt-history-row:focus-visible,
.chat-prompt-history-pin:focus-visible,
.chat-prompt-history-trigger:focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: -2px;
}

.chat-prompt-history[data-settled='true'] :is(.chat-prompt-history-row, .chat-prompt-history-text, .chat-prompt-history-marker) {
  --history-duration: 180ms;
  --history-ease: cubic-bezier(.4, 0, .2, 1);
}

.chat-prompt-history[data-scroll-commit] :is(.chat-prompt-history-row, .chat-prompt-history-text, .chat-prompt-history-marker) {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .chat-prompt-history :is(.chat-prompt-history-window, .chat-prompt-history-surface,
    .chat-prompt-history-row, .chat-prompt-history-text, .chat-prompt-history-marker) {
    transition: none;
  }
}

/* Session list styles share the same density across desktop and mobile. */

/* ---------- density tokens ---------- */
.session-list-nav,
.chat-session-sidebar-panel {
  --sl-row-py: 5px;
  --sl-row-font: 12.5px;
  --sl-section-gap: 12px;
}
[data-session-list-density="compact"] {
  --sl-row-py: 3px;
  --sl-section-gap: 9px;
}

.session-list-nav {
  --session-list-bottom-inset: 16px;
  padding-top: var(--session-list-top-inset, 8px);
  padding-bottom: calc(var(--session-list-bottom-inset) + var(--wm-safe-area-bottom));
  padding-right: 7px;
  padding-left: 7px;
}

/* ---------- project section (level 1: strong) ---------- */
.wide-project-section {
  margin-top: var(--sl-section-gap);
}
.wide-project-section:first-child {
  margin-top: 0;
}
.wide-project-row {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
}
.wide-project-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px;
  border: 0;
  background: none;
  border-radius: var(--radius-control);
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}
.wide-project-toggle:hover {
  background: var(--hover);
}
.wide-project-toggle:active {
  transform: scale(0.985);
}
.wide-project-folder-icon {
  color: var(--hub-accent, var(--text-tertiary));
  flex: none;
}
.wide-project-folder-wrap {
  position: relative;
  display: inline-flex;
  flex: none;
}
.wide-project-completion-dot {
  position: absolute;
  top: -1px;
  right: -2px;
  pointer-events: none;
}
.wide-project-pin-badge {
  position: absolute;
  right: -4px;
  bottom: -3px;
  color: var(--accent-primary);
}
.wide-project-title-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.wide-project-name {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wide-project-hub-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--hub-accent, var(--text-tertiary));
  opacity: 0.85;
  flex: none;
}
.wide-project-hub-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hub-accent, var(--text-tertiary));
}
.wide-project-hub-label {
  text-transform: uppercase;
}

/* ---------- project row actions: persistent new and conditional older collapse ---------- */
.wide-project-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
.wide-project-action-btn {
  appearance: none;
  width: 24px;
  height: 24px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  border-radius: var(--radius-control);
  color: var(--text-tertiary);
  cursor: pointer;
  transition:
    color var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}
.wide-project-action-btn:hover {
  color: var(--text-primary);
  background: var(--hover);
}
.wide-project-action-btn.session-older-collapse-btn,
.wide-project-action-btn.session-older-collapse-btn:hover {
  color: var(--accent-primary);
}
/* persistent affordance: always-visible actions read as clickable on hover */
.sl-action-primary,
.recent-sessions-collapse-btn,
.recent-project-divider-create {
  color: var(--text-secondary);
}

/* ---------- session rows (level 2: quiet, indented) ---------- */
.wide-project-session-list {
  display: grid;
  grid-template-rows: 1fr;
  margin-top: 2px;
  padding-left: 11px;
  opacity: 1;
  visibility: visible;
  transition:
    grid-template-rows var(--motion-standard) var(--ease-out),
    margin-top var(--motion-standard) var(--ease-out),
    opacity var(--motion-standard) var(--ease-out),
    visibility 0s linear 0s;
}
.wide-project-session-list-inner {
  min-height: 0;
  overflow: hidden;
}
.wide-project-session-list.is-collapsed {
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    grid-template-rows var(--motion-standard) var(--ease-out),
    margin-top var(--motion-standard) var(--ease-out),
    opacity var(--motion-standard) var(--ease-out),
    visibility 0s linear var(--motion-standard);
}
.project-session-row-wrap {
  position: relative;
  display: flex;
  align-items: center;
  /* gutter reserved for the leading state dot; row bg starts after it */
  padding-left: 14px;
}
.wide-session-row {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--sl-row-py) 8px var(--sl-row-py) 6px;
  border: 0;
  background: none;
  border-radius: var(--radius-control);
  font-size: var(--sl-row-font);
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard);
}
.wide-session-row:hover {
  background: var(--hover);
  color: var(--text-primary);
}
.wide-session-row:active {
  transform: scale(0.98);
}
.wide-session-row.selected {
  background: var(--selection-state-background);
  color: var(--text-primary);
}
.wide-session-row.session-locate-highlight {
  background: var(--selection-state-background);
  outline: 1px solid var(--focus-ring-color);
  outline-offset: -1px;
}
.wide-session-row.keyboard-active {
  background: var(--hover);
  outline: 1px solid var(--focus-ring-color);
  outline-offset: -1px;
  color: var(--text-primary);
}
.wide-session-row.selected.keyboard-active {
  background: var(--selection-state-background);
}
.wide-session-row.pinned {
  padding-right: 1px;
}
.wide-session-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wide-session-fork-marker {
  flex: none;
  margin-right: 5px;
  color: var(--text-tertiary);
}
.wide-session-title.forked {
  display: flex;
  align-items: center;
}
.wide-session-title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wide-session-row.selected .wide-session-title {
  font-weight: 500;
}
.wide-session-time {
  flex: none;
  text-align: right;
  font-size: 11px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wide-session-agent-tag + .wide-session-time {
  margin-left: -3px;
}
.wide-session-time.compact-age {
  flex: 0 0 22.5px;
  min-width: 0;
}

.wide-session-tree-toggle {
  flex: none;
  width: 14px;
  height: 22px;
  display: grid;
  place-items: center;
  /* fully inside the 14px state gutter: zero net layout cost, so session
     titles stay aligned whether or not the row has subagents */
  margin-left: -14px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-control);
  background: none;
  color: var(--text-tertiary);
  cursor: pointer;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}
.wide-session-tree-toggle:hover {
  color: var(--text-primary);
  background: var(--hover);
}

.subagent-session-row-wrap {
  padding-left: 27px;
}
.subagent-session-group {
  position: relative;
}
/* Single faint hairline on the gutter (chevron) axis, dropping from the
   parent row's bottom edge to the last child's midline. */
.subagent-session-group::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: calc(var(--sl-row-py) + 7px);
  border-left: 1px solid color-mix(in srgb, var(--text-tertiary) 16%, transparent);
  pointer-events: none;
}
.subagent-session-row {
  gap: 7px;
  padding-left: 5px;
  /* one notch quieter than root rows: smaller and dimmer */
  font-size: 12px;
  color: var(--text-tertiary);
}
.subagent-session-row:hover {
  color: var(--text-secondary);
}
.subagent-session-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subagent-session-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  color: var(--text-tertiary);
  font-size: 10px;
  white-space: nowrap;
}
.subagent-session-status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}
.subagent-session-status[data-subagent-status="running"] {
  color: var(--accent-primary);
}
.subagent-session-status[data-subagent-status="waiting_approval"] {
  color: var(--warning, #d29922);
}
/* Terminal states render as a bare dot; park it on the pin icon's centre
   axis (24px pin slot + 6.5px margin-right puts the centre 18.5px from the
   wrap's right edge) so it lines up with the pin column. */
.subagent-session-status[data-subagent-status="completed"],
.subagent-session-status[data-subagent-status="failed"],
.subagent-session-status[data-subagent-status="interrupted"] {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}
/* Keep long titles from running under the parked dot. */
.subagent-session-row:has(> .subagent-session-status[data-subagent-status="completed"]),
.subagent-session-row:has(> .subagent-session-status[data-subagent-status="failed"]),
.subagent-session-row:has(> .subagent-session-status[data-subagent-status="interrupted"]) {
  padding-right: 24px;
}
.subagent-session-status[data-subagent-status="completed"] {
  color: var(--success, #3fb950);
}
.subagent-session-status[data-subagent-status="failed"],
.subagent-session-status[data-subagent-status="interrupted"] {
  color: var(--danger, #f85149);
}

/* leading state dot sits in the reserved gutter, never overlapping the row bg */
.project-session-row-wrap .session-state-leading {
  left: 3px;
}
.project-session-row-wrap .session-state-leading.permission-pending {
  left: 0;
}
/* 12px spinner centered in the 14px gutter (center at 7px) so it stays clear
   of the row's selected background. */
.project-session-row-wrap .session-state-leading.running {
  left: -2px;
}
/* A root state takes priority over the tree chevron: keep both in the same
   gutter slot, but paint the state above the chevron. The state marker is
   pointer-transparent, so the toggle's hit target remains available. */
.project-session-row-wrap:has(.wide-session-tree-toggle) .session-state-leading {
  z-index: 2;
}

.session-question-slot {
  display: flex;
  flex: none;
  align-items: center;
  inline-size: 36px;
  margin-inline-end: 2px;
}
.session-question-badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 2px;
  min-height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent-soft-bg);
  color: var(--accent-text);
}
.session-question-count {
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.wide-session-pin-btn {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  border-radius: var(--radius-control);
  color: var(--accent-primary);
  cursor: pointer;
  margin-right: 4px;
}
.wide-session-pin-btn:hover {
  background: var(--hover);
}
.wide-session-pin-indicator {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  margin-right: 4px;
  color: var(--accent-primary);
  pointer-events: none;
}
.wide-session-row.pinned + .wide-session-pin-btn,
.wide-session-row.pinned + .wide-session-pin-indicator {
  /* 8px row padding + 22.5px time slot - 24px pin slot = 6.5px. */
  margin-right: 6.5px;
}
.wide-session-pin-indicator .sl-icon {
  width: 14px;
  height: 14px;
}
.wide-project-action-btn:active:not(:disabled),
.recent-project-divider-jump:active,
.recent-project-divider-create:active {
  transform: scale(0.97);
}

/* ---------- agent mark ---------- */
.wide-session-agent-tag {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  max-width: none;
  overflow: hidden;
  line-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
}
.theme-light .wide-session-agent-tag {
  color: var(--text-primary);
}

/* ---------- recent block ---------- */
.recent-project-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  /* no left padding: align group headers with the project rows below the list */
  padding: 3px 8px 3px 0;
  color: var(--text-tertiary);
}
.recent-project-divider-icon {
  flex: none;
}
.recent-project-divider-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-project-divider-jump,
.recent-project-divider-create {
  appearance: none;
  width: 20px;
  height: 20px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  border-radius: var(--radius-control);
  color: var(--text-tertiary);
  cursor: pointer;
}
.recent-project-divider-create {
  margin-left: auto;
}
.recent-project-divider-jump:hover,
.recent-project-divider-create:hover {
  color: var(--text-primary);
  background: var(--hover);
}

/* ---------- menu enter/exit ---------- */
/* Popovers anchored above their trigger carry translateY(-100%) in
   --sl-popover-shift; the keyframes must keep that shift or the menu would
   detach from its anchor while animating. */
@keyframes sl-menu-in {
  from { opacity: 0; transform: var(--sl-popover-shift, translateY(0)) translateY(-2px) scale(0.98); }
  to { opacity: 1; transform: var(--sl-popover-shift, translateY(0)); }
}
@keyframes sl-menu-out {
  to { opacity: 0; transform: var(--sl-popover-shift, translateY(0)) translateY(-2px) scale(0.98); }
}
.project-session-action-menu,
.wide-project-action-popover,
.session-archive-menu {
  animation: sl-menu-in var(--motion-standard) var(--ease-out);
}
.sl-menu-exit {
  animation: sl-menu-out var(--motion-exit) var(--ease-out) forwards;
  pointer-events: none;
}

/* ---------- list enter ---------- */
@keyframes sl-list-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .project-session-action-menu,
  .wide-project-action-popover,
  .sl-menu-exit,
  .wide-project-session-list {
    animation: none;
  }
}

/* ---------- menus (context / action popover) ---------- */
.project-session-action-menu,
.wide-project-action-popover {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  overflow-y: auto;
  overscroll-behavior: contain;
  max-width: calc(100vw - 16px);
  transform-origin: var(--sl-popover-origin, top center);
  /* Static counterpart of the keyframe shift: keeps an above-anchored menu in
     place once the enter animation ends. */
  transform: var(--sl-popover-shift, translateY(0));
}
.sl-session-list-popover {
  background: var(--surface-overlay);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-overlay);
  padding: 4px;
}
.project-session-action-menu {
  min-width: 148px;
}
.wide-project-action-popover {
  width: min(260px, calc(100vw - 16px));
}
.project-session-menu-btn {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  background: none;
  border-radius: var(--radius-control);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}
.project-session-menu-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.project-session-menu-btn .sl-icon {
  color: var(--text-secondary);
}
/* The destructive entry announces itself before hover. */
.project-session-menu-btn.delete .sl-icon {
  color: color-mix(in srgb, var(--state-danger) 78%, var(--text-secondary));
}
/* Hover styles only where hover exists: on touch they would stick after tap. */
@media (hover: hover) {
  .project-session-menu-btn:hover:not(:disabled) {
    background: var(--hover);
    color: var(--text-primary);
  }
  .project-session-menu-btn:hover:not(:disabled) .sl-icon {
    color: var(--text-primary);
  }
  .project-session-menu-btn.delete:hover:not(:disabled) {
    color: var(--state-danger);
  }
  .project-session-menu-btn.delete:hover:not(:disabled) .sl-icon {
    color: var(--state-danger);
  }
}
.project-session-menu-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-session-menu-separator {
  height: 1px;
  margin: 2px 6px;
  background: var(--border-faint);
}
@media (prefers-reduced-transparency: reduce) {
  .sl-session-list-popover {
    background: var(--surface-overlay);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ---------- action popover header / items ---------- */
.session-menu-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 2px;
}
.wide-project-action-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  background: none;
  border-radius: var(--radius-control);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
}
@media (hover: hover) {
  .wide-project-action-menu-item:hover {
    background: var(--hover);
    color: var(--text-primary);
  }
}
.wide-project-action-empty {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  font-size: 11.5px;
  color: var(--text-tertiary);
}

/* ---------- agent choice pills ---------- */
.agent-choice-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 8px 8px;
  outline: none;
}
.agent-choice-group-pills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 6px;
}
.agent-choice-pill {
  --selection-item-background: var(--agent-choice-fill);
  --agent-choice-border: color-mix(in srgb, var(--agent-accent, var(--border-strong)) 38%, transparent);
  --agent-choice-fill: linear-gradient(180deg, color-mix(in srgb, var(--agent-accent, #666) 16%, transparent), color-mix(in srgb, var(--agent-accent, #666) 8%, transparent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--agent-choice-border);
  background: var(--agent-choice-fill);
  color: color-mix(in srgb, var(--agent-accent, var(--text-secondary)) 88%, white);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard);
}
.agent-choice-pill-content { display: contents; }
@media (prefers-reduced-motion: no-preference) {
  .agent-choice-pill {
    animation: agent-choice-pill-in var(--motion-standard) var(--ease-out) backwards;
    animation-delay: var(--agent-choice-delay, 0ms);
  }
}
@keyframes agent-choice-pill-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.95);
  }
}
@media (hover: hover) {
  .agent-choice-pill:hover {
    --agent-choice-border: color-mix(in srgb, var(--agent-accent, var(--accent-primary)) 60%, transparent);
    box-shadow: 0 3px 10px color-mix(in srgb, var(--agent-accent, #666) 22%, transparent);
    transform: translateY(-1px);
  }
}
.agent-choice-pill.active {
  --agent-choice-border: color-mix(in srgb, var(--agent-accent, var(--accent-primary)) 72%, transparent);
  --agent-choice-fill: linear-gradient(180deg, color-mix(in srgb, var(--agent-accent, #666) 28%, transparent), color-mix(in srgb, var(--agent-accent, #666) 18%, transparent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--agent-accent, #666) 14%, transparent);
}
.agent-choice-pill:active {
  transform: scale(0.95);
}
.theme-light .agent-choice-pill {
  color: color-mix(in srgb, var(--agent-accent, #666) 80%, black);
}
.project-session-menu-btn:active:not(:disabled) {
  transform: scale(0.98);
}

/* ---------- misc ---------- */
.chat-new-session-menu {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
}
.chat-new-session-heading {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 8px;
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
}
.chat-new-session-heading kbd {
  margin-left: auto;
  color: var(--text-tertiary);
  font: 10px var(--font-mono);
  font-weight: 400;
}
.chat-new-session-projects {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.chat-new-session-hub + .chat-new-session-hub {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
}
.chat-new-session-hub-toggle,
.chat-new-session-project {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: var(--radius-control);
  background: none;
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
}
.chat-new-session-hub-toggle {
  font-size: 12px;
  font-weight: 600;
}
.chat-new-session-hub-toggle:disabled {
  opacity: 1;
  cursor: default;
}
.chat-new-session-hub-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--hub-accent);
}
.chat-new-session-hub-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}
.chat-new-session-hub-count {
  margin-left: auto;
  color: var(--text-tertiary);
  font: 10px var(--font-mono);
}
.chat-new-session-project {
  min-height: 44px;
  gap: 0;
  padding: 0 4px 0 0;
  cursor: default;
}
.chat-new-session-project-link,
.chat-new-session-project-add {
  display: flex;
  align-items: center;
  border: 0;
  border-radius: var(--radius-control);
  background: none;
  color: inherit;
  cursor: pointer;
}
.chat-new-session-project-link {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  gap: 8px;
  padding: 7px 8px 7px 28px;
  text-align: left;
}
.chat-new-session-project-add {
  flex: 0 0 32px;
  justify-content: center;
  height: 32px;
  padding: 0;
}
.chat-new-session-project-add:hover:not(:disabled) {
  background: var(--hover);
  color: var(--text-primary);
}
.chat-new-session-project-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.chat-new-session-project-name,
.chat-new-session-project-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-new-session-project-name {
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 500;
}
.chat-new-session-project-path {
  color: var(--text-tertiary);
  font-size: 10.5px;
}
.chat-new-session-project.active,
.chat-new-session-project:hover:not([data-disabled]),
.chat-new-session-hub-toggle:hover:not(:disabled) {
  background: var(--hover);
  color: var(--text-primary);
}
.chat-new-session-project[data-disabled] {
  opacity: 0.45;
}
.chat-new-session-project button:disabled {
  cursor: default;
}
.chat-new-session-empty {
  padding: 18px 10px;
  color: var(--text-secondary);
  font-size: 12px;
}
.chat-new-session-hint {
  display: flex;
  flex: none;
  gap: 16px;
  margin-top: 4px;
  padding: 8px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
  font-size: 10px;
}
@media (prefers-reduced-transparency: reduce) {
  .chat-new-session-menu {
    background: var(--surface-overlay);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
.wide-project-empty {
  padding: 4px 8px 4px 31px;
  font-size: 11.5px;
  color: var(--text-tertiary);
}
.project-session-menu-btn {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.session-older-toggle {
  margin-left: 14px;
  font-style: normal;
  color: var(--text-tertiary);
}
.sl-icon {
  display: block;
  flex: none;
}
.sl-icon-spin {
  animation: sl-icon-rotate 0.9s linear infinite;
}
@keyframes sl-icon-rotate {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .wide-session-row,
  .wide-project-toggle,
  .wide-project-action-btn,
  .recent-project-divider-jump,
  .recent-project-divider-create,
  .project-session-menu-btn {
    transition: none;
  }
  .sl-icon-spin {
    animation-duration: 1.8s;
  }
}

/* affordance hover feedback (kept last so it wins over per-button hover rules) */
.sl-action-primary:hover,
.recent-sessions-collapse-btn:hover,
.recent-project-divider-jump:hover,
.recent-project-divider-create:hover {
  background: var(--surface-active);
  color: var(--text-primary);
}

/* ---------- peer section headings ---------- */
.session-list-section-heading,
.session-list-section-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 28px;
  /* Match the reference inset while preserving the existing list gutter. */
  padding: 0 10px;
}
.session-list-section-heading {
  margin: 0 0 4px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0.01em;
}
.recent-sessions-heading {
  padding: 0;
}
.session-list-section-toggle {
  width: 100%;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}
.session-list-section-toggle:hover {
  color: var(--text-primary);
  background: var(--hover);
}
.session-list-section-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.session-list-section-chevron {
  margin-left: auto;
  color: var(--text-tertiary);
  flex: none;
}
.session-projects-label {
  margin-top: 20px;
}
.recent-sessions-section + .session-projects-label {
  position: relative;
  margin-top: 8px;
}
.recent-sessions-section + .session-projects-label::before {
  content: '';
  position: absolute;
  inset-inline: 10px;
  top: -5px;
  height: 1px;
  background: color-mix(in srgb, var(--border-subtle) 85%, transparent);
  pointer-events: none;
}
.session-projects-label + .wide-project-section {
  margin-top: 0;
}
.wide-project-section.recent-sessions-section {
  padding: 0;
}
.wide-project-section.recent-sessions-section.collapsed {
  padding: 0;
  border-bottom: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
/* compact: tighten the gap between the project title row and its sessions */
[data-session-list-density="compact"] .wide-project-toggle {
  padding: 3px 6px;
}
[data-session-list-density="compact"] .wide-project-session-list {
  margin-top: 1px;
}
.session-archive-menu {
  border-radius: var(--radius-popup);
}
.session-archive-menu-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
}
.session-archive-menu-item.recover {
  grid-template-columns: 20px minmax(0, 1fr) 14px;
  min-height: 58px;
  margin-bottom: 6px;
  background: var(--accent-soft-bg);
}
.session-archive-menu-item.recover > .sl-icon {
  color: var(--accent-primary);
}
.session-archive-menu-item:hover {
  background: var(--hover);
  color: var(--text-primary);
}
.session-archive-menu-item.recover:hover {
  background: color-mix(in srgb, var(--accent-primary) 22%, transparent);
}
.session-archive-menu-item-text {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.session-archive-menu-item-label {
  color: var(--text-primary);
  font-size: 12px;
}
.session-archive-menu-item-description {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
}
.session-archive-menu-section {
  display: grid;
  gap: 4px;
  padding: 10px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
}
.session-archive-menu-separator {
  height: 1px;
  margin: 4px 8px;
  background: var(--border-subtle);
}
.session-archive-menu-hint {
  padding: 8px 10px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
}

.chat-function-action:where(:not(.overlay-icon-button, .overlay-icon-link)) {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-tertiary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chat-function-action:where(:not(.overlay-icon-button, .overlay-icon-link)):hover { background: var(--hover); color: var(--text-primary); }
.chat-function-action:where(:not(.overlay-icon-button, .overlay-icon-link)):disabled { opacity: .52; cursor: default; }

.monitor-toolbar {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.monitor-actions {
  display: inline-flex;
  margin-left: auto;
  align-items: center;
  gap: 2px;
}

.monitor-body {
  overflow: auto;
}

.usage-account-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.usage-account-trigger:hover {
  background: var(--hover);
}
.usage-quota-rail { display: block; height: 3px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--text-secondary) 18%, transparent); }
.usage-quota-rail > span {
  display: block;
  height: 100%;
  background: var(--accent-primary);
}
.usage-limit-line.tone-warning strong {
  color: var(--state-warning);
}
.usage-limit-line.tone-warning .usage-quota-rail > span {
  background: var(--state-warning);
}
.usage-limit-line.tone-warning .usage-limit-label {
  color: var(--state-warning);
}
.usage-limit-line.tone-danger strong {
  color: var(--state-danger);
}
.usage-limit-line.tone-danger .usage-quota-rail > span {
  background: var(--state-danger);
}
.usage-limit-line.tone-danger .usage-limit-label {
  color: var(--state-danger);
}

.usage-detail-list { padding: 7px; display: grid; gap: 6px; }
.usage-detail-provider { display: grid; gap: 5px; }
.usage-account-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 20px; margin-bottom: 4px; }
.usage-account-card {
  padding: 7px 2px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.usage-account-card + .usage-account-card {
  border-top: 1px solid color-mix(in srgb, var(--border-subtle) 72%, transparent);
}
.usage-account-title { display: inline-flex; min-width: 0; align-items: baseline; gap: 4px; overflow: hidden; color: var(--text-primary); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.usage-account-title strong { color: var(--text-primary); font-size: 11px; font-weight: 650; }
.usage-account-hubs { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
.usage-account-hub {
  padding: 1px 5px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 74%, transparent);
  border-radius: 999px;
  background: transparent;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 14px;
}
.usage-limit-line { display: grid; grid-template-columns: 30px minmax(38px, 1fr) 34px minmax(76px, auto); align-items: center; gap: 7px; min-height: 25px; color: var(--text-tertiary); font-size: 10px; }
.usage-limit-label {
  font-size: 10px;
}
.usage-limit-line strong { color: var(--text-primary); font-family: var(--font-mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.usage-limit-reset { overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.usage-limit-line.balance { grid-template-columns: 30px 1fr auto; }
.usage-reset-credits {
  display: grid;
  margin: 7px 0 2px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 78%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-raised) 38%, transparent);
}
.usage-reset-credits-heading,
.usage-reset-credit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
}
.usage-reset-credits-heading {
  background: color-mix(in srgb, var(--surface-raised) 56%, transparent);
  color: var(--text-secondary);
  font-size: 10px;
}
.usage-reset-credits-label { font-weight: 600; }
.usage-reset-credits-count {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.usage-reset-credit-row {
  border-top: 1px solid color-mix(in srgb, var(--border-subtle) 52%, transparent);
}
.usage-reset-credit-label { color: var(--text-tertiary); font-size: 10px; }
.usage-reset-credit-row time {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.usage-account-message, .usage-detail-empty, .usage-feature-empty { padding: 9px; color: var(--text-secondary); font-size: 11px; }
@keyframes usage-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes usage-dialog-in {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes usage-overlay-out {
  to { opacity: 0; }
}

@keyframes usage-dialog-out {
  to {
    opacity: 0;
    transform: translateY(4px) scale(0.97);
  }
}

.usage-history-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  padding:
    calc(16px + env(safe-area-inset-top))
    calc(16px + env(safe-area-inset-right))
    calc(16px + env(safe-area-inset-bottom))
    calc(16px + env(safe-area-inset-left));
  animation: usage-overlay-in var(--motion-standard) var(--ease-out) both;
}

.usage-history-dialog {
  display: flex;
  width: min(720px, 100%);
  max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  min-height: min(360px, calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  margin: auto;
  overflow: hidden;
  flex-direction: column;
  animation: usage-dialog-in var(--motion-standard) var(--ease-out) both;
}

.usage-history-overlay.usage-overlay-exit {
  animation: usage-overlay-out var(--motion-fast) var(--ease-out) forwards;
}

.usage-history-dialog.usage-dialog-exit {
  animation: usage-dialog-out var(--motion-fast) var(--ease-out) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .usage-history-overlay,
  .usage-history-dialog,
  .usage-history-overlay.usage-overlay-exit,
  .usage-history-dialog.usage-dialog-exit {
    animation: none;
  }
}

.usage-history-body {
  min-height: 0;
  padding: 16px 20px 20px;
  overflow: auto;
  overscroll-behavior: contain;
}

.usage-history-dialog:has(.daily-token-usage) { width: min(1060px, 100%); }
.usage-history-header:has(.usage-account-tabs) { align-items: center; }
.usage-account-tabs {
  padding: 2px;
}
.usage-account-tabs > button { min-height: 26px; padding: 3px 9px; }

.daily-token-usage {
  display: grid;
  grid-template-columns: minmax(250px, 2fr) minmax(0, 3fr);
  align-items: start;
  gap: 18px;
}
@media (width > 620px) {
  .daily-token-usage:has(.daily-usage-calendar-official) { grid-template-columns: minmax(320px, 2fr) minmax(0, 3fr); }
}
.daily-token-usage-overview, .daily-token-usage-detail { display: grid; min-width: 0; gap: 12px; }
.daily-usage-calendar, .daily-usage-limits {
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-panel);
}
.daily-token-usage h3 { margin: 0; font-size: 13px; }
.daily-usage-limit { display: grid; gap: 4px; margin-top: 8px; font-size: 11px; }
.daily-usage-limit > div,
.daily-token-usage-detail-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.daily-usage-limit progress { display: block; width: 100%; height: 7px; border: 0; accent-color: var(--accent-primary); }
.daily-usage-limit progress::-webkit-progress-bar { border-radius: 999px; background: var(--surface-active); }
.daily-usage-limit progress::-webkit-progress-value { border-radius: 999px; background: var(--accent-primary); }
.daily-usage-calendar-header { display: flex; align-items: center; gap: 3px; }
.daily-usage-calendar-prev .sl-icon { transform: rotate(180deg); }
.daily-usage-calendar-today {
  margin-left: auto;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--accent-text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.daily-usage-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.daily-usage-calendar-official { container: token-calendar / inline-size; }
.daily-usage-calendar-official .daily-usage-calendar-grid { gap: 3px; margin-top: 2px; }
.daily-usage-calendar-keys {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
}
.daily-usage-calendar-weekday { padding: 3px 0; color: var(--text-secondary); text-align: center; font-size: 10px; }
.daily-usage-calendar-day, .daily-usage-calendar-scale i {
  background: var(--daily-usage-fill, var(--surface-raised));
  color: var(--text-primary);
}
.daily-usage-calendar [data-usage-level='1'] { --daily-usage-fill: color-mix(in srgb, var(--accent-primary) 15%, var(--surface-raised)); }
.daily-usage-calendar [data-usage-level='2'] { --daily-usage-fill: color-mix(in srgb, var(--accent-primary) 25%, var(--surface-raised)); }
.daily-usage-calendar [data-usage-level='3'] { --daily-usage-fill: color-mix(in srgb, var(--accent-primary) 40%, var(--surface-raised)); }
.daily-usage-calendar [data-usage-level='4'] { --daily-usage-fill: color-mix(in srgb, var(--accent-primary) 55%, var(--surface-raised)); }
.daily-usage-calendar [data-usage-level='5'] { --daily-usage-fill: color-mix(in srgb, var(--accent-primary) 65%, var(--surface-raised)); }
.daily-usage-calendar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  position: relative;
  min-height: 34px;
  padding: 2px 0;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.daily-usage-calendar-official .daily-usage-calendar-day {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 12px 12px;
  align-content: center;
  row-gap: 2px;
  min-height: 34px;
  height: 34px;
  line-height: 1;
  text-align: center;
}
.daily-usage-calendar-day time { font-weight: 650; }
.daily-usage-calendar-readings {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  white-space: nowrap;
  font-size: 10px;
}
.daily-usage-calendar-amount { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.daily-usage-calendar-separator { opacity: .7; }
.daily-usage-calendar-percent { flex: none; }
.daily-usage-calendar-compact { display: none; }
@container token-calendar (width <= 360px) {
  .daily-usage-calendar-day time { font-size: 11px; }
  .daily-usage-calendar-readings { font-size: 9.5px; }
  .daily-usage-calendar-separator { display: none; }
}
@container token-calendar (width <= 344px) {
  .daily-usage-calendar-full { display: none; }
  .daily-usage-calendar-compact { display: inline; }
}
.daily-usage-calendar-day:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 1px; }
.daily-usage-calendar-day:hover:not(:disabled) { border-color: var(--accent-primary); }
.daily-usage-calendar-day[aria-pressed='true'] { border-color: var(--overlay-surface-color); box-shadow: 0 0 0 2px var(--accent-primary); }
.daily-usage-calendar-day[aria-current='date']::after {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  content: '';
}
.daily-usage-calendar-day:disabled { color: var(--text-tertiary); opacity: .55; cursor: default; }
.daily-usage-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--overlay-divider);
  color: var(--text-secondary);
  font-size: 10px;
}
.daily-usage-calendar-scale { display: inline-flex; align-items: center; gap: 4px; }
.daily-usage-calendar-scale i { width: 11px; height: 11px; border-radius: 3px; }
.daily-usage-calendar-zone { margin-left: auto; white-space: nowrap; }
.daily-token-usage-detail { padding-left: 16px; border-left: 1px solid var(--overlay-divider); }
.daily-token-usage-detail-header h3 { font-size: 16px; }
.daily-token-usage-note, .daily-token-usage-missing { margin: 0; color: var(--text-secondary); font-size: 12px; }
.daily-token-usage-progress { display: flex; align-items: center; gap: 7px; }
.daily-token-usage-totals { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.daily-token-usage-totals > div { display: grid; align-content: start; gap: 3px; }
.daily-token-usage-totals span { color: var(--text-secondary); font-size: 11px; }
.daily-token-usage-totals strong { font-size: clamp(17px, 3vw, 25px); font-variant-numeric: tabular-nums; }
.token-usage-prediction strong { color: var(--text-secondary); }
.daily-token-usage-sessions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  max-height: clamp(180px, 42dvh, 390px);
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.daily-token-usage-hub { container-type: inline-size; }
.daily-token-usage-hub,
.daily-token-usage-hub-pending { border: 1px solid var(--overlay-divider); border-radius: var(--radius-panel); }
.daily-token-usage-hub summary,
.daily-token-usage-hub-pending {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: inherit;
  background: var(--surface-raised);
}
.daily-token-usage-hub summary { list-style: none; cursor: pointer; }
.daily-token-usage-hub summary::-webkit-details-marker { display: none; }
.daily-token-usage-hub[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.daily-token-usage-hub[open] summary .sl-icon { transform: rotate(90deg); }
.daily-token-usage-hub summary strong { overflow-wrap: anywhere; }
.daily-token-usage-hub summary span { margin-left: auto; font-weight: 650; text-align: right; }
.daily-token-usage-hub-pending { margin: 0; }
.daily-token-usage-hub-pending strong { overflow-wrap: anywhere; }
.daily-token-usage-hub-pending span { color: var(--text-secondary); }
.daily-token-usage-hub-pending .sl-icon { margin-left: auto; }
.daily-token-usage-hub table { width: 100%; border-collapse: collapse; font-size: 11px; font-variant-numeric: tabular-nums; }
.daily-token-usage-hub :is(th, td) { padding: 7px 8px; border-top: 1px solid var(--overlay-divider); text-align: right; }
.daily-token-usage-hub thead { color: var(--text-secondary); }
.daily-token-usage-hub th:first-child { width: 40%; max-width: 0; text-align: left; overflow-wrap: anywhere; }
.daily-token-usage-session-identity :is(strong, small) { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daily-token-usage-hub td { white-space: nowrap; }
.daily-token-usage-hub td span { display: none; }
.daily-token-usage-hub small { display: block; color: var(--text-secondary); font-size: 10px; font-weight: 400; }

@container (width < 530px) {
  .daily-token-usage-hub table,
  .daily-token-usage-hub tbody { display: block; }
  .daily-token-usage-hub thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .daily-token-usage-hub tbody tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px 6px;
    padding: 7px 8px;
    border-top: 1px solid var(--overlay-divider);
  }
  .daily-token-usage-hub tbody th:first-child { grid-column: 1 / -1; width: auto; max-width: none; min-width: 0; }
  .daily-token-usage-session-identity { display: flex; align-items: baseline; gap: 6px; }
  .daily-token-usage-session-identity small { flex: 0 1 auto; max-width: 48%; }
  .daily-token-usage-hub tbody :is(th, td) { padding: 0; border: 0; text-align: left; }
  .daily-token-usage-hub td { overflow: hidden; text-overflow: ellipsis; }
  .daily-token-usage-hub td span { display: inline; color: var(--text-secondary); }
}

@media (max-width: 620px) {
  .usage-history-header:has(.usage-account-tabs) { gap: 6px; padding-inline: 10px 6px; }
  .usage-history-header:has(.usage-account-tabs) .overlay-title { font-size: 14px; line-height: 18px; }
  .usage-history-header:has(.usage-account-tabs) .overlay-header-actions { gap: 4px; }
  .usage-account-tabs > button { padding-inline: 6px; }
  .usage-history-body:has(.daily-token-usage) { padding: 10px 12px 14px; }
  .daily-token-usage { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .daily-token-usage-detail { padding: 0; border-left: 0; }
  .daily-token-usage-calendar-day { min-height: 36px; }
}

@media (max-width: 380px) {
  .usage-history-body:has(.daily-usage-calendar-official) { padding-inline: 8px; }
  .daily-usage-calendar-official { padding-inline: 4px; }
  .daily-usage-calendar-official .daily-usage-calendar-grid { column-gap: 2px; }
}

@media (pointer: coarse) {
  .daily-usage-calendar-official .daily-usage-calendar-day { min-height: 44px; }
}

.usage-history-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 20px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.usage-history-summary-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.usage-history-summary strong,
.usage-history-summary time {
  color: var(--text-primary);
}

.usage-history-summary strong {
  font-size: 18px;
  font-weight: 650;
}

.usage-history-note {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 11px;
  text-wrap: pretty;
}

.usage-history-chart,
.usage-history-chart-loading {
  width: 100%;
  height: 300px;
  margin-top: 14px;
}

.usage-history-chart-loading {
  display: grid;
  place-items: center;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
}

.usage-history-loading,
.usage-history-empty,
.usage-history-error {
  display: grid;
  min-height: 280px;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.usage-history-loading-copy {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.usage-history-loading-copy span,
.usage-history-empty p,
.usage-history-error p {
  max-width: 420px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  text-wrap: pretty;
}

.usage-history-skeleton {
  display: grid;
  width: min(420px, 72vw);
  margin-top: 22px;
  gap: 10px;
}

.usage-history-skeleton span {
  height: 10px;
  border-radius: var(--radius-control);
  background: var(--surface-raised);
}

.usage-history-skeleton span:nth-child(2) {
  width: 82%;
}

.usage-history-skeleton span:nth-child(3) {
  width: 64%;
}

.usage-history-empty,
.usage-history-error {
  gap: 8px;
}

.usage-history-error strong {
  color: var(--state-danger);
}

@media (max-width: 620px) {
  .usage-history-overlay {
    padding:
      calc(8px + env(safe-area-inset-top))
      calc(8px + env(safe-area-inset-right))
      calc(8px + env(safe-area-inset-bottom))
      calc(8px + env(safe-area-inset-left));
  }

  .usage-history-dialog {
    max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
}

.deepseek-usage-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.deepseek-usage-months { display: inline-flex; align-items: center; gap: 6px; }
.deepseek-usage-month-label {
  min-width: 64px;
  color: var(--text-secondary);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.deepseek-usage-toolbar-side { display: inline-flex; align-items: center; gap: 6px; }
.deepseek-usage-updated {
  color: var(--text-tertiary);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.deepseek-usage-login input:focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: 2px;
}
.session-token-usage-chart { width: 100%; height: 290px; min-width: 0; }
.session-token-usage-note { color: var(--text-secondary); font-size: 11px; line-height: 1.6; margin: 12px 0 0; }
.session-token-usage-details { margin-top: 14px; font-size: 12px; }
.session-token-usage-details summary { cursor: pointer; color: var(--text-secondary); }
.session-token-usage-table-wrap { overflow: auto; max-height: 260px; margin-top: 10px; }
.session-token-usage-details table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; white-space: nowrap; }
.session-token-usage-details th, .session-token-usage-details td { padding: 8px; text-align: right; border-bottom: 1px solid var(--border-subtle); }
.session-token-usage-details th:first-child { text-align: left; }

.deepseek-usage-summary {
  display: grid;
  margin-bottom: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.session-token-usage-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 0;
  padding-block: 12px;
  margin-bottom: 14px;
  border-block: 1px solid var(--border-subtle);
}
.session-token-usage-summary > span { display: grid; gap: 4px; min-width: 0; padding-inline: 12px; }
.session-token-usage-summary > span + span { border-inline-start: 1px solid var(--border-subtle); }
.session-token-usage-summary em { color: var(--text-secondary); font-size: 11px; font-style: normal; }
.session-token-usage-summary strong { font-size: clamp(16px, 3vw, 22px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.session-token-usage-chart-title { margin: 0 0 10px; font-size: 13px; }
.deepseek-usage-summary > span {
  display: flex;
  min-width: 0;
  padding: 8px 10px;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
}
.deepseek-usage-summary strong {
  overflow: hidden;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deepseek-usage-summary em {
  color: var(--text-tertiary);
  font-size: 10px;
  font-style: normal;
}
.deepseek-usage-banner {
  display: flex;
  margin-bottom: 12px;
  padding: 9px 12px;
  flex-direction: column;
  gap: 4px;
  border: 1px solid;
  border-radius: var(--radius-control);
  font-size: 11px;
}
.deepseek-usage-banner.tone-warning {
  border-color: color-mix(in srgb, var(--state-warning) 45%, transparent);
  background: color-mix(in srgb, var(--state-warning) 8%, transparent);
  color: var(--state-warning);
}
.deepseek-usage-banner.tone-danger {
  border-color: color-mix(in srgb, var(--state-danger) 45%, transparent);
  background: color-mix(in srgb, var(--state-danger) 8%, transparent);
  color: var(--state-danger);
}
.deepseek-usage-banner p { margin: 0; color: var(--text-secondary); }
.deepseek-usage-login {
  display: grid;
  max-width: 420px;
  margin: 0 auto;
  padding: 16px;
  gap: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-panel);
}
.deepseek-usage-login > strong { font-size: 13px; }
.deepseek-usage-login > p { margin: 0; color: var(--text-secondary); font-size: 11px; }
.deepseek-usage-login a { color: var(--accent-text); }
.deepseek-usage-login label { display: grid; color: var(--text-secondary); font-size: 11px; gap: 4px; }
.deepseek-usage-login input {
  box-sizing: border-box;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  color: var(--text-primary);
  font: inherit;
}
.deepseek-usage-login-error { margin: 0; color: var(--state-danger); font-size: 11px; }
@media (max-width: 620px) {
  .deepseek-usage-summary { grid-template-columns: 1fr; }
  .session-token-usage-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .session-token-usage-summary > span:nth-child(3) { border-inline-start: 0; }
}

/* Status metrics share the same capsule tokens as the workspace actions. */
.chat-status-host { position: relative; flex: none; pointer-events: none; }
.chat-status-capsule {
  display: flex; align-items: center; width: max-content; gap: 4px;
  height: var(--chat-action-group-height, 32px); padding: 2px 4px;
  border-radius: var(--chat-action-group-radius, 16px);
  background: var(--chat-action-group-background);
  box-shadow: var(--chat-action-group-shadow);
  color: var(--text-secondary); pointer-events: auto;
}
.chat-status-group { display: flex; align-items: center; gap: 2px; }
.chat-status-metric {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-width: 0; height: var(--chat-action-control-size, 28px); gap: 3px; padding: 0 4px;
  border: 0; border-radius: 999px; background: none; color: var(--text-secondary);
  font: inherit; font-size: 12px; font-weight: 500; line-height: 16px; font-variant-numeric: tabular-nums; white-space: nowrap;
}
button.chat-status-metric { cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  button.chat-status-metric:hover { background: var(--hover); color: var(--text-primary); }
}
.chat-status-metric > span:last-child { min-width: 0; text-align: center; }
.chat-status-metric > .sl-icon, .chat-status-metric > img, .chat-status-metric > .agent-icon { width: 12px; height: 12px; flex: none; }
.chat-status-metric.tone-warning { color: var(--state-warning); }
.chat-status-metric.tone-danger { color: var(--state-danger); }
.chat-status-capsule[hidden], .chat-status-group[hidden], .chat-status-metric[hidden] { display: none; }
.chat-monitor-panel { width: 460px; }
.chat-monitor-panel > .chat-monitor-body { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.chat-monitor-header.overlay-header { display: grid; grid-template-columns: minmax(0, 1fr) auto 1fr; }
.chat-monitor-header > .segmented-control { grid-column: 2; }
.chat-monitor-header .overlay-header-actions { grid-column: 3; justify-self: end; }
.chat-monitor-header .monitor-actions { gap: inherit; }
.chat-monitor-header .segmented-control > button { min-width: 54px; }
.chat-monitor-close-icon { transform: scale(1.5); stroke-width: 1; }
.chat-monitor-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-top: 4px; }
.chat-monitor-body .monitor-body { max-height: none; overflow: visible; }
.chat-composer-tasks { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.chat-composer-tasks:empty { display: none; }
.chat-composer-tasks > :is(.chat-goal-surface, .chat-plan-surface) { margin: 0; width: 100%; }
.chat-composer-tasks .chat-goal-surface.mobile { border-radius: 16px; box-shadow: none; }
.chat-composer-tasks .chat-plan-compact-trigger { min-height: 30px; box-shadow: none; }
.chat-composer-tasks .chat-goal-compact-trigger { min-height: 30px; }
.chat-composer-tasks .chat-plan-surface.mobile.expanded { border-radius: 16px; box-shadow: none; }
.chat-composer-tasks :is(.chat-plan-current, .chat-goal-compact-objective) { text-overflow: clip; mask-image: linear-gradient(to right, #000 calc(100% - 16px), transparent); }

.plan-steps-list.compact .chat-plan-step-content {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-steps-list.detail .chat-plan-step-content {
  white-space: normal;
}

.plan-steps-list.detail .chat-plan-step.in-progress .chat-plan-step-content {
  color: var(--text-primary);
}

.model-efficiency-simple-list {
  display: grid;
  container-type: inline-size;
  gap: 6px;
  padding: 2px 4px 6px;
}

.model-benchmark-source {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 8px 6px;
  color: var(--text-secondary);
  font-size: 11px;
}

.model-benchmark-source select {
  flex: 1;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--surface-raised);
  color: var(--text-primary);
  font: inherit;
}

.model-benchmark-attribution,
.model-benchmark-warning {
  padding: 0 8px 6px;
  color: var(--text-tertiary);
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.model-benchmark-warning {
  color: var(--text-secondary);
}

.model-efficiency-tabs {
  width: calc(100% - 16px);
  margin: 2px 8px 6px;
  min-width: 0;
  flex-shrink: 0;
}

.model-efficiency-pending {
  grid-column: 1 / -1;
  align-self: center;
  color: var(--text-tertiary);
  font-size: 10px;
}

.model-efficiency-brand-title {
  margin: 0 0 1px;
  padding: 0 4px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
}

.model-efficiency-brand-group + .model-efficiency-brand-group {
  padding-top: 6px;
  border-top: 1px solid color-mix(in srgb, var(--border-subtle) 55%, transparent);
}

.model-efficiency-family-row {
  display: grid;
  grid-template-columns: clamp(72px, 20%, 88px) minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
  padding: 2px 4px;
  border-radius: 4px;
}

@media (hover: hover) {
  .model-efficiency-family-row:hover {
    background: var(--hover);
  }
}

.model-efficiency-family-heading {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 0;
}

.model-efficiency-family-name {
  min-width: 0;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.model-efficiency-family-recommendations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.model-efficiency-recommendation {
  display: grid;
  grid-template-areas:
    'score effort'
    'score meta';
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 4px;
  min-height: 28px;
  min-width: 0;
  line-height: 1.3;
}

.model-efficiency-effort {
  grid-area: effort;
  min-width: 0;
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-efficiency-score {
  grid-area: score;
  align-self: center;
  padding-left: 0;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 19px;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-overflow: clip;
  white-space: nowrap;
}

.model-efficiency-score-trigger {
  grid-area: score;
  align-self: center;
  display: inline-flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 1px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: help;
}

.model-efficiency-score-marker {
  align-self: flex-start;
  color: var(--text-tertiary);
  font-size: 9px;
  line-height: 1;
}

.model-efficiency-recommendation:first-child .model-efficiency-score:not(.model-efficiency-score-insufficient) {
  color: color-mix(in srgb, var(--accent-primary) 72%, var(--text-primary));
}

.model-efficiency-score-insufficient {
  color: var(--text-tertiary);
}

.model-efficiency-meta {
  grid-area: meta;
  display: flex;
  min-width: 0;
  overflow: hidden;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  color: var(--text-tertiary);
}

.model-efficiency-meta span {
  min-width: 0;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.model-efficiency-meta .model-efficiency-meta-separator {
  color: var(--text-tertiary);
}

@container (max-width: 360px) {
  .model-efficiency-recommendation {
    grid-template-areas: 'score' 'effort' 'meta';
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
  }
  .model-efficiency-recommendation .model-efficiency-score {
    text-align: left;
  }
  .model-efficiency-score-trigger {
    justify-content: flex-start;
  }
}

.model-efficiency-state {
  display: grid;
  min-height: 116px;
  padding: 14px;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 11px;
  text-align: center;
}

.model-efficiency-state.error { color: var(--state-danger); }
.model-efficiency-state button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 80%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-raised) 72%, transparent);
  color: var(--text-primary);
  cursor: pointer;
}

.model-efficiency-skeleton {
  display: grid;
  gap: 8px;
  padding: 8px 9px 9px;
}

.model-efficiency-skeleton-row {
  display: grid;
  grid-template-columns: clamp(72px, 20%, 88px) repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.model-efficiency-skeleton-family-label {
  display: block;
  height: 14px;
  margin-top: 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--text-secondary) 12%, transparent);
}

.model-efficiency-skeleton-rail {
  display: block;
  height: 43px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--text-secondary) 14%, transparent);
  animation: model-efficiency-skeleton-breathe 1.6s var(--ease-standard) infinite;
}

@keyframes model-efficiency-skeleton-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
  .model-efficiency-skeleton-rail {
    animation: none;
  }
}

.markdown-preview [data-source-line-target='true'] {
  background: color-mix(in srgb, var(--accent-primary) 14%, transparent);
  outline: 1px solid color-mix(in srgb, var(--accent-primary) 38%, transparent);
  outline-offset: 3px;
  border-radius: 4px;
}

.code-wrap [data-line-number].wm-line-target {
  background: color-mix(in srgb, var(--accent-primary) 14%, transparent);
}

.markdown-preview {
  padding: 12px 14px 18px;
  -webkit-user-select: text;
  user-select: text;
}

.markdown-preview blockquote {
  margin: 0 0 12px 0;
}

.markdown-preview .wm-shiki-code {
  white-space: normal;
}

.markdown-preview .code-wrap {
  margin: 10px 0 12px;
}

.markdown-preview .katex-display {
  margin: 8px 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.markdown-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.preview-workbench-surface .markdown-preview {
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
  padding: 24px 28px 32px;
  overflow-wrap: anywhere;
}

.html-preview {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.html-preview-frame {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

.preview-workbench-rendered-tab > .html-preview {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

.wiki-preview {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-workspace-content);
}

.wiki-preview > .wiki-preview-page-actions {
  position: absolute;
  top: 8px;
  right: 12px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-workspace-content);
}

.wiki-preview > .wiki-preview-toolbar-tools {
  position: absolute;
  top: 8px;
  right: 64px;
  z-index: 2;
  display: flex;
}

.wiki-preview-frame {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: var(--surface-workspace-content);
}

.wiki-preview.is-unavailable {
  background: var(--surface-workspace-content);
}

.wiki-preview.is-unavailable > .chat-file-workbench-empty {
  flex: 1;
}

.preview-workbench-rendered-tab > .wiki-preview {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

.chat-share-capture-host {
  position: fixed;
  top: 0;
  left: -10000px;
  width: max-content;
  max-width: none;
  pointer-events: none;
  z-index: -1;
}

.chat-share-capture-surface {
  max-width: none;
}

.markdown-html-export-host {
  position: fixed;
  top: 0;
  left: -10000px;
  width: 800px;
  max-width: none;
  pointer-events: none;
  z-index: -1;
}

.markdown-html-export-surface {
  box-sizing: border-box;
  width: 100%;
  padding: 0;
}

.mermaid-block {
  position: relative;
  margin: 10px 0 12px;
  padding: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface-panel);
  overflow: auto;
  overscroll-behavior: auto;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}

.mermaid-block.is-dragging {
  cursor: grabbing;
}

.mermaid-expand-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 82%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-panel) 88%, transparent);
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0.82;
}

.mermaid-expand-button:hover {
  background: var(--surface-panel);
  color: var(--text-primary);
  opacity: 1;
}

.mermaid-expand-button:focus-visible {
  opacity: 1;
}

.mermaid-viewport {
  min-width: 100%;
  min-height: 100%;
  transform-origin: 0 0;
  will-change: transform;
}

.mermaid-modal-viewport {
  min-width: 100%;
  min-height: 100%;
  transform-origin: 0 0;
  will-change: transform;
}

.mermaid-viewport svg,
.mermaid-modal-viewport svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.mermaid-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--layer-workspace-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.mermaid-modal-dialog {
  display: flex;
  flex-direction: column;
  width: min(1440px, 100%);
  height: min(900px, 100%);
  min-width: 0;
  min-height: 0;
  overflow: hidden;

}

.mermaid-modal-toolbar .mermaid-download-button {
  width: auto;
  min-width: 34px;
  padding-inline: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.mermaid-download-error {
  padding: 6px 12px;
  color: var(--state-danger);
  font-size: 12px;
}

.mermaid-modal-canvas {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 20px;
  background: var(--surface-workspace-content);
  overscroll-behavior: contain;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.mermaid-modal-canvas.is-dragging {
  cursor: grabbing;
}

.mermaid-error {
  margin: 10px 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(244, 135, 113, 0.35);
  background: rgba(244, 135, 113, 0.1);
  color: var(--state-danger);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 12px;
}

.chat-main-message .wm-shiki-code {
  white-space: normal;
}

.chat-main-message .code-wrap {
  margin: 6px 0 8px;
}

.chat-main-message .katex-display {
  margin: 8px 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.code-wrap {
  display: block;
  width: 100%;
  min-width: 100%;
  padding: 0;
}

/* Framed code block: one continuous card — header and body share the frame
   surface (the pre background is transparent under the auto code theme). */
.code-frame {
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface-panel);
  overflow: hidden;
}

.code-frame-header {
  font-family: var(--font-ui);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 8px 0 14px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 24px;
  -webkit-user-select: none;
  user-select: none;
}

.code-frame-language {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-frame-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.code-frame-copy:hover {
  background: rgba(127, 127, 127, 0.16);
  color: var(--text-primary);
}

.code-frame-body {
  padding: 6px 14px 12px;
}

.code-frame .code-wrap {
  margin: 0;
}

.markdown-preview .code-frame {
  margin: 10px 0 12px;
}

.chat-main-message .code-frame {
  margin: 6px 0 8px;
}

.diff-inline .wm-shiki-pre,
.diff-inline .wm-shiki-code {
  min-width: 100%;
}

.diff-inline .wm-shiki-diff-gutter {
  display: grid;
  grid-template-columns: 3.2em 3.2em;
  column-gap: 0.2em;
  align-items: center;
  padding: 0 0.45em 0 0.25em;
  border-right: 1px solid rgba(127, 127, 127, 0.22);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  color: var(--text-secondary);
  background: transparent;
}

.diff-inline .wm-shiki-diff-gutter .wm-shiki-line-number {
  min-width: 0;
  padding: 0;
  text-align: right;
  opacity: 0.75;
  color: var(--text-secondary);
}

.diff-inline .wm-shiki-diff-marker {
  display: none;
}

.diff-inline .wm-shiki-diff-marker-added {
  color: #2ea043;
}

.diff-inline .wm-shiki-diff-marker-removed {
  color: var(--state-danger);
}

.diff-inline .wm-shiki-diff-marker-context {
  color: transparent;
}

.diff-inline .wm-shiki-diff-line[data-line-kind='added'] {
  background: rgba(46, 160, 67, 0.16);
}

.diff-inline .wm-shiki-diff-line[data-line-kind='removed'] {
  background: rgba(248, 81, 73, 0.16);
}

.diff-inline .wm-shiki-diff-line[data-line-kind='empty'] {
  background: rgba(127, 127, 127, 0.06);
}
.theme-light .diff-inline .wm-shiki-diff-line[data-line-kind='added'] {
  background: rgba(46, 160, 67, 0.1);
}

.theme-light .diff-inline .wm-shiki-diff-line[data-line-kind='removed'] {
  background: rgba(207, 34, 46, 0.1);
}

.theme-light .diff-inline .wm-shiki-diff-line[data-line-kind='empty'] {
  background: rgba(127, 127, 127, 0.04);
}

.diff-inline .wm-shiki-diff-line[data-separator='hunk'],
.diff-inline .wm-shiki-diff-line[data-separator='file'] {
  position: relative;
  border-top: 1px dashed rgba(127, 127, 127, 0.45);
  border-bottom: 1px dashed rgba(127, 127, 127, 0.45);
  background: linear-gradient(
    90deg,
    rgba(127, 127, 127, 0.1),
    rgba(127, 127, 127, 0.04)
  );
}

.diff-inline .wm-shiki-diff-line[data-separator='hunk'] .wm-shiki-line-content,
.diff-inline .wm-shiki-diff-line[data-separator='file'] .wm-shiki-line-content {
  color: var(--text-secondary);
  font-style: italic;
  letter-spacing: 0.03em;
}

.diff-inline .wm-shiki-diff-line[data-separator='hunk'] .wm-shiki-diff-gutter,
.diff-inline .wm-shiki-diff-line[data-separator='file'] .wm-shiki-diff-gutter {
  opacity: 0.45;
}

.diff-inline .wm-shiki-diff-line[data-separator='file'] {
  border-top-width: 2px;
  border-bottom-width: 2px;
}

.diff-side-by-side .wm-shiki-side-by-side {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: var(--text-primary);
  background: var(--surface-workspace-content);
  white-space: normal;
}

.diff-side-by-side .wm-shiki-diff-side-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-width: 0;
}

.diff-side-by-side .wm-shiki-diff-side-cell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  min-width: 0;
  min-height: 1.5em;
  border-bottom: 1px solid rgba(127, 127, 127, 0.08);
}

.diff-side-by-side .wm-shiki-diff-side-cell[data-diff-side='left'] {
  border-right: 1px solid rgba(127, 127, 127, 0.28);
}

.diff-side-by-side .wm-shiki-diff-side-gutter {
  display: grid;
  grid-template-columns: 1.5em 3.8em;
  align-items: center;
  min-height: 1.5em;
  padding: 0 0.45em 0 0.25em;
  color: var(--text-secondary);
  background: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.diff-side-by-side .wm-shiki-diff-side-gutter-marker {
  grid-template-columns: 1.5em;
}

.diff-side-by-side .wm-shiki-diff-marker {
  text-align: center;
  color: transparent;
}

.diff-side-by-side .wm-shiki-diff-marker-added {
  color: #2ea043;
}

.diff-side-by-side .wm-shiki-diff-marker-removed {
  color: var(--state-danger);
}

.diff-side-by-side .wm-shiki-line-number {
  min-width: 0;
  text-align: right;
  opacity: 0.75;
  color: var(--text-secondary);
}

.diff-side-by-side .wm-shiki-line-content {
  display: block;
  min-width: 0;
  padding: 0 0.75em;
  white-space: pre-wrap;
  tab-size: inherit;
  font: inherit;
  overflow-wrap: anywhere;
}

.diff-side-by-side .wm-shiki-diff-side-added {
  background: rgba(46, 160, 67, 0.16);
}

.diff-side-by-side .wm-shiki-diff-side-removed {
  background: rgba(248, 81, 73, 0.16);
}

.diff-side-by-side .wm-shiki-diff-side-empty {
  background: rgba(127, 127, 127, 0.06);
}

.diff-side-by-side .wm-shiki-diff-side-separator {
  grid-column: 1 / -1;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 0.2em 0.75em;
  border-top: 1px dashed rgba(127, 127, 127, 0.45);
  border-bottom: 1px dashed rgba(127, 127, 127, 0.45);
  color: var(--text-secondary);
  background: linear-gradient(
    90deg,
    rgba(127, 127, 127, 0.1),
    rgba(127, 127, 127, 0.04)
  );
  font-style: italic;
  letter-spacing: 0.03em;
}

.diff-side-by-side .wm-shiki-diff-side-separator[data-separator='file'] {
  border-top-width: 2px;
  border-bottom-width: 2px;
}

.theme-light .diff-side-by-side .wm-shiki-diff-side-added {
  background: rgba(46, 160, 67, 0.1);
}

.theme-light .diff-side-by-side .wm-shiki-diff-side-removed {
  background: rgba(207, 34, 46, 0.1);
}

.theme-light .diff-side-by-side .wm-shiki-diff-side-empty {
  background: rgba(127, 127, 127, 0.04);
}

@media (width < 900px) {
  .chat-config-options {
    width: auto;
  }

  .chat-config-item {
    flex: 0 1 auto;
    min-width: 0;
  }

  .chat-config-pill {
    max-width: 112px;
  }

  .diff-inline .wm-shiki-diff-gutter {
    grid-template-columns: 2.8em 2.8em;
  }
}

.content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.block-title {
  height: 32px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 0 auto;
}

.block-title.with-tools {
  justify-content: space-between;
  gap: 10px;
}

.desktop-shell .workspace-right .block-title {
  background: var(--desktop-top-surface);
}

.desktop-shell[data-desktop-window-controls='true'] .workspace-right .block-title {
  padding-right: calc(var(--desktop-window-controls-width) + 10px);
}

.desktop-shell > .chat-title-bar {
  padding-right: calc(var(--chat-window-controls-reserve, 0px) + 8px);
  gap: 0;
}

.desktop-shell[data-desktop-window-controls='true'] > .chat-title-bar {
  --chat-window-controls-reserve: var(--desktop-window-controls-width);
}

.title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */

/**
 *  Default styles for xterm.js
 */

.xterm {
    cursor: text;
    position: relative;
    user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
}

.xterm.focus,
.xterm:focus {
    outline: none;
}

.xterm .xterm-helpers {
    position: absolute;
    top: 0;
    /**
     * The z-index of the helpers must be higher than the canvases in order for
     * IMEs to appear on top.
     */
    z-index: 5;
}

.xterm .xterm-helper-textarea {
    padding: 0;
    border: 0;
    margin: 0;
    /* Move textarea out of the screen to the far left, so that the cursor is not visible */
    position: absolute;
    opacity: 0;
    left: -9999em;
    top: 0;
    width: 0;
    height: 0;
    z-index: -5;
    /** Prevent wrapping so the IME appears against the textarea at the correct position */
    white-space: nowrap;
    overflow: hidden;
    resize: none;
}

.xterm .composition-view {
    /* TODO: Composition position got messed up somewhere */
    background: #000;
    color: #FFF;
    display: none;
    position: absolute;
    white-space: nowrap;
    z-index: 1;
}

.xterm .composition-view.active {
    display: block;
}

.xterm .xterm-viewport {
    /* On OS X this is required in order for the scroll bar to appear fully opaque */
    background-color: #000;
    overflow-y: scroll;
    cursor: default;
    position: absolute;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
}

.xterm .xterm-screen {
    position: relative;
}

.xterm .xterm-screen canvas {
    position: absolute;
    left: 0;
    top: 0;
}

.xterm-char-measure-element {
    display: inline-block;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: -9999em;
    line-height: normal;
}

.xterm.enable-mouse-events {
    /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
    cursor: default;
}

.xterm.xterm-cursor-pointer,
.xterm .xterm-cursor-pointer {
    cursor: pointer;
}

.xterm.column-select.focus {
    /* Column selection mode */
    cursor: crosshair;
}

.xterm .xterm-accessibility:not(.debug),
.xterm .xterm-message {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 10;
    color: transparent;
    pointer-events: none;
}

.xterm .xterm-accessibility-tree:not(.debug) *::selection {
  color: transparent;
}

.xterm .xterm-accessibility-tree {
  font-family: monospace;
  user-select: text;
  white-space: pre;
}

.xterm .xterm-accessibility-tree > div {
  transform-origin: left;
  width: fit-content;
}

.xterm .live-region {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.xterm-dim {
    /* Dim should not apply to background, so the opacity of the foreground color is applied
     * explicitly in the generated class and reset to 1 here */
    opacity: 1 !important;
}

.xterm-underline-1 { text-decoration: underline; }
.xterm-underline-2 { text-decoration: double underline; }
.xterm-underline-3 { text-decoration: wavy underline; }
.xterm-underline-4 { text-decoration: dotted underline; }
.xterm-underline-5 { text-decoration: dashed underline; }

.xterm-overline {
    text-decoration: overline;
}

.xterm-overline.xterm-underline-1 { text-decoration: overline underline; }
.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }
.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }
.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }
.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }

.xterm-strikethrough {
    text-decoration: line-through;
}

.xterm-screen .xterm-decoration-container .xterm-decoration {
	z-index: 6;
	position: absolute;
}

.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {
	z-index: 7;
}

.xterm-decoration-overview-ruler {
    z-index: 8;
    position: absolute;
    top: 0;
    right: 0;
    pointer-events: none;
}

.xterm-decoration-top {
    z-index: 2;
    position: relative;
}



/* Derived from vs/base/browser/ui/scrollbar/media/scrollbar.css */

/* xterm.js customization: Override xterm's cursor style */
.xterm .xterm-scrollable-element > .scrollbar {
    cursor: default;
}

/* Arrows */
.xterm .xterm-scrollable-element > .scrollbar > .scra {
	cursor: pointer;
	font-size: 11px !important;
}

.xterm .xterm-scrollable-element > .visible {
	opacity: 1;

	/* Background rule added for IE9 - to allow clicks on dom node */
	background:rgba(0,0,0,0);

	transition: opacity 100ms linear;
	/* In front of peek view */
	z-index: 11;
}
.xterm .xterm-scrollable-element > .invisible {
	opacity: 0;
	pointer-events: none;
}
.xterm .xterm-scrollable-element > .invisible.fade {
	transition: opacity 800ms linear;
}

/* Scrollable Content Inset Shadow */
.xterm .xterm-scrollable-element > .shadow {
	position: absolute;
	display: none;
}
.xterm .xterm-scrollable-element > .shadow.top {
	display: block;
	top: 0;
	left: 3px;
	height: 3px;
	width: 100%;
	box-shadow: var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset;
}
.xterm .xterm-scrollable-element > .shadow.left {
	display: block;
	top: 3px;
	left: 0;
	height: 100%;
	width: 3px;
	box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
}
.xterm .xterm-scrollable-element > .shadow.top-left-corner {
	display: block;
	top: 0;
	left: 0;
	height: 3px;
	width: 3px;
}
.xterm .xterm-scrollable-element > .shadow.top.left {
	box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
}

.terminal-workbench {
  flex: 1 1 auto;
}

.terminal-workspace-error {
  flex: 0 0 auto;
  padding: 6px 8px;
  color: var(--state-danger);
}

.terminal-status {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

.terminal-status.running { background: var(--state-success); }
.terminal-status.exited { background: var(--text-tertiary); }
.terminal-status.error { background: var(--state-danger); }
.terminal-status.unavailable { background: var(--state-danger); }

.terminal-more {
  position: relative;
  display: flex;
}

.terminal-content,
.terminal-xterm-surface,
.terminal-xterm-host {
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.terminal-content { position: relative; padding: 0; overflow: hidden; }

.terminal-remote-desktop {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.terminal-remote-desktop[hidden],
.remote-desktop-stage[hidden] { display: none; }

.remote-desktop-stage {
  flex: 1 1 0;
  min-height: 0;
  background: #111;
}

.remote-desktop-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
}

.remote-desktop-card {
  display: grid;
  align-content: start;
  gap: 12px;
  width: min(100%, 360px);
  padding: 16px;
  margin: 0 auto;
  max-height: 100%;
  overflow: auto;
}

.remote-desktop-card form,
.remote-desktop-card label {
  display: grid;
  gap: 6px;
}

.remote-desktop-card form { gap: 12px; }
.remote-desktop-login-actions {
  display: grid;
  gap: 8px;
}
.remote-desktop-card .remote-desktop-remember {
  display: flex;
  align-items: center;
  gap: 8px;
}
.remote-desktop-card h2,
.remote-desktop-card p { margin: 0; }

.remote-desktop-card input,
.remote-desktop-card button,
.remote-desktop-keyboard {
  min-width: 0;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: inherit;
  font: inherit;
  background: var(--surface-2);
}

.remote-desktop-card button:disabled { opacity: 0.6; }
.remote-desktop-picker button { text-align: start; }
.remote-desktop-picker button span {
  display: block;
  font-size: 0.85em;
  color: var(--text-secondary);
}
.remote-desktop-tools { align-items: center; }
.remote-desktop-keyboard { flex: 0 0 auto; resize: none; }
.terminal-xterm-surface {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
}
/* TerminalView sets --wm-terminal-bg to the active theme background so the
   sub-cell remainder below the rendered rows blends with the cells instead of
   exposing the viewport's hardcoded black, which otherwise shows as a black bar
   that grows while resizing. */
.terminal-xterm-host {
  width: 100%;
  height: 100%;
  background-color: var(--wm-terminal-bg);
  touch-action: none;
  overscroll-behavior: contain;
}
/* Override xterm's viewport black; equal specificity but lands later because
   terminal.css @imports the xterm stylesheet, so this wins. */
.terminal-xterm-host .xterm-viewport {
  background-color: var(--wm-terminal-bg);
}
.terminal-xterm-host .xterm { height: 100%; }
.terminal-copy-context-menu {
  position: fixed;
  z-index: 120;
  min-width: 112px;
  padding: 4px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface-overlay);
  box-shadow: var(--shadow-overlay);
  transform-origin: top left;
  animation: sl-menu-in var(--motion-fast) var(--ease-out);
}
.terminal-copy-context-menu.sl-menu-exit {
  /* Keep the portal mounted for the shared motion-exit duration. */
  animation: sl-menu-out var(--motion-exit) var(--ease-out) forwards;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .terminal-copy-context-menu {
    animation: none;
  }
}
.terminal-copy-context-menu button {
  appearance: none;
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 4px;
  color: var(--text-primary);
  background: transparent;
  cursor: pointer;
}
.terminal-copy-context-menu button:hover,
.terminal-copy-context-menu button:focus-visible {
  background: var(--hover);
  outline: none;
}
.terminal-empty { padding: 24px; color: var(--text-tertiary); }

.terminal-keybar {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 6px 6px calc(6px + var(--wm-safe-area-bottom));
  overflow-x: auto;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-sidebar);
}

.terminal-keybar button {
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  color: var(--text-primary);
  background: var(--surface-raised);
}

.terminal-keybar button[aria-pressed='true'] {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 30%, var(--surface-raised));
}

.chat-hub-workbench-content {
  display: contents;
}
.chat-hub-local-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.chat-hub-local-label {
  display: inline-block;
  flex-shrink: 0;
  padding: 1px 4px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
}
.chat-hub-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.chat-hub-workbench.is-managing {
  grid-template-columns: var(--management-rail-width) minmax(0, 1fr);
}
.chat-hub-workbench .chat-hub-overview,
.chat-hub-workbench-mobile .chat-hub-overview {
  width: auto;
  min-width: 0;
  max-width: none;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.app-toolbar-root:has(.app-toolbar-destination-title) {
  flex: 1;
}
.app-toolbar-destination-title {
  flex: 1;
  margin-left: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.chat-hub-overview-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 10px;
}
.chat-hub-overview-row {
  position: relative;
  padding: 10px 4px;
  border-top: 1px solid var(--border-subtle);
}
.chat-hub-overview-row:first-child {
  border-top: 0;
}
.chat-hub-overview-heading {
  display: grid;
  isolation: isolate;
  grid-template-columns: 24px minmax(0, 1fr) auto 28px;
  gap: 5px;
  align-items: center;
}
.chat-hub-overview-name {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-hub-connection-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.chat-hub-connection-state > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-tertiary);
}
.chat-hub-connection-state.online > span {
  background: var(--state-success);
}
.chat-hub-manage-button,
.chat-hub-overview-attention button,
.chat-hub-tabs button,
.chat-hub-detail-back {
  appearance: none;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease-out),
    color var(--motion-fast) var(--ease-out);
}
.chat-hub-manage-button {
  position: absolute;
  pointer-events: auto;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  z-index: 0;
}
.chat-hub-manage-button:is(:hover, :focus-visible) {
  background: var(--hover);
}
.chat-hub-overview-heading,
.chat-hub-overview-stats,
.chat-hub-overview-flicker,
.chat-hub-overview-attention,
.chat-hub-offline-hint {
  position: relative;
  pointer-events: none;
}
.chat-hub-overview-flicker {
  margin-left: 29px;
}
.chat-hub-overview-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 0;
  font-size: 11px;
}
.chat-hub-flicker-indicator {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-tertiary);
}
.chat-hub-flicker-indicator.running {
  background: var(--state-success);
}
.chat-hub-flicker-indicator.failed,
.chat-hub-flicker-indicator.starting {
  background: var(--state-warning);
}
.chat-hub-overview-row button:not(.chat-hub-manage-button),
.chat-hub-overview-row .chat-hub-color-palette {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}
.chat-hub-overview-restart {
  grid-column: 4;
  grid-row: 1;
  width: 28px;
  height: 28px;
}
.chat-hub-gateway-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 3px;
  padding: 1px 5px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 17px;
  white-space: nowrap;
}
.chat-hub-gateway-badge .sl-icon {
  width: 11px;
  height: 11px;
}
.chat-hub-overview-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin: 4px 0 0 29px;
}
.chat-hub-overview-stat {
  padding: 4px 0;
  font-size: 11px;
}
.chat-hub-overview-stats b {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text-primary);
  margin-left: 3px;
}
.chat-hub-overview-attention {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin-left: 29px;
}
.chat-hub-overview-stats:empty,
.chat-hub-overview-attention:empty {
  display: none;
}
.chat-hub-overview-attention button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--state-warning);
  padding: 3px 0;
  text-align: left;
}
.chat-hub-overview-attention .sl-icon {
  width: 13px;
  height: 13px;
}
.chat-hub-offline-hint {
  margin: 5px 0 0 29px;
  font-size: 11px;
  color: var(--text-tertiary);
}
.chat-hub-workbench .chat-hub-footer,
.chat-hub-workbench-mobile .chat-hub-footer {
  margin: auto 0 0;
  padding: 12px 16px;
  min-height: 50px;
  flex-shrink: 0;
  border-top: 1px solid var(--border-subtle);
}
.chat-hub-management {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-left: 1px solid var(--border-subtle);
  overflow: hidden;
}
.chat-hub-management-header {
  padding-inline: 32px;
}
.chat-hub-management-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
}
.chat-hub-management-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
}
.chat-hub-identity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hub-accent);
  flex-shrink: 0;
}
.chat-hub-runtime-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}
.chat-hub-attention-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--state-warning);
}
.chat-hub-tabs {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
  padding: 0 16px;
  min-width: 0;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}
.chat-hub-tabs button {
  position: relative;
  flex: 0 0 auto;
  padding: 0 12px;
  min-height: 40px;
  font-size: 12px;
  border-radius: 0;
  white-space: nowrap;
}
.chat-hub-tabs button[aria-selected='true'] {
  color: var(--accent-primary);
}
.chat-hub-tabs button[aria-selected='true']::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--accent-primary);
}
.chat-hub-tabs + .chat-hub-tabs button {
  font-size: 11px;
  min-height: 36px;
}
.chat-hub-management-body {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.chat-hub-module-pages {
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.chat-hub-module-page {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px 18px 20px;
}
.chat-hub-management-detail {
  position: absolute;
  inset: 0;
  background: var(--surface-panel);
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.chat-hub-detail-back {
  display: flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  min-height: 36px;
  margin: 8px 14px 0;
  padding: 0 6px;
  font-size: 12px;
}
.chat-hub-management-detail .chat-hub-skill-companion-content {
  min-height: 0;
  flex: 1;
}
.chat-hub-management .chat-hub-detail {
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.chat-hub-management .chat-hub-detail-toolbar,
.chat-hub-management .chat-hub-skill-toolbar {
  height: auto;
  min-height: 42px;
  padding: 0 0 10px;
  gap: 10px;
  flex-wrap: wrap;
}
.chat-hub-detail-status {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-tertiary);
}
.chat-hub-management .chat-hub-detail-empty,
.chat-hub-management .chat-hub-settings-hint {
  font-size: 12px;
  line-height: 1.6;
  padding: 10px 0;
}
.chat-hub-management .chat-hub-npm-row,
.chat-hub-management .chat-hub-scan-row,
.chat-hub-management .chat-hub-project-row {
  min-height: 42px;
  height: auto;
  border-radius: 0;
  border-bottom: 1px solid var(--border-subtle);
}
.chat-hub-management .chat-hub-npm-package-name,
.chat-hub-management .chat-hub-scan-name,
.chat-hub-management .chat-hub-project-name,
.chat-hub-management .chat-hub-skill-name {
  font-size: 13px;
}
.chat-hub-management .chat-hub-npm-versions {
  font-size: 11px;
}
.chat-hub-management .chat-hub-mcp-row {
  min-height: 60px;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;
}
.chat-hub-management .chat-hub-mcp-name {
  font-size: 14px;
}
.chat-hub-management .chat-hub-mcp-meta,
.chat-hub-management .chat-hub-mcp-status {
  font-size: 11px;
}
.chat-hub-management .chat-hub-mcp-form {
  gap: 14px;
}
.chat-hub-management .chat-hub-mcp-form input,
.chat-hub-management .chat-hub-mcp-form textarea,
.chat-hub-management .chat-hub-mcp-form select {
  font-size: 13px;
  min-height: 34px;
}
.chat-hub-management .chat-hub-app {
  padding: 10px 0 12px;
}
.chat-hub-management .chat-hub-app-name {
  font-size: 14px;
}
.chat-hub-management .chat-hub-app-phase,
.chat-hub-management .chat-hub-app-meta,
.chat-hub-management .chat-hub-app-status,
.chat-hub-management .chat-hub-app-endpoint,
.chat-hub-management .chat-hub-app-component,
.chat-hub-management .chat-hub-app-error {
  font-size: 12px;
}
.chat-hub-management .chat-hub-app-actions .chat-hub-action {
  width: 30px;
  height: 30px;
}
.chat-hub-management .chat-hub-app-logs pre {
  font-size: 12px;
  max-height: 300px;
}
.chat-hub-management .chat-hub-skill-row {
  min-height: 36px;
}
.chat-hub-management .chat-hub-skill-source-header {
  min-height: 38px;
}
.chat-hub-management .chat-hub-skill-source-title {
  font-size: 13px;
}
.chat-hub-management .chat-hub-settings {
  padding: 0;
}
.chat-hub-management .chat-hub-flicker-row {
  min-height: 44px;
  height: auto;
}
.chat-hub-management .chat-hub-flicker-label {
  font-size: 13px;
}
.chat-hub-management .secret-compact {
  min-height: 42px;
}
.chat-hub-management .secret-compact-label,
.chat-hub-management .secret-compact-input {
  font-size: 13px;
}
:is(.chat-hub-workbench, .chat-hub-workbench-mobile)
  button:hover:not(:disabled) {
  background: var(--hover);
  color: var(--text-primary);
}
:is(.chat-hub-workbench, .chat-hub-workbench-mobile)
  :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: 2px;
}
:is(.chat-hub-workbench, .chat-hub-workbench-mobile)
  .chat-hub-manage-button:is(:hover, :focus-visible, :active) {
  background: var(--hover);
}
:is(.chat-hub-workbench, .chat-hub-workbench-mobile)
  .chat-hub-overview-row.selected .chat-hub-manage-button:is(:hover, :focus-visible) {
  background: transparent;
}
:is(.chat-hub-workbench, .chat-hub-workbench-mobile)
  .chat-hub-manage-button:active {
  background: var(--surface-active);
}
:is(.chat-hub-workbench, .chat-hub-workbench-mobile) [hidden] {
  display: none !important;
}
.chat-hub-workbench-mobile {
  z-index: 70;
  background: var(--surface-panel);
}
.chat-hub-workbench-mobile .chat-hub-page-title {
  display: flex;
  align-items: baseline;
  text-align: left;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-hub-page-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-hub-title-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  max-width: 100%;
  min-height: 24px;
}
.chat-hub-workbench-mobile .chat-hub-title-select {
  position: absolute;
  inset: 0;
  appearance: none;
  min-width: 0;
  width: 100%;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  opacity: 0;
  cursor: pointer;
}
.chat-hub-title-select option {
  background: var(--surface-panel);
  color: var(--text-primary);
  font-size: 14px;
}
.chat-hub-title-switcher > .sl-icon {
  flex-shrink: 0;
  pointer-events: none;
  color: var(--text-secondary);
}
.chat-hub-workbench-mobile .chat-hub-page-body {
  display: flex;
  padding: 0 0 env(safe-area-inset-bottom);
  min-height: 0;
  overflow: hidden;
}
.chat-hub-workbench-mobile .chat-hub-overview {
  flex: 1;
}
.chat-hub-workbench-mobile .chat-hub-overview-heading {
  grid-template-columns: 28px minmax(0, 1fr) auto 44px;
}
.chat-hub-workbench-mobile .chat-hub-overview-restart {
  width: 44px;
  height: 44px;
}
.chat-hub-workbench-mobile .chat-hub-overview-stats {
  margin-left: 33px;
}
.chat-hub-workbench-mobile .chat-hub-overview-flicker,
.chat-hub-workbench-mobile .chat-hub-overview-attention {
  margin-left: 33px;
}
.chat-hub-workbench-mobile .chat-hub-management {
  flex: 1;
  border-left: 0;
}
.chat-hub-workbench-mobile .chat-hub-management-header {
  flex-wrap: wrap;
}
.chat-hub-workbench-mobile .chat-hub-management-identity {
  display: none;
}
.chat-hub-workbench-mobile .chat-hub-runtime-actions {
  flex: none;
}
.chat-hub-workbench-mobile .chat-hub-tabs button {
  flex: 1;
  background: transparent;
}
.chat-hub-workbench-mobile .chat-hub-mcp-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
}
.chat-hub-workbench-mobile .chat-hub-mcp-row {
  grid-template-columns: minmax(0, 1fr) auto;
}
.chat-hub-workbench-mobile .chat-hub-mcp-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}
.chat-hub-workbench-mobile .chat-hub-mcp-meta {
  white-space: normal;
  overflow-wrap: anywhere;
}
.chat-hub-workbench-mobile .chat-hub-mcp-value-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.chat-hub-workbench-mobile .chat-hub-app-row {
  grid-template-columns: minmax(0, 1fr) auto;
}
.chat-hub-workbench-mobile .chat-hub-app-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.chat-hub-workbench-mobile .chat-hub-skill-source-header {
  flex-wrap: wrap;
  height: auto;
}
.chat-hub-workbench-mobile .chat-hub-skill-source-actions {
  margin-left: auto;
}
.chat-hub-workbench-mobile .chat-hub-skill-row {
  grid-template-columns: minmax(0, 1fr) 88px;
}
.chat-hub-workbench-mobile .chat-hub-scan-row {
  grid-template-columns: minmax(0, 1fr) auto 44px;
}
.chat-hub-workbench-mobile .chat-hub-skill-name-cell {
  flex-wrap: wrap;
}
.chat-hub-workbench-mobile .secret-compact-row {
  display: flex;
  flex-wrap: wrap;
}
.chat-hub-workbench-mobile .secret-compact-label {
  flex: 1;
  min-width: calc(100% - 32px);
}
.chat-hub-workbench-mobile .chat-hub-mcp-form input[type='checkbox'] {
  width: 16px;
}
.chat-hub-workbench-mobile .secret-compact-input {
  min-width: 120px;
  flex: 1;
}
.chat-hub-overview-identity {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.chat-hub-overview-version {
  color: var(--text-tertiary);
  font-size: 11px;
  white-space: nowrap;
}
.chat-hub-connection-state.update-only {
  color: var(--state-warning);
}
.chat-hub-connection-state.update-only > span {
  background: currentColor;
}
.chat-hub-overview-attention .chat-hub-update-notice {
  color: var(--accent-primary);
}
.chat-hub-management .chat-hub-npm-row,
.chat-hub-npm-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.8fr) 68px;
  gap: 10px;
  min-height: 44px;
  padding: 0;
}
.chat-hub-npm-columns {
  align-items: center;
  color: var(--text-tertiary);
  font-size: 11px;
  min-height: 30px;
  border-bottom: 1px solid var(--border-subtle);
}
.chat-hub-npm-columns > :last-child {
  text-align: right;
}
.chat-hub-management .chat-hub-npm-package-name,
.chat-hub-management .chat-hub-npm-version-new {
  display: block;
  padding: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.chat-hub-management .chat-hub-npm-package-name {
  font-family: inherit;
  font-size: 13px;
  max-width: none;
  font-weight: 500;
}
.chat-hub-management .chat-hub-npm-agent-tag {
  width: 22px;
  height: 22px;
}
.chat-hub-management .chat-hub-npm-actions .sl-icon {
  width: 17px;
  height: 17px;
}
.chat-hub-management .chat-hub-npm-versions {
  font-size: 12px;
}
.chat-hub-management .chat-hub-npm-version-new {
  display: inline;
}
.chat-hub-management .chat-hub-npm-actions {
  position: relative;
  min-width: 0;
  gap: 4px;
}
.chat-hub-npm-actions > [role='status'] {
  position: absolute;
  right: 0;
  bottom: -5px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}
.chat-hub-workbench-mobile .chat-hub-npm-columns {
  display: none;
}
.chat-hub-workbench-mobile .chat-hub-npm-row {
  grid-template-columns: minmax(0, 1fr) 112px 64px;
}
@media (max-width: 359px) {
  .chat-hub-workbench-mobile .chat-hub-npm-row {
    grid-template-columns: minmax(0, 1fr) 64px;
  }
  .chat-hub-workbench-mobile .chat-hub-npm-versions {
    grid-column: 1;
    padding-left: 27px;
  }
  .chat-hub-workbench-mobile .chat-hub-npm-actions {
    grid-column: 2;
    grid-row: 1 / 3;
  }
  .chat-hub-workbench-mobile .chat-hub-gateway-badge .sl-icon {
    display: none;
  }
}

/* Unified Hub workspace: bounded lists, inline settings and scoped Skills. */
.chat-hub-overview-row {
  padding: 14px 8px 16px;
}
.chat-hub-overview-heading {
  min-height: 38px;
}
.chat-hub-overview-identity .chat-hub-overview-version {
  flex: none;
}
.chat-hub-service-badges {
  grid-column: 2 / -1;
  grid-row: 2;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.chat-hub-overview-heading
  > .chat-hub-connection-state.online:not(.update-only) {
  display: none;
}
.chat-hub-overview-stats {
  flex-direction: column;
  gap: 0;
  margin: 6px 0 0;
}
.chat-hub-overview-stat,
.chat-hub-overview-status {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 30px;
  padding: 3px 6px;
  font-size: 12px;
}
.chat-hub-overview-stats .sl-icon,
.chat-hub-overview-flicker .sl-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.chat-hub-overview-stats b {
  margin-left: auto;
  font-size: 12px;
}
.chat-hub-overview-flicker {
  margin-left: 0;
}
.chat-hub-overview-flicker-label {
  flex: 1;
  text-align: left;
}
.chat-hub-overview-attention {
  margin-left: 0;
  align-items: stretch;
}
.chat-hub-overview-attention button {
  gap: 10px;
  min-height: 30px;
  padding: 4px 6px;
  font-size: 12px;
}
.chat-hub-overview-attention .sl-icon {
  width: 16px;
  height: 16px;
}
.chat-hub-overview-attention button.chat-hub-update-notice {
  color: var(--text-secondary);
}
.chat-hub-footer-version-value {
  color: var(--text-secondary);
}
.chat-hub-module-page {
  padding: 24px 32px 32px;
}
.chat-hub-module-page > * {
  max-width: var(--management-content-max-width, 840px);
  margin-inline: 0;
}
.chat-hub-module-page > .chat-hub-settings-page {
  max-width: var(--management-content-max-width, 840px);
}
.chat-hub-page-heading {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 600;
}
.chat-hub-management .chat-hub-detail-toolbar {
  min-height: 44px;
}
.chat-hub-tabs button {
  min-height: 44px;
  font-size: 13px;
}
.chat-hub-settings-section {
  padding: 18px 0;
  border-top: 1px solid var(--border-subtle);
  scroll-margin-top: 12px;
}
.chat-hub-settings-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
}
.chat-hub-settings-section .chat-hub-detail-toolbar h3 {
  margin: 0;
}
.chat-hub-settings-section .chat-hub-app {
  padding: 8px 0;
}
.chat-hub-settings-section .chat-hub-app-row {
  min-height: 32px;
}
.chat-hub-settings-section .chat-hub-app-endpoint {
  overflow-wrap: anywhere;
}
.chat-api-settings {
  margin-top: 0;
}
.chat-api-endpoint {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}
.chat-api-endpoint code {
  padding: 8px 10px;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow-wrap: anywhere;
}
.chat-api-settings .chat-api-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-api-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.chat-api-key-row > div {
  min-width: 0;
}
.chat-api-key-row .chat-api-key-actions {
  flex-shrink: 0;
  margin: 0;
  gap: 2px;
}
.chat-api-key-row .chat-hub-settings-hint {
  padding: 2px 0;
}
.chat-api-key-form {
  padding: 16px 0;
  border-block: 1px solid var(--border-subtle);
}
.chat-api-key-form h4 {
  margin: 0 0 6px;
  font-size: 15px;
}
.chat-api-key-form > label {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.chat-api-key-form > .chat-api-setting-row {
  display: flex;
}
.chat-api-key-form .chat-api-key-actions {
  justify-content: flex-end;
}
.chat-hub-management
  :is(.chat-api-key-form, .chat-api-created-key)
  :is(input:not([type='checkbox']), select), .chat-hub-project-search, .chat-hub-scope-search {
  min-width: 0;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--surface-raised);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  box-sizing: border-box;
}
.chat-hub-management input[type='checkbox'] {
  accent-color: var(--accent-primary);
}
.chat-hub-project-search {
  width: 100%;
}
.chat-hub-projects-columns,
.chat-hub-projects-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px 64px;
  align-items: center;
  gap: 16px;
}
.chat-hub-projects-columns {
  min-height: 34px;
  color: var(--text-tertiary);
  font-size: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.chat-hub-projects-row {
  min-height: 72px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.chat-hub-projects-identity {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.chat-hub-projects-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-hub-projects-name-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}
.chat-hub-projects-path {
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-hub-projects-index {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: 20px;
  padding: 0 7px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--surface-raised);
  font-size: 11px;
  line-height: 18px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.chat-hub-visibility-switch {
  width: 38px;
  height: 22px;
  padding: 3px;
  border: 0;
  border-radius: 16px;
  background: var(--text-tertiary);
  cursor: pointer;
}
.chat-hub-visibility-switch span {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
}
.chat-hub-visibility-switch[aria-checked='true'] {
  background: var(--accent-primary);
}
.chat-hub-visibility-switch[aria-checked='true'] span {
  margin-left: auto;
}
.chat-hub-module-page[data-module='skills'] {
  padding: 0;
}
.chat-hub-skills-workspace {
  display: flex;
  width: 100%;
  max-width: 560px;
  min-height: 100%;
}
.chat-hub-skills-scope {
  flex: 0 0 180px;
  width: 180px;
  min-width: 0;
  padding: 16px 10px;
  border-right: 1px solid var(--border-subtle);
  box-sizing: border-box;
}
.chat-hub-skills-scope-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
}
.scope-collapsed .chat-hub-skills-scope {
  flex-basis: 44px;
  width: 44px;
  padding-inline: 6px;
}
.chat-hub-scope-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}
.chat-hub-scope-option .sl-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.chat-hub-scope-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.chat-hub-scope-option small {
  font-size: 11px;
}
.chat-hub-scope-projects-label {
  display: block;
  margin: 22px 7px 10px;
  font-size: 12px;
}
.chat-hub-scope-search {
  width: 100%;
  margin-bottom: 8px;
  font-size: 11px;
}
.chat-hub-skills-ledger {
  flex: 1;
  min-width: 0;
  padding: 20px;
}
.chat-hub-skills-mobile-scope {
  display: flex;
}
.chat-hub-workbench .chat-hub-management-detail {
  position: relative;
  inset: auto;
  flex: 1 1 0;
  max-width: none;
  min-width: 0;
  border-left: 1px solid var(--border-subtle);
}
.chat-hub-management-body {
  container-type: inline-size;
}
.chat-hub-workbench
  .chat-hub-management-body:has(.chat-hub-management-detail)
  .chat-hub-module-pages {
  flex: 0 0 calc(180px + clamp(300px, 32cqw, 380px));
}
.chat-hub-workbench
  .chat-hub-management-body:has(.chat-hub-management-detail):has(
    .chat-hub-module-page:not([hidden]) .scope-collapsed
  )
  .chat-hub-module-pages {
  flex-basis: calc(44px + clamp(300px, 32cqw, 380px));
}
.chat-hub-management .chat-hub-mcp-row {
  min-height: 52px;
}
.chat-hub-management button.chat-hub-mcp-name {
  background: transparent;
  color: var(--text-primary);
  border: 0;
  padding: 4px 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
}
.chat-hub-management .chat-hub-mcp-form {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-raised);
}
.chat-hub-workbench-mobile .chat-hub-tabs button {
  flex: 1 0 auto;
}
.chat-hub-workbench-mobile
  :is(
    .chat-hub-overview-stats,
    .chat-hub-overview-flicker,
    .chat-hub-overview-attention
  ) {
  margin-left: 0;
}
.chat-hub-workbench-mobile .chat-hub-skills-scope {
  display: none;
}
.chat-hub-skills-mobile-scope {
  position: relative;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 28px;
  border-radius: 4px;
  color: var(--text-primary);
  cursor: pointer;
}
.chat-hub-skills-mobile-scope-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-hub-skills-mobile-scope > .sl-icon {
  flex-shrink: 0;
  color: var(--text-secondary);
}
.chat-hub-skills-mobile-scope select {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.chat-hub-skills-mobile-scope:hover {
  background: var(--hover);
}
.chat-hub-workbench-mobile .chat-hub-skills-mobile-scope {
  display: flex;
}
.chat-hub-workbench-mobile .chat-hub-skill-heading:has(> .chat-hub-skills-mobile-scope) {
  align-items: center;
}
.chat-hub-workbench-mobile .chat-hub-skills-workspace {
  display: block;
}
.chat-hub-workbench-mobile .chat-hub-projects-columns {
  display: none;
}
.chat-hub-workbench-mobile .chat-hub-projects-row {
  grid-template-columns: minmax(0, 1fr) 32px 38px;
}
.chat-hub-workbench-mobile .chat-hub-visibility-switch {
  grid-column: 3;
  min-width: 38px;
}
.chat-hub-workbench-mobile .chat-api-key-form > label {
  grid-template-columns: 1fr;
}
.chat-hub-workbench-mobile .chat-api-key-form > .chat-api-setting-row {
  display: flex;
}
.chat-hub-workbench-mobile .chat-api-key-row {
  align-items: flex-start;
  flex-direction: column;
}
.chat-hub-workbench-mobile .chat-api-endpoint {
  flex-wrap: wrap;
}
.chat-hub-credential-summary {
  display: grid;
  grid-template-columns: minmax(80px, 0.6fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-subtle);
}
.chat-hub-credential-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-secondary);
}
.chat-hub-credential-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-tertiary);
}
.chat-hub-credential-status.configured i {
  background: var(--state-success);
}
.chat-hub-skill-search {
  width: 100%;
  min-height: 34px;
  margin-bottom: 16px;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--surface-raised);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  box-sizing: border-box;
}
.chat-hub-management .chat-hub-module-page > .chat-hub-detail {
  margin-inline: 0;
}
.chat-hub-management .chat-api-settings .chat-hub-settings-hint {
  margin: 0;
  padding: 2px 0;
}
.chat-api-settings-body {
  align-content: start;
  gap: 12px;
  padding-top: 0;
}
.chat-api-toolbar h3 {
  flex: 1;
}
.chat-api-toolbar .chat-api-setting-row {
  gap: 8px;
  font-size: 12px;
}
.chat-api-toolbar > button {
  color: var(--accent-primary);
}
.chat-hub-management .chat-api-switch {
  appearance: none;
  width: 36px;
  height: 22px;
  min-width: 36px;
  border: 0;
  border-radius: 20px;
  background: var(--text-tertiary);
  padding: 3px;
  margin: 0;
  cursor: pointer;
}
.chat-api-switch::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface-panel);
}
.chat-hub-management .chat-api-switch:checked {
  background: var(--accent-primary);
}
.chat-api-switch:checked::before {
  margin-left: auto;
}
.chat-api-switch:disabled {
  opacity: 0.5;
  cursor: default;
}
.chat-hub-management-detail .chat-hub-detail-back {
  display: none;
}
.chat-hub-management-detail .chat-hub-skill-companion-body {
  order: 3;
  padding: 20px;
}
.chat-hub-management-detail
  :is(
    .settings-skills-detail-meta,
    .skill-detail-markdown,
    .settings-skills-detail-files
  ) {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}
.chat-hub-management-detail .settings-skills-detail-section {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.chat-hub-management-detail .settings-skills-detail-section-title {
  font-size: 13px;
  text-transform: none;
}
.chat-hub-workbench-mobile .chat-api-toolbar {
  gap: 8px;
}
.chat-hub-workbench-mobile .chat-api-toolbar > h3 {
  flex-basis: 40px;
}
.chat-hub-workbench-mobile .chat-api-key-form .chat-api-setting-row {
  flex-wrap: nowrap;
}

.chat-hub-workbench-mobile .chat-hub-management input.chat-api-switch {
  flex-shrink: 0;
}
.chat-hub-workbench-mobile .chat-api-setting-row {
  cursor: pointer;
}

/* Shared visual hierarchy across all five management pages. */
.chat-hub-overview-attention button.chat-hub-update-notice:not(:disabled) {
  color: var(--accent-primary);
  text-decoration: none;
}
.chat-hub-overview-attention .chat-hub-update-notice:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
}
.chat-hub-overview-stat,
.chat-hub-overview-status {
  color: var(--text-secondary);
}
.chat-hub-overview-alert {
  padding: 4px 6px;
  color: var(--state-warning);
  font-size: 12px;
}
.chat-hub-overview-stats b,
.chat-hub-overview-flicker-label ~ span {
  color: var(--text-secondary);
}
.chat-hub-overview-row.selected {
  background: var(--hover);
}
.chat-hub-management .chat-hub-detail-toolbar {
  align-items: center;
  padding: 0 0 16px;
  gap: 12px;
}
.chat-hub-management .chat-hub-detail-toolbar .sl-icon {
  width: 16px;
  height: 16px;
}
.chat-hub-management .chat-hub-npm-row {
  min-height: 44px;
}
.chat-hub-management .chat-hub-npm-package-name {
  font-weight: 500;
}
.chat-hub-management .chat-hub-npm-versions {
  font-size: 13px;
}
.chat-hub-management .chat-hub-npm-columns {
  font-size: 12px;
}
.chat-hub-projects > .chat-hub-settings-hint {
  margin: 0 0 8px;
  padding: 0 0 8px;
}
.chat-hub-management .chat-hub-projects > .chat-hub-detail-toolbar {
  flex-wrap: nowrap;
  padding-bottom: 12px;
}
.chat-hub-workbench-mobile .chat-hub-module-page[data-module='visibility'] {
  padding-inline: 16px;
}
.chat-hub-projects-columns > :nth-child(2) {
  justify-self: center;
}
.chat-hub-projects-columns > :last-child,
.chat-hub-projects-row > .chat-hub-visibility-switch {
  justify-self: end;
}
.chat-hub-visibility-switch {
  flex-shrink: 0;
  box-sizing: border-box;
}
.chat-hub-visibility-switch:disabled {
  opacity: 0.45;
  cursor: default;
}
.chat-hub-management .chat-api-switch {
  width: 38px;
  min-width: 38px;
  height: 22px;
  min-height: 22px;
  box-sizing: border-box;
}
.chat-api-switch::before {
  background: #fff;
}
.chat-hub-management .chat-hub-mcp-row,
.chat-hub-mcp-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 96px 32px 54px;
  align-items: center;
  gap: 12px;
}
.chat-hub-mcp-columns {
  min-height: 36px;
  color: var(--text-tertiary);
  font-size: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.chat-hub-mcp-columns > :last-child {
  justify-self: end;
}
.chat-hub-mcp-columns > :first-child {
  padding-left: 26px;
}
.chat-hub-mcp-columns > :nth-child(4) {
  justify-self: center;
}
.chat-hub-mcp-server {
  border-bottom: 1px solid var(--border-subtle);
}
.chat-hub-mcp-server.is-expanded {
  background: var(--surface-raised);
  outline: 1px solid var(--border-subtle);
  outline-offset: -1px;
  border-radius: 4px;
}
.chat-hub-management .chat-hub-mcp-row {
  padding: 10px 0;
  min-height: 64px;
  border-bottom: 0;
}
.chat-hub-management .chat-hub-mcp-toolbar {
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
}
.chat-hub-mcp-heading {
  display: flex;
  align-items: baseline;
  flex: 1;
  min-width: 0;
  gap: 12px;
}
.chat-hub-mcp-summary {
  display: inline;
  margin: 0;
  color: var(--text-tertiary);
  font-size: 12px;
}
.chat-hub-mcp-summary-compact,
.chat-hub-mcp-add-label-compact {
  display: none;
}
.chat-hub-management .chat-hub-mcp-toolbar-actions > * {
  width: auto;
}
.chat-hub-management .chat-hub-mcp-toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 8px;
}
.chat-hub-mcp-import-picker {
  position: relative;
  border-radius: 4px;
}
.chat-hub-mcp-import-picker select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.chat-hub-mcp-import-picker:hover:not(.is-disabled) {
  background: var(--hover);
}
.chat-hub-mcp-import-picker.is-disabled {
  opacity: 0.45;
}
.chat-hub-management button.chat-hub-mcp-disclosure {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 0;
  padding: 4px 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.chat-hub-mcp-disclosure > .sl-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--text-tertiary);
}
.chat-hub-mcp-copy {
  flex: 1;
  gap: 4px;
}
.chat-hub-management .chat-hub-mcp-system-copy {
  padding: 4px 0 4px 26px;
}
.chat-hub-mcp-delete {
  display: flex;
  justify-content: flex-end;
}
.chat-hub-management button.chat-hub-mcp-enabled {
  position: relative;
  box-sizing: border-box;
  width: 38px;
  min-width: 38px;
  height: 22px;
  min-height: 22px;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: var(--text-tertiary);
  cursor: pointer;
}
.chat-hub-mcp-enabled::before {
  content: '';
  position: absolute;
  inset: -11px 0;
}
.chat-hub-mcp-enabled > span {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
}
.chat-hub-management button.chat-hub-mcp-enabled[aria-checked='true'] {
  background: var(--accent-primary);
}
.chat-hub-mcp-enabled[aria-checked='true'] > span {
  margin-left: auto;
}
.chat-hub-mcp-inline-message {
  padding: 0 0 10px 26px;
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.chat-hub-mcp-inline-message.is-error {
  color: var(--state-danger);
}
.chat-hub-mcp-form .chat-hub-mcp-inline-message {
  padding: 0;
}
.chat-hub-mcp-transport {
  justify-self: start;
  font-size: 12px;
  color: var(--text-secondary);
}
.chat-hub-management .chat-hub-mcp-meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-hub-management .chat-hub-mcp-actions {
  justify-content: flex-end;
  gap: 2px;
}
.chat-hub-management .chat-hub-mcp-form {
  margin: 0 0 12px;
  padding: 16px 26px;
  border: 0;
  border-top: 1px solid var(--border-subtle);
  border-radius: 0;
}
.chat-hub-management .chat-hub-mcp-form-grid {
  grid-template-columns: minmax(0, 1fr);
}
.chat-hub-management .chat-hub-mcp-form > label,
.chat-hub-management .chat-hub-mcp-form-grid > label {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.chat-hub-management .chat-hub-mcp-form > label > small {
  grid-column: 2;
}
.chat-hub-mcp-values-group {
  position: relative;
  padding-block: 4px;
  border-block: 1px solid var(--border-subtle);
}
.chat-hub-management .chat-hub-mcp-values {
  display: block;
}
.chat-hub-management .chat-hub-mcp-values-toolbar {
  min-height: 36px;
  padding-right: 40px;
  list-style: none;
  cursor: pointer;
  font-size: 13px;
}
.chat-hub-mcp-values-toolbar::-webkit-details-marker {
  display: none;
}
.chat-hub-mcp-values-toolbar > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-hub-mcp-values-add {
  position: absolute;
  right: 0;
  top: 6px;
}
.chat-hub-management .chat-hub-mcp-value-row {
  padding-block: 6px;
  gap: 8px;
}
.chat-hub-management .chat-hub-mcp-secret-toggle,
.chat-hub-management .chat-hub-mcp-form small {
  font-size: 12px;
}
.chat-hub-management .chat-hub-mcp-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.chat-hub-mcp-status::before {
  content: '';
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--text-tertiary);
}
.chat-hub-mcp-status.state-connected::before {
  background: var(--state-success);
}
.chat-hub-mcp-status.state-starting::before {
  background: var(--state-warning);
}
.chat-hub-mcp-status.state-failed::before {
  background: var(--state-danger);
}
.chat-hub-skills-ledger {
  padding: 20px 16px;
}
.chat-hub-skill-scope {
  container: skill-scope / inline-size;
}
.chat-hub-management .chat-hub-skill-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
  padding-bottom: 14px;
  border-bottom: 0;
  gap: 8px;
}
.chat-hub-management .chat-hub-detail-toolbar .overlay-button,
.chat-hub-management .chat-hub-skill-toolbar-actions > button {
  height: 34px;
  min-height: 34px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.chat-hub-management .chat-hub-skill-toolbar-actions {
  display: grid;
  grid-template-columns: 104px 104px;
  flex: 0 0 auto;
  margin-left: auto;
  gap: 8px;
}
.chat-hub-management .chat-hub-skill-toolbar-actions > button {
  width: auto;
  min-width: 0;
  padding: 0 8px;
  gap: 6px;
  font-size: 12px;
}
.chat-hub-skill-summary-compact {
  display: none;
}
.chat-hub-skill-summary {
  display: block;
  margin-top: 4px;
  color: var(--text-tertiary);
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@container skill-scope (max-width: 325px) {
  .chat-hub-management .chat-hub-skill-toolbar-actions {
    grid-template-columns: 104px 34px;
    gap: 6px;
  }
  .chat-hub-management .chat-hub-skill-toolbar-actions > button:last-child {
    padding: 0;
  }
  .chat-hub-skill-toolbar-actions > button:last-child > span {
    display: none;
  }
}
.chat-hub-management .chat-hub-skill-sources {
  gap: 12px;
}
.chat-hub-management .chat-hub-skill-source {
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  margin-bottom: 0;
  overflow: hidden;
}
.chat-hub-management .chat-hub-skill-source-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 44px;
  padding: 8px 10px;
  gap: 0;
  background: color-mix(in srgb, var(--surface-raised) 60%, transparent);
  border-bottom: 1px solid transparent;
}
.chat-hub-management
  .chat-hub-skill-source:has(> .chat-hub-skill-list-collapsible[data-expanded='true'])
  > .chat-hub-skill-source-header {
  border-bottom-color: var(--border-subtle);
}
.chat-hub-management .chat-hub-skill-source-disclosure {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: 14px 6px minmax(0, 1fr);
  grid-template-rows: 20px minmax(32px, auto);
  min-width: 0;
  height: auto;
  min-height: 32px;
  column-gap: 6px;
  row-gap: 2px;
  padding: 0;
  border-radius: 0;
  font-size: 12px;
}
.chat-hub-management .chat-hub-skill-source-disclosure strong {
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
}
.chat-hub-management .chat-hub-skill-source-count {
  text-align: left;
  font-size: 11px;
}
.chat-hub-management .chat-hub-skill-source-actions {
  grid-area: 1 / 1;
  justify-self: end;
  align-self: end;
  margin: 0;
  gap: 0;
  flex-wrap: nowrap;
}
.chat-hub-skill-source-meta {
  grid-column: 3;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 6px;
  min-width: 0;
}
/* Keep source names full width; actions share the metadata line below. */
.chat-hub-management
  .chat-hub-skill-source:has(.chat-hub-skill-source-actions)
  .chat-hub-skill-source-meta {
  padding-right: 128px;
}
.chat-hub-management .chat-hub-skill-source-update {
  white-space: nowrap;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 11px;
}
.chat-hub-skill-copy-feedback {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.chat-hub-skill-source-caption {
  margin: 8px 10px;
  padding: 6px 8px;
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.chat-hub-skill-source-caption.is-error {
  color: var(--state-danger);
  background: color-mix(in srgb, var(--state-danger) 7%, transparent);
}
.chat-hub-management .chat-hub-skill-row {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 44px;
  padding: 0 6px 0 42px;
  border-radius: 0;
  border-bottom: 0;
}
.chat-hub-management .chat-hub-skill-source .chat-hub-skill-list {
  padding: 4px 0;
}
.chat-hub-management .chat-hub-skill-row-actions {
  display: flex;
  gap: 0;
}
.chat-hub-management .chat-hub-skill-action-slot {
  width: 32px;
  height: 32px;
}
.chat-hub-management .chat-hub-skill-action-slot:empty {
  display: none;
}
.chat-hub-management .chat-hub-skill-name-cell {
  align-self: stretch;
}
.chat-hub-management button.chat-hub-skill-name {
  width: 100%;
  align-self: stretch;
  padding: 6px 0;
  border-radius: 0;
  line-height: 1.5;
}
.chat-hub-skill-heading {
  flex: 1 1 auto;
  min-width: 0;
}
.chat-hub-management .chat-hub-skill-row:last-child {
  border-bottom: 0;
}
.chat-hub-management .chat-hub-skill-name {
  font-size: 14px;
  font-family: inherit;
}
.chat-hub-management-detail .settings-skills-installation > summary {
  padding-block: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
}
.chat-hub-management-detail .settings-skills-installation[open] > summary {
  margin-bottom: 12px;
}
.chat-hub-management-detail .settings-skills-detail-meta-row {
  grid-template-columns: minmax(80px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  padding-block: 8px;
}
.chat-hub-management-detail .settings-skills-detail-meta-row span {
  font-size: 12px;
}
.chat-hub-management-detail .settings-skills-detail-meta-row span:first-child {
  font-weight: 500;
}
.chat-hub-management-detail .skill-detail-markdown {
  font-size: 14px;
  line-height: 1.75;
}
.chat-hub-management-detail .settings-skills-empty {
  font-size: 12px;
  line-height: 1.5;
}
.chat-hub-management-detail .chat-hub-skill-companion-body {
  padding: 20px 24px;
}
.chat-hub-management-detail .settings-skills-detail-section {
  max-width: 760px;
  gap: 12px;
  padding-bottom: 20px;
}
.chat-hub-management-detail .settings-skills-detail-body {
  gap: 20px;
}
.chat-hub-management-detail .settings-skills-detail-meta {
  width: 100%;
}
.chat-hub-management .chat-hub-settings-section {
  padding: 18px 0;
}
.chat-hub-management .chat-hub-settings-section h3 {
  font-size: 17px;
  font-weight: 600;
}
.chat-hub-management .chat-hub-settings-section .chat-hub-detail-toolbar {
  padding-bottom: 10px;
  min-height: 36px;
}
.chat-hub-management .chat-hub-settings-section .chat-hub-app {
  padding: 7px 0;
}
.chat-hub-management .chat-hub-settings-section .chat-hub-app-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 90px 90px auto;
  gap: 12px;
  align-items: center;
}
.chat-hub-management .chat-hub-app-uptime {
  font-size: 12px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.chat-hub-management .chat-hub-app-phase {
  text-transform: capitalize;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.chat-hub-management .chat-hub-app-phase::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-tertiary);
  flex-shrink: 0;
}
.chat-hub-management
  :is(
    .chat-hub-app-phase.phase-running,
    .chat-hub-app-phase.phase-ready
  )::before {
  background: var(--state-success);
}
.chat-hub-management .chat-hub-app-phase.phase-failed::before {
  background: var(--state-danger);
}
.chat-hub-management .chat-hub-app-actions {
  gap: 6px;
}
.chat-hub-management .chat-hub-app-actions .chat-hub-action {
  display: inline-flex;
  width: auto;
  height: 30px;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  color: var(--accent-primary);
}
.chat-hub-management .chat-hub-app-meta {
  margin: 2px 0;
  color: var(--text-tertiary);
  font-size: 11px;
  gap: 4px 12px;
}
.chat-hub-management .chat-hub-forwarding .chat-hub-app-row {
  grid-template-columns: minmax(100px, 0.7fr) minmax(0, 2fr) 90px 30px;
}
.chat-hub-forward-route {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  color: var(--text-secondary);
}
.chat-hub-forward-route span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-hub-forward-route .sl-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.chat-hub-management .chat-api-endpoint {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
}
.chat-hub-management .chat-api-endpoint code {
  padding: 7px 10px;
}
.chat-hub-management .chat-api-key-row {
  padding: 10px 0;
  margin: 0;
  border-bottom: 1px solid var(--border-subtle);
}
.chat-hub-management .chat-api-key-row > div:first-child {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  flex: 1;
}
.chat-hub-management .chat-api-key-form {
  padding: 16px;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  gap: 14px;
}
.chat-hub-management .chat-api-key-form > label {
  grid-template-columns: 140px minmax(0, 1fr);
}
.chat-hub-management .chat-api-key-form .chat-api-setting-row {
  justify-content: flex-start;
  gap: 12px;
}
.chat-api-key-form .chat-api-setting-row > span {
  flex: 0 0 140px;
}
.chat-hub-management .chat-hub-credential-summary {
  grid-template-columns: 140px minmax(0, 1fr) auto;
  min-height: 42px;
}
.chat-hub-management .chat-hub-credential-summary button {
  color: var(--accent-primary);
}
.chat-hub-management .chat-hub-flicker-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0;
}
.chat-hub-flicker-identity {
  flex: 1;
}
.chat-hub-management .chat-hub-flicker-identity h3 {
  margin: 0 0 6px;
}
.chat-hub-flicker-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-transform: capitalize;
  color: var(--text-secondary);
}
.chat-hub-flicker-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-tertiary);
}
.chat-hub-flicker-state.state-running i {
  background: var(--state-success);
}
.chat-hub-flicker-state.state-failed i {
  background: var(--state-danger);
}
@container (max-width: 800px) {
  .chat-hub-management .chat-hub-app-actions .chat-hub-action span {
    display: none;
  }
  .chat-hub-management .chat-hub-settings-section .chat-hub-app-row {
    grid-template-columns: minmax(0, 1fr) 90px 70px auto;
    gap: 8px;
  }
}
.chat-hub-workbench-mobile .chat-hub-skills-workspace {
  max-width: none;
}
.chat-hub-workbench-mobile .chat-hub-mcp-columns {
  display: none;
}
.chat-hub-workbench-mobile .chat-hub-management .chat-hub-mcp-row {
  grid-template-columns: minmax(0, 1fr) 32px 38px;
}
.chat-hub-workbench-mobile .chat-hub-mcp-transport {
  grid-row: 2;
  grid-column: 1;
  margin-left: 26px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}
.chat-hub-workbench-mobile .chat-hub-mcp-status {
  grid-row: 2;
  grid-column: 1;
  padding-left: 86px;
}
.chat-hub-workbench-mobile .chat-hub-mcp-actions {
  grid-row: 1 / span 2;
  grid-column: 3;
}
.chat-hub-workbench-mobile .chat-hub-mcp-delete {
  grid-row: 1 / span 2;
  grid-column: 2;
}
.chat-hub-workbench-mobile .chat-hub-management .chat-hub-mcp-toolbar-actions {
  display: flex;
}
.chat-hub-workbench-mobile .chat-hub-management .chat-hub-mcp-toolbar-actions > * {
  width: 32px;
  padding: 0;
}
.chat-hub-workbench-mobile .chat-hub-management .chat-hub-mcp-toolbar-actions > :first-child {
  width: 64px;
  padding: 0 8px;
  font-size: 12px;
  gap: 6px;
}
.chat-hub-workbench-mobile .chat-hub-mcp-summary-full,
.chat-hub-workbench-mobile .chat-hub-mcp-add-label-full,
.chat-hub-workbench-mobile .chat-hub-mcp-toolbar-actions > :not(:first-child) > span,
.chat-hub-workbench-mobile .chat-hub-mcp-import-picker > svg:last-of-type {
  display: none;
}
.chat-hub-workbench-mobile .chat-hub-mcp-summary-compact,
.chat-hub-workbench-mobile .chat-hub-mcp-add-label-compact {
  display: inline;
}
.chat-hub-workbench-mobile .chat-hub-skill-summary-full {
  display: none;
}
.chat-hub-workbench-mobile .chat-hub-skill-summary-compact {
  display: inline;
}
.chat-hub-workbench-mobile .chat-hub-skill-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.chat-hub-workbench-mobile .chat-hub-skill-summary {
  margin: 0;
}
.chat-hub-skill-row.is-uninstalled .chat-hub-skill-name {
  color: color-mix(in srgb, var(--text-secondary) 50%, var(--text-tertiary));
}
.chat-hub-workbench-mobile .chat-hub-management .chat-hub-mcp-form-grid > label,
.chat-hub-workbench-mobile .chat-hub-management .chat-hub-mcp-form > label {
  grid-template-columns: 1fr;
}
.chat-hub-workbench-mobile
  .chat-hub-management
  .chat-hub-mcp-form
  > label
  > small {
  grid-column: 1;
}
.chat-hub-workbench-mobile .chat-hub-management .chat-hub-app-row {
  grid-template-columns: minmax(0, 1fr) auto;
}
.chat-hub-workbench-mobile .chat-hub-app-uptime {
  grid-column: 1;
  grid-row: 2;
}
.chat-hub-workbench-mobile .chat-hub-app-actions {
  grid-column: 2;
  grid-row: 2;
  justify-content: flex-end;
}
.chat-hub-workbench-mobile .chat-hub-forward-route {
  grid-column: 1;
  grid-row: 2;
  flex-wrap: wrap;
}
.chat-hub-workbench-mobile
  .chat-hub-forwarding
  .chat-hub-app-row
  > .chat-hub-action {
  grid-column: 2;
  grid-row: 2;
}
.chat-hub-workbench-mobile .chat-hub-management .chat-api-endpoint,
.chat-hub-workbench-mobile .chat-hub-management .chat-api-key-form > label {
  grid-template-columns: 1fr;
}
.chat-hub-workbench-mobile
  .chat-hub-management
  .chat-api-key-row
  > div:first-child {
  display: flex;
  flex-wrap: wrap;
}
.chat-hub-workbench-mobile
  .chat-hub-management
  .chat-api-key-form
  .chat-api-setting-row {
  justify-content: space-between;
}
.chat-hub-workbench-mobile .chat-api-key-form .chat-api-setting-row > span {
  flex-basis: auto;
}
.chat-hub-workbench-mobile .chat-hub-management .chat-hub-credential-summary {
  grid-template-columns: minmax(70px, 0.7fr) minmax(0, 1fr) auto;
}
.chat-hub-workbench-mobile .chat-hub-management .chat-hub-visibility-switch {
  width: 38px;
  min-width: 38px;
}
.chat-hub-workbench-mobile
  .chat-hub-management
  .chat-hub-visibility-switch::before {
  content: '';
  position: absolute;
  inset: -11px 0;
}
.chat-hub-workbench-mobile .chat-hub-visibility-switch {
  position: relative;
}

.chat-hub-workbench-mobile .chat-hub-management .chat-hub-skill-toolbar-actions {
  grid-template-columns: 104px 36px;
}
.chat-hub-workbench-mobile .chat-hub-skill-toolbar-actions > button:last-child > span {
  display: none;
}

.hub-storage,
.chat-hub-management .chat-hub-detail.hub-storage {
  padding: 0;
  min-width: 0;
  max-width: var(--management-content-max-width, 840px);
  color: var(--text-primary);
}
.hub-storage-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 12px;
}
.hub-storage-heading > div:first-child { display: contents; }
.hub-storage-heading h2 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-size: 21px;
}
.hub-storage-root {
  grid-column: 1 / -1;
  grid-row: 2;
  display: block;
  color: var(--text-secondary);
  font: 12px var(--font-mono);
  overflow-wrap: anywhere;
}
.hub-storage-heading-actions {
  display: contents;
  color: var(--text-secondary);
  font-size: 11px;
  flex-shrink: 0;
}
.hub-storage-heading-actions > span { grid-column: 2; grid-row: 1; }
.hub-storage-heading-actions > .overlay-button { grid-column: 3; grid-row: 1; }
.hub-storage .overlay-button,
.chat-hub-management .hub-storage .overlay-button {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.hub-storage-summary {
  border-top: 1px solid var(--border-subtle);
  margin-top: 20px;
  padding-top: 18px;
}
.hub-storage-total {
  display: flex;
  align-items: baseline;
  gap: 20px;
}
.hub-storage-total > span {
  font-size: 13px;
  font-weight: 600;
}
.hub-storage-total > strong {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
}
.hub-storage-total small,
.hub-storage-note {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.7;
}
.hub-storage-bar {
  display: flex;
  height: 13px;
  overflow: hidden;
  border-radius: 3px;
  margin-top: 15px;
  background: var(--surface-raised);
}
.hub-storage [data-color='0'] {
  background: var(--accent-primary, #4ca5ee);
}
.hub-storage [data-color='1'] {
  background: #7389a9;
}
.hub-storage [data-color='2'] {
  background: #58afa5;
}
.hub-storage-legend {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 11px 0 23px;
  font-size: 11px;
}
.hub-storage-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hub-storage-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.hub-storage-legend b {
  font-weight: 400;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.hub-storage-table-wrap {
  width: 100%;
  overflow: auto;
}
.hub-storage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
  table-layout: fixed;
}
.hub-storage-table th,
.hub-storage-table td {
  border-bottom: 1px solid var(--border-subtle);
  padding: 9px 12px;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.hub-storage-table thead {
  background: var(--surface-raised);
  color: var(--text-secondary);
}
.hub-storage-table thead th {
  font-size: 11px;
  font-weight: 500;
}
.hub-storage-table th:first-child {
  width: 29%;
}
.hub-storage-table th:nth-child(2) {
  width: 34%;
}
.hub-storage-table th:nth-child(3) {
  width: 15%;
}
.hub-storage-table th:nth-child(4),
.hub-storage-table th:nth-child(5) {
  width: 11%;
}
.hub-storage-table tbody th {
  font-weight: 500;
}
.hub-storage-table tr[data-depth]:not([data-depth='0']) {
  background: color-mix(in srgb, var(--accent-primary) 4%, transparent);
}
.hub-storage-directory {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  width: 100%;
}
.hub-storage-directory svg {
  flex-shrink: 0;
  color: var(--text-secondary);
}
.hub-storage-directory span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.hub-storage-directory:disabled {
  cursor: default;
  opacity: 0.65;
}
.hub-storage-file-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 21px;
}
.hub-storage-file-group svg {
  flex-shrink: 0;
  color: var(--text-secondary);
}
.hub-storage-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hub-storage-purpose {
  color: var(--text-secondary);
  line-height: 1.5;
}
.hub-storage-table small {
  display: block;
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 3px;
}
.hub-storage-warning,
.hub-storage-table .hub-storage-warning {
  color: var(--state-warning);
  font-size: 12px;
  line-height: 1.6;
}
.hub-storage-inline {
  text-align: left;
  color: var(--text-secondary);
}
.hub-storage-inline .overlay-button {
  margin-right: 8px;
}
.hub-storage-archive-statistics {
  border-top: 1px solid var(--border-subtle);
  margin-top: 28px;
  padding-top: 22px;
}
.hub-storage-archive-statistics h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}
.hub-storage-archive-statistics > .overlay-button {
  margin: 8px 8px 0 0;
}
.hub-storage-archive-state[data-state='ready'] {
  color: var(--state-success);
}
.hub-storage-archive-state[data-state='error'] {
  color: var(--state-warning);
}
@media (max-width: 700px) {
  .hub-storage-heading {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .hub-storage-heading-actions > .overlay-button { grid-column: 2; }
  .hub-storage-heading-actions > span { grid-column: 1 / -1; grid-row: 3; }
  .hub-storage .overlay-button,
  .chat-hub-management .hub-storage .overlay-button { min-height: 44px; padding: 6px 10px; font-size: 13px; }
  .hub-storage .overlay-button .sl-icon { width: 16px; height: 16px; }
  .hub-storage-total {
    flex-wrap: wrap;
    gap: 8px 16px;
  }
  .hub-storage-total small {
    flex-basis: 100%;
  }
  .hub-storage-legend {
    gap: 14px;
  }
  .hub-storage-table th,
  .hub-storage-table td {
    padding: 10px 7px;
  }
  .hub-storage-table .hub-storage-ratio,
  .hub-storage-table .hub-storage-files {
    display: none;
  }
  .hub-storage-table th:first-child {
    width: 50%;
  }
  .hub-storage-table th:nth-child(2) {
    width: 28%;
  }
  .hub-storage-table th:nth-child(3) {
    width: 22%;
  }
}

.hub-storage-archive-table th:first-child {
  width: 34%;
}
.hub-storage-archive-table th:nth-child(2) {
  width: 22%;
}
.hub-storage-archive-table th:nth-child(3) {
  width: 24%;
}
.hub-storage-archive-table th:nth-child(4) {
  width: 20%;
}

.chat-hub-npm-detail > .chat-hub-detail-toolbar > .chat-hub-primary-action {
  margin-inline-start: auto;
}
.chat-hub-npm-detail .chat-hub-detail-status {
  margin-inline-start: 8px;
}
.chat-hub-npm-registry {
  margin: 0 0 20px;
  border-block: 1px solid var(--border-subtle);
}
.chat-hub-npm-cache {
  margin-block: 24px 0;
}
.npm-cache-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}
.npm-cache-info {
  min-width: 0;
}
.npm-cache-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}
.npm-cache-info > .muted {
  font-variant-numeric: tabular-nums;
}
.chat-hub-npm-cache .npm-cache-actions {
  margin-inline-start: auto;
  padding: 0;
}
.chat-hub-npm-cache .npm-cache-actions > button {
  min-height: 34px;
  white-space: nowrap;
}
.chat-hub-npm-cache > .muted {
  margin-top: 6px;
}
.npm-registry-summary {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 14px;
}
.npm-registry-current {
  min-width: 0;
}
.npm-registry-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 16px;
}
.npm-registry-current-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1px 16px;
  min-width: 0;
}
.npm-registry-current-value > strong {
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}
.chat-hub-management .chat-hub-npm-registry code {
  padding: 0;
  background: none;
  color: var(--text-secondary);
  font: 400 11px/1.65 var(--font-mono);
  overflow-wrap: anywhere;
}
.npm-registry-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.npm-registry-editor {
  max-width: 680px;
  padding: 20px 0 16px;
  border-top: 1px solid var(--border-faint);
}
.npm-registry-options {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.chat-hub-management .npm-registry-option {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
}
.npm-registry-option:hover {
  background: var(--hover);
}
.npm-registry-option:has(input:checked) {
  background: var(--accent-soft-bg);
  border-color: color-mix(in srgb, var(--accent-primary) 45%, transparent);
}
.chat-hub-management .npm-registry-option input[type='radio'] {
  appearance: auto;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  min-width: 15px;
  min-height: 15px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent-primary);
}
.npm-registry-option > span {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}
.npm-registry-option strong {
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}
.chat-hub-management .npm-registry-option code {
  font-size: 10px;
  line-height: 17px;
}
.npm-registry-option-help {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 18px;
}
.npm-registry-option > small {
  flex-shrink: 0;
  padding: 0 5px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 18px;
}
.npm-registry-custom {
  margin-top: 16px;
}
.npm-registry-custom > label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 18px;
}
.chat-hub-management .npm-registry-custom > input {
  box-sizing: border-box;
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface-canvas);
  color: var(--text-primary);
  font: 400 11px var(--font-mono);
}
.chat-hub-management .npm-registry-custom > input[aria-invalid='true'] {
  border-color: var(--state-danger);
}
.npm-registry-custom p,
.npm-registry-scope-note {
  margin: 7px 0 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 18px;
}
.npm-registry-scope-note {
  max-width: 570px;
  margin: 16px 0;
}
.npm-registry-editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-faint);
}
.npm-registry-progress {
  margin-right: auto;
  color: var(--text-secondary);
  font-size: 11px;
}
.npm-registry-error {
  margin: 12px 0;
  padding: 9px 12px;
  border-left: 2px solid var(--state-danger);
  background: color-mix(in srgb, var(--state-danger) 7%, transparent);
  color: var(--state-danger);
  font-size: 12px;
  line-height: 18px;
}
.npm-registry-notice {
  margin: 0 0 14px;
  color: var(--state-success);
  font-size: 12px;
  line-height: 20px;
}
.npm-registry-read-error {
  margin: 0 0 14px;
  color: var(--state-danger);
  font-size: 12px;
  line-height: 20px;
}
.npm-registry-read-error button {
  margin-left: 10px;
}
.npm-registry-override {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 2px solid var(--state-warning);
  background: color-mix(in srgb, var(--state-warning) 6%, transparent);
  font-size: 11px;
  line-height: 18px;
}
.npm-registry-override > strong {
  color: var(--state-warning);
  font-weight: 500;
}
.npm-registry-override p {
  margin: 4px 0 0;
  color: var(--text-secondary);
}
.chat-hub-workbench-mobile .npm-registry-current-value {
  flex-direction: column;
}
.chat-hub-workbench-mobile .npm-registry-editor {
  padding-top: 16px;
}
.chat-hub-workbench-mobile .npm-registry-editor-actions {
  flex-wrap: wrap;
}
.chat-hub-workbench-mobile .npm-registry-progress:not(:empty) {
  width: 100%;
}

/* Hub Settings shares the management button, icon and section hierarchy. */
.chat-hub-module-page > .chat-hub-settings-page {
  max-width: var(--management-content-max-width, 840px);
}
.chat-hub-management .chat-hub-settings-page .chat-hub-settings-section {
  padding: 20px 0;
}
.chat-hub-settings-page > .chat-hub-settings-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.chat-hub-management .chat-hub-settings-page .chat-hub-settings-heading {
  min-width: 0;
  margin-bottom: 12px;
}
.chat-hub-prediction-setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
}
.chat-hub-prediction-setting > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.chat-hub-management .chat-hub-settings-heading h3,
.chat-hub-management .chat-hub-settings-page .chat-hub-flicker-identity h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
}
.chat-hub-settings-summary {
  display: block;
  margin-top: 4px;
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.4;
}
.chat-hub-management .chat-hub-settings-page .chat-hub-detail-toolbar {
  flex-wrap: nowrap;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 0;
  border-bottom: 0;
}
.chat-hub-settings-page .chat-hub-detail-toolbar .chat-hub-settings-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex: 1;
  margin-bottom: 0;
}
.chat-hub-settings-page .chat-hub-detail-toolbar .chat-hub-settings-summary {
  display: inline;
  margin: 0;
}
.chat-hub-settings-page .chat-hub-detail-toolbar + .chat-hub-app {
  border-top: 0;
}
.chat-hub-management .chat-hub-settings-page .chat-hub-app-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
}
.chat-hub-settings-page .chat-hub-app-name {
  grid-column: 1;
  grid-row: 1;
  font-size: 13px;
}
.chat-hub-settings-page .chat-hub-app-phase {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  font-size: 12px;
}
.chat-hub-management .chat-hub-settings-page .chat-hub-app-meta {
  grid-column: 1;
  grid-row: 2;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
}
.chat-hub-management .chat-hub-settings-page .chat-hub-app-uptime {
  font-size: inherit;
  color: inherit;
}
.chat-hub-settings-page .chat-hub-app-actions {
  grid-column: 2;
  grid-row: 2;
  justify-content: flex-end;
  gap: 0;
}
.chat-hub-management .chat-hub-settings-page .chat-hub-app-actions .chat-hub-action,
.chat-hub-management .chat-hub-settings-page .chat-hub-forwarding .chat-hub-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 4px;
  color: var(--text-secondary);
}
.chat-hub-settings-page .chat-hub-action .sl-icon {
  width: 16px;
  height: 16px;
}
.chat-hub-management .chat-hub-settings-page .chat-hub-action:hover:not(:disabled) {
  color: var(--accent-primary);
}
.chat-hub-settings-page .chat-hub-forward-route {
  grid-column: 1;
  grid-row: 2;
  flex-wrap: wrap;
}
.chat-hub-settings-page .chat-hub-forwarding .chat-hub-action {
  grid-column: 2;
  grid-row: 2;
}
.chat-api-controls {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
  min-width: 0;
  margin: 0 0 0 auto;
}
.chat-api-controls > button {
  flex-shrink: 0;
}
.chat-hub-management .chat-hub-settings-page .chat-api-endpoint {
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  flex-wrap: nowrap;
  padding: 4px 0;
}
.chat-hub-management .chat-hub-settings-page .chat-api-endpoint code {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
}
.chat-hub-management .chat-hub-settings-page .chat-api-key-row {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 0;
}
.chat-hub-management .chat-hub-settings-page .chat-api-key-row + .chat-api-key-row {
  border-top: 1px solid var(--border-subtle);
}
.chat-hub-management .chat-hub-settings-page .chat-api-key-row > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-hub-settings-page .chat-api-key-row strong {
  font-size: 13px;
}
.chat-hub-settings-page .chat-api-key-row .chat-api-key-actions {
  flex-wrap: nowrap;
  gap: 4px;
}
.chat-api-key-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  flex-shrink: 0;
  min-height: 44px;
  cursor: pointer;
}
.chat-hub-management .chat-hub-settings-page input.chat-api-switch,
.chat-hub-management .chat-hub-settings-page .chat-hub-visibility-switch {
  width: 38px;
  min-width: 38px;
  height: 22px;
  min-height: 22px;
  padding: 3px;
  flex-shrink: 0;
}
.chat-hub-settings-page .chat-api-switch::before,
.chat-hub-settings-page .chat-hub-visibility-switch > span {
  width: 16px;
  height: 16px;
}
.chat-hub-management .chat-hub-settings-page .chat-hub-credential-summary {
  grid-template-columns: 140px minmax(0, 1fr) 32px;
  gap: 12px;
  min-height: 44px;
}
.chat-hub-settings-page .chat-hub-settings-keys > .chat-hub-credential:last-child > .chat-hub-credential-summary {
  border-bottom: 0;
}
.chat-hub-management .chat-hub-settings-page .chat-hub-flicker-row {
  gap: 12px;
}
.chat-hub-settings-page .chat-hub-flicker-identity .chat-hub-settings-hint {
  display: block;
  margin-top: 4px;
}
.chat-hub-settings-page .chat-api-key-form > .chat-api-key-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 120px));
  justify-content: start;
  gap: 8px;
}
.chat-hub-settings-page .chat-api-key-form > .chat-api-key-actions > button {
  width: 100%;
}
.chat-hub-settings-page .secret-compact-set {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--accent-action);
  color: #fff;
}
.chat-hub-settings-page .chat-hub-credential .secret-compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border: 0;
  background: transparent;
}
.chat-hub-settings-page .chat-hub-credential .secret-compact-status,
.chat-hub-settings-page .chat-hub-credential .secret-compact-label {
  display: none;
}
.chat-hub-settings-page .chat-hub-credential .secret-compact-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--surface-raised);
  color: var(--text-primary);
}
.chat-hub-settings-page .secret-compact-clear {
  width: 32px;
  height: 32px;
  padding: 0;
}
.chat-hub-workbench-mobile .chat-hub-settings-page .chat-hub-credential-summary {
  grid-template-columns: minmax(60px, 1fr) minmax(100px, 1fr) 32px;
}
.chat-hub-workbench-mobile .chat-hub-settings-page .chat-api-endpoint {
  grid-template-columns: auto minmax(0, 1fr);
}
.chat-hub-workbench-mobile .chat-hub-settings-page .chat-hub-forward-route span {
  white-space: normal;
  overflow-wrap: anywhere;
}
.chat-hub-workbench-mobile .chat-hub-settings-page .chat-hub-visibility-switch::before {
  inset: -13px -1px;
}
.chat-hub-workbench-mobile .chat-hub-settings-summary-detail {
  display: none;
}

/* Monitor and Forwarding share row geometry; process and tunnel state stay independent. */
.chat-hub-service { padding: 18px 0; border-bottom: 1px solid var(--border-faint); }
.chat-hub-service:last-child { border-bottom: 0; }
.chat-hub-service-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 108px;
  align-items: center;
  gap: 16px;
  min-height: 52px;
}
.chat-hub-service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--text-secondary);
}
.chat-hub-service-content { min-width: 0; }
.chat-hub-service-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.chat-hub-service-heading > .chat-hub-service-status { margin-left: auto; }
.chat-hub-service-name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; color: var(--text-primary); }
.chat-hub-service-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, currentColor 23%, transparent);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-secondary);
  background: color-mix(in srgb, currentColor 7%, transparent);
}
.chat-hub-service-status.tone-success { color: var(--state-success); }
.chat-hub-service-status.tone-warning { color: var(--state-warning); }
.chat-hub-service-status.tone-danger { color: var(--state-danger); }
.chat-hub-service-status.tone-info { color: var(--state-info); }
.chat-hub-service-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-top: 6px;
  color: var(--text-tertiary);
  font-size: 11px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.chat-hub-service-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.chat-hub-service-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.chat-hub-management .chat-hub-services .chat-hub-service-actions .chat-hub-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 6px;
  color: var(--text-secondary);
}
.chat-hub-services .chat-hub-action:hover:not(:disabled) { background: var(--surface-active); color: var(--accent-primary); }
.chat-hub-service-route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 8px;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.chat-hub-service-route > span { min-width: 0; overflow-wrap: anywhere; }
.chat-hub-service-issue {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0 0 56px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--state-warning) 22%, transparent);
  border-left: 3px solid var(--state-warning);
  border-radius: 6px;
  background: color-mix(in srgb, var(--state-warning) 7%, var(--surface-workspace-content));
  color: var(--state-warning);
}
.chat-hub-service-issue.is-danger {
  border-color: color-mix(in srgb, var(--state-danger) 22%, transparent);
  border-left-color: var(--state-danger);
  background: color-mix(in srgb, var(--state-danger) 7%, var(--surface-workspace-content));
  color: var(--state-danger);
}
.chat-hub-service-issue > .sl-icon { flex-shrink: 0; margin-top: 1px; }
.chat-hub-service-issue-copy { flex: 1; min-width: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-hub-service-issue-copy strong { display: block; color: var(--text-primary); font-weight: 500; }
.chat-hub-service-logs-link { display: inline-flex; align-items: center; flex-shrink: 0; gap: 5px; min-height: 28px; padding: 2px 0; border: 0; background: transparent; color: var(--accent-text); font-size: 12px; cursor: pointer; }
.chat-hub-service-logs-link:disabled { opacity: 0.5; cursor: default; }
.chat-hub-services .chat-hub-app-notice { margin: 10px 0 0 56px; font-size: 12px; }
@media (max-width: 600px) {
  .chat-hub-management .chat-hub-services .chat-hub-settings-heading { flex-wrap: wrap; }
  .chat-hub-services .chat-hub-settings-summary { width: 100%; }
  .chat-hub-service-row { grid-template-columns: 44px minmax(0, 1fr) 100px; }
  .chat-hub-service-icon { border-radius: 6px; }
  .chat-hub-service-heading > .chat-hub-service-status { margin-left: 0; }
  .chat-hub-service-meta > .chat-hub-service-autostart { display: none; }
  .chat-hub-service-issue { flex-wrap: wrap; margin-left: 0; }
  .chat-hub-service-logs-link { margin-left: 28px; }
  .chat-hub-service-issue-copy { flex-basis: calc(100% - 30px); }
  .chat-hub-services .chat-hub-app-notice { margin-left: 0; }
  .chat-hub-forwarding .chat-hub-service-row { grid-template-columns: 44px minmax(0, 1fr) 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-hub-service-status .sl-icon-spin { animation: none; }
}

.share-manager {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 20px 28px;
  color: var(--text-primary);
}

.share-manager-intro,
.share-manager-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.share-manager p {
  margin: 0;
}
.share-manager h3 {
  margin: 0;
  font-size: 14px;
}
.share-manager-intro p,
.share-manager-muted,
.share-manager-origin,
.share-manager-record-main span {
  color: var(--text-secondary);
  font-size: 12px;
}
.share-manager-status {
  padding: 4px 9px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 11px;
}
.share-manager-status.enabled {
  color: var(--accent-primary);
  border-color: color-mix(in srgb, var(--accent-primary) 45%, var(--border-subtle));
}
.share-manager-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-panel) 94%, var(--surface-canvas));
}
.share-manager-records {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.share-manager-record {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid color-mix(in srgb, var(--border-subtle) 55%, transparent);
}
.share-manager-record-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.share-file-inventory { min-width: 0; font-size: 12px; color: var(--text-secondary); }
.share-file-inventory summary { cursor: pointer; padding-block: 4px; }
.share-file-inventory ul { list-style: none; margin: 6px 0 0; padding: 0; }
.share-file-inventory li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding-block: 4px; }
.share-file-inventory li span:first-child { overflow-wrap: anywhere; }
.share-file-inventory li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.share-manager-record-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-manager-record-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.share-manager-warning {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--state-warning) 50%, var(--border-subtle));
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}
.share-manager-warning ul {
  margin: 0;
  padding-left: 20px;
}
.share-manager-error {
  padding: 9px 11px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--state-danger) 14%, transparent);
  color: var(--state-danger);
  font-size: 12px;
}
.share-manager-notice {
  padding: 9px 11px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
  color: var(--text-primary);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.share-create-dialog {
  width: min(520px, calc(100vw - 28px));
}

.share-create-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.share-create-server {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 11px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 72%, transparent);
  color: var(--text-secondary);
  font-size: 11px;
}

.share-create-server > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.share-create-server-url,
.share-create-success > span {
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.share-create-fields {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 12px;
}

.share-create-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.share-create-name-input {
  margin-top: 0;
}

.share-create-field select {
  height: 34px;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  padding: 0 9px;
  background: var(--surface-panel);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
}

.share-create-success {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 42%, var(--border-subtle));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
  font-size: 12px;
}

.share-create-success > span {
  font-size: 11px;
  line-height: 1.45;
}

.share-create-dialog .share-manager-notice {
  margin-top: 9px;
}

/* ============================================================
   Settings detail visual refresh — Public shares uses the same
   track, section title, semantic surface, and control grammar.
   ============================================================ */
.settings-detail-body > .share-manager {
  padding: 0 0 20px;
  gap: 0;
}

.settings-detail-body > .share-manager .share-manager-origin {
  display: grid;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 0;
  font-size: 13px;
}

.settings-detail-body > .share-manager .share-manager-origin code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.settings-detail-body > .share-manager .share-manager-records {
  gap: 0;
}

.settings-detail-body > .share-manager .share-manager-record-main strong {
  font-size: 14px;
  font-weight: 500;
}

.settings-detail-body > .share-manager .share-manager-intro.set-section-surface {
  gap: 12px;
  min-width: 0;
  padding: 0 0 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.settings-detail-body > .share-manager .share-manager-intro > div {
  flex: 1 1 auto;
  min-width: 0;
}

.settings-detail-body > .share-manager .share-manager-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 0;
  border: 0;
  color: var(--text-secondary);
  font-weight: 600;
}

.settings-detail-body > .share-manager .share-manager-status.enabled,
.settings-detail-body > .share-manager .share-manager-status.is-ok {
  color: var(--state-success);
}

.settings-detail-body > .share-manager .share-manager-list.set-section-surface {
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding-top: 22px;
}

.settings-detail-body > .share-manager .share-manager-section-heading {
  gap: 8px;
}

.settings-detail-body > .share-manager h3.set-section-title {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.settings-detail-body > .share-manager .share-manager-record {
  gap: 12px;
  padding: 16px 0;
}

.settings-detail-body > .share-manager .share-manager-error {
  border: 1px solid color-mix(in srgb, var(--state-danger) 30%, var(--border-subtle));
  background: color-mix(in srgb, var(--state-danger) 12%, transparent);
  color: var(--state-danger);
}

@media (max-width: 720px) {
  .share-manager-record {
    flex-direction: column;
  }
  .share-manager-record-actions {
    align-self: flex-end;
  }
}

/* This stylesheet is also embedded in the isolated Wiki reader document. */
.overlay-surface, .overlay-panel, .overlay-menu-material {
  --overlay-surface-color: color-mix(in srgb, var(--surface-panel) 72%, var(--surface-canvas));
  --overlay-divider: color-mix(in srgb, var(--border-subtle) 60%, transparent);
}
.theme-light :is(.overlay-surface, .overlay-panel, .overlay-menu-material) { --overlay-surface-color: var(--surface-overlay); }
.overlay-menu-material {
  --overlay-menu-inset: 6px;
  --overlay-menu-row-radius: max(0px, calc(var(--radius-popup, 16px) - var(--overlay-menu-inset) - 1px));
  box-sizing: border-box; max-height: calc(100dvh - 16px); overflow-y: auto; margin: 0; padding: 6px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-popup, 16px); background: var(--overlay-surface-color);
  color: var(--text-primary); box-shadow: var(--shadow-floating); backdrop-filter: none; -webkit-backdrop-filter: none;
  font-size: 13px; line-height: 1.45;
}
.overlay-menu-material :is(input, select) { border-radius: 4px; }
.overlay-menu-material button:not(.chat-hub-color-swatch) { border-radius: var(--overlay-menu-row-radius, 4px); }
.overlay-action-menu button, .overlay-surface[data-kind='menu'] :is([role='menuitem'], [role='menuitemradio'], [role='option']) {
  display: flex; align-items: center; gap: 10px; box-sizing: border-box; width: 100%; min-width: 0;
  min-height: 32px; padding: 6px 10px; border: 0; border-radius: var(--overlay-menu-row-radius, 4px); background: transparent;
  color: var(--text-primary); font: inherit; text-align: left; cursor: pointer;
}
.overlay-action-menu button:hover:not(:disabled), .overlay-surface[data-kind='menu'] :is([role='menuitem'], [role='menuitemradio'], [role='option']):hover:not(:disabled) { background: var(--hover); }
.overlay-action-menu button:disabled, .overlay-surface[data-kind='menu'] :is([role='menuitem'], [role='menuitemradio'], [role='option']):disabled { opacity: .4; cursor: default; }
.overlay-action-menu .sl-icon, .overlay-surface [role^='menuitem'] .sl-icon { flex: none; width: 15px; height: 15px; color: var(--text-tertiary); }
.overlay-action-menu .sl-icon-spin { animation: overlay-menu-spin 1s linear infinite; }
@keyframes overlay-menu-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .overlay-action-menu .sl-icon-spin { animation: none; } }
.overlay-surface[data-kind='menu'] [role='separator'] { height: 1px; margin: 8px 10px; background: var(--border-subtle); }

/* Shared presentation roles, also available inside the Wiki document. */
.overlay-header { display: flex; align-items: flex-start; gap: 12px; box-sizing: border-box; min-width: 0; min-height: 44px; padding: 7px 12px 7px 20px; flex: none; border-bottom: 1px solid var(--overlay-divider, var(--border-subtle)); background: transparent; }
.overlay-header[hidden] { display: none; }
.overlay-heading { flex: 1; min-width: 0; }
.overlay-title { box-sizing: border-box; min-height: 28px; margin: 0; padding: 2px 0; color: var(--text-primary); font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: -.15px; overflow-wrap: anywhere; }
.overlay-info { margin: 2px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.overlay-header-leading, .overlay-header-actions { display: flex; align-items: center; flex: none; gap: 8px; min-height: 28px; }
.overlay-header-actions { margin-left: auto; }
.overlay-icon-button { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; flex: 0 0 auto; width: 28px; min-width: 0; height: 28px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 6px; color: var(--text-tertiary); background: transparent; cursor: pointer; text-decoration: none; }
.overlay-icon-button[data-density='compact'] { width: 22px; height: 22px; border-radius: 5px; }
.overlay-icon-button .sl-icon { width: 16px; height: 16px; flex: none; }
.overlay-icon-button:hover:not(:disabled) { background: var(--hover); color: var(--text-primary); }
.overlay-icon-button:disabled { opacity: .45; cursor: default; }
.overlay-header[data-density='compact'] { align-items: center; gap: 8px; min-height: 24px; padding: 0; border-bottom: 0; }
.overlay-header[data-density='compact'] .overlay-title { min-height: 22px; padding: 2.6px 0; font-size: 12px; line-height: 1.4; font-weight: 650; letter-spacing: 0; }
.overlay-header[data-density='compact'] :is(.overlay-header-leading, .overlay-header-actions) { min-height: 22px; gap: 4px; }
.overlay-context { min-width: 0; padding: 6px 10px; color: var(--text-secondary); font-size: 13px; font-weight: 500; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overlay-group-label { padding: 6px 10px; color: var(--text-secondary); font-size: 11px; line-height: 18px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.overlay-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 16px 20px; flex: none; background: transparent; }
.overlay-button { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; gap: 7px; min-height: 32px; padding: 5px 12px; border: 1px solid transparent; border-radius: 6px; background: var(--surface-raised); color: var(--text-primary); font: inherit; font-size: 13px; line-height: 20px; font-weight: 500; text-decoration: none; cursor: pointer; }
.overlay-button[data-tone='primary'] { background: var(--accent-action); color: white; }
.overlay-button[data-tone='danger'] { background: var(--state-danger); color: white; }
.overlay-button:disabled { opacity: .45; cursor: default; }
.overlay-button:hover:not(:disabled) { background: var(--hover); }
.overlay-button[data-tone='primary']:hover:not(:disabled) { background: var(--accent-action-hover); }
.overlay-button[data-tone='danger']:hover:not(:disabled) { background: color-mix(in srgb, var(--state-danger) 88%, black); }

.overlay-button[data-icon-only='true'] { width: 32px; height: 32px; min-width: 32px; padding: 0; flex: none; }
.usage-statistics-note { margin: 0 0 12px; color: var(--text-secondary); font-size: 12px; line-height: 18px; }

.overlay-icon-button[data-tone='danger'] { color: var(--state-danger); }
.overlay-icon-button[data-tone='primary'] { color: var(--accent-primary); }

/* Search fields use one role in pickers and file-directory toolbars. */
.overlay-search-field { display: flex; align-items: center; box-sizing: border-box; width: 100%; min-width: 0; height: 32px; min-height: 32px; gap: 8px; margin: 0; padding: 5px 9px; border: 1px solid var(--border-subtle); border-radius: 999px; background: var(--surface-workspace-content); color: var(--text-secondary); font: inherit; font-size: 13px; line-height: 20px; font-weight: 400; cursor: text; }
.overlay-search-field:focus-within { border-color: var(--focus-ring-color); }
.overlay-search-field > .sl-icon { flex: none; width: 16px; height: 16px; color: var(--text-tertiary); }
.overlay-search-input { flex: 1 1 auto; box-sizing: border-box; width: 100%; min-width: 0; height: 20px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; outline: none; background: transparent; color: var(--text-primary); font: inherit; }
.overlay-search-input:focus-visible { outline: none; }
.overlay-search-input::placeholder { color: var(--text-tertiary); opacity: 1; }

/* The title search bars use the same field and actions inside their existing surfaces. */
.search-field-inline { position: relative; flex: 1 1 auto; width: 0; height: 28px; min-height: 0; gap: 6px; padding: 0 4px; border: 0; background: transparent; }
.search-field-inline:focus-within { border: 0; }
.search-field-submit, .search-action-button { display: inline-grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-secondary); cursor: pointer; }
.search-field-submit { flex-basis: 16px; width: 16px; color: var(--text-tertiary); }
.search-field-submit > .sl-icon, .search-action-button > .sl-icon { width: 16px; height: 16px; }
.search-field-submit:disabled { color: var(--text-tertiary); cursor: default; }
.search-action-button:disabled { opacity: .4; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .search-field-submit:hover:not(:disabled), .search-action-button:hover:not(:disabled) { color: var(--text-primary); background: var(--hover); }
}
.search-result-status { flex: 0 1 auto; min-width: 0; max-width: 120px; overflow: hidden; color: var(--text-secondary); font-size: 11px; line-height: 1; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.search-result-status.no-results { color: var(--state-warning); }
.narrow-shell .search-action-button { flex-basis: 44px; width: 44px; height: 44px; }
.narrow-shell .search-field-submit { flex-basis: 44px; width: 44px; height: 44px; }
.narrow-shell .overlay-search-input { font-size: 16px; }

/* Shared overlays use a compact header and a quiet boundary above content. */
.session-surface.session-surface {
  --session-inset: 20px;
  --session-body-inset: 6px;
  --session-surface-color: var(--overlay-surface-color);
  position: fixed;
  z-index: calc(var(--layer-workspace-modal) + 1);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(450px, calc(100vw - 32px));
  min-width: 0;
  min-height: 0;
  max-width: calc(100vw - 24px);
  max-height: calc(var(--session-viewport-height, 100dvh) - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-popup);
  background: var(--session-surface-color);
  color: var(--text-primary);
  box-shadow: var(--shadow-overlay);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-size: 13px;
  line-height: 1.45;
  animation: session-surface-in var(--motion-standard) var(--ease-out) both;
}
.session-surface[data-presentation='popover'] { top: 0; left: 0; right: auto; bottom: auto; width: 260px; max-width: calc(100vw - 16px); transform: var(--sl-popover-shift, none); box-shadow: var(--shadow-floating); }
.session-surface[data-presentation='popover'][data-kind='picker'] { width: 384px; }
.session-surface[data-presentation='dialog'] { --session-dialog-height: calc(var(--session-viewport-height, 100dvh) - var(--session-dialog-safe-bottom, 0px)); top: calc(var(--session-viewport-top, 0px) + var(--session-dialog-height) / 2); left: 50%; max-height: calc(var(--session-dialog-height) - 32px); transform: translate(-50%, -50%); }
.session-surface-backdrop { position: fixed; inset: var(--session-viewport-top, 0px) 0 auto; height: var(--session-viewport-height, 100dvh); z-index: var(--layer-workspace-modal); background: rgb(0 0 0 / 38%); animation: session-surface-in var(--motion-standard) var(--ease-out) both; }
.theme-light .session-surface-backdrop { background: rgb(20 25 30 / 20%); }
.session-surface.sl-menu-exit, .session-surface-backdrop.sl-menu-exit { animation: session-surface-out var(--motion-exit) var(--ease-out) forwards; pointer-events: none; }
.session-surface-body { --overlay-menu-row-radius: max(0px, calc(var(--overlay-menu-radius, var(--radius-popup)) - var(--session-body-inset, 6px) - 1px)); min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: var(--session-body-inset, 6px); }
.session-surface-context-row { display: flex; align-items: center; min-width: 0; }
.session-surface-context-row .session-surface-context { flex: 1; min-width: 0; }
.session-surface-body.form-body, .session-surface-body.confirm-body { padding: 16px var(--session-inset) 0; }
.session-surface-body.agents-body { padding: 6px; }
.session-surface :is(.project-session-menu-btn, .wide-project-action-menu-item, .session-action-row) { display: flex; align-items: center; gap: 10px; box-sizing: border-box; width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: 4px; background: transparent; color: var(--text-primary); font-size: 13px; line-height: 1.4; text-align: left; cursor: pointer; }
.session-surface :is(.project-session-menu-btn, .wide-project-action-menu-item, .session-action-row):hover:not(:disabled) { background: var(--hover); }
.session-surface :is(.project-session-menu-btn, .wide-project-action-menu-item, .session-action-row):disabled { opacity: .4; cursor: default; }
.session-surface .project-session-menu-btn.delete, .session-surface .project-session-menu-btn.delete .sl-icon { color: var(--state-danger); }
.session-surface .project-session-menu-btn .sl-icon, .session-surface .wide-project-action-menu-item .sl-icon { width: 15px; height: 15px; color: var(--text-tertiary); }
.session-surface .project-session-menu-separator { height: 1px; margin: 8px 10px; background: color-mix(in srgb, var(--border-subtle) 70%, transparent); }
.session-surface .wide-project-action-empty { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 100px; padding: 20px 12px; color: var(--text-tertiary); font-size: 12px; }
.session-surface .agent-choice-menu { padding: 0 10px; }
.session-surface .agent-choice-group-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.session-surface .agent-choice-pill { min-width: 0; min-height: 32px; font-size: 11px; animation: none; box-shadow: none; }
.session-surface .agent-choice-pill.active { box-shadow: 0 0 0 1px color-mix(in srgb, var(--agent-accent) 18%, transparent); }
.session-field-label { display: block; line-height: 20px; margin-bottom: 8px; color: var(--text-primary); font-size: 13px; font-weight: 500; }
.session-text-field { box-sizing: border-box; width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface-workspace-content); color: var(--text-primary); font: inherit; font-size: 13px; font-weight: 400; line-height: 20px; }
.session-field-help { margin: 8px 0 0; color: var(--text-tertiary); font-size: 12px; line-height: 18px; }
.session-inline-error { display: flex; gap: 8px; margin-top: 12px; padding: 10px; border: 1px solid color-mix(in srgb, var(--state-danger) 22%, transparent); border-radius: 6px; background: color-mix(in srgb, var(--state-danger) 5%, transparent); color: var(--state-danger); font-size: 12px; }
.session-surface .session-archive-menu-item { min-height: 32px; padding: 6px 10px; border-radius: var(--overlay-menu-row-radius, 4px); color: var(--text-primary); }
.session-surface .session-archive-menu-item-label { font-size: 13px; font-weight: 400; }
.session-surface .chat-new-session-projects { max-height: none; overflow: visible; }
.session-restore-inline.session-restore-inline { padding: 6px; border: 1px solid var(--border-subtle); border-radius: 6px; background: var(--surface-panel); box-shadow: var(--shadow-floating); }
.theme-light .session-restore-inline { background: var(--surface-overlay); }
.session-restore-inline .project-session-menu-btn { min-height: 32px; padding: 6px 10px; border: 0; border-radius: 4px; color: var(--text-primary); background: transparent; font-size: 13px; }
.session-restore-inline .project-session-menu-btn:hover { background: var(--hover); }
@keyframes session-surface-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes session-surface-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .session-surface.session-surface, .session-surface-backdrop { animation: none; transition: none; } }

/* Public content roles; large hosts opt in without the small-dialog geometry. */
.overlay-surface .app-confirm-copy { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 20px; }
.overlay-surface .app-confirm-copy p { margin: 0; overflow-wrap: anywhere; }
.overlay-surface .app-confirm-target { color: var(--text-primary); font-weight: 500; }
.overlay-surface .app-confirm-summary { display: grid; gap: 4px; margin: 0; font: inherit; }
.overlay-surface .app-confirm-summary > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; }
.overlay-surface .app-confirm-summary dt, .overlay-surface .app-confirm-summary dd { margin: 0; font: inherit; overflow-wrap: anywhere; }
.overlay-surface .app-confirm-summary dd { color: var(--text-primary); }
.overlay-surface .app-confirm-summary + p { margin-top: 12px; }
.overlay-surface .app-goal-edit-field { display: grid; gap: 8px; font-weight: 500; margin-bottom: 14px; font-size: 13px; }
.overlay-surface .app-goal-edit-objective { min-height: 120px; max-height: 40dvh; resize: vertical; }
.overlay-surface .preview-workbench-tabs-overflow-close { flex: none; width: 28px; min-width: 28px; padding: 5px; }
.overlay-surface .workspace-search-scope-option.selected { color: var(--text-primary); background: var(--hover); }
.overlay-surface.share-create-dialog .share-create-server { border: 0; border-radius: 0; padding: 0 0 16px; background: transparent; }
.overlay-surface.share-create-dialog :is(input, select) { min-height: 36px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface-workspace-content); color: var(--text-primary); font: inherit; }
.overlay-surface.share-create-dialog .share-create-success { border: 0; padding: 0; background: transparent; }
.overlay-panel { border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--overlay-surface-color); color: var(--text-primary); box-shadow: var(--shadow-floating); backdrop-filter: none; }
/* Only transient dialog shells opt into the responsive popup radius. */
.overlay-popup-surface.overlay-popup-surface { border-radius: var(--radius-popup); }
.overlay-panel:not(:where(.chat-hub-workbench, .chat-hub-workbench-mobile)) :is(input:not([type='checkbox']):not([type='range']):not(.overlay-search-input), textarea, select:not(.chat-hub-title-select, [aria-label="Skills scope"])):not(:where(.chat-hub-monitor *)), .overlay-menu-material input:not(.overlay-search-input) { box-sizing: border-box; min-height: 36px; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface-workspace-content); color: var(--text-primary); font: inherit; font-size: 13px; }
.overlay-panel .chat-hub-overview { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.overlay-panel .chat-hub-footer { padding: 16px 20px; border-top: 0; background: transparent; }
.overlay-panel :is(.chat-hub-mcp-form-actions, .chat-hub-skill-source-form-actions) { gap: 8px; padding-top: 16px; border-top: 0; background: transparent; }
.overlay-panel .chat-hub-skill-companion-body { padding: 0 20px 20px; }
.chat-hub-color-palette.overlay-menu-material.inline { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.overlay-surface .quick-file-search-results { max-height: none; overflow: visible; }
.overlay-panel.preview-workbench-drawer-panel { backdrop-filter: none; }
.overlay-panel .preview-workbench-drawer-toolbar { border-bottom-color: var(--border-subtle); background: transparent; }
.overlay-panel .chat-hub-scope-option { min-height: 32px; padding: 6px 10px; border-radius: 4px; font-size: 13px; }
.overlay-surface .git-branch-option { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: 4px; background: transparent; color: var(--text-primary); font: inherit; text-align: left; }

/* Viewers keep task-specific geometry and share the same chrome. */
.overlay-backdrop { background: rgb(0 0 0 / 38%); }
.theme-light .overlay-backdrop { background: rgb(20 25 30 / 20%); }
.overlay-viewer { box-shadow: var(--shadow-overlay); }
.overlay-surface .app-confirm-error { margin-top: 12px; color: var(--state-danger); font-size: 12px; line-height: 18px; }
.overlay-surface.share-create-dialog .share-create-field { gap: 8px; color: var(--text-primary); font-size: 13px; font-weight: 500; }
.overlay-surface.share-create-dialog :is(input, select) { padding: 7px 10px; font-weight: 400; }
.overlay-surface .share-link-icon-action { box-sizing: border-box; width: 32px; height: 32px; min-width: 32px; padding: 0; flex: none; }

.overlay-panel .chat-hub-title-select { padding: 0 24px 0 0; border: 0; background: transparent; font: inherit; }

.overlay-panel .chat-hub-page-title { gap: 8px; }

.session-surface-body.overlay-search-picker-body { --session-body-inset: 10px; }
.overlay-search-picker-body .overlay-search-field { margin-bottom: 8px; }

/* Rounded menus opt in while the standard overlay roles retain their geometry. */
.overlay-capsule.overlay-capsule,
.overlay-capsule-panel.overlay-capsule-panel {
  --overlay-menu-radius: var(--radius-popup);
  --overlay-menu-inset: 8px;
  --session-body-inset: var(--overlay-menu-inset);
  --overlay-menu-row-radius: max(0px, calc(var(--overlay-menu-radius) - var(--overlay-menu-inset) - 1px));
  --overlay-surface-color: color-mix(in srgb, var(--surface-panel) 50%, var(--surface-raised));
  --overlay-menu-selected: color-mix(in srgb, var(--accent-primary) 7%, var(--surface-raised));
  --overlay-menu-shadow: 0 10px 28px rgb(0 0 0 / 27%), 0 2px 8px rgb(0 0 0 / 12%);
  padding: 0;
  border-color: color-mix(in srgb, var(--border-subtle) 52%, transparent);
  border-radius: var(--overlay-menu-radius);
  background: var(--overlay-surface-color);
  box-shadow: var(--overlay-menu-shadow);
  backdrop-filter: none;
}
.theme-light :is(.overlay-capsule, .overlay-capsule-panel) {
  --overlay-surface-color: var(--surface-overlay);
  --overlay-menu-shadow: 0 12px 28px rgb(35 58 85 / 8%), 0 2px 6px rgb(35 58 85 / 4%);
}
.overlay-capsule:not(.session-surface), .overlay-capsule > .session-surface-body { padding: var(--overlay-menu-inset); }
.overlay-capsule .overlay-group-label { padding: 4px 10px; font-size: 11px; line-height: 18px; color: var(--text-tertiary); }
.overlay-capsule.overlay-capsule :is([role^='menuitem'], [role='option']) {
  box-sizing: border-box;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: var(--overlay-menu-row-radius);
  font-size: 13px;
  line-height: 20px;
}
.overlay-capsule.overlay-capsule :is([role^='menuitem'], [role='option']):hover:not(:disabled) { background: var(--hover); }
@media (hover: none) {
  .overlay-capsule.overlay-capsule.chat-model-options-menu .chat-model-config-choice[aria-checked='false']:hover:not(:disabled) { background: transparent; }
  .overlay-capsule.overlay-capsule.chat-model-options-menu .chat-model-config-choice[aria-checked='true']:hover:not(:disabled):not([data-selection-motion-target='true']) { background: var(--overlay-menu-selected); }
}
.overlay-capsule :is([role^='menuitem'], [role='option']):disabled { opacity: .4; cursor: default; }
.overlay-capsule.overlay-capsule :is([role='menuitemradio'][aria-checked='true'], [role='option'][aria-selected='true'], [aria-current='true']) {
  background: var(--overlay-menu-selected);
  color: var(--text-primary);
}
.overlay-capsule .overlay-menu-divider, .overlay-capsule.overlay-capsule [role='separator'] { height: 1px; margin: 6px 10px; background: var(--overlay-divider); }
.overlay-capsule .overlay-menu-section { position: relative; min-width: 0; margin: 0; padding: 0; border: 0; }
.overlay-capsule :is([role^='menuitem'], .overlay-menu-section) + .overlay-menu-section { margin-top: 6px; padding-top: 7px; }
.overlay-capsule :is([role^='menuitem'], .overlay-menu-section) + .overlay-menu-section::before {
  content: ''; position: absolute; top: 0; left: 10px; right: 10px; height: 1px; background: var(--overlay-divider);
}
.overlay-capsule .overlay-menu-setting { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 3px 10px; }
.overlay-capsule .overlay-menu-setting-label { flex: 0 0 auto; min-width: 35px; padding: 0; color: var(--text-secondary); font-size: 12px; }
.overlay-capsule .overlay-menu-pills { display: flex; flex: 1; flex-wrap: wrap; gap: 2px; min-width: 0; }
.overlay-capsule.overlay-capsule .overlay-menu-pills [role='menuitemradio'] {
  flex: 1 1 auto; width: auto; min-height: 28px; max-width: 100%; justify-content: center;
  padding: 4px 6px; border-radius: 999px; font-size: 11px; line-height: 18px; text-align: center; overflow-wrap: anywhere;
}
.overlay-capsule.overlay-capsule .overlay-menu-pills [aria-checked='true'] { background: var(--hover); }
.overlay-capsule .overlay-menu-setting-stacked { flex-direction: column; align-items: stretch; gap: 4px; }
.overlay-capsule .overlay-menu-setting-stacked .overlay-menu-setting-label { min-width: 0; }
.overlay-capsule .overlay-menu-pills-single-line { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
.overlay-capsule.overlay-capsule .overlay-menu-pills-single-line [role='menuitemradio'] { flex: 1 0 auto; max-width: none; white-space: nowrap; overflow-wrap: normal; }
.overlay-capsule .overlay-menu-toggle { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; color: var(--text-primary); background: transparent; text-align: left; cursor: pointer; }
.overlay-capsule .overlay-menu-toggle-label { display: flex; flex: 1; align-items: center; gap: 5px; }
.overlay-capsule .overlay-menu-toggle-label .sl-icon { width: 12px; height: 12px; color: var(--text-tertiary); }
.overlay-capsule .overlay-menu-switch { position: relative; flex: none; width: 28px; height: 16px; border-radius: 999px; background: var(--hover); box-shadow: inset 0 0 0 1px var(--border-subtle); }
.overlay-capsule .overlay-menu-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--text-secondary); }
.overlay-capsule [aria-checked='true'] .overlay-menu-switch { background: var(--accent-primary); box-shadow: none; }
.overlay-capsule [aria-checked='true'] .overlay-menu-switch::after { transform: translateX(12px); background: white; }
.session-surface [data-overlay-initial-focus]:focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: 2px;
}

/* Chat capsules share a content column while the workspace controls keep their anchor. */
.desktop-shell,
.narrow-shell,
.chat-session-capsule {
  --chat-action-group-height: 32px;
  --chat-page-block-inset: 6px;
  --chat-session-toolbar-inline-inset: 12px;
  --chat-capsule-header-row-height: calc(var(--chat-action-group-height) + var(--chat-page-block-inset) * 2);
  --chat-capsule-header-height: var(--chat-capsule-header-row-height);
  --chat-action-control-size: 28px;
  --chat-action-group-gap: 2px;
  --chat-action-group-inset: 4px;
  --chat-action-group-block-inset: 2px;
  --chat-action-group-radius: calc(var(--chat-action-group-height) / 2);
  --chat-action-group-background: var(--surface-overlay);
  --chat-action-group-shadow: 0 1px 10px rgb(0 0 0 / 4%), inset 0 0 0 1px color-mix(in srgb, var(--border-subtle) 36%, transparent);
  /* Four 28px controls, four 2px gaps, a 7px divider slot and 8px inset. */
  --chat-workspace-collapsed-width: 135px;
}
.chat-action-group-divider {
  display: block;
  flex: 0 0 1px;
  width: 1px;
  height: 12px;
  margin-inline: 3px;
  background: var(--border-subtle);
  pointer-events: none;
}
.chat-capsule-header {
  background: transparent;
  gap: 0;
  min-height: var(--chat-capsule-header-height);
  border: 0;
  overflow: visible;
}
.chat-capsule-header > .chat-session-header {
  border: 0;
  padding-left: 12px;
  padding-right: 12px;
  overflow: visible;
}
.chat-capsule-header > .chat-title-context {
  overflow: visible;
  padding-right: 0;
}
.chat-capsule-header .chat-title-search-context {
  width: min(
    var(--chat-view-column-width, 800px),
    var(--chat-title-column-width, 100%),
    max(0px, calc(100% - var(--chat-title-content-offset, 0px)))
  );
  margin-left: var(--chat-title-content-offset, 0px);
  gap: 10px;
  overflow: visible;
}
.chat-capsule-header .chat-session-toolbar-actions {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--chat-action-group-gap);
  flex: 0 0 auto;
  padding: var(--chat-action-group-block-inset) var(--chat-action-group-inset);
  height: var(--chat-action-group-height);
  border-radius: var(--chat-action-group-radius);
  background: var(--chat-action-group-background);
  box-shadow: var(--chat-action-group-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.chat-capsule-header .chat-session-toolbar-actions > button {
  width: var(--chat-action-control-size);
  height: var(--chat-action-control-size);
  border-radius: 999px;
  padding: 0;
  color: var(--text-secondary);
}
.chat-capsule-header .chat-session-toolbar-actions:has(> button:only-child),
.chat-capsule-header .chat-status-capsule:has(> button:only-child[data-icon-only='true']) {
  padding-inline: var(--chat-action-group-block-inset);
}
/* Reset legacy hover fills before applying input-aware and selected states. */
.chat-capsule-header .chat-session-toolbar-actions > button:not(:disabled) {
  background: none;
}
@media (hover: hover) and (pointer: fine) {
  .chat-capsule-header .chat-session-toolbar-actions > button:hover:not(:disabled) {
    color: var(--text-primary);
    background: var(--hover);
  }
}
.chat-capsule-header .chat-session-toolbar-actions > button:is(.active, [aria-pressed='true'], [aria-expanded='true']) {
  color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 18%, var(--surface-panel));
}
.narrow-shell .chat-capsule-header .chat-session-toolbar-actions:has(> .chat-session-more-trigger:only-child[aria-expanded='true']) {
  background: color-mix(in srgb, var(--accent-primary) 18%, var(--surface-panel));
}
.narrow-shell .chat-capsule-header .chat-session-toolbar-actions > .chat-session-more-trigger:only-child[aria-expanded='true'] {
  background: transparent;
}
.chat-session-context-capsule {
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--chat-action-group-height);
  min-width: 0;
  flex: 1;
  padding: 0 10px;
  border-radius: var(--chat-action-group-radius);
  background: var(--chat-action-group-background);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.chat-capsule-header .chat-session-toolbar-actions > button > svg,
:is(.chat-session-capsule .app-toolbar-mark, .chat-session-toolbar-actions > button) > .app-product-mark,
.chat-workspace-capsule button > svg,
.chat-session-global-bar-trailing-actions button > svg,
.chat-composer-add-trigger > svg,
.chat-composer-action-column > button > svg {
  width: 18px;
  height: 18px;
}
.chat-capsule-header .chat-session-toolbar-actions > .chat-session-more-trigger > svg[data-icon-name='menu'] {
  width: 16px;
  height: 16px;
}
.chat-session-status-slot {
  width: 16px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}
.chat-session-ready {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 28px;
  color: var(--text-secondary);
}
.chat-session-context-capsule .chat-breadcrumb-title {
  width: auto;
  max-width: none;
  min-width: 0;
  flex: 1;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.chat-breadcrumb-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: visible;
}
.chat-session-context-capsule:has(.chat-title-read-aloud) {
  padding-right: 2px;
}
.chat-session-context-capsule .chat-breadcrumb-title:has(.chat-title-read-aloud) {
  overflow: visible;
}
.chat-title-read-aloud {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.chat-title-read-aloud:is(:active, [aria-pressed="true"], [data-playback="loading"], [data-playback="playing"]) {
  color: var(--accent-primary);
}
@media (pointer: coarse) {
  .chat-title-read-aloud::after {
    content: '';
    position: absolute;
    inset: -8px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .chat-title-read-aloud[data-playback="playing"] :is(.speaker-wave-near, .speaker-wave-far) {
    animation: chat-speaker-wave 1.15s ease-in-out infinite both;
  }
  .chat-title-read-aloud[data-playback="playing"] .speaker-wave-far {
    animation-delay: 160ms;
  }
}
@keyframes chat-speaker-wave {
  0%, 78%, 100% { opacity: .3; }
  38% { opacity: 1; }
}
.chat-breadcrumb-viewport {
  display: block;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.chat-breadcrumb-track {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: none;
}
.chat-breadcrumb-meta .breadcrumb-project-name {
  font-size: inherit;
  color: inherit;
  display: block;
  flex: 0 0 auto;
  max-width: none;
  overflow: visible;
  mask-image: none;
}
.chat-breadcrumb-hub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  overflow: visible;
  mask-image: none;
}
.chat-connection-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--state-success);
  flex-shrink: 0;
}
.chat-connection-dot.disconnected {
  background: var(--state-warning);
}
.chat-session-context-capsule .chat-title-session-text {
  display: block;
  flex: none;
  max-width: none;
  overflow: visible;
  white-space: nowrap;
  text-overflow: clip;
  scrollbar-width: none;
  font-size: 14px;
  font-weight: 500;
}
.chat-breadcrumb-viewport::-webkit-scrollbar,
.chat-model-selector .chat-core-config-model::-webkit-scrollbar {
  display: none;
}
.chat-title-session-label {
  display: block;
  width: max-content;
  max-width: none;
}
.chat-breadcrumb-viewport.overflow-start,
.chat-model-selector .chat-core-config-model.overflow-start {
  mask-image: linear-gradient(to right, #000 calc(100% - 14px), transparent);
}
.chat-breadcrumb-viewport.overflow-middle,
.chat-model-selector .chat-core-config-model.overflow-middle {
  mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 14px), transparent);
}
.chat-breadcrumb-viewport.overflow-end,
.chat-model-selector .chat-core-config-model.overflow-end {
  mask-image: linear-gradient(to right, transparent, #000 12px);
}
.chat-title-session-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.chat-session-status-slot .chat-stop-pill {
  width: 26px;
  height: 28px;
  min-width: 26px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-primary);
  box-shadow: none;
}
.chat-stop-pill-stage {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
}
.chat-stop-pill-stage > .chat-stop-ring {
  position: absolute;
  inset: 1px;
}
.chat-stop-pill-stage > .chat-stop-center {
  position: absolute;
  left: 8px;
  top: 8px;
  opacity: 1;
  transform: none;
}
.chat-stop-pill.cancelling {
  color: var(--text-secondary);
}
.chat-model-selector {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 200px;
}
.chat-model-selector .chat-core-config-trigger {
  height: 32px;
  gap: 6px;
  padding: 0 10px;
  border: 0;
  background: var(--chat-action-group-background);
  border-radius: 999px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  max-width: 100%;
  justify-content: flex-start;
}
.chat-model-selector-copy {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.chat-model-selector-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-secondary);
}
.chat-model-selector-meta::before {
  content: '·';
}
.chat-model-selector .chat-core-config-model {
  display: block;
  align-self: stretch;
  max-width: 100%;
  font-size: 13px;
  font-weight: 500;
  overflow-x: auto;
  overflow-y: hidden;
  text-overflow: clip;
  scrollbar-width: none;
}
.chat-model-selector .chat-core-config-effort {
  font-size: 11px;
}
.chat-model-config-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.chat-model-config-column { min-width: 0; }
.chat-model-config-grid-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(124px, .98fr);
  align-items: start;
}
.chat-model-config-grid-two-column .chat-model-config-column.model {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.chat-model-config-grid-two-column .chat-model-config-column.settings {
  display: flex;
  align-self: stretch;
  min-width: 0;
  flex-direction: column;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--overlay-divider);
}
.chat-model-config-values {
  max-height: min(256px, calc(var(--session-viewport-height, 100dvh) * .34));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.chat-model-settings-section { min-width: 0; }
.chat-model-settings-section + .chat-model-settings-section {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--overlay-divider);
}
.chat-model-settings-section .overlay-group-label { padding-inline: 10px; }
.chat-model-setting-values {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-model-settings-section.fast .overlay-menu-toggle { min-height: 32px; }
.chat-model-config-values .chat-model-config-choice > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.overlay-capsule .chat-model-config-choice .chat-model-config-check {
  flex: none;
  width: 13px;
  height: 13px;
  color: var(--accent-primary);
}
.chat-title-outline-menu.overlay-capsule .chat-session-outline-button {
  min-height: 34px;
  padding-block: 6px;
  border-radius: var(--overlay-menu-row-radius);
  font-size: 13px;
  line-height: 20px;
}
.chat-title-outline-menu.overlay-capsule .chat-session-outline-label { display: block; white-space: nowrap; text-overflow: ellipsis; }
.chat-model-option-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--overlay-menu-row-radius);
  background: none;
  text-align: left;
  font: inherit;
  font-size: 12px;
  color: var(--text-secondary);
}
.chat-model-option-summary strong {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-model-option-summary > span { flex: 0 1 auto; min-width: 0; }
.chat-model-option-summary > svg { flex: none; }
.chat-model-options-menu[data-submenu-stacked='true'] > .session-surface-body { opacity: .4; }
.chat-model-option-menu .session-surface-context-row {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--overlay-surface-color);
  min-height: 32px;
  gap: 4px;
  padding: 0 4px 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--overlay-divider);
}
.chat-model-option-menu > .session-surface-body { scroll-padding-top: 48px; }
.chat-model-option-menu .session-surface-context { padding: 4px 6px; font-size: 12px; color: var(--text-secondary); }
.chat-model-option-values {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-model-option-values > .chat-model-config-choice {
  width: 100%;
  min-width: 0;
  flex: none;
  justify-content: flex-start;
}
.chat-model-option-values > .chat-model-config-choice > span { flex: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.chat-session-header .chat-session-global-bar {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}
.chat-workspace-capsule,
.chat-session-global-bar-trailing-actions {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 2px;
  height: 32px;
  padding: 2px 4px;
  border-radius: 999px;
  background: var(--chat-action-group-background);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.chat-workspace-capsule .app-toolbar-root {
  gap: 2px;
}
.chat-workspace-capsule .app-toolbar-mark,
.chat-workspace-capsule .app-toolbar-button,
.chat-workspace-capsule .chat-hub-summary-button,
.chat-workspace-capsule .chat-new-session-trigger {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: none;
}
.chat-workspace-capsule .chat-hub-summary-button {
  position: relative;
  gap: 0;
}
.chat-workspace-capsule .chat-hub-summary-label {
  display: none;
}
.chat-workspace-capsule .chat-hub-summary-copy {
  position: absolute;
  right: 0;
  top: 1px;
}
.chat-workspace-capsule .chat-hub-summary-count {
  display: grid;
  place-items: center;
  min-width: 14px;
  height: 14px;
  box-sizing: border-box;
  padding-inline: 3px;
  border-radius: 4px;
  background: var(--surface-raised);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 10px;
  font-weight: 400;
  line-height: 14px;
  text-align: center;
}
.chat-workspace-capsule .chat-session-global-bar-leading-actions {
  gap: 0;
}
.chat-session-global-bar-trailing-actions:empty {
  display: none;
}
.desktop-shell[data-sessions-collapsed='true'] .chat-session-header .chat-session-global-bar {
  position: absolute;
  left: 12px;
  top: 12px;
  width: max-content;
  height: 32px;
}
.desktop-shell[data-sessions-collapsed='true'] .chat-session-global-bar-trailing-actions {
  display: none;
}
@media (width < 1120px) {
  .desktop-shell[data-sessions-collapsed='true'] .chat-session-header .chat-session-global-bar {
    display: none;
  }
}
.narrow-shell .chat-capsule-header {
  flex-basis: var(--chat-capsule-header-height);
  height: var(--chat-capsule-header-height);
  min-height: var(--chat-capsule-header-height);
  max-height: var(--chat-capsule-header-height);
  padding: var(--wm-safe-area-top) 12px 0;
  gap: 0;
}
.narrow-shell .chat-capsule-header > .chat-title-context {
  width: 100%;
  overflow: visible;
}
.narrow-shell .chat-capsule-header .chat-title-search-context {
  width: 100%;
  margin: 0;
  gap: 10px;
}
.narrow-shell .workspace-search-scope-picker > button {
  position: relative;
}
.narrow-shell .workspace-search-scope-picker > button::before {
  content: '';
  position: absolute;
  inset: -6px 0;
}
.narrow-shell .chat-title-search-bar .search-result-status {
  max-width: 42px;
}
.narrow-shell .chat-title-search-bar .chat-search-submit-hint {
  display: none;
}
.chat-composer-frame {
  --chat-composer-frame-surface: var(--surface-panel);
  border-radius: 26px;
  padding: 6px 8px 6px 6px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 48%, transparent);
  background: var(--chat-composer-frame-surface);
  box-shadow: 0 1px 5px rgb(0 0 0 / 5%);
}
.chat-composer-activity {
  position: absolute;
  inset: -1px;
  z-index: 2;
  padding: 1.25px;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  transition: opacity var(--motion-standard) var(--ease-out);
}
.chat-composer-activity-orbit {
  position: absolute;
  top: 0;
  left: 0;
  width: 180px;
  height: 100px;
  opacity: 0;
  background: radial-gradient(ellipse at 62% 50%, var(--accent-primary) 0%, color-mix(in srgb, var(--accent-primary) 78%, transparent) 18%, color-mix(in srgb, var(--accent-primary) 30%, transparent) 40%, transparent 67%);
  transition: opacity var(--motion-standard) var(--ease-out);
}
.chat-composer-activity[data-state='running'] {
  opacity: 1;
}
.chat-composer-activity[data-state='running'] .chat-composer-activity-orbit {
  opacity: 1;
  will-change: transform;
}
.chat-composer-activity[data-state='waiting'],
.chat-composer-activity[data-static='true']:not([data-state='idle']) {
  opacity: .65;
  background: var(--accent-primary);
}
.chat-composer-activity[data-static='true'] .chat-composer-activity-orbit {
  opacity: 0;
  will-change: auto;
}
.chat-composer-frame:focus-within .chat-composer-activity[data-state='running'] {
  opacity: .72;
}
@media (prefers-reduced-motion: reduce) {
  .chat-composer-activity:not([data-state='idle']) {
    opacity: .65;
    background: var(--accent-primary);
  }
  .chat-composer-activity .chat-composer-activity-orbit {
    opacity: 0;
    will-change: auto;
  }
}
.chat-composer:focus-within .chat-composer-frame,
.chat-composer.menu-open .chat-composer-frame {
  border-color: color-mix(in srgb, var(--border-subtle) 48%, transparent);
  box-shadow: 0 1px 5px rgb(0 0 0 / 5%);
}
.chat-composer-input-row {
  --chat-composer-add-trailing-space: 42px;
  --chat-composer-model-max-width: 140px;
  position: relative;
  align-items: flex-end;
  gap: 7px;
}
.chat-composer-input-row:has(> .chat-model-selector-composer) {
  --chat-composer-add-trailing-space: calc(var(--chat-composer-model-max-width) + 49px);
}
.chat-composer-add {
  display: inline-flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  height: 34px;
}
.chat-composer-add-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  height: 34px;
  max-width: calc(100% + 7px - var(--chat-composer-add-trailing-space));
  padding-right: 3px;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  clip-path: inset(0 max(0px, calc(100% - 35px)) 0 0 round 17px);
  transition: clip-path var(--motion-fast) var(--ease-out);
}
.chat-composer-add-bar[data-expanded='true'] {
  left: -7px;
  bottom: -7px;
  height: 48px;
  background: color-mix(in srgb, var(--chat-composer-frame-surface) 96%, var(--text-primary));
  box-shadow: inset 0 0 0 1px var(--border-subtle);
  clip-path: inset(1px 0 1px 1px round 23px);
}
.chat-composer-add-tools {
  display: flex;
  align-items: center;
  align-self: stretch;
  flex: 0 1 auto;
  gap: 3px;
  min-width: 0;
  padding-inline-start: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px);
  transition: opacity var(--motion-fast) var(--ease-out), transform var(--motion-fast) var(--ease-out), visibility 0s linear var(--motion-fast);
}
.chat-composer-add-bar[data-expanded='true'] .chat-composer-add-tools {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0s;
}
.chat-composer-add-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 44px;
  flex-direction: column;
  gap: 2px;
  width: 44px;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
.chat-composer-add-label {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  line-height: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 350px) {
  .chat-composer-add-tools {
    gap: 0;
    padding-inline-start: 0;
  }
  .chat-composer-add-bar {
    padding-right: 0;
  }
}
@media (hover: hover) and (pointer: fine) {
  .chat-composer-add-tool:hover {
    color: var(--text-primary);
  }
}
.chat-composer-add-tool:active {
  color: var(--text-primary);
}
.chat-composer-add-trigger {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chat-composer-add-trigger > svg {
  transition: transform var(--motion-fast) var(--ease-out);
}
.chat-composer-add-bar[data-expanded='true'] .chat-composer-add-trigger {
  flex: 0 1 44px;
  width: 44px;
  min-width: 0;
  height: 100%;
  border: 0;
  border-radius: 24px 0 0 24px;
  background: transparent;
  color: var(--text-primary);
}
.chat-composer-add-bar[data-expanded='true'] .chat-composer-add-trigger > svg {
  transform: rotate(45deg);
}
.chat-composer-add-bar[data-keyboard='true'],
.chat-composer-add-bar[data-keyboard='true'] :is(.chat-composer-add-tools, .chat-composer-add-trigger > svg) {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .chat-composer-add-bar,
  .chat-composer-add-tools,
  .chat-composer-add-trigger > svg {
    transition: none;
  }
}
/* Keep dense command/file content inside the same material as the model menu. */
.overlay-capsule.chat-composer-picker {
  bottom: calc(100% + 6px);
  -webkit-backdrop-filter: none;
}
.overlay-capsule.chat-composer-picker [role='option'] {
  min-height: 32px;
  padding-block: 4px;
}
.overlay-capsule.chat-composer-picker .chat-file-mention-option-row {
  padding: 0;
}
.overlay-capsule.chat-composer-picker .chat-slash-section + .chat-slash-section,
.overlay-capsule.chat-composer-picker .chat-menu-footer {
  border-top: 1px solid var(--overlay-divider);
  margin-top: 6px;
  padding-top: 6px;
}
.overlay-capsule.chat-composer-picker .chat-slash-section-header {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0;
  text-transform: none;
}
.chat-composer-input-row .chat-context-usage-anchor {
  width: 30px;
  height: 34px;
}
.chat-composer-input-row .chat-composer-action-column {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-self: flex-end;
}
.chat-composer-action-column .chat-send-button,
.chat-composer-action-column .voice-input-button {
  border: 0;
  background: var(--accent-primary);
  box-shadow: none;
  color: #fff;
  border-radius: 999px;
}
.chat-composer-action-column .chat-send-button:hover:not(:disabled),
.chat-composer-action-column .voice-input-button:hover:not(:disabled) {
  background: var(--accent-hover);
  color: #fff;
}
.chat-composer-action-column .voice-input-badge {
  display: none;
}
.chat-prompt-separator {
  justify-content: flex-start;
}
.chat-prompt-metadata {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}
.chat-prompt-separator-label {
  margin: 0;
  min-width: 0;
  display: block;
  flex: 0 1 auto;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.chat-prompt-separator-label::-webkit-scrollbar { display: none; }
.chat-prompt-separator-label.overflow-start { mask-image: linear-gradient(to right, #000 calc(100% - 14px), transparent); }
.chat-prompt-separator-label.overflow-middle { mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 14px), transparent); }
.chat-prompt-separator-label.overflow-end { mask-image: linear-gradient(to right, transparent, #000 12px); }
.chat-prompt-result-line {
  overflow-wrap: anywhere;
  margin-left: 0;
}
.chat-prompt-retry-button {
  flex: none;
  white-space: nowrap;
  border: 0;
  background: none;
  padding: 3px 6px;
  min-height: 28px;
  border-radius: 6px;
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
}
.chat-prompt-retry-button:hover {
  background: var(--hover);
}
.chat-workspace-capsule .chat-new-session-control {
  flex: 0 0 28px;
}
.chat-scroll-nav {
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.chat-scroll-nav .chat-scroll-nav-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface-panel) 24%, transparent);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  box-shadow: 0 2px 10px rgb(0 0 0 / 8%);
  color: var(--text-secondary);
  animation: none;
}
.chat-scroll-nav .chat-scroll-nav-button:hover {
  border-color: transparent;
  background: color-mix(in srgb, var(--surface-panel) 24%, transparent);
  color: var(--text-secondary);
  transform: none;
}
@media (hover: hover) and (pointer: fine) {
  .chat-scroll-nav .chat-scroll-nav-button:hover {
    background: color-mix(in srgb, var(--surface-panel) 38%, transparent);
    color: var(--text-primary);
  }
}
@media (prefers-reduced-transparency: reduce) {
  .chat-scroll-nav .chat-scroll-nav-button {
    background: var(--surface-panel);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
.floating-nav-button,
.floating-nav-card {
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-panel) 24%, transparent);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  box-shadow: 0 2px 10px rgb(0 0 0 / 8%);
}
.floating-nav-card-item,
.floating-nav-card-item:hover,
.floating-nav-card-item[data-active='true'] {
  background: transparent;
  box-shadow: none;
  color: color-mix(in srgb, var(--accent-primary) 88%, var(--text-primary));
  border-radius: 999px;
}
.floating-nav-card-item[data-active='true']::after {
  content: '';
  position: absolute;
  left: calc(50% - 7px);
  bottom: 6px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.chat-capsule-header.search-open .chat-session-toolbar-actions {
  display: flex;
}
.chat-session-context-capsule,
.chat-model-selector .chat-core-config-trigger,
.chat-workspace-capsule,
.chat-session-global-bar-trailing-actions {
  box-shadow: var(--chat-action-group-shadow);
}
.chat-composer {
  background: transparent;
}

/* Transcript and composer geometry follows the static Chat reference. */
.chat-prompt-user-row {
  justify-content: flex-end;
  max-width: min(100%, calc(850px + var(--prompt-status-width) + var(--prompt-status-gap)), calc(82% + var(--prompt-status-width) + var(--prompt-status-gap)));
}
.chat-prompt-user {
  align-self: flex-end;
  max-width: 100%;
  padding: 11px 17px;
  border-radius: 19px;
}
.chat-prompt-user,
.chat-question-answer {
  color: color-mix(in srgb, var(--text-primary) 78%, var(--accent-primary));
}
.chat-question-answer {
  font-size: 13px;
  line-height: 1.4;
}
.chat-prompt-group {
  padding: 0;
  gap: 7px;
}
.chat-prompt-group > .chat-prompt-attachment-strip,
.chat-prompt-group > .chat-image-strip {
  align-self: flex-end;
  justify-content: flex-end;
  max-width: 94%;
  gap: 6px;
  margin-top: 0;
}
.chat-prompt-content > .chat-prompt-attachment-strip,
.chat-prompt-content > .chat-image-strip {
  align-self: flex-end;
  justify-content: flex-end;
  max-width: 100%;
  gap: 6px;
  margin-top: 0;
}
.chat-prompt-group .chat-prompt-attachment-chip {
  max-width: min(240px, 100%);
  gap: 9px;
  padding: 7px 9px;
  border-radius: 10px;
  background: var(--surface-panel);
  border-color: color-mix(in srgb, var(--border-subtle) 60%, transparent);
  color: var(--text-primary);
}
.chat-prompt-group .chat-prompt-attachment-chip:hover {
  background: var(--hover);
}
.chat-prompt-group .chat-prompt-attachment-name {
  color: var(--text-primary);
  line-height: 17px;
}
.chat-prompt-group .chat-prompt-attachment-meta {
  line-height: 17px;
}
.chat-prompt-group .chat-prompt-attachment-body {
  gap: 0;
}
.chat-prompt-group .chat-prompt-attachment-icon {
  color: var(--text-secondary);
  width: 22px;
  height: 22px;
  justify-self: center;
}
.chat-prompt-group .chat-prompt-attachment-thumb {
  border: 0;
}
.chat-prompt-action-button {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}
.chat-prompt-action-button svg {
  width: 16px;
  height: 16px;
}
.chat-prompt-separator {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 0 -8px;
  padding-top: 0;
  padding-bottom: 22px;
}
.chat-prompt-actions { gap: 0; }
.chat-prompt-actions .chat-prompt-action-button > svg {
  width: 14px;
  height: 14px;
}
.chat-prompt-separator.compact {
  column-gap: 4px;
  margin-top: 2px;
  padding-bottom: 0;
}
.chat-prompt-actions .chat-response-menu-trigger {
  width: 28px;
  height: 28px;
  padding: 0;
}
.chat-prompt-separator.compact .chat-prompt-separator-label { line-height: 18px; }
.chat-prompt-actions .chat-response-menu-trigger > svg {
  width: 16px;
  height: 16px;
}
.chat-prompt-artifacts { margin-bottom: 0; }
.chat-prompt-artifacts + .chat-prompt-separator { margin-top: 10px; }
.chat-prompt-separator-label {
  font-size: 12px;
  line-height: 20px;
}
.chat-prompt-result-line {
  flex-basis: 100%;
  grid-column: 1 / -1;
}
.chat-work-group {
  padding-bottom: 0;
}
.chat-work-group-header {
  padding-inline: 0;
  font-size: 12px;
}
.chat-work-group-header::after {
  display: none;
}
.chat-composer {
  padding-bottom: max(var(--chat-page-block-inset), var(--wm-safe-area-bottom));
}
.theme-light .chat-composer-frame {
  --chat-composer-frame-surface: var(--surface-overlay);
}
.chat-composer-input-shell {
  --chat-composer-input-pad-block: 6px;
  --chat-composer-input-pad-inline: 0px;
}
.chat-composer-input {
  min-height: 34px;
  padding-bottom: 6px;
  font-size: var(--reading-font-size);
  line-height: 22px;
}
.chat-rich-composer-placeholder {
  font-size: var(--reading-font-size);
  line-height: 22px;
}
.chat-composer-action-column .chat-send-button,
.chat-composer-action-column .voice-input-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  transform: none;
}
.chat-composer-action-column .voice-input-button.recording {
  color: #fff;
  background: var(--accent-primary);
  border: 0;
  box-shadow: none;
}
.chat-composer-action-column .voice-input-button.locked-recording::after,
.chat-composer-action-column .voice-input-button.hold-recording::after {
  display: none;
}
.chat-composer-action-column .voice-input-button.cancel-intent,
.chat-composer-action-column .voice-input-button.cancel-intent:hover:not(:disabled) {
  background: var(--hover);
  color: var(--state-danger);
}
.voice-input-wave {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.voice-input-wave-bar {
  display: block;
  flex: none;
  width: 2px;
  height: 6px;
  transform-origin: center;
  transition: transform var(--motion-fast) var(--ease-out);
}
.voice-input-wave-bar:nth-child(2) { height: 10px; }
.voice-input-wave-bar:nth-child(3) { height: 14px; }
.voice-input-wave-bar:nth-child(4) { height: 8px; }
.voice-input-wave-bar > i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  animation: voiceInputWavePulse calc(var(--motion-standard) * 4) var(--ease-in-out) infinite;
}
.voice-input-wave-bar:nth-child(2) > i { animation-delay: calc(var(--motion-standard) * -1); }
.voice-input-wave-bar:nth-child(3) > i { animation-delay: calc(var(--motion-standard) * -2); }
.voice-input-wave-bar:nth-child(4) > i { animation-delay: calc(var(--motion-standard) * -3); }
.voice-input-wave.paused .voice-input-wave-bar { transition: none; }
.voice-input-wave.paused i { animation-play-state: paused; }
@keyframes voiceInputWavePulse {
  0%, 100% { transform: scaleY(.5); opacity: .72; }
  50% { transform: scaleY(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .voice-input-wave-bar { transform: none !important; transition: none; }
  .voice-input-wave-bar > i { animation: none; }
}
.chat-composer-input-row .chat-context-usage {
  width: 30px;
  height: 34px;
  flex-basis: 30px;
  background: none;
  mask: none;
  -webkit-mask: none;
}
.chat-composer-input-row .chat-context-usage::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-primary) var(--chat-context-used), var(--chat-context-rest-color) 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.65px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.65px));
}
.chat-attachment-preview-list {
  margin-bottom: 8px;
}
.narrow-shell .chat-composer {
  padding-top: 0;
  padding-inline: 12px;
}
.narrow-shell .chat-prompt-user {
  padding: 10px 14px;
}
.narrow-shell .chat-prompt-user-row {
  max-width: min(100%, calc(92% + var(--prompt-status-width) + var(--prompt-status-gap)));
}

.chat-work-group-label {
  font-size: inherit;
}

.chat-block {
  padding-top: 34px;
}

.chat-attachment-preview-list {
  gap: 7px;
}
.chat-attachment-preview {
  min-width: 0;
  height: auto;
  padding: 7px 9px;
  gap: 7px;
  border: 0;
  border-radius: 10px;
}
.chat-attachment-thumb {
  width: 28px;
  height: 28px;
  border: 0;
}
.chat-attachment-thumb.file {
  width: 18px;
  height: 18px;
  background: none;
  color: var(--text-secondary);
}
.chat-attachment-thumb.file svg {
  width: 18px;
  height: 18px;
}
.chat-attachment-meta {
  gap: 0;
}
.chat-attachment-name {
  font-size: 11px;
  line-height: 15px;
}
.chat-attachment-status {
  font-size: 10px;
  line-height: 15px;
}
.chat-attachment-remove,
.chat-attachment-retry {
  width: 20px;
  height: 20px;
  border: 0;
}
.chat-attachment-remove svg,
.chat-attachment-retry svg {
  width: 12px;
  height: 12px;
}

/* Context belongs to the title slot; PC runtime controls stay beside Send. */
.chat-session-status-slot .chat-context-usage-anchor { width: 26px; height: 28px; transform: translateX(-2px); }
.chat-session-status-slot .chat-context-usage {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 28px; flex-basis: 26px;
  background: none; mask: none; -webkit-mask: none; color: var(--accent-primary);
}
.chat-session-status-slot .chat-stop-pill-stage { width: 26px; height: 26px; }
.chat-context-ring { position: absolute; inset: 3px; width: 20px; height: 20px; }
.chat-context-ring-track { stroke: var(--text-secondary); opacity: .24; }
.chat-context-ring-arc { stroke: currentColor; }
.chat-context-usage[data-available='false'][data-running='false'][data-compacting='false'] .chat-context-ring-arc {
  opacity: 0;
}
.chat-context-ring-motion {
  transform-origin: 12px 12px;
}
.chat-context-usage:is([data-running='true'], [data-compacting='true']) .chat-context-ring-motion {
  animation: chat-context-ring-spin 1.8s linear infinite;
}
.chat-context-usage .chat-stop-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.chat-context-usage.stopped .chat-stop-center {
  background: color-mix(in srgb, var(--text-secondary) 24%, transparent);
}
.chat-session-status-slot .chat-context-usage.cancelling { color: var(--text-secondary); }
@keyframes chat-context-ring-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .chat-context-usage:is([data-running='true'], [data-compacting='true']) .chat-context-ring-motion {
    animation-play-state: paused;
  }
}
.chat-session-status-slot .chat-context-usage:hover,
.chat-session-status-slot .chat-context-usage:focus-visible { outline: none; }
.chat-context-usage-popover { transform-origin: left top; pointer-events: none; }
.chat-context-usage-popover.visible { opacity: 1; transform: none; }
.chat-model-selector-composer {
  flex: 0 0 auto;
  width: max-content;
  max-width: var(--chat-composer-model-max-width, 140px);
  min-width: 0;
  align-self: flex-end;
}
.chat-model-selector-composer .chat-core-config-trigger {
  width: 100%; height: 34px; min-height: 34px; padding: 3px 8px; gap: 5px;
  background: var(--hover); backdrop-filter: none;
}
.chat-model-selector-composer .chat-model-selector-copy {
  flex-direction: column; align-items: flex-start; gap: 0; flex: 1; width: auto; text-align: left;
}
.chat-model-selector-composer .chat-core-config-model {
  max-width: 100%; font-size: 11px; line-height: 14px; white-space: nowrap; text-align: left;
}
.chat-model-selector-composer .chat-model-selector-meta,
.chat-model-selector-composer .chat-core-config-effort { font-size: 10px; line-height: 12px; text-align: left; }
.chat-model-selector-composer .chat-model-selector-meta::before { content: none; }
.chat-core-config-fast { color: var(--accent-fast); }

/* Only the model name contributes to capsule width; options use the second row. */
.chat-model-selector { width: max-content; min-width: 44px; flex: 0 1 auto; }
.chat-model-selector .chat-core-config-trigger { width: 100%; min-width: 44px; }
.chat-model-selector-copy {
  position: relative; display: flex; flex: 0 1 auto; flex-direction: column;
  align-items: flex-start; gap: 0; min-width: 0; max-width: 100%;
}
.chat-model-selector-copy::after { content: ''; display: block; height: 17px; flex: none; }
.chat-model-selector .chat-core-config-model {
  display: block; width: max-content; max-width: 100%; line-height: 17px;
  white-space: nowrap; overflow-x: auto; overflow-y: hidden;
}
.chat-model-name-text { display: inline-block; width: max-content; white-space: nowrap; }
.chat-model-selector-meta {
  position: absolute; top: 17px; left: 0; width: 100%; max-width: 100%; height: 17px;
  display: inline-flex; align-items: center; gap: 4px; overflow-x: auto; overflow-y: hidden;
  white-space: nowrap; scrollbar-width: none; overscroll-behavior-x: contain;
}
.chat-model-selector-meta > * { flex: 0 0 auto; }
.chat-model-selector-meta::-webkit-scrollbar { display: none; }
.chat-model-selector-meta::before { content: none; }
.chat-model-selector-meta.overflow-start { mask-image: linear-gradient(to right, #000 calc(100% - 14px), transparent); }
.chat-model-selector-meta.overflow-middle { mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 14px), transparent); }
.chat-model-selector-meta.overflow-end { mask-image: linear-gradient(to right, transparent, #000 12px); }
.chat-model-selector-composer .chat-model-selector-copy { width: max-content; gap: 0; }
.chat-model-selector-composer .chat-model-selector-copy::after { height: 12px; }
.chat-model-selector-composer .chat-core-config-model { line-height: 14px; }
.chat-model-selector-composer .chat-model-selector-meta { top: 14px; height: 12px; gap: 3px; }
.chat-composer-activity[data-fast='true'] .chat-composer-activity-orbit {
  background:
    radial-gradient(ellipse at 72% 50%, var(--accent-fast) 0%, color-mix(in srgb, var(--accent-fast) 76%, transparent) 8%, transparent 27%),
    radial-gradient(ellipse at 48% 50%, var(--accent-primary) 0%, color-mix(in srgb, var(--accent-primary) 78%, transparent) 18%, color-mix(in srgb, var(--accent-primary) 30%, transparent) 40%, transparent 67%);
}
.chat-composer-activity[data-fast='true'][data-static='true'][data-state='running'] {
  background: linear-gradient(105deg, var(--accent-primary) 84%, var(--accent-fast));
}
.theme-light .chat-composer-activity[data-state='running'] {
  /* Preserve the radial falloff while increasing contrast on light surfaces. */
  --accent-primary: var(--accent-hover);
  --accent-fast: #c58a08;
  padding: 2px;
}
.theme-light .chat-composer-activity[data-state='running']:not([data-fast='true']) .chat-composer-activity-orbit {
  /* Center the normal highlight so both ends fade before the orbit is clipped. */
  background: radial-gradient(ellipse at 50% 50%, var(--accent-primary) 0%, color-mix(in srgb, var(--accent-primary) 78%, transparent) 18%, color-mix(in srgb, var(--accent-primary) 30%, transparent) 40%, transparent 67%);
}
.theme-light .chat-composer-activity[data-fast='true'][data-state='running'] .chat-composer-activity-orbit {
  /* Keep the 1.5x-wide sprite centered on the existing motion anchor. */
  left: -45px;
  width: 270px;
  /* Center the narrow gold head inside the 2px stroke so its tip tapers through corners. */
  background:
    radial-gradient(ellipse 72px 1.5px at 50% calc(50% + .5px), var(--accent-fast) 0%, color-mix(in srgb, var(--accent-fast) 76%, transparent) 30%, transparent 100%),
    radial-gradient(ellipse 120px 50px at 30% 50%, var(--accent-primary) 0%, color-mix(in srgb, var(--accent-primary) 78%, transparent) 18%, color-mix(in srgb, var(--accent-primary) 30%, transparent) 40%, transparent 67%);
}
.theme-light .chat-composer-frame:focus-within .chat-composer-activity[data-state='running'] {
  opacity: .95;
}
@media (prefers-reduced-motion: reduce) {
  .chat-composer-activity[data-fast='true'][data-state='running'] {
    background: linear-gradient(105deg, var(--accent-primary) 84%, var(--accent-fast));
  }
}

/* Shared composer geometry and adaptive model placement for every shell. */
.chat-composer-input-shell:has(> .chat-composer-prediction) { display: grid; max-height: 180px; overflow-x: hidden; overflow-y: auto; }
.chat-composer-input-shell:has(> .chat-composer-prediction) > .chat-composer-input { max-height: none; overflow: visible; }
.chat-composer-input-shell:has(> .chat-composer-prediction) > .chat-rich-composer { grid-area: 1 / 1; align-self: stretch; width: 100%; box-sizing: border-box; }
.chat-composer-prediction { grid-area: 1 / 1; width: 100%; box-sizing: border-box; z-index: 2; position: relative; color: var(--text-secondary); white-space: pre-wrap; overflow-wrap: anywhere; user-select: none; pointer-events: none; }
.chat-composer-prediction [data-chat-prediction-measure] { position: absolute; width: max-content; max-width: none; white-space: pre; visibility: hidden; pointer-events: none; }
.chat-composer-shared { isolation: isolate; container: composer / inline-size; }
.chat-composer-shared .chat-model-selector-composer { flex: 0 0 auto; }
.chat-composer-model-slot { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: flex-end; flex: 0 0 auto; width: max-content; max-width: var(--chat-composer-model-max-width, 140px); }
.chat-composer-model-wrap { position: relative; isolation: isolate; display: flex; width: max-content; min-width: 0; max-width: 100%; }
.chat-composer-model-wrap > .chat-model-selector { position: relative; z-index: 1; min-width: 0; max-width: 100%; }
.chat-composer-model-surface { position: absolute; inset: 0; z-index: 0; border-radius: 999px; background: var(--hover); box-shadow: var(--chat-action-group-shadow); pointer-events: none; opacity: 0; }
.chat-composer-shared[data-model-skin='capsule'][data-expanded='false'] .chat-composer-model-surface { opacity: 1; }
.chat-composer-shared .chat-composer-model-wrap .chat-core-config-trigger { position: relative; max-width: 100%; background: transparent; box-shadow: none; }
.chat-composer-shared .chat-model-selector-copy { display: contents; }
.chat-composer-shared .chat-model-selector-copy::after { display: none; }
.chat-composer-shared .chat-model-selector .chat-core-config-model { display: flex; align-items: center; order: 3; align-self: center; flex: 0 1 auto; min-width: 0; max-width: var(--chat-composer-model-name-width, 100%); line-height: 1; overflow: hidden; mask-image: none; }
.chat-composer-shared .chat-model-name-text { display: block; min-width: 0; flex: 0 1 auto; width: auto; overflow: hidden; text-overflow: ellipsis; }
.chat-composer-shared .chat-core-config-trigger > .agent-icon { order: 2; flex: none; }
.chat-composer-shared .chat-model-selector-meta { order: 1; left: auto; right: 8px; width: max-content; max-width: none; opacity: 0; pointer-events: none; }
.chat-composer-shared[data-expanded='false'] .chat-core-config-trigger > .agent-icon { order: 0; }
.chat-composer-shared[data-expanded='false'] .chat-model-selector-copy { position: relative; display: flex; flex-direction: column; align-items: flex-start; flex: 1 1 auto; order: 1; min-width: 0; }
.chat-composer-shared[data-expanded='false'] .chat-model-selector-copy::after { content: ''; display: block; height: 13px; flex: none; }
.chat-composer-shared[data-expanded='false'] .chat-core-config-model { order: 0; align-self: flex-start; max-width: 100%; }
.chat-composer-shared[data-expanded='false'] .chat-model-selector-meta { top: 12px; left: 0; right: auto; width: max-content; height: 12px; opacity: 1; overflow: visible; }
.chat-composer-shared[data-wide-entry='true'][data-expanded='false'] .chat-composer-input-row { --chat-composer-model-max-width: 180px; }
.chat-composer-shared[data-wide-entry='true'][data-expanded='false'][data-empty-entry='details'] .chat-composer-model-slot { width: var(--chat-composer-model-preferred-width, max-content); }
.chat-composer-shared[data-wide-entry='true'][data-expanded='false'][data-empty-entry='details'] :is(.chat-composer-model-wrap, .chat-model-selector-composer) { width: 100%; }
.chat-composer-shared[data-expanded='false'][data-empty-entry='icon'] .chat-composer-input-row { --chat-composer-model-max-width: 34px; }
.chat-composer-shared[data-expanded='false'][data-empty-entry='status'] .chat-composer-input-row { --chat-composer-model-max-width: 128px; }
.chat-composer-shared[data-expanded='false']:not([data-empty-entry='details']) .chat-model-selector-copy { display: contents; }
.chat-composer-shared[data-expanded='false']:not([data-empty-entry='details']) .chat-model-selector-copy::after { display: none; }
.chat-composer-shared[data-expanded='false']:not([data-empty-entry='details']) .chat-core-config-model { position: absolute; right: 18px; top: 3px; width: max-content; max-width: none; opacity: 0; pointer-events: none; }
.chat-composer-shared[data-expanded='false'][data-empty-entry='icon'] .chat-model-selector-meta { left: auto; right: 18px; top: 17px; opacity: 0; }
.chat-composer-shared[data-expanded='false'][data-empty-entry='icon'] .chat-composer-model-slot { width: 34px; }
.chat-composer-shared[data-expanded='false'][data-empty-entry='icon'] .chat-core-config-trigger { width: 34px; min-width: 34px; padding: 0 8px; }
.chat-composer-shared[data-expanded='false'][data-empty-entry='status'] .chat-model-selector-meta { position: static; width: max-content; height: auto; opacity: 1; }
.chat-composer-shared[data-expanded='false'][data-empty-entry='status'] .chat-core-config-trigger { padding-left: 8px; }
.chat-composer-placeholder { position: relative; width: 100%; display: flex; flex-direction: column; gap: 0; min-width: 0; overflow: hidden; pointer-events: none; color: var(--text-secondary); }
.chat-composer-placeholder-model-name { font-weight: 600; }
.chat-composer-placeholder-measure { position: absolute; visibility: hidden; width: max-content; white-space: nowrap; font: inherit; }
.chat-composer-placeholder-model { font-size: 13px; line-height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-composer-placeholder-details { font-size: 11px; line-height: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-tertiary); }
.chat-composer-placeholder[data-single-line='true'] { height: 34px; flex-direction: row; align-items: center; }
.chat-composer-placeholder[data-single-line='true'] .chat-composer-placeholder-model { flex: none; font-size: inherit; line-height: inherit; }
.chat-composer-placeholder[data-single-line='true'] .chat-composer-placeholder-details { flex: none; font-size: inherit; line-height: inherit; color: inherit; }
.chat-composer-placeholder[data-single-line='true'] .chat-composer-placeholder-details::before { content: ' · '; white-space: pre; }
.chat-composer-entry-icon { position: absolute; left: 50%; top: 50%; width: calc(var(--agent-icon-size) * 1.111112); height: calc(var(--agent-icon-size) * 1.111112); transform: translate(-50%, -50%); color: var(--text-secondary); opacity: 0; transition: opacity var(--motion-standard) var(--ease-in-out); pointer-events: none; }
.chat-composer-shared .agent-icon > :is(.agent-icon-main, .agent-icon-badge) { transition: opacity var(--motion-standard) var(--ease-in-out); }
.chat-composer-shared[data-expanded='false']:not([data-empty-entry='details']) .chat-composer-entry-icon { opacity: 1; }
.chat-composer-shared[data-expanded='false']:not([data-empty-entry='details']) .agent-icon > :is(.agent-icon-main, .agent-icon-badge) { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .chat-composer-shared[data-expanded='false']:not([data-empty-entry='details']) .chat-core-config-trigger:hover { background: var(--hover); }
}
.chat-composer-shared .chat-composer-input-row:has(> .chat-composer-model-slot) { --chat-composer-add-trailing-space: calc(var(--chat-composer-model-max-width) + 49px); }

/* The closed input uses the existing PC rules without mobile geometry overrides. */
.chat-composer-shared[data-expanded='true'] { --chat-composer-parameter-row-height: 24px; --chat-composer-parameter-row-gap: 4px; --chat-composer-parameter-agent-size: 14px; }
.chat-composer-shared[data-expanded='true'] .chat-composer-input-row { flex-wrap: wrap; row-gap: var(--chat-composer-parameter-row-gap); --chat-composer-add-trailing-space: 42px; }
.chat-composer-shared[data-expanded='true'] .chat-composer-input-shell { flex-basis: 0; }
.chat-composer-shared[data-expanded='true'] .chat-composer-add-bar { top: auto; bottom: 0; }
.chat-composer-shared[data-expanded='true'] .chat-composer-add-bar[data-expanded='true'] { bottom: -7px; }
.chat-composer-shared[data-expanded='true'] .chat-composer-model-slot { order: -1; flex: 0 0 100%; width: 100%; max-width: 100%; }
.chat-composer-shared[data-expanded='true'] .chat-composer-model-surface { opacity: 0; }
.chat-composer-shared[data-expanded='true'] .chat-model-selector-composer { order: 0; width: max-content; max-width: 100%; align-self: center; }
.chat-composer-shared[data-expanded='true'] .chat-model-selector-composer .chat-core-config-trigger { display: flex; align-items: center; height: var(--chat-composer-parameter-row-height); min-height: var(--chat-composer-parameter-row-height); padding: 0; gap: 6px; border-radius: 12px; }
.chat-composer-shared[data-expanded='true'] .chat-model-selector-composer .chat-core-config-trigger > .agent-icon { --agent-icon-size: var(--chat-composer-parameter-agent-size) !important; --agent-icon-badge-size: 9px !important; }
.chat-composer-shared .chat-composer-model-effort { display: none; }
.chat-composer-shared .chat-composer-model-fast { display: inline-flex; align-items: center; flex: none; margin-right: 5px; }
/* Fallback fonts need room for descenders inside the horizontal clipping box. */
.chat-composer-shared[data-expanded='true'] .chat-core-config-model { display: flex; align-items: center; font-size: 12px; line-height: 18px; }
.chat-composer-shared[data-expanded='true'] .chat-model-name-text { min-width: 0; flex: 0 1 auto; }
.chat-composer-shared[data-expanded='true'] .chat-composer-model-effort { display: inline; flex: none; white-space: pre; }
.chat-composer-shared[data-expanded='true'] .chat-model-selector-meta :is(.chat-core-config-effort, .chat-core-config-fast) { display: none; }
.chat-composer-shared[data-expanded='true'] .chat-model-selector-meta { position: static; display: inline-flex; align-items: center; flex: 0 0 auto; height: auto; gap: 5px; padding: 0; font-size: 11px; line-height: 18px; overflow: visible; opacity: 1; }
.chat-composer-shared[data-wide-entry='true'][data-expanded='false'] .chat-model-selector-meta { width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; pointer-events: auto; }
.chat-composer-shared[data-wide-entry='true'][data-expanded='true'] .chat-model-selector-meta { flex-shrink: 1; min-width: 0; max-width: var(--chat-composer-model-meta-width, 100%); overflow-x: auto; overflow-y: hidden; pointer-events: auto; }
.chat-composer-shared[data-expanded='true'] .chat-core-config-effort { font-size: inherit; line-height: inherit; }
.chat-composer-shared .chat-model-selector-meta .chat-core-config-effort { line-height: 1; align-self: center; }
.chat-composer-shared[data-expanded='true'] .chat-model-selector-meta[data-hidden-count]:not([data-hidden-count='0']):not([data-hide-count='true'])::after { content: '+' attr(data-hidden-count); min-width: 20px; text-align: center; color: var(--text-tertiary); font-size: 10px; }
.chat-composer-shared [data-composer-hidden='true'] { display: none !important; }
.chat-composer-shared[data-model-motion='true'] :is(.chat-core-config-trigger, .chat-model-selector-copy) { overflow: visible; mask-image: none; }
.chat-composer-voice-status { grid-column: 1; grid-row: 1; height: 24px; min-height: 24px; padding-left: 10px; flex: none; }
.chat-composer-shared[data-expanded='true'] .chat-composer-model-slot[data-leading-state='prediction'] { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; column-gap: 12px; }
.chat-composer-model-slot[data-leading-state='prediction'] .chat-composer-model-wrap { grid-column: 2; grid-row: 1; justify-self: end; }
.chat-composer-prediction-action { grid-column: 1; grid-row: 1; display: flex; align-items: center; height: 24px; padding-left: calc(34px + 7px - (32px - 18px) / 2); }
.chat-composer-prediction-accept { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; min-width: 32px; height: 24px; min-height: 24px; padding: 0; margin: 0; border: 0; border-radius: 6px; background: transparent; color: var(--text-secondary); cursor: pointer; touch-action: manipulation; }
.chat-composer-prediction-accept::after { content: ''; position: absolute; inset: -4px 0; }
.chat-composer-tab-icon { display: inline-flex; width: 18px; height: 18px; transform: rotate(90deg); }
.chat-composer-prediction-accept:active { background: var(--hover); color: var(--text-primary); }
.chat-composer-prediction-accept:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; }
.chat-composer-shared:has([data-chat-composing='true']) .chat-composer-prediction-action { display: none; }
@media (hover: hover) { .chat-composer-prediction-accept:hover { background: var(--hover); color: var(--text-primary); } }
.chat-composer-voice-status .voice-recording-bar { min-height: 24px; height: 24px; margin: 0; padding: 0; gap: 4px; border: 0; border-radius: 0; background: none; animation: none; }
.chat-composer-voice-status .voice-recording-bar.cancel-intent { color: var(--state-danger); }
.chat-composer-voice-status .voice-recording-cancel { display: grid; place-items: center; flex: none; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; color: var(--text-secondary); background: transparent; cursor: pointer; }
.chat-composer-voice-status .voice-recording-cancel:hover { color: var(--state-danger); background: var(--hover); }
.chat-composer-voice-status .voice-recording-state { display: grid; grid-template-columns: 14px max-content max-content; align-items: center; column-gap: 5px; }
.chat-composer-voice-status .voice-recording-wave { width: 14px; height: 14px; justify-self: center; }
.chat-composer-voice-status .voice-recording-hint { display: none; }
.chat-composer-voice-status .voice-recording-text, .chat-composer-voice-status .voice-recording-time { font-family: inherit; font-size: 12px; font-weight: 400; line-height: 18px; }
.chat-composer-voice-status .voice-recording-time { font-variant-numeric: tabular-nums; }
.chat-composer-model-slot[data-compact-voice='true'] .voice-recording-text { display: none; }
.chat-composer-model-slot[data-compact-voice='true'] .voice-recording-state { grid-template-columns: 14px max-content; }
@container composer (max-width: 320px) {
  .chat-composer-voice-status .voice-recording-text { display: none; }
  .chat-composer-voice-status .voice-recording-state { grid-template-columns: 14px max-content; }
}
.chat-composer-shared[data-recording='true'] .chat-composer-model-slot { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 12px; }
.chat-composer-shared[data-recording='true'] .chat-composer-model-wrap { grid-column: 2; grid-row: 1; justify-self: end; }

.chat-composer-shared .chat-rich-composer-placeholder:has(> .chat-composer-placeholder) { inset: 0; min-height: 34px; display: flex; align-items: center; white-space: normal; }
.chat-composer-shared[data-expanded='true'] .chat-rich-composer-placeholder { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .chat-composer-shared .chat-composer-entry-icon, .chat-composer-shared .agent-icon > :is(.agent-icon-main, .agent-icon-badge) { transition: none; }
}
.chat-extension-ui {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  color: var(--text-secondary);
}
.chat-extension-ui:empty { display: none; }
.chat-extension-ui > div { margin: 4px 0; }
.chat-extension-title { font-weight: 600; }
.chat-extension-ui [data-level="error"] { color: var(--danger); }
.chat-extension-widget { max-height: 12rem; overflow: auto; }

:root {
  --workspace-default-reading-line-height: 1.6;
  --workspace-reading-font-size-offset: 1px;
  --workspace-mobile-reading-padding: 16px;
}

.workspace {
  --workspace-default-reading-font-size: var(--reading-font-size);
}

.workspace :is(.chat-main-message, .chat-prompt-user, .preview-workbench-surface .markdown-preview) {
  --reading-font-size: var(--workspace-reading-font-size, var(--workspace-default-reading-font-size));
  font-family: var(--font-ui);
  font-weight: var(--reading-font-weight);
  line-height: var(--workspace-reading-line-height, var(--workspace-default-reading-line-height));
  letter-spacing: normal;
}

.workspace .chat-prompt-user {
  font-size: calc(var(--reading-font-size) - var(--workspace-reading-font-size-offset));
}

.workspace :is(.chat-main-message, .preview-workbench-surface .markdown-preview) {
  --reading-inline-code-size: calc(1em - var(--workspace-reading-font-size-offset));
  font-size: var(--reading-font-size);
}

.workspace :is(.chat-main-message, .preview-workbench-surface .markdown-preview) table {
  font-size: var(--workspace-reading-font-size, 13px);
}

/* Reading continues behind the header; the composer reserves its own layout space. */
.desktop-shell:has(> .chat-capsule-header),
.narrow-shell:has(.chat-capsule-header) {
  background: var(--surface-workspace-content);
}
.desktop-shell:has(> .chat-capsule-header) .workspace-left {
  background: linear-gradient(to bottom,
    var(--surface-workspace-content) var(--chat-capsule-header-height),
    var(--surface-sidebar) var(--chat-capsule-header-height));
}
.desktop-shell > .chat-capsule-header {
  position: absolute;
  inset: 0 0 auto;
  height: var(--chat-capsule-header-height);
  z-index: var(--layer-workspace-chrome);
}
.desktop-shell:has(> .chat-capsule-header) > .body {
  z-index: 0;
}
.desktop-shell:has(> .chat-capsule-header) .workspace-left {
  padding-top: var(--chat-capsule-header-height);
}
.desktop-shell:has(> .chat-capsule-header) .desktop-preview-peek,
.desktop-shell:has(> .chat-capsule-header) .desktop-inline-preview-pane {
  margin-top: var(--chat-capsule-header-height);
}
.desktop-shell:has(> .chat-capsule-header) .desktop-preview-peek .desktop-inline-preview-pane {
  margin-top: 0;
}
.chat-main > .chat-block {
  position: relative;
  padding-top: 90px;
  padding-bottom: 0;
  scroll-padding-block: var(--chat-capsule-header-height) var(--chat-fade-bottom-distance);
}
/* Keep the measured list height independent of the flex viewport. */
.chat-main > .chat-block > [data-virtuoso-scroller] {
  flex: 0 0 auto;
}
.chat-virtuoso-row[data-chat-tail='true'] .chat-prompt-separator {
  padding-bottom: 0;
}
.chat-main > .chat-composer {
  position: relative;
  flex: 0 0 auto;
  z-index: var(--layer-workspace-chrome);
}
.chat-main > .chat-composer.permission-open { z-index: 31; }
.chat-main > .chat-composer.menu-open { z-index: 32; }
.chat-main > .chat-session-status-overlay {
  top: calc(var(--chat-capsule-header-height) + 8px);
}
/* Endpoint spacing keeps text clear; the opaque gutter preserves native scrollbars. */
.chat-block {
  --chat-fade-bottom-distance: 10px;
  mask-image:
    linear-gradient(#000, #000),
    linear-gradient(to bottom, transparent var(--chat-fade-top-start), rgb(0 0 0 / 60%) var(--chat-fade-top-midpoint), #000 var(--chat-fade-top-end)),
    linear-gradient(to bottom, #000 calc(100% - var(--chat-fade-bottom-distance)), transparent);
  mask-size: var(--chat-scrollbar-gutter-width, 8px) 100%, 100% 100%, 100% 100%;
  mask-position: right top, left top, left top;
  mask-repeat: no-repeat;
  mask-composite: add, intersect;
}
.narrow-shell {
  --chat-capsule-header-height: calc(var(--wm-safe-area-top) + var(--chat-capsule-header-row-height));
}
.narrow-shell .content:has(> .chat-capsule-header) {
  position: relative;
}
.narrow-shell .content > .chat-capsule-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: var(--layer-workspace-chrome);
}
.narrow-shell .chat-block,
.preview-workbench-surface.mobile .markdown-preview {
  padding-inline: var(--workspace-mobile-reading-padding);
}
.narrow-shell .chat-main > .chat-block {
  padding-top: calc(var(--chat-capsule-header-height) + var(--workspace-mobile-reading-padding));
}
.preview-workbench-surface.mobile .markdown-preview {
  padding-top: var(--workspace-mobile-reading-padding);
}

/* Voice state shares the neutral input surface; existing text stays mounted. */
.chat-composer-frame .voice-recording-bar {
  min-height: 26px;
  border: 0;
  border-radius: 0;
  background: none;
  padding: 0 8px;
  margin-bottom: 6px;
  gap: 6px;
  flex-wrap: wrap;
  overflow: visible;
  color: var(--text-secondary);
  animation: none;
}
.voice-recording-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.chat-composer-frame .voice-recording-wave {
  width: 18px;
  height: 14px;
  gap: 2px;
  flex-shrink: 0;
  color: var(--accent-primary);
}
.chat-composer-frame .voice-recording-wave span {
  width: 2px;
  height: 10px;
}
.chat-composer-frame .voice-recording-text {
  flex: 0 1 auto;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.chat-composer-frame .voice-recording-time {
  font-family: inherit;
  font-size: 12px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}
.voice-recording-time::before {
  content: '·';
  margin-right: 6px;
  color: var(--text-tertiary);
}
.voice-recording-hint {
  margin-left: auto;
  font-size: 11px;
  line-height: 18px;
}
.voice-recording-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
}
.voice-recording-cancel:hover {
  background: var(--hover);
}
.chat-composer-frame .voice-recording-bar.cancel-intent {
  background: none;
  color: var(--state-danger);
}
.chat-composer-frame .voice-recording-bar.cancel-intent .voice-recording-wave,
.chat-composer-frame .voice-recording-bar.cancel-intent .voice-recording-time {
  color: var(--state-danger);
}

/* The drawer keeps its navigation lane while the toolbar shares PC positioning. */
.narrow-shell .drawer {
  width: min(440px, calc(100vw - var(--mobile-floating-control-lane) + 8px - env(safe-area-inset-right, 0px)));
  padding: calc(var(--wm-safe-area-top) + var(--chat-page-block-inset)) var(--wm-safe-area-right) 0 var(--wm-safe-area-left);
  border: 0;
  background: var(--surface-session-list);
  box-shadow: none;
  pointer-events: none;
}
.narrow-shell[data-floating-control-side='left'] .drawer {
  width: min(440px, calc(100vw - var(--mobile-floating-control-lane) + 8px - env(safe-area-inset-left, 0px)));
}
.narrow-shell .drawer.show,
.narrow-shell[data-floating-control-side='left'] .drawer,
.narrow-shell[data-floating-control-side='left'] .drawer.show {
  border: 0;
  box-shadow: none;
}
:is(.narrow-shell, .desktop-shell) .chat-session-capsule {
  --session-toolbar-control-width: 28px;
  /* Share the space below the toolbar icons with the first section heading. */
  --session-heading-space: 8px;
  --session-list-top-inset: max(0px, calc(var(--session-heading-space) - var(--chat-action-group-block-inset)));
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}
:is(.narrow-shell, .desktop-shell) .chat-session-capsule > .sidebar-scroll {
  overflow: hidden;
  background: var(--surface-session-list);
  overscroll-behavior: contain;
  margin: var(--chat-page-block-inset) 0 0;
  pointer-events: auto;
}
:is(.narrow-shell, .desktop-shell) .chat-session-capsule .session-list-nav {
  flex: 1;
  width: 100%;
  min-height: 0;
}
:is(.narrow-shell, .desktop-shell) .chat-session-capsule .chat-session-header {
  position: relative;
  z-index: 20;
  display: flex;
  flex: 0 0 var(--chat-action-group-height);
  height: var(--chat-action-group-height);
  min-height: var(--chat-action-group-height);
  padding: 0;
  align-items: flex-start;
  border: 0;
  background: transparent;
  pointer-events: none;
}
:is(.narrow-shell, .desktop-shell) .chat-session-capsule .chat-session-global-bar {
  width: calc(100% - 2 * var(--chat-session-toolbar-inline-inset));
  margin-inline: var(--chat-session-toolbar-inline-inset);
  height: var(--chat-action-group-height);
  flex: 0 0 auto;
  padding: var(--chat-action-group-block-inset) var(--chat-action-group-inset);
  align-items: center;
  justify-content: space-between;
  gap: var(--chat-action-group-gap);
  border-radius: var(--chat-action-group-radius);
  background: var(--chat-action-group-background);
  box-shadow: var(--chat-action-group-shadow);
  pointer-events: auto;
}
:is(.narrow-shell, .desktop-shell) .chat-session-capsule .chat-workspace-capsule,
:is(.narrow-shell, .desktop-shell) .chat-session-capsule .chat-session-global-bar-trailing-actions {
  height: calc(var(--chat-action-group-height) - 2 * var(--chat-action-group-block-inset));
  padding: 0;
  gap: var(--chat-action-group-gap);
  border-radius: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
}
:is(.narrow-shell, .desktop-shell) .chat-session-capsule .app-toolbar-root {
  gap: var(--chat-action-group-gap);
}
:is(.narrow-shell, .desktop-shell) .chat-session-capsule .chat-workspace-capsule .app-toolbar-mark,
:is(.narrow-shell, .desktop-shell) .chat-session-capsule .chat-workspace-capsule .app-toolbar-button,
:is(.narrow-shell, .desktop-shell) .chat-session-capsule .chat-workspace-capsule .chat-hub-summary-button,
:is(.narrow-shell, .desktop-shell) .chat-session-capsule .chat-workspace-capsule .chat-new-session-trigger,
:is(.narrow-shell, .desktop-shell) .chat-session-capsule .chat-header-archive-control > button,
:is(.narrow-shell, .desktop-shell) .chat-session-capsule .chat-session-collapse-toggle {
  width: var(--session-toolbar-control-width);
  min-width: var(--session-toolbar-control-width);
  flex: 0 0 var(--session-toolbar-control-width);
  height: var(--chat-action-control-size);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
}
:is(.narrow-shell, .desktop-shell) .chat-session-capsule .chat-workspace-capsule .chat-new-session-control {
  flex: 0 0 var(--session-toolbar-control-width);
}
@media (hover: hover) and (pointer: fine) {
  :is(.narrow-shell, .desktop-shell) .chat-session-capsule .chat-session-global-bar button:hover:not(:disabled) {
    color: var(--text-primary);
    background: var(--hover);
  }
}
:is(.narrow-shell, .desktop-shell) .chat-session-capsule .chat-session-global-bar button:not(.chat-session-collapse-toggle):is(.active, [aria-pressed='true'], [aria-expanded='true']) {
  color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 18%, var(--surface-panel));
}
/* The desktop layer shares the capsule while its empty column reserves layout space. */
.desktop-session-layer {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--chat-session-panel-width);
  z-index: var(--layer-workspace-chrome);
  pointer-events: none;
}
.desktop-session-layer > .chat-session-capsule {
  position: absolute;
  inset: 12px;
}
.desktop-shell:has(> .chat-capsule-header) .workspace-left {
  padding-top: 0;
  border: 0;
  background: var(--surface-workspace-content);
}
.desktop-shell > .chat-title-bar > .chat-session-header-spacer {
  flex: 0 0 var(--chat-session-panel-width);
  width: var(--chat-session-panel-width);
}
.desktop-shell[data-sessions-collapsed='true'] > .chat-title-bar > .chat-session-header-spacer {
  flex-basis: calc(var(--chat-workspace-collapsed-width) + 24px);
  width: calc(var(--chat-workspace-collapsed-width) + 24px);
}
.desktop-shell[data-sessions-collapsed='true'] .desktop-session-layer:not([data-management-open='true']) > .chat-session-capsule {
  width: var(--chat-workspace-collapsed-width);
  height: var(--chat-action-group-height);
  right: auto;
  bottom: auto;
  background: var(--chat-action-group-background);
  box-shadow: none;
}
.desktop-shell[data-sessions-collapsed='true'] .chat-session-capsule .chat-session-header .chat-session-global-bar {
  display: flex;
  position: static;
  width: 100%;
  height: var(--chat-action-group-height);
}
.desktop-shell[data-sessions-collapsed='true'] .chat-session-capsule .chat-session-global-bar-trailing-actions {
  display: inline-flex;
}
.desktop-shell[data-sessions-collapsed='true'] .chat-session-capsule .chat-header-archive-control,
.chat-session-capsule[data-collapsed='true'] > .sidebar-scroll,
.chat-session-capsule[data-inactive='true'] > .sidebar-scroll {
  display: none;
}
.desktop-session-layer[data-management-open='true'] > .chat-session-capsule {
  height: var(--chat-action-group-height);
  bottom: auto;
  background: var(--chat-action-group-background);
  box-shadow: none;
}

/* Preview shares one neutral glass material and one capsule geometry. */
.browser-tab-status {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}
.browser-tab-status > span { display: inline-flex; }
.browser-tab-status .sl-icon { width: 14px; height: 14px; }
.preview-workbench-surface .workbench-tab.has-icon-slot {
  grid-template-columns: var(--preview-browser-tab-icon-size) minmax(0, 1fr) var(--preview-tab-close-size);
}
.preview-workbench-surface .workbench-tab.has-icon-slot .workbench-tab-open { padding-left: 0; }
.browser-tab-control {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--preview-browser-tab-icon-size, 28px);
  height: var(--preview-browser-tab-icon-size, 28px);
}
.browser-tab-control:has(.browser-takeover-button) > .browser-tab-status { display: none; }
.browser-tab-control-target { display: contents; }
.browser-tab-control .browser-takeover-button { width: var(--preview-browser-tab-icon-size, 28px); height: var(--preview-browser-tab-icon-size, 28px); }
.browser-tab-control .browser-takeover-button .sl-icon { width: 14px; height: 14px; }
.chat-preview-icon-button.browser-takeover-button[aria-pressed='true'],
.chat-preview-icon-button.browser-takeover-button[aria-pressed='true']:hover { color: var(--success, #36a269); }

.workspace {
  --preview-glass: color-mix(in srgb, var(--surface-panel) 74%, transparent);
  --preview-glass-edge: color-mix(in srgb, var(--text-primary) 9%, transparent);
  --preview-glass-filter: blur(22px) saturate(1.12);
  --preview-glass-shadow: 0 5px 20px rgb(0 0 0 / 12%);
  --preview-navigation-height: 56px;
  --preview-navigation-inset: 5px;
  --preview-navigation-radius: calc(var(--preview-navigation-height) / 2);
  --preview-navigation-item-radius: calc(var(--preview-navigation-radius) - var(--preview-navigation-inset) - 1px);
  --preview-navigation-item-height: calc(var(--preview-navigation-height) - 2 * var(--preview-navigation-inset) - 2px);
  --preview-context-height: 28px;
  --preview-fullscreen-top: calc(var(--workbench-tabbar-height) + var(--preview-context-height) + 8px);
}

.preview-page-actions,
.preview-workbench-surface .terminal-workbench .workbench-chrome-actions {
  border-left: 0;
  padding-left: 0;
}

.preview-page-actions[hidden],
.preview-workbench-breadcrumbs[hidden],
.preview-workbench-content-kind-selection[hidden],
.preview-common-tools[hidden],
.preview-titlebar [hidden],
.preview-resource-search-target[hidden],
.floating-control-stack-layer[hidden] {
  display: none !important;
}

.preview-workbench-surface .preview-page-actions .chat-preview-icon-button > .sl-icon {
  width: 18px;
  height: 18px;
}

.preview-workbench-breadcrumbs {
  display: flex;
  flex: 0 0 var(--preview-context-height);
  min-width: 0;
  align-items: center;
  padding: 0 var(--preview-resource-safe-right, 0px) 0 var(--preview-resource-safe-left, 0px);
  color: var(--text-tertiary);
}

.preview-workbench-surface > .preview-common-tools {
  position: absolute;
  inset: var(--preview-fullscreen-top) max(12px, var(--wm-safe-area-right)) auto auto;
  z-index: 10;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--preview-glass-edge);
  border-radius: 50%;
  background: var(--preview-glass);
  backdrop-filter: var(--preview-glass-filter);
  -webkit-backdrop-filter: var(--preview-glass-filter);
  box-shadow: var(--preview-glass-shadow);
}

.preview-workbench-surface .preview-common-tools .chat-preview-icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .preview-workbench-surface > .preview-common-tools {
    background: var(--surface-panel);
    border-color: var(--border-strong);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* The title capsules join the open Preview pane without a dividing rail. */
.desktop-shell:has(.preview-titlebar) {
  --chat-window-controls-reserve: 0px;
}

.desktop-shell > .chat-title-bar:has(.preview-titlebar) {
  padding-right: 0;
}

.chat-title-actions:has(> .preview-titlebar) {
  flex: 0 0 auto;
  min-width: 0;
  margin-right: 12px;
  align-self: stretch;
}

.preview-titlebar {
  --preview-titlebar-window-width: 0px;
  --preview-titlebar-divider-width: 0px;
  --preview-titlebar-open-tools-width: 36px;
  --preview-titlebar-expanded-width: var(--preview-titlebar-width, var(--preview-titlebar-fallback-width, 520px));
  --preview-titlebar-navigation-width: var(--preview-titlebar-navigation-full-width, 178px);
  flex: 0 0 auto;
  width: var(--preview-titlebar-expanded-width);
  max-width: calc(100vw - var(--chat-session-panel-width) - 24px);
  height: 32px;
  align-self: center;
  padding: 0 4px;
  gap: 0;
  overflow: visible;
  border: 0;
  border-radius: 16px;
  background: var(--chat-action-group-background);
  box-shadow: var(--chat-action-group-shadow);
  transition: width var(--motion-emphasized) var(--ease-drawer);
}

.preview-titlebar:has([data-desktop-window-controls]) {
  --preview-titlebar-window-width: 108px;
  --preview-titlebar-divider-width: 7px;
  --preview-titlebar-open-tools-width: 151px;
}

.preview-titlebar.is-compact {
  --preview-titlebar-navigation-width: 58px;
}

.preview-titlebar.is-collapsed {
  width: min(var(--preview-titlebar-expanded-width), calc(var(--preview-titlebar-navigation-width) + var(--preview-titlebar-window-width) + var(--preview-titlebar-divider-width) + 8px));
}

.desktop-shell:has(.desktop-inline-preview-pane.is-resizing) .preview-titlebar {
  transition: none;
}

.preview-titlebar::before {
  display: none;
}

.preview-titlebar.is-open {
  height: 32px;
  align-self: center;
  padding: 0 4px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(to bottom, var(--chat-action-group-background), var(--surface-workspace-content));
  box-shadow: none;
}

.preview-titlebar.is-open::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 21;
  border: 1px solid var(--border-subtle);
  border-bottom: 0;
  border-radius: inherit;
  pointer-events: none;
}

.preview-titlebar-function {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
}

.preview-titlebar-navigation {
  flex: 0 0 var(--preview-titlebar-navigation-width);
  width: var(--preview-titlebar-navigation-width);
  min-width: 0;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.preview-titlebar-collapse,
.preview-titlebar-page-tools .chat-preview-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.preview-titlebar-page-tools {
  position: absolute;
  right: calc(var(--preview-titlebar-open-tools-width) + 4px);
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: 28px;
  justify-content: flex-end;
  height: 32px;
}

.preview-titlebar.is-collapsed .preview-titlebar-page-tools {
  opacity: 0;
}

.preview-titlebar[data-expanding='true'] .preview-titlebar-page-tools,
.preview-titlebar[data-expanding='true'] .preview-common-tools.desktop {
  transition: opacity var(--motion-fast) var(--ease-out) 110ms, visibility 0s linear 110ms;
}

@starting-style {
  .preview-titlebar[data-expanding='true'] .preview-common-tools.desktop {
    opacity: 0;
    visibility: hidden;
  }
}

.preview-titlebar-divider {
  display: none;
}

.preview-titlebar.is-collapsed:has([data-desktop-window-controls]) .preview-titlebar-divider {
  display: block;
  flex: 0 0 1px;
  width: 1px;
  height: 12px;
  margin-inline: 3px;
  background: var(--border-subtle);
  pointer-events: none;
}

.preview-titlebar-page-tools .preview-page-actions {
  padding: 0;
  margin: 0;
  border: 0;
}

.preview-titlebar-page-tools .sl-icon {
  width: 18px;
  height: 18px;
}

.preview-titlebar-search {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
}

.preview-workbench-content-kind-picker.toolbar .preview-workbench-content-kind-tabs {
  overflow: hidden;
}

.preview-titlebar .preview-workbench-content-kind-picker.menu-only .preview-workbench-content-kind-tabs {
  display: none;
}

.preview-titlebar .preview-workbench-content-kind-tabs {
  align-items: center;
  gap: 2px;
}

.preview-titlebar .preview-workbench-content-kind {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.preview-titlebar .preview-workbench-content-kind.active::after {
  display: none;
}

.preview-titlebar .preview-workbench-content-kind > .sl-icon,
.preview-titlebar .preview-workbench-content-kind-more > .sl-icon {
  width: 18px;
  height: 18px;
}

.preview-titlebar .preview-workbench-content-kind-more {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.preview-titlebar > .preview-titlebar-tools {
  flex: 0 0 auto;
  align-self: center;
  height: 32px;
  min-width: 36px;
  justify-content: flex-end;
}

.preview-titlebar-tools:has([data-desktop-window-controls]) {
  min-width: 151px;
}

.preview-titlebar.is-open .preview-titlebar-tools:has([data-desktop-window-controls])::before {
  content: '';
  flex: 0 0 1px;
  width: 1px;
  height: 12px;
  margin-inline: 3px;
  background: var(--border-subtle);
  pointer-events: none;
}

.preview-titlebar.is-collapsed .preview-titlebar-tools {
  min-width: var(--preview-titlebar-window-width);
}

.preview-titlebar.is-searching .preview-titlebar-tools:has([data-desktop-window-controls]) {
  min-width: 108px;
}

.preview-titlebar-tools > .preview-common-tools.desktop {
  order: -1;
  flex: 0 0 36px;
  align-self: center;
  width: 36px;
  height: 32px;
  margin: 0;
  padding: 0;
}

.preview-titlebar-tools .preview-common-tools.desktop .chat-preview-icon-button {
  width: 36px;
  height: 32px;
  border-radius: 0;
}

.preview-titlebar-tools > .desktop-window-controls {
  position: static;
  width: 108px;
  height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.preview-titlebar-tools .desktop-titlebar-button {
  position: relative;
  isolation: isolate;
  width: 36px;
}

.preview-titlebar-tools .desktop-titlebar-button::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: var(--chat-action-group-inset, 4px) 0;
  background: transparent;
  pointer-events: none;
  transition: background-color var(--motion-fast) var(--ease-standard);
}

.preview-titlebar-tools .desktop-titlebar-button:hover {
  background: transparent;
}

.preview-titlebar-tools .desktop-titlebar-button:hover::before {
  background: var(--hover);
}

.preview-titlebar-tools .desktop-titlebar-close::before {
  border-radius: 0 calc(var(--chat-action-group-radius, 16px) - var(--chat-action-group-inset, 4px))
    calc(var(--chat-action-group-radius, 16px) - var(--chat-action-group-inset, 4px)) 0;
}

.preview-titlebar.is-open .desktop-titlebar-close::before {
  border-bottom-right-radius: 0;
}

.preview-titlebar-tools .desktop-titlebar-close:hover::before {
  background: #c42b1c;
}

.desktop-shell:has(.preview-titlebar) .desktop-inline-preview-pane {
  margin: 0 12px 12px 0;
  border: 0;
  border-radius: 0 0 16px 16px;
  background: var(--surface-workspace-content);
  box-shadow: var(--shadow-floating);
}

.desktop-shell:has(.preview-titlebar) .desktop-inline-preview-pane::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 21;
  border: 1px solid var(--border-subtle);
  border-top: 0;
  border-radius: inherit;
  pointer-events: none;
}

.desktop-shell:has(.preview-titlebar) .desktop-inline-preview-pane.is-collapsed {
  margin-right: 0;
  box-shadow: none;
}

.desktop-shell:has(.preview-titlebar) .desktop-preview-peek {
  margin-top: 44px;
}

.desktop-shell:has(.preview-titlebar) .desktop-preview-peek:has(> .preview-navigation-dock.is-pinned) {
  margin-top: 50px;
}

.desktop-inline-preview-pane .preview-workbench-surface {
  background: transparent;
}

.desktop-inline-preview-pane .preview-workbench-body {
  padding-left: 0;
}

.desktop-shell[data-inline-preview-maximized='true'] .preview-titlebar {
  width: 100%;
  max-width: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .preview-titlebar,
  .preview-titlebar[data-expanding='true'] .preview-titlebar-page-tools,
  .preview-titlebar[data-expanding='true'] .preview-common-tools.desktop,
  .preview-titlebar-tools .desktop-titlebar-button::before {
    transition: none;
  }
}

/* Searching occupies the existing resource row instead of covering reading tools. */
.preview-resource-search-target {
  position: absolute;
  inset: 0 0 auto;
  z-index: 12;
  height: calc(var(--preview-resource-row-height) + var(--wm-safe-area-top));
  padding: var(--wm-safe-area-top) max(8px, var(--wm-safe-area-right)) 0 max(8px, var(--wm-safe-area-left));
}

.preview-workbench-surface.mobile.is-searching > .workbench-chrome-tabs-row,
.preview-workbench-surface.mobile.is-searching .workbench-chrome-companion-main > .workbench-chrome-tabs-row {
  visibility: hidden;
}

.preview-workbench-search-hud.is-in-header {
  position: static;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.preview-workbench-search-hud.is-in-header .preview-workbench-search-bar {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  gap: 2px;
  padding: 0 2px;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  background: none;
  animation: none;
}

.preview-workbench-search-hud.is-in-header .search-result-status {
  flex: 0 1 auto;
  min-width: 24px;
  max-width: 76px;
  font-variant-numeric: tabular-nums;
}

.preview-workbench-search-hud.is-in-header:focus-within .preview-workbench-search-bar {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-primary) 48%, var(--border-subtle));
}

@media (hover: hover) and (pointer: fine) {
  .preview-titlebar-collapse:hover,
  .preview-titlebar-page-tools .chat-preview-icon-button:hover {
    background: var(--hover);
    color: var(--text-primary);
  }
}

.preview-titlebar-collapse:active,
.preview-workbench-surface .chat-preview-icon-button:active:not(:disabled) {
  background: var(--hover);
}

@media (hover: none), (pointer: coarse) {
  .preview-titlebar button:hover,
  .preview-workbench-surface .chat-preview-icon-button:hover,
  .preview-workbench-content-kind-picker .preview-workbench-content-kind-more:hover {
    background: transparent;
  }
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .preview-titlebar.is-collapsed .preview-workbench-content-kind,
  .desktop-shell:has(.preview-titlebar) .desktop-inline-preview-pane {
    background: var(--surface-panel);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.edge-surface-dock {
  pointer-events: none;
}

.edge-surface-dock > * {
  pointer-events: auto;
}

/* Resource rows share one geometry; the Wiki reader keeps its own toolbar. */
.preview-workbench-surface,
html[data-wheelmaker-preview] {
  --preview-resource-row-height: 34px;
  --preview-resource-control-height: 28px;
  --preview-resource-tab-height: 33px;
  --preview-resource-action-height: 30px;
  --preview-browser-tab-icon-size: 28px;
  --preview-tab-close-size: 24px;
  --preview-resource-inline-padding: 4px;
  --preview-resource-font-size: 12px;
  --preview-resource-safe-top: 0px;
  --preview-resource-safe-left: 0px;
  --preview-resource-safe-right: 0px;
  --preview-resource-safe-bottom: 0px;
}

.preview-workbench-surface.mobile,
html[data-wheelmaker-preview='mobile'] {
  --preview-resource-safe-top: var(--wm-safe-area-top, 0px);
  --preview-resource-safe-left: var(--wm-safe-area-left, 0px);
  --preview-resource-safe-right: var(--wm-safe-area-right, 0px);
  --preview-resource-safe-bottom: var(--wm-safe-area-bottom, 0px);
}

.preview-workbench-surface,
.preview-workbench-surface .terminal-workbench {
  --workbench-tabbar-height: var(--preview-resource-row-height);
  --workbench-control-height: var(--preview-resource-control-height);
  --preview-resource-color: var(--text-secondary);
  --preview-resource-hover: var(--hover);
  --preview-resource-font-family: var(--font-ui);
}

.preview-workbench-surface {
  --surface-workspace-content: var(--surface-session-list);
  --preview-breadcrumb-surface: var(--surface-session-list);
}

.preview-workbench-surface > .workbench-chrome-tabs-row,
.preview-workbench-surface :is(.terminal-workbench, .workbench-chrome-companion-main) > .workbench-chrome-tabs-row,
.preview-workbench-surface .browser-preview-toolbar {
  box-sizing: border-box;
  height: calc(var(--preview-resource-row-height) + var(--preview-resource-safe-top));
  min-height: calc(var(--preview-resource-row-height) + var(--preview-resource-safe-top));
  flex: 0 0 calc(var(--preview-resource-row-height) + var(--preview-resource-safe-top));
  align-items: center;
  gap: 4px;
  padding: var(--preview-resource-safe-top) max(var(--preview-resource-inline-padding), var(--preview-resource-safe-right)) 0 max(var(--preview-resource-inline-padding), var(--preview-resource-safe-left));
  border: 0;
  background: transparent;
  color: var(--preview-resource-color);
  font-family: var(--preview-resource-font-family);
  font-size: var(--preview-resource-font-size);
  line-height: 1.4;
}

.preview-workbench-surface .browser-preview-toolbar {
  --preview-resource-safe-top: 0px;
  container: preview-web-navigation / inline-size;
}

.browser-preview-toolbar .preview-web-navigation-title {
  flex: 1 1 auto;
  max-width: none;
}

@container preview-web-navigation (max-width: 440px) {
  .browser-preview-session-title {
    display: none;
  }
}

.preview-workbench-surface .browser-preview-toolbar input {
  height: var(--preview-resource-control-height);
  min-height: 0;
  font-size: var(--preview-resource-font-size);
  border-radius: 999px;
}

.preview-workbench-surface .workbench-chrome-tabs {
  padding: 0;
}

/* The same compact strip, controls and attached tabs serve every Preview host. */
.preview-workbench-surface {
  --preview-tab-strip-default: var(--surface-canvas);
  --preview-tab-strip-surface: var(--desktop-tab-strip-surface, var(--preview-tab-strip-default));
  --preview-tab-radius: var(--desktop-preview-tab-radius, 8px);
}

.theme-light .preview-workbench-surface {
  --preview-tab-strip-default: var(--surface-raised);
}

.preview-workbench-surface > .workbench-chrome-tabs-row,
.preview-workbench-surface :is(.terminal-workbench, .workbench-chrome-companion-main) > .workbench-chrome-tabs-row {
  align-items: stretch;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: var(--preview-tab-radius) 0 0 0;
  background: var(--preview-tab-strip-surface);
  padding-left: var(--preview-resource-safe-left);
}

.preview-workbench-surface .workbench-chrome-tabs {
  align-items: flex-end;
  gap: 2px;
  margin-bottom: -1px;
  padding-top: 1px;
}

.preview-workbench-surface .workbench-chrome-tabs .preview-empty-resource-label {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
}

.preview-workbench-surface .workbench-tab {
  height: var(--preview-resource-tab-height);
  border-radius: var(--preview-tab-radius) var(--preview-tab-radius) 0 0;
}

.preview-workbench-surface .workbench-tab.active {
  background: var(--surface-workspace-content);
  box-shadow: inset 0 1px var(--border-subtle), inset 1px 0 var(--border-subtle), inset -1px 0 var(--border-subtle);
}

.preview-workbench-surface .preview-page-actions,
.preview-workbench-surface .terminal-workbench .workbench-chrome-actions {
  position: relative;
  align-self: flex-end;
  height: var(--preview-resource-action-height);
  gap: 2px;
  margin: 0 0 -1px;
  padding: 0 0 0 8px;
  border: 0;
}

.preview-workbench-surface .preview-page-actions::before,
.preview-workbench-surface .terminal-workbench .workbench-chrome-actions::before {
  content: '';
  position: absolute;
  top: calc((var(--preview-resource-action-height) - 18px) / 2);
  left: 0;
  width: 1px;
  height: 18px;
  background: var(--border-subtle);
}

.preview-workbench-surface .preview-page-actions .chat-preview-icon-button,
.preview-workbench-surface .terminal-workbench .workbench-chrome-actions .chat-preview-icon-button,
.preview-workbench-surface .browser-preview-toolbar button,
.preview-workbench-surface .preview-workbench-tabs-overflow-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--preview-resource-control-height);
  width: var(--preview-resource-control-height);
  min-width: var(--preview-resource-control-height);
  height: var(--preview-resource-control-height);
  min-height: var(--preview-resource-control-height);
  padding: 0;
  border: 0;
  border-radius: 999px;
}

.preview-workbench-surface .preview-page-actions .chat-preview-icon-button,
.preview-workbench-surface .terminal-workbench .workbench-chrome-actions .chat-preview-icon-button {
  border-radius: 4px;
}

.preview-workbench-surface .preview-page-actions .sl-icon,
.preview-workbench-surface .terminal-workbench .workbench-chrome-actions .sl-icon,
.preview-workbench-surface .browser-preview-toolbar .sl-icon {
  width: 18px;
  height: 18px;
}

.preview-workbench-surface :is(.workbench-tab-open, .preview-empty-resource-label) {
  font-family: var(--preview-resource-font-family);
  font-size: var(--preview-resource-font-size);
  line-height: 1.4;
}

html[data-wheelmaker-preview-focused='true'] .topbar {
  display: none;
}

html[data-wheelmaker-preview-focused='true'] .knowledge-directory {
  top: 0;
  height: 100dvh;
}

.preview-workbench-surface :is(.chat-file-peek-scroll, .native-webview-surface) {
  padding-bottom: var(--preview-resource-safe-bottom);
}

.preview-workbench-surface .native-webview-surface {
  padding-top: 0;
}

.preview-workbench-surface .search-action-button {
  flex-basis: var(--preview-resource-control-height);
  width: var(--preview-resource-control-height);
  height: var(--preview-resource-control-height);
}

.preview-workbench-surface .search-field-submit {
  flex-basis: 16px;
  width: 16px;
  height: var(--preview-resource-control-height);
}

.preview-workbench-surface .overlay-search-input {
  font-size: 14px;
}

/* Desktop chrome floats above edge-attached content surfaces. */
.desktop-shell:has(> .chat-capsule-header) {
  --desktop-frame-inset: var(--chat-session-toolbar-inline-inset);
  --desktop-frame-block-inset: var(--chat-page-block-inset);
  --desktop-frame-radius: 16px;
  --desktop-divider-inset: 8px;
  --desktop-resize-highlight: linear-gradient(to bottom, transparent, var(--accent-primary) 48%, var(--accent-primary) 52%, transparent);
  --desktop-preview-resize-gutter: var(--desktop-divider-inset);
  --desktop-preview-tab-radius: max(0px, calc(var(--desktop-frame-radius) - var(--desktop-preview-resize-gutter)));
  --desktop-top-surface: var(--surface-sidebar);
  --desktop-content-surface: var(--surface-workspace-content);
  --desktop-frame-edge: transparent;
  --desktop-tab-strip-surface: var(--surface-raised);
  background: var(--desktop-top-surface);
}

/* Match the light frame's shared side surface while keeping Chat deep. */
.theme-dark .desktop-shell:has(> .chat-capsule-header) {
  --desktop-top-surface: var(--surface-panel);
  --desktop-frame-edge: var(--border-subtle);
  --desktop-tab-strip-surface: var(--surface-canvas);
}

.desktop-shell:has(> .chat-capsule-header) .workspace-left {
  background: transparent;
}

.desktop-shell > .chat-capsule-header {
  min-height: var(--chat-capsule-header-height);
}

/* The panel itself owns clipping and scrolling below the title capsules. */
.desktop-shell:has(> .chat-capsule-header) .workspace-right {
  --surface-workspace-content: var(--desktop-content-surface);
  position: relative;
  margin-top: var(--chat-capsule-header-height);
  border-radius: var(--desktop-frame-radius) var(--desktop-frame-radius) 0 0;
  background: var(--surface-workspace-content);
  outline: 1px solid var(--desktop-frame-edge);
  outline-offset: -1px;
}

.desktop-session-divider {
  position: relative;
  flex: 0 0 0;
  z-index: calc(var(--layer-workspace-chrome) + 1);
}

.desktop-session-resize-handle {
  position: absolute;
  inset: var(--chat-capsule-header-height, 44px) auto 0 -4px;
  width: 9px;
  cursor: col-resize;
  touch-action: none;
}

.desktop-primary-body:has(.desktop-session-resize-handle[data-resizing='true']) > .workspace-left {
  transition: none;
}

.desktop-session-resize-handle::after,
.desktop-shell .preview-editor-resize-handle::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 4px;
  width: 1px;
  background: var(--desktop-resize-highlight);
  opacity: 0;
  pointer-events: none;
}

.desktop-session-resize-handle:is(:hover, :focus-visible, [data-resizing='true'])::after,
.desktop-shell .preview-editor-resize-handle:is(:hover, :focus-visible, .resizing)::after {
  opacity: 1;
}

.desktop-shell .chat-main > .chat-block {
  padding-top: 34px;
  scroll-padding-top: 0;
  mask-image:
    linear-gradient(#000, #000),
    linear-gradient(to bottom, #000 calc(100% - var(--chat-fade-bottom-distance)), transparent);
  mask-size: var(--chat-scrollbar-gutter-width, 8px) 100%, 100% 100%;
  mask-position: right top, left top;
  mask-repeat: no-repeat;
  mask-composite: add;
}

.desktop-shell .chat-main > .chat-session-status-overlay {
  top: 8px;
}

.desktop-shell .chat-main[data-chat-search-open='true'] > .chat-block {
  padding-top: 66px;
}

.desktop-session-layer > .chat-session-capsule {
  inset: var(--desktop-frame-block-inset) 0 0;
}

.desktop-shell .chat-session-capsule .chat-session-global-bar {
  width: calc(100% - var(--chat-session-toolbar-inline-inset) - var(--desktop-divider-inset));
  margin-inline-end: var(--desktop-divider-inset);
}

.desktop-shell .chat-session-capsule > .sidebar-scroll {
  transform: translateX(0);
  transition: transform var(--motion-session-panel);
}

.desktop-shell[data-sessions-collapsed='true'] .desktop-session-layer:not([data-management-open='true']) > .chat-session-capsule {
  width: var(--chat-session-panel-width);
  height: auto;
  right: 0;
  bottom: 0;
  background: transparent;
}

.desktop-shell[data-sessions-collapsed='true'] .chat-session-capsule .chat-session-header .chat-session-global-bar {
  width: var(--chat-workspace-collapsed-width);
}

.desktop-shell[data-sessions-collapsed='true'] .desktop-session-layer:not([data-management-open='true']) > .chat-session-capsule > .sidebar-scroll {
  display: flex;
  pointer-events: none;
  transform: translateX(-100%);
}

.desktop-session-layer[data-management-open='true'] > .chat-session-capsule {
  background: transparent;
}

.desktop-shell .chat-title-actions:has(> .preview-titlebar) {
  margin-right: var(--desktop-frame-inset);
}

.desktop-shell[data-desktop-window-controls='true'] .chat-title-actions:has(> .preview-titlebar) {
  margin-right: calc(var(--desktop-window-controls-width) + var(--desktop-frame-inset));
}

.desktop-shell .preview-titlebar {
  --preview-titlebar-inline-inset: 12px;
  --preview-titlebar-native-reserve: 0px;
  width: calc(var(--preview-titlebar-expanded-width) - var(--preview-titlebar-inline-inset) - var(--preview-titlebar-native-reserve) - var(--desktop-divider-inset));
}

.desktop-shell[data-desktop-window-controls='true'] .preview-titlebar {
  --preview-titlebar-native-reserve: var(--desktop-window-controls-width);
}

.desktop-shell .preview-titlebar:has([data-desktop-window-controls]) {
  --preview-titlebar-window-width: 0px;
  --preview-titlebar-divider-width: 0px;
  --preview-titlebar-open-tools-width: 36px;
}

.desktop-shell .preview-titlebar.is-open {
  border-radius: var(--chat-action-group-radius);
  background: var(--chat-action-group-background);
  box-shadow: var(--chat-action-group-shadow);
}

.desktop-shell .preview-titlebar.is-open.is-searching:focus-within {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-primary) 48%, var(--border-subtle));
}

.desktop-shell .preview-titlebar.is-searching .preview-workbench-search-hud.is-in-header:focus-within .preview-workbench-search-bar {
  box-shadow: none;
}

.desktop-shell .preview-titlebar.is-open::after,
.desktop-shell .preview-titlebar.is-collapsed:has([data-desktop-window-controls]) .preview-titlebar-divider,
.desktop-shell .preview-titlebar.is-open .preview-titlebar-tools::before {
  display: none;
}

.desktop-shell .preview-titlebar.is-collapsed {
  width: calc(var(--preview-titlebar-navigation-width) + 8px);
}

.desktop-shell .preview-titlebar.is-collapsed .preview-titlebar-function {
  overflow: clip;
  overflow-clip-margin: 2px;
}

.desktop-shell .preview-titlebar-tools:has([data-desktop-window-controls]) {
  min-width: 36px;
}

.desktop-shell .preview-titlebar.is-collapsed .preview-titlebar-tools:has([data-desktop-window-controls]),
.desktop-shell .preview-titlebar.is-searching .preview-titlebar-tools:has([data-desktop-window-controls]) {
  min-width: 0;
}

/* Window actions belong to the window, including when Preview is collapsed. */
.workspace:has(> .desktop-shell) .desktop-window-controls,
.desktop-shell .preview-titlebar-tools > .desktop-window-controls {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--desktop-window-controls-width);
  height: var(--chat-capsule-header-height, 44px);
  border: 0;
  border-radius: 0;
  background: transparent;
}

.desktop-shell .preview-titlebar-tools .desktop-titlebar-button {
  width: 46px;
}

.desktop-shell .preview-titlebar-tools .desktop-titlebar-button::before {
  inset: 0;
  border-radius: 0;
}

.desktop-shell:has(.preview-titlebar) .desktop-inline-preview-pane {
  --surface-workspace-content: var(--desktop-side-surface);
  margin: 0;
  border-left: 0;
  border-radius: var(--desktop-frame-radius) 0 0 0;
  background: var(--desktop-side-surface);
  box-shadow: none;
}

.desktop-shell .desktop-inline-preview-pane.is-open,
.desktop-shell .preview-navigation-dock.is-pinned .preview-navigation-dock-panel {
  outline: 1px solid var(--desktop-frame-edge);
  outline-offset: -1px;
}

.desktop-shell:has(.preview-titlebar) .desktop-inline-preview-pane::after {
  display: none;
}

.desktop-shell:has(.preview-titlebar) .desktop-preview-peek {
  margin-top: var(--chat-capsule-header-height);
  background: transparent;
}

.desktop-shell:has(.preview-titlebar) .desktop-preview-peek:has(> .preview-navigation-dock.is-pinned) {
  margin-top: var(--chat-capsule-header-height);
  margin-right: 0;
  margin-bottom: 0;
}

/* Outline shares the side-panel surface in both floating and pinned states. */
.desktop-shell .preview-navigation-dock-panel:has(> .mode-outline) {
  background: var(--desktop-side-surface);
}

.desktop-shell .preview-navigation-dock-panel:has(> .mode-outline) > :is(.preview-navigation-dock-toolbar, .preview-navigation-dock-content) {
  background: transparent;
}

.desktop-shell[data-inline-preview-maximized='true'] .preview-titlebar {
  width: 100%;
}

/* Background and document travel together, without a second text entrance. */
.desktop-shell .desktop-inline-preview-editor {
  box-sizing: border-box;
  padding-left: var(--desktop-preview-resize-gutter);
  background: var(--desktop-side-surface);
}

/* Reserve the same continuous gutter for tabs, iframes and native webpages. */
.desktop-shell .desktop-inline-preview-pane .preview-workbench-body {
  padding-left: 0;
}


.desktop-shell .preview-editor-resize-handle {
  width: var(--desktop-preview-resize-gutter);
  background: var(--desktop-side-surface);
}

.desktop-shell .preview-editor-resize-handle::before {
  width: 100%;
}

.desktop-shell .preview-editor-resize-handle::after {
  left: 0;
}

.desktop-shell[data-inline-preview-maximized='true'] .desktop-inline-preview-editor {
  padding-left: 0;
}

.desktop-shell .desktop-inline-preview-pane .preview-workbench-rendered-tab.active {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .desktop-shell .chat-session-capsule > .sidebar-scroll {
    transition: none;
  }
}

.narrow-shell[data-foldable-pane] {
  position: relative;
  --foldable-divider-width: 8px;
}

.narrow-shell[data-foldable-pane] .chat-session-capsule {
  --chat-session-toolbar-inline-inset: 6px;
  --chat-action-group-gap: 1px;
}

.narrow-shell[data-foldable-pane]:not([data-foldable-pane='none']) > .drawer-overlay {
  display: none;
}

.narrow-shell[data-foldable-pane] > .drawer:not(.show) {
  visibility: hidden;
  transition: none;
}

.narrow-shell[data-foldable-pane='none'] > .drawer {
  inset: 0 auto 0 0;
  padding-inline-end: 0;
}

.narrow-shell[data-foldable-pane='none'] > .drawer:not(.show) {
  transform: translateX(-100%);
}

.narrow-shell[data-foldable-pane='none'] > .drawer.show {
  pointer-events: auto;
}

.narrow-shell[data-foldable-pane='sessions'] > .drawer.show {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--foldable-pane-width);
  padding: calc(var(--wm-safe-area-top) + var(--chat-page-block-inset)) 0 0 var(--wm-safe-area-left);
  transform: none;
  border: 0;
  border-inline-end: 1px solid var(--border-subtle);
  box-shadow: none;
  transition: none;
  pointer-events: auto;
}

.narrow-shell[data-foldable-pane='sessions'] > .body {
  margin-inline-start: calc(var(--foldable-pane-width) + var(--foldable-divider-width));
}

.narrow-shell[data-foldable-pane='preview'] > .body {
  margin-inline-end: calc(var(--foldable-pane-width) + var(--foldable-divider-width));
}

.narrow-shell[data-foldable-preview-fullscreen] > .body[hidden] {
  display: none;
}

.narrow-shell[data-foldable-pane] > .chat-preview-mobile-overlay {
  position: absolute;
  inset: 0 0 0 auto;
  width: var(--foldable-pane-width, 0px);
  min-width: 0;
  flex-direction: column;
  border-inline-start: 1px solid var(--border-subtle);
}

.narrow-shell[data-foldable-preview-fullscreen] > .chat-preview-mobile-overlay {
  inset-inline: 0;
  width: 100%;
  border-inline-start: 0;
}

.narrow-shell:has(> .foldable-pane-divider[data-resizing]) > :is(.drawer.show, .chat-preview-mobile-overlay) {
  overflow: clip;
}

.floating-control-stack[data-layout-controls] {
  gap: 8px;
}

.foldable-pane-divider {
  --foldable-divider-hit-width: 24px;
  position: absolute;
  inset-block: var(--wm-safe-area-top) var(--wm-safe-area-bottom);
  z-index: 71;
  width: var(--foldable-divider-hit-width);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}

[data-foldable-divider='sessions']:not([data-foldable-edge]) {
  inset-inline-start: calc(var(--foldable-pane-width) - 8px);
}

[data-foldable-divider='preview']:not([data-foldable-edge]) {
  inset-inline-end: calc(var(--foldable-pane-width) - 8px);
}

[data-foldable-preview-fullscreen] > [data-foldable-divider='preview'] {
  inset-inline: 0 auto;
}

.foldable-pane-divider[data-foldable-edge] {
  /* Keep the handle center aligned with the divider when the pane opens. */
  width: var(--foldable-divider-width);
  height: 64px;
  margin-block: auto;
  touch-action: pan-y;
}

.foldable-pane-divider[data-foldable-edge]::after {
  position: absolute;
  inset-block: 0;
  width: var(--foldable-divider-hit-width);
  content: '';
}

[data-foldable-divider='sessions'][data-foldable-edge] {
  inset-inline-start: var(--wm-safe-area-left);
}

[data-foldable-divider='preview'][data-foldable-edge] {
  inset-inline-end: var(--wm-safe-area-right);
}

[data-foldable-divider='sessions'][data-foldable-edge]::after {
  inset-inline-start: 0;
}

[data-foldable-divider='preview'][data-foldable-edge]::after {
  inset-inline-end: 0;
}

.foldable-pane-divider::before {
  position: absolute;
  inset: 0;
  width: 3px;
  height: 42px;
  margin: auto;
  border-radius: 2px;
  background: var(--text-tertiary);
  content: '';
}

.foldable-pane-divider:is(:hover, :focus-visible, [data-resizing])::before {
  background: var(--accent-primary);
}

/* Settings and Hubs replace content below the shared desktop title capsules. */
:is(.desktop-management-surface, .settings-workbench-screen, .chat-hub-workbench-mobile) { --management-content-max-width: 840px; }
.desktop-hub-host:has(.desktop-management-surface.is-expanded)::before {
  content: '';
  position: absolute;
  inset: var(--chat-capsule-header-height, 44px) 0 0;
  background: var(--desktop-side-surface, var(--surface-sidebar));
}
.desktop-management-surface {
  --management-content-max-width: var(--chat-view-column-width, 800px);
  --management-page-inline-inset: 28px;
  --management-scrollbar-width: 8px;
  --management-companion-list-width: 0px;
  --management-detail-max-width: calc(var(--management-content-max-width) + var(--management-page-inline-inset) * 2 + var(--management-scrollbar-width) + var(--management-companion-list-width));
  inset: var(--chat-capsule-header-height, 44px) auto 0 0;
  border: 0;
  border-radius: 0;
  background: var(--desktop-side-surface, var(--surface-sidebar));
  box-shadow: none;
}
.desktop-management-surface.is-expanded {
  right: auto;
  width: 100%;
  max-width: calc(var(--management-rail-width) + var(--management-detail-max-width));
  border-right: 0;
}
.desktop-management-surface:has(.chat-hub-management:not([hidden]) .chat-hub-management-detail) {
  --management-companion-list-width: 560px;
}
.desktop-management-surface:has(.chat-hub-management:not([hidden]) .chat-hub-management-detail):has(.chat-hub-management:not([hidden]) .chat-hub-module-page:not([hidden]) .scope-collapsed) {
  --management-companion-list-width: 424px;
}
.desktop-management-surface .management-pane-header {
  align-items: center;
  height: 44px;
  min-height: 44px;
  padding-block: 6px;
  gap: 16px;
  background: transparent;
  border-bottom: 0;
}
.desktop-management-surface :is(.settings-desktop-root-head, .chat-hub-overview > .management-pane-header) {
  padding-inline: calc(var(--chat-action-group-inset, 4px) - 1px);
  gap: 12px;
}
.desktop-management-surface :is(.settings-desktop-root-head, .chat-hub-overview > .management-pane-header) .overlay-header-actions { gap: 4px; }
.desktop-management-surface :is(.settings-desktop-root-head, .chat-hub-overview > .management-pane-header) .app-toolbar-version {
  height: var(--chat-action-control-size, 28px);
  max-width: 96px;
  gap: 4px;
}
.desktop-management-surface .management-pane-title {
  min-height: 28px;
  padding: 2px 0;
  font-size: 14px;
  line-height: 24px;
  font-weight: 600;
  white-space: nowrap;
}
.desktop-management-surface :is(.settings-desktop-detail-head, .chat-hub-management-header) { padding-inline: 26px 8px; }
.desktop-management-surface :is(.settings-desktop-detail-head, .chat-hub-management-header) .management-pane-close {
  width: 28px;
  min-width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
}
.desktop-management-surface :is(.settings-desktop-layout, .settings-desktop-root-content) { background: var(--desktop-side-surface, var(--surface-sidebar)); }
.desktop-management-surface :is(.settings-desktop-detail-pane, .chat-hub-management) {
  --surface-workspace-content: var(--desktop-content-surface, var(--surface-panel));
  border-left: 0;
  border-radius: var(--desktop-frame-radius, 16px) var(--desktop-frame-radius, 16px) 0 0;
  background: var(--surface-workspace-content);
  outline: 1px solid var(--desktop-frame-edge, transparent);
  outline-offset: -1px;
}
.desktop-session-layer[data-management-open='true'] { z-index: 60; }
.desktop-shell[data-inline-preview-maximized='true'] > .desktop-session-layer[data-management-open='true'] { display: block; }
.desktop-session-layer[data-management-open='true'] > .chat-session-capsule::after { display: none; }
.desktop-session-layer[data-management-open='true'] > .chat-session-capsule { background: transparent; pointer-events: none; }
.desktop-session-layer[data-management-open='true'] > .chat-session-capsule > .chat-session-header { pointer-events: none; }
.desktop-session-layer[data-management-open='true'] > .chat-session-capsule > .chat-session-header > .chat-session-global-bar {
  background: var(--chat-action-group-background);
  box-shadow: var(--chat-action-group-shadow);
  pointer-events: auto;
}
.chat-session-global-bar-context {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 12px;
  padding-inline: 12px;
  height: var(--chat-action-control-size);
}
.management-workspace-title { min-width: 0; font-size: 14px; font-weight: 600; line-height: var(--chat-action-control-size); white-space: nowrap; text-transform: none; }
.chat-session-global-bar-context > .app-toolbar-root { margin-left: auto; min-width: 0; }
.chat-session-global-bar-context .app-toolbar-version { height: var(--chat-action-control-size); max-width: 96px; gap: 4px; line-height: normal; }
.settings-client-update { padding: 20px 16px 0; border-top: 1px solid var(--border-subtle); margin: 0 16px; }
.settings-client-update .app-toolbar-root { justify-content: flex-start; }
.settings-client-update .app-toolbar-version { font-size: 12px; color: var(--text-secondary); }

/* Flat sections and calibrated controls are shared across both destinations. */
:is(.desktop-management-surface, .settings-workbench-screen, .chat-hub-workbench-mobile) .overlay-button {
  min-height: 34px;
  border-radius: 8px;
  border-color: var(--border-subtle);
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  box-shadow: none;
  white-space: nowrap;
}
:is(.desktop-management-surface, .settings-workbench-screen, .chat-hub-workbench-mobile) .overlay-button[data-tone='primary'] {
  background: var(--accent-action);
  border-color: var(--accent-action);
  color: #fff;
}
:is(.desktop-management-surface, .settings-workbench-screen, .chat-hub-workbench-mobile) .overlay-button[data-tone='primary']:hover:not(:disabled) {
  background: var(--accent-action-hover);
  border-color: var(--accent-action-hover);
}
:is(.desktop-management-surface, .settings-workbench-screen, .chat-hub-workbench-mobile) .overlay-button[data-tone='danger'] {
  color: var(--state-danger);
  border-color: color-mix(in srgb, var(--state-danger) 40%, var(--border-subtle));
  background: transparent;
}
:is(.desktop-management-surface, .settings-workbench-screen, .chat-hub-workbench-mobile) .overlay-icon-button { border-radius: 8px; }
:is(.desktop-management-surface, .settings-workbench-screen, .chat-hub-workbench-mobile) :is(input:not([type='checkbox']):not([type='radio']), textarea, select) { border-radius: 8px; }
.settings-list { gap: 5px; padding: 9px 10px 24px; }
.settings-section { gap: 0; }
.settings-section + .settings-section { border-top: 1px solid var(--border-subtle); padding-top: 5px; }
.settings-section-title { min-height: 30px; padding-inline: 10px; font-size: 12px; font-weight: 600; line-height: 18px; letter-spacing: 0; }
.settings-section-title::after { display: none; }
.settings-list .settings-row {
  min-height: 40px;
  padding: 2px 10px;
  gap: 10px;
  border-bottom: 0;
  font-size: 14px;
  line-height: 20px;
}
.settings-list .settings-row > span:first-child { gap: 10px; }
.settings-list .settings-row-icon { width: 16px; height: 16px; }
.settings-list .settings-detail-row { isolation: isolate; background: transparent; }
.settings-list .settings-detail-row .settings-row-icon { color: var(--text-secondary); opacity: 1; }
.settings-list :is(.settings-detail-row[aria-current='page'], .settings-log-level-row.is-current) > span:first-child { font-weight: 600; }
.settings-list [aria-current='page'] > svg[data-icon-name='check'] { color: var(--accent-text); stroke-width: 2; }
.settings-list :is(.settings-detail-row, .settings-row-nav-btn):focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: -2px;
  border-radius: 6px;
}
@media (hover: hover) and (pointer: fine) {
  .settings-list .settings-detail-row:hover::before {
    content: '';
    position: absolute;
    inset: 2px 0;
    z-index: -1;
    border-radius: 6px;
    background: var(--hover);
    pointer-events: none;
  }
}
.settings-list .sidebar-setting-select { max-width: none; flex-shrink: 0; height: 30px; font-size: 11px; padding-inline: 8px; border: 0; background: var(--surface-raised); }
.settings-list .settings-subsection-rows { margin: 0; padding-left: 22px; }
.settings-list .settings-row-chevron { width: 13px; height: 13px; color: var(--text-tertiary); }
.settings-list .settings-disclosure-status { font-size: 10px; }
.settings-detail-body { padding: 24px; }
.desktop-management-surface :is(.settings-detail-body, .chat-hub-module-page) {
  padding-inline: var(--management-page-inline-inset);
  scrollbar-gutter: stable;
}
.desktop-management-surface .chat-hub-module-page[data-module='skills'] { padding: 0; }
.settings-detail-body > * { max-width: var(--management-content-max-width, 840px); width: min(100%, var(--management-content-max-width, 840px)); margin-inline: 0; }
.settings-detail-body .settings-page-title { font-size: 22px; font-weight: 600; letter-spacing: -.3px; }
.settings-detail-body .settings-page-header { padding: 0 0 12px; border: 0; align-items: center; }
.settings-desktop-breadcrumb { font-weight: 400; }
.chat-hub-management-identity { font-weight: 400; }
.settings-detail-body .keyboard-shortcut-command-controls { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; min-width: 0; }
.settings-detail-body .keyboard-shortcut-command-controls > button { flex: 0 0 auto; }
.settings-detail-body .settings-section-heading { font-size: 15px; font-weight: 600; }
.settings-detail-body .set-section-title { font-size: 15px; }

/* Hub contents keep their existing actions, identities, and state ownership. */
:is(.chat-hub-workbench, .chat-hub-workbench-mobile) .chat-hub-tabs {
  gap: 0;
  padding: var(--hub-tabs-padding);
  border-radius: var(--hub-tabs-radius);
}
.chat-hub-workbench .chat-hub-tabs {
  align-self: flex-start;
  margin: 18px 26px 0 var(--management-page-inline-inset, 28px);
  min-height: 40px;
  width: 480px;
  max-width: calc(100% - 52px);
}
.chat-hub-tabs {
  --hub-tabs-inset: 4px;
  --hub-tabs-padding: calc(var(--hub-tabs-inset) - 1px);
  --hub-tabs-control-height: 32px;
  --hub-tabs-radius: calc((var(--hub-tabs-control-height) + var(--hub-tabs-inset) * 2) / 2);
  --hub-tabs-item-radius: calc(var(--hub-tabs-radius) - var(--hub-tabs-inset));
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--hub-tab-count, 6), minmax(0, 1fr));
  isolation: isolate;
}
.chat-hub-tabs::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: var(--hub-tabs-padding) auto var(--hub-tabs-padding) var(--hub-tabs-padding);
  width: calc((100% - var(--hub-tabs-padding) * 2) / var(--hub-tab-count, 6));
  border-radius: var(--hub-tabs-item-radius);
  transform: translateX(calc(var(--hub-tab-index, 0) * 100%));
  pointer-events: none;
}
.chat-hub-tabs > button { display: flex; align-items: center; justify-content: center; min-width: 0; text-align: center; }
.chat-hub-tabs button:not([aria-selected='true'], :disabled):hover { background: transparent; color: var(--text-primary); }
:is(.chat-hub-workbench, .chat-hub-workbench-mobile) .chat-hub-tabs button { min-height: var(--hub-tabs-control-height); padding-inline: 8px; border-radius: var(--hub-tabs-item-radius); font-size: 12px; font-weight: 600; }
:is(.chat-hub-workbench, .chat-hub-workbench-mobile) .chat-hub-tabs button[aria-selected='true']::after { display: none; }
.chat-hub-module-page { padding: 26px 28px 28px; }
.chat-hub-module-page > *, .chat-hub-module-page > .chat-hub-settings-page { max-width: var(--management-content-max-width, 840px); width: min(100%, var(--management-content-max-width, 840px)); margin-inline: 0; }
.chat-hub-management .chat-hub-page-heading { margin-bottom: 20px; font-size: 22px; letter-spacing: -.3px; }
.chat-hub-management .chat-hub-detail-toolbar > .chat-hub-detail-title,
.chat-hub-management .chat-hub-mcp-heading > .chat-hub-detail-title { padding: 0; font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -.3px; }
.chat-hub-management .chat-hub-detail-status { font-size: 12px; font-weight: 400; }
.chat-hub-overview-list { padding-inline: 12px; }
.chat-hub-overview-row { padding: 18px 12px; }
.chat-hub-overview-row.selected { border-radius: 12px; background: var(--accent-soft-bg); }
.chat-hub-overview-heading { grid-template-columns: 18px minmax(0, 1fr) auto 28px; gap: 6px; }
.chat-hub-overview-name { font-size: 13px; }
.chat-hub-overview-version { white-space: nowrap; font-variant-numeric: tabular-nums; }
.chat-hub-overview-stats { display: flex; flex-wrap: wrap; gap: 0 12px; padding: 0; margin: 10px 0 0; }
.chat-hub-overview-stat { width: auto; min-height: 22px; gap: 5px; padding: 0; font-size: 11px; }
.chat-hub-overview-stats .sl-icon { width: 12px; height: 12px; }
.chat-hub-overview-stats b { font-size: 11px; font-weight: 500; }
.chat-hub-overview-attention { margin-top: 6px; gap: 4px; }
.chat-hub-overview-attention button.chat-hub-update-notice { min-height: 32px; padding: 5px 8px; border: 1px solid var(--border-subtle); border-radius: 8px; font-size: 10px; }
.chat-hub-management .chat-hub-npm-versions { flex-direction: row; gap: 5px; white-space: nowrap; flex-wrap: nowrap; font-variant-numeric: tabular-nums; }
.chat-hub-management .chat-hub-npm-version-new { white-space: nowrap; }
.chat-hub-management .chat-hub-mcp-form { background: color-mix(in srgb, var(--surface-raised) 45%, var(--surface-panel)); border-radius: 10px; padding: 18px; }
.chat-hub-management .chat-hub-skill-toolbar { border-radius: 10px; }
.chat-hub-management .chat-hub-skill-source { border: 0; border-bottom: 1px solid var(--border-subtle); border-radius: 0; background: transparent; box-shadow: none; }
.chat-hub-management .chat-hub-visibility-switch { border-radius: 999px; }
.chat-hub-management .hub-storage { max-width: var(--management-content-max-width, 840px); }
.chat-hub-workbench-mobile .management-pane-header-mobile { min-height: calc(56px + var(--wm-safe-area-top, 0px)); align-items: center; }
.chat-hub-workbench-mobile .chat-hub-tabs { --hub-tabs-control-height: 44px; margin: 12px 12px 0; overflow: hidden; }
.chat-hub-workbench-mobile .chat-hub-tabs button { min-width: 0; min-height: var(--hub-tabs-control-height); padding-inline: 2px; border-radius: var(--hub-tabs-item-radius); font-size: 11px; }
:is(.settings-workbench-screen, .chat-hub-workbench-mobile) .management-pane-header-mobile {
  min-height: calc(56px + var(--wm-safe-area-top, 0px));
  padding: calc(6px + var(--wm-safe-area-top, 0px)) 12px 5px;
  align-items: center;
}
:is(.settings-workbench-screen, .chat-hub-workbench-mobile) .management-pane-header-mobile .management-pane-title { font-size: 20px; line-height: 28px; }
:is(.settings-workbench-screen, .chat-hub-workbench-mobile) .management-pane-header-mobile > .overlay-heading > .management-pane-title { padding: 0; min-height: 44px; display: flex; align-items: center; }
:is(.settings-workbench-screen, .chat-hub-workbench-mobile) .management-pane-header-mobile .overlay-icon-button { width: 44px; height: 44px; }
.settings-workbench-screen .management-pane-header-mobile .app-toolbar-button { min-height: 44px; }
.chat-hub-workbench-mobile .chat-hub-title-switcher { height: 44px; display: inline-flex; align-items: center; }
.chat-hub-workbench-mobile .chat-hub-title-select { height: 44px; }
.chat-hub-workbench-mobile .chat-hub-skill-companion-header .overlay-title { font-size: 20px; line-height: 28px; padding: 0; min-height: 28px; }
@media (max-width: 1180px) {
  .chat-hub-workbench .chat-hub-tabs button { padding-inline: 16px; }
  .chat-hub-management-identity { gap: 6px; }
  .chat-hub-management-identity > .chat-hub-connection-state { display: none; }
}
@media (width < 900px) {
  :is(.settings-workbench-screen, .chat-hub-workbench-mobile) .overlay-button { min-height: 44px; font-size: 13px; }
  .settings-workbench-screen .settings-detail-body button:not([role='switch']):not([role='checkbox']) { min-height: 44px; }
  .settings-workbench-screen .settings-detail-body select { min-height: 44px; }
  .settings-list { padding-block: 4px 24px; }
  .settings-detail-body { padding: 20px 18px; }
  .chat-hub-module-page { padding: 22px 18px; }
  .chat-hub-management .chat-hub-page-heading { font-size: 21px; }
  .chat-hub-management .chat-hub-detail-toolbar > .chat-hub-detail-title,
  .chat-hub-management .chat-hub-mcp-heading > .chat-hub-detail-title { font-size: 20px; }
  .chat-hub-overview-row { padding-block: 20px; }
  .chat-hub-management .chat-hub-npm-versions { font-size: 11px; gap: 3px; }
  .chat-hub-workbench-mobile .chat-hub-management .chat-hub-npm-row,
  .chat-hub-workbench-mobile .chat-hub-npm-columns { display: grid; grid-template-columns: minmax(0, 1fr) 102px 56px; gap: 6px; }
  .chat-hub-workbench-mobile .chat-hub-management .chat-hub-npm-row { min-height: 56px; padding-block: 4px; }
  .chat-hub-workbench-mobile .chat-hub-management .chat-hub-npm-package { grid-column: 1; grid-row: 1; gap: 6px; }
  .chat-hub-workbench-mobile .chat-hub-management .chat-hub-npm-versions { grid-column: 2; grid-row: 1; padding: 0; }
  .chat-hub-workbench-mobile .chat-hub-management .chat-hub-npm-actions { grid-column: 3; grid-row: 1; }
  .chat-hub-workbench-mobile .chat-hub-management .chat-hub-npm-package-name { font-size: 12px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
  .chat-hub-management .chat-hub-mcp-form { padding: 14px; }
  .chat-hub-workbench-mobile .chat-hub-management .chat-hub-skill-toolbar-actions { grid-template-columns: 104px 44px; }
  .chat-hub-workbench-mobile .chat-hub-management .chat-hub-skill-toolbar-actions > button { height: 44px; min-height: 44px; }
  .chat-hub-workbench-mobile .chat-hub-skill-toolbar-actions > button:last-child { width: 44px; }
  .chat-hub-workbench-mobile .chat-hub-skills-mobile-scope { height: 44px; min-height: 44px; }
}
@media (max-width: 359px) {
  .chat-hub-workbench-mobile .chat-hub-management .chat-hub-skill-toolbar-actions { grid-template-columns: 44px 44px; }
  .chat-hub-workbench-mobile .chat-hub-skill-toolbar-actions > button > span { display: none; }
  .chat-hub-workbench-mobile .chat-hub-management .chat-hub-mcp-toolbar-actions { gap: 4px; }
  .chat-hub-workbench-mobile .chat-hub-management .chat-hub-mcp-toolbar-actions > * { width: 44px; min-width: 44px; height: 44px; min-height: 44px; flex: 0 0 44px; padding: 0; }
  .chat-hub-workbench-mobile .chat-hub-management .chat-hub-mcp-toolbar-actions > button > span { display: none; }
  .chat-hub-workbench-mobile .chat-hub-management .chat-hub-mcp-heading > .chat-hub-detail-title { font-size: 18px; white-space: nowrap; }
}

/* Detail pages share a quiet hierarchy while retaining their existing workflows. */
.settings-detail-body {
  --management-control-height: 38px;
  --management-section-gap: 16px;
}
.settings-detail-body :is(.set-card-title, .set-section-title, .settings-section-heading) {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
}
.settings-detail-body .set-card { padding-block: var(--management-section-gap); gap: 12px; }
.settings-detail-body .set-card-head { min-height: 24px; margin-bottom: 0; gap: 12px; }
.settings-detail-body .set-card-body { gap: 12px; }
.settings-detail-body .settings-page-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.settings-detail-body .overlay-button { min-height: 32px; padding: 4px 10px; gap: 6px; font-size: 12px; line-height: 20px; }
.settings-detail-body .overlay-button .sl-icon { width: 14px; height: 14px; }
.settings-detail-body .overlay-button[data-icon-only='true'] { width: 32px; min-width: 32px; height: 32px; padding: 0; }
.settings-detail-body .overlay-button[data-icon-only='true'][data-tone='danger'] { border: 0; background: transparent; }
.settings-mobile-page-actions { display: flex; align-items: center; gap: 4px; }
.settings-mobile-page-actions .overlay-button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; gap: 0; border: 0; background: transparent; font-size: 0; line-height: 0; }
.settings-mobile-page-actions .overlay-button .sl-icon { width: 18px; height: 18px; }
.settings-detail-body .set-field-control {
  min-height: var(--management-control-height);
  padding: 9px 12px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-raised);
  color: var(--text-primary);
  font-size: 13px;
}
.settings-detail-body :is(.set-field-label, .set-kv-key) { font-size: 12px; font-weight: 400; color: var(--text-secondary); }
.settings-detail-body :is(.set-field-note, .set-muted, .settings-page-footnote) { font-size: 12px; line-height: 1.6; }
.settings-detail-body .set-field-control:focus-visible,
.chat-hub-management :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: 2px;
}
.settings-detail-body :is(.set-num, .set-kv-value, .settings-database-store-row span) { font-variant-numeric: tabular-nums; }
.settings-detail-body :is(.set-error, .set-section-feedback[role='alert']) {
  padding: 12px 14px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--state-danger) 7%, transparent);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* The label is the touch target; the native input keeps keyboard and form behavior. */
.settings-detail-body .management-toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 44px;
  padding: 8px 0;
  margin: 0;
  border-bottom: 0;
  cursor: pointer;
}
.management-toggle-copy { display: grid; gap: 4px; min-width: 0; }
.management-toggle-label { color: var(--text-primary); font-size: 13px; line-height: 1.5; }
.management-toggle-description { color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.management-toggle-row:has(input:disabled), fieldset:disabled .management-toggle-row { cursor: default; }
.management-toggle-row:has(input:disabled) .management-toggle-copy { opacity: .55; }

/* Publishing and Wiki keep the original fields, destinations and confirmations. */
.settings-detail-body .release-publish-page .set-field,
.settings-detail-body .wiki-access-field { gap: 8px 24px; }
.settings-detail-body .release-publish-source { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.settings-detail-body .release-publish-source .set-field { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.settings-detail-body .release-publish-source-path,
.settings-detail-body .release-publish-source > .management-toggle-row { grid-column: 1 / -1; }
.settings-detail-body :is(.release-publish-version, .release-publish-temporary) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 24px;
}
.settings-detail-body .release-publish-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0 24px;
}
.settings-detail-body .release-publish-actions { justify-content: flex-end; gap: 8px; }
.settings-detail-body .release-publish-temporary .release-publish-actions { grid-row: 2; align-self: center; }
.settings-detail-body .release-publish-storage { align-items: end; }
.settings-detail-body .release-publish-storage .set-kv { gap: 4px; }
.settings-detail-body :is(.release-publish-job-log, .debug-log-list) {
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface-raised);
  font-size: 12px;
  line-height: 1.7;
}
.settings-detail-body .wiki-access-overview { padding-block: 8px; }
.settings-detail-body .wiki-access-form fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.settings-detail-body .wiki-access-fields { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; padding-top: 8px; }
.settings-detail-body .wiki-access-field { grid-template-columns: minmax(0, 1fr); gap: 6px; align-content: start; }
.settings-detail-body .wiki-access-field .set-field-note { grid-column: 1; }
.settings-detail-body .wiki-access-form-actions { grid-column: 1 / -1; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.settings-detail-body .wiki-access-link-row { gap: 12px; }
.settings-detail-body .wiki-access-public-note { border-radius: 8px; font-size: 12px; line-height: 1.6; }

/* Relay, device identities and shared links use flat rows with separate actions. */
.settings-detail-body .settings-maintenance-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 56px; gap: 8px 12px; padding-block: 8px; border-top: 0; }
.settings-detail-body .settings-maintenance-row p { margin-top: 4px; }
.settings-detail-body :is(.device-hub-card, .device-session-card) { padding-block: 12px; gap: 8px; }
.settings-detail-body .device-settings-section-head { align-items: baseline; gap: 12px; }
.settings-detail-body :is(.device-hub-name, .device-session-name) { font-size: 14px; }
.settings-detail-body :is(.device-hub-card, .device-session-card) .device-session-meta { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 20px; }
.settings-detail-body .device-session-meta .set-kv { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.settings-detail-body .device-session-meta .set-kv-value { min-width: 0; overflow-wrap: anywhere; }
.settings-detail-body .settings-metadata-card { grid-template-columns: 140px minmax(0, 1fr) auto; gap: 8px 16px; padding-block: 12px; }
.settings-detail-body .settings-metadata-card > .settings-connection-value { grid-column: 2; grid-row: 1; }
.settings-detail-body .settings-metadata-card > .set-status { grid-column: 3; }
.settings-detail-body > .share-manager .share-manager-origin { display: flex; align-items: baseline; padding-bottom: 4px; gap: 8px; }
.settings-detail-body > .share-manager .share-manager-origin code { min-width: 0; }
.settings-detail-body > .share-manager .share-manager-intro.set-section-surface { padding-bottom: 16px; }
.settings-detail-body > .share-manager .share-manager-list.set-section-surface { padding-top: 12px; gap: 8px; }
.settings-detail-body > .share-manager .share-manager-section-heading .share-manager-muted { margin-left: auto; white-space: nowrap; }
.settings-detail-body > .share-manager .share-manager-record { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding-block: 12px; gap: 4px 12px; }
.settings-detail-body .share-manager-record-main { min-width: 0; }
.settings-detail-body .share-manager-record-expiry { grid-column: 1 / -1; color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.settings-detail-body .share-manager-record-expiry time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.settings-detail-body .share-manager-record-main > strong { font-size: 14px; font-weight: 500; white-space: normal; overflow-wrap: anywhere; }
.settings-detail-body .share-manager-record-actions { align-self: start; gap: 4px; }
.settings-detail-body .share-manager-record-actions .overlay-button { border-color: transparent; }
.settings-detail-body .share-file-inventory { grid-column: 1 / -1; padding-top: 0; font-size: 12px; }
.settings-detail-body .share-file-inventory > summary { min-height: 32px; display: list-item; align-content: center; }

/* Database rows, log tools and shortcut bindings keep compact data legible. */
.settings-detail-body .settings-database-storage-summary { padding-top: 12px; }
.settings-detail-body .settings-database-storage-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.settings-detail-body .settings-database-storage-metric { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 4px; }
.settings-detail-body .settings-database-storage-metric strong { font-size: 15px; }
.settings-detail-body .settings-database-session-files { padding-block: 16px; gap: 12px; }
.settings-detail-body .settings-database-store-list { padding-top: 12px; }
.settings-detail-body .settings-database-store-row { min-height: 46px; padding-block: 8px; }
.settings-detail-body .settings-database-dump-section { gap: 12px; padding-top: 16px; }
.settings-detail-body .database-clear-card > .overlay-button { justify-self: end; }
.settings-detail-body .debug-log-toolbar { display: flex; align-items: end; flex-wrap: wrap; padding: 0 0 12px; gap: 12px; }
.settings-detail-body .debug-log-category-label { display: grid; gap: 8px; min-width: 140px; }
.settings-detail-body .keyboard-shortcut-binding { border-radius: 8px; min-height: 32px; }
.settings-detail-body .keyboard-shortcut-keycaps kbd { border-radius: 4px; font-variant-numeric: tabular-nums; }

/* Inline editors use the same material without changing the existing dialogs. */
.chat-hub-management .management-inline-editor {
  box-sizing: border-box;
  padding: 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-raised) 55%, var(--surface-panel));
  gap: 16px;
}
.chat-hub-management .management-inline-editor h4 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.chat-hub-management .management-inline-editor :is(input:not([type='checkbox']), select, textarea) {
  box-sizing: border-box;
  min-width: 0;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface-panel);
  color: var(--text-primary);
  font-size: 13px;
}
.chat-hub-management .management-inline-editor textarea { min-height: 104px; resize: vertical; line-height: 1.6; }
.chat-hub-management .chat-api-key-form { max-width: 100%; }
.chat-hub-management .chat-api-key-form > label { grid-template-columns: 100px minmax(0, 1fr); align-items: center; gap: 12px 20px; font-size: 12px; color: var(--text-secondary); }
.chat-hub-management .chat-api-key-form > .chat-api-key-actions { margin-left: 120px; }
.chat-hub-management .chat-hub-skill-add-repository-input-row { gap: 8px; }
.chat-hub-management .chat-hub-skill-add-repository-input-row input[aria-invalid='true'] { border-color: var(--state-danger); }
.chat-hub-management .chat-hub-skill-add-repository-hint { margin-bottom: 0; font-size: 12px; line-height: 1.6; }

/* The Hub settings sections share a rhythm; each service retains its own state. */
.chat-hub-management .chat-hub-detail-toolbar .overlay-button { min-height: 32px; padding: 4px 10px; font-size: 12px; }
.chat-hub-management .chat-hub-detail-toolbar .overlay-button .sl-icon { width: 14px; height: 14px; }
.chat-hub-management .chat-hub-detail-toolbar .overlay-button[data-icon-only='true'] { width: 32px; min-width: 32px; height: 32px; padding: 0; }
.chat-hub-management .chat-hub-settings-page .chat-hub-settings-section { padding-block: 16px; }
.chat-hub-management .chat-hub-settings-page > .chat-hub-settings-section:first-of-type { padding-top: 0; }
.chat-hub-management .chat-hub-settings-page .chat-hub-detail-toolbar { margin-bottom: 8px; }
.chat-hub-management .chat-hub-settings-page .chat-hub-settings-heading { margin-bottom: 0; }
.chat-hub-management .chat-hub-settings-page :is(.chat-hub-settings-heading h3, .chat-hub-flicker-identity h3) { font-size: 16px; line-height: 1.5; }
.chat-hub-management .chat-hub-settings-page .chat-hub-detail-title { display: flex; align-items: center; gap: 8px; }
.chat-hub-management .chat-hub-settings-page :is(.chat-api-key-row, .chat-hub-credential-summary) { min-height: 56px; padding-block: 12px; }
.chat-hub-management .chat-hub-settings-page .chat-hub-credential-summary { grid-template-columns: 140px minmax(0, 1fr) 34px; }
.chat-hub-management .chat-hub-settings-page .chat-hub-credential-summary > button { width: 34px; height: 34px; border-radius: 8px; }
.chat-hub-management .chat-hub-settings-page .secret-compact-row { gap: 8px; padding-block: 12px 20px; }
.chat-hub-management .chat-hub-settings-page .secret-compact-input { min-height: 38px; border-radius: 8px; padding-inline: 12px; }
.chat-hub-management .chat-hub-settings-page .secret-compact-set { border-radius: 8px; }
.chat-hub-management .chat-hub-settings-page .secret-compact-clear { width: 34px; height: 34px; border-radius: 8px; }
.chat-hub-management .chat-hub-service-status { padding: 0; border: 0; background: transparent; font-size: 11px; }
.chat-hub-management .chat-hub-service-icon { background: transparent; border: 0; color: var(--text-tertiary); }
.chat-hub-management .chat-hub-service { padding-block: 10px; }
.chat-hub-management .chat-hub-service-row { grid-template-columns: 28px minmax(0, 1fr) auto; min-height: 44px; gap: 12px; }
.chat-hub-management .chat-hub-service-icon { width: 28px; height: 28px; }
.chat-hub-management .chat-hub-service-heading > .chat-hub-service-status { margin-left: 0; }
.chat-hub-management :is(.chat-hub-service-meta, .chat-hub-service-route) { margin-top: 4px; min-width: 0; }
.chat-hub-management .chat-hub-services .chat-hub-settings-heading { display: flex; align-items: center; gap: 8px; }
.chat-hub-management .chat-hub-services .chat-hub-settings-summary { width: auto; margin: 0; white-space: nowrap; }
.chat-hub-management .chat-hub-service-issue { margin-top: 8px; margin-left: 40px; padding: 10px 12px; }
.chat-hub-management .chat-hub-services .chat-hub-app-notice { margin-left: 40px; }
.chat-hub-management .chat-hub-services .chat-hub-service-actions .chat-hub-action { border-radius: 8px; }
.chat-hub-management .chat-hub-monitor .chat-hub-service-meta { color: var(--text-secondary); }
.chat-hub-management .chat-hub-monitor .chat-hub-service-actions .chat-hub-monitor-logs-action {
  flex: 0 0 auto;
  width: auto;
  gap: 5px;
  padding-inline: 8px;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 12px;
}
.chat-hub-management .chat-hub-monitor .chat-hub-service-actions .chat-hub-monitor-process-action[data-action='stop']:enabled {
  color: var(--state-danger);
}
.chat-hub-management .chat-hub-monitor .chat-hub-service-actions .chat-hub-monitor-process-action[data-action='start']:enabled {
  color: var(--accent-text);
}
.chat-hub-management .chat-hub-monitor .chat-hub-service-actions .chat-hub-action:focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: 2px;
}
.chat-hub-management .chat-hub-service-issue { border-radius: 8px; border-left-width: 1px; }

/* Skills: source sections, scope navigation, then a comfortable document reader. */
.chat-hub-management .chat-hub-skills-scope { padding-block: 24px; }
.chat-hub-management .chat-hub-skills-ledger { padding: 24px 20px; }
.chat-hub-management .chat-hub-scope-option { min-height: 40px; border-radius: 8px; }
.chat-hub-management .chat-hub-skill-source-header { background: transparent; padding: 14px 8px 10px; }
.chat-hub-management .chat-hub-skill-source-disclosure strong { font-size: 13px; font-weight: 600; }
.chat-hub-management .chat-hub-skill-row { min-height: 48px; padding-block: 2px; border-radius: 6px; }
.chat-hub-management .chat-hub-skill-source-caption { margin-inline: 8px; border-radius: 8px; }
.chat-hub-management-detail .chat-hub-skill-companion-body { padding: 24px 28px 32px; }
.chat-hub-management-detail .settings-skills-detail-body { max-width: var(--management-content-max-width, 840px); margin-inline: 0; gap: 24px; padding: 0; overflow: visible; }
.chat-hub-management-detail .settings-skills-detail-section { max-width: 100%; width: 100%; gap: 14px; padding-bottom: 24px; }
.chat-hub-management-detail .settings-skills-detail-section-title { color: var(--text-secondary); font-size: 12px; font-weight: 500; line-height: 1.5; text-transform: none; }
.chat-hub-management-detail .skill-detail-markdown { font-size: 14px; line-height: 1.8; }
.chat-hub-management-detail .skill-detail-markdown :is(h1, h2, h3) { font-weight: 600; line-height: 1.4; letter-spacing: -.2px; }
.chat-hub-management-detail .skill-detail-markdown h1 { font-size: 24px; }
.chat-hub-management-detail .skill-detail-markdown h2 { font-size: 20px; }
.chat-hub-management-detail .skill-detail-markdown h3 { font-size: 16px; }
.chat-hub-management-detail .skill-detail-markdown pre { padding: 16px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--surface-raised); overflow-x: auto; font-size: 12px; line-height: 1.7; }
.chat-hub-management-detail .settings-skills-detail-meta { border: 0; }
.chat-hub-management-detail .settings-skills-detail-meta-row { grid-template-columns: 96px minmax(0, 1fr); gap: 8px 16px; padding: 10px 0; }
.chat-hub-management-detail .settings-skills-detail-meta-row span:first-child { font-size: 12px; font-weight: 400; }
.chat-hub-management-detail .settings-skills-detail-meta-row span:last-child { font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
.chat-hub-management-detail .settings-skills-detail-file { min-height: 44px; padding: 10px 0; font-size: 12px; }
.chat-hub-management-detail .settings-skills-detail-file span:nth-child(2) { white-space: normal; overflow-wrap: anywhere; }
.chat-hub-management-detail .settings-skills-installation > summary { min-height: 44px; align-content: center; color: var(--text-secondary); font-size: 12px; }

@container settings-detail (max-width: 540px) {
  .settings-detail-body .release-publish-source,
  .settings-detail-body :is(.release-publish-version, .release-publish-temporary),
  .settings-detail-body .wiki-access-form fieldset,
  .settings-detail-body .wiki-access-fields { grid-template-columns: minmax(0, 1fr); }
  .settings-detail-body :is(.release-publish-version, .release-publish-temporary) .release-publish-actions { grid-column: auto; grid-row: auto; width: auto; }
  .settings-detail-body .release-publish-options { gap: 0 12px; }
  .settings-detail-body .release-publish-options .management-toggle-row {
    grid-template-columns: minmax(0, 1fr);
    align-content: space-between;
    justify-items: start;
    gap: 6px;
  }
  .settings-detail-body .settings-database-storage-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-detail-body .settings-metadata-card { grid-template-columns: minmax(0, 1fr) auto; }
  .settings-detail-body .settings-metadata-card > .settings-connection-value { grid-column: 1 / -1; grid-row: 2; }
  .settings-detail-body .settings-metadata-card > .set-status { grid-column: 2; }
  .settings-detail-body :is(.device-hub-card, .device-session-card) .device-session-meta { grid-template-columns: minmax(0, 1fr); }
}
@container settings-detail (min-width: 541px) and (max-width: 700px) {
  .settings-detail-body :is(.device-hub-card, .device-session-card) .device-session-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container settings-detail (max-width: 540px) {
  .settings-detail-body .share-manager-record-main { grid-column: 1 / -1; }
  .settings-detail-body .share-manager-record-actions { grid-column: 2; grid-row: 3; }
  .settings-detail-body .share-file-inventory { grid-column: 1; grid-row: 3; }
  .settings-detail-body .share-file-inventory[open] { grid-column: 1 / -1; grid-row: 4; }
}
@container settings-detail (max-width: 340px) {
  .settings-detail-body > .share-manager .share-manager-record { column-gap: 4px; }
  .settings-detail-body .share-manager-record-actions { gap: 0; }
  .settings-detail-body .share-file-inventory > summary { white-space: nowrap; }
}
@media (width < 900px) {
  .settings-detail-body { --management-control-height: 44px; }
  .settings-detail-body .overlay-button { min-height: 44px; padding: 6px 10px; font-size: 13px; }
  .settings-detail-body .overlay-button .sl-icon { width: 16px; height: 16px; }
  .settings-detail-body .overlay-button[data-icon-only='true'] { width: 44px; min-width: 44px; height: 44px; padding: 0; }
  .settings-detail-body .management-toggle-row { gap: 12px; min-height: 48px; }
  .settings-detail-body .share-manager-record-actions .share-link-icon-action { width: 44px; height: 44px; }
  .settings-detail-body .share-file-inventory > summary { min-height: 44px; }
  .settings-detail-body .keyboard-shortcut-binding { min-height: 44px; }
  .settings-detail-body .debug-log-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .settings-detail-body .debug-log-category-label { min-width: 0; }
  .settings-detail-body .debug-log-category-label select { width: 100%; }
  .settings-detail-body .debug-log-toolbar > .set-muted { grid-column: 1 / -1; grid-row: 2; }
  .settings-detail-body .debug-log-actions { grid-column: 2; grid-row: 1; align-self: end; }
  .chat-hub-management .management-inline-editor { padding: 16px; }
  .chat-hub-management .management-inline-editor :is(input:not([type='checkbox']), select, .custom-select-trigger) { min-height: 44px; }
  .chat-hub-management .chat-hub-detail-toolbar .overlay-button { min-width: 44px; min-height: 44px; padding: 6px 10px; font-size: 13px; }
  .chat-hub-management .chat-hub-detail-toolbar .overlay-button .sl-icon { width: 16px; height: 16px; }
  .chat-hub-management .chat-hub-detail-toolbar .overlay-button[data-icon-only='true'] { width: 44px; height: 44px; padding: 0; }
  .chat-hub-management .chat-api-key-form > label { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .chat-hub-management .chat-api-key-form > .chat-api-key-actions { margin-left: 0; }
  .chat-hub-management .chat-hub-settings-page .chat-hub-credential-summary { grid-template-columns: minmax(60px, 1fr) minmax(80px, 1fr) 44px; }
  .chat-hub-management .chat-hub-settings-page .chat-hub-credential-summary > button,
  .chat-hub-management .chat-hub-settings-page :is(.secret-compact-set, .secret-compact-clear) { min-width: 44px; min-height: 44px; }
  .chat-hub-management .chat-hub-settings-page .secret-compact-input { min-height: 44px; }
  .chat-hub-management .chat-hub-service-row { row-gap: 4px; }
  .chat-hub-management .chat-hub-service-content { display: contents; }
  .chat-hub-management .chat-hub-service-icon { grid-column: 1; grid-row: 1 / 3; }
  .chat-hub-management .chat-hub-service-heading { grid-column: 2 / -1; grid-row: 1; }
  .chat-hub-management :is(.chat-hub-service-meta, .chat-hub-service-route) { grid-column: 2; grid-row: 2; margin-top: 0; }
  .chat-hub-management .chat-hub-service-meta { column-gap: 4px; }
  .chat-hub-management .chat-hub-service-actions { grid-column: 3; grid-row: 2; }
  .chat-hub-management .chat-hub-service-issue,
  .chat-hub-management .chat-hub-services .chat-hub-app-notice { margin-left: 0; }
  .chat-hub-management .chat-hub-services .chat-hub-service-actions .chat-hub-action { flex-basis: 44px; width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  .chat-hub-management .chat-hub-monitor-logs-action .sl-icon { display: none; }
  .chat-hub-management .chat-hub-skills-ledger { padding: 22px 18px; }
  .chat-hub-management .chat-hub-skill-row { min-height: 52px; }
  .chat-hub-management-detail .chat-hub-skill-companion-body { padding: 24px 18px; }
  .chat-hub-management-detail .settings-skills-detail-body { gap: 24px; }
  .chat-hub-management-detail .settings-skills-detail-meta-row { grid-template-columns: 80px minmax(0, 1fr); gap: 8px 12px; }
}

:root,
.theme-light {
  --selection-state-background: color-mix(in srgb, var(--accent-primary) 7%, var(--surface-raised));
}

.chat-hub-overview-row.selected {
  background: var(--selection-state-background);
  border-top-color: transparent;
}

/* Page lists share the same selection surface without an edge stripe. */
.chat-hub-management .chat-hub-skill-row.selected,
.preview-workbench-file-tree-content .item.selected,
.preview-workbench-file-search-node.file.selected,
.quick-file-search-option.selected,
.quick-file-search-option.selected:hover,
.chat-prompt-diff-file.active > .chat-prompt-diff-file-header,
.chat-prompt-diff-file.active > .chat-prompt-diff-file-header:hover {
  background: var(--selection-state-background);
  box-shadow: none;
}
.preview-workbench-file-tree-content .item.selected,
.preview-workbench-file-search-node.file.selected,
.chat-prompt-diff-file.active > .chat-prompt-diff-file-header { border-radius: 6px; }
.chat-hub-management .chat-hub-skill-row button.chat-hub-skill-name:is(:hover, :focus-visible) {
  background: transparent;
}

/* Menu and list choices use the same selected surface as the model list. */
.overlay-capsule.overlay-capsule { --overlay-menu-selected: var(--selection-state-background); }
.overlay-surface :is([role='menuitemradio'][aria-checked='true'], [role='menuitemcheckbox'][aria-checked='true']:not(.overlay-menu-toggle), [role='option'][aria-selected='true']),
.overlay-surface:is([data-kind='menu'], [data-kind='picker']) :is([aria-current='true'], [aria-current='page']) {
  border-radius: var(--overlay-menu-row-radius, 12px);
  background: var(--selection-state-background);
  color: var(--selection-state-text, var(--text-primary));
}
.overlay-capsule.overlay-capsule .overlay-menu-pills [aria-checked='true'],
.chat-new-session-project[data-selection-active='true'],
.chat-session-outline-button[aria-current='true'] {
  background: var(--selection-state-background);
  color: var(--text-primary);
  box-shadow: none;
}
.overlay-surface .agent-choice-pill[role='option'][aria-selected='true'] { border-radius: 999px; box-shadow: none; }
.overlay-surface .preview-workbench-tabs-overflow-row.active .preview-workbench-tabs-overflow-open[aria-checked='true'] { background: transparent; }
.overlay-surface [role='menuitemradio'][aria-checked='true']:not(:has([data-icon-name='check']))::after {
  content: '';
  flex: none;
  width: 13px;
  height: 13px;
  margin-inline-start: auto;
  background: var(--accent-primary);
  --selection-check-mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M20 6 9 17l-5-5%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%271.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E");
  -webkit-mask: var(--selection-check-mask) center / contain no-repeat;
  mask: var(--selection-check-mask) center / contain no-repeat;
}
.overlay-surface.overlay-surface .overlay-menu-pills [role='menuitemradio'][aria-checked='true']::after { content: none; }
.overlay-surface.preview-workbench-content-kind-menu [role='menuitemradio'][aria-checked='true']::after,
.overlay-surface .preview-workbench-tabs-overflow-open[aria-checked='true']::after {
  background: var(--segmented-selected-text);
}

/* Preserve component fills while suppressing duplicate selection and hover surfaces. */
[data-selection-motion-host='true'][data-selection-interaction='follow'] :is([role='option'], [data-selection-active]) {
  background: var(--selection-item-background, transparent) !important;
  box-shadow: none;
}
[data-selection-motion-host='true'][data-selection-interaction='follow'] :is([role='option'][aria-selected='true'], [data-selection-active='true']) {
  background: var(--selection-item-background, var(--selection-state-background)) !important;
}

/* The moving layer exists only while a selection changes. */
[data-selection-motion-host='true'] { position: relative; isolation: isolate; }
[data-selection-motion-host='true']::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  display: none;
  width: var(--selection-motion-width, 0px);
  height: var(--selection-motion-height, 0px);
  border-radius: var(--selection-motion-radius, 12px);
  background: var(--selection-state-background);
  transform: var(--selection-motion-transform, none);
  transform-origin: top left;
  pointer-events: none;
}
[data-selection-motion-host='true'][data-selection-animating='true']::after { display: block; }
[data-selection-motion-host='true'][data-selection-animating='true'] [data-selection-motion-target='true']:is(
  [role='menuitemradio'],
  [role='option'],
  [role='tab'],
  [role='radio'],
  [aria-pressed],
  [aria-current],
  [data-selection-active]
) { background: var(--selection-item-background, transparent) !important; box-shadow: none; }

/* The selected track matches menu selection; the thumb remains the state cue. */
.settings-switch,
.chat-hub-management .chat-api-switch,
.chat-hub-visibility-switch,
.chat-hub-management button.chat-hub-mcp-enabled,
.chat-slash-switch,
.overlay-capsule .overlay-menu-switch {
  transition: background-color var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out);
}
.settings-switch:checked,
.chat-hub-management .chat-api-switch:checked,
.chat-hub-visibility-switch[aria-checked='true'],
.chat-hub-management .chat-hub-visibility-switch[aria-checked='true'],
.chat-hub-management button.chat-hub-mcp-enabled[aria-checked='true'],
.chat-slash-switch.checked,
.overlay-capsule [aria-checked='true'] .overlay-menu-switch {
  border-color: var(--border-subtle);
  background: var(--selection-state-background);
}
.settings-switch:checked::after,
.chat-api-switch:checked::before,
.chat-hub-visibility-switch[aria-checked='true'] > span,
.chat-hub-mcp-enabled[aria-checked='true'] > span,
.chat-slash-switch.checked .chat-slash-switch-knob,
.overlay-capsule [aria-checked='true'] .overlay-menu-switch::after { background: var(--accent-primary); }
.chat-api-switch::before,
.chat-hub-visibility-switch > span,
.chat-hub-mcp-enabled > span {
  margin-left: 0;
  transform: translateX(0);
  transition: transform var(--motion-fast) var(--ease-in-out), background var(--motion-fast) var(--ease-out);
}
.chat-api-switch:checked::before,
.chat-hub-visibility-switch[aria-checked='true'] > span,
.chat-hub-mcp-enabled[aria-checked='true'] > span { margin-left: 0; transform: translateX(16px); }
.settings-switch::after,
.chat-slash-switch-knob,
.overlay-capsule .overlay-menu-switch::after {
  transition: transform var(--motion-fast) var(--ease-in-out), background var(--motion-fast) var(--ease-out);
}
.chat-hub-tabs::before {
  transition: transform var(--motion-exit) var(--ease-in-out);
}
.preview-workbench-content-kind-selection { background: var(--selection-state-background); }
.preview-workbench-content-kind-selection[data-motion='slide'] { transition: transform var(--motion-exit) var(--ease-in-out); }

@media (prefers-reduced-motion: reduce) {
  .settings-switch,
  .chat-hub-management .chat-api-switch,
  .chat-hub-visibility-switch,
  .chat-hub-management button.chat-hub-mcp-enabled,
  .chat-slash-switch,
  .overlay-capsule .overlay-menu-switch,
  .settings-switch::after,
  .chat-api-switch::before,
  .chat-hub-visibility-switch > span,
  .chat-hub-mcp-enabled > span,
  .chat-slash-switch-knob,
  .overlay-capsule .overlay-menu-switch::after,
  .preview-workbench-content-kind-selection[data-motion='slide'],
  .chat-hub-tabs::before { transition: none; }
}

.custom-select-trigger {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.custom-select-trigger:disabled { opacity: .5; cursor: default; }
.custom-select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-select-trigger > .sl-icon { flex: none; width: 14px; height: 14px; color: var(--text-secondary); }
.custom-select-trigger.chat-hub-title-switcher,
.custom-select-trigger.chat-hub-skills-mobile-scope {
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
}
.custom-select-trigger.chat-hub-title-switcher { min-height: 24px; }
.custom-select-trigger.chat-hub-skills-mobile-scope { min-height: 28px; }
.custom-select-menu.custom-select-menu { z-index: calc(var(--layer-workspace-modal) + 2); }
.custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.custom-select-option > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.custom-select-option > .sl-icon { flex: none; color: var(--accent-primary); }
.custom-select-menu [role='option'][aria-selected='true']:not([data-selection-active='true']) { background: transparent; }
.custom-select-menu .custom-select-option[data-selection-active='true'] { background: var(--selection-state-background); }
.model-benchmark-source .custom-select-trigger { flex: 1; }
.chat-status-preference .custom-select-trigger { width: 100%; }
.chat-hub-mcp-form .custom-select-trigger,
.chat-api-key-form .custom-select-trigger,
.share-create-field .custom-select-trigger { width: 100%; min-height: 36px; }
.chat-hub-management .management-inline-editor .custom-select-trigger {
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--surface-panel);
  font-size: 13px;
}
.debug-log-category-label .custom-select-trigger { width: 136px; }
@media (max-width: 700px) { .debug-log-category-label .custom-select-trigger { width: 100%; } }



