:root {
  color-scheme: light;
  font: 15px/1.6 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", "PingFang TC", "Microsoft JhengHei", "PingFang SC", "Noto Sans SC", "Microsoft YaHei UI", system-ui, sans-serif;
  background-color: #f6f6f3;
}
:root:lang(ja) {
  font-family: "Inter", "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", system-ui, sans-serif;
}
:root:lang(zh-TW) {
  font-family: "Inter", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
}
html[data-theme="dark"] {
  color-scheme: dark;
  background-color: #181817;
}
html[data-i18n-pending="1"] body {
  opacity: 0;
}
:root {
  /* ① Ink Studio Light — V3.0 Warm Paper Flagship (Radix 12-Step + Companion Alpha + 5% Gem Accents) */
  --panel: #f1f1ee;
  --base: #ffffff;
  --notes-canvas: #f6f6f3;
  --field: #ffffff;
  --raised: #ffffff;
  --floating: #ffffff;
  --hover: rgba(24, 24, 22, 0.04);
  --active: #e7e7e2;
  --line: rgba(24, 24, 22, 0.065);
  --card-border: rgba(24, 24, 22, 0.065);
  --border-overlay: rgba(24, 24, 22, 0.10);
  --border-focus: rgba(24, 24, 22, 0.24);
  --top-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  --ambient-sheen: transparent;
  --accent: #181818;
  --accent-hover: #2d2d2a;
  --brand-fg: #ffffff;
  --ink: #222220;
  --muted: #6e6e68;
  --faint: #9b9b94;
  --quote-ribbon-bg: #f6f6f3;
  --quote-ribbon-line: #b9852f;
  /* Harmonized semantic sub-palette (Ink Studio Light) */
  --p1: #c94136;
  --p2: #c47b1b;
  --p3: #3a6ea5;
  --today: #2e7d4f;
  --danger: #c94136;
  --coral: #d96857;
  --gold: #b9852f;
  --inbox-tint: #5b7fa6;
  /* 14-week watercolor mist-pine heatmap */
  --heat-0: rgba(24, 24, 22, 0.055);
  --heat-1: #d4e2d9;
  --heat-2: #adc9b8;
  --heat-3: #7fa991;
  --heat-4: #4e8467;
  /* Z-axis shadow discipline */
  --shadow-ground: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
  --bg: var(--base);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  /* ① Ink Studio Dark — Obsidian Linear/Raycast */
  --panel: #141414;
  --base: #1a1a1a;
  --notes-canvas: #1a1a1a;
  --field: #222222;
  --raised: #222222;
  --floating: #262626;
  --hover: rgba(255, 255, 255, 0.045);
  --active: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.07);
  --card-border: rgba(255, 255, 255, 0.075);
  --border-overlay: rgba(255, 255, 255, 0.11);
  --border-focus: rgba(255, 255, 255, 0.24);
  --top-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.13);
  --ambient-sheen: rgba(255, 255, 255, 0.022);
  --accent: #f2f2f2;
  --accent-hover: #ffffff;
  --brand-fg: #141414;
  --ink: #f2f2f2;
  --muted: #9e9e9e;
  --faint: #6a6a66;
  --quote-ribbon-bg: rgba(255, 255, 255, 0.025);
  --quote-ribbon-line: #dfb15b;
  --p1: #e8756c;
  --p2: #e5a955;
  --p3: #6da3df;
  --today: #62c289;
  --danger: #e8756c;
  --coral: #e47d6e;
  --gold: #dfb15b;
  --inbox-tint: #7ca5d0;
  --heat-0: rgba(255, 255, 255, 0.06);
  --heat-1: rgba(255, 255, 255, 0.22);
  --heat-2: rgba(255, 255, 255, 0.44);
  --heat-3: rgba(255, 255, 255, 0.68);
  --heat-4: rgba(255, 255, 255, 0.90);
  --shadow-ground: none;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}
