
.chat-pictures {display:grid;gap:.7rem;margin:1em 0;clear:both;min-width:0}
.chat-pictures[hidden],.chat-picture img[hidden],.chat-picture span[hidden] {display:none}
.chat-pictures.image_group {grid-template-columns:repeat(auto-fit,minmax(min(11rem,100%),1fr))}
.chat-pictures.image_side {grid-template-columns:minmax(0,2fr) minmax(0,3fr);align-items:center}
.chat-picture {margin:0;min-width:0}
.chat-picture-open {border:0;padding:0;display:grid;width:100%;place-items:center;background:transparent;color:inherit;cursor:zoom-in}
.chat-picture img {width:auto;max-width:100%;height:auto;max-height:24rem;object-fit:contain}
.chat-picture figcaption {color:var(--muted);font-size:.82em;overflow-wrap:anywhere;margin-top:.3rem}
.chat-picture-dialog {
  position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh;
  max-width: none; max-height: none; margin: 0; border: 0; background: transparent;
  padding: calc(64px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    calc(64px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.chat-picture-dialog[open] { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; }
.chat-picture-dialog img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.chat-picture-close {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right));
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: var(--panel); color: var(--ink);
}
.chat-picture-close:hover { background: var(--hover); }
.chat-picture-dialog::backdrop {background:#000a}
@media(max-width:600px){.chat-pictures.image_side{grid-template-columns:1fr}.chat-pictures.image_group{display:flex;overflow-x:auto;scroll-snap-type:x proximity}.image_group .chat-picture{flex:0 0 76%;scroll-snap-align:start}.chat-picture img{max-height:40dvh}}

.chat-equation {overflow-x:auto;max-width:100%;margin:.8rem 0;padding:.25rem 0}
.chat-inline-equation {white-space:normal}
:root {
  color-scheme: light dark;
  --page: #ffffff;
  --sidebar: #f6f8f7;
  --panel: #fff;
  --tint: #f4f8f6;
  --tint-strong: #e7f3ee;
  --ink: #192322;
  --muted: #596a65;
  --faint: #75837e;
  --line: #e0e8e4;
  --hover: #edf2f0;
  --accent: #125e55;
  --accent-hover: #0c4f47;
  --accent-text: #fff;
  --focus: #188578;
  --danger: #a42f35;
  --danger-bg: #fff0f0;
  --warn: #78520b;
  --warn-bg: #fff6df;
  --work-blue: #2d65c7;
  --work-blue-text: #2454a2;
  --composer-border: #e8e8e8;
  --shadow: 0 12px 44px #17372c12, 0 2px 8px #17372c08;
  --radius: 14px;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #171c1b;
    --sidebar: #131817;
    --panel: #1e2422;
    --tint: #202a26;
    --tint-strong: #233731;
    --ink: #e5eeea;
    --muted: #afbfba;
    --faint: #9bada6;
    --line: #33413c;
    --hover: #2a3631;
    --accent: #83d4bf;
    --accent-hover: #a4e5d3;
    --accent-text: #102720;
    --focus: #87dbc8;
    --danger: #ff9fa3;
    --danger-bg: #48262b;
    --warn: #f3d292;
    --warn-bg: #3b311d;
    --work-blue: #3775dc;
    --work-blue-text: #a5c6ff;
    --composer-border: #35403b;
    --shadow: 0 12px 44px #0004, 0 2px 8px #0002;
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
  white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.clipboard-fallback { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; font-size: 16px; pointer-events: none; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); }
button, input, textarea { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button:disabled, input:disabled, textarea:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, .admin-page select:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 3px;
}
a { color: var(--accent); }
img { display: block; }
svg.icon { width: 1.14rem; height: 1.14rem; flex: 0 0 auto; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted); }
.eyebrow { color: var(--accent); font-weight: 700; font-size: .82rem; letter-spacing: .09em; }
.button, .icon-button, .chip {
  display: inline-flex; align-items: center; justify-content: center; gap: .52rem; min-height: 40px;
  padding: .58rem .88rem; border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--ink); font-size: .9rem; font-weight: 600;
  line-height: 1.25; text-decoration: none; white-space: nowrap;
}
.button:disabled, .icon-button:disabled { opacity: .5; }
.icon-button { padding: 0; width: 38px; min-width: 38px; height: 38px; min-height: 38px; }
.icon-button.quiet { color: var(--muted); }
.icon-button.quiet:hover:not(:disabled), .button.flat:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.button.secondary { border-color: var(--line); background: var(--panel); }
.button.secondary:hover:not(:disabled) { border-color: var(--faint); background: var(--tint); }
.button.primary { background: var(--accent); color: var(--accent-text); }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); }
.button.danger { background: var(--danger); color: var(--panel); }
.button.danger:hover:not(:disabled) { filter: brightness(.88); }
.chip {
  min-height: 33px; padding: .35rem .64rem; font-size: .86rem; background: var(--tint); border-color: var(--line);
}
.chip.static { cursor: default; }
.chip .icon { width: 1rem; height: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .62rem; color: var(--ink); text-decoration: none; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.04rem; letter-spacing: .02em; }
.brand small { font-size: .76rem; color: var(--faint); margin-top: .2rem; }
.chat-page { overflow: hidden; }
.chat-shell {
  position: relative; top: var(--chat-viewport-top, 0px);
  display: flex; height: 100vh; height: var(--chat-viewport, 100dvh); overflow: hidden;
}
.sidebar {
  width: 258px; min-width: 258px; display: flex; flex-direction: column;
  background: var(--sidebar); border-right: 1px solid var(--line); padding: 1rem .8rem .85rem;
}
.sidebar-heading { display: flex; min-height: 47px; align-items: center; justify-content: space-between; padding: 0 .15rem 0 .25rem; }
.sidebar-heading .brand { min-width: 0; }
.new-chat { justify-content: flex-start; margin: .34rem .2rem .37rem; border-color: var(--line); background: var(--panel); }
.new-chat:hover:not(:disabled) { background: var(--tint-strong); }
.history-filter {
  display: flex; align-items: center; gap: .52rem; color: var(--muted); flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 10px; padding: 0 .65rem; margin: .92rem .2rem .5rem;
  background: var(--panel);
}
.history-filter input {
  min-width: 0; width: 100%; border: 0; padding: .57rem 0; font-size: .88rem;
  background: transparent; outline: 0;
}
.history-filter:focus-within { border-color: var(--focus); }
.history-filter input:focus-visible { outline: none; }
.history-filter input::placeholder { color: var(--faint); }
.history-list { flex: 1; overflow: auto; min-height: 0; scrollbar-width: thin; }
.workspace-nav { display: grid; gap: .13rem; flex: 0 0 auto; }
.workspace-nav-row {
  display: flex; width: 100%; min-height: 40px; align-items: center; gap: .6rem; text-align: start;
  border: 0; border-radius: 10px; background: transparent; padding: .46rem .68rem;
  color: var(--ink); font-size: .91rem; font-weight: 600;
}
.workspace-nav-row:hover:not(:disabled), .workspace-nav-row[aria-current="page"]:not(:disabled) { background: var(--tint-strong); }
.workspace-nav-row:disabled, .history-filter:has(input:disabled) { opacity: .48; }
.workspace-nav-row .icon { color: var(--muted); width: 1rem; height: 1rem; }
.workspace-nav-row[aria-current="page"] .icon { color: var(--accent); }
.discussion { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; margin-top: .2rem; }
.discussion-toggle { flex: 0 0 auto; }
.discussion-chevron { line-height: 0; margin-inline-start: auto; transition: transform 180ms ease; }
.discussion-toggle[aria-expanded="false"] .discussion-chevron { transform: rotate(-90deg); }
.nav-count { color: var(--muted); font-size: .74rem; font-weight: 500; }
.discussion-panel {
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr;
  flex: 1; min-height: 0; transition: grid-template-rows 190ms ease;
}
.discussion-panel[inert] { grid-template-rows: 0fr; }
.discussion-body { overflow: clip; display: flex; flex-direction: column; min-height: 0; }
.sidebar-search-results { flex: 1 1 auto; min-height: 0; overflow: auto; scrollbar-width: thin; padding: .55rem .14rem; }
.sidebar-search-results > section + section { margin-top: .84rem; }
.sidebar-search-results h2 { font-size: .79rem; font-weight: 650; color: var(--muted); margin: 0 .5rem .2rem; }
.sidebar-search-results .history-link { font-size: .84rem; min-height: 39px; }
.sidebar-search-results .history-empty { font-size: .8rem; margin: .36rem .5rem; }
.workspace-busy { flex: none; margin-inline-start: auto; color: var(--work-blue-text); font-size: .66rem; }
.workspace-busy::before { content: ""; display: inline-block; width: .37rem; height: .37rem; margin-inline-end: .22rem; border-radius: 50%; background: currentColor; }
.workspace-notice { font-size: .81rem; line-height: 1.45; padding: .42rem .65rem; margin: 0 0 .3rem; border-radius: .47rem; background: var(--tint-strong); color: var(--muted); }
.older-messages { margin: .6rem auto 1rem; }
.history-empty { margin: .65rem .65rem; color: var(--faint); font-size: .87rem; line-height: 1.65; }
.history-row { display: flex; min-height: 41px; align-items: center; position: relative; border-radius: 9px; margin: .15rem 0; }
.history-row:hover { background: var(--hover); }
.history-row.selected { background: var(--tint-strong); }
.history-row > .history-link {
  border: 0; background: none; border-radius: 9px; display: flex; align-items: center; gap: .48rem;
  font-size: .88rem; color: var(--ink); text-align: start; padding: .59rem .6rem; flex: 1; min-width: 0;
}
.history-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-link .icon { color: var(--faint); width: .99rem; height: .99rem; }
.history-row .icon-button { width: 30px; min-width: 30px; height: 31px; min-height: 31px; margin-right: 3px; }
.history-row .dropdown { opacity: .72; }
.history-row:hover .dropdown, .history-row:focus-within .dropdown { opacity: 1; }
.sidebar-footer { display: grid; grid-template-columns: minmax(0, 1fr); gap: .68rem; flex: 0 0 auto; margin: .58rem .22rem 0; padding: .65rem .25rem .08rem; border-top: 1px solid var(--line); }
#rate-usage:not([hidden]) + .sidebar-storage-summary::before {
  content: "";
  display: block;
  margin: 0 -.25rem .65rem;
  border-top: 1px solid var(--line);
}
.storage-caption { display: flex; align-items: center; white-space: nowrap; gap: .38rem; font-size: .83rem; font-weight: 650; }
.storage-caption .icon { width: .91rem; height: .91rem; color: var(--muted); }
.storage-caption small { color: var(--muted); margin-inline-start: auto; font-size: .69rem; font-weight: 500; }
#workspace-usage, .sidebar-usage-detail {
  margin-top: .32rem; color: var(--muted); font-size: .75rem; font-weight: 400; line-height: 1.45;
}
.rate-caption { display: flex; align-items: baseline; justify-content: space-between; gap: .35rem; }
.rate-row:not([hidden]) + .rate-row:not([hidden]) { margin-top: .55rem; }
.sidebar-footer progress { display: block; appearance: none; width: 100%; height: 5px; margin-top: .48rem; border: 0; border-radius: 99px; background: var(--line); color: var(--accent); accent-color: var(--accent); }
.rate-row progress { margin-top: .27rem; }
.sidebar-footer progress::-webkit-progress-bar { border-radius: 99px; background: var(--line); }
.sidebar-footer progress::-webkit-progress-value { border-radius: 99px; background: var(--accent); }
.sidebar-footer progress::-moz-progress-bar { border-radius: 99px; background: var(--accent); }
.workspace { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.file-preview { flex: .92 1 0; min-width: 0; display: flex; flex-direction: column; background: var(--panel); border-inline-start: 1px solid var(--line); }
.preview-heading { display: flex; gap: .48rem; align-items: center; min-height: 66px; padding: .6rem .85rem; border-bottom: 1px solid var(--line); }
.preview-heading > strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-heading > span { color: var(--accent); }
.preview-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; justify-content: safe center; }
.preview-body:has(.preview-frame), .preview-body:has(.preview-text) { align-items: stretch; justify-content: flex-start; }
.preview-frame { flex: 1; width: 100%; min-height: 0; border: 0; }
.preview-media { max-width: 100%; max-height: 100%; object-fit: contain; }
audio.preview-media { width: min(90%, 30rem); }
.preview-text { flex: 1; overflow: auto; padding: 1rem; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: .9rem/1.6 monospace; }
.preview-note, .preview-pages { color: var(--muted); padding: .6rem; text-align: center; }
.preview-pages { display: flex; align-items: center; justify-content: center; gap: .7rem; }
.preview-file-name { text-align: start; font: inherit; color: inherit; background: transparent; border: 0; padding: 0; cursor: pointer; min-width: 0; overflow-wrap: anywhere; }
.preview-file-name .icon { width:.85rem; height:.85rem; margin-inline-start:.35rem; vertical-align:middle; color:var(--muted); }
.preview-file-name:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 800px) {
  .chat-shell:has(.file-preview:not([hidden])) > :is(.workspace,.sidebar,.scrim) { display: none; }
  .file-preview { flex: 1; border: 0; }
  .preview-heading { min-height: 56px; padding: max(.5rem,env(safe-area-inset-top)) .65rem .5rem; }
}
.workspace-page { flex: 1 1 auto; min-height: 0; overflow: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.workspace-page-inner { --workspace-width: 900px; --workspace-gutter: clamp(.95rem, 4vw, 2rem); width: min(100%, var(--workspace-width)); margin-inline: auto; padding: clamp(1.35rem, 5vh, 3rem) var(--workspace-gutter) 2rem; }
.workspace-page-header { display: flex; gap: 1rem; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.15rem; }
.workspace-page-summary { min-width: 0; }
.workspace-page-summary [data-workspace-name] { overflow-wrap: anywhere; }
.workspace-page-header h1 { font-size: clamp(1.68rem, 3.8vw, 2.2rem); line-height: 1.18; margin: .4rem 0 .32rem; }
.workspace-page-summary .muted { font-size: .87rem; line-height: 1.55; }
.workspace-page-actions, .memory-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .42rem; }
.workspace-page .workspace-notice { margin-bottom: .8rem; }
.directory-list { margin: 0; padding: .22rem .55rem; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.directory-row { display: flex; gap: .62rem; align-items: center; min-height: 58px; padding: .45rem .35rem; }
.directory-row + .directory-row { border-top: 1px solid var(--line); }
.directory-row:focus, .directory-row:focus-within { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 8px; }
.directory-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; background: var(--tint-strong); color: var(--accent); border-radius: 8px; }
#skills-view { overflow: hidden; container-type: inline-size; }
#skills-view .workspace-page-inner {
  width: 100%; height: 100%; overflow: auto; scrollbar-width: thin; overscroll-behavior: contain;
  padding-inline: calc(max(0px, (100% - var(--workspace-width)) / 2) + var(--workspace-gutter));
}
.skills-heading { position: relative; display: flex; align-items: center; }
#skills-back {
  --back-gap: clamp(8px, 1.5vw, 14px);
  position: absolute; inset-inline-end: calc(100% + var(--back-gap)); top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: flex-end; gap: .35rem;
  width: calc(var(--workspace-gutter) - var(--back-gap)); height: 44px;
  color: var(--accent); text-decoration: none; font-weight: 700; font-size: .9rem;
}
.skill-back-chevron {
  width: min(100%, .625rem); height: .875rem; flex: none; background: currentColor;
  clip-path: polygon(77% 0, 100% 16%, 40% 50%, 100% 84%, 77% 100%, 0 50%);
}
.skill-back-label { display: none; }
#skills-back:hover .skill-back-label { text-decoration: underline; text-underline-offset: .2em; }
#skills-back:focus-visible { outline-offset: 1px; }
/* Extend the touch target into the gutter without covering the title. */
#skills-back::after { content: ""; position: absolute; inset-block: 0; inset-inline: -8px calc(2px - var(--back-gap)); }
@container (min-width: 1000px) {
  #skills-back { --back-gap: 16px; width: auto; white-space: nowrap; }
  .skill-back-label { display: inline; }
}
#skills-description { margin: .35rem 0 0; }
.skill-directory, .skill-gallery { list-style: none; margin: 0; padding: 0; display: grid; align-items: start; }
.skill-directory { grid-template-columns: repeat(auto-fit,minmax(min(100%,20rem),1fr)); gap: .7rem; }
.skill-link { display: flex; align-items: center; gap: .8rem; padding: 1rem; height: 100%; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); }
.skill-link:hover, .skill-link:focus-visible { background: var(--tint); color: var(--accent); }
.skill-link > .icon { flex: none; color: var(--muted); width: 1rem; }
.skill-link small { line-height: 1.5; }
.skill-gallery { grid-template-columns: repeat(auto-fill,minmax(min(100%,14rem),1fr)); gap: 1.35rem 1rem; }
.skill-work { display: grid; align-content: start; gap: .35rem; min-width: 0; }
.skill-media { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius); background: var(--tint); border: 1px solid var(--line); color: var(--accent); }
.skill-media skill-artwork { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; }
.skill-media :is(img,canvas,iframe) { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; border: 0; }
.skill-media > .skill-open { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; border: 0; background: transparent; }
.skill-media:has(.skill-open:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.skill-media-code, .skill-media-audio { display: grid; align-content: center; padding: 1rem; min-height: 8.5rem; gap: .65rem; }
.skill-media-audio { justify-items: center; }
.project-excerpt { min-width: 0; display: grid; gap: .18rem; font-size: .81rem; color: var(--muted); }
.project-excerpt > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skill-work-name { padding: .15rem 0 0; background: none; border: 0; text-align: start; font: inherit; color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }
button.skill-work-name:hover { text-decoration: underline; color: var(--accent); }
.skill-work-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .2rem; }
.skill-work-time { color: var(--muted); font-size: .77rem; font-variant-numeric: tabular-nums; }
.skill-empty { grid-column: 1 / -1; text-align: start; }
speech-playback { display: block; min-width: 0; }
.skill-media speech-playback { max-width: 100%; }
speech-playback audio { display: block; max-width: 100%; }
.directory-label { display: grid; gap: .24rem; flex: 1; min-width: 0; }
.directory-label strong { font-size: .92rem; overflow-wrap: anywhere; }
.directory-label small { color: var(--muted); font-size: .75rem; }
.directory-actions { display: flex; flex: 0 0 auto; gap: .16rem; }
.directory-folder-button { display: flex; align-items: center; gap: .62rem; flex: 1; min-width: 0; border: 0; background: transparent; padding: .22rem 0; text-align: start; border-radius: 8px; }
.directory-folder-button:hover { color: var(--accent); }
.folder-breadcrumbs { display: flex; align-items: center; gap: .35rem; overflow-x: auto; padding: .1rem 0 .85rem; font-size: .84rem; scrollbar-width: thin; }
.folder-breadcrumbs > .icon { width: .8rem; height: .8rem; color: var(--faint); }
.crumb-button, .crumb-current { flex: 0 0 auto; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb-button { padding: .3rem .35rem; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.crumb-button:hover { background: var(--tint); color: var(--accent); }
.crumb-current { padding: .3rem .35rem; color: var(--ink); font-weight: 600; }
.folder-dialog-path { overflow-wrap: anywhere; }
#move-destination { width: 100%; min-height: 44px; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font: inherit; }
.directory-empty { padding: .85rem .55rem; color: var(--muted); font-size: .87rem; line-height: 1.6; }
.memory-section { display: grid; gap: .72rem; margin-bottom: 1rem; }
.memory-section h2, .memory-panel h2 { font-size: 1.05rem; margin-bottom: .34rem; }
.memory-section .muted { font-size: .83rem; line-height: 1.56; }
.memory-panel, .task-memory-card {
  --memory-radius: var(--radius);
  padding: .87rem .9rem; border: 1px solid var(--line); border-radius: var(--memory-radius); background: var(--panel); min-width: 0;
}
.memory-panel > .field { margin: .33rem 0 .72rem; }
.memory-panel textarea {
  display: block; resize: vertical; width: 100%; min-height: 7rem; padding: .8rem .92rem;
  border: 1px solid var(--line); border-radius: var(--memory-radius); background: var(--tint);
  color: var(--ink); font-size: .95rem; font-weight: 400; line-height: 1.65;
}
.memory-panel textarea::placeholder { color: var(--muted); font-weight: 400; }
.memory-panel textarea:focus { border-color: var(--focus); background: var(--panel); }
.memo-panel { display: grid; gap: .92rem; padding: clamp(1rem, 2vw, 1.32rem); }
.memo-panel > .memo-field { margin: 0; }
.memo-heading { display: flex; align-items: flex-start; gap: .7rem; }
.memo-panel .memo-heading h2 { margin: 0 0 .22rem; font-size: 1.08rem; line-height: 1.3; }
.memo-icon {
  width: 2.25rem; height: 2.25rem; flex: none; display: grid; place-items: center;
  border-radius: 10px; color: var(--accent); background: var(--tint-strong);
}
.memo-description { color: var(--muted); font-size: .84rem; line-height: 1.5; }
.memory-actions { justify-content: flex-end; }
.memo-actions { justify-content: space-between; gap: .55rem .75rem; min-width: 0; }
.memo-actions .button { margin-inline-start: auto; }
.memo-actions .button:disabled { opacity: 1; color: var(--muted); background: var(--tint); border-color: var(--line); }
.memo-feedback { flex: 1 1 12rem; font-size: .82rem; line-height: 1.45; color: var(--danger); overflow-wrap: anywhere; }
.memo-feedback[data-kind="success"] { color: var(--accent); }
.task-memory-list { display: grid; gap: .48rem; }
.task-memory-card > header { display: flex; flex-wrap: wrap; align-items: center; gap: .42rem; margin-bottom: .45rem; }
.task-memory-card h3 { font-size: .92rem; min-width: 0; overflow-wrap: anywhere; }
.memory-tag { font-size: .71rem; color: var(--accent); background: var(--tint-strong); border-radius: 5px; padding: .16rem .36rem; }
.task-memory-content { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.57; font-size: .86rem; color: var(--muted); }
.task-memory-card .memory-actions { margin-top: .54rem; }
.task-memory-card .button, .memory-pages .button { font-size: .81rem; min-height: 34px; padding: .4rem .59rem; }
.conversation-records { display: grid; gap: .5rem; margin-top: .9rem; }
.conversation-record { border: 1px solid var(--line); border-radius: 10px; padding: .68rem; overflow-wrap: anywhere; }
.conversation-record summary { font-weight: 650; }
.conversation-record h3 { font-size: .86rem; margin: .65rem 0 .3rem; }
.conversation-record p, .conversation-record ul { font-size: .85rem; line-height: 1.5; }
.conversation-record ul { margin: .24rem 0 .5rem; padding-inline-start: 1.2rem; }
.conversation-record-text { white-space: pre-wrap; }
.topbar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; flex: 0 0 auto; min-height: 66px; align-items: center;
  gap: .65rem; padding: .65rem clamp(.9rem, 3vw, 1.85rem); border-bottom: 1px solid var(--line);
  position: relative; z-index: 3;
}
.topbar-left, .page-heading, .access-slot { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.access-slot { justify-self: end; }
.page-icon { display: inline-flex; flex: 0 0 auto; color: var(--accent); }
.page-icon .icon { width: 1.18rem; height: 1.18rem; }
.top-title { font-size: 1.11rem; font-weight: 700; min-width: 0; }
.top-title, .access-button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.access-button { max-width: min(40vw, 330px); }
.access-button span { min-width: 0; }
.access-button .icon:first-child { color: var(--accent); }
.scrim { display: none; }
.thread-scroll {
  flex: 1 1 auto; min-height: 0; overflow: auto; scrollbar-width: thin;
  overscroll-behavior: contain; overflow-anchor: none; scroll-behavior: auto;
}
.thread-column { width: min(100%, 820px); margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; padding: 0 1.45rem; }
.welcome { width: 100%; margin: auto; text-align: center; padding: 2rem 0 2.45rem; }
.welcome-mark { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 1.05rem; color: var(--accent); }
.welcome-mark .icon { width: 76%; height: 76%; }
#welcome-name { overflow-wrap: anywhere; }
.welcome h1 { font-size: clamp(2rem, 4.4vw, 2.7rem); line-height: 1.2; letter-spacing: -.045em; margin-top: .58rem; }
.welcome-description { color: var(--muted); font-size: .99rem; line-height: 1.6; margin: .76rem auto 0; }
.identity-view { flex: 1; min-height: 0; display: grid; place-items: center; overflow: auto; padding: 2rem 1.4rem; }
.identity-content { text-align: center; max-width: 560px; margin: auto; }
.identity-mark { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 1.4rem; border-radius: 18px; background: var(--accent); color: var(--panel); }
.identity-mark .icon { width: 29px; height: 29px; }
.identity-content h1 { font-size: clamp(1.7rem, 3.8vw, 2.5rem); line-height: 1.25; margin-top: .75rem; letter-spacing: -.035em; }
.identity-content > .muted { margin: .9rem auto 0; line-height: 1.7; }
.identity-content > .button { margin-top: 1.65rem; }
.workspace-loading { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; padding: 1.4rem; color: var(--muted); text-align: center; }
.workspace-loading:not(.is-offline) > :is(p, .workspace-status-mark) { visibility: hidden; animation: workspace-loading-visible 0s 240ms forwards; }
.workspace-status-mark { display: grid; place-items: center; width: 38px; height: 38px; color: var(--accent); font-weight: 750; font-size: 1.55rem; }
.workspace-status-mark > span { display: none; }
.workspace-loading:not(.is-offline) .status-loading,
.workspace-loading[data-state="offline"] .status-offline,
.workspace-loading[data-state="thread-error"] .status-warning,
.workspace-loading[data-state="startup-error"] .status-warning { display: inline-flex; }
.workspace-status-mark .icon { width: 28px; height: 28px; }
.status-loading .icon { animation: workspace-spin 1.2s linear infinite; }
.status-warning { color: var(--warn); }
@keyframes workspace-loading-visible { to { visibility: visible; } }
@keyframes workspace-spin { to { transform: rotate(1turn); } }
.suggestions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin: 2rem auto 0; max-width: 720px; }
.suggestion {
  display: flex; align-items: flex-start; gap: .58rem; text-align: left; color: var(--ink); border: 1px solid var(--line);
  background: var(--panel); border-radius: 13px; padding: .9rem .75rem; min-height: 82px;
}
.suggestion:hover { background: var(--tint); border-color: var(--focus); }
.suggestion strong, .suggestion small { display: block; line-height: 1.4; }
.suggestion strong { font-size: .88rem; }
.suggestion small { margin-top: .37rem; color: var(--muted); font-size: .77rem; }
.suggestion-icon { flex: 0 0 auto; color: var(--accent); padding: .35rem; background: var(--tint-strong); border-radius: 8px; }
.suggestion-icon .icon { width: .98rem; height: .98rem; }
.messages { padding: 2rem 0 1.25rem; display: flex; flex-direction: column; gap: 1.8rem; }
.message { max-width: 100%; }
.message-arrival { animation: reply-arrival 200ms cubic-bezier(.18,.8,.24,1) both; }
.reply-block-arrival { animation: reply-arrival 175ms cubic-bezier(.18,.8,.24,1) both; }
@keyframes reply-arrival { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.message.user {
  align-self: flex-end; width: fit-content; max-width: min(86%, 620px); padding: .78rem 1rem; border-radius: 19px 19px 4px 19px;
  background: var(--tint-strong); white-space: pre-wrap; word-break: break-word; line-height: 1.6;
}
.message.assistant { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: .7rem; }
.assistant-avatar { width: 30px; height: 30px; margin-top: .02rem; }
.message-label { display: flex; align-items: baseline; gap: .46rem; margin: .16rem 0 .54rem; font-size: .91rem; font-weight: 700; }
.message-identity { display: flex; flex-wrap: wrap; align-items: baseline; min-width: 0; gap: .18rem .46rem; overflow-wrap: anywhere; }
.message-label small { color: var(--muted); font-size: .78rem; font-weight: 550; }
.message-duration { flex: 0 0 auto; margin-inline-start: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.assistant-status { color: var(--muted); font-size: .88rem; line-height: 1.65; margin-top: .48rem; white-space: pre-wrap; }
.assistant-status.error { color: var(--danger); }
.thinking { margin-bottom: .65rem; display: inline-block; max-width: 100%; color: var(--muted); background: var(--tint); border: 1px solid var(--line); border-radius: 10px; }
.thinking[open] { display: block; }
.thinking > summary { padding: .5rem .62rem; display: flex; gap: .49rem; align-items: center; font-size: .85rem; font-weight: 650; }
.thinking .summary-body { padding: 0 .72rem .65rem; font-size: .88rem; }
.thinking .source-list { margin: 0; padding-inline-start: 2.25rem; overflow-wrap: anywhere; }
.source-list li + li { margin-top: .25rem; }
.thinking .toggle-icon, .dropdown .toggle-icon { margin-left: auto; }
.thinking[open] > summary .toggle-icon, .dropdown[open] > summary .toggle-icon { transform: rotate(180deg); }
.typing { display: flex; align-items: center; gap: .48rem; color: var(--muted); margin: .32rem 0; font-size: .88rem; }
.typing::before { content: ""; width: 9px; height: 9px; background: var(--accent); border-radius: 50%; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .32; } }
@media (prefers-reduced-motion: reduce) { .typing::before { animation: none; } }
.markdown { min-width: 0; overflow-wrap: anywhere; line-height: 1.68; }
.markdown > * + * { margin-top: .72em; }
.markdown h1 { font-size: 1.52em; line-height: 1.26; }
.markdown h2 { font-size: 1.27em; }
.markdown h3 { font-size: 1.13em; }
.markdown h4, .markdown h5, .markdown h6 { font-size: 1.04em; margin-bottom: 0; }
.markdown ul, .markdown ol { padding-inline-start: 1.43em; margin-block: 0; }
.markdown > ul:not(:first-child), .markdown > ol:not(:first-child) { margin-top: .72em; }
.markdown li > ul, .markdown li > ol { margin-top: .26em; }
.markdown li + li { margin-top: .25em; }
.markdown li.markdown-task-item { list-style: none; }
.markdown-task-item > input[type="checkbox"], .markdown-task-item p > input[type="checkbox"] { margin-inline: -.94em .38em; vertical-align: -.1em; }
.markdown code { background: var(--tint); border: 1px solid var(--line); border-radius: 4px; padding: .08em .3em; font-family: Consolas, monospace; font-size: .9em; }
.markdown pre { max-width: 100%; padding: .9rem 1rem; margin-bottom: 0; background: var(--tint); overflow: auto; border: 1px solid var(--line); border-radius: 10px; white-space: pre; }
.markdown pre code { background: none; padding: 0; border: 0; }
.markdown blockquote { border-inline-start: 3px solid var(--focus); padding-inline-start: .75em; margin-inline: 0; margin-bottom: 0; color: var(--muted); }
.markdown blockquote > * + *, .markdown li > p + * { margin-top: .46em; }
.markdown hr { border: 0; border-top: 1px solid var(--line); margin-block: .9em; }
.markdown .markdown-html { white-space: pre-wrap; font-size: .9em; color: var(--muted); }
.markdown-image { max-width: 100%; height: auto; border-radius: 8px; }
.markdown-image-link { font-size: .94em; }
.markdown-table-wrap {
  max-width: 100%; overflow: auto; overscroll-behavior-inline: contain;
  border: 1px solid var(--line); border-radius: 10px; scrollbar-width: thin;
}
.markdown-table { border-collapse: collapse; width: 100%; font-size: .93em; }
.markdown-table :is(th, td) {
  text-align: start; padding: .53em .72em; min-width: 5.4ch; vertical-align: top;
  border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.markdown-table th { background: var(--tint-strong); }
.markdown-table tbody tr:nth-child(2n) { background: var(--tint); }
.markdown-table tr > :last-child { border-inline-end: 0; }
.markdown-table tbody tr:last-child td { border-bottom: 0; }
.markdown-table .align-center { text-align: center; }
.markdown-table .align-right { text-align: right; }
.markdown-table .align-left { text-align: left; }
.response-block {
  min-width: 0; max-width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); color: var(--ink); font-size: .94rem; word-break: normal;
}
.response-block-bar {
  display: flex; justify-content: space-between; align-items: center; gap: .4rem;
  min-width: 0; background: var(--tint); border-bottom: 1px solid var(--line); padding: .26rem .46rem .26rem .72rem;
}
.writing-block .response-block-bar { background: var(--tint-strong); }
.response-block-label {
  display: flex; align-items: center; gap: .42rem; min-width: 0; font-weight: 650; font-size: .88rem;
  color: var(--muted); overflow-wrap: anywhere;
}
.writing-block .response-block-label { color: var(--accent); }
.response-block-label > .icon, .response-copy > .icon { width: 1rem; height: 1rem; }
.response-copy { padding: .34rem .48rem; min-height: 33px; flex: 0 0 auto; font-size: .82rem; color: var(--muted); }
.response-copy:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.response-writing-body { padding: .82rem .9rem .92rem; overflow-wrap: anywhere; }
.response-writing-body p { white-space: pre-wrap; }
.response-block .response-code-body {
  background: var(--panel); border: 0; border-radius: 0; margin: 0; padding: .76rem .9rem .88rem;
  overscroll-behavior-inline: contain; font-size: .91em; line-height: 1.6;
}
.response-block .response-code-body code { font-size: inherit; }
.message-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; margin: .45rem 0 0 -.3rem; }
.message-actions .icon-button { width: 32px; min-width: 32px; height: 32px; min-height: 32px; }
.message-time { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.compose-area { position: relative; flex: 0 0 auto; z-index: 2; padding: .44rem 1.45rem max(.6rem, env(safe-area-inset-bottom)); background: var(--page); }
.jump-latest {
  position: absolute; left: 50%; bottom: calc(100% + .58rem); transform: translateX(-50%);
  z-index: 1; border-radius: 999px; box-shadow: var(--shadow);
}
.composer {
  position: relative; margin-inline: auto; width: min(100%, 1106px); border: 1px solid var(--composer-border);
  background: var(--panel); border-radius: 34px; box-shadow: 0 2px 10px #1515150a, 0 12px 32px #15151506;
  padding: 1rem .75rem .72rem 1.03rem;
}
.composer:focus-within { border-color: var(--faint); }
.composer:has(> .composer-drop-hint:not([hidden])) { border-color: var(--accent); }
.composer-drop-hint {
  position: absolute; inset: .38rem; z-index: 3; pointer-events: none;
  display: flex; align-items: center; justify-content: center; gap: .75rem; padding: .6rem;
  border-radius: 25px; background: color-mix(in srgb, var(--accent) 9%, var(--panel)); color: var(--accent);
}
.composer-drop-icon {
  flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  background: var(--tint-strong);
}
.composer-drop-icon .icon { width: 1.3rem; height: 1.3rem; }
.composer-drop-copy { display: grid; gap: .14rem; line-height: 1.35; }
.composer-drop-copy small { color: var(--muted); }
@media (max-width: 680px) {
  .composer-drop-hint { border-radius: 20px; }
}
.composer textarea {
  width: 100%; display: block; resize: none; border: 0; background: transparent; outline: 0;
  min-height: 75px; max-height: 170px; field-sizing: content; padding: .38rem .18rem .3rem;
  font-size: 1.12rem; line-height: 1.45; color: var(--ink);
}
.composer textarea:focus-visible { outline: 0; }
.composer textarea::placeholder { color: color-mix(in srgb, var(--muted) 65%, var(--panel)); }
.composer-bar, .composer-actions, .composer-tools, .effort-slot { display: flex; align-items: center; gap: .44rem; min-width: 0; }
.composer-bar { min-height: 44px; justify-content: space-between; }
.composer-tools { flex: 0 0 auto; }
.composer-icon { color: var(--ink); border-radius: 50%; }
.composer-icon:hover:not(:disabled) { background: var(--hover); }
.composer-icon .icon { width: 1.33rem; height: 1.33rem; }
#dictate[aria-pressed="true"] { background: var(--danger-bg); color: var(--danger); }
.send-button, .stop-button {
  width: 42px; min-width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: var(--accent-text);
}
.send-button:disabled, .stop-button:disabled { opacity: 1; background: var(--tint-strong); color: var(--accent); }
.send-button:hover:not(:disabled), .stop-button:hover:not(:disabled) { background: var(--accent-hover); }
.composer-footnote { text-align: center; color: var(--faint); font-size: .76rem; line-height: 1.45; padding-top: .61rem; }
.top-notice {
  position: fixed; z-index: 40; top: max(16px, env(safe-area-inset-top)); left: 50%;
  display: flex; align-items: center; gap: .65rem; width: max-content; max-width: min(560px, calc(100vw - 2rem));
  padding: .66rem .72rem .66rem .9rem; border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink); background: var(--panel); box-shadow: var(--shadow); font-size: .86rem; line-height: 1.55;
  opacity: 0; transform: translate(-50%, -8px); pointer-events: none;
  transition: opacity 180ms ease, transform 200ms ease;
}
.top-notice.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.top-notice:has(+ .workspace-loading:not([hidden]):not(.is-offline)) { display: none; }
.notice-icon { flex: 0 0 auto; color: var(--accent); }
.notice-icon .icon { width: 1.12rem; height: 1.12rem; }
#notice-message { min-width: 0; overflow-wrap: anywhere; }
#notice-dismiss { flex: 0 0 auto; width: 30px; min-width: 30px; height: 30px; }
.dropdown { position: relative; min-width: 0; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.dropdown .popover {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 6; min-width: 195px;
  width: min(315px, calc(100vw - 2rem)); border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); color: var(--ink); padding: .38rem; box-shadow: var(--shadow);
}
.dropdown > .popover {
  --menu-offset: -5px;
  opacity: 0; transform: translateY(var(--menu-offset)) scale(.986); transform-origin: top center; pointer-events: none;
  transition: opacity 140ms ease, transform 170ms cubic-bezier(.18,.8,.24,1);
}
.dropdown.above > .popover, .dropdown.opens-up > .popover { --menu-offset: 5px; transform-origin: bottom center; }
.dropdown[open] > .popover { opacity: 1; transform: none; pointer-events: auto; }
@starting-style {
  .dropdown[open] > .popover { opacity: 0; transform: translateY(var(--menu-offset)) scale(.986); }
}
@supports selector(details::details-content) {
  .dropdown::details-content { transition: content-visibility 170ms allow-discrete; }
}
.dropdown.end .popover { left: auto; right: 0; max-height: min(60vh, 420px); overflow: auto; }
.dropdown.above .popover { top: auto; bottom: calc(100% + 9px); width: min(285px, calc(100vw - 3.5rem)); padding: .72rem; }
.context-meter { flex: 0 0 auto; width: 30px; min-width: 30px; }
#context-pie {
  display: block; width: 17px; height: 17px; border: 1px solid var(--line); border-radius: 50%;
  background: conic-gradient(var(--accent) var(--context-used, 0%), var(--tint-strong) 0);
}
.context-meter-panel {
  position: absolute; z-index: 7; right: .64rem; bottom: 3.74rem; width: min(220px, calc(100% - 1.28rem));
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px;
  padding: .62rem .72rem; box-shadow: var(--shadow); font-size: .82rem; line-height: 1.55;
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.context-meter-panel.is-visible { opacity: 1; transform: none; }
.context-meter-panel p { margin-top: .25rem; }
.history-row.history-menu-open { z-index: 2; }
.history-row .history-menu .popover { width: 138px; min-width: 0; left: auto; right: 0; padding: .24rem; }
.history-row .history-menu.opens-up .popover { top: auto; bottom: calc(100% + 5px); }
.history-row .history-menu .menu-action { padding: .58rem .51rem; white-space: nowrap; }
.dropdown.above .composer-add-menu {
  width: 198px; min-width: 0; padding: .32rem; max-height: min(400px, calc(var(--chat-viewport, 100dvh) - 7.6rem));
  overflow: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.composer-feature-group { border-top: 1px solid var(--line); margin-top: .24rem; padding-top: .24rem; }
.composer-add-menu .menu-action:disabled, .composer-add-menu .menu-action[aria-disabled="true"] { color: var(--muted); }
.popover-title { color: var(--muted); font-size: .77rem; line-height: 1.4; margin: .43rem .45rem .33rem; }
.menu-action {
  display: flex; width: 100%; align-items: center; text-align: start; gap: .55rem;
  background: transparent; border: 0; border-radius: 8px; color: var(--ink);
  font-size: .88rem; padding: .6rem .64rem;
}
.menu-action:hover:not(:disabled), .menu-action.selected { background: var(--tint); }
.menu-action.dangerous { color: var(--danger); }
.menu-action strong, .menu-action small { display: block; line-height: 1.35; }
.menu-action small { color: var(--muted); font-size: .76rem; margin-top: .19rem; }
.menu-action .selected-icon { color: var(--accent); margin-left: auto; }
.access-row { display: flex; align-items: center; gap: .2rem; }
.access-row > .menu-action { min-width: 0; flex: 1; }
.access-row .entry-name { min-width: 0; }
.access-row .entry-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-row > .icon-button { width: 35px; min-width: 35px; }
.settings-trigger {
  display: inline-flex; min-height: 31px; align-items: center; gap: .31rem; padding: .3rem .46rem;
  max-width: 100%; font-size: .82rem; color: var(--ink); white-space: nowrap; border-radius: 9px;
  border: 0; background: transparent;
}
button.settings-trigger:hover, button.settings-trigger[aria-expanded="true"] { background: var(--hover); }
.settings-effort, .settings-trigger > .icon { flex: 0 0 auto; color: var(--muted); }
.settings-trigger > .icon { width: .72rem; height: .72rem; margin-inline-start: .1rem; }
button.settings-trigger > .toggle-icon { transition: transform 160ms ease; }
button.settings-trigger[aria-expanded="true"] > .toggle-icon { transform: rotate(180deg); }
.settings-model { min-width: 0; overflow: hidden; text-overflow: ellipsis; max-width: min(32vw, 10.4rem); }
.reasoning-picker { position: static; min-width: 0; }
.reasoning-card {
  position: absolute; z-index: 8; right: .64rem; bottom: 3.74rem; transform-origin: bottom right;
  width: min(337.6px, calc(80% - 1.04rem)); min-width: 0; max-height: min(296px, 45.6dvh);
  overflow: auto; scrollbar-width: thin; overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: 19px; background: var(--panel); color: var(--ink);
  box-shadow: 0 10px 26px #15151513, 0 3px 9px #1515150a;
}
.reasoning-card[inert] { pointer-events: none; }
.reasoning-card[data-resizing] { overflow: hidden; }
.reasoning-page { min-width: 0; }
.reasoning-page.effort-page { padding: 13px 14px 10px; }
.reasoning-page.model-page { padding: .38rem .38rem .44rem; }
.reasoning-model-heading { display: flex; align-items: center; gap: .3rem; padding: .05rem .28rem .26rem .06rem; }
.reasoning-model-heading h2 { font-size: .86rem; font-weight: 650; }
.reasoning-back { width: 32px; min-width: 32px; height: 32px; min-height: 32px; border-radius: 8px; }
.reasoning-model-list { display: grid; gap: .16rem; }
.reasoning-model-option { min-height: 38px; justify-content: space-between; padding: .42rem .54rem; font-size: .81rem; }
.reasoning-model-option small { font-size: .72rem; }
.reasoning-model-option.selected { background: var(--tint-strong); }
.reasoning-model-option:hover, .reasoning-model-option:focus-visible { background: var(--hover); }
.reasoning-option-check { display: inline-flex; min-width: 1.15rem; color: var(--accent); }
.reasoning-heading { min-height: 45px; }
.reasoning-current { text-align: center; min-width: 0; }
.reasoning-value { font-size: 1rem; line-height: 1.29; color: var(--accent); font-weight: 700; padding-top: .1rem; }
.reasoning-model-toggle, .reasoning-model-status {
  min-height: 20px; display: inline-flex; align-items: center; justify-content: center; gap: .11rem;
  padding: .13rem .27rem; color: var(--muted); font-size: .83rem; border: 0; background: transparent;
  border-radius: 7px; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.reasoning-model-toggle:hover { color: var(--ink); background: var(--hover); }
.reasoning-model-toggle > .icon { width: .72rem; height: .72rem; }
.reasoning-scale {
  --knob: 38.4px; --inset: calc(var(--knob) / 2 - 4px); --effort-progress: 0;
  --effort-position: calc(var(--inset) + (100% - 2 * var(--inset)) * var(--effort-progress));
  position: relative; height: var(--knob); margin-top: 9.6px;
}
.reasoning-rail {
  position: absolute; inset: 4.8px 0; border-radius: 999px; background: var(--tint-strong);
  box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; pointer-events: none;
}
.reasoning-progress {
  position: absolute; inset: 0 auto 0 0; width: var(--effort-position);
  background: var(--accent); transition: width 145ms cubic-bezier(.18,.8,.24,1);
}
.reasoning-dots {
  position: absolute; inset: 0 calc(var(--inset) - 3px); display: flex; align-items: center; justify-content: space-between;
}
.reasoning-dot { width: 5px; height: 5px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 82%, var(--tint-strong)); transition: background-color 115ms ease; }
.reasoning-dot.filled { background: color-mix(in srgb, var(--accent-text) 65%, var(--accent)); }
.reasoning-knob {
  position: absolute; left: var(--effort-position); top: 0; width: var(--knob); height: var(--knob);
  transform: translateX(-50%); background: var(--panel); border: 3px solid var(--accent); border-radius: 50%;
  pointer-events: none;
  transition: left 145ms cubic-bezier(.18,.8,.24,1), box-shadow 125ms ease;
}
.reasoning-scale.is-dragging .reasoning-knob {
  transition-duration: 70ms, 125ms;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 19%, transparent);
}
.reasoning-scale.is-dragging .reasoning-progress { transition-duration: 70ms; }
.reasoning-range {
  appearance: none; -webkit-appearance: none; display: block; position: absolute; inset: 0 -4px;
  width: calc(100% + 8px); height: var(--knob); margin: 0; background: transparent; border: 0; cursor: grab;
}
.reasoning-scale.is-dragging .reasoning-range { cursor: grabbing; }
.reasoning-range::-webkit-slider-runnable-track { height: var(--knob); background: transparent; }
.reasoning-range::-moz-range-track { height: var(--knob); background: transparent; border: 0; }
.reasoning-range::-moz-range-progress { background: transparent; }
.reasoning-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: var(--knob); height: var(--knob);
  background: transparent; border: 0;
}
.reasoning-range::-moz-range-thumb {
  box-sizing: border-box; width: var(--knob); height: var(--knob);
  background: transparent; border: 0;
}
.reasoning-range:focus-visible { outline-offset: 2px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) {
  .status-loading .icon { animation: none; }
  .top-notice { transition: none; transform: translate(-50%, 0); }
  .context-meter-panel { transition: none; transform: none; }
  .message-arrival, .reply-block-arrival { animation: none; }
  .dropdown::details-content { transition: none; }
  .discussion-panel, .discussion-chevron { transition: none; }
  .dropdown > .popover, button.settings-trigger > .toggle-icon,
  .reasoning-scale .reasoning-knob, .reasoning-scale .reasoning-progress, .reasoning-dot { transition: none; }
}
.compose-context { display: flex; flex-wrap: wrap; gap: .46rem; padding: .06rem .13rem .48rem; }
.attachment-chip, .ppt-mode-chip {
  display: inline-flex; align-items: center; gap: .39rem; border: 1px solid var(--line); border-radius: 10px;
  max-width: min(100%, 295px); background: var(--tint); padding: .24rem .32rem .24rem .62rem; font-size: .83rem;
}
.attachment-chip > .icon { color: var(--muted); width: .94rem; height: .94rem; }
.ppt-mode-chip { color: var(--work-blue-text); }
.image-mode-chip { max-width: min(100%, 360px); }
.mode-chip-label { flex: 0 0 auto; white-space: nowrap; }
.attachment-chip .attachment-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-chip { min-height: 34px; padding-inline-end: .6rem; }
.upload-pie {
  flex: 0 0 auto; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: conic-gradient(var(--accent) var(--uploaded, 0%), var(--tint-strong) 0);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}
