/* ── TOKENS ─────────────────────────────────────────────── */
 :root {
 color-scheme: light;
 --bg: #faf8f5;
 --noise-opacity: 0.24;
 --surface: #f2efe9;
 --surface2: #e8e3d9;
 --surface3: #dcd5c7;
 --border: rgba(87,74,51,0.10);
 --border2: rgba(87,74,51,0.18);
 --text: #1e1b16;
 --text2: #4a443b;
 --text3: #7d766a;
 --accent: #4468e8;
 --accent-dim: rgba(68,104,232,0.14);
 --accent-text: #3558d0;
 --success: #2e9e5b;
 --success-dim: rgba(46,158,91,0.14);
 --success-text: #27a065;
 --danger: #e05555;
 --r: 10px;
 --r-lg: 16px;
 --r-xl: 22px;
 --r-sm: 8px;
 --header-h: 52px;
 --transition: .18s cubic-bezier(.4,0,.2,1);
 }

 /* ── RESET ──────────────────────────────────────────────── */
 *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
 /* Focus ring for keyboard only. Text inputs opt out — they style their own focus. */
 button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
 outline: 2px solid var(--accent);
 outline-offset: 2px;
 border-radius: 4px;
 }
 html { font-size: 15px; -webkit-font-smoothing: antialiased; }
 body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

 /* Fine grain over the background. Inline SVG noise, no extra request. */
 body::before {
 content: '';
 position: fixed;
 inset: 0;
 z-index: 0;
 pointer-events: none;
 opacity: var(--noise-opacity);
 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
 }
 button { font-family: inherit; }
 input, textarea { font-family: inherit; }
 .hidden { display: none !important; }

 /* ── LAYOUT ─────────────────────────────────────────────── */
 .app { display: flex; min-height: 100vh; flex-direction: row; position: relative; z-index: 1; }

 /* ── SIDEBAR (right) ────────────────────────────────────── */
 .sidebar {
 width: 0;
 flex-shrink: 0;
 border-left: 0px solid var(--border);
 display: flex;
 flex-direction: column;
 position: sticky;
 top: 0;
 height: 100vh;
 overflow: hidden;
 transition: width .25s cubic-bezier(.4,0,.2,1), border-width .25s;
 /* Neutral gray — the sidebar separates from the warm content by being colorless. */
 --bg: #ececec;
 --surface: #e1e1e1;
 --surface2: #d4d4d4;
 --surface3: #c5c5c5;
 --border: rgba(0,0,0,0.10);
 --border2: rgba(0,0,0,0.18);
 --text: #1a1a1a;
 --text2: #454545;
 --text3: #767676;
 background: var(--bg);
 }
 .sidebar.open { width: 224px; border-left-width: 1px; box-shadow: -8px 0 24px rgba(0,0,0,.08); }
 .sidebar-close {
 display: flex; align-items: center; justify-content: center;
 width: 34px; flex-shrink: 0;
 background: none; border: none;
 border-left: 1px solid var(--border);
 color: var(--text3); font-size: 15px;
 transition: background var(--transition), color var(--transition);
 }
 .sidebar-close:hover { background: var(--surface2); color: var(--text); }
 .sidebar-inner { width: 224px; display: flex; flex-direction: column; height: 100%; overflow: hidden; }
 .sidebar-header { height: var(--header-h); display: flex; align-items: stretch; border-bottom: 1px solid var(--border); flex-shrink: 0; }
 .sidebar-nav { padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
 .nav-item {
 display: flex; align-items: center; gap: 10px;
 padding: 10px 13px; border-radius: var(--r);
 border: none; background: none; color: var(--text2);
 font-size: 13px; font-weight: 500;
 text-align: left; width: 100%; white-space: nowrap;
 transition: background var(--transition), color var(--transition);
 }
 .nav-item:hover { background: var(--surface2); color: var(--text); }
 .nav-item.active { background: var(--accent); color: #fff; font-weight: 600; }
 .nav-item svg { flex-shrink: 0; }
 .nav-item-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
 .nav-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
 /* A div, not a button — a button can't contain the star button. */
 .nav-item-project { padding-right: 8px; }
 .nav-item-open {
 display: flex; align-items: center; gap: 10px;
 flex: 1; min-width: 0;
 border: none; background: none; padding: 0;
 color: inherit; font: inherit; text-align: left;
 }
 .sidebar-projects-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border); }
 .nav-item-star { border: none; background: none; flex-shrink: 0; color: var(--text3); opacity: 0.75; padding: 2px; border-radius: 4px; transition: opacity var(--transition), color var(--transition); display: inline-flex; align-items: center; justify-content: center; }
 .nav-item-star:hover { opacity: 1; color: var(--text2); }
 .nav-item-star.active { opacity: 1; color: #f0b429; }
 .nav-item.active .nav-item-star { opacity: 0.7; }
 .nav-item.active .nav-item-star.active { opacity: 1; color: #ffd166; }

 /* ── MAIN ───────────────────────────────────────────────── */
 .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

 .main-header {
 height: var(--header-h);
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 0 16px;
 flex-shrink: 0;
 gap: 8px;
 position: sticky;
 top: 0;
 z-index: 90;
 background: var(--bg);
 border-bottom: 1px solid var(--border);
 }
 .sidebar-toggle {
 background: none; border: none;
 color: var(--text2);
 width: 32px; height: 32px;
 display: flex; align-items: center; justify-content: center;
 border-radius: 8px;
 flex-shrink: 0;
 transition: background var(--transition), color var(--transition);
 }
 .sidebar-toggle:hover { background: var(--surface2); color: var(--text); }
 /* The sidebar's own ✕ closes it, so this one only ever opens it. */
 .app:has(.sidebar.open) .sidebar-toggle { display: none; }
 /* The wordmark: the word cut from the logo file, and its dot drawn here in the
    accent, at the logo's own proportions -- the dot is 93 of the word's 325px,
    9px past the e, on the baseline. */
 .header-logo { --h: 19px; display: inline-flex; align-items: flex-end; background: none; border: none; padding: 0; cursor: pointer; }
 .header-logo img { display: block; height: var(--h); width: auto; }
 .header-logo i { flex: none; width: calc(var(--h) * 93 / 325); height: calc(var(--h) * 93 / 325); margin: 0 0 calc(var(--h) * 1 / 325) calc(var(--h) * 9 / 325); border-radius: 50%; background: var(--accent); }
 @media (max-width: 600px) { .header-logo { --h: 15px; } }
 .sidebar-profile-btn {
 display: flex; align-items: center; gap: 11px;
 padding: 0 16px;
 background: none; border: none; border-radius: 0;
 color: var(--text2); font-size: 13px; font-weight: 500;
 text-align: left; width: 100%; height: 100%;
 white-space: nowrap; font-family: inherit;
 transition: background var(--transition), color var(--transition);
 }
 .sidebar-profile-btn:hover { background: var(--surface2); color: var(--text); }
 .header-profile-avatar {
 width: 32px; height: 32px; border-radius: 50%;
 background: var(--accent-dim); border: 1px solid var(--border2);
 display: flex; align-items: center; justify-content: center;
 font-size: 13px; font-weight: 700; color: var(--accent-text);
 flex-shrink: 0; overflow: hidden;
 box-shadow: 0 1px 3px rgba(0,0,0,.08);
 }
 .header-profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
 .header-profile-name { font-size: 13px; font-weight: 500; color: var(--text2); min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

 .main-content {
 flex: 1;
 padding: 32px 28px 24px;
 max-width: 960px;
 width: 100%;
 margin: 0 auto;
 }

 /* ── PAGES ──────────────────────────────────────────────── */
 .page { display: none; }
 .page.active { display: block; animation: pageFadeIn .22s ease; }
 .page-narrow { max-width: 720px; width: 100%; margin: 0 auto; }
 #page-home.active { display: flex; flex-direction: column; }
 @keyframes pageFadeIn {
 from { opacity: 0; transform: translateY(6px); }
 to { opacity: 1; transform: translateY(0); }
 }
 @media (prefers-reduced-motion: reduce) {
 .page.active { animation: none; }
 }

 /* ── BUTTONS ────────────────────────────────────────────── */
 .btn {
 display: inline-flex; align-items: center; gap: 6px;
 padding: 8px 18px; border-radius: var(--r);
 font-size: 13px; font-weight: 500;
 border: none; transition: all var(--transition);
 }
 .btn-primary { background: var(--accent); color: white; box-shadow: 0 2px 6px color-mix(in srgb, var(--accent) 35%, transparent), 0 1px 2px rgba(0,0,0,.1); }
 .btn-primary:hover { opacity: .92; transform: translateY(-1px); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent), 0 2px 4px rgba(0,0,0,.12); }
 .btn-ghost { background: var(--surface2); color: var(--text2); border: 1px solid var(--border); }
 .btn-ghost:hover { background: var(--surface3); color: var(--text); }
 .btn-danger-soft { background: none; color: var(--danger); border: 1px solid rgba(224,85,85,0.3); }
 .btn-danger-soft:hover { background: rgba(224,85,85,0.08); }
 .btn-danger { background: var(--danger); color: white; }
 .btn-danger:hover { opacity: 0.9; }

 /* ── HOME PAGE ──────────────────────────────────────────── */
 .btn-done { background: var(--accent); color: white; padding: 10px 22px; border-radius: var(--r); font-size: 14px; font-weight: 600; border: none; transition: opacity var(--transition); }
 .btn-done:hover { opacity: .85; }

 /* ── CONVEX VIEW ────────────────────────────────────────── */
 .cvx-goals { display: flex; flex-direction: column; gap: 12px; }
 .cvx-goal { background: color-mix(in srgb, var(--card-accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--card-accent) 30%, var(--border)); border-radius: var(--r-lg); overflow: hidden; transition: border-color var(--transition); }
 .cvx-goal.done { opacity: .6; }
 .cvx-goal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
 .cvx-goal-name { font-size: 13px; font-weight: 700; color: var(--accent-text); text-transform: uppercase; letter-spacing: .4px; }
 .cvx-task-text { font-size: 13px; color: var(--text2); flex: 1; }
 .cvx-task.done .cvx-task-text { text-decoration: line-through; color: var(--text3); }
 .cvx-goal-pct { font-size: 11px; font-weight: 600; color: var(--text3); }
 .cvx-goal.done .cvx-goal-pct { color: var(--success-text); }
 .cvx-goal-progress { height: 2px; background: var(--surface3); margin: 0 16px 10px; border-radius: 1px; overflow: hidden; }
 .cvx-goal-empty-hint { font-size: 12px; color: var(--text3); padding: 4px 16px 14px; font-style: italic; }
 .cvx-goal-bar { height: 100%; background: var(--accent); border-radius: 1px; transition: width .4s ease; }
 .cvx-goal.done .cvx-goal-bar { background: var(--success); }
 .cvx-phase { border-top: 1px solid var(--border); padding: 8px 16px 4px; }
 .cvx-phase-label { font-size: 11px; font-weight: 600; color: var(--success-text); text-transform: capitalize; letter-spacing: .4px; margin-bottom: 4px; }
 .cvx-tasks { padding: 0 16px 8px; }
 .cvx-task { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--border); border-radius: 6px; margin: 0 -10px; transition: background var(--transition); }
 .cvx-task:last-child { border-bottom: none; }
 .cvx-task:hover { background: var(--surface); }
 .cvx-task.current { background: color-mix(in srgb, var(--accent) 8%, transparent); border-bottom-color: transparent; }
 .cvx-check-circle { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border2); background: none; flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: 0; transition: all var(--transition); }
 .cvx-check-circle:hover { border-color: var(--text3); }
 .cvx-check-circle.done { background: var(--accent); border-color: var(--accent); }
 .cvx-task-dbl-input { background: none; border: none; border-bottom: 1px solid var(--accent); outline: none; font-size: 13px; color: var(--text); font-family: inherit; flex: 1; padding: 1px 0; }

 /* PROJECT CARDS */
 .card-goal-tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 10px 0 0; justify-content: center; }
 .card-goal-tabs-project-page { margin-bottom: 16px; }
 .card-goal-tab { background: none; border: 1px solid transparent; border-radius: var(--r-sm); font-size: 11px; font-weight: 600; color: var(--text3); padding: 4px 12px; font-family: inherit; transition: all var(--transition); white-space: nowrap; text-transform: uppercase; letter-spacing: .3px; }
 .card-goal-tab:hover { color: var(--text); background: var(--surface2); }
 .card-goal-tab.active { color: var(--text); background: color-mix(in srgb, var(--card-accent) 35%, var(--surface2)); border-color: color-mix(in srgb, var(--card-accent) 50%, var(--border2)); box-shadow: 0 2px 8px rgba(0,0,0,.2); font-weight: 700; }
 .editor-goal-tab-wrap { display: inline-flex; align-items: center; gap: 2px; }
 .goal-tab-arrow { background: none; border: none; color: var(--text3); font-size: 13px; padding: 2px 3px; border-radius: 4px; font-family: inherit; line-height: 1; transition: all var(--transition); }
 .goal-tab-arrow:hover:not(:disabled) { color: var(--text); background: var(--surface2); }
 .goal-tab-arrow:disabled { opacity: 0.25; cursor: default; }
 .editor-goal-tab.active { color: var(--text); background: var(--surface2); border-color: var(--border2); font-weight: 700; }

 /* ── EDITOR: SHELL ──────────────────────────────────────── */
 .editor-wrap {
 --card-accent: #5B9CF6;
 background: var(--surface);
 border: 1px solid var(--border);
 border-radius: var(--r-xl);
 overflow: visible;
 position: relative;
 margin-bottom: 24px;
 box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 12px 32px rgba(0,0,0,.06);
 transition: background var(--transition), border-color var(--transition);
 }
 .editor-head {
 padding: 15px 20px;
 display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
 background: var(--card-accent, var(--accent));
 border-radius: var(--r-xl) var(--r-xl) 0 0;
 }
 .editor-title-input {
 flex: 1; background: none; border: none; outline: none;
 font-size: 18px; font-weight: 700; color: #fff;
 min-width: 120px;
 }
 .editor-title-input::placeholder { color: rgba(255,255,255,0.6); }
 .editor-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
 .editor-overlay-width { max-width: 720px; margin: 0 auto; }
 /* Cancel translucent, Save solid white with accent text so it pops on the band. */
 .editor-cancel-btn { border: none; background: rgba(0,0,0,.14); color: #fff; }
 .editor-cancel-btn:hover { background: rgba(0,0,0,.22); color: #fff; }
 .editor-save-btn { padding-left: 28px; padding-right: 28px; background: #fff; color: var(--card-accent, var(--accent)); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
 .editor-save-btn:hover { background: #fff; opacity: .94; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,.22); }

 /* ── EDITOR: COLOR PICKER ───────────────────────────────── */
 .color-picker { display: flex; gap: 7px; align-items: center; }
 .color-pick-btn { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; transition: all var(--transition); padding: 0; flex-shrink: 0; }
 .color-pick-btn[data-color="#5B9CF6"] { background: #5B9CF6; }
 .color-pick-btn[data-color="#C49EF5"] { background: #C49EF5; }
 .color-pick-btn[data-color="#5EC9A0"] { background: #5EC9A0; }
 .color-pick-btn[data-color="#E5A56B"] { background: #E5A56B; }
 .color-pick-btn[data-color="#E27A9E"] { background: #E27A9E; }
 .color-pick-btn[data-color="#E0697A"] { background: #E0697A; }
 .color-pick-btn[data-color="#F4D35E"] { background: #F4D35E; }
 .color-pick-btn[data-color="#9AA5B1"] { background: #9AA5B1; }
 .color-pick-btn:hover { transform: scale(1.15); }
 .color-pick-btn.selected { box-shadow: 0 0 0 2px white; }

 /* ── EDITOR: GOAL TABS ──────────────────────────────────── */
 .editor-goal-tabs { display: flex; gap: 4px; padding: 10px 16px; flex-wrap: wrap; justify-content: center; border-bottom: 1px solid var(--border); }
 .editor-goal-tabs.hidden { display: none; }
 .editor-goal-tab { background: none; border: 1px solid transparent; border-radius: var(--r-sm); font-family: inherit; font-size: 11px; font-weight: 600; color: var(--text3); padding: 4px 12px; transition: all var(--transition); white-space: nowrap; text-transform: uppercase; letter-spacing: .3px; }
 .editor-goal-tab:hover { color: var(--text); background: var(--surface2); }
 .color-picker-flyout { display: none; flex-wrap: wrap; gap: 13px; align-items: center; padding: 8px 0; }
 .color-picker-flyout.open { display: flex; }
 .editor-color-flyout-wrap { display: flex; align-items: center; flex-shrink: 0; }

 /* ── EDITOR: TOOLBAR & KEYBOARD SHORTCUTS FOOTER ─────────── */
 .editor-toolbar-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; position: relative; }
 .editor-paint-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #5B9CF6; border: 1.5px solid var(--border2); flex-shrink: 0; transition: background var(--transition); }
 .shortcuts-footer { text-align: center; padding: 16px 0 8px; display: none; }
 .shortcuts-footer-grid { padding: 8px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 8px; }
 .shortcuts-footer-grid span { font-size: 12px; color: var(--text3); display: flex; align-items: center; gap: 5px; }
 .shortcuts-footer-grid kbd { font-family: inherit; font-size: 10px; background: var(--surface2); border: 1px solid var(--border2); border-radius: 4px; padding: 2px 5px; color: var(--text3); }

 /* ── EDITOR: BLOCK ROWS (goals, phases, tasks) ───────────── */
 .block-row {
 display: flex; align-items: flex-start; gap: 6px;
 padding: 10px 12px;
 transition: background var(--transition);
 position: relative;
 border-bottom: 1px solid var(--border);
 }
 .block-row:last-child { border-bottom: none; }
 .block-row:hover { background: var(--surface2); }
 .block-row:focus-within { background: var(--surface2); }

 /* Goal = card header */
 .block-row[data-type="section"] {
 margin-top: 16px;
 background: var(--surface2) !important;
 border: 1px solid var(--border2);
 border-radius: var(--r-lg) var(--r-lg) 0 0 !important;
 border-bottom: 1px solid var(--border2);
 }
 .block-row[data-type="section"]:first-child { margin-top: 0; }

 /* Phase = inside card, indented label */
 .block-row[data-type="phase"] {
 padding-left: 20px;
 background: none;
 border-left: 1px solid var(--border2);
 border-right: 1px solid var(--border2);
 }

 /* Task = deepest indent */
 .block-row[data-type="step"] {
 padding-left: 36px;
 background: none;
 border-left: 1px solid var(--border2);
 border-right: 1px solid var(--border2);
 }

 /* Round bottom of last item before next goal or end */
 .block-row[data-type="phase"]:not(:has(+ .block-row)),
 .block-row[data-type="step"]:not(:has(+ .block-row)),
 .block-row[data-type="phase"]:has(+ .block-row[data-type="section"]),
 .block-row[data-type="step"]:has(+ .block-row[data-type="section"]) {
 border-radius: 0 0 var(--r-lg) var(--r-lg) !important;
 border-bottom: 1px solid var(--border2);
 }

 #editorBlocks { background: none; overflow: visible; padding: 12px 16px 4px; }
 .block-arrows { display: flex; flex-direction: column; flex-shrink: 0; transition: opacity var(--transition); }
 .block-arrow { background: none; border: none; color: var(--text3); font-size: 8px; line-height: 1; padding: 1px 3px; border-radius: 3px; font-family: inherit; }
 .block-arrow:hover { color: var(--text); background: var(--surface2); }
 @media (hover: hover) {
 .block-arrows { opacity: 0; }
 .block-row:hover .block-arrows { opacity: 1; }
 }
 .block-type-btn {
 font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
 padding: 4px 10px; border-radius: 6px; border: 1px solid rgba(128,128,128,0.25);
 white-space: nowrap; flex-shrink: 0;
 background: rgba(128,128,128,0.12); color: var(--text2);
 transition: all var(--transition);
 }
 .block-type-btn:hover { background: rgba(128,128,128,0.22); color: var(--text); }
 .block-type-btn.is-section { background: var(--accent-dim); color: var(--accent-text); border: 1px solid rgba(68,104,232,0.35); }
 .block-type-btn.is-phase { background: var(--success-dim); color: var(--success-text); border: 1px solid rgba(46,158,91,0.35); }
 .block-type-btn.is-section:hover { background: rgba(68,104,232,0.22); }
 .block-type-btn.is-phase:hover { background: rgba(46,158,91,0.22); }
 .block-input {
 flex: 1; background: none; border: none; outline: none;
 font-size: 14px; color: var(--text); padding: 2px 0; min-width: 0;
 resize: none; overflow: hidden; line-height: 1.5;
 font-family: inherit; min-height: 24px; height: auto;
 }
 .block-input.is-section { font-size: 15px; font-weight: 700; text-transform: uppercase; }
 .block-input.is-phase { font-size: 14px; font-weight: 600; text-transform: capitalize; }
 .block-input::placeholder { color: rgba(128,128,128,0.45); opacity: 1; }
 .block-del { background: none; border: none; color: var(--text3); font-size: 15px; padding: 2px 4px; transition: opacity var(--transition); line-height: 1; }
 @media (hover: hover) {
 .block-del { opacity: 0; }
 .block-row:hover .block-del { opacity: 1; }
 }
 @media (hover: none) {
 .block-del { padding: 12px; margin: -10px -8px -10px -2px; }
 .block-arrow { padding: 6px 8px; }
 .block-arrows { opacity: 1; }
 }
 .block-row.done-block .block-input { text-decoration: line-through; opacity: .35; }
 .editor-toolbar { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; position: relative; }
 .editor-tool-btn { display: flex; align-items: center; gap: 5px; background: none; border: none; color: var(--text3); font-size: 12px; font-weight: 500; padding: 4px 8px; border-radius: 6px; font-family: inherit; transition: all var(--transition); }
 .editor-tool-btn:hover { color: var(--text); background: var(--surface2); }
 .editor-add-row { display: flex; gap: 6px; padding: 20px 12px 12px; align-items: center; justify-content: space-between; }
 .editor-add-group { display: flex; gap: 6px; align-items: center; }
 .editor-delete-project-btn { background: none; border: none; color: var(--text3); font-size: 12px; font-weight: 500; font-family: inherit; padding: 6px 10px; border-radius: 6px; transition: color var(--transition), background var(--transition); }
 .editor-delete-project-btn:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
 .editor-delete-project-btn.hidden { display: none; }
 .editor-add-btn {
 background: var(--surface2); border: 1px solid var(--border2);
 border-radius: var(--r-sm); font-size: 12px; font-weight: 500;
 color: var(--text2); padding: 5px 14px;
 font-family: inherit; transition: all var(--transition);
 }
 .editor-add-btn:hover { background: var(--surface3); color: var(--text); border-color: var(--border2); }

 /* ── SAVE ERROR BAR ───────────────────────────────────────── */
 .save-error-bar {
 position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px);
 max-width: 90vw; padding: 12px 18px;
 background: var(--danger); color: #fff;
 font-size: 13px; font-weight: 500; text-align: center;
 border-radius: var(--r); box-shadow: 0 8px 24px rgba(0,0,0,.3);
 z-index: 2000; opacity: 0; pointer-events: none;
 transition: opacity var(--transition), transform var(--transition);
 }
 .save-error-bar.visible { opacity: 1; transform: translate(-50%, 0); }
 @media (prefers-reduced-motion: reduce) {
 .save-error-bar { transition: none; }
 }

 /* ── CONFIRM MODAL (used app-wide, not just the editor) ──── */
 .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1000; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
 .modal-overlay.hidden { display: none; }
 /* Floats above a dark scrim, so it drops a shadow rather than glowing. */
 .modal-card { background: var(--bg); border: 1px solid var(--border2); border-radius: var(--r-xl); padding: 32px 28px 24px; min-width: 300px; max-width: 380px; width: 90%; box-shadow: 0 24px 64px rgba(0,0,0,.35); }
 .modal-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
 .modal-sub { font-size: 14px; color: var(--text3); margin-bottom: 28px; }
 .modal-btns { display: flex; gap: 10px; justify-content: flex-end; }

 /* ── SETTINGS PAGE ──────────────────────────────────────── */
 .settings-group { margin-bottom: 28px; }
 .settings-group-spaced { margin-top: 32px; }
 .settings-group-label { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px; }
 .settings-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 10px rgba(0,0,0,.05); }
 .settings-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
 .settings-row + .settings-row { border-top: 1px solid var(--border); }
 .settings-info { flex: 1; }
 .settings-title { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 1px; }
 .settings-sub { font-size: 12px; color: var(--text3); }
 .pill-toggle { display: flex; background: none; border-radius: 8px; padding: 3px; gap: 2px; }
 .pill-btn { background-color: transparent; background-image: none; appearance: none; -webkit-appearance: none; border: 1px solid transparent; border-radius: 6px; font-size: 12px; font-weight: 500; color: rgba(0,0,0,0.4); padding: 5px 12px; font-family: inherit; transition: all var(--transition); }
 .pill-btn:hover { color: var(--text); }
 .pill-btn.active { background: var(--surface); color: var(--text); border-color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,0.2); font-weight: 600; }

 /* ── ACCOUNT PAGE ───────────────────────────────────────── */
 .acct-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; padding-top: 8px; }
 .acct-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-dim); border: 2px solid var(--border2); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: var(--accent-text); flex-shrink: 0; box-shadow: 0 2px 6px rgba(0,0,0,.1); }
 .acct-hero-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
 .acct-name-input { background: none; border: none; border-bottom: 1.5px solid transparent; outline: none; font-size: 18px; font-weight: 700; color: var(--text); padding: 2px 0; font-family: inherit; width: 200px; transition: border-color var(--transition); }
 .acct-name-input:hover { border-bottom-color: var(--border2); }
 .acct-name-input:focus { border-bottom-color: var(--accent); cursor: text; }
 .acct-name-input::placeholder { color: var(--text3); font-weight: 400; }
 .acct-name-save { background: none; border: none; color: var(--accent); font-size: 12px; font-weight: 600; font-family: inherit; padding: 0; text-align: left; opacity: 0; pointer-events: none; transition: opacity var(--transition); }
 .acct-hero-info:focus-within .acct-name-save { opacity: 1; pointer-events: all; }
 .stats-row { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-bottom: 24px; }
 .stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 10px rgba(0,0,0,.05); }
 .stat-num { font-size: 24px; font-weight: 700; color: var(--text); display: block; }
 .stat-label { font-size: 11px; color: var(--text3); margin-top: 2px; display: block; }

 /* ── GOTITDONE PAGE ─────────────────────────────────────── */
 .vault-header { margin-bottom: 16px; }
 .vault-sort-row { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
 .vault-sort-label { font-size: 12px; color: var(--text3); font-weight: 500; }
 .vault-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
 .vault-sub { font-size: 13px; color: var(--text3); }
 .vault-stats { display: flex; gap: 18px; margin-top: 14px; flex-wrap: wrap; }
 .vault-stat-num { font-size: 20px; font-weight: 700; color: var(--text); }
 .vault-stat-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: .04em; margin-top: 1px; }
 .done-card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--card-accent, var(--border)); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 8px; transition: all var(--transition); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 10px rgba(0,0,0,.05); }
 .done-card-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; margin-right: 7px; }
 .done-card:hover { border-color: var(--border2); }
 .done-card-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
 .done-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 2px 7px; border-radius: 4px; background: var(--success-dim); color: var(--success-text); flex-shrink: 0; }
 .done-card-name { flex: 1; font-size: 14px; font-weight: 500; color: var(--text); }
 .done-card-date { font-size: 12px; color: var(--text3); }
 .done-chevron { color: var(--text3); font-size: 16px; transition: transform var(--transition); }
 .done-card.open .done-chevron { transform: rotate(90deg); }
 .done-card-body { padding: 0 16px 14px; display: none; }
 .done-card.open .done-card-body { display: block; }
 .done-card-created { font-size: 11px; color: var(--text3); margin-bottom: 10px; }
 .done-goal-name { font-size: 12px; font-weight: 700; color: var(--accent-text); margin: 10px 0 4px; text-transform: uppercase; letter-spacing: .3px; }
 .done-phase-name { font-size: 11px; font-weight: 600; color: var(--success-text); margin: 8px 0 4px 12px; text-transform: uppercase; letter-spacing: .3px; }
 .done-task-item { font-size: 13px; color: var(--text3); padding: 3px 0 3px 12px; display: flex; align-items: center; gap: 6px; }
 .done-task-item::before { content: '✓'; color: var(--success); font-size: 10px; flex-shrink: 0; }

 /* ── PROJECTS LIST PAGE ─────────────────────────────────── */

 .projects-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
 .projects-page-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
 .projects-list-empty { text-align: center; padding: 60px 20px; color: var(--text3); }
 .projects-list-empty p { font-size: 15px; margin-bottom: 20px; }
 .projects-empty-create-btn { margin-top: 16px; padding: 12px 24px; font-size: 14px; }

 /* ── FINISH SUMMARY PAGE ────────────────────────────────── */
 .finish-summary-wrap { text-align: center; padding-top: 12px; }
 .finish-summary-badge { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
 .finish-summary-title { font-family: 'Secular One', sans-serif; font-size: 24px; color: var(--text); letter-spacing: -.2px; margin-bottom: 6px; }
 .finish-summary-sub { font-size: 13px; color: var(--text3); margin-bottom: 14px; }
 .finish-summary-stat { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 22px; }
 .finish-summary-stat-dim { font-weight: 500; color: var(--text3); }
 .finish-summary-toggle { background: none; border: none; color: var(--text3); font-size: 12px; font-weight: 500; font-family: inherit; display: inline-flex; align-items: center; gap: 5px; margin-bottom: 4px; padding: 6px; transition: color var(--transition); }
 .finish-summary-toggle:hover { color: var(--text); }
 .finish-summary-toggle svg { transition: transform .2s ease; }
 .finish-summary-toggle.open svg { transform: rotate(180deg); }
 .finish-summary-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 20px; text-align: left; margin: 14px 0 24px; }
 .finish-summary-card.hidden { display: none; }
 .finish-summary-goal-name { font-size: 12px; font-weight: 700; color: var(--accent-text); text-transform: uppercase; letter-spacing: .3px; margin: 14px 0 6px; }
 .finish-summary-goal-name:first-child { margin-top: 0; }
 .finish-summary-phase-name { font-size: 11px; font-weight: 600; color: var(--success-text); text-transform: uppercase; letter-spacing: .3px; margin: 10px 0 4px 12px; }
 .finish-summary-task { font-size: 13px; color: var(--text2); padding: 3px 0 3px 12px; display: flex; align-items: center; gap: 6px; }
 .finish-summary-task::before { content: '✓'; color: var(--success); font-size: 10px; flex-shrink: 0; }
 .finish-summary-done-btn { width: 100%; height: 48px; border-radius: 14px; border: none; color: #fff; font-size: 15px; font-weight: 600; font-family: inherit; transition: all var(--transition); box-shadow: 0 3px 10px rgba(0,0,0,.16), 0 1px 3px rgba(0,0,0,.1); }
 .finish-summary-done-btn:hover { opacity: .92; transform: translateY(-1px); box-shadow: 0 5px 16px rgba(0,0,0,.2), 0 2px 4px rgba(0,0,0,.12); }
 /* ── PROJECT GRID ─────────────────────────────────── */
 .projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 4px 0 24px; }
 @media (max-width: 600px) { .projects-grid { grid-template-columns: 1fr; } }
 .project-grid-card { --card-accent: #5B9CF6; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0; transition: all var(--transition); display: flex; flex-direction: column; min-height: 200px; position: relative; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 10px rgba(0,0,0,.05); }
 .project-grid-card:hover { box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.1); transform: translateY(-1px); }
 /* Colored title band across the top. */
 .project-grid-band { padding: 13px 16px; position: relative; display: flex; align-items: center; }
 .project-grid-name { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 22px; }
 /* Current task, centered in the body between band and bar. */
 .project-grid-body { flex: 1; display: flex; align-items: flex-start; padding: 15px 15px; }
 .project-grid-task { font-size: 18px; color: var(--text); font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
 /* Flush progress bar along the very bottom edge. */
 .project-grid-flush { height: 6px; width: 100%; background: var(--border); flex-shrink: 0; }
 .project-grid-flush-fill { height: 100%; transition: width var(--transition); }
 .project-grid-new {
 background: none; box-shadow: none; border: 1.5px dashed var(--border2);
 align-items: center; justify-content: center; gap: 6px;
 color: var(--text3); font-family: inherit; padding: 16px;
 }
 .project-grid-new:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); box-shadow: none; transform: none; }
 .project-grid-new-icon { font-size: 22px; font-weight: 400; line-height: 1; }
 .project-grid-new-label { font-size: 13px; font-weight: 600; }
 /* Star sits on the colored band, tinted for contrast. */
 .project-grid-star { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: rgba(255,255,255,.6); opacity: 1; background: none; border: none; padding: 2px; border-radius: 6px; transition: color var(--transition); display: flex; align-items: center; justify-content: center; z-index: 2; }
 .project-grid-star:hover { color: rgba(255,255,255,.9); }
 .project-grid-star.active { color: #ffd84d; }
 .project-grid-star.active svg { fill: #ffd84d; stroke: #ffd84d; }
 .project-grid-star svg { width: 16px; height: 16px; }

 /* ── INDIVIDUAL PROJECT PAGE ──────────────────────── */
 #page-project.active { display: flex; flex-direction: column; max-width: 780px; width: 100%; margin: 0 auto; }
 #projectPageBack { margin-bottom: 8px; }
 #projectPageContent { --card-accent: #5B9CF6; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; transition: background var(--transition); box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 12px 32px rgba(0,0,0,.06); }
 .project-page-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text3); background: none; border: none; font-family: inherit; padding: 4px 8px; border-radius: 6px; transition: all var(--transition); }
 .project-page-back:hover { color: var(--text); background: var(--surface2); }
 .project-page-body { padding: 0; }

 /* Mirrors the project card, so opening one feels like it expanded into the page. */
 .pp-band { padding: 13px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
 .pp-band-name { font-size: 18px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
 .pp-band-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
 .pp-band-edit { flex-shrink: 0; background: none; border: none; color: rgba(255,255,255,.75); padding: 5px; border-radius: 7px; display: flex; align-items: center; justify-content: center; transition: color var(--transition), background var(--transition); }
 .pp-band-edit:hover { color: #fff; background: rgba(0,0,0,.14); }
 .pp-inner { padding: 20px 30px 30px; }
 /* Sits on the coloured band — frosted active tab rather than a solid white slab. */
 .pp-mode-toggle { display: inline-flex; background: rgba(0,0,0,.14); border-radius: var(--r); padding: 2px; gap: 2px; }
 .pp-mode-btn { border: none; background: none; padding: 5px 13px; border-radius: var(--r-sm); font-size: 12px; font-weight: 600; color: rgba(255,255,255,.9); font-family: inherit; transition: all var(--transition); white-space: nowrap; }
 .pp-mode-btn.active { background: rgba(255,255,255,.9); color: var(--card-accent, var(--accent)); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
 .pp-mode-btn:not(.active):hover { color: #fff; }
 .pp-progress-line { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin: 0 0 4px; }
 .pp-progress-fill { height: 100%; border-radius: 2px; transition: width .3s ease; }


 .focus-view { display: flex; flex-direction: column; }
 .focus-content { padding: 32px 2px 40px; position: relative; }

 /* ── TIMELINE BAR ──────────────────────────────────────── */
 /* One bar for the whole goal→phase→task shape: dots ride the track, fill tracks progress. */
 .tl-wrap { position: relative; padding: 30px 8px 30px; margin-bottom: 10px; }
 .tl-bar { position: relative; height: 11px; background: var(--border); border-radius: 6px; box-shadow: inset 0 1px 2px rgba(0,0,0,.12); }
 /* Green for partial progress, blue once a goal is fully climbed. */
 .tl-fill {
 position: absolute; top: 0; height: 100%; border-radius: 0; pointer-events: none; z-index: 1;
 transition: width .44s cubic-bezier(.22,.61,.36,1), background-color .44s ease;
 }
 .tl-fill-phase { background: var(--success); }
 .tl-fill-goal { background: var(--accent); z-index: 2; }
 /* Only the leading edge and the start of a run stay rounded; the rest butt square. */
 .tl-fill.round-l { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
 .tl-fill.round-r { border-top-right-radius: 6px; border-bottom-right-radius: 6px; }
 /* One dot per goal, sitting on the track. */
 .tl-dot {
 position: absolute; top: 50%; width: 15px; height: 15px; border-radius: 50%;
 transform: translate(-50%, -50%); z-index: 3; pointer-events: none;
 border: 3px solid var(--surface); background: var(--border2);
 box-shadow: 0 1px 3px rgba(0,0,0,.22);
 }
 /* Done goals = blue (matches the settled end of the gradient). */
 .tl-dot.done { background: var(--accent); }
 /* Current goal = hollow with a green halo (matches the leading progress edge). */
 .tl-dot.current {
 background: var(--surface); border: 3px solid var(--success); width: 16px; height: 16px;
 box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 20%, transparent), 0 1px 3px rgba(0,0,0,.18);
 }
 .tl-dot.up { background: var(--border2); box-shadow: none; }

 /* Goal label above the bar, phase label below; JS clamps both to the edges. */
 .tl-goal-label {
 position: absolute; top: 8px; transform: translateX(-50%);
 font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
 color: var(--accent-text); white-space: nowrap; pointer-events: none;
 opacity: 0; transition: opacity .14s ease, left .12s ease;
 }
 .tl-phase-label {
 position: absolute; bottom: 8px; transform: translateX(-50%);
 font-size: 12px; font-weight: 600; color: var(--success-text);
 white-space: nowrap; pointer-events: none;
 opacity: 0; transition: opacity .12s ease, left .12s ease;
 }
 .tl-goal-label.show, .tl-phase-label.show { opacity: 1; }
 /* No fade on the render paint, or labels blink every time the card re-renders. */
 .tl-goal-label.no-anim, .tl-phase-label.no-anim { transition: none; }

 @media (prefers-reduced-motion: reduce) {
 .tl-fill { transition: none; animation: none; }
 .tl-goal-label, .tl-phase-label { transition: opacity .14s ease; }
 }

 /* Next task waits off-screen right; completing slides the track left. */
 .focus-stage { overflow: hidden; margin: 34px 0 38px; }
 .focus-track { display: flex; align-items: flex-start; transition: transform .52s cubic-bezier(.22,.61,.36,1); }
 .focus-track.advancing { transform: translateX(-100%); }
 .focus-slot { flex: 0 0 100%; min-width: 0; text-align: center; }
 .focus-slot-next .focus-task-text { opacity: 1; }

 .focus-task-text { font-size: 40px; font-weight: 700; color: var(--text); line-height: 1.25; letter-spacing: -.01em;
 display: inline-block; }
 @media (prefers-reduced-motion: reduce) {
 .focus-track { transition: none; }
 }
 .focus-check-burst {
 position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
 pointer-events: none; animation: checkBurst .38s ease forwards; z-index: 2;
 }
 .focus-check-burst-circle {
 width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
 box-shadow: 0 4px 16px rgba(0,0,0,.2);
 }
 @keyframes checkBurst {
 0% { opacity: 0; transform: scale(.4); }
 40% { opacity: 1; transform: scale(1.1); }
 100% { opacity: 0; transform: scale(1); }
 }
 .focus-done-btn.pulsed { animation: donePulse .2s ease; }
 @keyframes donePulse { 0% { transform: scale(1); } 50% { transform: scale(.96); } 100% { transform: scale(1); } }
 .focus-actions { padding-top: 8px; }

 /* Just the Done button now — one thing at a time, no skip. */
 .focus-action-bar {
 display: flex; margin-bottom: 8px; height: 52px;
 border-radius: 16px; overflow: hidden;
 background: var(--card-accent);
 box-shadow: 0 3px 10px rgba(0,0,0,.16), 0 1px 3px rgba(0,0,0,.1);
 transition: transform var(--transition), box-shadow var(--transition);
 }
 .focus-action-bar:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(0,0,0,.2), 0 2px 4px rgba(0,0,0,.12); }
 .focus-done-btn {
 flex: 1; height: 100%; border: none; background: none; color: #fff;
 font-size: 16px; font-weight: 600; font-family: inherit;
 transition: filter var(--transition);
 }
 .focus-done-btn:hover { filter: brightness(1.05); }

 .focus-kbd-hint { text-align: center; font-size: 11px; color: var(--text3); margin-top: 10px; opacity: 0.7; }
 .focus-kbd-hint kbd { font-family: inherit; background: var(--surface2); border: 1px solid var(--border2); border-radius: 4px; padding: 1px 5px; font-size: 10px; }
 .focus-empty { text-align: center; padding: 60px 20px; font-size: 18px; font-weight: 600; color: var(--text2); }

 #projectPageContent .cvx-goal { background: none; border: none; border-radius: 0; }
 #projectPageContent .cvx-goal-header { padding: 4px 2px 6px; }
 #projectPageContent .cvx-goal-progress { margin: 0 2px 10px; }
 #projectPageContent .cvx-goal-empty-hint { padding: 4px 2px 14px; }
 #projectPageContent .cvx-phase { padding: 6px 2px 2px; }
 #projectPageContent .cvx-tasks { padding: 0 2px 4px; }
 #projectPageContent .card-goal-tab.active { background: var(--surface2); border-color: var(--border2); font-weight: 700; color: var(--text); }

 /* ── TABLET ─────────────────────────────────────────────── */
 @media (min-width: 601px) and (max-width: 900px) {
 .main-content { padding: 24px 18px 24px; }
 .focus-task-text { font-size: 33px; }
 }

 @media (max-width: 600px) {
 html, body { overflow-x: hidden; }
 .focus-kbd-hint { display: none; }
 .focus-task-text { font-size: 29px; }
 /* Layout — sidebar becomes an opaque slide-in drawer */
 .sidebar {
 position: fixed;
 top: 0; right: 0;
 height: 100vh; height: 100dvh;
 z-index: 210;
 width: min(260px, 84vw);
 border-left: 1px solid var(--border2);
 background: var(--bg);
 transform: translateX(102%);
 transition: transform .28s cubic-bezier(.4,0,.2,1);
 overflow: visible;
 }
 .sidebar.open {
 width: min(260px, 84vw);
 transform: translateX(0);
 box-shadow: -16px 0 48px rgba(0,0,0,.35);
 }
 .sidebar-inner { width: 100%; }
 .main-content { padding: 16px 12px 24px; }

 /* Header */
 .main-header { padding: 0 12px; }

 /* Editor */
 .editor-head { padding: 16px 12px 14px; flex-wrap: wrap; gap: 8px; }
 .editor-title-input { font-size: 15px; }
 .editor-actions { gap: 6px; }
 #editorSave, #editorCancel { min-height: 44px; padding-top: 0; padding-bottom: 0; }
 .editor-tool-btn, .editor-add-btn { min-height: 44px; }
 .editor-toolbar { padding: 8px 12px; flex-wrap: wrap; gap: 6px; overflow: visible; }
 .editor-add-row { padding: 10px 12px 8px; flex-wrap: wrap; }
 #editorBlocks { padding: 8px 12px 4px; }
 .block-row[data-type="phase"] { padding-left: 14px; }
 .block-row[data-type="step"] { padding-left: 24px; }

 /* Goal/cvx view */
 .cvx-goal-header { padding: 10px 12px 6px; }
 .cvx-phase { padding: 8px 12px 4px; }
 .cvx-tasks { padding: 0; }
 .cvx-task { padding: 7px 8px; margin: 0 -8px; }

 /* Shortcuts */
 .shortcuts-footer-grid { gap: 4px 10px; font-size: 11px; }
 }