/* ② Midnight Slate — 深海铂蓝 */
:root[data-accent="mistBlue"], :root[data-accent="blueberry"], :root[data-accent="graphite"] {
  --panel: #f0f4f8; --base: #f9fbfd; --notes-canvas: #f3f7fb; --field: #ffffff; --floating: #ffffff; --raised: #ffffff;
  --hover: rgba(20, 32, 46, 0.045); --active: #e1eaf4;
  --line: rgba(20, 32, 46, 0.08); --card-border: rgba(20, 32, 46, 0.085); --border-overlay: rgba(20, 32, 46, 0.13); --border-focus: rgba(30, 58, 95, 0.34);
  --ink: #14202e; --muted: #536375; --faint: #8494a6; --accent: #1e3a5f; --accent-hover: #284b7a; --brand-fg: #ffffff;
  --quote-ribbon-bg: #eef4fa; --quote-ribbon-line: #4975ad;
  --p1: #c2464a; --p2: #b87a28; --p3: #2b6cb0; --today: #2a7a68; --danger: #c2464a; --coral: #ce6466; --gold: #b88635; --inbox-tint: #35669c;
  --heat-0: rgba(20, 32, 46, 0.055); --heat-1: #d8e5f2; --heat-2: #afc9e6; --heat-3: #7aa3d1; --heat-4: #3f70a8;
}
:root[data-theme="dark"][data-accent="mistBlue"], :root[data-theme="dark"][data-accent="blueberry"], :root[data-theme="dark"][data-accent="graphite"] {
  --panel: #0d1219; --base: #121923; --notes-canvas: #121923; --field: #1a2330; --floating: #1e2837; --raised: #1a2330;
  --hover: rgba(147, 188, 235, 0.06); --active: rgba(147, 188, 235, 0.13);
  --line: rgba(147, 188, 235, 0.08); --card-border: rgba(147, 188, 235, 0.10); --border-overlay: rgba(147, 188, 235, 0.15); --border-focus: rgba(147, 188, 235, 0.36);
  --top-highlight: inset 0 1px 0 rgba(168, 201, 242, 0.14); --ambient-sheen: rgba(147, 188, 235, 0.024);
  --ink: #edf3fa; --muted: #95a7bc; --faint: #62748a; --accent: #93bceb; --accent-hover: #adcdf2; --brand-fg: #0d1219;
  --quote-ribbon-bg: rgba(147, 188, 235, 0.04); --quote-ribbon-line: #93bceb;
  --p1: #e67b80; --p2: #dfab5e; --p3: #7bb0eb; --today: #5ec2ab; --danger: #e67b80; --coral: #e68286; --gold: #e0b469; --inbox-tint: #89b7e8;
  --heat-0: rgba(147, 188, 235, 0.07); --heat-1: rgba(147, 188, 235, 0.24); --heat-2: rgba(147, 188, 235, 0.45); --heat-3: rgba(147, 188, 235, 0.70); --heat-4: rgba(147, 188, 235, 0.92);
}
/* ③ Cashmere Linen — 羊绒燕麦 (Flexoki paper-ink) */
:root[data-accent="warmPaper"], :root[data-accent="tangerine"], :root[data-accent="sunflower"] {
  --panel: #f2ede4; --base: #faf7f0; --notes-canvas: #f5f0e6; --field: #fffdf8; --floating: #fffdf8; --raised: #fffdf8;
  --hover: rgba(58, 42, 26, 0.045); --active: #efe5d6;
  --line: rgba(58, 42, 26, 0.085); --card-border: rgba(58, 42, 26, 0.09); --border-overlay: rgba(58, 42, 26, 0.14); --border-focus: rgba(110, 75, 46, 0.35);
  --ink: #231c16; --muted: #6e6358; --faint: #9b8f82; --accent: #6e4b2e; --accent-hover: #835a38; --brand-fg: #fffdf8;
  --quote-ribbon-bg: #f6efe2; --quote-ribbon-line: #b57b24;
  --p1: #af3029; --p2: #bc5215; --p3: #3d6b82; --today: #66800b; --danger: #af3029; --coral: #c2593e; --gold: #b57b24; --inbox-tint: #6c7a8c;
  --heat-0: rgba(58, 42, 26, 0.06); --heat-1: #e8dec9; --heat-2: #d5be98; --heat-3: #b99461; --heat-4: #8e6538;
}
:root[data-theme="dark"][data-accent="warmPaper"], :root[data-theme="dark"][data-accent="tangerine"], :root[data-theme="dark"][data-accent="sunflower"] {
  --panel: #161412; --base: #1d1a17; --notes-canvas: #1d1a17; --field: #26221e; --floating: #2b2621; --raised: #26221e;
  --hover: rgba(232, 215, 195, 0.055); --active: rgba(232, 215, 195, 0.12);
  --line: rgba(232, 215, 195, 0.08); --card-border: rgba(232, 215, 195, 0.10); --border-overlay: rgba(232, 215, 195, 0.15); --border-focus: rgba(216, 184, 148, 0.36);
  --top-highlight: inset 0 1px 0 rgba(234, 217, 197, 0.14); --ambient-sheen: rgba(234, 217, 197, 0.024);
  --ink: #f4ede4; --muted: #ada296; --faint: #786f65; --accent: #d8b894; --accent-hover: #e5caa9; --brand-fg: #161412;
  --quote-ribbon-bg: rgba(232, 215, 195, 0.04); --quote-ribbon-line: #dfaf63;
  --p1: #d14d41; --p2: #da702c; --p3: #78a5b8; --today: #879a39; --danger: #d14d41; --coral: #da6e56; --gold: #dfaf63; --inbox-tint: #98aec2;
  --heat-0: rgba(216, 184, 148, 0.07); --heat-1: rgba(216, 184, 148, 0.24); --heat-2: rgba(216, 184, 148, 0.46); --heat-3: rgba(216, 184, 148, 0.70); --heat-4: rgba(216, 184, 148, 0.92);
}
/* ④ Celadon Mist — 松雾青瓷 */
:root[data-accent="sage"], :root[data-accent="kale"] {
  --panel: #edf2ee; --base: #f8fbf9; --notes-canvas: #f2f7f4; --field: #ffffff; --floating: #ffffff; --raised: #ffffff;
  --hover: rgba(22, 36, 28, 0.045); --active: #e0ece4;
  --line: rgba(22, 36, 28, 0.08); --card-border: rgba(22, 36, 28, 0.085); --border-overlay: rgba(22, 36, 28, 0.13); --border-focus: rgba(46, 90, 68, 0.34);
  --ink: #16241c; --muted: #52665b; --faint: #84998d; --accent: #2e5a44; --accent-hover: #3a7055; --brand-fg: #ffffff;
  --quote-ribbon-bg: #eef5f0; --quote-ribbon-line: #498768;
  --p1: #ba4d45; --p2: #b5802b; --p3: #386c80; --today: #2e6e52; --danger: #ba4d45; --coral: #c9665d; --gold: #b48434; --inbox-tint: #4a7885;
  --heat-0: rgba(22, 36, 28, 0.055); --heat-1: #d3e6da; --heat-2: #a6ceb6; --heat-3: #72ae8c; --heat-4: #3f805e;
}
:root[data-theme="dark"][data-accent="sage"], :root[data-theme="dark"][data-accent="kale"] {
  --panel: #0f1613; --base: #151e1a; --notes-canvas: #151e1a; --field: #1d2923; --floating: #212f28; --raised: #1d2923;
  --hover: rgba(156, 209, 179, 0.055); --active: rgba(156, 209, 179, 0.12);
  --line: rgba(156, 209, 179, 0.08); --card-border: rgba(156, 209, 179, 0.10); --border-overlay: rgba(156, 209, 179, 0.15); --border-focus: rgba(140, 199, 166, 0.36);
  --top-highlight: inset 0 1px 0 rgba(176, 223, 196, 0.13); --ambient-sheen: rgba(176, 223, 196, 0.022);
  --ink: #ecf4ef; --muted: #93aa9d; --faint: #627a6c; --accent: #8cc7a6; --accent-hover: #a5d6bb; --brand-fg: #0f1613;
  --quote-ribbon-bg: rgba(156, 209, 179, 0.04); --quote-ribbon-line: #8cc7a6;
  --p1: #e07e77; --p2: #dcae60; --p3: #76aec4; --today: #6ec497; --danger: #e07e77; --coral: #e2867e; --gold: #deb268; --inbox-tint: #7cb3c7;
  --heat-0: rgba(140, 199, 166, 0.07); --heat-1: rgba(140, 199, 166, 0.24); --heat-2: rgba(140, 199, 166, 0.46); --heat-3: rgba(140, 199, 166, 0.70); --heat-4: rgba(140, 199, 166, 0.92);
}
/* ⑤ Velvet Mauve — 暮霞丝绒 (Rosé Pine) */
:root[data-accent="terracotta"], :root[data-accent="rose"], :root[data-accent="tomato"], :root[data-accent="lavender"] {
  --panel: #f5eef0; --base: #fcf8f9; --notes-canvas: #f8f1f3; --field: #ffffff; --floating: #ffffff; --raised: #ffffff;
  --hover: rgba(36, 23, 27, 0.045); --active: #f5e4e8;
  --line: rgba(36, 23, 27, 0.08); --card-border: rgba(36, 23, 27, 0.085); --border-overlay: rgba(36, 23, 27, 0.13); --border-focus: rgba(155, 74, 94, 0.34);
  --ink: #24171b; --muted: #6e5860; --faint: #9e8790; --accent: #9b4a5e; --accent-hover: #b35970; --brand-fg: #ffffff;
  --quote-ribbon-bg: #faf0f3; --quote-ribbon-line: #b4637a;
  --p1: #b4637a; --p2: #d68c3a; --p3: #4e6d99; --today: #286983; --danger: #b4637a; --coral: #c25e74; --gold: #c28640; --inbox-tint: #5d7ba3;
  --heat-0: rgba(36, 23, 27, 0.055); --heat-1: #ecd8df; --heat-2: #d9b2bf; --heat-3: #be8297; --heat-4: #9b4a5e;
}
:root[data-theme="dark"][data-accent="terracotta"], :root[data-theme="dark"][data-accent="rose"], :root[data-theme="dark"][data-accent="tomato"], :root[data-theme="dark"][data-accent="lavender"] {
  --panel: #171215; --base: #1f181c; --notes-canvas: #1f181c; --field: #292025; --floating: #2e2429; --raised: #292025;
  --hover: rgba(242, 189, 201, 0.055); --active: rgba(242, 189, 201, 0.13);
  --line: rgba(242, 189, 201, 0.08); --card-border: rgba(242, 189, 201, 0.10); --border-overlay: rgba(242, 189, 201, 0.15); --border-focus: rgba(230, 166, 181, 0.36);
  --top-highlight: inset 0 1px 0 rgba(245, 199, 210, 0.14); --ambient-sheen: rgba(245, 199, 210, 0.024);
  --ink: #f6ecef; --muted: #b7a0a7; --faint: #826d74; --accent: #e6a6b5; --accent-hover: #f0bcc9; --brand-fg: #171215;
  --quote-ribbon-bg: rgba(242, 189, 201, 0.04); --quote-ribbon-line: #e6a6b5;
  --p1: #eb6f92; --p2: #f6c177; --p3: #84a6d6; --today: #78b7c4; --danger: #eb6f92; --coral: #eb7c99; --gold: #e6b573; --inbox-tint: #8aaad6;
  --heat-0: rgba(230, 166, 181, 0.07); --heat-1: rgba(230, 166, 181, 0.24); --heat-2: rgba(230, 166, 181, 0.46); --heat-3: rgba(230, 166, 181, 0.70); --heat-4: rgba(230, 166, 181, 0.92);
}
/* High Contrast tier (Linear LCH calibration) */
:root[data-contrast="high"] {
  --line: rgba(24, 24, 22, 0.16);
  --card-border: rgba(24, 24, 22, 0.18);
  --border-overlay: rgba(24, 24, 22, 0.24);
  --muted: #4a4a45;
  --faint: #6c6c66;
}
:root[data-theme="dark"][data-contrast="high"] {
  --line: rgba(255, 255, 255, 0.16);
  --card-border: rgba(255, 255, 255, 0.18);
  --border-overlay: rgba(255, 255, 255, 0.24);
  --muted: #c2c2be;
  --faint: #969690;
}
:root[data-ambient="off"] {
  --ambient-sheen: transparent;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  font-weight: 400;
  background-color: var(--base);
  background-image: radial-gradient(ellipse 80% 70% at 6% 0%, var(--ambient-sheen), transparent 78%);
  transition: background-color 200ms cubic-bezier(0.22, 1, 0.36, 1), color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
body[data-workspace-mode="notes"] {
  background-color: var(--notes-canvas);
}
a { color: var(--accent); }
button, input, textarea, select { font: inherit; }
button, input, textarea, select, .task-link-button {
  border: 1px solid var(--line);
  border-radius: .5rem;
  color: var(--ink);
  background: var(--field);
  padding: .5rem .72rem;
}
button { cursor: pointer; }
button:hover:not(:disabled), nav button[aria-current], .task-link-button:hover { background: var(--active); }
.task-link-button { text-decoration: none; }
button:disabled { cursor: default; opacity: .6; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.primary { color: var(--brand-fg); background: var(--accent); border-color: var(--accent); }
.brand-mark { display: block; flex: none; color: var(--accent); }
.top {
  min-height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem clamp(1rem, 3vw, 2.25rem);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--ink); font-weight: 700; text-decoration: none; display: flex; gap: .6rem; align-items: center; }
.brand span { padding: .13rem .42rem; color: var(--accent); background: var(--active); border-radius: .4rem; }
.top-controls { min-width: 0; justify-content: flex-end; }
#workspace-theme, #workspace-accent { flex: none; }
#open-workspace-shortcuts { margin-block-start: 1rem; }
#open-project-csv, #open-template-library, #open-date-preferences { margin-block-start: .85rem; margin-inline-end: .35rem; }
#open-shared-workspace { margin-block-start: .85rem; margin-inline-end: .35rem; }
#shared-workspace { width: min(calc(100vw - 2rem), 42rem); }
#shared-workspace h3 { font-size: 1rem; }
#shared-workspace-close { margin-block-start: 1rem; }
.shared-list { list-style: none; padding: 0; margin: .55rem 0; }
.shared-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  padding: .55rem 0; gap: .4rem .7rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.shared-list button, .shared-list small { max-width: 100%; }
.shared-task-row { width: 100%; display: grid; gap: .2rem; text-align: start; }
.shared-list small { color: var(--muted); white-space: pre-wrap; }
#shared-task-form { margin-top: .8rem; padding-top: .6rem; border-top: 1px solid var(--line); }
#project-csv-dialog h3 { margin: .8rem 0 .45rem; font-size: 1rem; }
#project-csv-export { margin-block-start: 1rem; border-block-start: 1px solid var(--line); }
.csv-preview-list { margin: .4rem 0 .8rem; padding-inline-start: 1.35rem; max-height: 8rem; overflow: auto; overflow-wrap: anywhere; }
.shortcut-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem .8rem; }
.shortcut-list dd { margin: 0; }
.shortcut-list kbd { font-size: .8rem; background: var(--field); border: 1px solid var(--line); border-radius: .28rem; padding: .1rem .24rem; }
.signin { margin: clamp(2rem, 11vh, 7rem) auto 2rem; padding: 0 1rem; max-width: 27rem; }
.signin form, .panel { padding: 1rem; border: 1px solid var(--line); background: var(--panel); border-radius: .7rem; }
dialog {
  width: min(calc(100vw - 2rem), 28rem);
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: .7rem;
  padding: 1rem;
}
dialog::backdrop { background: #10141bc7; }
#search-dialog, #activity-dialog, #project-insights { width: min(calc(100vw - 2rem), 39rem); }
#search-dialog h2, #activity-dialog h2, #project-insights h2 { margin: 0; }
#project-progress { width: 100%; accent-color: var(--accent); }
.project-insights-history { justify-content: space-between; margin-block: .65rem 1rem; }
#project-risk-list .task-name { width: 100%; }
#activity-dialog .fields { margin-top: .75rem; }
#activity-list li { display: grid; gap: .3rem; padding: .6rem 0; }
#activity-list li + li { border-top: 1px solid var(--line); }
#activity-list button { justify-self: start; }
#activity-list :is(small,span) { overflow-wrap: anywhere; }
#search-dialog label { margin-top: .75rem; }
#search-results li { padding: .2rem 0; }
#search-results button { width: 100%; }
#password-help { color: var(--muted); margin: 0 0 1rem; }
.signin a { display: inline-block; margin-top: .9rem; }
label { display: grid; gap: .25rem; min-width: 0; margin-bottom: .75rem; }
.view-completed { display: flex; align-items: center; gap: .45rem; }
.view-completed input { width: auto; accent-color: var(--accent); }
#upcoming-axis { margin-block: .75rem 1rem; }
#upcoming-axis label { display: flex; align-items: center; margin: 0; }
#upcoming-days { display: flex; flex-wrap: wrap; gap: .4rem; margin-block-start: .6rem; }
#tasks .schedule-group { align-items: center; flex-wrap: wrap; }
#tasks .schedule-group h2 { margin-inline-end: auto; }
.workspace { display: grid; grid-template-columns: minmax(11rem, 16rem) minmax(0, 1fr); min-height: calc(100vh - 3.75rem); }
aside { border-right: 1px solid var(--line); padding: 1.1rem; }
aside h2 { color: var(--muted); font-size: .88rem; margin: 1.5rem 0 .5rem .5rem; }
.project-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1rem; }
.project-heading h2 { margin: 0 .5rem; }
.project-heading button { padding: .3rem .5rem; font-size: .88rem; }
nav { display: grid; gap: .2rem; }
nav button { text-align: left; border-color: transparent; background: none; }
#projects button, #favorite-projects button { overflow-wrap: anywhere; }
.project-tree-row { display: flex; align-items: stretch; min-width: 0; }
.project-tree-row [data-drop-project] { flex: 1; min-width: 0; }
#projects [data-collapse-project] { flex: none; padding-inline: .45rem; }
#projects [data-collapse-project]::before { content: none; }
#projects [data-project-order-drop] { position: relative; }
#projects [data-project-order-drop]::after { content: ""; position: absolute; inset-inline: 0; height: 2px; background: var(--accent); }
#projects [data-project-order-drop="before"]::after { top: 0; }
#projects [data-project-order-drop="after"]::after { bottom: 0; }
#project-sidebar-controls { margin-block-start: .65rem; }
#projects button::before,
#favorite-projects button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--project-color, var(--muted));
  display: inline-block;
  flex: none;
  margin-inline-end: .15rem;
}
#projects .project-depth-1 { padding-inline-start: 1.25rem; }
#projects .project-depth-2 { padding-inline-start: 1.85rem; }
#projects .project-depth-3 { padding-inline-start: 2.45rem; }
#projects .project-depth-4 { padding-inline-start: 3.05rem; }
#open-archived-projects { margin-block-start: .6rem; }
#archived-projects-list li { align-items: center; justify-content: space-between; }
#archived-projects-list span { overflow-wrap: anywhere; }
.content { width: min(100%, 58rem); margin: 0 auto; padding: clamp(1rem, 4vw, 2.5rem); }
.heading, .toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.heading { justify-content: space-between; }
h1 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.2rem); }
.signin h1 { margin-bottom: 1.2rem; }
h2 { font-size: 1.1rem; margin-top: 0; }
.fields { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .65rem; }
.fields label { flex: 1 1 10rem; }
.label-editor { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; margin-bottom: .75rem; }
.label-editor label { flex: 1 1 10rem; margin: 0; }
.task-labels { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0 0 .8rem; list-style: none; }
.task-labels li, .task-labels button { max-width: 100%; }
.task-labels button { padding: .25rem .6rem; border-radius: 1rem; overflow-wrap: anywhere; }
.reminder-editor { padding: .65rem 0; margin-bottom: .65rem; border-block: 1px solid var(--line); }
.reminder-editor summary { cursor: pointer; font-weight: 650; }
.reminder-editor[open] summary { margin-bottom: .65rem; }
.reminder-list { list-style: none; padding: 0; margin: 0 0 .65rem; }
.reminder-list:empty { display: none; }
#attachment-draft li > span { flex: 1 1 9rem; min-width: 0; overflow-wrap: anywhere; }
#attachment-draft small, #attachment-status { color: var(--muted); }
.task-comment-list { list-style: none; padding: 0; margin: .7rem 0; max-height: min(18rem, 42vh); overflow: auto; }
.task-comment-list li { border-bottom: 1px solid var(--line); padding: .6rem 0; }
.task-comment-list p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 .4rem; }
.task-comment-list small, #comment-task-name { color: var(--muted); overflow-wrap: anywhere; }
.task-comment-list button { padding: .25rem .5rem; }
.comment-meta { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.comment-meta small { flex: 1 1 8rem; }
.reminder-list li { display: flex; align-items: baseline; gap: .35rem .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.reminder-list button { padding: .25rem .55rem; }
#repeat-weekdays { display: flex; flex-wrap: wrap; gap: .5rem .85rem; border: 0; padding: 0; margin: 0 0 .75rem; }
#repeat-weekdays label, .check-row { display: flex; align-items: center; gap: .35rem; }
#repeat-weekdays label { margin: 0; }
.field-note { color: var(--muted); }
#quick-capture-properties { margin: -.25rem 0 .75rem; }
#quick-capture-properties p { margin: .25rem 0; font-size: .88rem; }
#quick-capture-choices button { padding: .32rem .52rem; max-width: 100%; overflow-wrap: anywhere; }
#quick-capture-lane:not(:empty) { margin-block: .4rem; }
p[role=status], #editor-status, #empty { color: var(--muted); }
.task-action-feedback { position: fixed; z-index: 2; inset-inline: auto clamp(.75rem, 3vw, 2rem); bottom: 1rem;
  display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; max-width: calc(100% - 1.5rem); padding: .55rem .8rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: .65rem; box-shadow: 0 .4rem 1.4rem #0004; }
.task-action-feedback p { margin: 0; }
.task-action-feedback button { flex: none; }
.tasks { padding: 0; margin: 1rem 0; list-style: none; }
.tasks li, .account-row { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.content:has(#tasks.project-board) { width: 100%; }
#project-board-toggle[aria-pressed="true"] { background: var(--active); border-color: var(--accent); }
#project-table-toggle[aria-pressed="true"] { background: var(--active); border-color: var(--accent); }
.content:has(#project-table-panel:not([hidden])) { width: 100%; min-width: 0; }
.task-table-scroll { max-width: 100%; overflow: auto; margin-block: .85rem; border: 1px solid var(--line); border-radius: .55rem; }
#project-task-table { border-collapse: collapse; width: 100%; min-width: 49rem; }
#project-task-table th, #project-task-table td { text-align: start; border-bottom: 1px solid var(--line); padding: .42rem .5rem; }
#project-task-table th { background: var(--panel); white-space: nowrap; }
#project-task-table th button, .table-edit-title { padding: .3rem .45rem; }
#project-task-table tr.selected-task { background: var(--active); }
#project-task-table td:nth-child(3), #project-task-table td:nth-child(4) { white-space: nowrap; font-variant-numeric: tabular-nums; }
#project-task-table .table-task-title { width: 36%; min-width: 17rem; padding-inline-start: calc(.5rem + var(--task-depth) * .6rem); }
.table-task-name { overflow-wrap: anywhere; background: none; border-color: transparent; text-align: start; }
.table-edit-title { margin-inline-start: .25rem; font-size: .82rem; }
.table-title-editor { display: grid; grid-template-columns: minmax(6rem, 1fr) auto auto; gap: .25rem; }
.table-title-editor input { min-width: 0; width: 100%; }
.table-title-editor small { grid-column: 1 / -1; color: var(--muted); overflow-wrap: anywhere; }
#task-table-pages { justify-content: center; }
#task-calendar { margin-top: 1rem; }
.calendar-toolbar { margin-bottom: .6rem; }
.calendar-toolbar h2 { flex: 1; min-width: 8rem; }
#task-calendar h2 { font-size: 1.1rem; }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { text-align: center; color: var(--muted); margin-bottom: .4rem; }
.calendar-days { gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: .5rem; overflow: hidden; }
.calendar-cell { background: var(--panel); min-width: 0; min-height: clamp(4.3rem, 10vw, 6.4rem);
  display: flex; flex-direction: column; gap: .15rem; padding: .18rem; }
.calendar-cell.calendar-adjacent { background: var(--base); }
.calendar-day-number, .calendar-task, .calendar-more { min-width: 0; padding: .15rem; border-color: transparent; }
.calendar-day-number { align-self: start; min-width: 1.75rem; background: none; }
.calendar-day-number[aria-current="date"], .calendar-cell[data-calendar-drop] { background: var(--active); border-color: var(--accent); }
.calendar-cell[data-calendar-drop] { outline: 2px solid var(--accent); outline-offset: -2px; }
.calendar-current-day .calendar-day-number { color: var(--accent); font-weight: 750; }
.calendar-task, .calendar-more { width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: start; font-size: .77rem; }
.calendar-task[draggable="true"] { cursor: grab; }
.calendar-deadline { border-inline-start: 2px solid var(--accent); }
.calendar-more { color: var(--muted); background: none; }
#tasks.project-board { display: flex; align-items: flex-start; gap: .8rem; overflow-x: auto; padding: .2rem .15rem .75rem; }
#tasks .board-column { flex: 0 0 min(17rem, 85%); min-width: 0; display: grid; gap: .55rem; padding: .7rem;
  border: 1px solid var(--line); border-radius: .65rem; background: var(--panel); }
#tasks .board-column h2 { display: flex; gap: .45rem; align-items: baseline; margin: 0;
  font-size: 1rem; overflow-wrap: anywhere; }
.board-count { margin-inline-start: auto; color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
#tasks .board-cards { display: grid; gap: .38rem; min-height: 2rem; margin: 0; padding: 0; list-style: none; }
#tasks .board-cards > li { padding: .45rem; gap: .35rem; border: 1px solid var(--line);
  background: var(--base); border-radius: .45rem; min-width: 0; }
#tasks .board-cards > .depth-1 { margin-inline-start: .4rem; }
#tasks .board-cards > .depth-2 { margin-inline-start: .8rem; }
#tasks .board-cards > .depth-3 { margin-inline-start: 1.2rem; }
#tasks .board-cards > .depth-4 { margin-inline-start: 1.6rem; }
#tasks .board-cards > li.selected-task, #tasks .board-cards > li[data-drop="inside"],
#tasks .board-column[data-drop="column"] { background: var(--active); }
#tasks .board-column[data-drop="column"] { outline: 2px solid var(--accent); outline-offset: -2px; }
#tasks .board-cards .task-name { min-width: 0; }
#tasks .board-cards .move-task { flex: none; }
.board-add { text-align: start; }
.board-add.web-inline-add-btn { width: 100%; justify-content: flex-start; padding: .35rem .35rem; }
.tasks .filter-group { padding-block: .85rem .3rem; }
.tasks .filter-group h2 { margin: 0; font-size: 1rem; }
#saved-filters button { overflow-wrap: anywhere; }
#saved-filter-form code { overflow-wrap: anywhere; }
.tasks li { display: flex; align-items: flex-start; gap: .55rem; }
#tasks [data-task-object] { position: relative; }
#tasks [data-drop="before"]::before, #tasks [data-drop="after"]::after {
  content: ""; position: absolute; height: 2px; background: var(--accent); inset-inline: 0; pointer-events: none;
}
#tasks [data-drop="before"]::before { top: 0; }
#tasks [data-drop="after"]::after { bottom: 0; }
#tasks [data-drop="inside"] { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--active); }
.move-task { margin-inline-start: auto; padding: .2rem .45rem; color: var(--muted); cursor: grab; }
#placement-task-title { overflow-wrap: anywhere; }
.batch-toolbar { position: sticky; top: 0; z-index: 1; padding: .55rem; background: var(--panel); border: 1px solid var(--line); border-radius: .55rem; }
.section-filter { margin-block-start: .7rem; max-width: 16rem; }
#section-project-name, .section-list small { color: var(--muted); overflow-wrap: anywhere; }
.section-list { list-style: none; padding: 0; margin: 0 0 .8rem; }
.section-list:empty { display: none; }
.section-list li { border-bottom: 1px solid var(--line); padding: .55rem 0; display: grid; gap: .35rem; }
.section-list small { display: block; }
.section-list strong { overflow-wrap: anywhere; }
.section-list button { padding: .3rem .55rem; }
.batch-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.batch-task-checkbox { flex: none; width: 1.1rem; height: 1.1rem; margin-block-start: .4rem; accent-color: var(--accent); }
#tasks .selected-task { background: var(--active); }
.trash-task-label { display: grid; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.trash-task-label small { color: var(--muted); }
#projects [data-drop], #favorite-projects [data-drop], #views [data-drop] { outline: 2px solid var(--accent); background: var(--active); }
.tasks .task-name { text-align: left; background: none; border: 0; overflow-wrap: anywhere; padding: .2rem .3rem; }
.tasks small { display: block; color: var(--muted); }
.tasks .depth-1 { padding-inline-start: 1rem; }
.tasks .depth-2 { padding-inline-start: 2rem; }
.tasks .depth-3 { padding-inline-start: 3rem; }
.tasks .depth-4 { padding-inline-start: 4rem; }
#subtasks-panel { margin-top: .65rem; }
#go-parent-task { margin-bottom: .75rem; max-width: 100%; overflow-wrap: anywhere; }
#subtask-list:empty { display: none; }
#completion-history { margin-top: .65rem; }
#completion-history summary { cursor: pointer; font-weight: 650; }
.completion-events { list-style: none; padding: 0; }
.completion-events:empty { display: none; }
.completion-events li { display: flex; align-items: baseline; gap: .35rem .7rem; flex-wrap: wrap; padding: .45rem 0; }
.completion-events time, .completion-events small, #completion-empty { color: var(--muted); }
.toggle { min-width: 2.15rem; }
.account-row { display: flex; justify-content: space-between; align-items: center; gap: .65rem; flex-wrap: wrap; }
.client-release-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem 0; }
.client-release-row + .client-release-row { border-top: 1px solid var(--line); }
.account-list { margin: 1rem 0; }
#account-name { overflow-wrap: anywhere; }
@media (max-width: 42rem) {
  .workspace { grid-template-columns: 1fr; }
  aside { border-right: 0; border-bottom: 1px solid var(--line); padding: .5rem .7rem; }
  nav { display: flex; flex-wrap: wrap; }
  aside h2 { margin: .25rem 0; }
}
/* Pocodo V3.0 warm-paper & curated-skin web baseline shared with native Windows and Android themes. */
body { background-color: var(--base); letter-spacing: 0; }
a { color: var(--accent); }
button, .task-link-button {
  min-height: 1.9rem;
  padding: .34rem .58rem;
  border-color: transparent;
  border-radius: .45rem;
  background: transparent;
  color: var(--ink);
  transition: background-color 90ms ease-out, border-color 90ms ease-out, color 90ms ease-out, transform 65ms ease-out;
}
button:hover:not(:disabled), .task-link-button:hover { background: var(--hover); }
input, textarea, select {
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--field);
  padding: .5rem .65rem;
}
input:focus, textarea:focus, select:focus { border-color: var(--border-focus); outline: none; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 2px; }
nav button[aria-current="page"], nav button[aria-pressed="true"] { color: var(--ink); background: var(--active); }
.primary { color: var(--brand-fg); background: var(--accent); border-color: var(--accent); font-weight: 500; }
.primary:hover:not(:disabled) { background: var(--accent-hover, var(--accent)); filter: none; }
.top {
  min-height: 3.75rem;
  padding: .5rem clamp(.75rem, 2.5vw, 1.75rem);
  background: var(--base);
  border-bottom-color: var(--line);
}
.brand { gap: .55rem; font-weight: 650; }
.brand span {
  width: 1.8rem;
  height: 1.8rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: var(--accent);
  border-radius: .42rem;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1;
}
.top-controls { gap: .2rem; }
#account { gap: .05rem; }
#account-name { padding-inline: .45rem; color: var(--muted); }
.workspace {
  grid-template-columns: 16.5rem minmax(0, 1fr);
  min-height: calc(100vh - 3.75rem);
}
aside {
  position: sticky;
  top: 3.75rem;
  align-self: start;
  height: calc(100vh - 3.75rem);
  overflow: auto;
  padding: .7rem .65rem 1.5rem;
  background: var(--panel);
  border-right-color: var(--line);
}
aside h2, .project-heading h2 {
  margin: 1.25rem .55rem .45rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
}
nav { gap: .08rem; }
nav button {
  min-height: 2.35rem;
  padding: .48rem .62rem;
  border-radius: .42rem;
  color: var(--ink);
}
#views { margin-bottom: .4rem; }
#views button[aria-current] { font-weight: 650; }
.project-heading { margin-top: .9rem; }
.project-heading button { min-height: 1.75rem; padding: .25rem .48rem; color: var(--muted); }
#project-sidebar-controls, aside > button { width: 100%; text-align: left; color: var(--muted); }
aside > button { margin-block-start: .15rem; }
aside > button:hover { color: var(--ink); }
.content {
  width: min(100%, 62rem);
  margin-inline: auto;
  padding: 1.35rem clamp(1.25rem, 3.5vw, 2.75rem) 6rem;
}
.heading { min-height: 2.7rem; gap: .5rem; }
h1 { font-size: clamp(1.35rem, 2.2vw, 1.62rem); font-weight: 600; letter-spacing: -.015em; }
.heading .toolbar { gap: .25rem; }
.heading .toolbar button { color: var(--muted); }
.heading .toolbar button:hover { color: var(--ink); }
#new-task { min-height: 1.95rem; padding-inline: .72rem; color: var(--brand-fg); }
#new-task::before { content: "+"; margin-inline-end: .3rem; font-size: 1.05rem; line-height: 0; }
#sync-status { margin: .15rem 0 .8rem; color: var(--muted); font-size: .78rem; }
#sync-status:not(:empty)::before {
  content: "";
  width: .42rem;
  height: .42rem;
  display: inline-block;
  margin-inline-end: .4rem;
  background: var(--today);
  border-radius: 50%;
  vertical-align: .06em;
}
.panel {
  background: var(--raised);
  border-color: var(--line);
  border-radius: .75rem;
  box-shadow: 0 2px 10px #00000012;
}
dialog {
  background: var(--raised);
  border-color: var(--line);
  border-radius: .75rem;
  box-shadow: var(--shadow);
}
dialog::backdrop { background: #101010b8; }
.tasks { margin: .35rem 0 1.5rem; }
.tasks > li { padding: .58rem .45rem; border-bottom-color: var(--line); }
.tasks > li.task-row {
  gap: .62rem;
  padding: .5rem .45rem;
  border-bottom: 1px solid var(--line);
  border-radius: .4rem;
  transition: background-color .12s ease;
}
.tasks > li.task-row:hover, .tasks > li.task-row:focus-within { background: var(--hover); }
.tasks > li.task-row.depth-1 { padding-inline-start: 1.5rem; }
.tasks > li.task-row.depth-2 { padding-inline-start: 2.5rem; }
.tasks > li.task-row.depth-3 { padding-inline-start: 3.5rem; }
.tasks > li.task-row.depth-4 { padding-inline-start: 4.5rem; }
.task-row .toggle {
  flex: none;
  width: 1.24rem;
  height: 1.24rem;
  min-width: 1.24rem;
  min-height: 0;
  margin-block-start: .08rem;
  padding: 0;
  color: transparent;
  background: transparent;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  font-size: .72rem;
  line-height: 1;
}
.task-row .toggle:hover {
  color: var(--accent);
  background: var(--active);
  border-color: var(--accent);
}
.task-row[data-priority="1"] .toggle,
.web-inline-subtask-row[data-priority="1"] .toggle {
  border-color: var(--p1);
  border-width: 1.7px;
  background: color-mix(in srgb, var(--p1) 12%, transparent);
}
.task-row[data-priority="2"] .toggle,
.web-inline-subtask-row[data-priority="2"] .toggle {
  border-color: var(--p2);
  border-width: 1.7px;
  background: color-mix(in srgb, var(--p2) 12%, transparent);
}
.task-row[data-priority="3"] .toggle,
.web-inline-subtask-row[data-priority="3"] .toggle {
  border-color: var(--p3);
  border-width: 1.7px;
  background: color-mix(in srgb, var(--p3) 12%, transparent);
}
.subtask-collapse-btn {
  align-self: flex-start;
  margin-inline-start: .25rem;
  padding: .15rem .45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--muted);
  font-size: .74rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}
.subtask-collapse-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.web-inline-subtasks {
  list-style: none;
  margin: .35rem 0 .1rem .1rem;
  padding: .15rem 0 .15rem .65rem;
  border-inline-start: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.web-inline-subtask-row {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.web-inline-subtask-row .toggle {
  width: 1rem;
  height: 1rem;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  color: transparent;
  background: transparent;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  font-size: .7rem;
  line-height: 1;
}
.web-inline-subtask-row.task-done .toggle {
  color: var(--brand-fg);
  background: var(--accent);
  border-color: var(--accent);
}
.web-inline-subtask-name {
  border: 0;
  background: transparent;
  padding: .05rem .15rem;
  text-align: start;
  color: var(--ink);
  font-size: .86rem;
  cursor: pointer;
}
.web-inline-subtask-row.task-done .web-inline-subtask-name {
  text-decoration: line-through;
  color: var(--muted);
}
.task-row.task-done { opacity: .66; }
.task-row.task-done .toggle { color: var(--brand-fg); background: var(--accent); border-color: var(--accent); }
.task-row .task-name {
  min-width: 0;
  padding: .03rem .05rem;
  border: 0;
  background: transparent;
  text-align: start;
  font-weight: 450;
  line-height: 1.35;
}
.task-row .task-name:hover { background: transparent; }
.task-meta {
  margin-block-start: .16rem;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 400;
}
#tasks.compact-density > li.task-row {
  gap: .45rem;
  padding-block: .25rem;
}
#tasks.compact-density .task-row .toggle { width: 1.08rem; height: 1.08rem; min-width: 1.08rem; }
#tasks.compact-density .task-row .task-name { font-size: .91rem; line-height: 1.25; }
#tasks.compact-density .task-meta { margin-block-start: .08rem; font-size: .69rem; }
#tasks.compact-density .task-row .move-task { width: 1.4rem; min-height: 1.4rem; }.task-row .move-task {
  width: 1.6rem;
  min-height: 1.6rem;
  margin-block-start: -.05rem;
  padding: 0;
  color: var(--muted);
  opacity: 0;
  transition: opacity .12s ease;
}
.task-row:hover .move-task, .task-row:focus-within .move-task { opacity: 1; }
.tasks li.filter-group {
  padding: 1rem .45rem .35rem;
  border-bottom: 0;
}
.tasks li.filter-group h2 { color: var(--ink); font-size: .92rem; font-weight: 650; }
.task-action-feedback { background: var(--raised); border-color: var(--line); box-shadow: var(--shadow); }
.calendar-days { border-color: var(--line); border-radius: .55rem; }
.calendar-cell { background: var(--raised); }
.calendar-cell.calendar-adjacent { background: var(--panel); }
#tasks .board-column, .batch-toolbar, .task-table-scroll { background: var(--raised); border-color: var(--line); }
.schedule-presets, .repeat-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem;
  margin-block: .1rem;
}
.schedule-presets > span, .repeat-presets > span {
  margin-inline-end: .15rem;
  color: var(--muted);
  font-size: .78rem;
}
.schedule-presets button, .repeat-presets button {
  min-height: 1.75rem;
  padding: .22rem .55rem;
  border: 0;
  border-radius: .4rem;
  background: var(--field);
  color: var(--muted);
  font-size: .78rem;
}
.schedule-presets button[aria-pressed="true"], .repeat-presets button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--active);
  font-weight: 600;
}.view-heading { display: flex; flex-direction: column; align-items: flex-start; gap: .08rem; min-width: 0; }
.view-count { color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; }
.empty-state {
  display: grid;
  place-items: center;
  gap: .3rem;
  padding: clamp(2.5rem, 8vw, 5.5rem) 1rem;
  text-align: center;
}
.empty-illustration {
  width: min(11rem, 56vw);
  height: auto;
  margin-bottom: .45rem;
}
.empty-card { fill: var(--field); }
.empty-check { fill: var(--accent); opacity: .18; }
.empty-check-soft { fill: var(--line); }
.empty-check-mark { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.empty-line { fill: var(--muted); opacity: .7; }
.empty-line-soft { fill: var(--muted); opacity: .28; }
.empty-spark { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; opacity: .8; }
.empty-state h2 { margin: .25rem 0 0; font-size: 1.05rem; font-weight: 650; }
.empty-state #empty { margin: 0 0 .6rem; max-width: 22rem; }.editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 34;
  background: #000000a6;
  backdrop-filter: blur(2px);
}
.editor-main { min-width: 0; }
.editor-properties { display: grid; gap: .55rem; align-content: start; min-width: 0; }
#editor.task-detail {
  position: fixed;
  z-index: 35;
  top: 4.35rem;
  bottom: 1.5rem;
  left: 50%;
  width: min(calc(100vw - 2rem), 54rem);
  max-height: calc(100vh - 5.85rem);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(17rem, .8fr);
  gap: 1rem 1.35rem;
  overflow: auto;
  padding: 1.2rem 1.25rem;
  transform: translateX(-50%);
  box-shadow: var(--shadow);
}
#editor.task-detail .editor-main { grid-column: 1; }
#editor.task-detail .editor-properties {
  grid-column: 2;
  padding-inline-start: 1.15rem;
  border-inline-start: 1px solid var(--line);
}
#editor.task-detail .editor-actions {
  grid-column: 1 / -1;
  position: sticky;
  bottom: -1.2rem;
  padding-top: .75rem;
  border-top: 1px solid var(--line);
  background: var(--raised);
}
#editor.task-detail .editor-title-field { margin-bottom: .65rem; }
#editor.task-detail .editor-title-field input { font-size: 1.1rem; font-weight: 600; }
#editor.task-detail .editor-main textarea { min-height: 9rem; }
#editor.task-detail .editor-properties .fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
#editor.task-detail .editor-properties .reminder-editor { margin-bottom: .35rem; }
#editor.task-detail .editor-properties .label-editor { align-items: stretch; }
.editor-top-controls {
  position: absolute;
  z-index: 1;
  top: .55rem;
  right: .6rem;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.editor-nav-btn,
.editor-close {
  width: 2rem;
  min-height: 2rem;
  padding: 0;
  border-radius: 50%;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
}
.editor-close {
  font-size: 1.35rem;
}
.editor-nav-btn:disabled {
  opacity: .35;
  cursor: default;
}
body.task-detail-open { overflow: hidden; }
body.task-detail-open #subtasks-panel {
  position: fixed;
  z-index: 36;
  top: calc(4.35rem + 18rem);
  left: calc(50% - 27rem + 1.25rem);
  width: min(29rem, calc(50vw - 2rem));
  max-height: calc(100vh - 25.5rem);
  overflow: auto;
  margin: 0;
  padding: .75rem 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
body.task-detail-open #subtasks-panel h2 { margin: 0 0 .45rem; font-size: .88rem; color: var(--muted); }
body.task-detail-open #subtasks-panel .tasks { margin: .2rem 0 .65rem; }
body.task-detail-open #subtasks-panel .tasks li { padding: .35rem .3rem; }
body.task-detail-open #subtasks-panel #subtask-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .35rem; }
body.task-detail-open #subtasks-panel #subtask-form label { margin: 0; }
body.task-detail-open #subtasks-panel #go-parent-task { margin-bottom: .45rem; }#editor.quick-add { padding: .85rem; }
#editor.quick-add .editor-title-field {
  gap: 0;
  margin-bottom: .3rem;
  font-size: 0;
}
#editor.quick-add .editor-title-field input {
  padding: .42rem .15rem;
  border-color: transparent;
  background: transparent;
  font-size: 1.02rem;
  font-weight: 520;
}
#editor.quick-add .editor-title-field input:focus { border-color: transparent; }
#editor.quick-add .editor-title-field input::placeholder { color: var(--muted); opacity: .5; }
.quick-title-shell { position: relative; display: block; min-width: 0; overflow: hidden; }
.quick-title-preview {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: max-content;
  min-width: 100%;
  padding: .42rem .15rem;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 520;
  line-height: 1.5;
  white-space: pre;
  pointer-events: none;
  overflow: hidden;
}
#editor:not(.quick-add) .quick-title-preview { display: none; }
#editor.quick-add .editor-title-field input { grid-area: auto; position: relative; z-index: 1; width: 100%; line-height: 1.5; }
#editor.quick-add .editor-title-field input.quick-title-mirrored { color: transparent; caret-color: var(--ink); }
#editor.quick-add .editor-title-field input.quick-title-mirrored::selection { color: transparent; background: color-mix(in srgb, var(--accent) 32%, transparent); }
.quick-title-plan { color: var(--coral); background: color-mix(in srgb, var(--coral) 13%, transparent); border-radius: 4px; font-weight: 500; }
.quick-title-token { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 4px; font-weight: 600; }
.quick-title-p1 { color: var(--p1); background: color-mix(in srgb, var(--p1) 16%, transparent); border-radius: 4px; font-weight: 600; }
.quick-title-p2 { color: var(--p2); background: color-mix(in srgb, var(--p2) 16%, transparent); border-radius: 4px; font-weight: 600; }
.quick-title-p3 { color: var(--p3); background: color-mix(in srgb, var(--p3) 16%, transparent); border-radius: 4px; font-weight: 600; }
.quick-title-p4 { color: var(--muted); background: rgba(128, 128, 128, 0.14); border-radius: 4px; font-weight: 500; }
#editor.quick-add .fields > label[data-priority="1"] { background: color-mix(in srgb, var(--p1) 14%, transparent); border: 1px solid color-mix(in srgb, var(--p1) 42%, transparent); color: var(--p1); font-weight: 600; }
#editor.quick-add .fields > label[data-priority="1"] select { color: var(--p1); font-weight: 600; }
#editor.quick-add .fields > label[data-priority="2"] { background: color-mix(in srgb, var(--p2) 14%, transparent); border: 1px solid color-mix(in srgb, var(--p2) 42%, transparent); color: var(--p2); font-weight: 600; }
#editor.quick-add .fields > label[data-priority="2"] select { color: var(--p2); font-weight: 600; }
#editor.quick-add .fields > label[data-priority="3"] { background: color-mix(in srgb, var(--p3) 14%, transparent); border: 1px solid color-mix(in srgb, var(--p3) 42%, transparent); color: var(--p3); font-weight: 600; }
#editor.quick-add .fields > label[data-priority="3"] select { color: var(--p3); font-weight: 600; }
#editor.quick-add #quick-capture-properties > .field-note { display: none; }
#editor.quick-add .fields { gap: .3rem; margin-block-start: .25rem; }
#editor.quick-add .fields > label:not(.editor-detail) {
  flex: 0 1 auto;
  width: auto;
  display: flex;
  align-items: center;
  gap: .3rem;
  margin: 0;
  padding: .25rem .55rem;
  background: var(--field);
  border-radius: .45rem;
  color: var(--muted);
  font-size: .8rem;
}
#editor.quick-add .fields > label:not(.editor-detail) input,
#editor.quick-add .fields > label:not(.editor-detail) select {
  width: auto;
  min-height: 0;
  padding: .05rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: .82rem;
}
#editor.quick-add .fields > label:not(.editor-detail) input[type="date"] { max-width: 8.2rem; }
#editor.quick-add .fields > label:not(.editor-detail) select { max-width: 9.5rem; }
#editor.quick-add:not(.details-open) .editor-main > .editor-detail,
#editor.quick-add:not(.details-open) .editor-properties .editor-detail { display: none; }
#editor.quick-add #editor-actions { margin-block-start: .35rem; }
#open-editor-details::before { content: "+"; margin-inline-end: .28rem; font-size: 1.05rem; line-height: 0; }
#open-editor-details[aria-expanded="true"]::before { content: "−"; }
#editor.quick-add #editor-status { color: var(--muted); font-size: .8rem; }#mobile-account-toggle, #mobile-views, #mobile-add-task, #mobile-browse-links { display: none; }
#sidebar-secondary { display: block; }
@media (max-width: 42rem) {
  :root { font-size: 15px; }
  .top { position: sticky; top: 0; z-index: 20; min-height: 3.25rem; padding: .38rem .55rem; }
  .brand { gap: .4rem; font-size: .95rem; }
  .brand span { width: 1.55rem; height: 1.55rem; font-size: 1rem; }
  .top-controls { flex-wrap: nowrap; gap: .2rem; overflow: visible; }
  #workspace-theme { min-height: 1.8rem; padding: .28rem .35rem; font-size: .78rem; }
  #mobile-account-toggle {
    display: inline-flex;
    min-height: 1.8rem;
    padding: .3rem .48rem;
    color: var(--muted);
    font-size: .78rem;
  }
  #account {
    position: fixed;
    z-index: 40;
    top: 3.25rem;
    right: .55rem;
    left: auto;
    width: min(18rem, calc(100vw - 1.1rem));
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: .08rem;
    padding: .55rem;
    background: var(--raised);
    border: 1px solid var(--line);
    border-radius: .65rem;
    box-shadow: var(--shadow);
  }
  body.mobile-account-open #account { display: flex; }
  #account-name { padding: .35rem .55rem .45rem; color: var(--muted); font-size: .82rem; }
  #account button { width: 100%; justify-content: flex-start; text-align: left; }
  .workspace { display: block; min-height: calc(100vh - 3.25rem); }
  aside {
    position: static;
    height: auto;
    overflow: visible;
    padding: 0;
    background: transparent;
    border: 0;
  }
  #views { display: none; }
  #sidebar-secondary {
    position: fixed;
    inset: 3.25rem 0 calc(4.25rem + env(safe-area-inset-bottom));
    z-index: 25;
    display: block;
    overflow: auto;
    padding: .45rem .7rem 1.25rem;
    background: var(--panel);
    border-top: 1px solid var(--line);
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-100%);
    transition: transform .16s ease;
  }
  body.mobile-browse-open #sidebar-secondary {
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  #mobile-browse-links {
    display: grid;
    gap: .12rem;
    margin-block-start: 1.2rem;
    padding-block-start: .75rem;
    border-top: 1px solid var(--line);
  }
  #mobile-browse-links button { width: 100%; color: var(--muted); text-align: left; }
  #mobile-views {
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    height: calc(4.1rem + env(safe-area-inset-bottom));
    padding: .35rem .2rem env(safe-area-inset-bottom);
    background: var(--panel);
    border-top: 1px solid var(--line);
  }
  #mobile-views button {
    justify-content: center;
    min-width: 0;
    min-height: 3.2rem;
    padding: .3rem .12rem;
    color: var(--muted);
    font-size: .76rem;
    text-align: center;
  }
  #mobile-views button[aria-current] { color: var(--accent); background: var(--active); }
  #mobile-add-task {
    position: fixed;
    right: 1rem;
    bottom: calc(5.15rem + env(safe-area-inset-bottom));
    z-index: 31;
    width: 3.4rem;
    height: 3.4rem;
    display: grid;
    place-items: center;
    padding: 0 0 .22rem;
    border: 0;
    border-radius: .75rem;
    background: var(--accent);
    box-shadow: 0 8px 22px #00000042;
    color: #fff;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
  }
  #workspace:has(#editor:not([hidden])) #mobile-add-task { display: none; }
  .content { width: 100%; padding: .9rem .75rem 5.4rem; }
  .heading { align-items: flex-start; }
  h1 { font-size: 1.42rem; }
  .heading .toolbar {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: .05rem;
    overflow-x: auto;
    padding-block-end: .15rem;
    scrollbar-width: none;
  }
  .heading .toolbar::-webkit-scrollbar { display: none; }
  .heading .toolbar button { flex: none; padding-inline: .4rem; font-size: .8rem; }
  #editor.task-detail {
    inset: 0;
    width: 100%;
    max-height: none;
    height: 100dvh;
    display: block;
    padding: .9rem .8rem 5.5rem;
    border: 0;
    border-radius: 0;
    transform: none;
  }
  #editor.task-detail .editor-properties {
    margin-block-start: 1rem;
    padding-inline-start: 0;
    border-inline-start: 0;
  }
  #editor.task-detail .editor-properties .fields { grid-template-columns: 1fr; }
  #editor.task-detail .editor-actions {
    position: sticky;
    bottom: -5.5rem;
    margin-inline: -.8rem;
    padding: .75rem .8rem calc(.75rem + env(safe-area-inset-bottom));
  }
  .editor-close { position: fixed; top: .65rem; right: .7rem; background: var(--field); }
  body.task-detail-open #subtasks-panel {
    inset: auto .8rem calc(4.55rem + env(safe-area-inset-bottom));
    width: auto;
    max-height: 32vh;
    padding: .75rem;
    background: var(--raised);
    border: 1px solid var(--line);
    border-radius: .75rem;
    box-shadow: var(--shadow);
  }
  body.task-detail-open #subtasks-panel #subtask-form { grid-template-columns: 1fr; }
  .task-row .toggle { width: 1.3rem; height: 1.3rem; min-width: 1.3rem; }
  #tasks.compact-density > li.task-row {
  gap: .45rem;
  padding-block: .25rem;
}
#tasks.compact-density .task-row .toggle { width: 1.08rem; height: 1.08rem; min-width: 1.08rem; }
#tasks.compact-density .task-row .task-name { font-size: .91rem; line-height: 1.25; }
#tasks.compact-density .task-meta { margin-block-start: .08rem; font-size: .69rem; }
#tasks.compact-density .task-row .move-task { width: 1.4rem; min-height: 1.4rem; }.task-row .move-task { opacity: 1; }
  .task-meta { font-size: .73rem; }
  .fields label { flex-basis: 100%; }
  .task-action-feedback { inset-inline: .55rem; bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
}
.productivity-badge {
  display: inline-block;
  margin-inline-start: auto;
  padding: .08rem .42rem;
  border-radius: 999px;
  background: var(--field);
  color: var(--muted);
  font-size: .74rem;
  font-weight: 600;
}
.productivity-badge.reached {
  background: #29943829;
  color: #3db34d;
}
.productivity-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: .65rem;
  margin-block: .75rem 1rem;
}
.productivity-card {
  padding: .75rem .9rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--field);
}
.productivity-card strong { display: block; font-size: 1.15rem; margin-block-start: .2rem; }
.productivity-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin-block-end: 1rem;
}
.productivity-bars {
  display: flex;
  align-items: flex-end;
  gap: .45rem;
  height: 8.5rem;
  padding-top: 1.2rem;
}
.productivity-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: .25rem;
  height: 100%;
}
.productivity-bar {
  width: 100%;
  max-width: 1.8rem;
  min-height: 3px;
  border-radius: .25rem;
  background: var(--accent);
}
.productivity-bar.reached { background: #299438; }
.productivity-bar.empty { background: var(--line); }
.productivity-achievements {
  padding: .75rem .9rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--field);
  margin-block-end: 1rem;
}
.productivity-days-off {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  padding: .5rem .75rem;
  margin-block: .6rem;
}
.md-link { color: var(--accent); text-decoration: underline; }
.md-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  padding: .05rem .3rem;
  border-radius: .25rem;
  background: var(--field);
}
.subtask-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.subtask-progress-row {
  margin-block: .25rem .6rem;
}
.subtask-progress-row progress {
  width: 100%;
  height: .45rem;
  accent-color: var(--accent);
}
.project-description-banner {
  margin-block: .25rem .75rem;
  padding: .55rem .85rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--field);
  color: var(--muted);
  font-size: .92rem;
  cursor: pointer;
}
.focus-timer-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: 1.25rem 0;
}
.focus-timer-display strong {
  font-size: 2.6rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}
