@font-face { font-family: ShannonSans; src: url('./ShannonSans-Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
* { box-sizing: border-box; }
html, body { min-width: 280px; margin: 0; }
body { background: var(--outside); color: var(--text); font: 15px/1.6 ShannonSans, system-ui, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:is(button, a, input, select, textarea):focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 27px; line-height: 1.3; font-weight: 550; letter-spacing: -.025em; }
h2 { font-size: 18px; font-weight: 550; }
h3 { font-size: 14px; font-weight: 600; margin-top: 24px; margin-bottom: 8px; }
.secondary { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.text-button { border: 0; border-radius: var(--radius-control); background: transparent; padding: 8px 10px; color: var(--text); font-size: 13px; }
.text-button:hover { background: var(--hover); }
.feedback:empty { display: none; }
.feedback { margin-top: 12px; font-size: 13px; overflow-wrap: anywhere; }
.error { color: var(--danger); }
.weui-cells { margin: 0; border-radius: 8px; background: var(--surface); }
.weui-cell { min-height: 48px; padding: 12px 16px; gap: 12px; font-size: 14px; }
.weui-cell__bd { min-width: 0; }
.weui-cell__ft { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.weui-label { width: auto; max-width: 140px; }
.weui-input { width: 100%; min-width: 0; }
.weui-select { padding: 0 28px 0 0; height: auto; min-height: 24px; line-height: 24px; text-align: right; text-align-last: right; }
.weui-cell_select-after { padding-right: 16px; }
.weui-btn.cw-control { font-size: 14px; min-height: 40px; border-radius: 8px; }
.weui-btn.cw-control:disabled { color: var(--disabled); opacity: 1; }
.actions, .row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions { margin-top: 16px; }
.welcome { min-height: 100dvh; display: flex; flex-direction: column; }
.welcome-toolbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; font-size: 15px; font-weight: 550; }
.welcome-toolbar .text-button { font-weight: 400; }
.sign-in { width: min(400px, calc(100% - 40px)); margin: auto; padding: 48px 0 96px; }
.whale-mark { display: block; margin: 0 0 24px; }
.intro { margin-top: 12px; margin-bottom: 32px; color: var(--muted); }
.sign-in-methods { display: grid; gap: 12px; }
.sign-in-methods:empty { display: none; }
.sign-in-form { display: grid; gap: 12px; margin-top: 24px; }
.callback-failure { display: grid; gap: 16px; margin-top: 24px; }
.callback-failure .feedback { margin: 0; }
.authorization-details { display: grid; gap: 16px; margin: 0 0 24px; }
.authorization-details > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; }
.authorization-details dt { color: var(--muted); }
.authorization-details dd { margin: 0; overflow-wrap: anywhere; }
.sign-in-form .weui-cells { border: 1px solid var(--border-strong); }
.sign-in-form .weui-cell { padding: 10px 14px; }
.field-label { font-size: 13px; }
.sign-in > [role=status] { color: var(--muted); margin: 20px 0; }
.sign-in > .text-button { margin-top: 12px; }
.settings-sheet { width: min(580px, calc(100% - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--text); background: var(--outside); box-shadow: var(--elevation-popover); overflow: auto; }
.settings-sheet::backdrop { background: rgb(0 0 0 / .45); }
.auth-sheet .welcome { min-height: 0; }
.auth-sheet .sign-in { padding: 24px 0 40px; }
.cloud-access > .secondary { margin-bottom: 16px; }
.sidebar-account > .secondary { padding: 4px 10px; }
.sheet-header { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; background: var(--outside); padding: 16px 24px; border-bottom: 1px solid var(--line); z-index: 1; }
.sheet-content { padding: 0 24px 28px; }
.workspace { display: grid; grid-template-columns: 248px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100dvh; }
.sidebar { display: flex; flex-direction: column; min-width: 0; padding: 0 12px 12px; border-right: 1px solid var(--line); background: var(--outside); }
.sidebar-brand { display: flex; align-items: center; gap: 9px; height: 56px; padding: 6px 8px; font-size: 14px; }
.sidebar nav { display: grid; gap: 2px; }
.nav-row { display: block; width: 100%; min-width: 0; padding: 7px 10px; border: 0; border-radius: 7px; background: transparent; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.nav-row:hover { background: var(--hover); }
.nav-row[aria-current] { background: var(--selected); }
.sidebar-history { flex: 1; min-height: 0; overflow: auto; margin-top: 24px; }
.sidebar-history h2 { padding: 0 10px 8px; color: var(--muted); font-size: 12px; font-weight: 500; }
.sidebar-account { border-top: 1px solid var(--line); padding-top: 10px; }
.sidebar-account > span { display: block; padding: 4px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface); }
.workspace-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; border-bottom: 1px solid var(--line); padding: 0 20px; gap: 12px; font-size: 13px; }
.workspace-content { min-height: 0; flex: 1; overflow: auto; padding: 32px; }
.workspace-content > .feedback { max-width: 672px; margin: 12px auto; }
.conversation { width: min(100%, 672px); margin: 0 auto; }
.empty-state { margin: min(18vh, 160px) 0 32px; text-align: center; }
.empty-state > img { margin-bottom: 20px; }
.empty-state > p { margin-top: 12px; }
.message { margin-bottom: 28px; overflow-wrap: anywhere; }
.message h2 { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.message p { white-space: pre-wrap; }
.message .message-content p { white-space: normal; margin: 12px 0; }
.message .message-content :is(h2, h3, h4, h5, h6) { color: var(--text); margin: 20px 0 8px; font-weight: 600; }
.message .message-content h2 { font-size: 20px; }
.message .message-content :is(h3, h4, h5, h6) { font-size: 17px; }
.message .message-content pre { padding: 16px; margin: 16px 0; background: var(--hover); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; white-space: pre; }
.message .message-content code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.message .message-content :is(ul, ol) { padding-inline-start: 24px; margin: 12px 0; }
.message .message-content ul { list-style: disc; }
.message .message-content ol { list-style: decimal; }
.message .message-content blockquote { border-inline-start: 3px solid var(--line); padding-inline-start: 16px; color: var(--muted); margin: 16px 0; }
.message[data-role=user] { border-left: 2px solid var(--line); padding-left: 16px; }
.message[data-role=status] { color: var(--muted); font-size: 13px; }
.public-document { max-width: 880px; margin: 0 auto; padding: 24px; min-height: 100dvh; overflow-wrap: anywhere; }
.public-document-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.public-document-header .brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.document-content { padding: 0 0 32px; color: var(--text); }
.document-content :is(section, h2) { margin-top: 24px; }
.document-content :is(p, ul, ol, pre) { margin: 12px 0; }
.document-content h1 { font-size: 27px; font-weight: 550; }
.document-content :is(pre, code) { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.document-content .weui-media-box { overflow-wrap: anywhere; }
.document-content pre { background: var(--hover); padding: 16px; border-radius: 8px; overflow: auto; white-space: pre; }
.public-document .weui-footer { margin-top: 24px; }
.public-document .weui-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.account-connections .weui-navbar { position: relative; inset: auto; }
.account-connections .weui-panel { margin: 16px 0; }
.account-connections .weui-form { padding: 16px 0; min-height: 0; }
.account-connections fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
.account-connections .weui-label { max-width: 42%; white-space: normal; }
.account-connections .weui-form-preview__hd { font-size: 20px; color: var(--text); }
a.nav-row { display: block; color: inherit; text-decoration: none; }
.content-table { max-width: 100%; overflow-x: auto; }
.content-table table { width: 100%; border-collapse: collapse; }
.content-table :is(th, td) { border: 1px solid var(--line); padding: 8px 12px; text-align: start; }
.conversation-status { margin-bottom: 16px; }
.turn-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.composer { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--outside); }
.composer .weui-textarea { resize: vertical; min-height: 100px; max-height: 50dvh; background: transparent; color: var(--text); }
.composer .weui-textarea::placeholder { color: var(--muted); }
.composer-controls { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.composer-model { display: grid; flex: 1; min-width: 0; gap: 4px; }
.composer-model .weui-select { width: 100%; text-align: left; text-align-last: left; padding: 4px 0; }
.composer-controls .weui-btn { margin: 0; flex-shrink: 0; }
.composer > .text-button { justify-self: start; }
.device-draft-recovery { margin-bottom: 20px; }
.device-draft-recovery > summary { cursor: pointer; margin-bottom: 12px; }
.collection { max-width: 840px; margin: 0 auto; }
.collection > h1 { margin-bottom: 24px; }
.computer-row { align-items: flex-start; flex-wrap: wrap; }
.computer-row h2 { font-size: 15px; }
.computer-row .weui-cell__bd { flex: 1 1 220px; }
.files-collection > h1 { margin-bottom: 12px; }
.files-collection:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); }
.file-list { list-style: none; padding: 0; }
.files-collection > .file-list, .files-collection > section { margin-top: 24px; }
.file-toolbar, .file-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-width: 0; }
.file-toolbar { margin: 24px 0 16px; align-items: start; }
.file-upload { display: grid; gap: 8px; min-width: 0; flex: 1 1 260px; }
.file-upload input { max-width: 100%; min-width: 0; font-size: 13px; }
.file-upload input::file-selector-button { padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-control); background: var(--outside); color: var(--text); cursor: pointer; }
.file-row { display: block; }
.file-row h2, .file-summary h3 { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.file-summary > .weui-cell__bd { flex: 1 1 200px; }
.file-summary > div { min-width: 0; }
.file-confirm, .file-versions { display: grid; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.file-versions h3 { margin: 0; }
.file-versions .file-list { display: grid; gap: 12px; }
.file-confirm p { overflow-wrap: anywhere; }
.display-sheet { width: min(1100px, calc(100% - 32px)); }
.display-sheet .sheet-header { gap: 16px; }
.display-sheet .sheet-header h2 { min-width: 0; overflow-wrap: anywhere; }
.display-sheet .sheet-header button { flex-shrink: 0; }
.display-content { display: grid; gap: 12px; padding: 20px 24px; }
.display-content .feedback { margin: 0; }
.computer-screen { width: 100%; height: min(55dvh, 560px); min-height: 180px; overflow: hidden; background: var(--surface); border-radius: var(--radius-control); }
.computer-screen:focus-within { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); }
.mobile-only { display: none; }
.navigation-open .sidebar .mobile-only { display: inline-block; }
#boot { margin: 20vh auto; max-width: 400px; padding: 24px; }
@media (max-width: 720px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .navigation-open .sidebar { display: flex; position: fixed; inset: 0 auto 0 0; width: min(300px, 100%); z-index: 2; box-shadow: var(--elevation-popover); }
  .sidebar-brand > strong { flex: 1; }
  .mobile-only { display: inline-block; }
  .workspace-content { padding: 24px 20px; }
  .workspace-toolbar { padding: 0 10px; }
  .welcome-toolbar { padding: 12px 20px; }
  .settings-sheet { max-height: calc(100dvh - 24px); }
  .sheet-header { padding: 12px 16px; }
  .sheet-content { padding: 0 16px 24px; }
  .display-content { padding: 16px; }
}
@media (pointer: coarse) {
  .text-button, .nav-row, .weui-btn.cw-control { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.computer-work > .field-label { display: grid; gap: 8px; margin: 16px 0; }
.computer-work .weui-select { text-align: left; text-align-last: left; max-width: 100%; }
.computer-credentials { margin: 20px 0; }
.computer-credentials .field-label { flex: 1 1 220px; }
.computer-credentials .weui-input { min-height: 40px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px; }
.computer-work fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 8px; }
.approval-input { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; max-height: 240px; overflow: auto; }
.computer-work .transcript > .composer { margin: 20px 0; }

html:root body {
  --weui-GREEN: var(--button);
  --weui-BLUE: var(--accent);
  --weui-RED: var(--danger);
  --weui-WARN: var(--danger);
  --weui-TAG-TEXT-GREEN: var(--text);
  --weui-TAG-BACKGROUND-GREEN: var(--selected);
}
::selection { background: var(--selection); }
input, textarea { caret-color: var(--accent); }
* { scrollbar-color: var(--border-strong) transparent; }
summary { cursor: pointer; }
summary:focus-visible, .weui-check__label:focus-within { outline: var(--focus-width) solid var(--accent); outline-offset: -3px; }
.cw-theme-options { margin: 0; padding: 0; border: 0; min-width: 0; }
.cw-theme-options legend { padding: 12px 16px 0; font-size: 13px; color: var(--muted); }
.cw-loading.weui-loadmore { display: flex; align-items: center; gap: 8px; width: auto; margin: 12px 0; text-align: left; color: var(--muted); }
.cw-loading .weui-primary-loading { flex-shrink: 0; color: currentColor; }
.cw-loading .weui-loadmore__tips { padding: 0; }
.cw-notice.weui-information-bar { position: static; inset: auto; transform: none; z-index: auto; margin: 12px 0; color: var(--text); background: var(--hover); }
.cw-notice.error { color: var(--danger); }
.cw-notice [class*="weui-icon-"] { color: inherit; }
.cw-search.weui-search-bar { padding: 8px 0; gap: 4px; background: transparent; }
.cw-search .weui-search-bar__form { min-width: 0; border-radius: var(--radius-control); background: var(--surface); }
.cw-search .weui-search-bar__box { padding-right: 8px; }
.cw-search .weui-search-bar__input { min-height: 32px; font: inherit; font-size: 13px; color: var(--text); }
.cw-search .weui-search-bar__input::placeholder { color: var(--muted); }
.cw-search .weui-icon-search { color: var(--muted); }
.message.weui-article { padding: 0; font-size: inherit; }
.message.weui-article h2 { font-size: 12px; font-weight: 500; }
.message.weui-article p { margin: 0; }
.message.weui-article[data-role=user] { padding-left: 16px; }
.cloud-access.weui-msg { padding-top: 0; text-align: left; }
.weui-badge { color: var(--button-text); background: var(--button); font: 12px/1.4 ShannonSans, system-ui, sans-serif; vertical-align: middle; }
.weui-agree { display: flex; align-items: flex-start; gap: 8px; padding: 12px 0; color: var(--muted); }
.weui-agree .weui-agree__checkbox { appearance: auto; -webkit-appearance: checkbox; flex-shrink: 0; margin: 3px 0 0; width: 18px; height: 18px; background: none; accent-color: var(--button); }
.weui-agree .weui-agree__checkbox:checked { background: none; }
.weui-switch::after { background: var(--surface); }
.weui-switch::before { background: var(--hover); }
.weui-uploader__input-box { margin: 8px 0; border-color: var(--border-strong); border-radius: var(--radius-control); }
.weui-uploader__input-box::before, .weui-uploader__input-box::after { background: var(--text); pointer-events: none; }
.weui-uploader__input-box:focus-within { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); }
.file-upload .weui-uploader__input { width: 100%; }
.weui-catalog { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.weui-catalog > summary { font-size: 14px; }
.weui-catalog > .secondary { margin: 12px 0; }
.weui-sample { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); min-width: 0; }
.weui-sample[hidden] { display: none; }
.weui-sample > h4 { font-size: 13px; font-weight: 600; margin: 0 0 12px; color: var(--muted); }
.weui-sample h5 { font-size: 15px; font-weight: 550; margin: 0 0 8px; }
.weui-sample .actions { margin: 0; }
.cw-sample-form.weui-form { padding: 0; min-height: 0; background: transparent; }
.cw-sample-form .weui-form__control-area { margin: 0; }
.cw-sample-form .weui-form__opr-area { margin: 12px 0 0; }
.cw-cell-button { border: 0; color: inherit; background: transparent; font: inherit; text-align: inherit; }
button.weui-cell { width: 100%; }
.cw-cell-button:disabled { color: var(--disabled); opacity: 1; }
.weui-catalog .weui-cell_swiped .weui-cell__ft { display: flex; }
.weui-catalog .weui-swiped-btn { border: 0; color: var(--text); background: var(--selected); }
.weui-catalog .weui-article { padding: 0; font: inherit; }
.weui-catalog :is(.weui-article, .weui-panel, .weui-form-preview) p { overflow-wrap: anywhere; }
.weui-catalog .weui-panel { margin-top: 0; }
.weui-catalog .weui-media-box { padding: 16px; }
.weui-catalog .weui-media-box__desc { white-space: normal; display: block; color: var(--muted); }
.weui-catalog .weui-form-preview__bd { color: var(--text); }
.weui-catalog .weui-footer__link { color: var(--accent); }
.weui-catalog .weui-footer__text { color: var(--muted); }
.weui-catalog .weui-grid { width: 50%; }
.weui-catalog .weui-grid__label { font: inherit; white-space: normal; }
.weui-catalog .weui-grid__icon i { color: var(--text); }
.cw-icon-samples { display: flex; flex-wrap: wrap; gap: 12px; }
.cw-icon-samples > span { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 12px; }
.cw-icon-samples i { color: currentColor; }
.cw-inline-tips.weui-toptips { display: block; position: static; margin-top: 12px; color: var(--text); background: var(--selected); border-radius: var(--radius-control); }
.cw-sample-nav.weui-tabbar { position: static; }
.cw-sample-nav button { min-height: 44px; font-size: 14px; }
.cw-sample-nav .weui-tabbar__label { color: var(--text); font-size: 14px; }
.cw-sample-nav .weui-bar__item_on { color: var(--text); background: var(--selected); font-weight: 600; }
.weui-slider { position: relative; flex: 1; padding: 20px 0; }
.cw-range { position: absolute; inset: 0; width: 100%; margin: 0; appearance: none; background: transparent; accent-color: var(--button); cursor: pointer; }
.cw-range::-webkit-slider-thumb { appearance: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--button-text); background: var(--button); }
.cw-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--button-text); background: var(--button); }
.weui-slider-box__value { color: var(--text); font-variant-numeric: tabular-nums; }
dialog:is(.cw-preview-overlay, .cw-native-dialog) { inset: 0; transform: none; margin: auto; padding: 0; width: min(460px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); overflow: auto; border: 0; border-radius: 12px; color: var(--text); background: var(--surface); filter: none; }
dialog:is(.cw-preview-overlay, .cw-native-dialog):not([open]) { display: none; }
dialog:is(.cw-preview-overlay, .cw-native-dialog)[open] { display: block; }
dialog:is(.cw-preview-overlay, .cw-native-dialog)::backdrop { background: rgb(0 0 0 / .45); }
:is(.cw-preview-overlay, .cw-native-dialog) .weui-dialog__bd { color: var(--text); overflow-wrap: anywhere; }
:is(.cw-preview-overlay, .cw-native-dialog) .weui-dialog__ft { padding: 0; }
:is(.cw-preview-overlay, .cw-native-dialog) .weui-dialog__btn { width: 100%; min-height: 44px; }
.cw-preview-overlay .weui-actionsheet__cell { display: block; width: 100%; margin-bottom: 16px; color: var(--accent); }
dialog:is(.cw-preview-overlay, .cw-native-dialog):is(.weui-actionsheet, .weui-half-screen-dialog, .weui-picker) { margin-bottom: 0; max-height: 75dvh; border-radius: 12px 12px 0 0; padding: 0 0 env(safe-area-inset-bottom); }
dialog:is(.cw-preview-overlay, .cw-native-dialog).weui-gallery { background: var(--outside); }
.cw-gallery-image { display: block; width: min(240px, 100%); height: auto; margin: 0 auto 24px; }
.cw-picker-select { display: block; width: 100%; margin: 12px 0 24px; padding: 8px; color: var(--text); background: var(--outside); border: 1px solid var(--border-strong); border-radius: var(--radius-control); font: inherit; }
.cw-preview-overlay .weui-icon_toast { margin: 0 auto 16px; color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  .weui-primary-loading { animation: none !important; }
}

