
:root { color-scheme:light dark; --bg:#F8F9FB; --card:#fff; --text:#20242C; --muted:#626B7A; --line:#DFE3E9; --blue:#1D4ED8; --soft:#DBEAFE; --amber:#B45309; --amber-bg:#FEF3C7; --violet:#6D28D9; --violet-bg:#EDE9FE; --slate:#475569; --slate-bg:#F1F5F9; --grey:#52525B; --grey-bg:#F4F4F5; --red:#B91C1C; --red-bg:#FEE2E2; --green:#15803D; --green-bg:#DCFCE7; }
* { box-sizing:border-box; }
[hidden] { display:none!important; }
body { margin:0; background:var(--bg); color:var(--text); font:17px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
button,input,select,textarea { font:inherit; color:inherit; }
button,summary,a { touch-action:manipulation; }
button,summary { cursor:pointer; }
button,input,select,textarea,summary { min-height:44px; border-radius:12px; }
button { border:1px solid var(--line); background:var(--card); padding:10px 16px; font-weight:600; }
button:hover { background:var(--soft); }
button:disabled { cursor:wait; opacity:.6; }
:focus-visible { outline:3px solid var(--blue); outline-offset:3px; }
input,select,textarea { width:100%; border:1px solid var(--line); background:var(--card); padding:12px; }
textarea { min-height:120px; resize:vertical; }
a { color:var(--blue); overflow-wrap:anywhere; }
h1,h2,h3,p { margin:0 0 12px; }
h1 { font-size:28px; line-height:1.2; letter-spacing:-.6px; margin-bottom:20px; }
h2 { font-size:20px; letter-spacing:-.3px; }
h3 { font-size:17px; margin-top:24px; }
.primary { background:var(--blue); border-color:var(--blue); color:#fff; }
.primary:hover { background:var(--blue); filter:brightness(1.1); }
.muted,.meta { color:var(--muted); font-size:14px; }
.sidebar { height:76px; padding:calc(14px + env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) 14px max(18px,env(safe-area-inset-left)); display:flex; align-items:center; gap:10px; }
.brand { display:flex; align-items:center; gap:10px; font-weight:700; font-size:22px; }
.sidebar-footer { margin-left:auto; display:flex; align-items:center; gap:8px; }
#updated { display:none; }
.refresh { border:0; background:none; font-size:24px; width:44px; padding:0; }
.account { position:relative; font-size:14px; }
.account summary { padding:12px 4px; list-style:none; cursor:pointer; }
.account summary::-webkit-details-marker { display:none; }
.account button { position:absolute; right:0; top:48px; width:120px; z-index:5; box-shadow:0 6px 24px #0002; }
#navigation { position:fixed; inset:auto 0 0; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); background:var(--card); border-top:1px solid var(--line); padding:6px max(4px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left)); z-index:5; }
.nav-item { position:relative; min-height:58px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; color:var(--muted); font-size:11px; font-weight:600; text-decoration:none; border-radius:12px; white-space:nowrap; }
.nav-item[aria-current="page"] { color:var(--blue); background:var(--soft); }
.nav-icon { font-size:23px; line-height:1; }
.count { background:var(--amber-bg); color:var(--amber); border-radius:20px; padding:1px 6px; font-size:11px; position:absolute; top:0; right:4px; }
.new-task { position:fixed; bottom:calc(86px + env(safe-area-inset-bottom)); right:max(20px,env(safe-area-inset-right)); border-radius:50%; width:56px; height:56px; padding:0; box-shadow:0 4px 18px #0002; z-index:4; }
.add-symbol { font-size:30px; font-weight:400; }
.add-label { display:none; }
main { max-width:808px; margin:auto; padding:24px max(20px,env(safe-area-inset-right)) calc(170px + env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left)); }
.summary-line { margin:-6px 0 28px; color:var(--muted); font-size:15px; }
.summary-line a { display:inline-flex; align-items:center; min-height:44px; text-decoration:none; color:inherit; }
.summary-line a:hover { text-decoration:underline; }
.section { margin:28px 0; }
.task-card { display:flex; gap:10px; padding:4px 16px 12px; margin:12px 0; background:var(--card); border:1px solid var(--line); border-left:4px solid var(--state); border-radius:16px; }
.task-content { flex:1; min-width:0; }
.row-open { display:block; width:100%; text-align:left; border:0; background:none; padding:12px 0 4px; font-weight:400; }
.row-open:hover { background:none; }
.row-title { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; font-size:17px; }
.row-meta { display:flex; gap:7px; align-items:center; flex-wrap:wrap; margin:12px 0 10px; color:var(--muted); font-size:13px; }
.time { margin-left:auto; white-space:nowrap; }
.avatar { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; width:25px; height:25px; border-radius:50%; color:#fff; font-size:12px; font-weight:700; }
.avatar-claude { background:#C2410C; }
.avatar-codex { background:#18181B; }
.avatar-kimi { background:#0F766E; }
.avatar-gpt { background:#15803D; }
.avatar-chrome { background:#9A3412; }
.avatar-color-0 { background:#1D4ED8; }.avatar-color-1 { background:#6D28D9; }.avatar-color-2 { background:#9D174D; }.avatar-color-3 { background:#0F766E; }.avatar-color-4 { background:#9A3412; }.avatar-color-5 { background:#475569; }
.state-needs-answer { --state:var(--amber); --state-bg:var(--amber-bg); }
.state-your-turn { --state:var(--blue); --state-bg:var(--soft); }
.state-fyi { --state:var(--slate); --state-bg:var(--slate-bg); }
.state-working { --state:var(--violet); --state-bg:var(--violet-bg); }
.state-waiting { --state:var(--grey); --state-bg:var(--grey-bg); }
.state-stuck { --state:var(--red); --state-bg:var(--red-bg); }
.state-done { --state:var(--green); --state-bg:var(--green-bg); }
.pill { display:inline-flex; gap:6px; align-items:center; border-radius:20px; font-size:12px; font-weight:600; padding:5px 9px; color:var(--state); background:var(--state-bg); max-width:100%; }
.state-icon { display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; flex-shrink:0; line-height:1; }
.state-needs-answer .state-icon,.state-fyi .state-icon,.state-stuck .state-icon { border:1px solid currentColor; border-radius:50%; }
.ask { margin:16px 0 8px; display:block; white-space:pre-wrap; }
.excerpt { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:16px; }
.quick,.actions,.chips { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.quick button { flex-grow:1; }
.quick button:first-child { border-color:var(--blue); color:var(--blue); background:var(--soft); }
.danger { color:var(--red); }
.check { border:0; background:transparent; flex-shrink:0; width:44px; height:44px; padding:0; margin-top:7px; font-size:30px; color:var(--blue); border-radius:50%; }
.text-button { background:none; border:0; padding:10px 4px; color:var(--blue); text-align:left; }
.empty { border:1px solid var(--line); border-radius:18px; background:var(--card); padding:28px 22px; margin:24px 0; color:var(--muted); }
.empty .primary { margin-top:8px; }
.done-summary { border-top:1px solid var(--line); padding-top:24px; }
.done-summary p { color:var(--muted); }
summary { padding:12px 0; color:var(--muted); font-weight:600; }
.older,.live-sessions,.task-details { border-top:1px solid var(--line); margin-top:28px; padding-top:8px; }
.segments { display:flex; background:var(--line); padding:4px; border-radius:14px; margin-bottom:24px; }
.segments button { flex:1; background:none; border:0; }
.segments button[aria-pressed="true"] { background:var(--card); color:var(--blue); box-shadow:0 1px 4px #0001; }
.session-card { display:flex; align-items:center; flex-wrap:wrap; gap:10px; width:100%; text-align:left; margin:10px 0; padding:16px; }
.session-card .muted { margin-left:auto; }
.assistant-card { display:flex; flex-direction:column; gap:12px; width:100%; text-align:left; padding:22px; margin:14px 0; border-radius:18px; font-weight:400; }
.assistant-heading { display:flex; align-items:center; gap:12px; }
.assistant-heading .avatar { width:40px; height:40px; font-size:18px; }
.assistant-status { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.connect-card { border:1px dashed var(--muted); padding:24px; border-radius:18px; margin:28px 0; }
.connect-card p { color:var(--muted); font-size:15px; margin:0; }
.error-banner { padding:12px 16px; border-radius:12px; background:var(--soft); margin-bottom:20px; font-size:14px; }
.signin { max-width:430px; margin:12vh auto; padding:24px; text-align:center; }
.signin img { margin-bottom:20px; }
.signin>p { color:var(--muted); margin-bottom:24px; }
#pairing { margin-top:28px; }
.pair-code { display:block; font-size:44px; font-weight:700; letter-spacing:7px; margin-bottom:16px; }
dialog { position:fixed; inset:auto 0 0; margin:0; width:100%; max-width:none; max-height:90dvh; border:1px solid var(--line); border-radius:24px 24px 0 0; background:var(--card); color:var(--text); padding:0 22px calc(24px + env(safe-area-inset-bottom)); overflow:auto; overscroll-behavior:contain; box-shadow:0 -10px 50px #0002; }
dialog::backdrop { background:#0005; }
.panel-header { display:flex; align-items:flex-start; gap:12px; padding:22px 0 12px; }
.panel-heading { flex:1; min-width:0; }
.panel-header h2 { margin:0; overflow-wrap:anywhere; font-size:20px; line-height:1.4; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.panel-state { margin-bottom:12px; }
#close-panel { border:0; padding:8px; min-width:44px; }
#panel-body { overflow-wrap:anywhere; }
.full-text,.timeline { white-space:pre-wrap; }
.timeline { padding-left:20px; font-size:14px; }
.timeline li { padding:10px 0; border-bottom:1px solid var(--line); }
.tail { font:13px/1.6 ui-monospace,monospace; background:var(--bg); padding:14px; border-radius:12px; white-space:pre-wrap; overflow:auto; max-height:350px; }
.field { display:block; margin:16px 0; font-weight:600; }
.field input,.field textarea,.field select { margin-top:7px; font-weight:400; }
.field input[type="checkbox"] { width:44px; height:44px; vertical-align:middle; margin:0 10px; }
.editor { margin:16px 0; }
.editor>.primary { width:100%; margin-top:14px; }
.editor>h3 { margin-top:28px; }
.chip { border-radius:24px; font-size:15px; padding:12px 18px; }
.chip[aria-pressed="true"] { color:var(--blue); background:var(--soft); border-color:var(--blue); }
.actions { border-top:1px solid var(--line); padding-top:16px; margin-top:28px; }
.actions button { background:none; border:0; color:var(--muted); font-size:14px; padding:10px 8px; font-weight:500; }
.toast { position:fixed; bottom:calc(154px + env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:16px; width:max-content; max-width:90vw; background:var(--text); color:var(--card); padding:12px 18px; border-radius:14px; box-shadow:0 4px 25px #0002; z-index:20; }
.toast button { background:transparent; color:inherit; border-color:currentColor; }
@media(min-width:900px) {
  body { font-size:16px; }
  .sidebar { position:fixed; inset:0 auto 0 0; width:240px; height:100dvh; flex-direction:column; align-items:stretch; padding:28px 20px; border-right:1px solid var(--line); background:var(--card); }
  .brand { margin-bottom:20px; }
  .new-task { position:static; width:100%; height:auto; min-height:48px; padding:8px 16px; border-radius:12px; box-shadow:none; }
  .add-symbol { font-size:22px; }.add-label { display:inline; }
  #navigation { position:static; display:flex; flex-direction:column; gap:8px; border:0; padding:16px 0; background:none; }
  .nav-item { flex-direction:row; justify-content:flex-start; min-height:48px; gap:12px; font-size:15px; padding:12px; }
  .nav-icon { width:24px; text-align:center; }
  .count { position:static; margin-left:auto; }
  .sidebar-footer { margin:auto 0 0; flex-wrap:wrap; }
  #updated { display:block; flex:1; font-size:12px; }
  .account { width:100%; border-top:1px solid var(--line); margin-top:8px; padding-top:8px; }
  .account button { top:auto; bottom:50px; right:auto; left:0; }
  main { margin-left:240px; max-width:none; padding:48px 40px; }
  #content,#error-banner { max-width:760px; margin-left:auto; margin-right:auto; }
  .row-title { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; white-space:normal; }
  .task-card { padding:6px 20px 14px; }
  .quick { justify-content:flex-start; }.quick button { flex-grow:0; }
  dialog { inset:0 0 0 auto; width:510px; max-height:100dvh; height:100dvh; border-radius:20px 0 0 20px; padding-top:env(safe-area-inset-top); }
  .toast { bottom:28px; }
}
@media(prefers-color-scheme:dark) {
  :root { --bg:#111318; --card:#1C2027; --text:#F1F3F7; --muted:#AAB3C1; --line:#353C48; --blue:#93B8FF; --soft:#1D3155; --amber:#FCD68A; --amber-bg:#412C12; --violet:#C8A9FF; --violet-bg:#35234E; --slate:#C3CEDD; --slate-bg:#2A3441; --grey:#D4D4D8; --grey-bg:#323238; --red:#FFACAC; --red-bg:#4B2228; --green:#9BE5B4; --green-bg:#183D2B; }
  .primary { color:#111318; }.avatar-codex { background:#F4F4F5; color:#18181B; }
}
@keyframes pulse { 50% { transform:scale(.65); } }
@media(prefers-reduced-motion:no-preference) {
  .state-working .state-icon { animation:pulse 2s ease-in-out infinite; }
  dialog[open] { animation:enter .18s ease-out; }
  @keyframes enter { from { transform:translateY(20px); opacity:0; } }
}
@media(min-width:900px) and (prefers-reduced-motion:no-preference) { @keyframes enter { from { transform:translateX(30px); opacity:0; } } }