.task-reference-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  color: var(--muted);
  font-size: 1.15rem;
  flex: none;
  user-select: none;
}
.calendar-week-mode {
  grid-template-columns: repeat(7, minmax(8.5rem, 1fr));
  overflow-x: auto;
}
.calendar-week-mode .calendar-cell {
  min-height: 15rem;
  align-content: start;
}
.calendar-day-duration {
  display: inline-block;
  font-size: .74rem;
  color: var(--accent);
  margin: 0 .15rem .25rem;
}
.calendar-task.calendar-future-occurrence {
  border-style: dashed;
  opacity: .8;
  background: transparent;
}
.md-mention {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  padding: .04rem .28rem;
  border-radius: 5px;
  font-weight: 600;
}
.mention-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .25rem 0 .4rem;
}
.mention-suggestions button {
  padding: .2rem .55rem;
  font-size: .82rem;
  border-radius: 999px;
}
.task-row:hover {
  background: color-mix(in srgb, var(--ink) 3.5%, transparent);
  border-radius: 8px;
}
.task-row[data-priority="1"] .toggle:hover { color: #d1453b; background: rgba(209, 69, 59, 0.22); border-color: #d1453b; }
.task-row[data-priority="2"] .toggle:hover { color: #eb8909; background: rgba(235, 137, 9, 0.22); border-color: #eb8909; }
.task-row[data-priority="3"] .toggle:hover { color: #246fe0; background: rgba(36, 111, 224, 0.22); border-color: #246fe0; }
.meta-date-overdue { color: #d1453b; font-weight: 600; }
.meta-date-today { color: #058527; font-weight: 600; }
.meta-date-tomorrow { color: #ad6200; font-weight: 500; }
.meta-date-week { color: #692fc2; }
.meta-priority-p1 { color: #d1453b; font-weight: 600; }
.meta-priority-p2 { color: #eb8909; font-weight: 600; }
.meta-priority-p3 { color: #246fe0; font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .meta-date-today { color: #25b84c; }
  .meta-date-tomorrow { color: #f5a623; }
  .meta-date-week { color: #a970ff; }
}
.row-edit-btn,
.row-tomorrow-btn,
.row-focus-btn {
  padding: .2rem .45rem;
  font-size: .84rem;
  opacity: .72;
  transition: opacity 90ms ease;
}
@media (hover: hover) {
  .task-row .row-edit-btn,
  .task-row .row-tomorrow-btn,
  .task-row .row-focus-btn,
  .task-row .move-task {
    opacity: 0;
  }
  .task-row:hover .row-edit-btn,
  .task-row:hover .row-tomorrow-btn,
  .task-row:hover .row-focus-btn,
  .task-row:hover .move-task,
  .task-row:focus-within .row-edit-btn,
  .task-row:focus-within .row-tomorrow-btn,
  .task-row:focus-within .row-focus-btn,
  .task-row:focus-within .move-task {
    opacity: 1;
  }
}
.row-edit-btn:hover,
.row-edit-btn:focus-visible,
.row-tomorrow-btn:hover,
.row-tomorrow-btn:focus-visible,
.row-focus-btn:hover,
.row-focus-btn:focus-visible {
  opacity: 1;
}
.web-inline-edit-row {
  padding: .25rem 0;
}
.web-inline-edit-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .55rem .7rem;
  border: 1.5px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  border-radius: 10px;
  background: var(--panel);
}
.web-inline-edit-title {
  border: 0;
  background: transparent;
  font-size: .95rem;
  font-weight: 500;
  padding: .15rem 0;
  color: var(--ink);
}
.web-inline-edit-desc {
  border: 0;
  background: transparent;
  font-size: .82rem;
  padding: .1rem 0;
  color: var(--muted);
}
.web-inline-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: .4rem;
  padding-top: .35rem;
  border-top: 1px solid var(--line);
}
.web-inline-subtask-form {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-top: .2rem;
}
.web-inline-subtask-form input {
  flex: 1;
  min-width: 0;
  padding: .22rem .5rem;
  font-size: .82rem;
  border-radius: 6px;
}
.web-inline-subtask-form button {
  padding: .2rem .55rem;
  font-size: .78rem;
}
.task-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.task-row-main > .task-name {
  width: 100%;
}
.task-row-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .28rem;
  margin-block-start: .22rem;
}
.task-label-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: .08rem .48rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: .74rem;
  font-weight: 500;
  line-height: 1.2;
}
.task-label-pill:hover:not(:disabled),
.task-label-pill:focus-visible {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}
.task-label-more {
  color: var(--muted);
  font-size: .72rem;
  padding-inline: .15rem;
}
#tasks.compact-density .task-row-labels {
  margin-block-start: .1rem;
  gap: .2rem;
}
#tasks.compact-density .task-label-pill {
  min-height: 1.15rem;
  padding: .03rem .38rem;
  font-size: .7rem;
}
.project-progress-strip {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-block: .15rem .55rem;
  font-size: .78rem;
  color: var(--muted);
}
.project-progress-strip progress {
  flex: 1;
  height: .38rem;
  accent-color: var(--accent);
}
.search-facets {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-block: .45rem .35rem;
}
.search-facet-chip {
  min-height: 1.65rem;
  padding: .15rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  font-size: .78rem;
}
.search-facet-chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-weight: 600;
}
.daily-review-budget {
  margin-block: .35rem .65rem;
  padding: .55rem .75rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--field);
}
.daily-review-budget-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .45rem;
}
.daily-review-budget progress {
  width: 100%;
  height: .42rem;
  margin-top: .35rem;
  accent-color: var(--accent);
}
.daily-review-budget.overloaded {
  border-color: color-mix(in srgb, #dc4c3e 55%, var(--line));
}
.daily-review-budget.overloaded progress {
  accent-color: #dc4c3e;
}
.daily-review-budget.overloaded #daily-review-budget-status {
  color: #dc4c3e;
  font-weight: 600;
}
.productivity-breakdown {
  padding: .75rem .9rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--field);
  margin-block-end: 1rem;
}
.productivity-breakdown h3 {
  margin: 0 0 .55rem;
}
.project-breakdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.project-breakdown-row {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.project-breakdown-meta {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  font-size: .84rem;
}
.project-breakdown-bar-track {
  width: 100%;
  height: .42rem;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.project-breakdown-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}
.filter-syntax-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .32rem;
  margin-block: .35rem .45rem;
}
.filter-syntax-chip {
  min-height: 1.55rem;
  padding: .1rem .52rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .75rem;
}
.filter-syntax-chip:hover:not(:disabled),
.filter-syntax-chip:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
.calendar-window-summary {
  margin: .2rem 0 .45rem;
  font-size: .82rem;
}
.calendar-window-summary.overloaded {
  color: #dc4c3e;
  font-weight: 600;
}
.calendar-day-budget {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  margin: 0 .15rem .3rem;
}
.calendar-day-budget progress {
  width: 100%;
  height: .28rem;
  accent-color: var(--accent);
}
.calendar-day-budget.overloaded .calendar-day-duration {
  color: #dc4c3e;
  font-weight: 600;
}
.calendar-day-budget.overloaded progress {
  accent-color: #dc4c3e;
}
.calendar-cell.calendar-day-overloaded {
  border-color: color-mix(in srgb, #dc4c3e 55%, var(--line));
}
#views button[data-view] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
}
.nav-count {
  font-size: .78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding: .04rem .38rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 55%, transparent);
}
.calendar-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .25rem;
}
.calendar-day-add {
  min-height: 1.35rem;
  min-width: 1.35rem;
  padding: 0 .28rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1;
  opacity: .75;
}
.calendar-day-add:hover:not(:disabled),
.calendar-day-add:focus-visible {
  opacity: 1;
  border-color: var(--accent);
  color: var(--accent);
  background: var(--field);
}
.daily-review-quick-add {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .55rem;
}
.daily-review-quick-add input {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.daily-review-quick-add button {
  flex: none;
}
#projects button[data-drop-project],
#favorite-projects button[data-drop-project] {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.project-nav-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.web-context-menu {
  position: fixed;
  z-index: 950;
  min-width: 14.5rem;
  max-width: 17rem;
  padding: .45rem;
  border-radius: .65rem;
  border: 1px solid var(--line);
  background: var(--card, var(--surface));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.web-ctx-label {
  font-size: .72rem;
  color: var(--muted);
  padding: .1rem .3rem 0;
}
.web-ctx-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  padding: .1rem .2rem .2rem;
}
.web-ctx-chip {
  min-height: 1.65rem;
  padding: .1rem .48rem;
  border-radius: .4rem;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  font-size: .78rem;
  font-weight: 500;
}
.web-ctx-chip.ctx-today { color: #058527; }
.web-ctx-chip.ctx-tomorrow { color: #ad6200; }
.web-ctx-chip.ctx-weekend { color: #246fe0; }
.web-ctx-chip.ctx-nextweek { color: #692fc2; }
.web-ctx-chip.ctx-p1 { color: #d1453b; }
.web-ctx-chip.ctx-p2 { color: #eb8909; }
.web-ctx-chip.ctx-p3 { color: #246fe0; }
.web-ctx-chip.active {
  border-color: currentColor;
  background: color-mix(in srgb, currentColor 14%, transparent);
  font-weight: 700;
}
.web-ctx-sep {
  border: none;
  border-top: 1px solid var(--line);
  margin: .2rem 0;
}
.web-ctx-item {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  min-height: 1.9rem;
  padding: .2rem .55rem;
  border: none;
  border-radius: .4rem;
  background: transparent;
  color: var(--ink);
  font-size: .85rem;
}
.web-ctx-item:hover {
  background: color-mix(in srgb, var(--line) 55%, transparent);
}
.web-ctx-danger {
  color: #d1453b;
}
.web-inline-edit-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-top: .25rem;
}
.web-inline-edit-date,
.web-inline-edit-priority,
.web-inline-edit-project,
.web-inline-edit-labels {
  min-height: 1.75rem;
  padding: .15rem .45rem;
  border-radius: .4rem;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  font-size: .82rem;
}
.web-inline-edit-labels {
  min-width: 8.5rem;
  flex: 1 1 8.5rem;
}
.web-inline-edit-date-clear {
  min-height: 1.75rem;
  min-width: 1.75rem;
  padding: 0 .35rem;
  border-radius: .4rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: .85rem;
  cursor: pointer;
}
.web-inline-edit-date-clear:hover {
  color: var(--ink);
  border-color: var(--accent);
}
.task-priority-btn {
  cursor: pointer;
  border-radius: .25rem;
  padding: 0 .2rem;
}
.task-priority-btn:hover {
  text-decoration: underline;
}
.subtask-priority-btn {
  margin-inline-start: auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: .35rem;
  font-size: .74rem;
  font-weight: 600;
  padding: .1rem .35rem;
  cursor: pointer;
}
.subtask-priority-btn.prio-1 { color: #d1453b; border-color: rgba(209, 69, 59, .45); }
.subtask-priority-btn.prio-2 { color: #eb8909; border-color: rgba(235, 137, 9, .45); }
.subtask-priority-btn.prio-3 { color: #246fe0; border-color: rgba(36, 111, 224, .45); }
.web-inline-subtask-date {
  margin-inline-start: auto;
  font-size: .75rem;
  color: var(--muted);
  white-space: nowrap;
}
.web-inline-add-row {
  list-style: none;
  padding: .15rem 0 .35rem;
}
.web-inline-add-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .88rem;
  padding: .3rem .4rem;
  border-radius: .45rem;
  cursor: pointer;
}
.web-inline-add-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
  transition: background .12s ease, color .12s ease;
}
.web-inline-add-btn:hover {
  color: var(--accent);
}
.web-inline-add-btn:hover .web-inline-add-plus {
  background: var(--accent);
  color: #fff;
}
.task-desc-preview {
  display: block;
  margin-top: .12rem;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.quick-title-repeat {
  color: #692fc2;
  background: rgba(105, 47, 194, .14);
  border-radius: .25rem;
  font-weight: 600;
}
.quick-title-deadline {
  color: #d1453b;
  background: rgba(209, 69, 59, .14);
  border-radius: .25rem;
  font-weight: 600;
}
.quick-time-chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .55rem;
  border: 1px solid rgba(209, 69, 59, .38);
  border-radius: 999px;
  background: rgba(209, 69, 59, .1);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}
.quick-time-chip:hover {
  background: rgba(209, 69, 59, .18);
}
.editor-desc-links {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: -.25rem;
}
.editor-desc-link-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: .18rem .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--accent);
  font-size: .78rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.editor-desc-link-chip:hover {
  border-color: var(--accent);
  text-decoration: underline;
}
.today-goal-pill {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .15rem .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
}
.today-goal-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}
.today-goal-pill.reached {
  border-color: rgba(41, 148, 56, .45);
  background: rgba(41, 148, 56, .14);
  color: #3db34d;
}
.group-collapse-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  width: 100%;
  padding: .2rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.group-collapse-btn h2 {
  margin: 0;
  font-size: .95rem;
}
.group-collapse-chevron {
  width: 1rem;
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
}
.group-collapse-count {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
}
.subtask-date-btn {
  padding: .1rem .4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .74rem;
  cursor: pointer;
  white-space: nowrap;
}
.subtask-date-btn.has-date {
  border-color: rgba(209, 69, 59, .38);
  color: var(--accent);
}
.subtask-date-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.board-section-manage-btn {
  margin-inline-start: auto;
  padding: 0 .35rem;
  border: 0;
  border-radius: .35rem;
  background: transparent;
  color: var(--muted);
  font-size: .95rem;
  cursor: pointer;
}
.board-section-manage-btn:hover {
  background: var(--field);
  color: var(--text);
}
.board-add-section-col {
  list-style: none;
  flex: 0 0 15rem;
}
.board-add-section-btn {
  width: 100%;
  padding: .65rem .85rem;
  border: 1px dashed var(--line);
  border-radius: .7rem;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.board-add-section-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.sidebar-section-toggle {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .1rem .2rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
}
.sidebar-section-toggle:hover {
  color: var(--text);
}
.task-completed-time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.completed-project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .6rem;
}
.completed-filter-chip {
  padding: .2rem .6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--muted);
  font-size: .78rem;
  cursor: pointer;
}
.completed-filter-chip:hover {
  border-color: var(--accent);
  color: var(--text);
}
.completed-filter-chip.active {
  border-color: var(--accent);
  background: rgba(209, 69, 59, .12);
  color: var(--accent);
  font-weight: 600;
}
.active-filter-expr {
  max-width: 18rem;
  padding: .12rem .5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.active-filter-expr:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.project-favorite-btn.is-favorited {
  color: #eb8909;
  border-color: rgba(235, 137, 9, .45);
}
.table-inline-add-row td {
  padding-top: .35rem;
  border-bottom: 0;
}
.project-progress-toggle {
  margin-left: auto;
  padding: .12rem .52rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
}
.project-progress-toggle:hover,
.project-progress-toggle.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(209, 69, 59, .1);
}
.daily-review-prio-btn.prio-1 { color: #d1453b; border-color: rgba(209, 69, 59, .45); font-weight: 600; }
.daily-review-prio-btn.prio-2 { color: #eb8909; border-color: rgba(235, 137, 9, .45); font-weight: 600; }
.daily-review-prio-btn.prio-3 { color: #246fe0; border-color: rgba(36, 111, 224, .45); font-weight: 600; }
.calendar-agenda-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .5rem;
}
.calendar-agenda-head h2 {
  margin: 0;
}
.project-breakdown-row.is-clickable {
  cursor: pointer;
  padding: .25rem .35rem;
  border-radius: .45rem;
}
.project-breakdown-row.is-clickable:hover,
.project-breakdown-row.is-clickable:focus-visible {
  background: color-mix(in srgb, var(--line) 45%, transparent);
}
.trash-prio-pill {
  display: inline-block;
  margin-left: .25rem;
  padding: 0 .35rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
}
.trash-prio-pill.prio-1 { color: #d1453b; background: rgba(209, 69, 59, .12); }
.trash-prio-pill.prio-2 { color: #eb8909; background: rgba(235, 137, 9, .14); }
.trash-prio-pill.prio-3 { color: #246fe0; background: rgba(36, 111, 224, .12); }
.shortcuts-search {
  width: 100%;
  margin: .25rem 0 .65rem;
}
.saved-filter-preview {
  list-style: none;
  margin: .35rem 0 .6rem;
  padding: .45rem .6rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--field);
  display: flex;
  flex-direction: column;
  gap: .28rem;
}
.saved-filter-preview-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
}
.saved-filter-preview-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.saved-filter-preview-date,
.saved-filter-preview-more {
  color: var(--muted);
  font-size: .75rem;
}
.project-insights-priorities {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .45rem 0 .25rem;
}
.project-risk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.project-risk-head h3 {
  margin: .6rem 0 .35rem;
}
.active-view-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin: 0 0 .55rem;
}
.active-view-opt-chip {
  font-size: .78rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  cursor: pointer;
}
.active-view-opt-chip:hover {
  border-color: var(--accent);
}
.active-view-opt-reset {
  font-size: .78rem;
  padding: .2rem .45rem;
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}
.attachment-thumb-preview {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: cover;
  border-radius: .45rem;
  border: 1px solid var(--line);
  cursor: zoom-in;
  flex-shrink: 0;
}
.attachment-sync-badge {
  font-size: .72rem;
  padding: .08rem .4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.calendar-timeblock-grid {
  margin-top: .5rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--panel);
  overflow-x: auto;
}
.timeblock-header-row,
.timeblock-body-row {
  display: grid;
  grid-template-columns: 3.4rem repeat(var(--tb-cols, 1), minmax(9.5rem, 1fr));
}
.timeblock-header-row {
  border-bottom: 1px solid var(--line);
  background: var(--field);
}
.timeblock-axis-head,
.timeblock-day-head {
  padding: .45rem .5rem;
  font-size: .8rem;
  font-weight: 600;
  border-left: 1px solid var(--line);
}
.timeblock-axis-head {
  border-left: none;
  color: var(--muted);
  text-align: right;
}
.timeblock-axis {
  display: flex;
  flex-direction: column;
}
.timeblock-axis-hour {
  height: 48px;
  padding: .15rem .45rem 0 0;
  font-size: .72rem;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}
.timeblock-col {
  position: relative;
  border-left: 1px solid var(--line);
  height: 864px;
}
.timeblock-slot {
  height: 48px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  box-sizing: border-box;
  cursor: pointer;
}
.timeblock-slot:hover,
.timeblock-slot[data-slot-drop] {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.timeblock-card {
  position: absolute;
  border-radius: .4rem;
  padding: .2rem .4rem;
  font-size: .76rem;
  line-height: 1.25;
  text-align: left;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, var(--panel));
  color: var(--ink);
  cursor: pointer;
  box-sizing: border-box;
}
.timeblock-card.prio-1 { border-left-color: #d1453b; }
.timeblock-card.prio-2 { border-left-color: #eb8909; }
.timeblock-card.prio-3 { border-left-color: #246fe0; }
.timeblock-card-time {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  color: var(--accent);
}
.calendar-unscheduled-panel {
  margin-top: .6rem;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--panel);
}
.calendar-unscheduled-panel h3 {
  margin: 0 0 .45rem;
  font-size: .86rem;
}
.calendar-backlog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .35rem;
  max-height: 14rem;
  overflow-y: auto;
}
.calendar-backlog-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .3rem .5rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--field);
}
.calendar-backlog-title {
  border: none;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-backlog-schedule {
  font-size: .74rem;
  padding: .18rem .5rem;
  flex-shrink: 0;
}
.productivity-heatmap {
  margin-top: .75rem;
}
.productivity-heatmap-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 13px);
  grid-auto-columns: 13px;
  gap: 3px;
  overflow-x: auto;
  padding: .4rem 0;
}
.heatmap-cell {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: var(--field);
}
.heatmap-cell.is-future {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
}
.heatmap-cell[data-level="1"] { background: #9be9a8; }
.heatmap-cell[data-level="2"] { background: #40c463; }
.heatmap-cell[data-level="3"] { background: #30a14e; }
.heatmap-cell[data-level="4"] { background: #216e39; }
[data-theme="dark"] .heatmap-cell[data-level="1"] { background: #0e4429; }
[data-theme="dark"] .heatmap-cell[data-level="2"] { background: #006d32; }
[data-theme="dark"] .heatmap-cell[data-level="3"] { background: #26a641; }
[data-theme="dark"] .heatmap-cell[data-level="4"] { background: #39d353; }
.habit-streak-list {
  list-style: none;
  margin: .4rem 0 0;
  padding: 0;
  display: grid;
  gap: .35rem;
}
.habit-streak-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .84rem;
}
.habit-streak-pill,
.task-streak-badge {
  display: inline-flex;
  align-items: center;
  padding: .08rem .42rem;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 600;
  background: rgba(235, 137, 9, .15);
  color: #d97706;
}
[data-theme="dark"] .habit-streak-pill,
[data-theme="dark"] .task-streak-badge {
  color: #ffb74d;
}
.filter-starter-presets {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .35rem 0 .25rem;
}
#weekly-review-dialog {
  width: min(40rem, 94vw);
}
.weekly-review-section {
  margin-top: .75rem;
}
.weekly-review-stale-list {
  list-style: none;
  margin: .4rem 0 0;
  padding: 0;
  display: grid;
  gap: .35rem;
}
.weekly-review-stale-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .35rem .55rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--field);
  font-size: .84rem;
}
#eisenhower-dialog {
  width: min(56rem, 96vw);
}
.eisenhower-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin-top: .5rem;
}
@media (max-width: 680px) {
  .eisenhower-grid {
    grid-template-columns: 1fr;
  }
}
.eisenhower-quadrant {
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--field);
  min-height: 11rem;
  max-height: 16rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.eisenhower-quadrant[data-quad-drop] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent);
}
.eisenhower-quad-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .45rem .65rem;
  border-bottom: 1px solid var(--line);
}
.eisenhower-quad-head h3 {
  margin: 0;
  font-size: .82rem;
}
.eisenhower-quadrant.q1 .eisenhower-quad-head { color: #d1453b; }
.eisenhower-quadrant.q2 .eisenhower-quad-head { color: #eb8909; }
.eisenhower-quadrant.q3 .eisenhower-quad-head { color: #246fe0; }
.eisenhower-task-list {
  list-style: none;
  margin: 0;
  padding: .4rem .5rem;
  display: grid;
  gap: .3rem;
  overflow-y: auto;
}
.eisenhower-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  padding: .25rem .45rem;
  border-radius: .4rem;
  border: 1px solid var(--line);
  background: var(--panel);
}
.eisenhower-task-title {
  border: none;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.focus-phase-badge {
  display: inline-flex;
  align-items: center;
  padding: .18rem .65rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.focus-phase-badge[data-phase="shortBreak"] {
  background: rgba(13, 148, 136, .16);
  color: #0f766e;
}
.focus-phase-badge[data-phase="longBreak"] {
  background: rgba(79, 70, 229, .16);
  color: #4338ca;
}
.focus-task-total {
  margin: 0 0 .35rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
}
.focus-cycle-toolbar {
  justify-content: center;
  align-items: center;
  gap: .75rem;
}
.focus-auto-cycle-label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .84rem;
  cursor: pointer;
}
.task-focus-badge {
  display: inline-flex;
  align-items: center;
  padding: .05rem .38rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: .74rem;
  font-weight: 700;
}
.productivity-task-focus {
  margin-top: .75rem;
}
.task-focus-list {
  list-style: none;
  margin: .35rem 0 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}
.task-focus-rank-meta {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  font-size: .84rem;
  margin-bottom: .2rem;
}
.task-blocked-badge {
  display: inline-flex;
  align-items: center;
  padding: .05rem .4rem;
  border-radius: 999px;
  background: rgba(235, 137, 9, .15);
  color: #b45309;
  font-size: .74rem;
  font-weight: 700;
}
.editor-blockers-list {
  list-style: none;
  margin: .35rem 0 .5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.editor-blocker-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .18rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--field);
  font-size: .82rem;
}
.editor-blocker-chip.is-done span {
  text-decoration: line-through;
  color: var(--muted);
}
.gantt-grid {
  display: grid;
  gap: .35rem;
  margin-top: .5rem;
  max-height: 24rem;
  overflow-y: auto;
}
.gantt-row {
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) 1fr;
  align-items: center;
  gap: .5rem;
  padding: .25rem .4rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--field);
}
.gantt-row-label {
  display: flex;
  align-items: center;
  gap: .25rem;
  min-width: 0;
}
.gantt-track {
  position: relative;
  height: 1.55rem;
  border-radius: .35rem;
  background: var(--panel);
  overflow: hidden;
}
.gantt-bar {
  position: absolute;
  top: .18rem;
  height: 1.18rem;
  border-radius: .3rem;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 0 .35rem;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
}
.gantt-bar.is-overdue {
  background: #d1453b;
}
.gantt-bar.is-blocked {
  background: #eb8909;
}
.gantt-unscheduled {
  margin-top: .6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
}
.editor-dep-jump {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline dotted transparent;
}
.editor-dep-jump:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
.briefing-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
  margin: .5rem 0 .75rem;
}
.briefing-kpi {
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--field);
  padding: .45rem .6rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.briefing-kpi small {
  color: var(--muted);
  font-size: .75rem;
}
.briefing-kpi strong {
  font-size: 1.05rem;
}
.briefing-section {
  margin-top: .7rem;
}
.briefing-list {
  list-style: none;
  margin: .3rem 0 0;
  padding: 0;
  display: grid;
  gap: .35rem;
}
.briefing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .45rem;
  padding: .3rem .5rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--field);
}
.today-workload-pill {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
}
.today-workload-pill.overloaded {
  border-color: rgba(209, 69, 59, 0.45);
  background: rgba(209, 69, 59, 0.14);
  color: #d1453b;
}
.briefing-overload-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .5rem .75rem;
  border-radius: .5rem;
  border: 1px solid rgba(209, 69, 59, 0.35);
  background: rgba(209, 69, 59, 0.1);
  color: #d1453b;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: .6rem;
}
.workload-budget-bar {
  flex-wrap: wrap;
  gap: .4rem;
  margin: .4rem 0 .65rem;
}
.workload-budget-bar button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}
.workload-status-banner {
  border: 1px solid rgba(46, 125, 50, 0.35);
  background: rgba(46, 125, 50, 0.1);
  border-radius: .6rem;
  padding: .65rem .8rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: flex-start;
}
.workload-status-banner.overloaded {
  border-color: rgba(209, 69, 59, 0.4);
  background: rgba(209, 69, 59, 0.1);
  color: #d1453b;
}
.workload-status-banner p {
  margin: 0;
  font-weight: 600;
}
.workload-7day-bars {
  display: grid;
  gap: .45rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--field);
  padding: .65rem .75rem;
}
.workload-day-row {
  display: grid;
  grid-template-columns: 96px 1fr 105px;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
}
.workload-bar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.workload-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}
.workload-bar-fill.heavy {
  background: #d97706;
}
.workload-bar-fill.overloaded {
  background: #d1453b;
}
.workload-suggestion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--field);
  padding: .45rem .65rem;
  font-size: .86rem;
}
.task-milestone-badge {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  padding: .08rem .45rem;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.14);
  color: #7c3aed;
  font-size: .74rem;
  font-weight: 700;
}
.editor-milestone-toggle[aria-pressed="true"] {
  border-color: rgba(124, 58, 237, 0.5);
  background: rgba(124, 58, 237, 0.14);
  color: #7c3aed;
  font-weight: 700;
}
.gantt-milestone-filter-label {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .82rem;
  color: #7c3aed;
  font-weight: 600;
}
.gantt-bar.is-milestone {
  background: #7c3aed;
}
.project-insights-milestones {
  margin-top: .55rem;
  padding: .55rem .7rem;
  border-radius: .5rem;
  border: 1px solid rgba(124, 58, 237, 0.28);
  background: rgba(124, 58, 237, 0.08);
  display: grid;
  gap: .3rem;
  font-size: .84rem;
}
.conflict-merge-rows {
  display: grid;
  gap: .65rem;
  margin: .6rem 0;
}
.conflict-merge-card {
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--panel);
  padding: .65rem .75rem;
  display: grid;
  gap: .5rem;
}
.conflict-merge-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
}
.conflict-merge-sides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}
@media (max-width: 640px) {
  .conflict-merge-sides {
    grid-template-columns: 1fr;
  }
}
.conflict-side-box {
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--field);
  padding: .45rem .6rem;
  font-size: .84rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.conflict-side-box.is-selected {
  border-color: var(--accent);
  background: rgba(208, 67, 72, 0.1);
}
.conflict-merge-preview {
  border: 1px solid rgba(208, 67, 72, 0.35);
  border-radius: .55rem;
  background: rgba(208, 67, 72, 0.08);
  padding: .65rem .8rem;
  margin-bottom: .65rem;
  font-size: .86rem;
}
.productivity-peak-hours {
  margin-top: .75rem;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--field);
}
.productivity-peak-bars {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  align-items: end;
  gap: 2px;
  height: 60px;
  margin: .5rem 0 .45rem;
}
.peak-hour-bar {
  border-radius: 3px;
  background: var(--line);
  min-height: 3px;
}
.peak-hour-bar.has-value {
  background: rgba(208, 67, 72, 0.65);
}
.peak-hour-bar.is-golden {
  background: #eb8909;
}
.productivity-time-bands {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.time-band-chip {
  font-size: .76rem;
  padding: .18rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
#pinned-filters-panel {
  margin-bottom: .65rem;
}
.sidebar-section-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
}
.pinned-filter-btn {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .55rem;
  margin-bottom: .75rem;
}
.dashboard-kpi-card {
  border: 1px solid var(--line);
  border-radius: .6rem;
  padding: .6rem .7rem;
  background: var(--field);
}
.dashboard-kpi-label {
  font-size: .76rem;
  color: var(--muted);
}
.dashboard-kpi-value {
  font-size: 1.15rem;
  font-weight: 700;
  margin: .15rem 0;
}
.dashboard-kpi-sub {
  font-size: .74rem;
  color: var(--muted);
}
.dashboard-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .65rem;
}
.dashboard-section {
  margin-top: .55rem;
}
.dashboard-section h3 {
  font-size: .88rem;
  margin: 0 0 .4rem;
}
.dashboard-project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .3rem;
}
.dashboard-project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .35rem .55rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--field);
}
.health-score-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .85rem;
  border: 1px solid rgba(41, 148, 56, 0.35);
  border-radius: .65rem;
  background: rgba(41, 148, 56, 0.08);
  margin-bottom: .75rem;
}
.health-issues-list {
  display: grid;
  gap: .5rem;
  margin-bottom: .75rem;
}
.health-issue-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--field);
}
.blueprint-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: .75rem;
}
.blueprints-list {
  display: grid;
  gap: .65rem;
}
.blueprint-card {
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--field);
  padding: .7rem .85rem;
}
.blueprint-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: .45rem;
}
.blueprint-steps {
  margin: .35rem 0 0;
  padding-left: 1.2rem;
  font-size: .84rem;
  color: var(--muted);
}
.time-analytics-share-bar {
  display: flex;
  height: 14px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: .75rem;
  background: var(--line);
}
.time-analytics-rows {
  display: grid;
  gap: .55rem;
}
.time-analytics-card {
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--field);
  padding: .65rem .8rem;
}
.time-analytics-bar-track {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
  margin-top: .25rem;
}
.time-analytics-bar-fill {
  height: 100%;
  border-radius: 3px;
}
.search-pinned-commands {
  margin: .45rem 0 .25rem;
}
.search-cmd-row {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.search-cmd-row > .task-name {
  flex: 1 1 auto;
  min-width: 0;
}
.search-cmd-pin-btn {
  flex: 0 0 auto;
  padding: .25rem .45rem;
  font-size: .78rem;
  border-radius: .45rem;
  opacity: .75;
}
.search-cmd-pin-btn.is-pinned {
  opacity: 1;
  border-color: var(--accent);
  color: var(--accent);
}
.undo-history-list {
  display: grid;
  gap: .55rem;
}
.undo-history-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--field);
  padding: .65rem .8rem;
}
.undo-history-card.is-reverted {
  opacity: .68;
}
.undo-history-meta {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin-bottom: .2rem;
}
.undo-history-badge {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: .35rem;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.burndown-chart-box {
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--field);
  padding: .7rem .85rem;
  margin-bottom: .75rem;
}
.burndown-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}
.burndown-velocity-bars {
  display: grid;
  gap: .5rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--field);
  padding: .7rem .85rem;
}
.burndown-velocity-row {
  display: grid;
  grid-template-columns: 70px 1fr 56px;
  align-items: center;
  gap: .6rem;
  font-size: .85rem;
}
.burndown-velocity-track {
  height: 10px;
  border-radius: 5px;
  background: var(--line);
  overflow: hidden;
}
.burndown-velocity-fill {
  height: 100%;
  border-radius: 5px;
  background: var(--accent);
}
.critical-path-bottlenecks {
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: .6rem;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  padding: .65rem .8rem;
  margin-bottom: .75rem;
  display: grid;
  gap: .4rem;
}
.critical-path-blocker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}
.critical-path-canvas {
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--field);
  overflow-x: auto;
  padding: .5rem;
}
.critical-path-svg {
  display: block;
}
.automation-rule-form {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--field);
  padding: .65rem .8rem;
  margin: .65rem 0;
}
.automation-rules-list {
  display: grid;
  gap: .5rem;
}
.automation-rule-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--field);
  padding: .6rem .8rem;
}
.automation-rule-card.is-disabled {
  opacity: .62;
}
.focus-ledger-list {
  display: grid;
  gap: .5rem;
}
.focus-ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--field);
  padding: .55rem .8rem;
}
.focus-ledger-mins {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: .4rem;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.okr-list {
  display: grid;
  gap: .75rem;
}
.okr-card {
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--field);
  padding: .75rem .9rem;
  display: grid;
  gap: .55rem;
}
.okr-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.okr-progress-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.okr-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width .2s ease;
}
.okr-kr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .35rem .5rem;
  border-radius: .45rem;
  background: var(--panel);
  border: 1px solid var(--line);
}
.okr-kr-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  padding-top: .35rem;
}
.tools-hub-sections {
  display: grid;
  gap: .85rem;
  margin-top: .7rem;
}
.tools-hub-section h3 {
  margin: 0 0 .45rem;
  font-size: .92rem;
  color: var(--accent);
}
.tools-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .55rem;
}
.tools-hub-card {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--field);
  padding: .6rem .75rem;
  display: grid;
  gap: .25rem;
  cursor: pointer;
}
.tools-hub-card:hover {
  border-color: var(--accent);
}
.tools-hub-card-title {
  font-weight: 700;
  font-size: .9rem;
}
.tools-hub-card-desc {
  font-size: .78rem;
  color: var(--muted);
}
.notes-panel {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.notes-composer {
  border: 1px solid var(--card-border, var(--line));
  border-radius: .7rem;
  background: var(--field);
  padding: .7rem .9rem;
  display: grid;
  gap: .45rem;
  position: sticky;
  bottom: .75rem;
  z-index: 2;
}
.notes-composer textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  resize: vertical;
  min-height: 2.2rem;
  font: inherit;
  line-height: 1.45;
}
.notes-composer textarea:focus {
  outline: none;
}
.notes-composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  flex-wrap: wrap;
}
.notes-filter-bar,
.notes-tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
@media (min-width: 720px) {
  .notes-panel > .notes-filter-bar,
  .notes-panel > .notes-tag-bar {
    display: none;
  }
}
.notes-pinned-banner {
  display: flex;
  align-items: center;
  gap: .5rem;
  height: 36px;
  padding: 0 .75rem;
  border-radius: .55rem;
  border: 1px solid var(--card-border, var(--line));
  background: var(--field);
  color: var(--ink);
  font-size: .84rem;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.notes-pinned-banner-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notes-timeline {
  display: grid;
  gap: .6rem;
}
.note-day-heading {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .65rem 0 .2rem;
  font-size: .78rem;
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.note-day-heading::before,
.note-day-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.note-card {
  border: 1px solid var(--card-border, var(--line));
  border-radius: .75rem;
  background: var(--field);
  padding: .75rem .9rem;
  display: grid;
  gap: .4rem;
}
.note-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.note-card-meta {
  font-size: .78rem;
  color: var(--muted);
}
.note-card-body {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  font-size: .94rem;
}
.note-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.note-tag-pill {
  font-size: .78rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}
.note-card.is-highlighted {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent);
}
.note-highlight {
  background: #fff2b8;
  color: #4a3200;
  padding: 0 .2rem;
  border-radius: .25rem;
}
@media (prefers-color-scheme: dark) {
  .note-highlight {
    background: #4c3b0e;
    color: #fde69c;
  }
}
:root[data-theme="dark"] .note-highlight {
  background: #4c3b0e;
  color: #fde69c;
}
.note-inline-tag {
  display: inline;
  padding: 0 .28rem;
  margin: 0 .06rem;
  border: none;
  border-radius: .3rem;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.note-inline-tag:hover {
  text-decoration: underline;
}
.note-inline-editor {
  display: grid;
  gap: .5rem;
}
.note-inline-editor textarea {
  width: 100%;
  min-height: 4.5rem;
  padding: .5rem .65rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--bg);
  color: inherit;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}
.note-inline-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: .45rem;
}
.notes-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(12, 14px);
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 14px);
  gap: 4px;
  padding: .75rem;
  border-radius: .75rem;
  background: var(--field);
  overflow-x: auto;
  width: fit-content;
  max-width: 100%;
}
.notes-heatmap-cell {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 3px;
  padding: 0;
  background: color-mix(in srgb, var(--line) 80%, transparent);
  cursor: default;
}
.notes-heatmap-cell[data-level="1"] { background: color-mix(in srgb, var(--accent) 22%, transparent); cursor: pointer; }
.notes-heatmap-cell[data-level="2"] { background: color-mix(in srgb, var(--accent) 45%, transparent); cursor: pointer; }
.notes-heatmap-cell[data-level="3"] { background: color-mix(in srgb, var(--accent) 72%, transparent); cursor: pointer; }
.notes-heatmap-cell[data-level="4"] { background: var(--accent); cursor: pointer; }
.notes-review-list {
  display: grid;
  gap: .55rem;
  margin-top: .55rem;
  max-height: 280px;
  overflow-y: auto;
}
.note-review-card {
  border: none;
  border-radius: .75rem;
  background: var(--field);
  padding: .7rem .85rem;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: .3rem;
}
.note-replies-box {
  margin-top: .4rem;
  padding-top: .5rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: .4rem;
}
.note-reply-item {
  font-size: .84rem;
  padding: .35rem .6rem;
  border-left: 2px solid var(--accent);
  background: var(--bg);
  border-radius: 0 .4rem .4rem 0;
}
.note-reply-form {
  display: flex;
  gap: .4rem;
}
.note-reply-form input {
  flex: 1;
}
.signin-links {
  margin-top: .75rem;
  justify-content: space-between;
}
.signin-footer {
  margin-top: 1.25rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1rem;
  font-size: .84rem;
}
.signin-footer a {
  color: var(--muted);
  text-decoration: none;
}
.signin-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.danger-link {
  color: #b42318;
}
.danger-text {
  color: #b42318;
}
button.danger {
  background: #b42318;
  border-color: #b42318;
  color: #ffffff;
}
.notes-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .75rem;
}
.notes-gallery-card {
  background: var(--field);
  border-radius: .75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.notes-gallery-thumb {
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .65rem;
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
  color: var(--muted);
  font-size: .82rem;
  text-align: center;
  word-break: break-all;
}
.notes-gallery-meta {
  padding: .65rem .75rem;
  display: grid;
  gap: .35rem;
}
.notes-gallery-caption {
  font-size: .84rem;
  line-height: 1.4;
}
.note-review-card-wrap {
  display: flex;
  align-items: stretch;
  gap: .45rem;
}
.note-review-card-wrap > .note-review-card {
  flex: 1 1 auto;
}
.note-review-exclude-btn {
  flex: 0 0 auto;
  font-size: .78rem;
  padding: .25rem .5rem;
}
.sidebar-mode-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  margin-bottom: .75rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 7%, var(--bg));
}
.sidebar-mode-switcher button {
  border: 0;
  border-radius: 999px;
  padding: .35rem .5rem;
  font-size: .82rem;
  font-weight: 500;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.sidebar-mode-switcher button[aria-selected="true"] {
  background: var(--bg);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
.sidebar-notes-pane {
  display: grid;
  gap: .65rem;
}
.notes-sidebar-stats {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0 .25rem;
  font-variant-numeric: tabular-nums;
}
.notes-sidebar-heatmap {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: .35rem .5rem;
  border-radius: .5rem;
  background: color-mix(in srgb, var(--ink) 4%, var(--panel));
}
.notes-sidebar-heatmap .notes-heatmap-cell {
  width: 100%;
  height: 7px;
  border-radius: 2px;
}
.notes-sidebar-heatmap .notes-heatmap-cell.is-selected {
  outline: 1.5px solid var(--ink);
  outline-offset: 1px;
}
.notes-sidebar-nav {
  display: grid;
  gap: .15rem;
}
.notes-sidebar-nav button,
.notes-sidebar-tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  border-radius: .5rem;
  background: transparent;
  color: var(--ink);
  padding: .42rem .6rem;
  font-size: .86rem;
  text-align: left;
  cursor: pointer;
}
.notes-sidebar-nav button[aria-current="page"],
.notes-sidebar-tag-row.is-active {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-weight: 600;
}
.notes-sidebar-section-label {
  font-size: .74rem;
  font-weight: 700;
  color: var(--muted);
  padding: .25rem .4rem 0;
  border-top: 1px solid var(--line);
}
.notes-sidebar-tags {
  display: grid;
  gap: .1rem;
}

/* Wave 1 surface craft: floating dark #262626 + 1px hairline + top inner highlight + 5px scrollbars */
dialog {
  background: var(--floating);
  border: 1px solid var(--border-overlay);
  border-radius: 12px;
  box-shadow: var(--top-highlight), var(--shadow);
}
.quick-add-box,
.notes-composer-card {
  box-shadow: var(--top-highlight), var(--shadow);
}
.note-quote-ribbon {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-left: 2.5px solid var(--quote-ribbon-line);
  border-radius: 0 8px 8px 0;
  background: var(--quote-ribbon-bg);
  padding: 7px 11px;
  margin-bottom: 9px;
  cursor: pointer;
  color: var(--muted);
}
.note-quote-ribbon-meta {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 2px;
  opacity: 0.82;
}
.note-quote-ribbon-excerpt {
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-backlinks-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--ink) 18%, transparent) transparent;
}
*::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 18%, transparent);
}
*::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--ink) 32%, transparent);
}

