/* Prompt manuscript: continuous editing, quiet controls, a clear next step. */
:root {
  -webkit-tap-highlight-color:transparent;
  --paper:#f4f2ec; --paper-2:#eae7df; --card:#fffdf8; --card-2:#edece4;
  --ink:#292e27; --ink-2:#545e51; --ink-3:#697064; --ink-4:#72796b;
  --line:#dddfd4; --line-2:#c3c9b9;
  --clay:#ac492e; --clay-deep:#9d4028; --clay-soft:#ac492e0d; --clay-line:#ac492e40; --clay-ink:#fffaf2;
  --forest:#253f33; --forest-ink:#f0f2df; --ok:#386247;
  --r:12px; --r-lg:16px; --r-sm:8px; --focus-ring:0 0 0 3px var(--clay-line);
}
[data-theme="dark"] {
  color-scheme:dark;
  --paper:#191e1a; --paper-2:#222a23; --card:#222a23; --card-2:#2b352c;
  --ink:#f0f1e7; --ink-2:#c2ccba; --ink-3:#a5b09b; --ink-4:#9ba793;
  --line:#394434; --line-2:#59654f;
  --clay:#eda889; --clay-deep:#f4b69b; --clay-soft:#eda88910; --clay-line:#eda88940; --clay-ink:#22271d;
  --forest:#344e3e; --forest-ink:#edf0df; --ok:#a6c2a4;
}
[data-theme="light"] { color-scheme:light; }
body { letter-spacing:0; background:var(--paper); }
button,input,textarea,select { font-family:inherit; }
button,a,summary,[role="button"],[tabindex] { -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible {
  outline:2px solid var(--clay); outline-offset:4px; box-shadow:none;
}
button:disabled { cursor:wait; }
button:active:not(:disabled),a:active,summary:active { filter:brightness(.94); }
::selection { background:var(--clay-line); color:var(--ink); }
.skip-link { position:fixed; left:20px; top:-80px; z-index:1000; padding:12px 18px; border-radius:8px; color:var(--forest-ink); background:var(--forest); }
.skip-link:focus { top:12px; }
.sidebar,[data-theme="dark"] .sidebar { background:var(--paper); }
.sidebar-head { width:min(1320px,100%); margin:auto; padding:22px 40px; min-height:85px; gap:24px; flex-wrap:nowrap; }
.brand { font-size:21px; letter-spacing:-.045em; flex-shrink:0; }
.brand-mark { width:36px; height:36px; border-radius:9px; box-shadow:none; background:var(--forest); color:var(--forest-ink); font:400 29px/1 Georgia,serif; }
.brand-sub { margin-top:3px; font-size:9px; letter-spacing:.1em; color:var(--ink-3); }
.top-actions { gap:11px; flex-wrap:nowrap; }
.history-toggle,.new-chat-btn { min-height:38px; padding:8px 12px; border:1px solid transparent; border-radius:7px; background:transparent; color:var(--ink-2); font-size:12px; box-shadow:none; }
.history-toggle:hover,.new-chat-btn:hover { border-color:var(--line-2); background:var(--card); color:var(--ink); transform:none; }
.new-chat-btn { border-color:var(--line); background:var(--card); }
.account-pill { min-height:38px; max-width:240px; padding:4px 10px 4px 5px; border:1px solid var(--line); border-radius:99px; background:transparent; box-shadow:none; }
.account-avatar-sm { background:var(--card-2); color:var(--ink-2); width:26px; height:26px; }
.account-name { font-size:11px; }
.account-quota { font-size:10px; color:var(--ink-3); }
.theme-switch { width:46px; height:30px; min-height:30px; border-color:var(--line); background:var(--card); box-shadow:none; }
.theme-switch-track { width:40px; }
.theme-switch[data-theme="dark"] .theme-switch-thumb { transform:translateX(18px); }
.session-list { padding:0 max(24px,calc((100% - 1240px)/2)) 16px; gap:8px; }
.session-item,.session-item.active,.session-item:hover { background:var(--card); box-shadow:none; border:1px solid var(--line); min-height:48px; border-radius:8px; }
.session-item.active { border-color:var(--line-2); background:var(--card-2); }
.session-open { display:block; text-align:left; border:0; background:none; padding:6px 0; }
.session-item .del { opacity:.7; width:30px; height:30px; flex-basis:30px; }
.session-item .meta-mini { display:none; }
.session-item .dot,.session-item.active .dot { width:5px; height:5px; box-shadow:none; }
.session-item:focus-within { border-color:var(--clay); }
.empty-sessions { padding:3px 0; font-size:12px; color:var(--ink-3); }
.status-line { width:min(1160px,100%); margin:auto; padding:15px 40px; min-height:51px; gap:18px; flex-wrap:nowrap; border-bottom:1px solid var(--line); font-size:10px; }
.status-line:empty { display:none; }
.current-session-title { min-width:0; max-width:55%; flex:1; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; color:var(--ink-2); font-size:12px; font-weight:500; }
.session-tags { display:flex; gap:12px; align-items:center; min-width:0; overflow:hidden; white-space:nowrap; }
.session-sub .tag { flex-shrink:0; font-size:10px; color:var(--ink-3); }
.workspace-state { color:var(--ink-3); font-size:10px; margin-left:auto; }
.workspace-state::before { content:''; display:inline-block; width:5px; height:5px; border-radius:50%; background:var(--ok); margin-right:7px; }
.chat-scroll { padding:0; scroll-behavior:auto; scrollbar-gutter:stable; }
.chat-inner { width:min(1160px,100%); max-width:none; padding:0 40px 60px; }
.system-prompt-shell { padding:10px 0 0; background:none; }
.system-prompt-panel { max-width:none; border-top:0; border-bottom:1px solid var(--line); }
.system-prompt-panel summary { min-height:43px; }
.system-prompt-name { font-size:11px; font-weight:500; letter-spacing:0; }
.system-prompt-note { font-size:10px; }
.system-prompt-panel .val { border:0; background:none; font-size:10px; padding-right:0; }
.system-prompt-panel .val::after { content:' 字'; }
.system-textarea { font-size:13px; line-height:1.85; margin-bottom:15px; padding:12px; min-height:96px; background:var(--card); border:1px solid var(--line); border-radius:8px; }
.system-textarea:hover,.system-textarea:focus { background:var(--card); }
.empty-state { padding:37px 0 32px; text-align:left; animation:console-arrive .5s ease both; }
.empty-intro { display:grid; grid-template-columns:minmax(0,1fr) 300px; align-items:center; gap:50px; }
.workspace-eyebrow { display:block; font-size:9px; letter-spacing:.17em; color:var(--ink-3); margin-bottom:14px; }
.empty-state h1 { font-size:clamp(30px,3.3vw,44px); line-height:1.45; font-weight:500; letter-spacing:-.055em; margin:0 0 15px; }
.empty-state h1 > span { color:var(--clay); }
.empty-state p { max-width:none; margin:0; font-size:12px; line-height:1.95; color:var(--ink-2); }
.manuscript-art { position:relative; min-height:224px; color:var(--ink-3); }
.art-caption { position:absolute; top:4px; left:12px; font-size:8px; letter-spacing:.17em; }
.art-node { display:flex; align-items:center; gap:14px; position:absolute; padding:14px 17px; border:1px solid var(--line-2); border-radius:8px; font:11px/1.4 Georgia,serif; background:var(--paper); }
.art-node b { font-family:'Inter','Noto Sans SC',sans-serif; font-size:11px; font-weight:400; }
.art-origin { left:10px; top:42px; width:170px; transform:rotate(-4deg); }
.art-primary { right:5px; top:117px; width:198px; background:var(--forest); border-color:var(--forest); color:var(--forest-ink); transform:rotate(3deg); box-shadow:0 12px 28px -18px #253f3360; }
.art-primary em { margin-left:auto; font-size:20px; font-style:normal; }
.art-alternative { left:10px; top:187px; width:170px; font-style:italic; border-style:dashed; opacity:.8; transform:rotate(-3deg); }
.art-stem { position:absolute; left:40px; top:80px; width:1px; height:126px; background:var(--line-2); }
.art-fork { position:absolute; left:40px; top:93px; width:60px; height:50px; border-bottom:1px solid var(--line-2); border-left:1px solid var(--line-2); border-bottom-left-radius:25px; }
.starter-heading { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-top:32px; font-size:11px; color:var(--ink-2); }
.starter-heading > span:last-child { font-size:10px; color:var(--ink-3); }
.empty-hints { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:12px; justify-content:stretch; }
.empty-hints .hint { padding:15px 17px; border:1px solid var(--line); border-radius:9px; background:var(--card); color:var(--ink-2); text-align:left; box-shadow:none; transition:background .2s,border-color .2s,transform .2s; }
.empty-hints .hint:hover { color:var(--ink); background:var(--card-2); border-color:var(--line-2); transform:translateY(-3px); }
.starter-number { display:block; font-size:9px; letter-spacing:.05em; color:var(--ink-3); margin-bottom:10px; }
.hint strong { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:12px; font-weight:500; }
.hint strong i { font-size:17px; font-style:normal; color:var(--clay); transition:transform .2s; }
.hint:hover strong i { transform:translate(2px,-2px); }
.hint small { display:block; font-size:10px; line-height:1.8; margin-top:6px; color:var(--ink-3); }
.timeline-node,.composer-node { grid-template-columns:76px minmax(0,1fr); gap:24px; padding:27px 0; border-bottom:1px solid var(--line); }
.timeline-node::before,.composer-node::before,.timeline-node::after,.composer-node::after { display:none; }
.timeline-role { padding:5px 0 0; font:500 9px/1.6 'Inter',sans-serif; text-align:left; letter-spacing:.08em; color:var(--ink-3); text-transform:uppercase; }
.timeline-role span { display:block; font-size:10px; margin-top:5px; letter-spacing:0; font-weight:400; }
.timeline-body,.composer-node .timeline-body { padding:0; }
.timeline-node:hover .timeline-role,.timeline-node.is-selected .timeline-role,.composer-node:focus-within .timeline-role { transform:none; }
.editable-text { font-size:15px; line-height:1.9; }
.markdown-body h1,.markdown-body h2,.markdown-body h3 { letter-spacing:-.025em; }
.markdown-body pre { background:var(--card-2); border:1px solid var(--line); border-radius:8px; box-shadow:none; }
.markdown-body a { color:var(--clay); }
.reasoning { border:1px solid var(--line); border-radius:8px; padding:9px 13px; background:color-mix(in srgb,var(--card-2) 50%,transparent); margin-bottom:16px; }
.reasoning summary { min-height:27px; font-size:11px; }
.reasoning-body { font-size:12px; line-height:1.9; color:var(--ink-2); }
.node-tools { display:flex; align-items:center; gap:10px; min-height:35px; margin-top:14px; }
.edit-message-btn { border:0; padding:7px 8px; margin-left:-8px; background:none; color:var(--ink-3); font-size:11px; border-radius:5px; cursor:pointer; }
.edit-message-btn:hover { color:var(--clay); background:var(--clay-soft); }
.edit-hint { font-size:9px; color:var(--ink-3); }
.is-editing .edit-hint { font-size:0; opacity:1; }
.is-editing .edit-hint::after { content:'Ctrl/⌘ + Enter 保存 · Esc 撤销'; font-size:10px; }
.branch-wrap { margin-left:auto; }
.branch-chip { min-height:32px; border-radius:5px; border:1px solid var(--line); background:transparent; font-size:10px; }
.branch-menu { border-radius:8px; background:var(--card); }
.branch-menu { visibility:hidden; }
.branch-wrap.open .branch-menu { visibility:visible; }
.branch-menu button { min-height:38px; }
.branch-meta { max-width:310px; }
.composer-node { margin-top:0; padding-top:28px; padding-bottom:0; border-bottom:0; }
.composer-node .next-headline { gap:20px; margin-bottom:15px; align-items:flex-end; }
.next-kicker { font-size:16px; line-height:1.5; font-weight:500; font-family:inherit; letter-spacing:-.025em; }
.next-note { font-size:11px; color:var(--ink-3); margin-top:4px; }
.composer-hint { font-size:9px; color:var(--ink-3); line-height:1.8; flex-shrink:0; }
.retry-load { padding:3px 6px; border:0; border-bottom:1px solid var(--clay-line); background:none; color:var(--clay); font-size:inherit; cursor:pointer; }
.composer-node .composer-box { display:grid; grid-template-columns:minmax(0,1fr) auto; min-height:132px; gap:12px; padding:15px; border:1px solid var(--line-2); border-radius:10px; background:var(--card); box-shadow:0 2px 5px #253f3303; align-items:end; }
.composer-node .composer-box:focus-within { border-color:var(--clay); box-shadow:0 0 0 3px var(--clay-soft); }
.composer-node #msgInput { grid-column:1/-1; width:100%; min-height:48px; max-height:240px; padding:0; margin:0; border:0; border-radius:0; background:none; color:var(--ink); font-size:14px; line-height:1.8; resize:vertical; box-shadow:none; }
.composer-node #msgInput::placeholder { color:var(--ink-3); }
.search-btn { grid-column:1; justify-self:start; width:32px; height:32px; flex-basis:32px; border:1px solid var(--line); border-radius:7px; background:var(--paper); color:var(--ink-3); }
.search-btn.on,[data-theme="dark"] .search-btn.on { color:var(--clay); border-color:var(--clay-line); background:var(--clay-soft); }
.send-btn { grid-column:2; display:inline-flex; align-items:center; justify-content:center; gap:15px; width:auto; min-width:92px; height:35px; padding:0 13px; border:1px solid transparent; border-radius:7px; background:var(--forest); color:var(--forest-ink); font-size:12px; box-shadow:none; }
.send-btn::after { display:none; }
.send-btn:hover { background:var(--forest); transform:translateY(-1px); box-shadow:0 4px 12px #253f3315; }
.send-btn:disabled { background:var(--card-2); color:var(--ink-3); border-color:var(--line); opacity:1; }
.send-btn svg { width:16px; height:16px; }
.composer-node.branch-compose .composer-box { display:grid; grid-template-columns:1fr auto; padding:12px 15px; min-height:auto; }
.composer-node.branch-compose .send-btn { width:auto; height:35px; }
.composer-node.branch-compose .next-note::after { display:none; }
.branch-compose-line { border-radius:7px; margin-bottom:12px; }
.reasoning-composer,.reasoning-composer.is-suggested { margin-top:15px; padding:0; border:0; border-bottom:1px solid var(--line); border-radius:0; background:none; }
.reasoning-composer summary { min-height:40px; gap:10px; font-size:11px; color:var(--ink-2); }
.reasoning-composer-note { font-size:10px; color:var(--ink-3); margin-left:auto; }
.reasoning-composer[open] { margin-bottom:0; border-left:0; }
.prefix-composer-grid { gap:15px; padding-top:12px; padding-bottom:16px; }
.prefix-field strong { font-size:11px; font-weight:500; }
.prefix-field strong small { font-size:9px; font-weight:400; color:var(--ink-3); margin-left:6px; }
.prefix-field em { font-size:10px; }
.reasoning-composer textarea { min-height:90px; padding:10px 12px; border:1px solid var(--line); border-radius:7px; background:var(--card); font-size:12px; line-height:1.85; }
.composer-node .params { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr) minmax(0,1fr); gap:17px 23px; margin-top:18px; }
.param-label { display:flex; align-items:center; min-height:20px; gap:8px; font-size:10px; color:var(--ink-2); }
.param-aside { font-size:9px; color:var(--ink-3); margin-left:auto; font-weight:400; }
.param-label .val { font-size:10px; margin-left:auto; }
.param-input,.param-select { min-height:37px; border:1px solid var(--line); border-radius:7px; background-color:var(--card); box-shadow:none; font-size:11px; }
.param-select { width:100%; }
.slider-row { min-height:37px; }
.param-group.is-disabled { opacity:.72; }
.param-group.is-disabled .val { font-size:9px; letter-spacing:0; color:var(--ink-3); }
.seg { min-height:37px; border:1px solid var(--line); border-radius:7px; background:var(--card-2); }
.seg::before { border-radius:4px; background:var(--card); box-shadow:0 1px 2px #253f330a; }
.seg button { font-size:10px; padding:6px; border-radius:4px; color:var(--ink-3); }
.seg button.on { color:var(--ink); }
.composer-node .advanced { padding:0; margin:0; border-top:1px solid var(--line); }
.advanced summary { min-height:43px; display:flex; width:100%; font-size:11px; color:var(--ink-2); }
.advanced-summary-note { font-size:10px; color:var(--ink-3); margin-left:auto; }
.advanced-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px; padding:3px 0 15px; }
.param-section-heading { grid-column:1/-1; display:flex; flex-wrap:wrap; align-items:baseline; gap:10px; font-size:11px; color:var(--ink-2); }
.param-section-heading:not(:first-child) { padding-top:13px; border-top:1px solid var(--line); margin-top:3px; }
.param-section-heading > span { color:var(--ink-3); font-size:10px; }
.param-switch { grid-column:1/-1; padding:8px 0; border:0; border-radius:0; background:none; gap:20px; }
.param-switch:hover { background:none; border:0; }
.param-switch strong { font-size:11px; font-weight:500; }
.param-switch em { font-size:10px; line-height:1.85; margin-top:4px; }
.param-switch input:focus-visible + i { outline:2px solid var(--clay); outline-offset:4px; }
.request-preview { border-top:1px solid var(--line); margin-top:0; }
.request-preview > summary { min-height:45px; }
.request-title { font-size:10px; }
.request-summary { font-size:9px; }
.request-code { font-size:11px; line-height:1.7; background:var(--card-2); }
.account-modal-panel { border-radius:14px; background:var(--card); }
.toast { border-radius:9px; }
[data-theme="dark"] .param-input,[data-theme="dark"] .param-select,[data-theme="dark"] .param-textarea { background-color:var(--card); }
[data-theme="dark"] .composer-node .composer-box { background:var(--card); border-color:var(--line-2); }
[data-theme="dark"] .composer-node .composer-box:focus-within { border-color:var(--clay); }
[data-theme="dark"] .system-prompt-shell,[data-theme="dark"] .reasoning-composer { background:transparent; }
@keyframes console-arrive { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@media (min-width:1400px) { .empty-state { padding-top:45px; padding-bottom:38px; }.empty-intro { gap:80px; }.empty-hints .hint { padding:18px 19px; } }
@media (max-width:1000px) {
  .sidebar-head { padding:18px 25px; gap:14px; }
  .account-quota { display:none; }
  .chat-inner { padding-inline:28px; }
  .status-line { padding-inline:28px; }
  .empty-intro { grid-template-columns:minmax(0,1fr) 230px; gap:22px; }
  .manuscript-art { transform:scale(.9); transform-origin:right center; }
  .timeline-node,.composer-node { grid-template-columns:64px minmax(0,1fr); gap:17px; }
  .branch-meta { max-width:180px; }
}
@media (max-width:760px) {
  .sidebar-head { padding:16px 20px; }
  .brand { font-size:19px; }
  .brand-mark { width:32px; height:32px; }
  .top-actions { gap:7px; }
  .history-toggle,.new-chat-btn { padding:8px; min-height:36px; }
  .new-chat-btn { font-size:11px; }
  .account-name { max-width:60px; }
  .chat-inner { padding:0 23px 40px; }
  .status-line { padding-inline:23px; }
  .timeline-node,.composer-node { grid-template-columns:1fr; gap:12px; }
  .timeline-role { padding:0; font-size:9px; display:flex; align-items:center; gap:9px; }
  .timeline-role span { display:inline; margin:0; font-size:9px; }
  .timeline-role::before { content:''; width:5px; height:5px; border-radius:50%; background:var(--line-2); }
  .assistant .timeline-role::before { background:var(--clay); }
  .empty-state { padding-top:28px; padding-bottom:25px; }
  .empty-intro { grid-template-columns:1fr; }
  .manuscript-art { display:none; }
  .empty-state h1 { font-size:32px; }
  .empty-state p { font-size:12px; }
  .starter-heading { margin-top:25px; }
  .empty-hints { gap:9px; }
  .empty-hints .hint { padding:12px; }
  .hint strong { font-size:11px; align-items:flex-start; }
  .hint small { display:none; }
  .starter-number { font-size:8px; }
  .composer-node .params { gap:16px; }
  .editable-text { font-size:15px; }
}
@media (max-width:560px) {
  .sidebar-head { display:grid; grid-template-columns:1fr auto; min-height:74px; padding:16px 18px 12px; gap:13px 10px; }
  .brand { width:auto; font-size:20px; }
  .brand-sub { font-size:8px; letter-spacing:.06em; }
  .top-actions { display:contents; }
  .theme-switch { grid-column:2; grid-row:1; justify-self:end; }
  .history-toggle { grid-row:2; grid-column:1; justify-self:start; min-height:34px; padding-left:0; gap:7px; }
  .history-toggle-icon { width:15px; }
  .new-chat-btn { grid-row:2; grid-column:1; justify-self:start; margin-left:68px; order:initial; min-height:34px; padding:6px 10px; }
  .account-pill { grid-column:2; grid-row:2; max-width:128px; min-height:34px; padding:3px 8px 3px 4px; }
  .account-avatar-sm { width:24px; height:24px; }
  .account-name { font-size:10px; max-width:66px; }
  .account-quota { display:none; }
  .session-list { padding:0 18px 12px; }
  .session-item { flex-basis:220px; max-width:270px; }
  .status-line { min-height:45px; padding:10px 18px; gap:12px; }
  .current-session-title { font-size:11px; max-width:55%; }
  .session-tags { max-width:50%; }
  .session-tags .tag:not(:first-child) { display:none; }
  .session-tags .tag:first-child { overflow:hidden; text-overflow:ellipsis; display:block; }
  .session-tags .pill { display:none; }
  .chat-inner { padding:0 18px calc(35px + env(safe-area-inset-bottom,0px)); }
  .system-prompt-shell { padding-top:4px; }
  .system-prompt-name { font-size:10px; }
  .system-prompt-note { font-size:9px; }
  .system-prompt-main { gap:8px; }
  .system-textarea { font-size:16px; }
  .empty-state { padding:25px 0 22px; }
  .workspace-eyebrow { font-size:8px; margin-bottom:12px; }
  .empty-state h1 { font-size:30px; line-height:1.45; margin-bottom:13px; }
  .empty-state p { font-size:11px; line-height:1.95; }
  .desktop-break { display:none; }
  .starter-heading { margin-top:23px; font-size:10px; }
  .starter-heading > span:last-child { font-size:9px; max-width:115px; text-align:right; }
  .empty-hints { grid-template-columns:1fr; gap:0; margin-top:9px; border:1px solid var(--line); border-radius:9px; background:var(--card); overflow:hidden; }
  .empty-hints .hint { display:flex; align-items:center; gap:13px; min-height:46px; padding:11px 13px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:none; }
  .empty-hints .hint:last-child { border-bottom:0; }
  .empty-hints .hint:hover { transform:none; background:var(--card-2); }
  .starter-number { flex:0 0 49px; margin:0; font-size:8px; }
  .hint strong { flex:1; font-size:11px; align-items:center; }
  .hint strong i { font-size:16px; }
  .timeline-node { padding:22px 0; }
  .composer-node { padding-top:22px; }
  .composer-node .next-headline { display:block; margin-bottom:13px; }
  .next-kicker { font-size:15px; }
  .next-note { font-size:10px; margin-top:3px; }
  .composer-hint { font-size:9px; margin-top:8px; }
  .composer-node .composer-box { min-height:145px; padding:13px; gap:10px; }
  .composer-node #msgInput { font-size:16px; min-height:55px; }
  .search-btn { width:36px; height:36px; }
  .send-btn { width:auto; min-width:94px; height:36px; flex-basis:auto; }
  .reasoning-composer summary { min-height:45px; font-size:11px; gap:7px; }
  .reasoning-composer-note { font-size:8px; }
  .prefix-composer-grid { grid-template-columns:1fr; }
  .reasoning-composer textarea { font-size:16px; }
  .composer-node .params { grid-template-columns:1fr 1fr; gap:16px 15px; }
  .params > .param-group:first-child { grid-column:1/-1; }
  .params > .param-group:nth-child(3) { grid-column:1; grid-row:2; }
  .params > .param-group:nth-child(2) { grid-column:2; grid-row:2; }
  .param-label { font-size:10px; }
  .param-input,.param-select { font-size:16px; min-height:40px; }
  .seg { min-height:40px; }
  .seg button { font-size:10px; }
  .advanced-summary-note { font-size:9px; }
  .advanced-grid { grid-template-columns:1fr 1fr; gap:15px; }
  .advanced-grid > .param-group:nth-child(4) { grid-column:1/-1; }
  .param-section-heading { gap:5px; }
  .param-section-heading > span { font-size:9px; }
  .param-switch { gap:14px; }
  .param-switch em { font-size:10px; }
  .request-preview > summary { align-items:flex-start; gap:8px; padding-block:13px; }
  .request-summary { max-width:54%; font-size:8px; line-height:1.8; }
  .branch-meta { max-width:155px; font-size:8px; }
  .edit-hint { display:none; }
  .is-editing .edit-hint { display:inline; max-width:140px; }
  .is-editing .edit-hint::after { font-size:8px; }
  .node-tools { gap:8px; }
  .branch-chip { min-height:36px; }
  .edit-message-btn { min-height:36px; }
  .editable-text { line-height:1.85; }
  .toast-wrap { bottom:calc(18px + env(safe-area-inset-bottom,0px)); }
}
@media (hover:none) {
  .empty-hints .hint:hover { transform:none; }
  .empty-hints .hint:active { background:var(--card-2); }
  .session-item .del { opacity:.85; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:.001ms !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}

/* Shared suite controls */
/* Same control geometry across the suite; keyboard focus stays visible. */
html { -webkit-tap-highlight-color: transparent; }
:where(a,button,input,textarea,select,summary,label,[role="button"],[tabindex]) { -webkit-tap-highlight-color: transparent; }
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible,[role="button"]:focus-visible,[tabindex]:focus-visible { outline:2px solid var(--clay,#ac492e); outline-offset:4px; }
:where(button,summary,[role="button"]):active { filter:brightness(.96); }
.theme-switch { position:relative; width:46px; min-width:46px; height:30px; min-height:30px; padding:0; display:inline-grid; place-items:center; border:1px solid var(--line,#dddfd4); border-radius:999px; background:var(--card,var(--panel,#fffdf8)); color:var(--ink); cursor:pointer; flex-shrink:0; transform:none; box-shadow:none; }
.theme-switch::after { content:""; position:absolute; inset:-7px 0; }
.theme-switch-track { position:relative; display:block; width:40px; height:22px; }
.theme-switch-thumb { position:absolute; left:0; top:0; width:22px; height:22px; border-radius:50%; display:grid; place-items:center; background:var(--paper,var(--bg,#f4f2ec)); color:var(--clay,#ac492e); box-shadow:0 2px 6px #1d302016; transition:transform .35s cubic-bezier(.32,.72,0,1),background .25s; }
.theme-switch svg { grid-area:1/1; width:13px; height:13px; transition:opacity .2s,transform .3s; }
.theme-switch .moon { opacity:0; transform:rotate(-25deg) scale(.78); }
.theme-switch[data-theme="dark"] .theme-switch-thumb { transform:translateX(18px); }
.theme-switch[data-theme="dark"] .sun { opacity:0; transform:rotate(35deg) scale(.78); }
.theme-switch[data-theme="dark"] .moon { opacity:1; transform:none; }
.theme-switch:hover { border-color:var(--clay,#ac492e); }
@media(max-width:540px) { .theme-switch { width:40px; min-width:40px; height:28px; min-height:28px; }.theme-switch-track { width:34px; height:20px; }.theme-switch-thumb { width:20px; height:20px; }.theme-switch[data-theme="dark"] .theme-switch-thumb { transform:translateX(14px); } }
