[hidden] { display: none !important; }
:root {
  --bg: #fafbff;
  --bg-soft: #f0eff8;
  --card: #fff;
  --border: #d3d8e5;
  --border-light: #a2abc2;
  --text: #191b22;
  --text-2: #636d85;
  --text-3: #636d85;
  --primary-deep: #625c9b;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --font-serif: var(--font-sans);
  --user-bubble: #eeecfa;
  --assistant-bubble: #ffffff;
  --compose-border: #b3b4d0;
  --send-bg: #625c9b;
  --send-ink: #fff;
  --failure: #a45b11;
  --nav-height: 58px;
  color-scheme: light;
}
html[data-theme="dark"] {
  color-scheme: dark; --bg: #191923; --bg-soft: #252434; --card: #20202c; --card-2: #252434;
  --border: #3b3d52; --border-light: #777e9d; --text: #f3f2fa; --text-2: #b0b4ce; --text-3: #b0b4ce;
  --primary-deep: #c7c0ff; --user-bubble: #37304f; --assistant-bubble: #252434;
  --compose-border: #777e9d; --send-bg: #c7c0ff; --send-ink: #201c32; --failure: #f2b86b;
}
body { font-size: 14px; line-height: 1.6; }
h1, h2, h3, .page-title, .brand-name { font-weight: 600; letter-spacing: 0; }
h2 { font-size: 15px; } h3 { font-size: 14px; }
button, a, input, select, textarea { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--primary-deep); outline-offset: 3px; }
#layout { height: var(--app-height,100dvh); }
#sidebar { width: 168px; padding: 22px 12px; background: var(--bg); }
.brand { padding: 0 4px 20px; gap: 8px; }
.brand-logo { width: 28px; height: 28px; border-radius: 2px; background: var(--text); }
.brand-name { font-size: 19px; }
.brand-sub { letter-spacing: 0; font-size: 10px; color: var(--text-2); }
#nav { gap: 6px; }
.nav-item { padding: 10px 12px; font-size: 14px; border-radius: 0; color: var(--text-2); background: transparent !important; }
.nav-item:hover { color: var(--text-2); background: transparent; }
.nav-item::before, .nav-item.active::before { background: transparent; }
.nav-item[aria-current="page"] { color: var(--text); font-weight: 650; }
.nav-item[aria-current="page"]::before { background: var(--primary-deep); left: 0; top: 25%; bottom: 25%; }
.sidebar-foot { display: flex; align-items: center; gap: 6px; margin-top: auto; font-size: 11px; line-height: 1.6; }
.sidebar-foot .btn { min-height: 32px; padding: 4px 7px; font-size: 11px; }
#app { padding: 24px 32px 48px; }
.page-head { align-items: center; gap: 12px; margin-bottom: 18px; }
.page-title { font-size: 22px; line-height: 1.4; }
.page-title small { color: var(--text-2); font-size: 12px; margin-top: 4px; }
.btn { border-radius: 4px; min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btn.primary { background: var(--text); border-color: var(--text); color: white; }
.btn.primary:hover { background: var(--primary-deep); border-color: var(--primary-deep); }
.btn.ghost { color: var(--text-2); }
.btn:disabled { opacity: .55; }
.panel { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 16px 0; margin-bottom: 8px; box-shadow: none; }
.panel h2, .panel h3 { margin-bottom: 10px; }
.panel p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; }
.form-row { margin-bottom: 12px; }
.form-row label { font-size: 13px; color: var(--text-2); }
input, select, textarea { max-width: 100%; min-height: 36px; }
textarea, input[type="text"], select { border-radius: 4px; }
.form-error { color: #963f35; white-space: pre-wrap; }
.muted { color: var(--text-2); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.section-head h2 { margin: 0; }
.section-head .muted { font-size: 12px; }
.today-page { max-width: 1000px; width: 100%; }
.today-main { padding-top: 0; }
.quick-task { display: flex; gap: 6px; margin: 10px 0 6px; }
.quick-task input { width: 0; flex: 1; background: white; padding: 8px 10px; border: 1px solid var(--border-light); border-radius: 4px; }
.empty-note { color: var(--text-2); font-size: 13px; padding: 6px 0; }
.today-main > .btn { min-height: 30px; font-size: 12px; padding: 4px 0; }
.task-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; width: 100%; }
.task-row:last-child { border-bottom: 0; }
.task-row span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.task-row small { display: block; font-size: 12px; color: var(--text-2); margin-top: 3px; }
.task-row strong { font-weight: 500; }
.today-task { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; padding: 12px 0; gap: 10px; }
.task-complete { border: 1px solid var(--border-light); border-radius: 3px; min-height: 36px; padding: 4px; background: transparent; color: var(--text-2); cursor: pointer; font-size: 12px; }
.task-actions { display: flex; gap: 0; margin: 0; }
.task-content { flex:1; min-width:0; text-align:left; color:var(--text); background:none; border:0; padding:8px 0; font:inherit; cursor:pointer; }
.task-content strong,.task-content small { display:block; }
.task-content small { color:var(--text-2); font-size:12px; margin-top:5px; }
.task-actions .btn { font-size: 12px; padding: 4px 7px; }
.today-task.is-focused { border-left: 2px solid var(--primary-deep); padding-left: 10px; background: var(--bg-soft); }
.daily-panel summary, .completed-list summary { cursor: pointer; font-weight: 500; font-size: 14px; }
.daily-panel summary small, .completed-list summary small { display: inline; font-size: 12px; color: var(--text-2); margin-left: 8px; font-weight: 400; }
.daily-panel form { margin-top: 14px; }
.completed-list .task-row { padding: 9px 0; }
.completed-list .task-row span { color: var(--text-2); }
.completed-list .btn { min-height: 32px; font-size: 12px; border: 0; background: transparent; }
.project-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: -4px 0 8px; }
.project-tools select { padding: 5px 28px 5px 0; border: 0; background-color: transparent; font-size: 12px; min-height: 32px; }
.archive-toggle { display: flex; gap: 5px; align-items: center; font-size: 12px; color: var(--text-2); }
.archive-toggle input { min-height: 0; }
#cat-chips { display: flex; gap: 18px; overflow-x: auto; white-space: nowrap; border-bottom: 1px solid var(--border); margin-bottom: 14px; scrollbar-width: none; }
#cat-chips::-webkit-scrollbar { display: none; }
.category-tab { flex-shrink: 0; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 8px 0; color: var(--text-2); font-size: 13px; min-height: 38px; cursor: pointer; }
.category-tab.on { border-bottom-color: var(--primary-deep); color: var(--text); font-weight: 600; }
.cat-group { margin-bottom: 18px; }
.cat-head { gap: 8px; margin-bottom: 0; }
.cat-name { font-size: 12px; color: var(--text-2); letter-spacing: 0; font-family: var(--font-sans); }
.cat-count { font-size: 11px; }
.project-grid { display: block; }
.projects-page .page-title { display: flex; align-items: baseline; gap: 10px; }
.projects-page .page-title small { display: inline; margin: 0; }
.project-card { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; box-shadow: none; padding: 14px 0 10px; gap: 8px; cursor: pointer; }
.project-card:hover { background: transparent; border-color: var(--border); }
.pc-head { align-items: center; justify-content: space-between; gap: 12px; }
.pc-name { border: 0; background: transparent; text-align: left; min-height: 32px; font-family: var(--font-sans); font-size: 16px; font-weight: 600; letter-spacing: 0; cursor: pointer; }
.pc-status { font-size: 12px; color: var(--text-2); flex-shrink: 0; }
.pc-desc { min-height: 0; font-size: 13px; color: var(--text-2); line-height: 1.6; margin: 0; }
.pc-meta { font-size: 11px; gap: 12px; color: var(--text-2); }
.pc-blocked { color: #963f35; }
.pc-progress { margin-left: auto; }
.pc-foot { align-items: center; margin-top: 2px; gap: 8px; }
.pc-foot small { font-size: 11px; color: var(--text-2); }
.pc-actions { opacity: 1; display: flex; gap: 2px; }
.pc-quick { min-height: 32px; padding: 4px 8px; border: 0; border-radius: 0; font-size: 12px; background: transparent; color: var(--text-2); }
.pc-quick:hover { color: var(--text); background: var(--bg-soft); }
.empty { padding: 24px 0; text-align: left; color: var(--text-2); }
.chat-page { display:flex; flex-direction:column; height:100%; min-width:0; min-height:0; overflow:hidden !important; padding:0 !important; background:var(--bg-soft); }
.chat-header { position:relative; display:flex; align-items:center; justify-content:center; min-height:58px; flex:none; border-bottom:1px solid var(--border); padding:7px 16px; background:var(--bg); }
.chat-identity { display:flex; align-items:center; gap:9px; }.chat-identity img { width:30px; height:30px; border-radius:50%; }
.chat-header h1 { font-size:21px; font-weight:650; font-family:var(--font-sans); line-height:1.2; }
.chat-identity { max-width:calc(100% - 50px); }
.chat-identity > div { min-width:0; }
.chat-connection { margin:3px 0 0; font-size:12px; line-height:1.4; color:var(--text-2); }
.chat-connection:empty { display:none; }
.icon-button { display:flex; align-items:center; justify-content:center; width:44px; height:44px; padding:9px; border:0; background:transparent; color:var(--text-2); cursor:pointer; }
.chat-header .icon-button { position:absolute; right:10px; }
.icon-button svg { width:25px; height:25px; }
.chat-shell { min-height:0; flex:1; display:flex; flex-direction:column; width:100%; margin:0 auto; }
.chat-fold-list { margin:0 max(12px,calc((100% - 780px)/2)); padding:8px 4px; border-bottom:1px solid var(--border,#dedce8); font-size:.85rem; max-height:24dvh; overflow:auto; }
.chat-fold-list summary { cursor:pointer; padding:4px 0; }
.chat-fold-row { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; margin:5px 0; text-align:left; }
.chat-fold-row small { white-space:nowrap; font-weight:normal; }
.fold-originals { max-height:45dvh; overflow:auto; padding:8px; overscroll-behavior:contain; }
.fold-originals .chat-message { max-width:100%; }
#chat-transcript { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:12px max(20px,calc((100% - 820px)/2)) 20px; scrollbar-width:thin; }
.chat-date { text-align:center; font-size:12px; color:var(--text-2); margin:16px 0 18px; }
.chat-message { display:flex; align-items:flex-start; gap:9px; border:0; background:none; margin:12px 0; padding:0; font-size:16px; line-height:1.55; overflow-wrap:anywhere; }
.chat-message.user { justify-content:flex-end; }
.message-content { max-width:78%; min-width:0; }
.chat-message.user .message-content { display:flex; flex-direction:column; align-items:flex-end; }
.chat-message.assistant .message-content { max-width:calc(100% - 98px); }
.message-bubble { padding:10px 13px; border-radius:4px 15px 15px 15px; white-space:pre-wrap; background:var(--card); color:var(--text); }
.user .message-bubble { background:var(--user-bubble); border-radius:15px 4px 15px 15px; }
.message-content { position:relative; }
.message-bubble[data-bubble-message] { -webkit-touch-callout:none; user-select:none; -webkit-user-select:none; touch-action:pan-y pinch-zoom; }
.message-bubble:focus-visible { outline:2px solid var(--primary-deep); outline-offset:3px; }
.bubble-selected { box-shadow:0 0 0 2px var(--primary-deep); }
.bubble-menu { position:fixed; z-index:1100; width:min(240px,calc(100vw - 24px)); border:1px solid var(--border); border-radius:16px; background:var(--card); box-shadow:0 12px 40px #0004; overflow:hidden; }
.bubble-menu-actions { display:grid; }
.bubble-menu button { border:0; border-bottom:1px solid var(--border); border-radius:0; background:transparent; color:var(--text); font:inherit; text-align:left; min-height:46px; padding:10px 18px; cursor:pointer; }
.bubble-menu button:hover,.bubble-menu button:focus-visible { background:var(--bg); }
.bubble-menu button.danger { color:var(--danger,#e05b5b); }
.bubble-menu time { display:block; padding:12px 16px; font-size:11px; line-height:1.5; color:var(--text-2); }
.message-selection { user-select:text; -webkit-user-select:text; width:100%; resize:vertical; }
.vera-avatar { flex:none; width:30px; height:30px; border-radius:50%; object-fit:cover; }
.message-state { display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:5px; font-size:12px; line-height:1.5; margin-top:6px; color:var(--text-2); }
.message-state svg { width:16px; height:16px; flex:none; }
.message-state.failure { color:var(--failure); }
.message-state button { display:inline-flex; gap:4px; align-items:center; background:transparent; color:var(--text-2); border:0; padding:5px 6px; min-height:32px; font-size:12px; cursor:pointer; }
.message-state button:disabled { opacity:.5; }
.message-detail summary { cursor:pointer; color:var(--text-2); padding:5px 2px; }
.message-detail[open] { flex-basis:100%; }
.message-detail p { color:var(--text-2); padding:8px 0; text-align:left; }
.test-source { display:block; font-size:11px; color:var(--text-2); margin-top:4px; }
.chat-notice { color:var(--text-2); font-size:12px; margin:12px 0; }
.chat-notice summary { cursor:pointer; text-align:center; }.chat-notice p { padding:8px 12px; white-space:pre-wrap; }
.proposal { border:1px solid var(--border); background:var(--bg-soft); border-radius:14px; padding:14px; margin:16px 0; }
.proposal h3 { margin-bottom:8px; }.proposal pre { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; font-size:13px; }.proposal p { margin:8px 0; }.proposal small { color:var(--text-2); font-size:12px; }
.proposal-history { margin:8px 0; color:var(--text-2); font-size:12px; }.proposal-history summary,.proposal-reason summary { cursor:pointer; }.proposal-history pre { white-space:pre-wrap; font:inherit; padding:10px; }.proposal-reason { font-size:12px; color:var(--text-2); margin-top:8px; }
.chat-compose { flex:none; padding:10px max(20px,calc((100% - 820px)/2)) 12px; background:var(--bg); border-top:1px solid var(--border); }
#chat-send { display:flex; align-items:flex-end; gap:8px; padding:4px 5px 4px 14px; min-height:50px; border:1px solid var(--border); border-radius:24px; background:var(--bg-soft); }
#chat-send:focus-within { border-color:var(--primary-deep); }
#chat-send textarea { flex:1; min-width:0; height:40px; min-height:40px; max-height:140px; padding:8px 0; line-height:24px; resize:none; border:0; border-radius:0; background:transparent; color:var(--text); font-size:16px; outline:none; box-shadow:none; }
#chat-send textarea:focus-visible { outline:none; }
#chat-send textarea::placeholder { color:var(--text-2); }
.send-button { flex:none; display:flex; align-items:center; justify-content:center; width:40px; height:40px; border:0; border-radius:50%; color:var(--send-ink); background:var(--send-bg); cursor:pointer; }
.send-button svg { width:23px; height:23px; }
.send-button:disabled { cursor:default; background:var(--border-light); opacity:.65; }
.chat-welcome { height:100%; min-height:240px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:24px; text-align:center; color:var(--text-2); }
.chat-welcome img { width:48px; height:48px; border-radius:50%; margin-bottom:16px; }.chat-welcome h2 { color:var(--text); font-size:18px; margin-bottom:8px; }
.nav-item svg { width:23px; height:23px; flex:none; }
.nav-item span:last-child { display:block; }
.nav-item .nav-filled { display:none; }
.nav-item[aria-current="page"] .nav-outline { display:none; }
.nav-item[aria-current="page"] .nav-filled { display:block; }
.theme-picker { display:flex; gap:4px; background:var(--bg-soft); padding:4px; border-radius:12px; }
.theme-picker button { flex:1; padding:9px 6px; min-height:40px; border:0; border-radius:9px; background:transparent; color:var(--text-2); font-size:13px; cursor:pointer; }
.theme-picker [aria-pressed="true"] { background:var(--card); color:var(--text); font-weight:600; box-shadow:0 1px 3px #0000000d; }
.settings-page .panel { padding:20px 0; }.settings-page h2 { margin-bottom:12px; }
.settings-page { max-width:660px; width:100%; margin:0 auto; }
.settings-page .page-head { align-items:center; margin-bottom:20px; }
.settings-index { display:block; }
.settings-category { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:84px; padding:18px 0; border-bottom:1px solid var(--border); color:var(--text); text-decoration:none; }
.settings-category strong { display:block; font-size:16px; font-weight:500; }
.settings-category small { display:block; margin-top:7px; color:var(--text-2); font-size:13px; line-height:1.5; }
.settings-category > span:last-child { font-size:24px; color:var(--text-2); }
.settings-category:hover { background:var(--bg-soft); }
.settings-back { margin-bottom:18px; }
.settings-back a { display:inline-flex; align-items:center; gap:8px; min-height:44px; color:var(--text-2); text-decoration:none; font-size:14px; }
.settings-back svg { width:20px; height:20px; }
.usage-panel { padding:0 0 22px; border-bottom:1px solid var(--border); }
.usage-panel h2 { color:var(--text-2); font-size:13px; font-weight:500; }
.usage-primary { display:grid; gap:3px; }.usage-primary > span { font-size:14px; }
.usage-primary > strong { font-size:36px; letter-spacing:-1px; font-weight:650; line-height:1.4; }
.usage-primary > small { color:var(--text-2); font-size:12px; }
.usage-line { display:flex; justify-content:space-between; gap:16px; margin-top:20px; font-size:14px; }
.usage-panel meter { display:block; width:100%; height:10px; margin:8px 0; accent-color:var(--primary-deep); }
.usage-caption { display:block; color:var(--text-2); font-size:11px; margin-top:8px; }
.settings-group { border-bottom:1px solid var(--border); }.settings-group > summary { display:flex; justify-content:space-between; align-items:center; min-height:58px; padding:12px 0; cursor:pointer; font-size:15px; list-style:none; gap:12px; }
.settings-group > summary::-webkit-details-marker { display:none; }.settings-group > summary::after { content:'›'; font-size:22px; color:var(--text-2); }.settings-group[open] > summary::after { transform:rotate(90deg); }
.settings-group summary small { margin-left:auto; color:var(--text-2); font-size:12px; }.settings-content { padding:0 0 20px; }
.settings-content .task-row { gap:6px; }.settings-subgroup { margin-top:16px; font-size:13px; }.settings-subgroup > summary { cursor:pointer; }
.memory-search { display:flex; gap:8px; margin-bottom:12px; }.memory-search input { flex:1; min-width:0; }.memory-actions { display:flex; flex-wrap:wrap; gap:8px; }.memory-panel [data-memory-status] { font-size:12px; color:var(--text-2); margin:12px 0; }.memory-panel .task-row > span { flex-basis:100%; }.memory-panel [data-memory-more] { margin-top:12px; }
.settings-diagnostics { color:var(--text-2); }.settings-diagnostics .settings-content { font-size:12px; }.account-actions { display:flex; flex-wrap:wrap; gap:8px; }
.persona-panel .section-head h2 { margin:0; }.persona-panel .section-head span { color:var(--text-2); font-size:11px; }
.persona-panel p { color:var(--text-2); font-size:13px; margin:8px 0 14px; }
.preference-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:10px 0; border-bottom:1px solid var(--border); }
.preference-row label { flex:none; font-size:14px; }.preference-row select { max-width:62%; min-height:40px; background-color:var(--bg-soft); border:0; }
.persona-notes { margin:12px 0; }.persona-notes summary { color:var(--text-2); font-size:13px; cursor:pointer; }.persona-notes textarea { width:100%; margin-top:10px; }
.persona-save { display:flex; gap:10px; align-items:center; justify-content:space-between; margin-top:16px; }.persona-save small { color:var(--text-2); font-size:11px; }.persona-save .btn { flex:none; }
.persona-panel .preference-feedback { margin:8px 0 0; min-height:0; }.preference-feedback:empty { display:none; }
html[data-theme="dark"] .btn.primary { background:var(--send-bg); color:var(--send-ink); border-color:var(--send-bg); }
html[data-theme="dark"] .quick-task input,html[data-theme="dark"] .login-card { background:var(--card); }
html[data-theme="dark"] .btn.primary:hover { background:var(--send-bg); }
html[data-theme="dark"] .pc-blocked { color:#f6a69a; }
.login-card { max-width: 420px; margin: 15vh auto; padding: 26px; border: 1px solid var(--border); background: white; border-radius: 6px; }
.login-card h1 { font-size: 22px; margin-bottom: 10px; }.login-card p { margin: 10px 0; }
html[data-theme="dark"] .login-card { background:var(--card); }
.modal { border-radius: 6px; }.modal-head { font-family: var(--font-sans); font-weight: 600; }.modal-ops { border-top: 1px solid var(--border); padding-top: 12px; }
.drawer { overflow-y: auto; }.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px; }.drawer-body { padding: 18px; }.drawer h3 { margin: 18px 0 8px; }
.review-list { max-height: 400px; overflow: auto; }
.page-loading { font-size: 13px; color: var(--text-2); padding: 20px 0; text-align: left; }
#toast-root { bottom: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 900px) {
  body { overflow:hidden; }
  #layout { position:fixed; top:var(--app-top,0px); left:0; right:0; display:flex; flex-direction:column; height:var(--app-height,100dvh); min-height:0; padding-top:env(safe-area-inset-top); }
  #sidebar { position:static; order:2; flex:none; width:100%; height:auto; padding:0 12px env(safe-area-inset-bottom); z-index:8; border-right:0; border-bottom:0; border-top:1px solid var(--border); background:var(--bg); }
  #sidebar .brand, .sidebar-foot { display: none; }
  #nav { display: flex; flex-direction: row; justify-content: space-around; gap: 0; margin: 0; }
  .nav-item { flex:1; flex-direction:column; justify-content:center; gap:4px; padding:8px 0; min-height:58px; font-size:11px; border-top:0; line-height:1.2; }
  .nav-item::before { display: none; }
  .nav-item[aria-current="page"] { color:var(--primary-deep); }
  #app { order:1; flex:1; min-height:0; width:100%; margin:0 auto; padding:18px 20px 24px; max-width:760px; overflow-y:auto; }
  .page-head { gap: 8px; margin-bottom: 14px; }
  .page-title { font-size: 21px; }
  .btn { min-height: 38px; }
  input, select, textarea { font-size: 16px !important; }
  .quick-task input { min-height: 42px; }
  .quick-task .btn { min-height: 42px; }
  .today-task { grid-template-columns: 42px minmax(0,1fr) auto; gap: 8px; }
  .task-actions .btn { padding: 4px 6px; min-height: 36px; }
  .panel { padding: 12px 0; margin-bottom: 0; }
  .today-main { padding-top: 0; }
  .daily-panel summary small { display: inline; }
  .project-tools select { font-size: 13px !important; }
  #cat-chips { gap: 16px; margin-bottom: 12px; }
  .pc-quick { min-height: 36px; }
  .pc-foot { flex-wrap: nowrap; }
  .pc-meta { gap: 10px; }
  #app.chat-page { height:auto; padding:0 !important; max-width:none !important; }
  .chat-header { min-height:54px; }
  .chat-header h1 { font-size:18px; }
  #chat-transcript { padding:10px 12px 16px; }
  .message-content { max-width:84%; }
  .chat-message.assistant .message-content { max-width:calc(100% - 44px); }
  .chat-compose { padding:8px 12px; }
  #chat-send textarea { font-size: 16px; }
  #chat-feedback { font-size: 11px; }
  .drawer { width: 100%; max-width: 100vw; }.drawer-body { padding-bottom: 64px; }
  .modal { width: calc(100vw - 28px); max-height: calc(100dvh - 40px); overflow-y: auto; }
  .login-card { margin: 12vh 16px; padding: 22px; }
  #toast-root { bottom: calc(var(--nav-height) + 12px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
.action-menu { position:fixed; z-index:1100; width:220px; border:1px solid var(--border); border-radius:14px; background:var(--card); box-shadow:0 12px 40px #0004; overflow:hidden; }
.action-menu button { width:100%; display:block; min-height:48px; padding:12px 18px; text-align:left; border:0; border-bottom:1px solid var(--border); border-radius:0; background:transparent; font:inherit; color:var(--text); cursor:pointer; }
.action-menu button:last-child { border-bottom:0; }
.action-menu button:hover,.action-menu button:focus-visible { background:var(--bg-soft); }
.action-menu .danger { color:var(--failure); }
.task-complete { width:44px; min-height:44px; padding:9px; border:0; background:transparent; color:var(--text-2); }
.task-complete svg { display:block; width:25px; height:25px; }
.quick-task { border:1px solid var(--border); background:var(--bg-soft); border-radius:14px; padding:3px 4px 3px 12px; gap:4px; }
.quick-task input { border:0; background:transparent!important; padding:8px 0; outline:none; box-shadow:none; }
.quick-task:focus-within { border-color:var(--primary-deep); }
.quick-task .icon-button { flex:none; }
.quick-task .btn { border-radius:10px; }
.form-details { margin-top:12px; border-top:1px solid var(--border); padding-top:12px; }
.form-details summary { cursor:pointer; min-height:40px; line-height:40px; color:var(--text-2); }
.form-details[open] summary { margin-bottom:12px; }
.form-row label { display:block; margin-bottom:7px; }
.form-row input:not([type="checkbox"]):not([type="radio"]),.form-row select,.form-row textarea,.memory-search input,#modal-root .modal-body > textarea { width:100%; min-width:0; min-height:44px; border:1px solid var(--border); border-radius:10px; padding:10px 12px; background:var(--bg-soft); color:var(--text); font:inherit; }
.form-row textarea,#modal-root .modal-body > textarea { resize:vertical; line-height:1.6; }
.btn { border-radius:10px; min-height:44px; }
.quick-task .btn { min-height:44px; }
.task-summary { color:var(--text-2); font-size:12px; margin:8px 0; }
.project-description { white-space:pre-wrap; }
.project-section { margin:22px 0; }
.project-section .section-head { margin-bottom:8px; }
.project-section h3 { margin:0; font-size:15px; }
.drawer .project-task { width:100%; min-height:48px; background:transparent; border:0; border-bottom:1px solid var(--border); color:var(--text); text-align:left; padding:14px 0; border-radius:0; display:flex; gap:12px; font:inherit; cursor:pointer; }
.project-task svg { width:22px; height:22px; flex:none; color:var(--text-2); }
.project-task span { flex:1; }
.project-task.is-done { color:var(--text-2); }
.drawer .project-task { padding:4px 0; cursor:default; align-items:center; gap:4px; }
.project-task .task-complete { flex:none; width:44px; min-height:44px; display:flex; align-items:center; justify-content:center; border:0; background:transparent; color:inherit; cursor:pointer; }
.project-task .task-complete:disabled { cursor:default; }
.project-task .task-content { flex:1; min-width:0; padding:10px 4px; text-align:left; border:0; background:transparent; color:inherit; font:inherit; cursor:pointer; }
.project-task .task-content strong { display:block; font-weight:500; overflow-wrap:anywhere; }
.project-task .task-content small { display:block; margin-top:4px; color:var(--text-2); }
.project-task.is-done .task-content strong { text-decoration:line-through; }
.persona-dossier { font-size:14px; line-height:1.75; }
.persona-dossier h2 { font-size:18px; }
.persona-dossier h3 { margin:18px 0 5px; font-size:14px; }
.persona-dossier p { margin:8px 0; }
.persona-purpose { font-weight:600; }
.persona-source { color:var(--text-2); font-size:12px; }
.project-record { padding:12px 0; border-bottom:1px solid var(--border); white-space:pre-wrap; }
.project-record small { display:block; font-size:11px; color:var(--text-2); margin-top:6px; }
.project-secondary summary { cursor:pointer; min-height:44px; padding:12px 0; font-weight:500; }
.drawer .drawer-head { flex:none; gap:8px; background:var(--bg); padding:8px 12px; min-height:60px; }
.drawer-head h2 { flex:1; min-width:0; font-size:18px; font-weight:600; }
.drawer-head .icon-button { flex:none; }
#modal-root .mask { z-index:100; }
#modal-root .modal { z-index:101; max-height:calc(var(--app-height,100dvh) - 40px); display:flex; flex-direction:column; overflow:hidden; }
.modal-body { overflow-y:auto; min-height:0; }
.modal-head,.modal-ops { flex:none; }
body.overlay-open #layout { pointer-events:none; }
@media (max-width:900px) {
 html,body { overscroll-behavior:none; }
 body.input-active { --nav-height:0px; }
 body.input-active #sidebar { display:none; }
 body.keyboard-visible .chat-compose { padding-bottom:8px; }
 #modal-root .modal { top:calc(var(--app-top,0px) + var(--app-height,100dvh)); left:0; transform:translateY(-100%); width:100%!important; max-height:calc(var(--app-height,100dvh) - 16px); display:flex; flex-direction:column; overflow:hidden; border-radius:20px 20px 0 0; border-bottom:0; }
 #modal-root .modal-head { flex:none; padding:20px 20px 8px; font-size:17px; }
 #modal-root .modal-body { min-height:0; overflow-y:auto; padding:12px 20px; overscroll-behavior:contain; }
 #modal-root .modal-ops { flex:none; padding:12px 20px max(16px,env(safe-area-inset-bottom)); }
 body.keyboard-visible #modal-root .modal-ops { padding-bottom:12px; }
 #drawer-root .drawer { top:var(--app-top,0px); bottom:auto; left:0; right:0; width:100%; max-width:none; height:var(--app-height,100dvh); border:0; }
 .drawer-head { padding-top:max(8px,env(safe-area-inset-top))!important; }
 .drawer-body { padding:16px 20px max(20px,env(safe-area-inset-bottom)); }
 .drawer-body .section-head .icon-button { min-height:44px; }
 .task-actions:empty { display:none; }
 .today-task { grid-template-columns:36px minmax(0,1fr) auto; }
 .settings-group > summary { min-height:56px; }
}

.runtime-controls form{display:grid;gap:14px;margin-block:16px}.runtime-controls label{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.runtime-controls input[type=number]{width:100px}.runtime-controls select{max-width:100%}.runtime-controls form .btn{justify-self:start}.runtime-controls p{overflow-wrap:anywhere}