/* ==========================================================================
   Wave Web-1: V3.0 Warm Paper Flagship, Dual Minimal Sidebar, 14-Week Pixel
   Heatmap, Topbar De-noising & Live-Canvas Floating Skin Studio Dock
   ========================================================================== */

.top-left {
  display: flex;
  align-items: center;
  gap: .45rem;
}
.icon-btn,
.sidebar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex: none;
  transition: background-color 90ms ease-out, color 90ms ease-out, transform 65ms ease-out;
}
.icon-btn:hover:not(:disabled),
.sidebar-icon-btn:hover:not(:disabled) {
  background: var(--hover);
  color: var(--ink);
}
.icon-btn:active:not(:disabled),
.sidebar-icon-btn:active:not(:disabled) {
  transform: scale(0.95);
}
.mobile-only-btn {
  display: none;
}

/* Desktop signed-in workspace: seamless native shell (hide legacy full-width .top bar) */
@media (min-width: 721px) {
  body.signed-in:not(.admin-mode) > header.top {
    display: none;
  }
  body.signed-in:not(.admin-mode) .workspace {
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns 180ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  body.signed-in:not(.admin-mode).sidebar-collapsed .workspace {
    grid-template-columns: 0 minmax(0, 1fr);
  }
  body.signed-in:not(.admin-mode).sidebar-collapsed #workspace-sidebar {
    opacity: 0;
    pointer-events: none;
    border-right-color: transparent;
  }
  body.signed-in:not(.admin-mode) #workspace-sidebar {
    top: 0;
    height: 100vh;
  }
  body.signed-in:not(.admin-mode) #sync-status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    margin: 0;
  }
}

/* Dual-Mode Minimalist Left Sidebar */
#workspace-sidebar {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--panel);
  border-right: 1px solid var(--line);
  transition: background-color 200ms cubic-bezier(0.22, 1, 0.36, 1), border-color 200ms ease, opacity 140ms ease;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 10px 0 14px;
  flex: none;
}
.sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
}
.sidebar-brand .brand-mark {
  color: var(--ink);
}

/* Spring sliding [Tasks | Notes] switcher */
#workspace-sidebar .sidebar-mode-switcher {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 3px;
  margin: 2px 12px 8px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  flex: none;
}
.mode-slider-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  border-radius: 7px;
  background: var(--field);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-ground);
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1), background-color 200ms ease;
  pointer-events: none;
}
#workspace-sidebar .sidebar-mode-switcher[data-mode="notes"] .mode-slider-thumb {
  transform: translateX(100%);
}
#workspace-sidebar .sidebar-mode-switcher button {
  position: relative;
  z-index: 1;
  min-height: 28px;
  padding: 4px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}
#workspace-sidebar .sidebar-mode-switcher button:hover {
  background: transparent;
  color: var(--ink);
}
#workspace-sidebar .sidebar-mode-switcher button[aria-selected="true"] {
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  box-shadow: none;
}

/* Strictly aligned Row 1 Search button (quiet, never clashes with active nav row) */
.sidebar-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 20px);
  min-height: 32px;
  margin: 0 10px 4px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 450;
  flex: none;
}
.sidebar-search-row:hover {
  background: var(--hover);
  color: var(--ink);
}
.pocodo-kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--field) 65%, transparent);
  color: var(--faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

/* Scrollable middle zone of sidebar */
.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 10px 12px;
}
.sidebar-row-lead {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sidebar-nav-icon {
  flex: none;
  color: var(--muted);
}
.sidebar-nav-icon.icon-inbox {
  color: var(--inbox-tint);
}
.sidebar-nav-icon.icon-gold {
  color: var(--gold);
}
.sidebar-nav-icon.icon-done {
  color: var(--today);
}
.sidebar-today-cal {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  color: var(--coral);
  flex: none;
}
.sidebar-today-num {
  position: absolute;
  top: 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  transform: scale(0.72);
  transform-origin: center top;
  font-variant-numeric: tabular-nums;
}

#workspace-sidebar #views,
#workspace-sidebar .notes-sidebar-nav {
  display: grid;
  gap: 2px;
  margin: 0;
}
#workspace-sidebar #views button,
#workspace-sidebar .notes-sidebar-nav button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 450;
  text-align: left;
}
#workspace-sidebar #views button:hover,
#workspace-sidebar .notes-sidebar-nav button:hover,
#workspace-sidebar #projects button:hover,
#workspace-sidebar #favorite-projects button:hover {
  background: var(--hover);
}
#workspace-sidebar #views button[aria-current="page"],
#workspace-sidebar .notes-sidebar-nav button[aria-current="page"],
#workspace-sidebar #projects button[aria-current="page"],
#workspace-sidebar #favorite-projects button[aria-current="page"] {
  background: var(--active);
  color: var(--ink);
  font-weight: 550;
}
#workspace-sidebar #views button[aria-current="page"]::after,
#workspace-sidebar .notes-sidebar-nav button[aria-current="page"]::after,
#workspace-sidebar #projects button[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 2.5px;
  border-radius: 999px;
  background: var(--accent);
}
#workspace-sidebar .nav-count {
  color: var(--faint);
  background: transparent;
  border: 0;
  padding: 0;
  min-width: auto;
  font-size: 12px;
  font-weight: 450;
  font-variant-numeric: tabular-nums;
}
.sidebar-divider {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 9px 4px;
}
#workspace-sidebar .project-heading {
  margin: 6px 0 4px;
  padding: 0 4px;
}
#workspace-sidebar .sidebar-section-toggle,
#workspace-sidebar .sidebar-section-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.sidebar-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}
#workspace-sidebar #projects button,
#workspace-sidebar #favorite-projects button {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 31px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 450;
}
.sidebar-quiet-btn {
  width: 100%;
  text-align: left;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}

/* Collapsed legacy tools drawer (keeps DOM clean on first glance) */
.sidebar-labs-drawer {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}
.sidebar-labs-summary {
  list-style: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--faint);
  user-select: none;
}
.sidebar-labs-summary:hover {
  color: var(--muted);
  background: var(--hover);
}
.sidebar-labs-summary::-webkit-details-marker {
  display: none;
}
.sidebar-labs-summary::before {
  content: "▸ ";
}
.sidebar-labs-drawer[open] .sidebar-labs-summary::before {
  content: "▾ ";
}
.sidebar-labs-body {
  display: grid;
  gap: 2px;
  padding-top: 4px;
}
.sidebar-labs-body > button {
  width: 100%;
  text-align: left;
  min-height: 29px;
  padding: 4px 8px;
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}
.sidebar-labs-body > button:hover {
  color: var(--ink);
}
.sidebar-sub-heading {
  margin-top: 4px;
}

/* Notes Sidebar: 14-Week 1:1 Square Pixel Heatmap (Zero outer box, watercolor scale) */
#workspace-sidebar .sidebar-notes-pane {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.notes-heatmap-block {
  padding: 2px 4px 4px;
}
.notes-heatmap-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 7px;
}
.notes-heatmap-head .notes-sidebar-stats {
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.notes-heatmap-range {
  font-size: 11px;
  font-weight: 450;
  color: var(--faint);
}
#workspace-sidebar .notes-sidebar-heatmap {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  grid-template-rows: repeat(7, minmax(0, 1fr));
  grid-auto-flow: column;
  gap: 3px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}
#workspace-sidebar .notes-sidebar-heatmap .notes-heatmap-cell {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 2.5px;
  padding: 0;
  background: var(--heat-0);
  transition: transform 90ms ease-out, background-color 200ms ease;
}
#workspace-sidebar .notes-sidebar-heatmap .notes-heatmap-cell[data-level="1"] { background: var(--heat-1); cursor: pointer; }
#workspace-sidebar .notes-sidebar-heatmap .notes-heatmap-cell[data-level="2"] { background: var(--heat-2); cursor: pointer; }
#workspace-sidebar .notes-sidebar-heatmap .notes-heatmap-cell[data-level="3"] { background: var(--heat-3); cursor: pointer; }
#workspace-sidebar .notes-sidebar-heatmap .notes-heatmap-cell[data-level="4"] { background: var(--heat-4); cursor: pointer; }
#workspace-sidebar .notes-sidebar-heatmap .notes-heatmap-cell:hover {
  transform: scale(1.16);
}
#workspace-sidebar .notes-sidebar-heatmap .notes-heatmap-cell.is-selected {
  outline: 1.5px solid var(--ink);
  outline-offset: 1px;
}
.notes-heatmap-spacer {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  visibility: hidden;
  pointer-events: none;
}

/* Notes dialog 14-week heatmap grid alignment */
.notes-heatmap-grid {
  grid-template-columns: repeat(14, 13px);
  grid-template-rows: repeat(7, 13px);
  gap: 3.5px;
}
.notes-heatmap-grid .notes-heatmap-cell {
  width: 13px;
  height: 13px;
  min-height: 0;
  background: var(--heat-0);
}
.notes-heatmap-grid .notes-heatmap-cell[data-level="1"] { background: var(--heat-1); }
.notes-heatmap-grid .notes-heatmap-cell[data-level="2"] { background: var(--heat-2); }
.notes-heatmap-grid .notes-heatmap-cell[data-level="3"] { background: var(--heat-3); }
.notes-heatmap-grid .notes-heatmap-cell[data-level="4"] { background: var(--heat-4); }

/* Tags header & filter menu popover */
.notes-sidebar-tags-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 4px 4px;
}
.notes-sidebar-tags-head .notes-sidebar-section-label {
  border-top: 0;
  padding: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}
.notes-filter-menu-wrap,
.view-more-wrap {
  position: relative;
}
.filter-active-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
.notes-sidebar-tag-row {
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 450;
}
.notes-sidebar-tag-row[data-depth="1"] { padding-inline-start: 20px; }
.notes-sidebar-tag-row[data-depth="2"] { padding-inline-start: 32px; }
.notes-sidebar-tag-row[data-depth="3"] { padding-inline-start: 44px; }
.notes-sidebar-tag-row:hover {
  background: var(--hover);
}
.notes-sidebar-tag-row.is-active {
  background: var(--active);
  color: var(--ink);
  font-weight: 550;
}

/* Fixed 54px Sidebar Footer (Zero vertical text clipping!) */
.sidebar-footer {
  margin-top: auto;
  flex: none;
  height: 54px;
  min-height: 54px;
  padding: 6px 10px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: var(--panel);
}
.sidebar-account-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  padding: 4px 6px;
  min-height: 38px;
  border-radius: 8px;
  text-align: left;
}
.sidebar-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  flex: none;
}
.sidebar-account-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
  gap: 2px;
}
.sidebar-account-name {
  font-size: 12.5px;
  font-weight: 550;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-sync-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--today);
  flex: none;
}
.sidebar-sync-dot[data-state="syncing"] { background: var(--gold); }
.sidebar-sync-dot[data-state="error"] { background: var(--danger); }
.sidebar-footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
.sidebar-trash-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--active);
  color: var(--ink);
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

/* Unified crisp popovers (Account, View More, Notes Filter) */
.pocodo-popover,
.account-popover {
  position: absolute;
  z-index: 48;
  min-width: 184px;
  padding: 5px;
  border: 1px solid var(--border-overlay);
  border-radius: 11px;
  background: var(--floating);
  box-shadow: var(--top-highlight), var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1px;
  animation: pocodoPopIn 130ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pocodoPopIn {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.pocodo-popover button,
.account-popover button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 450;
  color: var(--ink);
  text-align: left;
}
.pocodo-popover button[aria-pressed="true"],
.pocodo-popover button[aria-current="page"] {
  background: var(--active);
  font-weight: 550;
}
.notes-filter-menu {
  top: calc(100% + 4px);
  right: 0;
}
.view-more-popover {
  top: calc(100% + 6px);
  right: 0;
}
.popover-sep {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 4px 6px;
}

/* Account popover anchored above sidebar footer on desktop, top-right on mobile/admin */
.account-popover {
  display: none;
  position: fixed;
  left: 10px;
  bottom: 62px;
  width: 224px;
}
body.mobile-account-open .account-popover {
  display: flex;
}
body.admin-mode .account-popover {
  left: auto;
  bottom: auto;
  top: 52px;
  right: 16px;
}
.account-popover-head {
  padding: 6px 10px 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
}

/* De-noised main content heading (<= 2 light controls top-right) */
.view-heading-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.content-heading {
  margin-bottom: 10px;
}
.content-top-actions {
  flex-wrap: nowrap;
  gap: 6px;
}
body.signed-in.sidebar-collapsed #sidebar-expand-btn {
  display: inline-flex !important;
}

/* Notes V3.0 Warm Paper Cards & Z-axis shadow discipline */
body[data-workspace-mode="notes"] .content {
  width: min(100%, 740px);
}
body[data-workspace-mode="notes"] .note-card {
  background: var(--field);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--shadow-ground);
  padding: 14px 16px;
}
body[data-workspace-mode="notes"] .note-card-body {
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
}
body[data-workspace-mode="notes"] .notes-composer {
  background: var(--field);
  border: 1px solid var(--border-overlay);
  border-radius: 14px;
  box-shadow: var(--top-highlight), var(--shadow);
}

/* Dialog utility classes replacing inline style attributes (CSP strict) */
.notes-review-rules-bar {
  margin-top: .65rem;
  flex-wrap: wrap;
  gap: .4rem;
}
.notes-review-subhead {
  margin-top: .85rem;
  justify-content: space-between;
}
.notes-export-bar {
  margin-bottom: .6rem;
}
.notes-export-preview {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem;
}
.settings-quick-prefs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.settings-quick-prefs label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  flex: 1 1 140px;
}

/* ==========================================================================
   Live-Canvas Floating Skin Studio Dock (Zero Dark Backdrop, 200ms Try-On)
   ========================================================================== */
.skin-studio-dock {
  position: fixed;
  z-index: 65;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(748px, calc(100vw - 24px));
  padding: 14px 16px 16px;
  border-radius: 16px;
  border: 1px solid var(--border-overlay);
  background: color-mix(in srgb, var(--floating) 94%, transparent);
  backdrop-filter: blur(20px) saturate(1.25);
  box-shadow: var(--top-highlight), 0 18px 46px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.06);
  animation: skinDockRise 180ms cubic-bezier(0.22, 1, 0.36, 1);
  transition: left 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 721px) {
  body.signed-in:not(.admin-mode):not(.sidebar-collapsed) .skin-studio-dock {
    left: calc(50% + 124px);
    width: min(748px, calc(100vw - 280px));
  }
}
body.skin-dock-open .notes-composer {
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}
:root[data-theme="dark"] .skin-studio-dock {
  box-shadow: var(--top-highlight), 0 22px 54px rgba(0, 0, 0, 0.56);
}
@keyframes skinDockRise {
  from { opacity: 0; transform: translate(-50%, 14px) scale(0.97); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
.skin-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 13px;
}
.skin-dock-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.skin-dock-spark {
  color: var(--gold);
}
.skin-dock-hint {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--faint);
  margin-inline-start: 4px;
  white-space: nowrap;
}
.skin-dock-controls {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.skin-mode-segment {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 2.5px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}
.skin-mode-thumb {
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: calc((100% - 5px) / 3);
  height: calc(100% - 5px);
  border-radius: 7px;
  background: var(--field);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-ground);
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.skin-mode-segment[data-mode="dark"] .skin-mode-thumb { transform: translateX(100%); }
.skin-mode-segment[data-mode="auto"] .skin-mode-thumb { transform: translateX(200%); }
.skin-mode-segment button {
  position: relative;
  z-index: 1;
  min-height: 25px;
  padding: 2px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.skin-mode-segment button:hover {
  background: transparent;
  color: var(--ink);
}
.skin-mode-segment button[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 600;
}
.skin-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
}
.skin-toggle-pill:hover {
  color: var(--ink);
}
/* Unified 34x19px Pocodo Switch */
.pocodo-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 16%, transparent);
  transition: background-color 140ms ease;
}
.pocodo-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.skin-toggle-pill[aria-pressed="true"] .pocodo-switch {
  background: var(--accent);
}
:root[data-theme="dark"] .skin-toggle-pill[aria-pressed="true"] .pocodo-switch::after {
  background: var(--brand-fg);
}
.skin-toggle-pill[aria-pressed="true"] .pocodo-switch::after {
  transform: translateX(15px);
}

/* 5 Sculpted Diagonal-Split Material Chips */
.skin-dock-chips {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.skin-chip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  cursor: pointer;
}
.skin-chip:hover {
  background: transparent;
}
.skin-chip:active .skin-chip-swatch {
  transform: scale(0.96);
}
.skin-chip-swatch {
  display: block;
  position: relative;
  height: 76px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--card-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: transform 140ms cubic-bezier(0.22, 1, 0.36, 1), border-color 140ms ease, box-shadow 140ms ease;
  pointer-events: none;
}
.skin-chip-meta {
  display: grid;
  gap: 1px;
  pointer-events: none;
}
.skin-chip:hover .skin-chip-swatch,
.skin-chip.is-previewing .skin-chip-swatch {
  transform: translateY(-2px);
  border-color: var(--border-focus);
}
.skin-chip[aria-selected="true"] .skin-chip-swatch {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 26%, transparent), 0 6px 16px rgba(0, 0, 0, 0.16);
}

