:root {
  color-scheme: light;
  --canvas: #f3f5f7;
  --paper: rgba(255,255,255,.88);
  --ink: #16181c;
  --muted: #8b9099;
  --line: #e5e8ed;
  --blue: #387bf2;
  --blue-soft: #edf4ff;
  --purple: #8067d8;
  --green: #63c89c;
  --red: #ea5d62;
  --shadow: 0 16px 44px rgba(41,52,72,.075);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 7% -8%,#dce9ff 0,transparent 28%),linear-gradient(135deg,#f3f5f7,#f8f9fb); font-family: Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"SF Pro Display","PingFang SC","Microsoft YaHei",sans-serif; }
button,select { font: inherit; }
button { cursor: pointer; }

.topbar { height: 86px; display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand > span:last-child,.brand strong,.brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.brand-mark { width: 35px; height: 35px; display: grid; grid-template-columns: repeat(2,7px); grid-auto-rows: 7px; place-content: center; gap: 3px; border-radius: 10px; background: #202329; box-shadow: 0 7px 17px rgba(24,29,37,.2); transform: rotate(-3deg); }
.brand-mark i { border-radius: 2px; background: white; }.brand-mark i:nth-child(2),.brand-mark i:nth-child(3) { opacity: .62; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.sync-status { display: inline-flex; align-items: center; gap: 7px; color: #5e8d76; font-size: 10px; }
.sync-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(99,200,156,.1); }.sync-status i.error { background: var(--red); }
.sync-button,.avatar,.calendar-actions button { min-height: 36px; border: 1px solid var(--line); background: rgba(255,255,255,.82); box-shadow: 0 4px 14px rgba(34,45,62,.04); }
.sync-button { display: inline-flex; align-items: center; gap: 7px; padding: 0 15px; border-radius: 11px; font-size: 10px; font-weight: 700; }.sync-button span { font-size: 18px; }.sync-button:disabled { opacity: .55; cursor: wait; }
.avatar { width: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); font-size: 11px; background: #edf4ff; }

.workspace { min-height: calc(100vh - 86px); display: grid; grid-template-columns: 420px minmax(0,1fr); grid-template-rows: auto 1fr; grid-template-areas: "overview right" "queue right"; gap: 16px; padding: 0 18px 18px; }
.card { position: relative; overflow: hidden; border: 1px solid rgba(228,232,238,.88); border-radius: 25px; background: var(--paper); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.overview-card { grid-area: overview; min-height: 245px; padding: 31px 28px 22px; }
.overview-orbit { position: absolute; width: 180px; height: 180px; top: -72px; right: -38px; border-radius: 50%; background: radial-gradient(circle at 30% 30%,rgba(173,200,255,.2),rgba(220,231,255,.75)); }
.eyebrow { margin: 0; color: #80858d; font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow > i { width: 7px; height: 7px; display: inline-block; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(99,200,156,.1); }
.overview-numbers { display: flex; align-items: stretch; margin: 35px 0 29px; }
.overview-numbers span { min-width: 125px; padding-right: 30px; }
.overview-numbers span + span { padding-left: 30px; border-left: 1px solid var(--line); }
.overview-numbers small,.overview-numbers strong { display: block; }.overview-numbers small { color: #767b84; font-size: 11px; }.overview-numbers strong { margin-top: 7px; font-size: 47px; line-height: 1; letter-spacing: -.05em; }.overview-numbers strong.blue { color: var(--blue); }
.owner-tabs { position: relative; z-index: 1; display: flex; padding: 4px; border-radius: 13px; background: #f0f2f5; overflow-x: auto; }
.owner-tabs button { flex: 1 0 72px; min-height: 36px; border: 0; border-radius: 10px; background: transparent; color: #777c84; font-size: 10px; }.owner-tabs button.active { background: white; color: var(--ink); box-shadow: 0 3px 10px rgba(33,42,56,.08); font-weight: 700; }

.queue-card { grid-area: queue; min-height: 520px; padding: 28px 20px 20px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 6px; }
.section-heading h2 { margin: 7px 0 0; font-size: 20px; letter-spacing: -.03em; }
.sort-select { height: 36px; display: inline-flex; align-items: center; gap: 4px; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: 10px; background: white; color: #777c84; font-size: 10px; }
.sort-select select { border: 0; outline: 0; background: transparent; color: inherit; }
.queue-modes { display: grid; grid-template-columns: repeat(2,1fr); gap: 4px; margin: 17px 4px 0; padding: 4px; border-radius: 12px; background: #f0f2f5; }
.queue-modes button { min-height: 34px; border: 0; border-radius: 9px; background: transparent; color: #7f848c; font-size: 9px; }
.queue-modes button b { display: inline-grid; min-width: 19px; height: 19px; place-items: center; margin-left: 5px; border-radius: 999px; background: #e2e5e9; color: #737982; font-size: 8px; }
.queue-modes button.active { background: white; color: var(--ink); box-shadow: 0 3px 10px rgba(33,42,56,.08); font-weight: 700; }
.queue-modes button.active b { background: var(--blue-soft); color: var(--blue); }
.task-list { display: grid; gap: 10px; margin-top: 14px; }
.task-card { min-height: 72px; display: grid; grid-template-columns: 8px minmax(0,1fr) 36px 42px; align-items: center; gap: 8px; padding: 10px 0 10px 13px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.74); transition: border-color .18s ease,transform .18s ease,box-shadow .18s ease; outline: 0; }
.task-card:hover,.task-card:focus-visible { transform: translateY(-1px); border-color: #cad8f1; box-shadow: 0 8px 20px rgba(39,66,110,.08); }
.priority-dot { width: 7px; height: 7px; border-radius: 50%; background: #9aa0a9; }.priority-p0 { background: var(--red); }.priority-p1 { background: #f0a35b; }.priority-p2 { background: #69b78d; }
.task-copy { min-width: 0; }.task-copy strong,.task-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.task-copy strong { font-size: 11px; }.task-copy small { margin-top: 6px; color: #a0a4ab; font-size: 8px; }
.task-card > b { color: #747a83; font-size: 9px; font-weight: 600; }
.mini-progress { height: 3px; display: block; margin-top: 9px; border-radius: 3px; background: #eef0f3; overflow: hidden; }.mini-progress i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#5b9bff,#8db6ff); }
.pin-button { width: 42px; align-self: stretch; border: 0; border-left: 1px solid var(--line); background: transparent; color: #b7bbc2; }.pin-button.pinned { color: var(--blue); }
.task-card.status-planned,.task-card.status-inbox { background:#f5f6f8; border-color:#e2e5e9; }.task-card.status-planned .priority-dot,.task-card.status-inbox .priority-dot { background:#a9afb8; }.task-card.status-planned .mini-progress i,.task-card.status-inbox .mini-progress i { background:#a9afb8; }.task-card.status-planned .task-copy strong,.task-card.status-inbox .task-copy strong { color:#707680; }
.task-card.status-in-progress .priority-dot,.task-card.status-ready-for-review .priority-dot { background:var(--blue); }.task-card.status-in-progress .mini-progress i,.task-card.status-ready-for-review .mini-progress i { background:linear-gradient(90deg,#387bf2,#78a9ff); }
.task-card.status-blocked .priority-dot { background:var(--red); }.task-card.status-blocked .mini-progress i { background:linear-gradient(90deg,#ea5d62,#f29a9e); }
.task-card.done-task { background: #f8fbf9; }.task-card.done-task .priority-dot { background: var(--green); }.task-card.done-task .mini-progress i { background: linear-gradient(90deg,#63c89c,#8fd9b9); }
.empty { padding: 50px 20px; color: var(--muted); text-align: center; font-size: 11px; }

.right-panel { grid-area: right; min-height: calc(100vh - 104px); padding: 30px; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 3px 24px; }
.calendar-header h1 { margin: 4px 0 0; font-size: 40px; letter-spacing: -.06em; }
.calendar-actions { display: flex; align-items: center; gap: 8px; }.calendar-actions button { min-width: 36px; padding: 0 11px; border-radius: 10px; font-size: 10px; }.legend { display: inline-flex; align-items: center; gap: 5px; margin-right: 9px; color: #8c9199; font-size: 8px; }.legend i { width: 6px; height: 6px; border-radius: 2px; background: var(--blue); }.legend i.meeting { margin-left: 6px; background: var(--purple); }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }.weekdays span { padding: 0 0 12px; color: #9aa0a8; text-align: center; font-size: 8px; }
.month-grid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }.calendar-day { min-height: 142px; padding: 12px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.45); }.calendar-day.outside { color: #c4c8ce; background: rgba(249,250,251,.55); }.day-number { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 9px; }.calendar-day.today .day-number { background: var(--blue); color: white; box-shadow: 0 5px 12px rgba(56,123,242,.26); }
.day-events { display: grid; gap: 5px; margin-top: 5px; }.calendar-event { min-width: 0; display: flex; align-items: center; gap: 5px; padding: 5px 6px; border: 0; border-radius: 7px; background: var(--blue-soft); color: #5d75a0; font-size: 7px; text-align: left; }.calendar-event.meeting { background: #f2edff; color: #7660b0; }.calendar-event i { width: 4px; height: 4px; flex: 0 0 auto; border-radius: 50%; background: var(--blue); }.calendar-event.meeting i { background: var(--purple); }.calendar-event span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-footnote { display: flex; align-items: center; gap: 8px; padding: 14px 2px 0; color: #9ba0a8; font-size: 8px; }.calendar-footnote i { width: 4px; height: 4px; border-radius: 50%; background: #c8ccd2; }

.detail-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }.close-detail { min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: white; }.priority-badge { padding: 7px 10px; border-radius: 999px; background: #f1f3f6; color: #767b83; font-size: 9px; }.priority-badge.priority-p0 { background: #fff0f1; color: var(--red); }.priority-badge.priority-p1 { background: #fff5e9; color: #cb7d36; }
.detail-title { max-width: 850px; margin: 10px 0 28px; font-size: clamp(30px,4vw,54px); line-height: 1.12; letter-spacing: -.06em; }
.detail-hero { display: grid; grid-template-columns: minmax(0,1fr) 180px; gap: 24px; align-items: center; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(135deg,#fafbfd,#f2f6fd); }
.detail-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }.detail-meta small,.detail-meta b { display: block; }.detail-meta small { color: var(--muted); font-size: 8px; }.detail-meta b { margin-top: 5px; font-size: 12px; }
.progress-orbit { width: 130px; height: 130px; display: grid; place-items: center; margin: auto; border-radius: 50%; background: conic-gradient(var(--blue) var(--progress),#e8ebf0 0); }.progress-orbit::before { content:""; position:absolute; width:105px; height:105px; border-radius:50%; background:white; }.progress-orbit { position:relative; }.progress-orbit > div { position:relative; z-index:1; text-align:center; }.progress-orbit strong { font-size:34px; }.progress-orbit span { font-size:15px; }.progress-orbit small { display:block; color:var(--muted); font-size:8px; }
.detail-section { margin-top: 22px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.68); }.detail-section .section-heading { padding: 0; }.detail-section .section-heading > b { color: var(--blue); font-size: 10px; }
.milestone-list { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }.milestone-list li { display:flex; align-items:center; gap:12px; padding:14px; border:1px solid transparent; border-radius:15px; background:#f6f7f9; }.milestone-list li.next { background:#f1f2f4; border-color:#e2e5e9; color:#747a83; }.milestone-list li.active { background:#f1f6ff; border-color:#dbe8ff; }.milestone-list li.done { background:#f2faf6; border-color:#dcefe5; }.milestone-list li.blocked { background:#fff4f4; border-color:#f5d9da; }.milestone-list li > i { width:28px; height:28px; display:grid; place-items:center; flex:0 0 auto; border-radius:50%; background:white; color:#9297a0; font-size:9px; font-style:normal; }.milestone-list li.next > i { background:#a9afb8; color:white; }.milestone-list li.active > i { background:var(--blue); color:white; }.milestone-list li.done > i { background:var(--green); color:white; }.milestone-list li.blocked > i { background:var(--red); color:white; }.milestone-list strong,.milestone-list small { display:block; }.milestone-list strong { font-size:11px; }.milestone-list small { margin-top:4px; color:var(--muted); font-size:8px; }.milestone-list .elapsed { flex:0 0 auto; margin-left:auto; padding:6px 9px; border-radius:999px; background:#e2e5e9; color:#717780; font-size:9px; font-style:normal; font-weight:700; white-space:nowrap; }.milestone-list .elapsed-active { background:#e0ebff; color:#2d69cf; }.milestone-list .elapsed-done { background:#dff3e8; color:#458d6e; }.milestone-list .elapsed-blocked { background:#ffe1e2; color:#c9474d; }.milestone-list .elapsed-planned { background:#e2e5e9; color:#717780; }
.definition > p:last-child { white-space:pre-line; color:#5f646c; font-size:11px; line-height:1.8; }.source code { display:block; margin:14px 0 8px; padding:12px; border-radius:10px; background:#f1f3f6; overflow-wrap:anywhere; font-size:9px; }.source small { color:var(--muted); font-size:9px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; max-width: min(420px,calc(100vw - 32px)); padding: 12px 17px; border-radius: 13px; background: rgba(30,34,40,.92); color: white; font-size: 11px; opacity: 0; transform: translate(-50%,16px); pointer-events: none; transition: .2s ease; }.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (min-width: 901px) {
  body { overflow: hidden; }
  .workspace { height: calc(100vh - 86px); min-height: 0; grid-template-rows: 245px minmax(0,1fr); overflow: hidden; }
  .overview-card { min-height: 0; height: 100%; }
  .queue-card { min-height: 0; height: 100%; display: flex; flex-direction: column; }
  .queue-card .task-list { min-height: 0; flex: 1; overflow-y: auto; padding-right: 5px; scrollbar-width: thin; scrollbar-color: #ccd3de transparent; }
  .right-panel { position: sticky; top: 0; min-height: 0; height: 100%; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #ccd3de transparent; }
}

@media (max-width: 900px) {
  body { overflow: auto; }
  .topbar { height: 70px; padding: 14px 20px; }.sync-status,.sync-button { font-size:0; }.sync-button { width:38px; padding:0; justify-content:center; }.sync-button span { font-size:20px; }
  .workspace { min-height:calc(100vh - 70px); grid-template-columns:1fr; grid-template-rows:auto; grid-template-areas:"overview" "right" "queue"; padding:0 10px 16px; }
  .overview-card { min-height:230px; padding:26px 20px 18px; }.overview-numbers { margin:32px 0 27px; }.overview-numbers strong { font-size:45px; }
  .right-panel { min-height:0; padding:18px; }.calendar-header { align-items:flex-end; margin-bottom:20px; }.calendar-header h1 { font-size:28px; }.legend,.calendar-actions [data-calendar="today"] { display:none; }
  .calendar-day { min-height:66px; padding:8px 5px; }.day-number { width:22px; height:22px; font-size:8px; }.calendar-event { min-height:4px; padding:0; }.calendar-event span { display:none; }.calendar-event i { width:4px; height:4px; margin:auto; }
  .calendar-footnote { flex-wrap:wrap; line-height:1.5; }
  .queue-card { min-height:0; height:auto; padding:24px 14px 20px; }.queue-card .task-list { overflow:visible; }.task-card { grid-template-columns:8px minmax(0,1fr) 32px 40px; }
  .detail-title { font-size:32px; }.detail-hero { grid-template-columns:1fr; }.detail-meta { grid-template-columns:repeat(2,1fr); }.progress-orbit { width:120px; height:120px; }
  .milestone-list li { flex-wrap:wrap; }.milestone-list li > span { min-width:0; flex:1; }.milestone-list .elapsed { margin-left:40px; }
}

@media (max-width: 420px) {
  .brand small { display:none; }.top-actions { gap:7px; }.sync-status { width:9px; overflow:hidden; }.owner-tabs button { flex-basis:70px; }
  .overview-numbers span { min-width:0; flex:1; }.overview-numbers span + span { padding-left:22px; }.overview-numbers span { padding-right:22px; }
  .month-grid { min-width:0; }.calendar-day { min-width:0; }.right-panel { border-radius:24px; }
  .task-copy strong { font-size:10px; }.task-copy small { font-size:7px; }
}

@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; } }