.upload-percent { font-size: .78rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.upload-status { color: var(--muted); font-size: .75rem; }
.upload-chip .upload-status { flex-shrink: 0; }
[data-stage="error"] > .upload-status, .upload-task[data-stage="error"] .upload-status { color: var(--danger); }
.upload-center { position: fixed; z-index: 5; right: max(1.15rem, env(safe-area-inset-right)); bottom: max(1.15rem, env(safe-area-inset-bottom)); }
.upload-toggle {
  position: relative; list-style: none; display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: 50%; cursor: pointer; background: var(--accent); color: var(--accent-text); box-shadow: var(--shadow);
}
.upload-toggle::-webkit-details-marker { display: none; }
.upload-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.upload-toggle:hover { background: var(--accent-hover); }
.upload-toggle .icon { width: 1.35rem; height: 1.35rem; }
#upload-count {
  position: absolute; top: -.28rem; right: -.15rem; border-radius: 1rem; min-width: 1.25rem;
  padding: .06rem .22rem; background: var(--panel); color: var(--accent); border: 1px solid var(--line);
  text-align: center; font-size: .72rem; line-height: 1.1rem; font-weight: 650;
}
.upload-panel {
  position: absolute; bottom: calc(100% + .65rem); right: 0; width: min(21rem, calc(100vw - 3rem));
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden;
}
.upload-panel header { display: flex; justify-content: space-between; align-items: center; padding: .5rem .6rem .5rem 1rem; }
.upload-panel h2 { margin: 0; font-size: 1rem; }
.upload-tasks { list-style: none; margin: 0; padding: 0; max-height: min(48dvh, 22rem); overflow-y: auto; overscroll-behavior: contain; }
.upload-task { display: flex; align-items: center; gap: .72rem; padding: .7rem 1rem; border-top: 1px solid var(--line); }
.upload-task .upload-pie { width: 1.55rem; height: 1.55rem; }
.upload-task-copy { flex: 1; min-width: 0; display: grid; gap: .18rem; }
.upload-task .attachment-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .87rem; }
#files-view:has(.upload-center:not([hidden])) .workspace-page-inner { padding-bottom: 5rem; }
.attachment-chip .icon-button, .ppt-mode-chip .icon-button { width: 25px; min-width: 25px; height: 25px; min-height: 25px; border-radius: 6px; }
.message.user { display: flex; flex-direction: column; align-items: stretch; gap: .4rem; }
.message-files { display: flex; flex-wrap: wrap; gap: .32rem; }
.message-file { font-size: .78rem; padding: .18rem .42rem; border-radius: 7px; background: var(--panel); max-width: min(300px, 65vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppt-progress { margin: .55rem 0 .83rem; padding: .12rem 0 .12rem .55rem; border-inline-start: 2px solid var(--line); }
.ppt-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .42rem; }
.ppt-step { display: flex; gap: .53rem; align-items: baseline; color: var(--faint); font-size: .85rem; line-height: 1.4; }
.ppt-step::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; border: 1px solid var(--line); border-radius: 50%; }
.ppt-step.running { color: var(--work-blue-text); }
.ppt-step.running::before { background: var(--work-blue); border-color: var(--work-blue); }
.ppt-step.done { color: var(--ink); }
.ppt-step.done::before { background: var(--focus); border-color: var(--focus); }
.ppt-step.failed { color: var(--danger); }
.ppt-step.failed::before { background: var(--danger); border-color: var(--danger); }
.ppt-step strong { min-width: 4.2rem; }
.ppt-step small { color: var(--muted); font-size: .79rem; }
.tool-option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .65rem; align-items: start; }
.tool-option-grid .field { margin: 0; }
.tool-log { max-height: 15rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .81rem; }
.ppt-preview-sheet { display: block; width: 100%; max-width: 100%; height: auto; border-radius: .5rem; background: var(--subtle); }
.generated-image { display: block; max-width: min(100%, 37rem); max-height: 38rem; height: auto; border-radius: .8rem; margin: .5rem 0; }
.image-model-guide { display: grid; gap: .2rem; min-width: 0; text-align: start; white-space: normal; }
.image-model-guide small { color: var(--muted); line-height: 1.4; }
.image-model-picker { position: static; }
.image-model-trigger {
  display: flex; align-items: center; gap: .25rem; min-width: 0; padding: .18rem .36rem;
  color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: .4rem; font-size: .84rem;
}
.image-model-trigger:hover { background: var(--hover); }
.image-model-trigger > .toggle-icon { width: .78rem; height: .78rem; }
.image-model-label, .image-model-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.image-model-name { color: var(--muted); }
.dropdown.above .image-model-menu {
  --image-menu-width: min(15.5rem, calc(100% - 1.3rem));
  left: clamp(.65rem, var(--image-model-anchor, 6rem), calc(100% - var(--image-menu-width) - .65rem));
  bottom: calc(100% - .32rem); width: var(--image-menu-width); min-width: 0; padding: .32rem;
  max-height: min(230px, calc(var(--chat-viewport, 100dvh) - 8rem)); overflow: auto;
}
.image-model-menu .menu-action span { min-width: 0; overflow-wrap: anywhere; }
.image-model-menu .selected-icon.unselected { visibility: hidden; }
.ppt-artifact {
  display: flex; gap: .68rem; align-items: center; border: 1px solid var(--line); border-radius: 13px;
  background: var(--tint); padding: .63rem .68rem; margin: .66rem 0; max-width: 550px;
}
.ppt-artifact > .icon { color: var(--work-blue-text); width: 1.4rem; height: 1.4rem; }
.ppt-artifact-info { display: grid; gap: .25rem; flex: 1; min-width: 0; }
.ppt-artifact-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .91rem; }
.ppt-artifact-info small { color: var(--muted); font-size: .78rem; }
.ppt-delivery { max-width: 42rem; margin: .8rem 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.ppt-delivery .ppt-file { max-width: none; margin: 0; padding: .85rem 1rem; border: 0; border-radius: 0; background: var(--panel); }
.ppt-file > .icon { color: var(--accent); }
.ppt-file .ppt-artifact-info strong { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.ppt-gallery > summary { display: block; list-style: none; }
.ppt-gallery > summary::-webkit-details-marker { display: none; }
.ppt-gallery > summary:focus-visible { outline-offset: -3px; }
.ppt-contact-strip { width: 100%; overflow: hidden; background: var(--tint); }
.ppt-contact-strip .ppt-preview-sheet { border-radius: 0; height: auto; }
.ppt-gallery-label { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; padding: .36rem .9rem; color: var(--accent); background: var(--tint); font-size: .8rem; }
.ppt-gallery-label .icon { width: .8rem; height: .8rem; }
.ppt-gallery[open] .ppt-contact-strip { aspect-ratio: auto !important; }
.ppt-gallery .ppt-collapse, .ppt-gallery[open] .ppt-expand { display: none; }
.ppt-gallery[open] .ppt-collapse { display: inline; }
.ppt-gallery[open] .toggle-icon { transform: rotate(180deg); }
.thinking.ppt-log { margin-inline-end: .32rem; background: var(--panel); }
.ppt-phase { font-size: .8rem; font-weight: 500; color: var(--accent); }
.ppt-phase:empty { display: none; }
.ppt-log .ppt-step { display: grid; grid-template-columns: .48rem max-content minmax(0, 1fr); align-items: baseline; }
.ppt-log .ppt-step small { overflow-wrap: anywhere; }
@media (max-width: 500px) {
  .ppt-delivery .ppt-file { padding: .66rem; gap: .48rem; }
  .ppt-file .button { font-size: .8rem; padding-inline: .6rem; }
  .ppt-file > .icon { display: none; }
  .ppt-log .ppt-step { grid-template-columns: .48rem minmax(0, 1fr); }
  .ppt-log .ppt-step small { grid-column: 2; }
}
.dialog {
  padding: 0; margin: auto; border: 1px solid var(--line); border-radius: 17px; max-height: calc(100dvh - 2rem);
  width: min(430px, calc(100% - 2rem)); background: var(--panel); color: var(--ink); box-shadow: var(--shadow);
}
.dialog.wide { width: min(665px, calc(100% - 2rem)); }
.dialog.wide.settings-dialog { width: min(744px, calc(100% - 2rem)); height: min(671px, calc(100dvh - 2rem)); overflow: hidden; }
.dialog::backdrop { background: #101b19a0; }
.dialog-content { padding: 1.28rem; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: .68rem; }
.dialog-icon { display: inline-grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; color: var(--accent); background: var(--tint-strong); border-radius: 12px; }
.dialog-icon.danger-icon { background: var(--danger-bg); color: var(--danger); }
.dialog h2 { font-size: 1.34rem; line-height: 1.25; }
.dialog .muted, .admin-login .muted { margin-top: .42rem; font-size: .91rem; line-height: 1.55; }
.dialog-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .52rem; margin-top: 1.22rem; }
.field { display: flex; flex-direction: column; gap: .38rem; margin-top: .85rem; min-width: 0; font-size: .9rem; font-weight: 650; }
.field input, .expiry-box input[type="datetime-local"], :where(.admin-page) .field :is(select, textarea) {
  border: 1px solid var(--line); border-radius: 9px; padding: .58rem .65rem;
  background: var(--page); min-width: 0; width: 100%; min-height: 41px; font-weight: 500;
}
.field input::placeholder, .admin-page .field textarea::placeholder { font-weight: 400; color: var(--faint); }
.password-field { position: relative; display: flex; align-items: center; }
.password-field input { padding-right: 45px; }
.password-field > .icon-button { position: absolute; right: 3px; }
.field-error { color: var(--danger); margin-top: .63rem; font-size: .88rem; line-height: 1.5; }
.settings-form { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.settings-header { display: flex; flex: 0 0 auto; align-items: start; justify-content: space-between; gap: .6rem; padding: 1.16rem 1.25rem .8rem; }
.settings-heading { display: flex; align-items: start; gap: .72rem; min-width: 0; }
.settings-heading .muted { margin-top: .25rem; font-size: .83rem; }
.settings-tabs { display: flex; gap: .28rem; flex: 0 0 auto; overflow: auto; padding: .25rem 1.25rem .62rem; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.settings-tabs [role="tab"] { min-height: 37px; flex: 0 0 auto; color: var(--muted); border: 1px solid transparent; background: transparent;
  border-radius: 9px; padding: .38rem .71rem; font-size: .88rem; font-weight: 650; white-space: nowrap; }
.settings-tabs [role="tab"]:hover { background: var(--hover); }
.settings-tabs [role="tab"][aria-selected="true"] { background: var(--tint-strong); color: var(--accent); border-color: var(--line); }
.settings-tabs [role="tab"]:focus-visible { outline-offset: -2px; }
.settings-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.settings-panel { display: grid; gap: .95rem; padding: 1.04rem 1.25rem 1.2rem; }
.settings-panel .model-fieldset { margin: 0; }
.settings-block { display: grid; gap: .62rem; min-width: 0; }
.settings-block h3 { font-size: .96rem; line-height: 1.36; }
.settings-block .field, .settings-block .expiry-box { margin: 0; }
.settings-panel .fieldset-body { margin-top: .62rem; }
.settings-panel .fields-grid { align-items: start; }
.settings-panel .settings-block > .muted { margin: 0; font-size: .83rem; }
.settings-panel .field small, .field-help { color: var(--muted); font-size: .79rem; font-weight: 400; line-height: 1.42; }
.settings-panel .field small:empty { display: none; }
.settings-block .quota-control { max-width: 18rem; }
.settings-toggle { margin: 0; padding: .71rem .79rem; border: 1px solid var(--line); border-radius: 10px; background: var(--tint); }
.settings-options { padding: 0; margin: 0; border: 0; min-width: 0; }
.settings-option-groups { display: grid; gap: 1rem; }
.settings-option-groups .settings-block + .settings-block { border-top: 1px solid var(--line); padding-top: .82rem; }
.policy-switch-list { display: grid; gap: .62rem .78rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.admin-page .field select { font-family: inherit; font-size: inherit; color: var(--ink); }
.settings-panel .field input:disabled, .settings-panel .field select:disabled { opacity: .64; }
.settings-footer { padding: .68rem 1.25rem .8rem; border-top: 1px solid var(--line); background: var(--panel); flex: 0 0 auto; }
.settings-footer .dialog-footer { margin: 0; }
.settings-footer .field-error { margin: 0 0 .46rem; }
.admin-page { background: var(--sidebar); min-height: 100dvh; }
.admin-bar {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 70px;
  padding: .7rem max(clamp(1rem, 3.5vw, 2.2rem), calc((100vw - 1160px) / 2));
  border-bottom: 1px solid var(--line); background: var(--page);
}
.admin-bar-actions { display: flex; gap: .55rem; }
.admin-main { max-width: 1160px; margin: auto; padding: 2.8rem clamp(1rem, 3.5vw, 2.2rem) 1.4rem; }
.center-status { text-align: center; color: var(--muted); margin-top: 2rem; }
.admin-login { display: grid; place-items: center; padding: max(1rem, 7vh) 0; }
.login-card {
  display: flex; flex-direction: column; width: min(100%, 420px); background: var(--panel);
  border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); padding: 1.7rem;
}
.login-card .eyebrow { margin-top: 1.02rem; }
.login-card h1 { font-size: 1.65rem; margin-top: .35rem; }
.login-card .field { margin-top: 1.22rem; }
.login-card .button { margin-top: 1rem; }
.dashboard-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; }
.dashboard-heading h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -.04em; margin-top: .25rem; }
.dashboard-heading .muted { margin-top: .47rem; line-height: 1.6; }
.admin-views {
  display: flex; overflow-x: auto; gap: .34rem; padding: .22rem; margin: 1.1rem 0 0;
  width: fit-content; max-width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 11px;
}
.admin-views .button { flex: none; white-space: nowrap; min-height: 36px; padding: .4rem .66rem; color: var(--muted); }
.admin-views .button:hover { background: var(--hover); color: var(--ink); }
.admin-views .button[aria-pressed="true"] { background: var(--tint-strong); color: var(--accent); }
.global-settings { display: grid; gap: 1rem; margin-top: 1.1rem; }
.global-panel-body { padding: 0 1rem 1rem; }
.global-panel-body > .muted { font-size: .83rem; line-height: 1.55; }
.global-panel-body > .muted:empty { display: none; }
.global-settings textarea { resize: vertical; line-height: 1.5; }
.global-settings > button { justify-self: end; }
.global-group { border-top: 1px solid var(--line); }
.global-group > .code-panel-heading { padding: .65rem .12rem; min-height: 44px; font-size: .9rem; font-weight: 650; }
.global-group > summary .icon { color: var(--muted); }
.global-group[open] > summary .icon { transform: rotate(180deg); }
.global-options { margin-bottom: .65rem; gap: .4rem; }
.global-options .check-line { align-items: baseline; overflow-wrap: anywhere; }
.global-options label:has(:disabled) { color: var(--muted); cursor: not-allowed; }
.maintenance-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 2rem; text-align: center; }
.maintenance-page main { max-width: 42rem; }
.maintenance-page h1 { font-size: clamp(1.8rem,5vw,3rem); margin: 1rem 0; }
.maintenance-details { display: grid; row-gap: 16px; }
#maintenance-reason { white-space: pre-wrap; overflow-wrap: anywhere; }
#maintenance-reason:empty { display: none; }
.admin-notice { display: flex; gap: .48rem; align-items: center; margin-top: .88rem; padding: .68rem .8rem; border-radius: 9px; background: var(--tint-strong); color: var(--accent); font-size: .88rem; line-height: 1.55; }
.admin-notice.warning { background: var(--warn-bg); color: var(--warn); }
.dashboard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .85rem; margin: 1.4rem 0; }
.metric { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: .88rem 1rem; }
.metric dt { color: var(--muted); font-size: .87rem; }
.metric dd { font-size: 1.62rem; font-weight: 740; margin: .28rem 0 0; font-variant-numeric: tabular-nums; }
.metric:nth-child(2) dd { color: var(--accent); }
.code-panel { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.code-panel-heading { display: flex; align-items: center; justify-content: space-between; padding: .95rem 1rem; gap: .6rem; }
.code-panel-heading h2 { font-size: 1.13rem; white-space: nowrap; }
.admin-search { width: min(245px, 53%); }
.code-empty { display: grid; justify-items: center; text-align: center; gap: .45rem; border-top: 1px solid var(--line); padding: 2.3rem 1rem; }
.code-empty h3 { font-size: 1rem; }
.code-empty p { font-size: .89rem; }
.code-table-wrap { overflow-x: auto; }
.code-table { width: 100%; border-collapse: collapse; text-align: start; }
.code-table th, .code-table td { text-align: start; padding: .69rem .8rem; font-size: .88rem; vertical-align: middle; border-top: 1px solid var(--line); }
.code-table th { color: var(--muted); font-weight: 650; background: var(--tint); }
.code-table tbody th { color: var(--ink); background: none; }
.code-table th:first-child, .code-table td:first-child { padding-left: 1rem; }
.code-label { word-break: break-word; font-weight: 650; }
.code-date, .code-storage { white-space: nowrap; font-variant-numeric: tabular-nums; }
.code-models { display: flex; flex-wrap: wrap; gap: .32rem; }
.tag { border-radius: 20px; padding: .23rem .52rem; font-size: .76rem; line-height: 1.28; white-space: nowrap; background: var(--tint); color: var(--muted); }
.tag.active { background: var(--tint-strong); color: var(--accent); }
.tag.expired { background: var(--warn-bg); color: var(--warn); }
.code-actions { display: flex; align-items: center; gap: .18rem; justify-content: flex-end; }
.code-actions .icon-button { width: 34px; min-width: 34px; height: 34px; min-height: 34px; }
.code-actions .trash { color: var(--danger); }
.cell-mobile-label { display: none; }
.usage-view { min-width: 0; margin-top: 1.1rem; }
.usage-controls, .usage-control-actions { display: flex; align-items: center; gap: .42rem; }
.usage-controls { justify-content: space-between; flex-wrap: wrap; gap: .6rem; }
.usage-controls p { font-size: .86rem; line-height: 1.5; }
.admin-select { position: relative; display: inline-flex; align-items: center; min-width: 0; }
.admin-select select { appearance: none; cursor: pointer; }
.admin-select select:disabled { cursor: not-allowed; }
.usage-select select {
  font: inherit; font-size: .9rem; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 9px; padding: .47rem 1.8rem .47rem .63rem; min-height: 39px;
}
.field .admin-select select { padding-inline-end: 1.9rem; text-overflow: ellipsis; }
.admin-select > [data-icon] { position: absolute; inset-inline-end: .55rem; display: flex; color: var(--muted); pointer-events: none; }
.admin-select .icon { width: .88rem; height: .88rem; }
.usage-refresh { background: var(--panel); border-color: var(--line); }
.usage-refresh[aria-busy="true"] .icon { opacity: .42; }
.usage-status { margin-top: .72rem; padding: .55rem .68rem; font-size: .88rem; border-radius: 8px; background: var(--tint); }
.usage-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .68rem; margin: .84rem 0 1rem; }
.usage-metrics .metric { min-width: 0; }
.usage-metrics .metric dd { overflow-wrap: anywhere; }
.usage-metrics .metric .usage-submetric { color: var(--muted); font-weight: 450; font-size: .8rem; line-height: 1.4; }
.usage-total dd { color: var(--accent); }
.usage-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.usage-days-panel, .usage-stage-panel { grid-column: 1 / -1; }
.usage-stage-panel .muted { margin-top: .28rem; font-size: .83rem; line-height: 1.55; }
.usage-days-panel > summary { min-height: 49px; font-weight: 650; }
.usage-days-panel[open] > summary .icon { transform: rotate(180deg); }
.usage-table { width: 100%; border-collapse: collapse; text-align: start; }
.usage-table th, .usage-table td {
  font-size: .83rem; border-top: 1px solid var(--line); padding: .64rem clamp(.3rem, 1vw, .75rem);
  text-align: start; font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.usage-table thead th { color: var(--muted); background: var(--tint); font-weight: 650; }
.usage-table thead th:first-child, .usage-table tbody th:first-child { padding-inline-start: .9rem; }
.usage-table th:not(:first-child), .usage-table td { text-align: end; }
.usage-identity { font-weight: 650; }
.usage-total-cell { color: var(--accent); font-weight: 650; }
.usage-empty { padding: .8rem .95rem; border-top: 1px solid var(--line); font-size: .88rem; }
.usage-footnote { margin-top: .7rem; }
.admin-footnote { display: flex; align-items: center; gap: .48rem; color: var(--muted); font-size: .83rem; line-height: 1.5; margin-top: 1rem; }
.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.expiry-box, .summary-choice { border: 1px solid var(--line); border-radius: 10px; padding: .64rem .7rem; margin-top: .85rem; background: var(--tint); }
.expiry-box { display: flex; align-items: center; justify-content: space-between; gap: .65rem; flex-wrap: wrap; }
.expiry-box input[type="datetime-local"] { width: auto; }
.check-line { display: flex; gap: .58rem; align-items: flex-start; font-size: .89rem; line-height: 1.42; }
.check-line strong, .check-line small { display: block; }
.check-line small { color: var(--muted); margin-top: .17rem; font-size: .79rem; }
input[type="checkbox"] { accent-color: var(--accent); width: 1rem; height: 1rem; margin: .15rem 0 0; flex: 0 0 auto; }
.model-fieldset { padding: 0; border: 0; margin: 1rem 0 0; min-width: 0; }
.model-fieldset legend { font-size: 1rem; font-weight: 720; padding: 0; }
.model-fieldset .muted { font-size: .83rem; margin: .28rem 0 .64rem; }
.model-grants { display: grid; gap: .4rem; }
.grant-row, .global-options .check-line { padding: .55rem .6rem; border: 1px solid var(--line); border-radius: 9px; }
.grant-row { display: grid; grid-template-columns: minmax(155px, 1fr) minmax(0, 1.1fr); align-items: center; gap: .45rem; }
.grant-row.enabled, .global-options label:has(:checked) { background: var(--tint); }
.grant-efforts { display: flex; flex-wrap: wrap; align-items: center; gap: .36rem; }
.grant-efforts label { display: inline-flex; align-items: center; gap: .22rem; font-size: .78rem; color: var(--muted); line-height: 1.35; white-space: nowrap; }
.grant-efforts input[type="checkbox"] { width: .85rem; height: .85rem; margin-top: 0; }
.grant-efforts:has(input:disabled) { opacity: .55; }
@media (max-width: 860px) {
  .sidebar { width: 225px; min-width: 225px; }
  .suggestions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .suggestion:nth-child(3) { display: none; }
}
@media (max-width: 680px), (max-width: 950px) and (max-height: 520px) and (pointer: coarse) {
  .sidebar:not(.is-open) { display: none; }
  .sidebar {
    position: absolute; inset: 0 auto 0 0; z-index: 10; width: min(83vw, 310px); min-width: 0; box-shadow: var(--shadow);
    padding-top: max(.8rem, env(safe-area-inset-top)); padding-bottom: max(.8rem, env(safe-area-inset-bottom));
    padding-left: max(.8rem, env(safe-area-inset-left));
  }
  .scrim:not([hidden]) { display: block; position: absolute; inset: 0; z-index: 9; background: #101b1970; border: 0; }
  .topbar {
    --topbar-left-gap: max(.64rem, env(safe-area-inset-left));
    --topbar-right-gap: max(.64rem, env(safe-area-inset-right));
    min-height: 59px; padding: max(.42rem, env(safe-area-inset-top)) var(--topbar-right-gap) .42rem var(--topbar-left-gap);
  }
  .topbar-left { gap: .16rem; }
  .top-title { font-size: .98rem; }
  .topbar .button, .topbar .icon-button { min-height: 44px; }
  .access-slot > .dropdown { max-width: 100%; }
  .access-button { max-width: min(48vw, 260px); padding-inline: .52rem; }
  .access-slot .dropdown.end > .popover {
    min-width: 0; width: min(315px, calc(100vw - var(--topbar-left-gap) - var(--topbar-right-gap)));
  }
  .thread-column, .compose-area {
    padding-inline: max(.68rem, env(safe-area-inset-left)) max(.68rem, env(safe-area-inset-right));
  }
  .composer { border-radius: 27px; padding: .72rem .52rem .52rem .68rem; }
  .composer textarea { min-height: 54px; max-height: min(120px, 25dvh); font-size: 16px; }
  .compose-context { max-height: min(125px, 20dvh); overflow: auto; align-content: start; }
  .settings-trigger { min-height: 44px; padding-inline: .33rem; }
  .settings-model { max-width: min(29vw, 8rem); }
  .composer-actions { gap: .25rem; }
  .effort-slot .chip { min-height: 44px; }
  .composer .composer-icon, .composer .send-button, .composer .stop-button { width: 44px; min-width: 44px; height: 44px; }
  .reasoning-card { bottom: 3.35rem; max-height: min(276px, calc(var(--chat-viewport, 100dvh) * .464)); }
  .context-meter-panel { bottom: 3.35rem; }
  .reasoning-model-toggle { min-height: 28px; }
  .reasoning-back, .reasoning-model-option, .composer-add-menu .menu-action, .image-model-menu .menu-action { min-height: 44px; }
  .workspace-nav-row, .workspace-page button, .sidebar-search-results .history-link { min-height: 44px; }
  .history-filter input, .memory-panel textarea { font-size: 16px; }
  .directory-row { gap: .4rem; }
  .directory-actions { gap: 0; }
  .directory-actions .icon-button { width: 44px; min-width: 44px; }
  .welcome { padding-block: 1.2rem .9rem; }
  .welcome-mark { width: 52px; height: 52px; margin-bottom: .76rem; }
  .suggestions { margin-top: 1.2rem; gap: .45rem; }
  .suggestion { padding: .7rem .45rem; }
  .suggestion-icon { display: none; }
  .messages { padding-top: 1.2rem; gap: 1.35rem; }
  .message.assistant { gap: .45rem; grid-template-columns: 26px minmax(0, 1fr); }
  .assistant-avatar { width: 26px; height: 26px; }
  .message.user { max-width: 91%; }
  .message-file { min-height: 42px; }
  .response-copy { min-height: 44px; }
  .response-writing-body { padding-inline: .66rem; }
  .response-block-bar { padding-inline: .59rem .26rem; }
  .ppt-artifact { flex-wrap: wrap; }
  .ppt-artifact .button { min-height: 44px; }
  .ppt-step { flex-wrap: wrap; column-gap: .4rem; row-gap: .144rem; }
  .keyboard-tip { display: none; }
  .compact-viewport .suggestions, .compact-viewport .composer-footnote { display: none; }
  .compact-viewport .composer textarea { min-height: 38px; }
  .compact-viewport .topbar { min-height: 50px; }
  .compact-viewport .welcome { padding-block: .65rem; }
  .compact-viewport .welcome-mark { width: 35px; height: 35px; }
  .dialog { max-height: calc(100dvh - 1rem); }
  .dialog.wide.settings-dialog { width: calc(100% - 1rem); height: min(720px, calc(100dvh - 1rem)); }
  .settings-header, .settings-panel, .settings-tabs, .settings-footer { padding-inline: .84rem; }
  .settings-header { padding-block: .78rem .57rem; }
  .settings-heading .dialog-icon { width: 35px; height: 35px; }
  .settings-tabs { gap: .12rem; padding-bottom: .41rem; }
  .settings-tabs [role="tab"] { min-height: 44px; font-size: .82rem; padding-inline: .55rem; }
  .settings-panel { padding-block: .85rem 1rem; }
  .dialog-content { padding: 1rem; }
  .dialog input:not([type="checkbox"]), .admin-page input:not([type="checkbox"]), .usage-select select,
  .admin-page .field :is(select, textarea) { font-size: 16px; }
  .admin-page .field :is(input, select, textarea), .global-options .check-line, .settings-toggle { min-height: 44px; }
  .dialog .button, .admin-page .button { min-height: 44px; }
  .expiry-box input[type="datetime-local"] { width: 100%; min-width: 0; }
  .grant-efforts label { min-height: 33px; padding-inline: .23rem; }
  .admin-bar {
    padding: max(.57rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right))
      .57rem max(.75rem, env(safe-area-inset-left));
  }
  .admin-main {
    padding: 1.35rem max(.75rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom))
      max(.75rem, env(safe-area-inset-left));
  }
  .dashboard-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-stats, .usage-metrics { gap: .5rem; }
  .metric { padding: .66rem .6rem; }
  .metric dd { font-size: clamp(1.08rem, 4.8vw, 1.56rem); }
  .usage-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage-panels { grid-template-columns: minmax(0, 1fr); }
  .usage-refresh { width: 44px; min-width: 44px; height: 44px; }
  .usage-select select { min-height: 44px; }
  .code-table-wrap { overflow: visible; }
  .stack-table { display: block; width: 100%; min-width: 0; }
  .stack-table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
    white-space: nowrap; padding: 0; border: 0;
  }
  .stack-table tbody { display: block; }
  .stack-table tbody tr {
    display: grid; border-top: 1px solid var(--line); gap: .53rem .72rem; align-items: center;
    padding: .72rem .75rem;
  }
  .stack-table tbody th, .stack-table tbody td {
    min-width: 0; border: 0; padding: 0; text-align: start; overflow-wrap: anywhere;
  }
  .stack-table tbody th:first-child { padding-inline: 0; }
  .cell-mobile-label { display: inline; color: var(--muted); font-size: .78rem; font-weight: 500; }
  .code-table tbody tr { grid-template: "name status" auto "models models" auto "date actions" auto "storage storage" auto / minmax(0, 1fr) auto; }
  .code-label { grid-area: name; }
  .code-model-cell { grid-area: models; display: flex; align-items: baseline; gap: .45rem; }
  .code-model-cell .cell-mobile-label { flex: 0 0 auto; }
  .code-models .tag { white-space: normal; overflow-wrap: anywhere; }
  .code-date, .code-storage { display: flex; flex-wrap: wrap; gap: .2rem .43rem; white-space: normal; }
  .code-date { grid-area: date; }
  .code-storage { grid-area: storage; }
  .code-state { grid-area: status; justify-self: end; }
  .code-action-cell { grid-area: actions; }
  .code-state .cell-mobile-label, .code-action-cell .cell-mobile-label { display: none; }
  .code-actions .icon-button { width: 44px; min-width: 44px; height: 44px; }
  .usage-table tbody tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage-table .usage-identity { grid-column: 1 / -1; font-size: .94rem; }
  .usage-number { display: flex; align-items: baseline; justify-content: space-between; gap: .35rem; }
  .usage-number-value { min-width: 0; text-align: end; overflow-wrap: anywhere; }
}
@media (max-width: 420px) {
  .fields-grid, .grant-row { grid-template-columns: 1fr; }
  .welcome-description { font-size: .89rem; }
  .composer-bar { gap: .19rem; }
  .settings-trigger { gap: .24rem; }
  .settings-model { max-width: 27vw; }
  .admin-bar-actions .button { padding-inline: .53rem; gap: .3rem; }
  .admin-bar-actions .icon { display: none; }
}