/* 5 Curated Skin Diagonal-Split Swatch Textures */
.swatch-ink {
  background: linear-gradient(135deg, #f6f6f3 0%, #f1f1ee 36%, rgba(255,255,255,0.65) 36.6%, #181818 37.5%, #111111 100%);
}
.swatch-mistBlue {
  background: linear-gradient(135deg, #f0f4f8 0%, #dce7f3 36%, rgba(168,201,242,0.55) 36.6%, #141f2e 37.5%, #0c121a 100%);
}
.swatch-warmPaper {
  background: linear-gradient(135deg, #faf7f0 0%, #ede4d3 36%, rgba(234,217,197,0.6) 36.6%, #28211b 37.5%, #161310 100%);
}
.swatch-sage {
  background: linear-gradient(135deg, #edf2ee 0%, #d8e7dc 36%, rgba(176,223,196,0.55) 36.6%, #192921 37.5%, #0e1612 100%);
}
.swatch-terracotta {
  background: linear-gradient(135deg, #faf1f4 0%, #eddce2 36%, rgba(245,199,210,0.55) 36.6%, #331e28 37.5%, #181014 100%);
}
.skin-chip-keycap {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(24, 24, 22, 0.14);
  color: #222220;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.skin-chip-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #ffffff;
  color: #141414;
  font-size: 11px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 140ms ease, transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.skin-chip[aria-selected="true"] .skin-chip-check {
  opacity: 1;
  transform: scale(1);
}
.skin-chip-ring {
  position: absolute;
  left: 9px;
  bottom: 9px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.8px solid rgba(255, 255, 255, 0.8);
}
.swatch-mistBlue .skin-chip-ring { border-color: #93bceb; }
.swatch-warmPaper .skin-chip-ring { border-color: #d8b894; }
.swatch-sage .skin-chip-ring { border-color: #8cc7a6; }
.swatch-terracotta .skin-chip-ring { border-color: #e6a6b5; }

.skin-chip-dots {
  position: absolute;
  right: 8px;
  bottom: 10px;
  display: inline-flex;
  gap: 3px;
}
.skin-chip-dots i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 2.5px;
}
.swatch-ink .skin-chip-dots i:nth-child(1) { background: #f2f2f2; }
.swatch-ink .skin-chip-dots i:nth-child(2) { background: #b8b8b2; }
.swatch-ink .skin-chip-dots i:nth-child(3) { background: #74a188; }
.swatch-ink .skin-chip-dots i:nth-child(4) { background: #d96857; }
.swatch-mistBlue .skin-chip-dots i:nth-child(1) { background: #edf3fa; }
.swatch-mistBlue .skin-chip-dots i:nth-child(2) { background: #93bceb; }
.swatch-mistBlue .skin-chip-dots i:nth-child(3) { background: #5ec2ab; }
.swatch-mistBlue .skin-chip-dots i:nth-child(4) { background: #e67b80; }
.swatch-warmPaper .skin-chip-dots i:nth-child(1) { background: #f4ede4; }
.swatch-warmPaper .skin-chip-dots i:nth-child(2) { background: #d8b894; }
.swatch-warmPaper .skin-chip-dots i:nth-child(3) { background: #879a39; }
.swatch-warmPaper .skin-chip-dots i:nth-child(4) { background: #d14d41; }
.swatch-sage .skin-chip-dots i:nth-child(1) { background: #ecf4ef; }
.swatch-sage .skin-chip-dots i:nth-child(2) { background: #8cc7a6; }
.swatch-sage .skin-chip-dots i:nth-child(3) { background: #6ec497; }
.swatch-sage .skin-chip-dots i:nth-child(4) { background: #e07e77; }
.swatch-terracotta .skin-chip-dots i:nth-child(1) { background: #f6ecef; }
.swatch-terracotta .skin-chip-dots i:nth-child(2) { background: #e6a6b5; }
.swatch-terracotta .skin-chip-dots i:nth-child(3) { background: #78b7c4; }
.swatch-terracotta .skin-chip-dots i:nth-child(4) { background: #eb6f92; }

/* Single 360ms top specular metallic glint sweep on commit */
.skin-chip-glint {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.45) 48%, transparent 74%);
  transform: translateX(-125%);
  pointer-events: none;
}
.skin-chip.is-glinting .skin-chip-glint {
  animation: pocodoSpecularGlint 360ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes pocodoSpecularGlint {
  from { transform: translateX(-125%); }
  to { transform: translateX(135%); }
}
.skin-chip-meta {
  display: grid;
  gap: 1px;
}
.skin-chip-meta strong {
  font-size: 12.5px;
  font-weight: 550;
  color: var(--ink);
}
.skin-chip-meta span {
  font-size: 11px;
  color: var(--faint);
}

/* Mobile / Narrow Viewport (< 720px): auto-collapse sidebar into clean slide-over drawer */
.sidebar-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(0, 0, 0, 0.32);
}
@media (max-width: 720px) {
  .mobile-only-btn {
    display: inline-flex;
  }
  body.signed-in #mobile-sidebar-toggle {
    display: inline-flex !important;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
    overflow-x: clip;
  }
  #workspace-sidebar {
    position: fixed;
    z-index: 45;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(278px, 84vw);
    height: 100vh;
    transform: translateX(-105%);
    transition: transform 190ms cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: var(--shadow);
  }
  body.mobile-sidebar-open #workspace-sidebar {
    transform: translateX(0);
  }
  .account-popover {
    left: auto;
    bottom: auto;
    top: 54px;
    right: 10px;
  }
  .skin-dock-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .skin-dock-hint {
    display: none;
  }
}

/* ==========================================================================
   Wave Web-2: Unified Frameless 4-Icon Bottom Composer, Zero-Jump Chat Stream,
   Borderless 2px Quote Ribbons, 420ms Peek, 180ms Evolution Drawer,
   Apple-Minimal Cards & Detail Sheet, Floating Capsule Undo Toast
   ========================================================================== */

/* ==========================================================================
   Web-4.5 Coaxial Centered Elastic Clamp (100% Same-Axis Content + Composer)
   - <600px: 100% flush to bottom/keyboard, top radius 18px / bottom 0px
   - 600-1099px: min(100% - 32px, 760px), composer <= 220px
   - 1100-1799px: min(100% - 64px, 760px), composer <= min(260px, 35vh)
   - >=1800px (2K/4K): min(100% - 64px, 800px), composer <= 280px
   ========================================================================== */
body.signed-in:not(.admin-mode) .content {
  width: min(100% - 32px, 760px);
  margin-inline: auto;
  padding: 1.35rem 0 144px;
}
body.signed-in:not(.admin-mode) .content:has(#tasks.project-board),
body.signed-in:not(.admin-mode) .content:has(#project-table-panel:not([hidden])) {
  width: min(100% - 64px, 1180px);
}
body.signed-in:not(.admin-mode) .content:has(#schedule-hub:not([hidden])) {
  width: 100%;
  max-width: none;
  padding: 0 0 92px;
}
@media (min-width: 1100px) {
  body.signed-in:not(.admin-mode) .content {
    width: min(100% - 64px, 760px);
  }
  body.signed-in:not(.admin-mode) .content:has(#schedule-hub:not([hidden])) {
    width: 100%;
    max-width: none;
  }
}
@media (min-width: 1800px) {
  body.signed-in:not(.admin-mode) .content {
    width: min(100% - 64px, 800px);
  }
  body.signed-in:not(.admin-mode) .content:has(#tasks.project-board),
  body.signed-in:not(.admin-mode) .content:has(#project-table-panel:not([hidden])) {
    width: min(100% - 64px, 1220px);
  }
  body.signed-in:not(.admin-mode) .content:has(#schedule-hub:not([hidden])) {
    width: 100%;
    max-width: none;
  }
}

/* Unified Bottom Fixed Composer (100% Coaxial with Main Content Column) */
.unified-composer-dock {
  position: fixed;
  z-index: 32;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(calc(100vw - 32px), 760px);
  transition: left 180ms cubic-bezier(0.22, 1, 0.36, 1), opacity 140ms ease;
}
@media (min-width: 721px) {
  body.signed-in:not(.admin-mode):not(.sidebar-collapsed) .unified-composer-dock {
    left: calc(50% + 124px);
    width: min(calc(100vw - 280px), 760px);
  }
  body.signed-in:not(.admin-mode).sidebar-collapsed .unified-composer-dock {
    left: 50%;
    width: min(calc(100vw - 32px), 760px);
  }
  body.signed-in:not(.admin-mode):not(.sidebar-collapsed).evo-drawer-open .unified-composer-dock {
    left: calc(50% - 68px);
    width: min(calc(100vw - 664px), 760px);
  }
  body.signed-in:not(.admin-mode).evo-drawer-open .content {
    margin-inline-end: 384px;
  }
}
@media (min-width: 1100px) {
  body.signed-in:not(.admin-mode):not(.sidebar-collapsed) .unified-composer-dock {
    width: min(calc(100vw - 312px), 760px);
  }
  body.signed-in:not(.admin-mode).sidebar-collapsed .unified-composer-dock {
    width: min(calc(100vw - 64px), 760px);
  }
}
@media (min-width: 1800px) {
  body.signed-in:not(.admin-mode):not(.sidebar-collapsed) .unified-composer-dock {
    width: min(calc(100vw - 312px), 800px);
  }
  body.signed-in:not(.admin-mode).sidebar-collapsed .unified-composer-dock {
    width: min(calc(100vw - 64px), 800px);
  }
}
body.skin-dock-open .unified-composer-dock,
body.task-detail-open .unified-composer-dock {
  opacity: 0;
  pointer-events: none;
}

.unified-composer {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(260px, 35vh);
  padding: 12px 14px 9px;
  border-radius: 16px;
  border: 1px solid var(--border-overlay);
  background: var(--field);
  box-shadow: var(--top-highlight), var(--shadow);
  transition: border-color 120ms ease-out, box-shadow 120ms ease-out, background-color 200ms ease;
}
@media (max-width: 1099px) {
  .unified-composer {
    max-height: min(220px, 35vh);
  }
}
@media (min-width: 1800px) {
  .unified-composer {
    max-height: min(280px, 35vh);
  }
}
:root[data-theme="dark"] .unified-composer {
  border-radius: 14px;
}
.unified-composer:focus-within {
  border-color: var(--border-focus);
  box-shadow: var(--top-highlight), var(--shadow), 0 0 0 3px color-mix(in srgb, var(--ink) 5%, transparent);
}
.unified-composer.is-drag-over {
  border-style: dashed;
  border-color: var(--accent);
  box-shadow: var(--top-highlight), var(--shadow), 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.uc-drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: color-mix(in srgb, var(--field) 90%, transparent);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 550;
  pointer-events: none;
}
.unified-composer.is-drag-over .uc-drop-overlay {
  display: flex;
}

/* Embedded 28px Quote Slot inside composer */
.uc-quote-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 8px 4px 10px;
  border-radius: 8px;
  background: var(--quote-ribbon-bg);
  position: relative;
  animation: pocodoSlideInUp 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
.uc-quote-slot-bar {
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 2.5px;
  border-radius: 999px;
  background: var(--quote-ribbon-line);
}
.uc-quote-slot-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.uc-quote-slot-clear {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 6px;
  font-size: 11px;
  color: var(--faint);
  flex: none;
}
.uc-quote-slot-clear:hover {
  color: var(--ink);
}

/* Inline 40x40px image attachment thumbnails */
.uc-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 0;
}
.uc-att-chip {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--panel);
  flex: none;
}
.uc-att-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.uc-att-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.72);
  color: #ffffff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}
.uc-att-remove:hover {
  background: rgba(20, 20, 20, 0.92);
}

/* Smooth auto-growing textarea (clamped cleanly inside <=260px / 35vh composer ceiling) */
.uc-textarea {
  width: 100%;
  min-height: 24px;
  max-height: min(192px, 28vh);
  padding: 2px 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.55;
  resize: none;
  overflow-y: auto;
}
@media (max-width: 1099px) {
  .uc-textarea {
    max-height: min(156px, 26vh);
  }
}
@media (min-width: 1800px) {
  .uc-textarea {
    max-height: min(212px, 30vh);
  }
}
.uc-textarea:focus {
  outline: none;
  border: 0;
}
.uc-textarea::placeholder {
  color: var(--faint);
}

/* Recall-last-item inline editing bar (Empty composer ArrowUp micro-magic) */
.uc-recall-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
  padding: 3px 8px 3px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--gold) 11%, transparent);
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
}
.uc-recall-slot-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Harmonized live recognized tokens bar in Task mode (11% soft tint + w500, zero harsh blue/red) */
.uc-task-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 1px 0;
}
.uc-token-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 0;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
}
button.uc-token-badge {
  cursor: pointer;
  min-height: 22px;
  transition: opacity 90ms ease;
}
button.uc-token-badge:hover {
  opacity: 0.78;
}
.uc-token-badge.is-project {
  color: var(--tok-color, var(--inbox-tint));
  background: color-mix(in srgb, var(--tok-color, var(--inbox-tint)) 11%, transparent);
}
.uc-token-badge.is-date {
  color: var(--coral);
  background: color-mix(in srgb, var(--coral) 11%, transparent);
}
.uc-token-badge.is-tag {
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 11%, transparent);
}
.uc-token-badge.is-p1 { color: var(--p1); background: color-mix(in srgb, var(--p1) 11%, transparent); }
.uc-token-badge.is-p2 { color: var(--p2); background: color-mix(in srgb, var(--p2) 11%, transparent); }
.uc-token-badge.is-p3 { color: var(--p3); background: color-mix(in srgb, var(--p3) 11%, transparent); }

/* Bottom tool row (NO internal divider line, locked right side) */
.uc-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
}
.uc-tools {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}
.uc-tool-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  animation: pocodoFadeSlide 120ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pocodoFadeSlide {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pocodoSlideInUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pure 4 Frameless 1.5px Icons (ZERO chunky borders!) */
.uc-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 90ms ease-out, color 90ms ease-out, transform 65ms ease-out;
}
.uc-icon-btn:hover {
  background: var(--hover);
  color: var(--ink);
}
.uc-icon-btn:active {
  transform: scale(0.92);
}
.uc-icon-btn[aria-expanded="true"] {
  background: var(--active);
  color: var(--ink);
}
.uc-aa-btn {
  font-size: 13.5px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

/* Task mode frameless inline pills */
.uc-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 450;
  white-space: nowrap;
  transition: background-color 90ms ease-out, color 90ms ease-out, transform 140ms ease-out;
}
.uc-pill-btn:hover {
  background: var(--hover);
  color: var(--ink);
}
.uc-pill-btn.is-active {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
  font-weight: 500;
}
.uc-pill-btn.is-pulsing {
  animation: pocodoPillPulse 140ms ease-out;
}
@keyframes pocodoPillPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.uc-proj-dot {
  font-size: 11px;
  line-height: 1;
  color: var(--proj-dot-color, var(--inbox-tint));
}

/* Locked Right Side: Mode Switch + Dynamic ↑ Send Circle */
.uc-right-controls {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
}
.uc-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.uc-mode-btn:hover {
  background: var(--active);
}
.uc-mode-icon {
  font-size: 12px;
  color: var(--muted);
}
.unified-composer[data-mode="notes"] .uc-mode-icon {
  color: var(--gold);
}
.uc-mode-swap {
  font-size: 11px;
  color: var(--faint);
}
.uc-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--faint);
  transition: background-color 140ms cubic-bezier(0.22, 1, 0.36, 1), color 140ms ease, transform 65ms ease-out;
}
.uc-send-btn.is-ready,
.uc-send-btn:not(:disabled) {
  background: var(--accent);
  color: var(--brand-fg);
  cursor: pointer;
}
.uc-send-btn.is-ready:hover,
.uc-send-btn:not(:disabled):hover {
  background: var(--accent-hover, var(--accent));
}
.uc-send-btn:not(:disabled):active {
  transform: scale(0.92);
}

/* Floating Bars above Unified Composer (Web-4.5 Scheme A · 0ms Instant Mechanical Pop) */
.uc-float-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 38;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09), 0 1px 3px rgba(0, 0, 0, 0.04);
  animation: none;
}
:root[data-theme="dark"] .uc-float-bar {
  background: #222220;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}
/* Multi-line paste split-into-N-tasks lightweight capsule */
.uc-multipaste-bar {
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.uc-multipaste-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.uc-multipaste-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.uc-multipaste-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 11px;
  border: 0;
  border-radius: 8px;
  background: #1f1f1d;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
:root[data-theme="dark"] .uc-multipaste-primary {
  background: #f2f2ee;
  color: #161614;
}
.uc-multipaste-primary .uc-ac-kbd.is-inline {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
:root[data-theme="dark"] .uc-multipaste-primary .uc-ac-kbd.is-inline {
  background: rgba(0, 0, 0, 0.12);
  color: #161614;
}
.uc-multipaste-ghost {
  min-height: 28px;
  padding: 4px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.uc-multipaste-ghost:hover {
  background: var(--hover);
  color: var(--ink);
}
.uc-ac-card,
.uc-tag-suggest {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.uc-ac-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 10px 5px;
  font-size: 12px;
  font-weight: 500;
  color: #8a8a84;
  user-select: none;
}
.uc-ac-count {
  font-variant-numeric: tabular-nums;
}
.uc-ac-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 256px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.uc-ac-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #262624;
  font-size: 13.5px;
  font-weight: 450;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background-color 90ms ease, color 90ms ease;
}
:root[data-theme="dark"] .uc-ac-row {
  color: #dededa;
}
.uc-ac-row.is-active {
  background: #1f1f1d;
  color: #ffffff;
  font-weight: 600;
}
:root[data-theme="dark"] .uc-ac-row.is-active {
  background: #f2f2ee;
  color: #161614;
  font-weight: 600;
}
.uc-ac-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}
.uc-ac-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
}
.uc-ac-icon.is-create {
  color: #c67d2c;
  font-size: 13px;
  font-weight: 700;
}
.uc-ac-row.is-active .uc-ac-icon,
.uc-ac-row.is-active .uc-ac-icon.is-create {
  color: inherit;
}
.uc-ac-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  flex: none;
  background: var(--ac-dot-color, #2f6fed);
}
.uc-ac-row.is-active .uc-ac-dot {
  background: var(--ac-dot-active-color, var(--ac-dot-color, #7bb0ff));
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.36);
}
:root[data-theme="dark"] .uc-ac-row.is-active .uc-ac-dot {
  background: var(--ac-dot-active-color, var(--ac-dot-color, #4e79a7));
  box-shadow: 0 0 0 1.5px rgba(22, 22, 20, 0.22);
}
.uc-ac-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uc-ac-match {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1.5px;
}
.uc-ac-row.is-active .uc-ac-match {
  text-decoration-thickness: 2px;
}
.uc-ac-create-tag {
  font-weight: 650;
}
.uc-ac-row-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-size: 12px;
}
.uc-ac-current {
  color: #8e8e88;
  font-weight: 500;
  white-space: nowrap;
}
.uc-ac-row.is-active .uc-ac-current {
  color: rgba(255, 255, 255, 0.68);
}
:root[data-theme="dark"] .uc-ac-row.is-active .uc-ac-current {
  color: rgba(22, 22, 20, 0.65);
}
.uc-ac-kbd {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(0, 0, 0, 0.07);
  color: #444440;
}
.uc-ac-row.is-active .uc-ac-kbd {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
:root[data-theme="dark"] .uc-ac-row.is-active .uc-ac-kbd {
  background: rgba(0, 0, 0, 0.12);
  color: #161614;
}

.uc-quote-picker {
  gap: 4px;
}
.uc-quote-picker-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px 4px;
}
.uc-quote-picker-head input {
  flex: 1 1 auto;
  min-height: 30px;
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 8px;
}
.uc-quote-results {
  max-height: 220px;
}
.uc-quote-row {
  align-items: center;
  padding: 7px 10px;
}
.uc-quote-row-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.uc-quote-row-meta {
  font-size: 11px;
  color: var(--gold);
  font-weight: 500;
}
.uc-quote-row.is-active .uc-quote-row-meta {
  color: rgba(255, 255, 255, 0.72);
}
:root[data-theme="dark"] .uc-quote-row.is-active .uc-quote-row-meta {
  color: rgba(22, 22, 20, 0.68);
}
.uc-quote-row-text {
  width: 100%;
  font-size: 13px;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.uc-quote-empty {
  margin: 4px 10px 6px;
  font-size: 12.5px;
  color: #8a8a84;
}

.uc-format-capsule {
  right: auto;
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 10px;
}
.uc-format-capsule button {
  min-height: 26px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}
.uc-fmt-sep {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: var(--line);
  margin: 0 3px;
}
.uc-inline-popover {
  bottom: calc(100% + 8px);
  top: auto;
  left: 0;
  max-height: 240px;
  overflow-y: auto;
}
.uc-date-popover {
  left: 88px;
  min-width: 196px;
}
.uc-date-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 10px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.uc-date-custom input {
  width: 122px;
  padding: 3px 6px;
  font-size: 12px;
}

/* Floating Capsule Undo Toast (12px above Unified Composer, never overlaps!) */
.task-action-feedback {
  position: fixed;
  z-index: 55;
  left: 50%;
  right: auto;
  bottom: 118px;
  transform: translateX(-50%);
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #222220;
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: #f6f6f3;
  font-size: 12.5px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  gap: 10px;
}
@media (min-width: 721px) {
  body.signed-in:not(.admin-mode):not(.sidebar-collapsed) .task-action-feedback {
    left: calc(50% + 124px);
  }
}
.task-action-feedback p {
  color: #f6f6f3;
}
.task-action-feedback button {
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #dfb15b;
  font-size: 12px;
  font-weight: 600;
}
.task-action-feedback button:hover {
  background: rgba(255, 255, 255, 0.10);
}
.task-action-feedback #dismiss-task-action {
  color: rgba(255, 255, 255, 0.55);
  padding: 2px 6px;
}

/* Zero-Jump Notes Stream + Apple-Minimal Cards (ONLY 1 quiet ••• + hover ❞) */
.notes-stream-viewport {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 260px);
}
.notes-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.note-card {
  position: relative;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--field);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-ground);
  transition: border-color 140ms ease, box-shadow 220ms ease, background-color 180ms ease;
}
.note-card:hover {
  border-color: var(--border-overlay);
}
.note-card.is-entering {
  animation: noteCardEnter 170ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes noteCardEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.note-card.is-breath {
  animation: noteCardBreath 620ms ease-out;
}
@keyframes noteCardBreath {
  0% { border-color: color-mix(in srgb, var(--accent) 42%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
  100% { border-color: var(--card-border); box-shadow: var(--shadow-ground); }
}
.note-card.is-jump-glow {
  animation: noteJumpGlow 920ms ease-out;
}
@keyframes noteJumpGlow {
  0% { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 28%, transparent); }
  75% { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 14%, transparent); }
  100% { border-color: var(--card-border); box-shadow: var(--shadow-ground); }
}
.note-card.is-quote-flash {
  animation: noteQuoteFlash 280ms ease-out;
}
@keyframes noteQuoteFlash {
  0% { background: color-mix(in srgb, var(--gold) 12%, var(--field)); }
  100% { background: var(--field); }
}

.note-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.note-card-meta {
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.note-card-corner {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.note-corner-quote {
  opacity: 0;
  transition: opacity 110ms ease-out, background-color 90ms ease-out;
}
.note-card:hover .note-corner-quote,
.note-card:focus-within .note-corner-quote {
  opacity: 1;
}
.note-corner-more {
  opacity: 0.55;
  transition: opacity 110ms ease-out, background-color 90ms ease-out;
}
.note-card:hover .note-corner-more,
.note-corner-more:hover {
  opacity: 1;
}

/* Borderless 2px Warm-Gold Ribbon Quote (Zero 4-sided box!) */
.note-quote-ribbon {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-left: 2px solid var(--quote-ribbon-line);
  border-radius: 0 8px 8px 0;
  background: var(--quote-ribbon-bg);
  padding: 7px 12px;
  margin: 0;
  cursor: pointer;
  color: var(--muted);
  transition: background-color 110ms ease;
}
.note-quote-ribbon:hover {
  background: color-mix(in srgb, var(--quote-ribbon-line) 9%, var(--quote-ribbon-bg));
}
.note-quote-ribbon.is-deleted {
  border-left-color: var(--faint);
  opacity: 0.78;
}
.note-quote-ribbon-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--faint);
  margin-bottom: 2px;
}
.note-quote-ribbon-excerpt {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-card-body {
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  cursor: text;
}
.note-inline-tag {
  padding: 0 5px;
  margin: 0 1px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--today) 9%, transparent);
  color: var(--today);
  font-weight: 500;
}
.note-card-media {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.note-card-thumb {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--card-border);
  cursor: pointer;
}

/* Quiet Unified Backlinks & Follow-up Footer Bar */
.note-backlinks-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}
.note-backlinks-trigger,
.note-inline-link {
  min-height: 24px;
  padding: 2px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 450;
}
.note-backlinks-trigger:hover,
.note-inline-link:hover {
  background: var(--hover);
  color: var(--ink);
}
.note-backlinks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  animation: pocodoFadeSlide 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.note-backlink-item {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 6px;
  width: 100%;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 7px;
  text-align: left;
  font-size: 12.5px;
  color: var(--muted);
}
.note-backlink-item::before {
  content: "";
  position: absolute;
  left: -18.5px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--field);
  border: 1.5px solid var(--gold);
}
.note-backlink-item:hover {
  background: var(--hover);
  color: var(--ink);
}
.note-backlink-delta {
  flex: none;
  font-size: 11.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.note-backlink-excerpt {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Desktop Text-Selection Quote Micro-Capsule */
.note-selection-bar {
  position: fixed;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 10px;
  background: #222220;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  animation: pocodoPopIn 110ms cubic-bezier(0.22, 1, 0.36, 1);
}
.note-selection-bar button {
  min-height: 26px;
  padding: 2px 9px;
  border-radius: 7px;
  color: #f6f6f3;
  font-size: 12px;
  font-weight: 500;
}
.note-selection-bar button:hover {
  background: rgba(255, 255, 255, 0.12);
}
.note-selection-bar .uc-fmt-sep {
  background: rgba(255, 255, 255, 0.16);
}

/* 420ms Hover Peek Card (320px) */
.note-quote-peek {
  position: fixed;
  z-index: 68;
  width: min(320px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-overlay);
  background: var(--floating);
  box-shadow: var(--top-highlight), var(--shadow);
  pointer-events: none;
  animation: pocodoPopIn 140ms cubic-bezier(0.22, 1, 0.36, 1);
}
.note-quote-peek-meta {
  font-size: 11.5px;
  font-weight: 550;
  color: var(--gold);
  margin-bottom: 5px;
}
.note-quote-peek-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  max-height: 180px;
  overflow: hidden;
}

/* Floating Instant-Return Capsule (← 回到刚才的片语) */
.note-return-capsule {
  position: fixed;
  z-index: 62;
  left: 50%;
  bottom: 118px;
  transform: translateX(-50%);
  min-height: 34px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-overlay);
  background: var(--floating);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: var(--top-highlight), var(--shadow);
  animation: pocodoSlideInUp 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 721px) {
  body.signed-in:not(.admin-mode):not(.sidebar-collapsed) .note-return-capsule {
    left: calc(50% + 124px);
  }
}

.note-card-menu {
  position: fixed;
  z-index: 72;
  min-width: 176px;
}

/* Right-Side 180ms Thought Evolution Drawer (思想演进脉络) */
.note-evolution-drawer {
  position: fixed;
  z-index: 66;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(372px, 92vw);
  display: flex;
  flex-direction: column;
  background: var(--floating);
  border-left: 1px solid var(--border-overlay);
  box-shadow: var(--top-highlight), -12px 0 36px rgba(0, 0, 0, 0.14);
  animation: evoDrawerIn 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes evoDrawerIn {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}
.evo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 12px 18px;
  border-bottom: 1px solid var(--line);
}
.evo-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}
.evo-spark {
  color: var(--gold);
}
.evo-timeline {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 18px 18px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.evo-node {
  position: relative;
  padding-left: 16px;
  border-left: 1.5px solid var(--line);
  cursor: pointer;
}
.evo-node::before {
  content: "";
  position: absolute;
  left: -5.5px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--floating);
  border: 2px solid var(--gold);
}
.evo-node.is-root::before {
  background: var(--gold);
}
.evo-node.is-current {
  border-left-color: var(--gold);
}
.evo-node-meta {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--faint);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.evo-node-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  padding: 8px 11px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 3%, transparent);
}
.evo-node.is-current .evo-node-body {
  background: var(--quote-ribbon-bg);
  border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
}
.evo-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
.evo-footer input {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
}

/* Apple-Grade Note Detail Sheet (Single-line date + ONLY 1 ••• + Inline auto-save) */
.note-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 68;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(2px);
}
.note-detail-sheet {
  position: fixed;
  z-index: 69;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(600px, calc(100vw - 24px));
  max-height: min(82vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid var(--border-overlay);
  background: var(--floating);
  box-shadow: var(--top-highlight), 0 22px 60px rgba(0, 0, 0, 0.24);
  animation: pocodoPopIn 150ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
.note-detail-head {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 18px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.note-detail-time {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.note-detail-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.note-detail-more-wrap {
  position: relative;
}
.note-detail-menu {
  z-index: 80;
  top: calc(100% + 6px);
  right: 0;
  min-width: 184px;
}
.note-detail-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.note-detail-quotes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.note-detail-quotes:empty {
  display: none;
}
.note-detail-textarea {
  width: 100%;
  min-height: 110px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.72;
  resize: none;
}
.note-detail-textarea:focus {
  outline: none;
  border: 0;
}
.note-detail-save-hint {
  margin-top: 4px;
  font-size: 11px;
  color: var(--faint);
}
.note-detail-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.note-detail-thread-wrap {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.note-detail-thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
}
.note-detail-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 14px;
  border-left: 1.5px solid var(--line);
}
.note-detail-thread-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.note-detail-thread-item::before {
  content: "";
  position: absolute;
  left: -18.5px;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--floating);
  border: 1.5px solid var(--gold);
}
.note-detail-thread-meta {
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.note-detail-thread-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
}
.note-detail-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  flex: none;
}
.note-detail-footer input {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .unified-composer-dock {
    bottom: 62px;
    width: calc(100vw - 16px);
  }
  .note-detail-sheet {
    top: auto;
    bottom: 0;
    transform: translateX(-50%);
    width: 100vw;
    max-height: 86vh;
    border-radius: 20px 20px 0 0;
  }
}


/* ============================================================================
   Wave Web-3: Daily Review 3-Layer Deck · Schedule 4-View · Tags Hub & labelScopes
   ============================================================================ */

/* Hide generic heading when dedicated Wave Web-3 immersive headers take over */
body.custom-main-header .content-heading {
  display: none;
}

/* ---------- 3.1 Daily Review 3-Layer Vertical Symmetric Stack ---------- */
.daily-review-stage {
  max-width: 720px;
  margin: 0 auto;
  padding: 6px 8px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dr-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.dr-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dr-spark {
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
}
.dr-title {
  margin: 0;
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.dr-topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: color-mix(in srgb, var(--gold) 14%, transparent);
  color: var(--gold);
}
.dr-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dr-mode-seg {
  display: inline-flex;
  padding: 2px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  border: 1px solid var(--border);
}
.dr-mode-seg button {
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}
.dr-mode-seg button[aria-selected="true"] {
  background: var(--floating);
  color: var(--ink);
  box-shadow: var(--shadow-ground);
}
.dr-ctrl-btn {
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--floating);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
}
.dr-ctrl-btn:hover {
  background: var(--hover);
}
.dr-gear-wrap {
  position: relative;
}
.dr-quick-popover {
  top: calc(100% + 6px);
  right: 0;
  width: 280px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 64;
}
.dr-pop-label {
  font-size: 11.5px;
  font-weight: 550;
  color: var(--faint);
}
.dr-pop-select {
  width: 100%;
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 13px;
}
.dr-pop-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.dr-pop-chips button {
  min-height: 28px;
  padding: 2px 4px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  justify-content: center;
}
.dr-pop-chips button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--brand-fg);
  border-color: transparent;
}
.dr-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dr-progress-bar {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 5px;
}
.dr-progress-seg {
  flex: 1 1 0;
  height: 14px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.dr-progress-seg::before {
  content: "";
  display: block;
  width: 100%;
  height: 2.5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  transition: background 180ms ease, transform 180ms ease;
}
.dr-progress-seg.is-done::before {
  background: color-mix(in srgb, var(--ink) 38%, transparent);
}
.dr-progress-seg.is-active::before {
  background: var(--ink);
  transform: scaleY(1.25);
}
.dr-progress-seg:hover::before {
  background: var(--gold);
}
.dr-progress-counter {
  flex: none;
  font-size: 12px;
  font-weight: 550;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.dr-fallback-hint {
  margin: -8px 0 0;
  font-size: 12px;
  color: var(--faint);
}
.dr-deck-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding-top: 12px;
}
.dr-card-deck {
  position: relative;
  width: min(580px, 100%);
  min-height: 360px;
}
.dr-card {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--floating);
  box-shadow: var(--top-highlight), var(--shadow);
  padding: 28px 30px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
}
.dr-card[data-layer="0"] {
  position: relative;
  z-index: 3;
  transform: translateY(0) scale(1);
  opacity: 1;
  min-height: 340px;
}
.dr-card[data-layer="1"] {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform: translateY(12px) scale(0.96);
  opacity: 0.65;
  pointer-events: none;
  overflow: hidden;
}
.dr-card[data-layer="2"] {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: translateY(24px) scale(0.92);
  opacity: 0.35;
  pointer-events: none;
  overflow: hidden;
}
.dr-card.is-exiting {
  transform: translateX(-34px) translateY(-6px) rotate(-2deg) scale(0.98) !important;
  opacity: 0 !important;
  transition: transform 160ms ease-out, opacity 160ms ease-out;
}
.dr-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.dr-otd-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--gold) 36%, transparent);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 560;
}
.dr-card-body-wrap {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.dr-card-body-wrap.is-short {
  justify-content: center;
  padding: 18px 0;
}
.dr-card-body-wrap.is-long {
  max-height: 290px;
  overflow-y: auto;
  padding-right: 6px;
  mask-image: linear-gradient(to bottom, #000 84%, transparent 100%);
}
.dr-card-body-wrap.is-long.is-expanded {
  max-height: none;
  mask-image: none;
}
.dr-card-body {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.72;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.dr-expand-btn {
  align-self: flex-start;
  margin-top: 4px;
  padding: 2px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.dr-expand-btn:hover {
  background: var(--hover);
  color: var(--ink);
}
.dr-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dr-card-tag {
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  color: var(--muted);
  font-size: 12px;
}
.dr-card-backlink-pill {
  font-size: 12px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.dr-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.dr-card-left-acts {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dr-icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dr-icon-btn:hover {
  background: var(--hover);
  color: var(--ink);
}
.dr-next-btn {
  min-height: 36px;
  padding: 6px 18px;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: var(--brand-fg);
  font-size: 13.5px;
  font-weight: 560;
}
.dr-next-btn:hover {
  filter: brightness(1.06);
}
.dr-comment-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  animation: pocodoPopIn 140ms cubic-bezier(0.22, 1, 0.36, 1);
}
.dr-comment-box input {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  padding: 4px 13px;
  border-radius: 10px;
  font-size: 13.5px;
}
.dr-key-hints {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  font-size: 11.5px;
  color: var(--faint);
}
.dr-key-hints kbd {
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  font-family: inherit;
  font-size: 11px;
  color: var(--muted);
}
.dr-list-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dr-list-item {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--floating);
  box-shadow: var(--shadow-ground);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dr-complete-card {
  max-width: 500px;
  margin: 28px auto 0;
  padding: 36px 28px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--floating);
  box-shadow: var(--top-highlight), var(--shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.dr-complete-spark {
  font-size: 32px;
  color: var(--gold);
  line-height: 1;
}
.dr-complete-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.dr-complete-stat {
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 4.5%, transparent);
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.dr-complete-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

/* ---------- 3.2 Schedule V2.0 Masterpiece (Notion Calendar × Amie × Apple Calendar) ---------- */
.schedule-hub {
  --sched-hour-h: 60px;
  --sched-coral: #D95B43;
  --sched-coral-soft: rgba(217, 91, 67, 0.11);
  --sched-hairline: rgba(34, 34, 32, 0.085);
  --sched-hairline-soft: rgba(34, 34, 32, 0.055);
  --sched-hairline-strong: rgba(34, 34, 32, 0.14);
  --sched-weekend-tint: rgba(34, 34, 32, 0.024);
  --sched-today-tint: rgba(217, 107, 82, 0.034);
  --sched-past-wash: rgba(128, 128, 120, 0.032);
  --sched-seg-bg: rgba(34, 34, 32, 0.055);
  --sched-ink-pill: #1F1F1D;
  --sched-ink-pill-fg: #FAFAF7;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 52px);
  background: var(--floating);
}
html[data-theme="dark"] .schedule-hub {
  --sched-coral: #EB6E57;
  --sched-coral-soft: rgba(235, 110, 87, 0.16);
  --sched-hairline: rgba(255, 255, 255, 0.085);
  --sched-hairline-soft: rgba(255, 255, 255, 0.05);
  --sched-hairline-strong: rgba(255, 255, 255, 0.145);
  --sched-weekend-tint: rgba(255, 255, 255, 0.018);
  --sched-today-tint: rgba(235, 110, 87, 0.045);
  --sched-past-wash: rgba(0, 0, 0, 0.12);
  --sched-seg-bg: rgba(255, 255, 255, 0.07);
  --sched-ink-pill: #F2F2EE;
  --sched-ink-pill-fg: #141413;
}

/* Single Ultra-Clean 52px Topbar (Zero second toolbar!) */
.sched-topbar {
  height: 52px;
  min-height: 52px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--sched-hairline);
  background: var(--floating);
  position: sticky;
  top: 0;
  z-index: 26;
  flex-shrink: 0;
}
.sched-nav-left,
.sched-nav-center,
.sched-nav-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sched-nav-left {
  flex: 1 1 0;
}
.sched-nav-center {
  flex: 0 0 auto;
}
.sched-nav-right {
  flex: 1 1 0;
  justify-content: flex-end;
}
.sched-month-btn {
  padding: 4px 8px 4px 2px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
}
.sched-month-btn:hover {
  background: var(--sched-seg-bg);
}
.sched-range-sub {
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sched-step-group {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--sched-hairline-strong);
  border-radius: 7px;
  background: var(--floating);
  overflow: hidden;
  flex-shrink: 0;
}
.sched-step-group button {
  height: 27px;
  min-height: 27px;
  padding: 0 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  cursor: pointer;
  white-space: nowrap;
  transition: background 80ms ease, color 80ms ease, transform 65ms cubic-bezier(0, 0, 0.2, 1);
}
.sched-step-group button + button {
  border-left: 1px solid var(--sched-hairline);
}
.sched-step-group button:hover {
  background: var(--sched-seg-bg);
  color: var(--ink);
}
.sched-step-group button:active {
  transform: scale(0.96);
}
#sched-today-btn.is-away {
  color: var(--ink);
  font-weight: 620;
}
#sched-today-btn.is-away::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sched-coral);
  margin-right: 5px;
  vertical-align: 1.5px;
}
.sched-mobile-today-pill {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 7px;
  border: 1.5px solid var(--sched-coral);
  background: var(--sched-coral-soft);
  color: var(--sched-coral);
  font-size: 11.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.sched-mode-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 8px;
  background: var(--sched-seg-bg);
  gap: 2px;
}
.sched-mode-seg button {
  height: 27px;
  min-height: 27px;
  padding: 0 13px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.sched-mode-seg button:hover {
  color: var(--ink);
}
.sched-mode-seg button[aria-selected="true"] {
  background: var(--floating);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(20, 20, 18, 0.08), 0 0 0 1px rgba(20, 20, 18, 0.04);
}
html[data-theme="dark"] .sched-mode-seg button[aria-selected="true"] {
  background: #2C2C29;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.sched-backlog-btn {
  height: 29px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--sched-hairline-strong);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.sched-backlog-btn:hover {
  background: var(--sched-seg-bg);
  color: var(--ink);
}
.sched-backlog-btn.is-active {
  background: var(--sched-ink-pill);
  color: var(--sched-ink-pill-fg);
  border-color: transparent;
}
.sched-badge-num {
  font-size: 11px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--sched-seg-bg);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 17px;
}
.sched-backlog-btn.is-active .sched-badge-num {
  background: rgba(255, 255, 255, 0.22);
  color: var(--sched-ink-pill-fg);
}
html[data-theme="dark"] .sched-backlog-btn.is-active .sched-badge-num {
  background: rgba(20, 20, 19, 0.16);
}
.sched-gear-wrap {
  position: relative;
}
.sched-more-btn {
  width: 29px;
  height: 29px;
  border-radius: 7px;
  border: 1px solid var(--sched-hairline-strong);
}
.sched-options-popover {
  top: calc(100% + 6px);
  right: 0;
  min-width: 204px;
  z-index: 64;
}
.sched-mini-month {
  margin: 10px 18px 0;
  border-radius: 12px;
  border: 1px solid var(--sched-hairline-strong);
  background: var(--floating);
  box-shadow: var(--shadow-ground);
  padding: 12px 14px;
  max-width: 340px;
  animation: pocodoPopoverIn 95ms cubic-bezier(0, 0, 0.2, 1) both;
}
.sched-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  text-align: center;
}
.sched-mini-wk {
  font-size: 11px;
  color: var(--faint);
  padding: 4px 0;
}
.sched-mini-day {
  position: relative;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}
.sched-mini-day:hover {
  background: var(--hover);
}
.sched-mini-day.is-out {
  color: var(--faint);
  opacity: 0.5;
}
.sched-mini-day.is-today {
  background: var(--sched-coral);
  color: #ffffff;
  font-weight: 600;
}
.sched-mini-day.is-selected:not(.is-today) {
  outline: 1.5px solid var(--ink);
  font-weight: 600;
}
.sched-dot-tiny {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sched-coral);
}
.sched-mini-day.is-today .sched-dot-tiny {
  background: #ffffff;
}

/* Workspace Split: Main Calendar Stage + Collapsible 264px Backlog Drawer */
.sched-workspace-row {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  position: relative;
}
.sched-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Collapsible Right Unscheduled Backlog Drawer (264px, Akiflow / Sunsama style) */
.sched-backlog-drawer {
  width: 264px;
  flex: 0 0 264px;
  border-left: 1px solid var(--sched-hairline);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 104px);
  position: sticky;
  top: 52px;
  transition: width 150ms cubic-bezier(0.22, 1, 0.36, 1), flex-basis 150ms cubic-bezier(0.22, 1, 0.36, 1), opacity 120ms ease;
  overflow: hidden;
}
.sched-backlog-drawer.is-collapsed {
  width: 0;
  flex-basis: 0;
  border-left-width: 0;
  opacity: 0;
  pointer-events: none;
}
.sched-backlog-head {
  padding: 12px 14px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 620;
  color: var(--ink);
  white-space: nowrap;
}
.sched-backlog-sub {
  padding: 0 14px 10px;
  font-size: 11.5px;
  color: var(--faint);
  border-bottom: 1px solid var(--sched-hairline);
  line-height: 1.4;
}
.sched-backlog-list {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  flex: 1 1 auto;
}
.sched-backlog-empty {
  padding: 28px 10px;
  text-align: center;
  font-size: 12px;
  color: var(--faint);
}
.sched-backlog-item {
  background: var(--floating);
  border: 1px solid var(--sched-hairline);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: box-shadow 90ms ease, border-color 90ms ease, transform 65ms ease;
}
.sched-backlog-item:hover {
  border-color: var(--sched-hairline-strong);
  box-shadow: 0 2px 6px rgba(20, 20, 18, 0.06);
}
.sched-backlog-item:active {
  cursor: grabbing;
}
.sched-backlog-row1 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 520;
  color: var(--ink);
  line-height: 1.35;
}
.sched-backlog-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.sched-backlog-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sched-backlog-row2 {
  padding-left: 14px;
  font-size: 11px;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  font-variant-numeric: tabular-nums;
}

/* ==================== VIEW 1: QUIET AGENDA LIST + EXPANDABLE WEEK ⇄ MONTH CARD ==================== */
.sched-agenda-wrap {
  flex: 1 1 auto;
  overflow-y: auto;
  background: var(--surface);
  padding: 16px 24px 88px;
}
.sched-agenda-axis {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sched-cal-card {
  background: var(--floating);
  border: 1px solid var(--sched-hairline);
  border-radius: 14px;
  padding: 10px 10px 6px;
  box-shadow: 0 1px 3px rgba(20, 20, 18, 0.05);
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  user-select: none;
  transition: border-color 120ms ease;
}
.sched-cal-card:active {
  cursor: grabbing;
}
.sched-cal-card.is-dragging-v {
  border-color: var(--sched-coral);
}
.sched-cal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 8px;
  gap: 8px;
  flex-wrap: wrap;
}
.sched-cal-month-toggle {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.sched-cal-month-toggle:hover {
  background: var(--sched-seg-bg);
}
.sched-cal-chev {
  display: inline-block;
  font-size: 11px;
  color: var(--faint);
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.sched-cal-card.is-expanded .sched-cal-chev {
  transform: rotate(180deg);
}
.sched-cal-top-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sched-cal-hint {
  font-size: 11px;
  color: var(--faint);
}
.sched-range-pills {
  display: inline-flex;
  gap: 3px;
}
.sched-range-pills button {
  min-height: 24px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--sched-hairline);
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
}
.sched-range-pills button[aria-pressed="true"] {
  background: var(--sched-seg-bg);
  color: var(--ink);
  border-color: var(--sched-hairline-strong);
  font-weight: 580;
}
.sched-wk-labels {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  margin-bottom: 3px;
}
.sched-wk-labels span {
  font-size: 11px;
  color: var(--faint);
  font-weight: 500;
  padding: 2px 0;
}
.sched-cal-viewport {
  overflow: hidden;
  transition: height 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.sched-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  row-gap: 4px;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), opacity 140ms ease;
}
.sched-slide-left {
  animation: schedSlideLeft 190ms cubic-bezier(0.22, 1, 0.36, 1);
}
.sched-slide-right {
  animation: schedSlideRight 190ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes schedSlideLeft {
  from { opacity: 0.38; transform: translateX(26px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes schedSlideRight {
  from { opacity: 0.38; transform: translateX(-26px); }
  to { opacity: 1; transform: translateX(0); }
}
.sched-strip-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 44px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  transition: background 80ms ease;
}
.sched-strip-day:hover {
  background: var(--sched-seg-bg);
}
.sched-strip-day.is-out {
  opacity: 0.34;
}
.sched-strip-day.is-drop-target {
  outline: 1.5px dashed var(--sched-coral);
  background: var(--sched-coral-soft);
}
.sched-strip-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  border: 1.5px solid transparent;
}
.sched-strip-day.is-today .sched-strip-num {
  background: var(--sched-coral);
  color: #ffffff;
  font-weight: 650;
}
.sched-strip-day.is-selected:not(.is-today) .sched-strip-num {
  border-color: var(--ink);
  background: var(--sched-seg-bg);
  font-weight: 650;
}
.sched-strip-dot-spacer {
  height: 4px;
}
.sched-grabber-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0 2px;
  cursor: ns-resize;
  border: 0;
  background: transparent;
  width: 100%;
}
.sched-grabber-pill {
  width: 36px;
  height: 4px;
  border-radius: 99px;
  background: var(--sched-hairline-strong);
  transition: width 120ms ease, background 120ms ease;
}
.sched-grabber-zone:hover .sched-grabber-pill {
  width: 48px;
  background: var(--faint);
}

/* Quiet Day Groups (Empty days collapse into muted 1-line date headers!) */
.sched-day-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
}
.sched-day-group.is-quiet {
  margin-bottom: 0;
}
.sched-day-group.is-drop-target {
  border-radius: 10px;
  outline: 1.5px dashed var(--sched-coral);
  background: var(--sched-coral-soft);
  padding: 4px;
}
.sched-day-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--sched-hairline);
}
.sched-day-group.is-quiet .sched-day-group-head {
  border-bottom-color: var(--sched-hairline-soft);
  opacity: 0.62;
  transition: opacity 90ms ease;
}
.sched-day-group.is-quiet .sched-day-group-head:hover {
  opacity: 1;
}
.sched-day-group.is-selected-day .sched-day-group-head {
  border-bottom-color: var(--muted);
}
.sched-day-group-title {
  font-size: 13px;
  font-weight: 640;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.sched-day-group-title.is-overdue {
  color: var(--sched-coral);
}
.sched-today-tag {
  font-size: 11px;
  color: var(--sched-coral);
  background: var(--sched-coral-soft);
  padding: 1px 6px;
  border-radius: 5px;
  font-weight: 600;
}
.sched-lunar {
  font-size: 11px;
  font-weight: 420;
  color: var(--faint);
}
.sched-day-group-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.sched-quiet-add-btn {
  opacity: 0;
  border: 0;
  background: var(--sched-seg-bg);
  color: var(--ink);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 90ms ease, transform 65ms ease;
}
.sched-day-group-head:hover .sched-quiet-add-btn,
.sched-quiet-add-btn:focus-visible {
  opacity: 1;
}
.sched-agenda-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--floating);
  border: 1px solid var(--sched-hairline-soft);
  cursor: pointer;
  transition: border-color 90ms ease, background 90ms ease;
}
.sched-agenda-row:hover {
  border-color: var(--sched-hairline-strong);
}
.sched-agenda-row.is-done {
  opacity: 0.52;
}
.sched-agenda-row.is-done .sched-agenda-title {
  text-decoration: line-through;
}
.sched-check-btn {
  width: 17px;
  height: 17px;
  min-width: 17px;
  min-height: 17px;
  padding: 0;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--tb-c, var(--faint));
  background: transparent;
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 140ms cubic-bezier(0.34, 1.56, 0.64, 1), background 100ms ease;
}
.sched-check-btn:hover {
  transform: scale(1.12);
}
.sched-check-btn.is-checked {
  background: var(--tb-c, var(--accent));
  border-color: var(--tb-c, var(--accent));
}
.sched-agenda-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sched-agenda-time-pill {
  font-size: 11.5px;
  font-weight: 540;
  color: var(--tb-c, var(--muted));
  background: color-mix(in srgb, var(--tb-c, var(--muted)) 12%, transparent);
  padding: 2px 7px;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
html[data-theme="dark"] .sched-agenda-time-pill {
  background: color-mix(in srgb, var(--tb-c, var(--muted)) 18%, transparent);
}
.sched-agenda-proj {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--faint);
  flex-shrink: 0;
}