.local-workspace { margin: 0 0 20px; }
.local-workspace .weui-panel__bd { padding: 0 16px 16px; }
.local-workspace .weui-cells { margin-top: 0; }
.local-workspace .weui-cell__hd { padding-right: 12px; }
.local-workspace .actions { margin-top: 12px; flex-wrap: wrap; }
.local-workspace .actions .weui-btn { margin: 0; }
.local-workspace .weui-select { text-align: left; text-align-last: left; }
.local-workspace .secondary { margin: 12px 0 0; }

/* Tide: the shell's own names over the generated tokens (tokens.css). */
:root {
  --rail: var(--outside);
  --badge: var(--danger);
  --bubble-self: var(--hover);
  --bubble-self-text: var(--text);
  --avatar-tile: var(--selected);

  --whale-a: #1e8fd8;
  --whale-b: #0b48bb;
  --whale-m: #166ccc;
  --whale-belly: #eaf6ff;
  --whale-groove: #8cc6ef;
  --whale-ink: #071a33;
  --whale-spout: #bfe6ff;

  --font-ui: "ShannonSans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color-scheme: dark;
}

[data-theme="light"] {
  --whale-spout: #4fb3ef;
  color-scheme: light;
}

body { font-family: var(--font-ui); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.weui-btn.cw-control { min-width: 0; }
.weui-badge { background: var(--badge); color: var(--surface); }

.workspace.cw-shell { grid-template-columns: 60px 280px minmax(0, 1fr); }
.cw-rail { background: var(--rail); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0 12px; }
.cw-rail .me { width: 36px; height: 36px; border-radius: 6px; background: var(--selected); color: var(--text); display: grid; place-items: center; font-weight: 600; margin-bottom: 14px; }
.cw-rail-item { width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: grid; place-items: center; text-decoration: none; }
.cw-rail-item:hover { color: var(--text); background: var(--hover); }
.cw-rail-item[aria-current] { color: var(--accent); }
.cw-rail .gap { flex: 1; }
.cw-rail svg, .cw-new svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sidebar.cw-list { padding: 0; background: var(--outside); border-right: 1px solid var(--line); }
.cw-list-top { display: flex; gap: 8px; align-items: center; padding: 12px 12px 8px; }
.cw-list-top .cw-search { flex: 1; min-width: 0; padding: 0; }
.cw-list-top .cw-search .weui-search-bar__form { background: var(--hover); }
.cw-new { flex-shrink: 0; width: 30px; height: 30px; border: 0; border-radius: 6px; background: var(--hover); color: var(--muted); display: grid; place-items: center; }
.cw-new svg { width: 16px; height: 16px; }
.cw-new:hover { color: var(--text); }
.cw-list .sidebar-history { margin-top: 0; }
.cw-row { box-sizing: border-box; width: 100%; border: 0; background: transparent; color: inherit; text-align: left; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 10px 12px; align-items: center; font: inherit; }
.cw-row:hover:not(:disabled) { background: var(--hover); }
.cw-row:disabled { color: var(--disabled); opacity: 1; }
.cw-row-wrap { position: relative; }
.cw-row-wrap > .cw-row { padding-right: 36px; }
.cw-row-more { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); display: grid; place-items: center; opacity: 0; }
.cw-row-more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.cw-row-wrap:is(:hover, :focus-within) > .cw-row-more, .cw-row-wrap > .cw-row[aria-current] + .cw-row-more { opacity: 1; }
.cw-row-more:hover { background: var(--hover); color: var(--text); }
@media (hover: none) { .cw-row-more { opacity: 1; } }
.cw-conversation-menu .cw-rename { display: grid; gap: 6px; text-align: left; }
.cw-rename-row { display: flex; gap: 8px; align-items: center; }
.cw-rename-row .weui-input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.cw-conversation-menu .weui-actionsheet__menu { border-top: 1px solid var(--line); }
.cw-conversation-menu .weui-actionsheet__cell { width: 100%; min-height: 44px; border: 0; background: transparent; color: var(--text); font: inherit; }
.cw-conversation-menu .weui-actionsheet__cell:disabled { color: var(--disabled); opacity: 1; }
.cw-conversation-menu .weui-actionsheet__cell_warn { color: var(--danger); }
.cw-row[aria-current] { background: var(--selected); color: var(--text); }
.cw-row[aria-current] :is(.time, .preview) { color: var(--muted); }
.cw-row .meta { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
.cw-row .line1 { display: flex; gap: 8px; align-items: baseline; }
.cw-row .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.cw-row .time { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.cw-row .preview { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1em; }
.cw-avatar { position: relative; width: 44px; height: 44px; border-radius: 6px; background: var(--avatar-tile); display: grid; place-items: center; flex-shrink: 0; }
.cw-avatar > .whale { display: block; width: 36px; }
.cw-avatar .dot { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--badge); }
.cw-avatar.sm { width: 36px; height: 36px; }
.cw-avatar.me { background: var(--selected); color: var(--text); font-weight: 600; font-size: 14px; }
.cw-list .sidebar-account { padding: 10px 12px 12px; border-top: 1px solid var(--line); }

.cw-chat .workspace-toolbar { min-height: 56px; }
.cw-chat .workspace-toolbar .title { font-size: 16px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-msg.message { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: start; max-width: 82%; margin: 0 0 16px; padding: 0; border: 0; }
.cw-msg.message.self { grid-template-columns: minmax(0, 1fr) 36px; margin-left: auto; padding-left: 0; }
.cw-msg.self > .cw-avatar { order: 2; }
.cw-msg .stack { display: grid; justify-items: start; min-width: 0; }
.cw-msg.self .stack { justify-items: end; }
.cw-bubble { position: relative; max-width: 100%; background: var(--panel); border-radius: 6px; padding: 9px 12px; line-height: 1.55; overflow-wrap: anywhere; }
.cw-bubble::before { content: ""; position: absolute; top: 13px; left: -5px; border: 5px solid transparent; border-left: 0; border-right-color: var(--panel); }
.cw-msg.self .cw-bubble { background: var(--bubble-self); color: var(--bubble-self-text); }
.cw-msg.self .cw-bubble::before { left: auto; right: -5px; border: 5px solid transparent; border-right: 0; border-left-color: var(--bubble-self); }
.cw-msg.self .cw-bubble :is(a, code) { color: inherit; }
.cw-msg.note .cw-bubble { background: transparent; color: var(--muted); font-size: 13px; padding: 2px 0; }
.cw-thought { max-width: 82%; margin: 0 0 12px 46px; color: var(--muted); font-size: 13px; }
.cw-thought > summary { width: fit-content; cursor: pointer; border-radius: 6px; padding: 2px 6px; margin-left: -6px; }
.cw-thought > summary:hover { background: var(--hover); color: var(--text); }
.cw-thought[data-live=true] > summary { color: var(--text); }
.cw-thought-text { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--line); white-space: pre-wrap; line-height: 1.55; overflow-wrap: anywhere; }
.cw-msg.note .cw-bubble::before { display: none; }
.cw-bubble .message-content :first-child { margin-top: 0; }
.cw-bubble .message-content :last-child { margin-bottom: 0; }
.composer-wrap { position: sticky; bottom: 0; z-index: 1; margin-top: 56px; padding-bottom: 16px; background: var(--surface); }
.composer-wrap .composer { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; padding: 12px 0 0; }
.composer-wrap .composer > label.field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.composer-wrap .composer .weui-textarea { min-height: 72px; }
.composer-controls .weui-btn.cw-control { min-height: 32px; padding: 0 18px; font-size: 13px; border-radius: 4px; }
.cw-perch { position: absolute; right: 8px; top: -50px; width: 72px; pointer-events: none; }
.cw-perch > .whale { display: block; }
.cw-perch.swim { animation: cw-swim 9s linear infinite; }
.cw-perch.swim > .whale { animation: cw-face 9s steps(1) infinite; }
@keyframes cw-swim { 0% { transform: translateX(0); } 50% { transform: translateX(min(-240px, -30vw)); } 100% { transform: translateX(0); } }
@keyframes cw-face { 0% { transform: scaleX(-1); } 50% { transform: scaleX(1); } }
@media (max-width: 720px) {
  .workspace.cw-shell { grid-template-columns: minmax(0, 1fr); }
  .cw-rail { display: none; }
  .navigation-open .cw-rail { display: flex; position: fixed; inset: 0 auto 0 0; width: 60px; z-index: 3; }
  .navigation-open .sidebar.cw-list { inset: 0 auto 0 60px; width: min(300px, calc(100% - 60px)); }
  .cw-msg.message { max-width: 94%; }
}
@media (prefers-reduced-motion: reduce) { .cw-perch.swim, .cw-perch.swim > .whale { animation: none; } }
.spout { display: block; width: 100%; height: auto; overflow: visible; }
.spout .px-B { fill: var(--whale-a); }
.spout .px-M { fill: var(--whale-m); }
.spout .px-D { fill: var(--whale-b); }
.spout .px-W { fill: var(--whale-belly); }
.spout .px-G { fill: var(--whale-groove); }
.spout .px-E { fill: var(--whale-ink); }
.spout .px-S { fill: var(--whale-spout); }
.spout .px-L { fill: var(--accent); }
.spout .px-Q { fill: var(--muted); }
.spout .px-A { fill: var(--attention); }
.spout .px-R { fill: var(--danger); }
.spout .fr { opacity: 0; }
.spout.still .fr { opacity: 1; animation: none; }
.spout .core { fill: var(--spout-core, transparent); }
.spout[data-state="working"] { --spout-core: var(--accent); }
.spout[data-state="thinking"] { --spout-core: var(--muted); }
.spout[data-state="waiting"] { --spout-core: var(--attention); }
.spout[data-state="done"] { --spout-core: var(--live); }
.spout[data-state="failed"] { --spout-core: var(--danger); }
@keyframes cwf1-0{0%{opacity:1}100%{opacity:1}}
.spout .f1-0{animation:cwf1-0 var(--period) steps(1,end) infinite}
@keyframes cwf2-0{0%{opacity:1}50.000%{opacity:0}100%{opacity:0}}
.spout .f2-0{animation:cwf2-0 var(--period) steps(1,end) infinite}
@keyframes cwf2-1{0%{opacity:0}50.000%{opacity:1}100%{opacity:1}}
.spout .f2-1{animation:cwf2-1 var(--period) steps(1,end) infinite}
@keyframes cwf3-0{0%{opacity:1}33.333%{opacity:0}100%{opacity:0}}
.spout .f3-0{animation:cwf3-0 var(--period) steps(1,end) infinite}
@keyframes cwf3-1{0%{opacity:0}33.333%{opacity:1}66.667%{opacity:0}100%{opacity:0}}
.spout .f3-1{animation:cwf3-1 var(--period) steps(1,end) infinite}
@keyframes cwf3-2{0%{opacity:0}66.667%{opacity:1}100%{opacity:1}}
.spout .f3-2{animation:cwf3-2 var(--period) steps(1,end) infinite}
@keyframes cwf4-0{0%{opacity:1}25.000%{opacity:0}100%{opacity:0}}
.spout .f4-0{animation:cwf4-0 var(--period) steps(1,end) infinite}
@keyframes cwf4-1{0%{opacity:0}25.000%{opacity:1}50.000%{opacity:0}100%{opacity:0}}
.spout .f4-1{animation:cwf4-1 var(--period) steps(1,end) infinite}
@keyframes cwf4-2{0%{opacity:0}50.000%{opacity:1}75.000%{opacity:0}100%{opacity:0}}
.spout .f4-2{animation:cwf4-2 var(--period) steps(1,end) infinite}
@keyframes cwf4-3{0%{opacity:0}75.000%{opacity:1}100%{opacity:1}}
.spout .f4-3{animation:cwf4-3 var(--period) steps(1,end) infinite}
@keyframes cwf5-0{0%{opacity:1}20.000%{opacity:0}100%{opacity:0}}
.spout .f5-0{animation:cwf5-0 var(--period) steps(1,end) infinite}
@keyframes cwf5-1{0%{opacity:0}20.000%{opacity:1}40.000%{opacity:0}100%{opacity:0}}
.spout .f5-1{animation:cwf5-1 var(--period) steps(1,end) infinite}
@keyframes cwf5-2{0%{opacity:0}40.000%{opacity:1}60.000%{opacity:0}100%{opacity:0}}
.spout .f5-2{animation:cwf5-2 var(--period) steps(1,end) infinite}
@keyframes cwf5-3{0%{opacity:0}60.000%{opacity:1}80.000%{opacity:0}100%{opacity:0}}
.spout .f5-3{animation:cwf5-3 var(--period) steps(1,end) infinite}
@keyframes cwf5-4{0%{opacity:0}80.000%{opacity:1}100%{opacity:1}}
.spout .f5-4{animation:cwf5-4 var(--period) steps(1,end) infinite}
@keyframes cwf6-0{0%{opacity:1}16.667%{opacity:0}100%{opacity:0}}
.spout .f6-0{animation:cwf6-0 var(--period) steps(1,end) infinite}
@keyframes cwf6-1{0%{opacity:0}16.667%{opacity:1}33.333%{opacity:0}100%{opacity:0}}
.spout .f6-1{animation:cwf6-1 var(--period) steps(1,end) infinite}
@keyframes cwf6-2{0%{opacity:0}33.333%{opacity:1}50.000%{opacity:0}100%{opacity:0}}
.spout .f6-2{animation:cwf6-2 var(--period) steps(1,end) infinite}
@keyframes cwf6-3{0%{opacity:0}50.000%{opacity:1}66.667%{opacity:0}100%{opacity:0}}
.spout .f6-3{animation:cwf6-3 var(--period) steps(1,end) infinite}
@keyframes cwf6-4{0%{opacity:0}66.667%{opacity:1}83.333%{opacity:0}100%{opacity:0}}
.spout .f6-4{animation:cwf6-4 var(--period) steps(1,end) infinite}
@keyframes cwf6-5{0%{opacity:0}83.333%{opacity:1}100%{opacity:1}}
.spout .f6-5{animation:cwf6-5 var(--period) steps(1,end) infinite}
@keyframes cwf7-0{0%{opacity:1}14.286%{opacity:0}100%{opacity:0}}
.spout .f7-0{animation:cwf7-0 var(--period) steps(1,end) infinite}
@keyframes cwf7-1{0%{opacity:0}14.286%{opacity:1}28.571%{opacity:0}100%{opacity:0}}
.spout .f7-1{animation:cwf7-1 var(--period) steps(1,end) infinite}
@keyframes cwf7-2{0%{opacity:0}28.571%{opacity:1}42.857%{opacity:0}100%{opacity:0}}
.spout .f7-2{animation:cwf7-2 var(--period) steps(1,end) infinite}
@keyframes cwf7-3{0%{opacity:0}42.857%{opacity:1}57.143%{opacity:0}100%{opacity:0}}
.spout .f7-3{animation:cwf7-3 var(--period) steps(1,end) infinite}
@keyframes cwf7-4{0%{opacity:0}57.143%{opacity:1}71.429%{opacity:0}100%{opacity:0}}
.spout .f7-4{animation:cwf7-4 var(--period) steps(1,end) infinite}
@keyframes cwf7-5{0%{opacity:0}71.429%{opacity:1}85.714%{opacity:0}100%{opacity:0}}
.spout .f7-5{animation:cwf7-5 var(--period) steps(1,end) infinite}
@keyframes cwf7-6{0%{opacity:0}85.714%{opacity:1}100%{opacity:1}}
.spout .f7-6{animation:cwf7-6 var(--period) steps(1,end) infinite}
@keyframes cwf8-0{0%{opacity:1}12.500%{opacity:0}100%{opacity:0}}
.spout .f8-0{animation:cwf8-0 var(--period) steps(1,end) infinite}
@keyframes cwf8-1{0%{opacity:0}12.500%{opacity:1}25.000%{opacity:0}100%{opacity:0}}
.spout .f8-1{animation:cwf8-1 var(--period) steps(1,end) infinite}
@keyframes cwf8-2{0%{opacity:0}25.000%{opacity:1}37.500%{opacity:0}100%{opacity:0}}
.spout .f8-2{animation:cwf8-2 var(--period) steps(1,end) infinite}
@keyframes cwf8-3{0%{opacity:0}37.500%{opacity:1}50.000%{opacity:0}100%{opacity:0}}
.spout .f8-3{animation:cwf8-3 var(--period) steps(1,end) infinite}
@keyframes cwf8-4{0%{opacity:0}50.000%{opacity:1}62.500%{opacity:0}100%{opacity:0}}
.spout .f8-4{animation:cwf8-4 var(--period) steps(1,end) infinite}
@keyframes cwf8-5{0%{opacity:0}62.500%{opacity:1}75.000%{opacity:0}100%{opacity:0}}
.spout .f8-5{animation:cwf8-5 var(--period) steps(1,end) infinite}
@keyframes cwf8-6{0%{opacity:0}75.000%{opacity:1}87.500%{opacity:0}100%{opacity:0}}
.spout .f8-6{animation:cwf8-6 var(--period) steps(1,end) infinite}
@keyframes cwf8-7{0%{opacity:0}87.500%{opacity:1}100%{opacity:1}}
.spout .f8-7{animation:cwf8-7 var(--period) steps(1,end) infinite}
.spout[data-once] .fr { animation-iteration-count: 1; animation-fill-mode: forwards; }
@media (prefers-reduced-motion: reduce) {
  .spout .fr { animation: none !important; opacity: 0; }
  .spout .fr.poster { opacity: 1; }
}

.auth-sheet.settings-sheet { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: var(--outside); }
.welcome { background: var(--outside); }
.welcome-toolbar { justify-content: flex-end; height: 48px; padding: 8px 16px; }
.welcome-toolbar > span:first-child { display: none; }
.welcome-toolbar .text-button { color: var(--muted); font-size: 12px; }
.sign-in { width: min(300px, calc(100% - 40px)); padding: 24px 0 72px; text-align: center; }
.sign-in .whale-mark { display: block; width: 88px; height: 88px; margin: 0 auto 20px; }
.sign-in h1 { font-size: 20px; font-weight: 500; letter-spacing: 0; }
.sign-in .intro { margin: 6px 0 36px; font-size: 13px; }
.sign-in :is(.weui-btn.cw-control) { display: flex; width: 100%; min-height: 44px; border-radius: 6px; font-size: 15px; }
.sign-in .sign-in-methods { gap: 10px; }
.sign-in .sign-in-methods + .sign-in-form, .sign-in .sign-in-form { margin-top: 10px; gap: 10px; text-align: left; }
.sign-in .sign-in-form .weui-cells { border: 0; border-radius: 6px; background: var(--hover); }
.sign-in .sign-in-form .weui-cell { padding: 11px 14px; }
.sign-in .field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.sign-in .sign-in-form input::placeholder { color: var(--muted); }
.sign-in > [role=status], .sign-in .secondary { font-size: 13px; }
.sign-in > .text-button { margin: 16px auto 0; color: var(--muted); font-size: 12px; }
.auth-sheet .welcome { min-height: 100dvh; }
.sign-in .weui-btn.cw-control { justify-content: center; }
.cw-avatar.logo { background: var(--panel); }
.session-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; margin: 12px 0 24px; }
.session-card, .session-preview, .session-diff { border: 1px solid var(--border); border-radius: 12px; padding: 14px; min-width: 0; background: var(--panel); }
.session-card summary, .diff-options summary { cursor: pointer; font-weight: 500; }
.session-card p, .session-card li { overflow-wrap: anywhere; margin: 8px 0; }
.session-card ul, .session-card ol { padding-left: 18px; }
.session-card dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin-top: 12px; }
.session-card dd { margin: 0; text-align: right; }
.session-preview pre { overflow: auto; max-height: 60vh; white-space: pre-wrap; overflow-wrap: anywhere; }
.session-diff { margin: 16px 0; }
.diff-options { padding: 10px 0; }
.diff-option { display: inline-flex; align-items: center; gap: 6px; margin: 8px 14px 6px 0; }
.diff-layout { display: flex; gap: 12px; align-items: flex-start; }
.diff-layout[data-position=right] { flex-direction: row-reverse; }
.diff-layout[data-position=top] { flex-direction: column; }
.diff-file-list { width: 190px; flex-shrink: 0; max-height: 60vh; overflow: auto; }
.diff-file-list .text-button { display: block; text-align: left; overflow-wrap: anywhere; width: 100%; }
.diff-patches { min-width: 0; flex: 1; width: 100%; }
.diff-file { margin-bottom: 16px; }
.diff-file > .file-summary { background: var(--hover); padding: 8px; }
.diff-lines { overflow: auto; font: 12px/1.65 ui-monospace, SFMono-Regular, monospace; }
.diff-line { display: flex; min-width: max-content; }
.diff-number { width: 4ch; color: var(--muted); text-align: right; flex-shrink: 0; padding: 0 6px; user-select: none; }
.diff-line code { white-space: pre; flex: 1; padding: 0 8px; }
.diff-line[data-kind=add] { background: var(--diff-add); }
.diff-line[data-kind=delete] { background: var(--diff-remove); }
.diff-line[data-kind=hunk] { color: var(--muted); background: var(--hover); }
.diff-line mark { background: color-mix(in srgb, currentColor 20%, transparent); color: inherit; }
.diff-wrap .diff-line { min-width: 0; }
.diff-wrap .diff-line code { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.diff-split .diff-lines { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.diff-split .diff-line { grid-row: var(--diff-row); }
.diff-split .diff-line[data-kind=delete] { grid-column: 1; }
.diff-split .diff-line[data-kind=add] { grid-column: 2; }
.diff-split .diff-line[data-kind=context], .diff-split .diff-line[data-kind=hunk] { grid-column: 1 / -1; }
@media (max-width: 700px) { .diff-layout, .diff-layout[data-position=right] { flex-direction: column; } .diff-file-list { width: 100%; max-height: 160px; } }
.work-layout { min-width: 0; width: 100%; }
.work-layout.has-side { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.work-layout.has-side > .conversation { min-width: 0; width: 100%; }
.work-layout.has-side > .conversation:last-child { border-left: 1px solid var(--border); padding-left: 20px; }
.pull-request-card details { margin: 12px 0; }
.pull-request-card article { border-top: 1px solid var(--border); padding: 10px 0; }
.pull-request-card p { white-space: pre-wrap; }
@media (max-width: 1000px) { .work-layout.has-side { grid-template-columns: minmax(0, 1fr); } .work-layout.has-side > .conversation:last-child { border-left: 0; border-top: 1px solid var(--border); padding: 20px 0 0; } }
.cw-whale-row { box-sizing: border-box; width: 100%; border: 0; background: transparent; color: inherit; font: inherit; display: flex; gap: 10px; align-items: center; padding: 6px 12px; text-align: left; }
.cw-whale-row:hover:not(:disabled) { background: var(--hover); }
.cw-whale-row .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.cw-new-menu .cw-two-line { display: grid; gap: 2px; padding: 10px 16px; text-align: center; }
.cw-new-menu .cw-two-line:disabled { color: var(--disabled); opacity: 1; }
.cw-new-menu .weui-actionsheet__cell, .cw-members .weui-actionsheet__cell { width: 100%; min-height: 44px; border: 0; background: transparent; color: var(--text); font: inherit; }
.cw-form { display: grid; gap: 8px; text-align: left; }
.cw-form .weui-input, .cw-form .weui-textarea, .cw-form .weui-select, .cw-members .weui-select { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.cw-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.cw-choices { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.cw-choice { display: flex; gap: 8px; align-items: center; }
.cw-member-list { list-style: none; margin: 0; display: grid; gap: 4px; text-align: left; }
.cw-member { display: flex; gap: 8px; align-items: center; min-height: 36px; }
.cw-member .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-warn { color: var(--danger); }
.cw-members .cw-rename-row { display: flex; gap: 8px; }
.cw-members .weui-select { flex: 1; min-width: 0; }
.cw-form .weui-select { width: 100%; text-align: left; background: var(--surface); color: var(--text); }
.cw-members .text-button:disabled { color: var(--disabled); opacity: 1; }
.cw-form .weui-select, .cw-members .weui-select { direction: ltr; }
.cw-box { display: flex; align-items: flex-end; gap: 8px; padding: 10px 10px 10px 14px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); }
.cw-box:focus-within { border-color: var(--text); }
.composer-wrap .composer .cw-box-input, .cw-box-input { flex: 1; min-width: 0; min-height: 48px; max-height: 40dvh; border: 0; padding: 4px 0; background: transparent; color: var(--text); resize: none; outline: none; font: inherit; line-height: 1.5; }
.cw-send { flex-shrink: 0; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--text); color: var(--surface); display: grid; place-items: center; }
.cw-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cw-send:disabled { background: var(--disabled); color: var(--surface); }
.cw-caption { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 28px; padding: 2px 4px 0; font-size: 12px; color: var(--muted); }
.cw-caption .right { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.cw-chip-wrap { position: relative; display: inline-block; min-width: 0; }
.cw-caption-btn { display: inline-flex; align-items: center; gap: 5px; max-width: 260px; height: 26px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-caption-btn:hover:not(:disabled), .cw-caption-btn[aria-expanded=true] { background: var(--hover); color: var(--text); }
.cw-caption-btn:disabled { color: var(--disabled); opacity: 1; }
.cw-caption-btn .icon svg { width: 14px; height: 14px; display: block; fill: none; stroke: currentColor; stroke-width: 1.6; }
.cw-menu-backdrop { position: fixed; inset: 0; z-index: 20; border: 0; background: transparent; cursor: default; }
.cw-menu { position: absolute; z-index: 21; right: 0; min-width: 280px; max-width: min(400px, calc(100vw - 32px)); max-height: min(60dvh, 480px); overflow: auto; padding: 6px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); box-shadow: var(--elevation-popover); }
.cw-menu-up { bottom: calc(100% + 6px); }
.cw-menu-label { margin: 8px 8px 4px; font-size: 12px; color: var(--muted); }
.cw-menu-note { margin: 6px 8px 8px; font-size: 13px; color: var(--muted); }
.cw-menu-sep { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.cw-menu-row { box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; text-decoration: none; }
.cw-menu-row:hover, .cw-menu-row:focus-visible { background: var(--hover); }
.cw-menu-row .text { display: grid; min-width: 0; }
.cw-menu-row .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-menu-row .detail, .cw-menu-row .tags { font-size: 12px; color: var(--muted); }
.cw-menu-search { box-sizing: border-box; width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; margin-bottom: 6px; }
.cw-model-menu { width: min(380px, calc(100vw - 32px)); }
.cw-model-current { padding: 4px 8px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.cw-model-current p { margin: 0; }
.cw-model-current .title { font-size: 15px; font-weight: 500; }
.cw-model-current .detail { font-size: 12px; color: var(--muted); }
.cw-local-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; }
.composer-wrap .composer { padding-top: 8px; border-top: 0; }
.cw-key-form { display: grid; gap: 6px; padding: 0 8px; }
.cw-key-form .weui-select { box-sizing: border-box; width: 100%; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); direction: ltr; text-align: left; }
.cw-key-form .weui-btn { justify-self: start; }
.cw-key-form select.weui-select { direction: ltr; text-align: left; text-align-last: left; padding-right: 8px; }
.cw-menu a.cw-menu-row { display: block; padding-left: 34px; color: var(--text); }