/* ==================== VIEW 2: APPLE MONTH GRID ==================== */
.sched-month-wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 110px);
  background: var(--floating);
  touch-action: pan-y;
}
.sched-month-wkrow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid var(--sched-hairline);
  background: var(--floating);
}
.sched-month-wkcell {
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--faint);
  text-align: left;
}
.sched-month-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.sched-month-cell {
  min-height: 112px;
  padding: 6px 8px 8px;
  border-right: 1px solid var(--sched-hairline);
  border-bottom: 1px solid var(--sched-hairline);
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  transition: background 90ms ease;
  position: relative;
  overflow: hidden;
}
.sched-month-cell:nth-child(7n) {
  border-right: 0;
}
.sched-month-cell.is-weekend {
  background: var(--sched-weekend-tint);
}
.sched-month-cell.is-today {
  background: var(--sched-today-tint);
}
.sched-month-cell.is-out {
  opacity: 0.42;
}
.sched-month-cell.is-selected {
  outline: 1.5px solid var(--ink);
  outline-offset: -1.5px;
  z-index: 2;
}
.sched-month-cell.is-drop-target {
  background: var(--sched-coral-soft);
  outline: 1.5px dashed var(--sched-coral);
  outline-offset: -2px;
}
.sched-cell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 2px;
}
.sched-cell-left {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.sched-cell-num {
  min-width: 23px;
  height: 23px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.sched-month-cell.is-today .sched-cell-num {
  background: var(--sched-coral);
  color: #ffffff;
}
.sched-cell-ratio {
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.sched-cell-task {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 5px;
  border-radius: 5px;
  font-size: 11.8px;
  line-height: 1.35;
  color: var(--ink);
  text-align: left;
  border: 0;
  background: transparent;
  width: 100%;
  position: relative;
  cursor: pointer;
}
.sched-cell-task:hover {
  background: var(--sched-seg-bg);
}
.sched-cell-task.is-done {
  opacity: 0.48;
  text-decoration: line-through;
}
.sched-cell-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex: none;
  background: var(--muted);
}
.sched-cell-dot.p1 { background: var(--p1); }
.sched-cell-dot.p2 { background: var(--p2); }
.sched-cell-dot.p3 { background: var(--p3); }
.sched-cell-inline-chk {
  display: none;
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  max-width: 14px;
  max-height: 14px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  padding: 0;
  flex: none;
  border-radius: 50%;
  border: 1.4px solid var(--muted);
  background: var(--floating);
  color: #ffffff;
  font-size: 11px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sched-cell-task:hover .sched-cell-dot,
.sched-cell-task.is-done .sched-cell-dot {
  display: none;
}
.sched-cell-task:hover .sched-cell-inline-chk,
.sched-cell-task.is-done .sched-cell-inline-chk {
  display: inline-flex;
}
.sched-cell-task.is-done .sched-cell-inline-chk {
  background: var(--accent);
  border-color: var(--accent);
}
.sched-cell-task-text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sched-cell-more {
  padding: 1px 6px;
  font-size: 11px;
  color: var(--faint);
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

/* ==================== VIEW 3 & 4: SEAMLESS 60px/h 24h ARCHITECTURAL TIME GRID ==================== */
.sched-cols-wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--floating);
  user-select: none;
}
.sched-cols-head {
  display: grid;
  grid-template-columns: 58px repeat(var(--sched-cols, 7), minmax(0, 1fr));
  border-bottom: 1px solid var(--sched-hairline);
  background: var(--floating);
  flex-shrink: 0;
  padding-right: 6px;
}
.sched-tg-corner {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 9px 8px 0;
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.sched-col-head-cell {
  padding: 9px 10px 8px;
  border-left: 1px solid var(--sched-hairline);
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  min-width: 0;
  transition: background 80ms ease;
}
.sched-col-head-cell:hover {
  background: var(--sched-seg-bg);
}
.sched-col-head-cell.is-weekend {
  background: var(--sched-weekend-tint);
}
.sched-col-head-cell.is-today {
  background: var(--sched-today-tint);
}
.sched-col-head-cell.is-selected:not(.is-today) {
  box-shadow: inset 0 -2px 0 var(--ink);
}
.sched-tg-wk {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--faint);
  white-space: nowrap;
}
.sched-col-head-cell.is-today .sched-tg-wk {
  color: var(--sched-coral);
  font-weight: 620;
}
.sched-tg-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  flex-shrink: 0;
}
.sched-col-head-cell.is-today .sched-tg-num {
  background: var(--sched-coral);
  color: #ffffff;
}
.sched-col-head-cell .sched-lunar {
  margin-left: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Seamless Unified All-Day Strip */
.sched-allday-row {
  display: grid;
  grid-template-columns: 58px repeat(var(--sched-cols, 7), minmax(0, 1fr));
  border-bottom: 1px solid var(--sched-hairline-strong);
  background: var(--floating);
  flex-shrink: 0;
  padding-right: 6px;
}
.sched-allday-label {
  font-size: 11px;
  color: var(--faint);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 9px 6px 2px;
}
.sched-allday-col {
  border-left: 1px solid var(--sched-hairline);
  padding: 5px;
  min-height: 34px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.sched-allday-col.is-weekend {
  background: var(--sched-weekend-tint);
}
.sched-allday-col.is-today {
  background: var(--sched-today-tint);
}
.sched-allday-col.is-drop-target {
  background: var(--sched-coral-soft);
}
.sched-allday-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 520;
  line-height: 1.25;
  cursor: pointer;
  border-left: 2.5px solid var(--tb-c, var(--accent));
  background: color-mix(in srgb, var(--tb-c, var(--accent)) 12%, var(--floating));
  color: var(--ink);
  min-width: 0;
  transition: filter 80ms ease, transform 65ms ease;
}
html[data-theme="dark"] .sched-allday-chip {
  background: color-mix(in srgb, var(--tb-c, var(--accent)) 17%, var(--floating));
}
.sched-allday-chip:hover {
  filter: brightness(0.96);
}
.sched-allday-chip.is-done {
  opacity: 0.48;
  text-decoration: line-through;
}
.sched-allday-chk {
  width: 13px;
  height: 13px;
  min-width: 13px;
  min-height: 13px;
  max-width: 13px;
  max-height: 13px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  border-radius: 50%;
  border: 1.4px solid var(--tb-c, var(--accent));
  background: var(--floating);
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  color: #ffffff;
  padding: 0;
  cursor: pointer;
}
.sched-allday-chip.is-done .sched-allday-chk {
  background: var(--tb-c, var(--accent));
}
.sched-allday-ttl {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Scrollable 24-Hour Grid (60px/h = 1440px, CSS repeating-linear-gradient = 0 hour DOM nodes!) */
.sched-timeline-scroll {
  height: calc(100vh - 205px);
  min-height: 460px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--sched-hairline-strong) transparent;
}
.sched-timeline-body {
  display: grid;
  grid-template-columns: 58px repeat(var(--sched-cols, 7), minmax(0, 1fr));
  position: relative;
  height: calc(var(--sched-hour-h) * 24);
}
.sched-hour-axis {
  position: relative;
  height: 100%;
}
.sched-hour-label {
  position: absolute;
  right: 9px;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 450;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  line-height: 1;
}
.sched-now-pill {
  position: absolute;
  right: 6px;
  transform: translateY(-50%);
  background: var(--sched-coral);
  color: #ffffff;
  font-size: 11px;
  font-weight: 650;
  padding: 1.5px 5px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  z-index: 25;
  box-shadow: 0 2px 6px rgba(217, 91, 67, 0.35);
  pointer-events: none;
  line-height: 1.25;
}
.sched-day-timeline {
  position: relative;
  border-left: 1px solid var(--sched-hairline);
  height: 100%;
  cursor: crosshair;
  /* Zero-DOM-node 60px solid hour hairlines */
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--sched-hour-h) - 1px),
    var(--sched-hairline) calc(var(--sched-hour-h) - 1px),
    var(--sched-hairline) var(--sched-hour-h)
  );
}
/* Zero-DOM-node crisp dashed :30 half-hour hairlines */
.sched-day-timeline::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--sched-hour-h) / 2 - 1px),
    var(--sched-hairline-soft) calc(var(--sched-hour-h) / 2 - 1px),
    var(--sched-hairline-soft) calc(var(--sched-hour-h) / 2),
    transparent calc(var(--sched-hour-h) / 2),
    transparent var(--sched-hour-h)
  );
  -webkit-mask-image: repeating-linear-gradient(to right, #000 0 4px, transparent 4px 8px);
  mask-image: repeating-linear-gradient(to right, #000 0 4px, transparent 4px 8px);
}
.sched-day-timeline.is-weekend {
  background-color: var(--sched-weekend-tint);
}
.sched-day-timeline.is-today {
  background-color: var(--sched-today-tint);
}
.sched-past-wash {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--sched-past-wash);
  pointer-events: none;
  z-index: 1;
}
.sched-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--sched-coral);
  z-index: 20;
  pointer-events: none;
}
.sched-now-line::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -3.25px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sched-coral);
}
.sched-now-line-soft {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: color-mix(in srgb, var(--sched-coral) 22%, transparent);
  z-index: 10;
  pointer-events: none;
}

/* 15m Hover Preview, Drag-to-Create Ghost & Precise 15m Drop Projection */
.sched-hover-preview {
  position: absolute;
  left: 3px;
  right: 3px;
  height: 30px;
  border-radius: 5px;
  background: rgba(34, 34, 32, 0.032);
  border: 1px dashed var(--sched-hairline-strong);
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 550;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  z-index: 5;
  display: none;
}
html[data-theme="dark"] .sched-hover-preview {
  background: rgba(255, 255, 255, 0.045);
}
.sched-drop-preview,
.sched-drag-ghost {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 6px;
  background: var(--sched-coral-soft);
  border: 1.5px dashed var(--sched-coral);
  padding: 4px 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sched-coral);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  z-index: 28;
}
.sched-drop-preview {
  display: none;
}

/* Morandi 12% Pastel Event Timeblock (Light 12% / Dark 17% Optical Calibration) */
.sched-timed-card {
  position: absolute;
  left: 3px;
  right: 3px;
  z-index: 12;
  padding: 5px 8px 6px 9px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--tb-c, var(--accent)) 22%, transparent);
  border-left: 3px solid var(--tb-c, var(--accent));
  background: color-mix(in srgb, var(--tb-c, var(--accent)) 12%, var(--floating));
  color: var(--ink);
  text-align: left;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: grab;
  transition: box-shadow 90ms ease, filter 90ms ease;
}
html[data-theme="dark"] .sched-timed-card {
  background: color-mix(in srgb, var(--tb-c, var(--accent)) 17%, var(--floating));
  border-color: color-mix(in srgb, var(--tb-c, var(--accent)) 30%, transparent);
  border-left-color: var(--tb-c, var(--accent));
}
.sched-timed-card:hover {
  z-index: 18;
  box-shadow: 0 2px 8px rgba(20, 20, 18, 0.1);
  filter: brightness(0.985);
}
.sched-timed-card:active {
  cursor: grabbing;
}
.sched-timed-card.is-done {
  opacity: 0.48;
}
.sched-timed-card.is-done .sched-timed-card-title {
  text-decoration: line-through;
}
.sched-tb-head {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}
.sched-tb-chk {
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  max-width: 14px;
  max-height: 14px;
  aspect-ratio: 1 / 1;
  align-self: flex-start;
  box-sizing: border-box;
  margin-top: 1.5px;
  border-radius: 50%;
  border: 1.5px solid var(--tb-c, var(--accent));
  background: var(--floating);
  flex: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  color: #ffffff;
  padding: 0;
  transition: transform 130ms cubic-bezier(0.34, 1.56, 0.64, 1), background 90ms ease;
}
.sched-tb-chk:hover {
  transform: scale(1.12);
}
.sched-timed-card.is-done .sched-tb-chk {
  background: var(--tb-c, var(--accent));
}
.sched-timed-card-title {
  font-size: 12.2px;
  font-weight: 560;
  line-height: 1.3;
  color: var(--ink);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-width: 0;
}
.sched-timed-card-time {
  font-size: 11px;
  font-weight: 520;
  color: var(--tb-c, var(--muted));
  font-variant-numeric: tabular-nums;
  padding-left: 19px;
  opacity: 0.94;
}
.sched-timed-card.is-short {
  flex-direction: row;
  align-items: center;
  padding: 2px 7px;
  gap: 6px;
}
.sched-timed-card.is-short .sched-timed-card-time {
  padding-left: 0;
  margin-left: auto;
  flex-shrink: 0;
}
.sched-timed-card.is-short .sched-timed-card-title {
  -webkit-line-clamp: 1;
}
.sched-tb-resize {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 0;
  height: 7px;
  cursor: ns-resize;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sched-tb-resize::after {
  content: "";
  width: 22px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--tb-c, var(--accent));
  opacity: 0;
  transition: opacity 90ms ease;
}
.sched-timed-card:hover .sched-tb-resize::after {
  opacity: 0.6;
}

/* 95ms Inline Quick-Create Popover beside newly dragged Timeblock */
.sched-quick-pop {
  position: fixed;
  width: 292px;
  background: var(--floating);
  border: 1px solid var(--border-overlay);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(20, 20, 18, 0.16), 0 2px 6px rgba(20, 20, 18, 0.08);
  padding: 12px;
  z-index: 1200;
  animation: pocodoPopoverIn 95ms cubic-bezier(0, 0, 0.2, 1) both;
}
.sched-quick-pop-input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 560;
  padding: 4px 2px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.sched-quick-pop-meta {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}
.sched-quick-pop-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sched-quick-pop-proj {
  flex: 1 1 auto;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
}
.sched-quick-pop-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.sched-quick-pop-actions button {
  height: 28px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 540;
  cursor: pointer;
}
@media (max-width: 1080px) {
  .sched-topbar {
    height: auto;
    min-height: 52px;
    padding: 8px 14px;
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .sched-nav-left,
  .sched-nav-right {
    flex: 0 1 auto;
  }
  .sched-range-sub {
    display: none;
  }
}

/* ---------- 3.3 Tags Main Canvas & labelScopes 5-State Control ---------- */
.tags-hub-panel {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 110px;
}
.tags-hub-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.tags-hub-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 280px;
}
.tags-hub-title {
  margin: 0;
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.tags-hub-search {
  max-width: 240px;
  height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
}
.tags-hub-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tags-perspective-seg {
  display: inline-flex;
  padding: 2px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--ink) 4.5%, transparent);
}
.tags-perspective-seg button {
  min-height: 26px;
  padding: 2px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}
.tags-perspective-seg button[aria-selected="true"] {
  background: var(--floating);
  color: var(--ink);
  box-shadow: var(--shadow-ground);
}
.tags-quiet-btn {
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
}
.tags-quiet-btn:hover {
  background: var(--hover);
  color: var(--ink);
}
.tags-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 580;
  color: var(--faint);
  padding: 0 2px;
}
.tags-scope-hint {
  font-weight: 400;
}
.tags-smart-views {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
}
.smart-view-card {
  height: 52px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--floating);
  box-shadow: var(--shadow-ground);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 520;
  position: relative;
  transition: transform 110ms ease, border-color 110ms ease;
}
.smart-view-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--ink) 16%, transparent);
}
.smart-view-card.is-new {
  border-style: dashed;
  background: transparent;
  color: var(--muted);
  justify-content: center;
  box-shadow: none;
}
.smart-view-lead {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.smart-view-icon {
  font-size: 15px;
  line-height: 1;
}
.smart-view-icon.is-coral { color: var(--today); }
.smart-view-icon.is-gold { color: var(--gold); }
.smart-view-icon.is-inbox { color: var(--inbox-tint); }
.smart-view-count {
  font-size: 12.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.smart-view-pin {
  opacity: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  padding: 2px 4px;
  font-size: 13px;
  transition: opacity 110ms ease;
}
.smart-view-card:hover .smart-view-pin,
.smart-view-pin.is-pinned {
  opacity: 1;
}

/* Multi-level 42px Tag Tree Card */
.tags-tree-card {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--floating);
  box-shadow: var(--shadow-ground);
  overflow: visible;
}
.tag-tree-row {
  position: relative;
  min-height: 42px;
  padding: 0 12px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  transition: background 110ms ease;
}
.tag-tree-row:last-child {
  border-bottom: 0;
}
.tag-tree-row:hover {
  background: var(--hover);
}
.tag-tree-row[data-depth="1"] { padding-left: 32px; }
.tag-tree-row[data-depth="2"] { padding-left: 50px; }
.tag-tree-row[data-depth="3"] { padding-left: 68px; }
.tag-tree-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tag-tree-toggle {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--faint);
  font-size: 11px;
  flex: none;
}
.tag-tree-link {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 6px 0;
  text-align: left;
  color: var(--ink);
  font-size: 14px;
  font-weight: 480;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tag-tree-link:hover {
  background: transparent;
}
.tag-tree-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.tag-tree-count {
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.tag-scope-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.tag-scope-pill {
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 520;
  transition: opacity 110ms ease, background 110ms ease;
}
.tag-scope-pill.is-isolated {
  opacity: 0;
}
.tag-tree-row:hover .tag-scope-pill.is-isolated,
.tag-tree-row:focus-within .tag-scope-pill.is-isolated,
.tag-scope-pill[aria-expanded="true"] {
  opacity: 1;
}
.tag-scope-pill.is-both {
  background: color-mix(in srgb, var(--gold) 14%, transparent);
  border-color: color-mix(in srgb, var(--gold) 32%, transparent);
  color: var(--gold);
}
.tag-hide-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--faint);
  opacity: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 110ms ease, background 110ms ease, color 110ms ease;
}
.tag-tree-row:hover .tag-hide-btn,
.tag-tree-row:focus-within .tag-hide-btn {
  opacity: 1;
}
.tag-hide-btn:hover {
  background: var(--hover);
  color: var(--ink);
}
/* 2-Click Inline 5-State Micro-Bar */
.tag-scope-bar {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 65;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 11px;
  border: 1px solid var(--border-overlay);
  background: var(--floating);
  box-shadow: var(--top-highlight), var(--shadow);
  white-space: nowrap;
  animation: pocodoPopIn 110ms cubic-bezier(0.22, 1, 0.36, 1);
}
.tag-scope-bar button {
  min-height: 26px;
  padding: 3px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.tag-scope-bar button:hover {
  background: var(--hover);
  color: var(--ink);
}
.tag-scope-bar button.is-active {
  background: var(--accent);
  color: var(--brand-fg);
}
.tags-footer-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.tags-hidden-drawer {
  flex: 1 1 280px;
  font-size: 12.5px;
  color: var(--muted);
}
.tags-hidden-drawer summary {
  cursor: pointer;
  padding: 4px 2px;
  user-select: none;
}
.tags-hidden-list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-hidden-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--floating);
  font-size: 12px;
  color: var(--muted);
}
.tag-hidden-chip button {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0 2px;
  font-size: 11.5px;
  font-weight: 580;
}

/* Dual-Engine Topic Aggregation Header & Notes Block */
.label-hub-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.label-hub-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.label-hub-crumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.label-hub-title {
  margin: 0;
  font-size: 20px;
  font-weight: 620;
  color: var(--ink);
}
.label-hub-tabs {
  display: inline-flex;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}
.label-hub-tabs button {
  padding: 6px 2px 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 520;
}
.label-hub-tabs button[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.label-hub-notes {
  margin-top: 22px;
  padding-bottom: 100px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.label-hub-notes-head {
  font-size: 12.5px;
  font-weight: 580;
  color: var(--faint);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.visual-filter-dialog {
  width: min(440px, calc(100vw - 24px));
  border-radius: 16px;
  border: 1px solid var(--border-overlay);
  background: var(--floating);
  color: var(--ink);
  padding: 20px;
}
.visual-filter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vf-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vf-block-label {
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
}
.vf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.vf-chips button {
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.vf-chips button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--brand-fg);
  border-color: transparent;
}
@media (max-width: 720px) {
  .sched-month-cell {
    min-height: 70px;
    padding: 4px;
  }
  .sched-cell-task {
    font-size: 11px;
  }
  .dr-card {
    padding: 20px 18px 16px;
  }
  .tag-scope-pill.is-isolated,
  .tag-hide-btn {
    opacity: 1;
  }
}


/* ============================================================================
   Wave Web-4: Settings V3.0 Studio · Task Detail V4.0 · Raycast Ctrl+K · Auth
   ============================================================================ */

/* Unified Tactile Switch (34x19px) & Keycap */
.pocodo-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 34px;
  height: 19px;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  cursor: pointer;
  flex: none;
  transition: background 150ms cubic-bezier(0.22, 1, 0.36, 1), border-color 150ms ease;
}
.pocodo-switch::after {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--floating);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transform: translateX(0);
  transition: transform 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
.pocodo-switch[aria-checked="true"] {
  background: var(--accent);
  border-color: var(--accent);
}
.pocodo-switch[aria-checked="true"]::after {
  background: var(--brand-fg);
  transform: translateX(15px);
}
.pocodo-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 5px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  background: color-mix(in srgb, var(--ink) 4%, var(--floating));
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1;
}

/* ---------- 4.1 Settings Center V3.0 Full-Canvas Studio ---------- */
.settings-studio {
  position: fixed;
  inset: 0;
  z-index: 74;
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  background: var(--base);
  color: var(--ink);
  animation: pocodoPopIn 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.settings-studio[hidden] {
  display: none !important;
}
.ss-rail {
  position: static;
  top: auto;
  align-self: stretch;
  height: 100%;
  min-height: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 14px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.ss-back-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 5px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 560;
}
.ss-back-btn:hover {
  background: var(--hover);
}
.ss-search {
  width: 100%;
  height: 30px;
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--floating);
  color: var(--ink);
  font-size: 12.5px;
}
.ss-nav {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ss-nav-section {
  padding: 10px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
  letter-spacing: 0.02em;
}
.ss-nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 32px;
  padding: 5px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}
.ss-nav button:hover {
  background: var(--hover);
  color: var(--ink);
}
.ss-nav button[aria-current="page"] {
  background: var(--floating);
  color: var(--ink);
  font-weight: 580;
  box-shadow: var(--shadow-ground);
}
.ss-nav button[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 2.5px;
  border-radius: 999px;
  background: var(--accent);
}
.ss-rail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 2px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--faint);
}
.ss-main {
  position: relative;
  overflow-y: auto;
  padding: 28px 28px 64px;
  background: var(--base);
}
.ss-saved-pill {
  position: fixed;
  top: 18px;
  right: 24px;
  z-index: 80;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-overlay);
  background: var(--floating);
  color: var(--ink);
  font-size: 12px;
  font-weight: 540;
  box-shadow: var(--shadow-ground);
}
.ss-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ss-page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.ss-page-head h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -0.015em;
}
.ss-group-title {
  margin: 4px 0 -10px 2px;
  font-size: 12px;
  font-weight: 580;
  color: var(--faint);
}
.ss-card {
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--floating);
  box-shadow: var(--shadow-ground);
  overflow: hidden;
}
.ss-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.ss-row:last-child {
  border-bottom: 0;
}
.ss-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ss-row-title {
  font-size: 13.5px;
  font-weight: 530;
  color: var(--ink);
}
.ss-row-desc {
  font-size: 12px;
  color: var(--faint);
}
.ss-row-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

/* Live Miniature Workspace Preview inside Appearance */
.ss-mini-stage {
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--base);
  box-shadow: var(--shadow-ground);
  overflow: hidden;
}
.ss-mini-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  font-size: 11.5px;
  color: var(--muted);
}
.ss-mini-window {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 112px;
}
.ss-mini-side {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.ss-mini-heat {
  display: grid;
  grid-template-columns: repeat(7, 8px);
  gap: 3px;
  margin-top: 4px;
}
.ss-mini-heat span {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--heat-0);
}
.ss-mini-heat span.h2 { background: var(--heat-2); }
.ss-mini-heat span.h4 { background: var(--heat-4); }
.ss-mini-canvas {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ss-mini-task {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--floating);
  font-size: 11.5px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 7px;
}
.ss-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ss-mode-card {
  padding: 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--floating);
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
  color: var(--ink);
}
.ss-mode-card[aria-pressed="true"] {
  border-color: var(--accent);
}
.ss-mode-thumb {
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: grid;
  grid-template-columns: 32% 1fr;
}
.ss-mode-thumb.is-light > span:first-child { background: #f1f1ee; }
.ss-mode-thumb.is-light > span:last-child { background: #f6f6f3; }
.ss-mode-thumb.is-dark > span:first-child { background: #141414; }
.ss-mode-thumb.is-dark > span:last-child { background: #1c1c1b; }
.ss-mode-thumb.is-auto > span:first-child { background: #f1f1ee; }
.ss-mode-thumb.is-auto > span:last-child { background: #1c1c1b; }
.ss-skins-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.ss-skin-card {
  position: relative;
  padding: 9px 8px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: var(--floating);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 540;
}
.ss-skin-card[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: var(--shadow-ground);
}
.ss-skin-swatch {
  width: 100%;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(128, 128, 128, 0.22);
  display: flex;
  overflow: hidden;
}
.ss-skin-swatch > span { flex: 1; }
.ss-skin-card .pocodo-kbd {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  font-size: 11px;
}
.ss-vault-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ss-vault-cell {
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--floating);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ss-vault-num {
  font-size: 18px;
  font-weight: 630;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ss-vault-lbl {
  font-size: 11.5px;
  color: var(--faint);
}
.ss-demo-strip {
  padding: 10px 14px;
  background: color-mix(in srgb, var(--ink) 2.5%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.ss-demo-badges {
  display: inline-flex;
  gap: 5px;
}
.ss-demo-badge {
  padding: 2px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--today) 14%, transparent);
  color: var(--today);
  font-size: 11px;
  font-weight: 600;
}
.ss-demo-badge.is-off {
  opacity: 0.35;
  filter: grayscale(1);
}
.ss-labs-card {
  border-style: dashed;
  background: color-mix(in srgb, var(--ink) 1.5%, var(--floating));
}
.ss-labs-pills {
  padding: 10px 16px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ss-labs-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  font-size: 11.5px;
  color: var(--muted);
}
body.labs-disabled #sidebar-more-tools {
  display: none;
}

/* ---------- 4.2 Task Detail V4.0 Silk Two-Column Sheet ---------- */
.td4-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(2px);
}
.td4-sheet {
  position: fixed;
  z-index: 71;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(860px, calc(100vw - 28px));
  height: min(640px, calc(100vh - 48px));
  border-radius: 14px;
  border: 1px solid var(--border-overlay);
  background: var(--floating);
  box-shadow: var(--top-highlight), 0 24px 68px rgba(0, 0, 0, 0.24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pocodoPopIn 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
.td4-sheet[hidden] { display: none !important; }
.td4-topbar {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px 9px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--floating);
  flex: none;
}
.td4-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--muted);
}
.td4-crumb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 520;
}
.td4-crumb-btn:hover {
  background: var(--hover);
  color: var(--ink);
}
.td4-top-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.td4-focus-pill {
  min-height: 28px;
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 540;
  font-variant-numeric: tabular-nums;
  transition: all 180ms ease;
}
.td4-focus-pill:hover {
  background: var(--hover);
  color: var(--ink);
}
.td4-focus-pill.is-running {
  background: color-mix(in srgb, var(--today) 14%, transparent);
  border-color: color-mix(in srgb, var(--today) 36%, transparent);
  color: var(--today);
}
.td4-nav-pair {
  display: inline-flex;
  gap: 2px;
}
.td4-more-wrap { position: relative; }
.td4-more-menu {
  top: calc(100% + 6px);
  right: 0;
  min-width: 184px;
  z-index: 80;
}
.td4-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}
.td4-doc {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--floating);
}
.td4-doc-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.td4-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.td4-check-ring {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  max-width: 22px;
  max-height: 22px;
  padding: 0;
  flex: none;
  margin-top: 4px;
  padding: 0;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--faint);
  background: transparent;
  color: var(--brand-fg);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 150ms cubic-bezier(0.34, 1.56, 0.64, 1), background 140ms ease;
}
.td4-check-ring:hover { transform: scale(1.1); }
.td4-check-ring.p1 { border-color: var(--p1); background: color-mix(in srgb, var(--p1) 8%, transparent); }
.td4-check-ring.p2 { border-color: var(--p2); background: color-mix(in srgb, var(--p2) 8%, transparent); }
.td4-check-ring.p3 { border-color: var(--p3); background: color-mix(in srgb, var(--p3) 8%, transparent); }
.td4-check-ring.is-done {
  background: var(--accent);
  border-color: var(--accent);
}
.td4-title-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.38;
}
.td4-title-input:focus { outline: none; border: 0; }
.td4-title-input.is-done { text-decoration: line-through; opacity: 0.55; }
.td4-desc-input {
  width: 100%;
  padding: 2px 0 2px 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.68;
  resize: none;
}
.td4-desc-input:focus { outline: none; border: 0; }
.td4-source-ribbon {
  margin-left: 34px;
  padding: 8px 12px;
  border-left: 2px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: var(--quote-ribbon-bg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.td4-source-ribbon:hover {
  background: color-mix(in srgb, var(--gold) 13%, transparent);
}
.td4-source-ribbon-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 560;
  color: var(--gold);
}
.td4-source-ribbon-text {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.td4-subtasks-wrap {
  margin-left: 34px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.td4-sub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 560;
  color: var(--muted);
}
.td4-sub-head-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.td4-ring-svg { transform: rotate(-90deg); }
.td4-ring-track { stroke: color-mix(in srgb, var(--ink) 14%, transparent); }
.td4-ring-fill { stroke: var(--accent); transition: stroke-dashoffset 220ms ease; }
.td4-sub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.td4-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 8px;
  font-size: 13.5px;
}
.td4-sub-row:hover { background: var(--hover); }
.td4-sub-row.is-done span { text-decoration: line-through; opacity: 0.5; }
.td4-sub-del {
  margin-left: auto;
  opacity: 0;
  border: 0;
  background: transparent;
  color: var(--faint);
  padding: 2px 5px;
  border-radius: 5px;
}
.td4-sub-row:hover .td4-sub-del { opacity: 1; }
.td4-sub-form input {
  width: 100%;
  height: 32px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px dashed var(--border);
  background: transparent;
  font-size: 13px;
}
.td4-section-block {
  margin-left: 34px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.td4-doc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 18px;
  border-top: 1px solid var(--line);
  flex: none;
}
.td4-summon-left {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.td4-summon-btn {
  min-height: 28px;
  padding: 3px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
}
.td4-summon-btn:hover {
  background: var(--hover);
  color: var(--ink);
}
.td4-summon-btn.is-gold { color: var(--gold); }

/* Right 252px Linear Two-Column Property Rail */
.td4-rail {
  position: static;
  top: auto;
  align-self: stretch;
  height: 100%;
  min-height: 0;
  background: var(--base);
  border-right: 0;
  border-left: 1px solid var(--line);
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  overflow: visible;
}
.td4-rail-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
  padding: 0 6px 6px;
  letter-spacing: 0.03em;
}
.td4-prop-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
}
.td4-prop-row {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
}
.td4-prop-key {
  font-size: 12px;
  color: var(--faint);
  padding-left: 4px;
}
.td4-prop-val {
  min-height: 30px;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.td4-prop-val:hover {
  background: var(--hover);
}
.td4-prop-val.is-empty {
  color: var(--faint);
  font-weight: 400;
}
.td4-prop-sub {
  display: block;
  width: 100%;
  font-size: 11px;
  color: var(--faint);
  font-weight: 400;
}
.td4-prop-popover {
  top: calc(100% + 4px);
  right: 0;
  min-width: 210px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 82;
}
.td4-sched-popover {
  top: -12px;
  right: calc(100% + 6px);
  width: 268px;
  max-height: 460px;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  z-index: 84;
}
.td4-sched-popover button {
  width: auto;
  min-height: 24px;
  padding: 2px 7px;
  justify-content: center;
}
.td4-sched-popover .sched-mini-grid {
  gap: 1px;
}
.td4-sched-popover .sched-mini-day {
  width: 100%;
  min-height: 26px;
  padding: 0;
  font-size: 11.5px;
}
.td4-sched-nlp-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.td4-sched-nlp-row input {
  flex: 1 1 auto;
  min-width: 0;
  height: 28px;
  padding: 2px 9px;
  border-radius: 7px;
  font-size: 12px;
}
.td4-sched-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
.td4-sched-presets button {
  width: 100%;
  min-height: 25px;
  padding: 2px 2px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  justify-content: center;
}
.td4-sched-presets button:hover {
  background: var(--hover);
  color: var(--ink);
}
.td4-mini-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  font-weight: 560;
}
.td4-mini-cal-head span {
  white-space: nowrap;
}
.td4-sched-inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--faint);
  white-space: nowrap;
}
.td4-sched-chips {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-wrap: nowrap;
}
.td4-sched-chips button {
  min-height: 22px;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.td4-sched-chips button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--brand-fg);
  border-color: transparent;
}
.td4-rail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--faint);
}

/* ---------- 4.3 Raycast-Grade Ctrl+K Command Bar ---------- */
.cmd-bar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 76;
  background: rgba(0, 0, 0, 0.22);
}
.cmd-bar {
  position: fixed;
  z-index: 77;
  left: 50%;
  top: 13vh;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  border-radius: 16px;
  border: 1px solid var(--border-overlay);
  background: var(--floating);
  box-shadow: var(--top-highlight), 0 24px 64px rgba(0, 0, 0, 0.24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pocodoPopIn 130ms cubic-bezier(0.22, 1, 0.36, 1);
}
.cmd-bar[hidden] { display: none !important; }
.cmd-bar-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.cmd-bar-icon { color: var(--faint); flex: none; }
.cmd-bar-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  padding: 2px 0;
}
.cmd-bar-input:focus { outline: none; border: 0; }
.cmd-bar-scopes {
  display: flex;
  gap: 4px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 2%, transparent);
}
.cmd-bar-scopes button {
  min-height: 24px;
  padding: 2px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}
.cmd-bar-scopes button[aria-selected="true"] {
  background: var(--floating);
  color: var(--ink);
  box-shadow: var(--shadow-ground);
}
.cmd-bar-results {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cmd-bar-group {
  padding: 7px 10px 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
}
.cmd-bar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  text-align: left;
}
.cmd-bar-item:hover,
.cmd-bar-item.is-active {
  background: var(--hover);
}
.cmd-bar-item-lead {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.cmd-bar-item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-bar-item-meta {
  flex: none;
  font-size: 11.5px;
  color: var(--faint);
}
.cmd-skin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(128, 128, 128, 0.3);
  flex: none;
}
.cmd-bar-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 11px;
  color: var(--faint);
}

/* ---------- Minimalist 380px Warm-Paper Auth Card & Unified Sheet Shell ---------- */
.signin {
  max-width: 396px;
  margin: min(10vh, 72px) auto 40px;
  padding: 32px 28px 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--floating);
  box-shadow: var(--top-highlight), var(--shadow);
}
.signin-brand-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  margin-bottom: 20px;
}
.signin-logo { color: var(--accent); }
.signin-brand-head h1 {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -0.015em;
}
.signin-tagline {
  margin: 0;
  font-size: 12.5px;
  color: var(--faint);
}
.signin-submit {
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  margin-top: 4px;
}
dialog {
  border-radius: 16px;
  border: 1px solid var(--border-overlay);
  background: var(--floating);
  color: var(--ink);
  box-shadow: var(--top-highlight), 0 22px 60px rgba(0, 0, 0, 0.22);
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
}

/* Emotional Today Cleared Empty State & Day-Grouped Completed Logbook */
.today-cleared-state {
  text-align: center;
  padding: 64px 24px;
}
.today-cleared-spark {
  font-size: 28px;
  color: var(--gold);
  margin-bottom: 8px;
}
.logbook-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 4px 6px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

@media (max-width: 720px) {
  html,
  body {
    overflow-x: clip;
  }
  #mobile-views {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  #mobile-add-task {
    display: none !important;
  }
  .workspace {
    max-width: 100%;
  }
  body.signed-in:not(.admin-mode) main.content {
    width: 100%;
    min-width: 0;
    padding: 12px 12px 184px;
  }
  .content-heading {
    flex-wrap: wrap;
    gap: 8px;
  }
  .task-row .row-edit-btn,
  .task-row .row-tomorrow-btn,
  .task-row .row-focus-btn,
  .task-row .move-task {
    display: none;
  }
  .notes-stream,
  .tasks {
    padding-bottom: 16px;
  }
  .unified-composer-dock {
    left: 50%;
    transform: translateX(-50%);
    bottom: 66px;
    width: calc(100% - 32px);
    max-width: 100%;
  }
  .uc-shell {
    padding: 8px 10px 8px;
  }
  #notes-composer-text {
    min-height: 44px;
    line-height: 1.45;
  }
  .uc-footer,
  .uc-toolbar,
  .uc-task-chips {
    flex-wrap: wrap;
    gap: 6px;
  }
  .skin-studio-dock {
    left: 50%;
    transform: translateX(-50%);
    bottom: 68px;
    width: calc(100% - 16px);
    max-height: 72dvh;
    overflow-y: auto;
    padding: 14px 12px;
  }
  .skin-dock-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .skin-dock-head,
  .skin-dock-foot {
    flex-wrap: wrap;
    gap: 8px;
  }
  /* Daily Review mobile */
  .daily-review-stage {
    padding: 4px 2px 168px;
    overflow-x: hidden;
  }
  .dr-card-deck {
    width: 100%;
    max-width: 100%;
  }
  .dr-actions,
  .dr-card-foot {
    flex-wrap: wrap;
    gap: 6px;
  }
  /* Schedule V2.0 mobile (<=720px, zero horizontal page overflow) */
  .schedule-hub {
    min-height: calc(100vh - 110px);
    padding-bottom: 132px;
  }
  .sched-topbar {
    height: auto;
    min-height: 48px;
    padding: 8px 12px;
    gap: 6px;
    flex-wrap: wrap;
  }
  .sched-nav-left,
  .sched-nav-center,
  .sched-nav-right {
    flex: 0 1 auto;
    max-width: 100%;
    gap: 6px;
  }
  .sched-range-sub,
  .sched-cal-hint {
    display: none;
  }
  .sched-mode-seg button {
    padding: 0 9px;
    font-size: 12px;
  }
  .sched-agenda-wrap {
    padding: 12px 12px 140px;
  }
  .sched-month-wrap {
    max-width: 100%;
    min-height: 360px;
    overflow: hidden;
  }
  .sched-month-cell {
    min-height: 64px;
    padding: 3px;
    min-width: 0;
  }
  .sched-month-cell .sched-lunar {
    display: none;
  }
  .sched-cols-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sched-cols-head,
  .sched-allday-row,
  .sched-timeline-body {
    grid-template-columns: 46px repeat(var(--sched-cols, 3), minmax(106px, 1fr));
    min-width: calc(46px + var(--sched-cols, 3) * 106px);
  }
  .sched-col-head-cell {
    padding: 7px 6px;
    gap: 4px;
    white-space: nowrap;
  }
  .sched-backlog-drawer {
    position: fixed;
    top: 52px;
    right: 0;
    bottom: 0;
    z-index: 68;
    max-height: none;
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.18);
  }
  /* Tags Hub & 5-state scope bar mobile */
  .tags-hub-panel {
    padding-bottom: 168px;
  }
  .tags-hub-head,
  .tags-hub-toolbar,
  .label-hub-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .tag-tree-row {
    position: relative;
  }
  .tag-scope-anchor {
    position: static;
  }
  .tag-scope-pill {
    white-space: nowrap;
  }
  .tag-scope-bar {
    position: absolute;
    top: calc(100% + 4px);
    left: 6px;
    right: 6px;
    width: auto;
    max-width: calc(100% - 12px);
    display: flex;
    flex-wrap: wrap;
    white-space: normal;
    justify-content: flex-start;
    gap: 4px;
    z-index: 65;
  }
  /* Settings Center V3.0 mobile top-pill strip */
  .settings-studio {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .ss-rail {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px 8px;
    gap: 8px;
    overflow: hidden;
  }
  .ss-nav {
    min-width: 0;
    max-width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .ss-nav::-webkit-scrollbar {
    display: none;
  }
  .ss-nav-section,
  .ss-rail-foot {
    display: none;
  }
  .ss-nav button {
    width: auto;
    flex: none;
    white-space: nowrap;
    padding: 6px 11px;
  }
  .ss-nav button[aria-current="page"]::before {
    display: none;
  }
  .ss-main {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 16px 14px 48px;
    overflow-x: hidden;
  }
  .ss-main > * {
    max-width: 100%;
    min-width: 0;
  }
  .ss-row {
    flex-wrap: wrap;
    gap: 10px;
  }
  .ss-modes-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
  }
  .ss-mode-card {
    padding: 10px 6px;
    min-width: 0;
  }
  .ss-skins-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
  }
  .ss-skin-card {
    min-width: 0;
  }
  .ss-preview-box {
    max-width: 100%;
    overflow: hidden;
  }
  /* Task Detail V4.0 mobile bottom sheet */
  .td4-sheet {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    transform: none;
    width: 100%;
    height: 90dvh;
    max-height: 90vh;
    border-radius: 18px 18px 0 0;
  }
  .td4-topbar {
    padding: 8px 10px 8px 12px;
    gap: 6px;
  }
  .td4-title-input {
    font-size: 16.5px;
    width: 100%;
  }
  .td4-body {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .td4-doc {
    height: auto;
    flex: none;
    overflow: visible;
  }
  .td4-doc-scroll {
    overflow: visible;
    padding: 16px 14px 12px;
  }
  .td4-rail {
    height: auto;
    flex: none;
    overflow: visible;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 12px 14px 28px;
  }
  .td4-sched-popover {
    position: fixed;
    left: 50%;
    top: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: min(320px, calc(100% - 24px));
    max-height: 82dvh;
    overflow-y: auto;
    z-index: 95;
  }
  /* Note Detail Sheet & Evolution Drawer mobile */
  .note-detail-sheet {
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-height: 88dvh;
  }
  .note-evolution-drawer {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
  }
  /* Ctrl+K Command Bar mobile */
  .cmd-bar {
    width: calc(100% - 20px);
    max-width: 560px;
    top: 12px;
    max-height: 82dvh;
  }
  .cmd-bar-scopes {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .cmd-bar-foot {
    flex-wrap: wrap;
    gap: 8px;
  }
  /* Web-4.5 Scheme A Autocomplete mobile touch ergonomics */
  .uc-float-bar {
    bottom: calc(100% + 6px);
  }
  .uc-ac-list {
    max-height: 204px;
  }
  .uc-ac-row {
    min-height: 38px;
  }
  /* Auth card mobile */
  .signin-card,
  #signin .card {
    width: calc(100% - 24px);
    max-width: 396px;
    padding: 24px 18px;
  }
}

/* Mobile portrait (<600px): 100% full-width flush-to-keyboard composer */
@media (max-width: 599px) {
  .unified-composer-dock {
    left: 0;
    right: 0;
    transform: none;
    bottom: 58px;
    width: 100%;
  }
  .unified-composer {
    border-radius: 18px 18px 0 0;
    border-inline: 0;
    border-bottom: 0;
    max-height: 32dvh;
  }
  .uc-textarea {
    max-height: min(136px, 24dvh);
  }
  .uc-float-bar {
    left: 8px;
    right: 8px;
  }
}


/* ============================================================================
   Wave Web-4.4 (W3): CSS Native Virtualization & Frame-0 Optimistic Feedback
   ============================================================================ */
.task-row,
.tasks > li,
.note-card,
.sched-agenda-row,
.trash-row,
.completed-log-row,
.tag-hub-row,
li[data-trashed-task] {
  content-visibility: auto;
  contain-intrinsic-size: auto 72px;
}

.is-completing {
  opacity: 0.42;
  transform: translateX(4px);
  transition: opacity 140ms ease, transform 140ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Red-Team Polish: Prevent 500-char unbreakable titles from wrapping action buttons vertically */
.completed-log-row button,
.task-row > button:not(.task-name),
.task-row .toggle,
.trash-row button,
li[data-trashed-task] > button {
  white-space: nowrap;
  flex-shrink: 0;
}
.completed-log-row .task-name,
.task-row .task-name,
.note-card-body,
.evo-node-body,
.dr-card-body {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Intl-7 subtle locale toggle pill (top header & sign-in footer) */
.locale-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
}
.locale-pill-btn:hover {
  background: var(--hover);
  color: var(--ink);
}
.signin-locale-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: inherit;
  font-weight: 550;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.signin-locale-btn:hover {
  color: var(--ink);
}

/* ============================================================================
   Wave M3-10: Apple-Photos Adaptive Grid · Native Shadow Lightbox · Offline PWA
   ============================================================================ */
.pocodo-photo-grid {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  max-width: 100%;
}
.pocodo-photo-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
  max-width: min(100%, 340px);
}
.pocodo-photo-grid.is-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-width: min(100%, 420px);
}
.pocodo-photo-grid.is-multi {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  max-width: min(100%, 420px);
}
.pocodo-photo-tile {
  position: relative;
  display: block;
  padding: 0;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 10px;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 4%, var(--notes-canvas));
  cursor: zoom-in;
  line-height: 0;
  transition: transform 140ms ease, border-color 140ms ease;
}
.pocodo-photo-tile:hover {
  border-color: color-mix(in srgb, var(--ink) 22%, transparent);
}
.pocodo-photo-tile:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.pocodo-photo-grid.is-single .pocodo-photo-tile {
  max-height: 260px;
}
.pocodo-photo-grid.is-pair .pocodo-photo-tile {
  aspect-ratio: 4 / 3;
}
.pocodo-photo-grid.is-multi .pocodo-photo-tile {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
}
.pocodo-photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pocodo-photo-grid.is-single .pocodo-photo-img {
  max-height: 260px;
  height: auto;
  object-fit: cover;
}
.pocodo-photo-tile.is-loading {
  min-height: 96px;
}
.pocodo-photo-tile.is-missing {
  display: none;
}
.notes-gallery-thumb:has(img) {
  height: 156px;
  padding: 0;
  overflow: hidden;
  cursor: zoom-in;
}
.pocodo-photo-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 12, 12, 0.56);
  color: #ffffff;
  font-size: 18px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.02em;
}
@media (max-width: 680px) {
  .pocodo-photo-grid.is-single {
    max-width: min(100%, 280px);
  }
}

/* Pure-Native Obsidian Shadow Lightbox */
body.pocodo-lightbox-open {
  overflow: hidden;
}
.pocodo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(12, 12, 12, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pocodoLbFadeIn 160ms cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  touch-action: none;
}
.pocodo-lightbox[hidden] {
  display: none;
}
@keyframes pocodoLbFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pocodoLbZoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.pocodo-lb-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 203;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(to bottom, rgba(12, 12, 12, 0.58), transparent);
  transition: opacity 160ms ease;
}
.pocodo-lightbox.is-chrome-hidden .pocodo-lb-topbar,
.pocodo-lightbox.is-chrome-hidden .pocodo-lb-nav {
  opacity: 0;
  pointer-events: none;
}
.pocodo-lb-counter {
  font-size: 13px;
  font-weight: 560;
  color: rgba(255, 255, 255, 0.86);
  font-variant-numeric: tabular-nums;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}
.pocodo-lb-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pocodo-lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 540;
  text-decoration: none;
  cursor: pointer;
}
.pocodo-lb-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}
.pocodo-lb-close {
  width: 34px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}
.pocodo-lb-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px 32px;
  overflow: hidden;
}
.pocodo-lb-img {
  max-width: min(92vw, 1440px);
  max-height: 84vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
  cursor: zoom-in;
  animation: pocodoLbZoomIn 160ms cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center center;
}
.pocodo-lb-img.is-zoomed {
  cursor: grab;
}
.pocodo-lb-img.is-animating {
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.pocodo-lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 202;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(20, 20, 20, 0.52);
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 160ms ease, background 140ms ease;
}
.pocodo-lb-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}
.pocodo-lb-prev { left: 16px; }
.pocodo-lb-next { right: 16px; }

/* Offline / Online PWA Recovery Pill */
.pocodo-offline-pill {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 160;
  max-width: min(92vw, 560px);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-overlay);
  background: var(--floating);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 560;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  text-align: center;
}
.pocodo-offline-pill.is-online {
  border-color: color-mix(in srgb, #4e8467 45%, var(--border-overlay));
  color: #4e8467;
}

/* M3-10.5: Curated Morandi Project Dots & Quick Color Popover */
.project-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
  background: var(--muted);
}
.task-meta-project {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  vertical-align: middle;
}
.view-title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.view-project-dot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  flex: none;
  transition: background 140ms ease, transform 140ms ease;
}
.view-project-dot-btn[hidden] {
  display: none;
}
.view-project-dot-btn:hover,
.view-project-dot-btn[aria-expanded="true"] {
  background: var(--hover);
}
.view-project-dot-btn:active {
  transform: scale(0.92);
}
.view-project-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
  transition: transform 140ms ease;
}
.view-project-dot-btn:hover .view-project-dot {
  transform: scale(1.12);
}
.project-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-block: 4px 10px;
}
.project-swatch-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.project-swatch-pill:hover {
  background: var(--hover);
}
.project-swatch-pill.is-active,
.project-swatch-pill[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--floating));
  font-weight: 560;
}
.project-swatch-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
.project-color-popover {
  position: fixed;
  z-index: 1200;
  padding: 11px 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--border-overlay);
  background: var(--floating);
  color: var(--ink);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pcp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
}
.pcp-title {
  color: var(--faint);
  font-weight: 560;
}
.pcp-active-name {
  color: var(--muted);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pcp-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 2px;
}
.pcp-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}
.pcp-swatch:hover {
  background: var(--hover);
  transform: scale(1.1);
}
.pcp-swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  transition: box-shadow 120ms ease;
}
.pcp-swatch.is-active .pcp-swatch-dot,
.pcp-swatch[aria-checked="true"] .pcp-swatch-dot {
  box-shadow: 0 0 0 2px var(--floating), 0 0 0 3.5px var(--ink);
}
.pcp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.pcp-custom-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  margin: 0;
  padding: 2px 6px;
  border-radius: 7px;
}
.pcp-custom-btn:hover {
  background: var(--hover);
  color: var(--ink);
}
.pcp-custom-ring {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: conic-gradient(#4F8A73, #4E79A7, #866EA8, #B56584, #C96A5B, #C68B3C, #4F8A73);
  display: inline-block;
}
.pcp-custom-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* M3-10.5: Unified Warm-Paper Confirm & Prompt Modal (replaces native window.confirm/prompt) */
.pocodo-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(18, 18, 16, 0.42);
  backdrop-filter: blur(3px);
}
.pocodo-modal-card {
  width: min(400px, calc(100vw - 32px));
  padding: 20px 20px 16px;
  border-radius: 16px;
  border: 1px solid var(--border-overlay);
  background: var(--floating);
  color: var(--ink);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pocodo-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 620;
  line-height: 1.35;
  color: var(--ink);
}
.pocodo-modal-message {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.pocodo-modal-input {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  box-sizing: border-box;
}
.pocodo-modal-input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-color: var(--accent);
}
.pocodo-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.pocodo-modal-btn {
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 540;
  cursor: pointer;
}
.pocodo-modal-btn:hover {
  background: var(--hover);
}
.pocodo-modal-btn.is-primary {
  border-color: transparent;
  background: var(--accent);
  color: var(--brand-fg);
}
.pocodo-modal-btn.is-primary:hover {
  filter: brightness(1.06);
}
.pocodo-modal-btn.is-primary.is-danger {
  background: var(--danger, #c9544d);
  color: #ffffff;
}

/* M3-10.5: 4-Language Topbar / Sign-in Dropdown Menu */
.pocodo-locale-menu {
  position: fixed;
  z-index: 1350;
  min-width: 156px;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--border-overlay);
  background: var(--floating);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pocodo-locale-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 480;
  text-align: left;
  cursor: pointer;
}
.pocodo-locale-opt:hover {
  background: var(--hover);
}
.pocodo-locale-opt[aria-checked="true"] {
  background: var(--active);
  font-weight: 600;
}
.pocodo-locale-check {
  font-size: 12px;
  color: var(--accent);
}
.ss-row .sched-mode-seg {
  flex-wrap: wrap;
  max-width: 100%;
}

/* W8 Tactile Engine: zero 300ms tap delay, crisp 65ms press micro-scale, 100ms popover motion */
a,
button,
summary,
[role="button"],
[role="tab"],
[role="radio"],
[role="menuitem"],
select,
input[type="checkbox"],
input[type="radio"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.icon-btn,
.locale-pill-btn,
#views button[data-view],
.sidebar-mode-btn,
.notes-sidebar-item,
.sched-mode-seg button,
.sched-backlog-btn,
.sched-month-btn,
.sched-cal-month-toggle,
.sched-strip-day,
.view-project-dot-btn,
.pcp-swatch,
.pocodo-modal-btn,
.pocodo-locale-opt,
.skin-chip,
.uc-send-btn,
.uc-tool-btn,
button.primary,
#open-view-more,
#sidebar-account-btn,
#new-task {
  transition: transform 65ms cubic-bezier(0, 0, 0.2, 1), background-color 95ms ease, border-color 95ms ease, color 95ms ease, opacity 95ms ease;
}

.icon-btn:active:not(:disabled),
.locale-pill-btn:active:not(:disabled),
#views button[data-view]:active:not(:disabled),
.sidebar-mode-btn:active:not(:disabled),
.notes-sidebar-item:active:not(:disabled),
.sched-mode-seg button:active:not(:disabled),
.sched-backlog-btn:active:not(:disabled),
.sched-month-btn:active:not(:disabled),
.sched-cal-month-toggle:active:not(:disabled),
.sched-strip-day:active:not(:disabled),
.view-project-dot-btn:active:not(:disabled),
.pcp-swatch:active:not(:disabled),
.pocodo-modal-btn:active:not(:disabled),
.pocodo-locale-opt:active:not(:disabled),
.skin-chip:active:not(:disabled),
.uc-send-btn:active:not(:disabled),
.uc-tool-btn:active:not(:disabled),
button.primary:active:not(:disabled),
#open-view-more:active:not(:disabled),
#sidebar-account-btn:active:not(:disabled),
#new-task:active:not(:disabled) {
  transform: scale(0.97);
}

@keyframes pocodoPopoverIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.pocodo-locale-menu,
.project-color-popover,
.account-popover:not([hidden]),
#view-more-popover:not([hidden]),
#notes-sidebar-filter-menu:not([hidden]),
#sched-options-popover:not([hidden]),
.pocodo-modal-card,
.td4-popover:not([hidden]),
.uc-popover:not([hidden]),
.pocodo-dp-popover:not([hidden]),
#skin-studio-dock:not([hidden]) {
  animation: pocodoPopoverIn 100ms cubic-bezier(0, 0, 0.2, 1) both;
}

.pocodo-select-pop,
dialog.view-display-popover[open] {
  animation: pocodoPopoverIn 95ms cubic-bezier(0, 0, 0.2, 1) both;
}

/* ============================================================================
   Wave M3-10.8 Full-Site UI Craft Overhaul (U1–U6)
   Strictly zero font-size < 11px · Light Warm Paper & Dark Carbon parity
   ============================================================================ */

/* ---------- U6: pocodo-select-pop Zero-Dependency Custom Dropdown ---------- */
select.pocodo-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border: 0 !important;
}

.pocodo-select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px 6px 11px;
  border-radius: 9px;
  border: 1px solid var(--border, var(--line));
  background: var(--field, var(--panel));
  color: var(--ink);
  font-size: 13px;
  font-weight: 460;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  max-width: 100%;
  transition: background 95ms ease, border-color 95ms ease, box-shadow 95ms ease, transform 65ms ease;
}

label > .pocodo-select-trigger {
  width: 100%;
  margin-top: 4px;
}

.pocodo-select-trigger.is-compact {
  min-height: 28px;
  padding: 3px 8px 3px 9px;
  border-radius: 8px;
  font-size: 12px;
}

.pocodo-select-trigger.is-ghost {
  background: transparent;
  border-color: var(--line);
}

.pocodo-select-trigger:hover:not(:disabled) {
  background: var(--hover);
  border-color: var(--border-overlay, var(--accent));
}

.pocodo-select-trigger:focus-visible,
.pocodo-select-trigger.is-open {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 16%, transparent);
}

.pocodo-select-trigger:active:not(:disabled) {
  transform: scale(0.985);
}

.pocodo-select-trigger:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.pocodo-select-trigger[hidden] {
  display: none !important;
}

.pocodo-select-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pocodo-select-chevron {
  flex: none;
  color: var(--muted);
  transition: transform 110ms ease;
}

.pocodo-select-trigger.is-open .pocodo-select-chevron {
  transform: rotate(180deg);
  color: var(--ink);
}

.pocodo-select-pop {
  position: fixed;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--border-overlay, var(--line));
  background: var(--floating, var(--panel));
  color: var(--ink);
  box-shadow: var(--top-highlight, none), 0 14px 36px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  overscroll-behavior: contain;
}

[data-theme="dark"] .pocodo-select-pop {
  background: var(--floating, #222220);
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 18px 44px rgba(0, 0, 0, 0.52);
}

.pocodo-select-group {
  padding: 6px 9px 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--faint, var(--muted));
  letter-spacing: 0.03em;
}

.pocodo-select-opt {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  padding: 5px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 440;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: background 75ms ease, color 75ms ease;
}

.pocodo-select-opt:hover:not(:disabled),
.pocodo-select-opt.is-highlighted:not(:disabled) {
  background: var(--hover);
}

.pocodo-select-opt[aria-selected="true"] {
  font-weight: 560;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.pocodo-select-opt:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.pocodo-select-opt-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pocodo-select-opt-check {
  flex: none;
  color: var(--accent);
}

/* ---------- U1: Instant Linear View Display Micro-Panel & Chips ---------- */
dialog.view-display-popover {
  position: fixed;
  margin: 0;
  padding: 12px 14px 10px;
  width: min(320px, calc(100vw - 20px));
  max-height: min(76vh, 420px);
  overflow-y: auto;
  border-radius: 14px;
  border: 1px solid var(--border-overlay, var(--line));
  background: var(--floating, var(--panel));
  color: var(--ink);
  box-shadow: var(--top-highlight, none), 0 18px 44px rgba(0, 0, 0, 0.18);
  z-index: 95;
}

[data-theme="dark"] dialog.view-display-popover {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 20px 48px rgba(0, 0, 0, 0.54);
}

.view-display-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.view-display-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.view-display-close {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.view-display-close:hover {
  background: var(--hover);
  color: var(--ink);
}

.view-display-layout-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.view-display-section-lbl {
  font-size: 11.5px;
  font-weight: 560;
  color: var(--muted);
}

.view-display-layout-seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.045);
}

[data-theme="dark"] .view-display-layout-seg {
  background: rgba(255, 255, 255, 0.06);
}

.view-display-layout-seg button {
  min-height: 28px;
  padding: 4px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 95ms ease, color 95ms ease, transform 65ms ease, box-shadow 95ms ease;
}

.view-display-layout-seg button:hover {
  color: var(--ink);
}

.view-display-layout-seg button.is-active,
.view-display-layout-seg button[aria-selected="true"] {
  background: var(--floating, #ffffff);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .view-display-layout-seg button.is-active,
[data-theme="dark"] .view-display-layout-seg button[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.view-display-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.view-display-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  margin: 0 !important;
  font-size: 13px;
  font-weight: 460;
  color: var(--ink);
  cursor: pointer;
}

.view-display-row[hidden] {
  display: none !important;
}

.view-display-row > span:first-child {
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.view-display-row > .pocodo-select-trigger {
  width: auto;
  min-width: 134px;
  max-width: 176px;
  margin-top: 0;
}

.pocodo-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 34px;
  height: 19px;
  flex: none;
}

.pocodo-switch input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0.001;
  cursor: pointer;
}

.pocodo-switch-track {
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
  position: relative;
  pointer-events: none;
  transition: background 120ms ease;
}

[data-theme="dark"] .pocodo-switch-track {
  background: rgba(255, 255, 255, 0.18);
}

.pocodo-switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  transition: transform 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pocodo-switch input:checked + .pocodo-switch-track {
  background: var(--accent);
}

.pocodo-switch input:checked + .pocodo-switch-track::after {
  transform: translateX(15px);
}

.pocodo-switch input:focus-visible + .pocodo-switch-track {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 26%, transparent);
}

.view-display-foot {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
}

.view-display-reset {
  min-height: 26px;
  padding: 2px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.view-display-reset:hover {
  background: var(--hover);
  color: var(--accent);
}

.active-view-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
}

.active-view-opt-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--border, var(--line));
  background: var(--floating, var(--panel));
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 95ms ease, background 95ms ease, transform 65ms ease;
}

.active-view-opt-chip:hover {
  border-color: var(--accent);
  background: var(--hover);
}

.active-view-opt-chip:active {
  transform: scale(0.97);
}

.active-view-opt-x {
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

.active-view-opt-reset {
  height: 24px;
  min-height: 24px;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}

.active-view-opt-reset:hover {
  color: var(--accent);
  background: var(--hover);
}

/* ---------- U2: Morandi 4-Tile + Live NLP Preview + Swipe/Wheel Date Popover ---------- */
.td4-sched-popover,
.uc-date-popover.pocodo-dp-popover {
  width: min(304px, calc(100vw - 24px));
  max-height: min(88vh, 560px);
  overflow-y: auto;
  padding: 10px 11px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.uc-date-popover.pocodo-dp-popover {
  min-width: 296px;
}

.pocodo-dp-nlp-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pocodo-dp-nlp-input {
  width: 100%;
  height: 32px;
  padding: 4px 2px 6px;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ink);
  font-size: 13px;
  outline: none;
  box-shadow: none !important;
}

.pocodo-dp-nlp-input:focus {
  border-bottom-color: var(--accent) !important;
}

.pocodo-dp-nlp-preview {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid rgba(79, 138, 115, 0.28);
  background: rgba(79, 138, 115, 0.11);
  color: #366955;
  font-size: 12px;
  font-weight: 560;
  text-align: left;
  cursor: pointer;
}

[data-theme="dark"] .pocodo-dp-nlp-preview {
  border-color: rgba(102, 179, 148, 0.34);
  background: rgba(102, 179, 148, 0.14);
  color: #8fd2b7;
}

.pocodo-dp-nlp-preview:hover {
  background: rgba(79, 138, 115, 0.18);
}

.pocodo-dp-tiles.td4-sched-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.pocodo-dp-tile {
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 7px;
  width: 100% !important;
  min-height: 35px !important;
  padding: 6px 9px !important;
  border-radius: 9px !important;
  border: 1px solid var(--border, var(--line)) !important;
  background: var(--field, transparent) !important;
  color: var(--ink) !important;
  font-size: 12.5px !important;
  font-weight: 520;
  cursor: pointer;
  transition: background 95ms ease, border-color 95ms ease, transform 65ms ease;
}

.pocodo-dp-tile:hover {
  background: var(--hover) !important;
}

.pocodo-dp-tile:active {
  transform: scale(0.97);
}

.pocodo-dp-tile-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.pocodo-dp-tile[data-dp-tone="today"] .pocodo-dp-tile-dot { background: #4F8A73; }
.pocodo-dp-tile[data-dp-tone="tomorrow"] .pocodo-dp-tile-dot { background: #4E79A7; }
.pocodo-dp-tile[data-dp-tone="weekend"] .pocodo-dp-tile-dot { background: #C68B3C; }
.pocodo-dp-tile[data-dp-tone="nextweek"] .pocodo-dp-tile-dot { background: #866EA8; }

[data-theme="dark"] .pocodo-dp-tile[data-dp-tone="today"] .pocodo-dp-tile-dot { background: #66B394; }
[data-theme="dark"] .pocodo-dp-tile[data-dp-tone="tomorrow"] .pocodo-dp-tile-dot { background: #73A2D4; }
[data-theme="dark"] .pocodo-dp-tile[data-dp-tone="weekend"] .pocodo-dp-tile-dot { background: #E0A95C; }
[data-theme="dark"] .pocodo-dp-tile[data-dp-tone="nextweek"] .pocodo-dp-tile-dot { background: #A791C7; }

.pocodo-dp-tile[data-dp-tone="today"].is-active {
  border-color: rgba(79, 138, 115, 0.55) !important;
  background: rgba(79, 138, 115, 0.12) !important;
}
.pocodo-dp-tile[data-dp-tone="tomorrow"].is-active {
  border-color: rgba(78, 121, 167, 0.55) !important;
  background: rgba(78, 121, 167, 0.12) !important;
}
.pocodo-dp-tile[data-dp-tone="weekend"].is-active {
  border-color: rgba(198, 139, 60, 0.55) !important;
  background: rgba(198, 139, 60, 0.12) !important;
}
.pocodo-dp-tile[data-dp-tone="nextweek"].is-active {
  border-color: rgba(134, 110, 168, 0.55) !important;
  background: rgba(134, 110, 168, 0.12) !important;
}

.pocodo-dp-tile-lbl {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.pocodo-dp-tile-sub {
  flex: none;
  font-size: 11px;
  font-weight: 460;
  color: var(--faint, var(--muted));
  font-variant-numeric: tabular-nums;
}

.pocodo-dp-cal-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  touch-action: pan-y;
  user-select: none;
}

.pocodo-dp-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.pocodo-dp-cal-mid {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pocodo-dp-cal-title {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.pocodo-dp-today-jump {
  min-height: 22px !important;
  padding: 1px 7px !important;
  border-radius: 999px !important;
  border: 1px solid var(--border, var(--line)) !important;
  background: transparent !important;
  color: var(--accent) !important;
  font-size: 11px !important;
  font-weight: 560;
  cursor: pointer;
}

.pocodo-dp-nav-btn {
  width: 26px !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 15px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pocodo-dp-nav-btn:hover {
  background: var(--hover) !important;
  color: var(--ink) !important;
}

.pocodo-dp-grid .sched-mini-wk.is-weekend {
  color: var(--faint, var(--muted));
  opacity: 0.78;
}

.pocodo-dp-grid .sched-mini-day {
  width: 100%;
  min-height: 26px;
  padding: 0;
  border-radius: 7px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.pocodo-dp-grid .sched-mini-day.is-weekend:not(.is-selected):not(.is-today) {
  color: var(--muted);
}

.pocodo-dp-grid .sched-mini-day.is-today:not(.is-selected) {
  color: #D9554A;
  font-weight: 700;
  background: rgba(217, 85, 74, 0.12);
}

[data-theme="dark"] .pocodo-dp-grid .sched-mini-day.is-today:not(.is-selected) {
  color: #F07267;
  background: rgba(240, 114, 103, 0.16);
}

.pocodo-dp-grid .sched-mini-day.is-today.is-selected {
  background: #D9554A !important;
  color: #FFFFFF !important;
  font-weight: 700;
  outline: none;
  box-shadow: 0 0 0 2px rgba(217, 85, 74, 0.28);
}

[data-theme="dark"] .pocodo-dp-grid .sched-mini-day.is-today.is-selected {
  background: #E05E53 !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 0 2px rgba(240, 114, 103, 0.34);
}

.pocodo-dp-grid .sched-mini-day.is-selected:not(.is-today) {
  background: var(--accent) !important;
  color: var(--brand-fg, #FFFFFF) !important;
  font-weight: 650;
  outline: none;
}

[data-theme="dark"] .td4-sched-chips button[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.14);
  color: #F4F4F1;
  border-color: rgba(255, 255, 255, 0.24);
  font-weight: 560;
}

.pocodo-dp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.pocodo-dp-hint {
  font-size: 11px;
  color: var(--faint, var(--muted));
  white-space: nowrap;
  flex-shrink: 0;
}

.pocodo-dp-clear {
  min-height: 24px !important;
  padding: 2px 7px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.pocodo-dp-clear:hover:not(:disabled) {
  background: rgba(217, 85, 74, 0.1) !important;
  color: #C94A3F !important;
}

[data-theme="dark"] .pocodo-dp-clear:hover:not(:disabled) {
  color: #F07267 !important;
}

/* ---------- U4: Linear Hairline Kanban Board & Task Table Craft ---------- */
#tasks.project-board {
  gap: 12px;
  padding: 4px 2px 16px;
  align-items: flex-start;
}

#tasks .board-column {
  flex: 0 0 min(276px, 84vw);
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  background: rgba(0, 0, 0, 0.022);
}

[data-theme="dark"] #tasks .board-column {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.07);
}

#tasks .board-column h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 2px 3px 4px;
  align-items: center;
}

#tasks .board-column .board-count {
  font-size: 11.5px;
  font-weight: 560;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.045);
  color: var(--muted);
}

[data-theme="dark"] #tasks .board-column .board-count {
  background: rgba(255, 255, 255, 0.07);
}

#tasks .board-cards {
  gap: 7px;
}

#tasks .board-cards > li {
  position: relative;
  padding: 10px 11px;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid var(--border, var(--line));
  background: var(--floating, #ffffff);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 95ms ease, box-shadow 95ms ease, border-color 95ms ease;
}

/* Give Kanban card titles 100% full width — never let hidden desktop row buttons crush card text */
#tasks.project-board .board-cards > li.task-row .task-name {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding-right: 18px;
}

#tasks.project-board .board-cards > li.task-row .row-edit-btn,
#tasks.project-board .board-cards > li.task-row .row-tomorrow-btn,
#tasks.project-board .board-cards > li.task-row .row-focus-btn {
  display: none !important;
}

#tasks.project-board .board-cards > li.task-row .move-task {
  position: absolute;
  top: 7px;
  right: 7px;
  margin: 0;
  background: var(--floating, var(--panel));
  border-radius: 6px;
}

[data-theme="dark"] #tasks .board-cards > li {
  background: var(--floating, #222220);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

#tasks .board-cards > li:hover {
  transform: translateY(-1px);
  border-color: var(--border-overlay, var(--accent));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

[data-theme="dark"] #tasks .board-cards > li:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.36);
}

.task-table-scroll {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--floating, var(--panel));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .task-table-scroll {
  background: var(--floating, #1d1d1b);
  border-color: rgba(255, 255, 255, 0.08);
}

#project-task-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

#project-task-table td {
  padding: 8px 12px;
  font-size: 13px;
  vertical-align: middle;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

#project-task-table tbody tr {
  transition: background 80ms ease;
}

#project-task-table tbody tr:hover {
  background: var(--hover);
}

#project-task-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ---------- U5: Unified Linear Hairline Management Dialog Shells ---------- */
dialog:not(.view-display-popover) {
  padding: 20px 22px;
  border-radius: 16px;
  max-height: min(86vh, 760px);
  overflow-y: auto;
}

dialog:not(.view-display-popover) > h2,
dialog:not(.view-display-popover) .heading > h2 {
  font-size: 15.5px;
  font-weight: 620;
  letter-spacing: -0.015em;
  margin-top: 0;
  margin-bottom: 12px;
}

dialog:not(.view-display-popover) input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
dialog:not(.view-display-popover) textarea {
  border-radius: 9px;
  border: 1px solid var(--border, var(--line));
  background: var(--field, var(--panel));
  transition: border-color 95ms ease, box-shadow 95ms ease;
}

dialog:not(.view-display-popover) input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):focus,
dialog:not(.view-display-popover) textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 16%, transparent);
}

dialog:not(.view-display-popover) form > .toolbar:last-of-type {
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .td4-sched-popover,
  .uc-date-popover.pocodo-dp-popover {
    width: min(304px, calc(100vw - 20px));
  }
  dialog:not(.view-display-popover) {
    padding: 16px 16px;
    border-radius: 14px;
  }
}

@media (max-width: 520px) {
  .uc-date-popover.pocodo-dp-popover {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: 74px !important;
    top: auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}

/* W5 Accessibility: Respect OS Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
