/* Second Brain — design system (light + dark, desktop + mobile) */
:root {
  --bg:#FAF9F6; --surface:#FFFFFF; --surface-soft:#F4F2EC;
  --ink:#111111; --on-ink:#FFFFFF; --ink-soft:#3A3A3C; --muted:#86868B;
  --line:rgba(17,17,17,.09); --line-strong:rgba(17,17,17,.18);
  --sand:#F7E8CC; --mint:#DCECE9; --sage:#D9ECD9; --lilac:#E0D7FA; --peach:#F9DDD0;
  --danger:#C94A38; --good:#2A7B4F;
  --chip-bg:rgba(255,255,255,.72); --field-bg:rgba(255,255,255,.72); --track:rgba(17,17,17,.09);
  --glass:rgba(250,249,246,.86); --overlay:rgba(17,17,17,.34);
  --nav-bg:#111111; --nav-fg:rgba(255,255,255,.62); --nav-active-bg:#F7E8CC; --nav-active-fg:#111111;
  --wheel-fill:rgba(17,17,17,.18); --wheel-prev:rgba(17,17,17,.38);
  --shadow-sm:0 2px 10px rgba(17,17,17,.05); --shadow-md:0 12px 32px rgba(17,17,17,.10); --shadow-lg:0 24px 60px rgba(17,17,17,.18);
  --radius-xl:30px; --radius-lg:22px; --radius-md:16px; --radius-pill:999px;
  --ease:cubic-bezier(.22,1,.36,1);
  --font-sans:"Google Sans","Google Sans Flex","Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --font-display:var(--font-sans);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg:#141413; --surface:#1E1E1C; --surface-soft:#282826;
  --ink:#F2F0EA; --on-ink:#141413; --ink-soft:#CFCCC4; --muted:#8E8E93;
  --line:rgba(255,255,255,.09); --line-strong:rgba(255,255,255,.2);
  --sand:#3B3425; --mint:#25383A; --sage:#273B2B; --lilac:#352F4C; --peach:#44302A;
  --danger:#EE7B69; --good:#62C894;
  --chip-bg:rgba(255,255,255,.10); --field-bg:rgba(255,255,255,.07); --track:rgba(255,255,255,.12);
  --glass:rgba(20,20,19,.86); --overlay:rgba(0,0,0,.6);
  --nav-bg:#2A2927; --nav-fg:rgba(255,255,255,.6); --nav-active-bg:#F2F0EA; --nav-active-fg:#141413;
  --wheel-fill:rgba(242,240,234,.22); --wheel-prev:rgba(242,240,234,.45);
  --shadow-sm:0 2px 10px rgba(0,0,0,.3); --shadow-md:0 12px 32px rgba(0,0,0,.45); --shadow-lg:0 24px 60px rgba(0,0,0,.6);
  color-scheme: dark;
}
* { box-sizing:border-box; margin:0; padding:0; -webkit-tap-highlight-color:transparent; }
html, body, #root { height:100%; background:var(--bg); color:var(--ink); font-family:var(--font-sans); font-size:14px; line-height:1.45; -webkit-font-smoothing:antialiased; transition:background .25s, color .25s; }
button, input, textarea, select { font-family:inherit; color:inherit; }
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-thumb { background:var(--line-strong); border-radius:99px; }

.app-shell { display:flex; height:100vh; width:100%; overflow:hidden; background:var(--bg); }
.sidebar { width:264px; flex-shrink:0; background:var(--surface); border-right:1px solid var(--line); display:flex; flex-direction:column; padding:22px 16px 18px; gap:18px; overflow-y:auto; }
.brand-row { display:flex; align-items:center; gap:10px; padding:0 6px; }
.brand-logo { width:34px; height:34px; border-radius:10px; display:block; }
.brand-name { font-family:var(--font-display); font-weight:600; font-size:17px; letter-spacing:-.02em; }
.side-group-label { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); padding:0 10px; margin-bottom:6px; }
.side-nav { display:flex; flex-direction:column; gap:3px; }
.side-btn { width:100%; border:none; background:transparent; color:var(--ink-soft); border-radius:13px; padding:9px 11px; font-size:13.5px; font-weight:500; display:flex; align-items:center; justify-content:space-between; gap:10px; cursor:pointer; transition:background .16s var(--ease), color .16s var(--ease); }
.side-btn-left { display:flex; align-items:center; gap:10px; min-width:0; }
.side-btn-left span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.side-btn svg { width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.side-btn:hover { background:var(--surface-soft); color:var(--ink); }
.side-btn.active { background:var(--ink); color:var(--on-ink); }
.side-count { font-size:11px; padding:2px 7px; border-radius:var(--radius-pill); background:var(--line); color:var(--ink-soft); }
.side-btn.active .side-count { background:rgba(128,128,128,.28); color:var(--on-ink); }
.sidebar-footer { margin-top:auto; padding-top:12px; border-top:1px solid var(--line); display:flex; flex-direction:column; gap:4px; }

.main-area { flex:1; display:flex; flex-direction:column; min-width:0; height:100%; position:relative; }
.topbar { height:64px; padding:0 28px; display:flex; align-items:center; justify-content:space-between; gap:14px; flex-shrink:0; background:var(--glass); backdrop-filter:blur(12px); border-bottom:1px solid var(--line); z-index:10; }
.topbar-left { display:flex; align-items:center; gap:12px; min-width:0; }
.topbar-right { display:flex; align-items:center; gap:10px; }
.icon-circle-btn { width:36px; height:36px; border-radius:50%; border:1px solid var(--line); background:var(--surface); color:var(--ink); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; transition:all .16s var(--ease); flex-shrink:0; }
.icon-circle-btn:hover { background:var(--surface-soft); border-color:var(--line-strong); }
.icon-circle-btn.dimmed { opacity:.35; pointer-events:none; }
.icon-circle-btn svg { width:17px; height:17px; stroke:currentColor; fill:none; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.search-box { position:relative; width:280px; max-width:100%; }
.search-box input { width:100%; border:1px solid var(--line); background:var(--surface); border-radius:var(--radius-pill); padding:8px 14px 8px 36px; font-size:13px; outline:none; transition:border-color .16s, box-shadow .16s; }
.search-box input:focus { border-color:var(--ink); box-shadow:0 0 0 3px var(--line); }
.search-box svg { position:absolute; left:12px; top:50%; transform:translateY(-50%); width:15px; height:15px; stroke:var(--muted); fill:none; stroke-width:2; }
.primary-pill-btn { border:none; background:var(--ink); color:var(--on-ink); border-radius:var(--radius-pill); padding:9px 16px; font-size:13px; font-weight:500; cursor:pointer; display:inline-flex; align-items:center; gap:6px; transition:transform .14s var(--ease), opacity .15s; }
.primary-pill-btn:hover { opacity:.9; } .primary-pill-btn:active { transform:scale(.97); }

.workspace-scroll { flex:1; overflow-y:auto; padding:26px 32px 110px; }
.content-container { max-width:980px; margin:0 auto; animation:fadeSlideIn .24s var(--ease); }
@keyframes fadeSlideIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
.page-header { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; margin-bottom:22px; flex-wrap:wrap; }
.header-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.eyebrow { font-size:13px; color:var(--muted); margin-bottom:4px; }
h1.page-title { font-family:var(--font-display); font-size:36px; line-height:1.08; font-weight:600; letter-spacing:-.03em; }
.progress-badge { background:var(--sage); padding:6px 14px; border-radius:var(--radius-pill); font-size:12px; font-weight:600; }

.para-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin-bottom:22px; }
.para-card { height:146px; border-radius:var(--radius-lg); padding:15px; display:flex; flex-direction:column; justify-content:space-between; cursor:pointer; transition:transform .18s var(--ease), box-shadow .18s var(--ease); }
.para-card:hover { transform:translateY(-2px); box-shadow:var(--shadow-sm); }
.sand { background:var(--sand); } .mint { background:var(--mint); } .sage { background:var(--sage); } .lilac { background:var(--lilac); } .peach { background:var(--peach); }
.para-card-top { display:flex; justify-content:space-between; align-items:center; }
.badge-dark { width:30px; height:30px; border-radius:50%; background:var(--ink); color:var(--on-ink); font-size:11px; font-weight:600; display:flex; align-items:center; justify-content:center; }
.arrow-circle { width:28px; height:28px; border-radius:50%; border:1px solid var(--line-strong); display:flex; align-items:center; justify-content:center; font-size:12px; flex-shrink:0; }
.para-card-title { font-family:var(--font-display); font-size:17px; font-weight:600; letter-spacing:-.02em; }
.para-card-desc { display:block; font-size:11px; font-weight:400; color:var(--ink-soft); opacity:.7; margin-top:2px; }
.pill-soft { display:inline-block; background:var(--line); padding:4px 10px; border-radius:var(--radius-pill); font-size:11px; font-weight:500; }

.week-strip { display:grid; grid-template-columns:repeat(7,1fr); gap:8px; margin-bottom:16px; }
.day-cell { padding:9px 4px 8px; border-radius:16px; background:var(--surface); border:1px solid var(--line); text-align:center; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:2px; transition:all .16s var(--ease); }
.day-cell .wd { font-size:11px; color:var(--muted); } .day-cell b { font-size:14px; font-weight:600; }
.day-dot { width:4px; height:4px; border-radius:50%; background:transparent; margin-top:2px; } .day-dot.has { background:var(--ink); opacity:.45; }
.day-cell.is-today:not(.selected) { border-color:var(--ink); }
.day-cell.selected { background:var(--ink); border-color:var(--ink); color:var(--on-ink); }
.day-cell.selected .wd { color:var(--on-ink); opacity:.65; }
.day-cell.selected .day-dot.has { background:var(--on-ink); opacity:1; }

.pills-row { display:flex; gap:8px; overflow-x:auto; margin-bottom:16px; padding-bottom:2px; scrollbar-width:none; }
.pills-row::-webkit-scrollbar { display:none; }
.pill-btn { border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:var(--radius-pill); padding:8px 14px; font-size:12.5px; font-weight:500; white-space:nowrap; cursor:pointer; transition:all .16s var(--ease); }
.pill-btn:hover { border-color:var(--line-strong); background:var(--surface-soft); }
.pill-btn.active { background:var(--ink); color:var(--on-ink); border-color:var(--ink); }

.para-tabs { display:grid; grid-template-columns:repeat(5,1fr); gap:5px; background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:5px; margin-bottom:16px; }
.para-tab { border:none; background:transparent; border-radius:15px; padding:10px 6px; font-size:12.5px; font-weight:500; color:var(--muted); cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px; transition:all .16s var(--ease); }
.para-tab:hover { color:var(--ink); }
.para-tab.active { background:var(--ink); color:var(--on-ink); }
.para-tab .cnt { font-size:11px; opacity:.72; }

.cards-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.task-list { display:flex; flex-direction:column; gap:10px; }
.task-card { border-radius:var(--radius-md); padding:14px 16px; display:flex; align-items:flex-start; gap:12px; background:var(--surface); border:1px solid var(--line); cursor:pointer; transition:transform .15s var(--ease), box-shadow .15s var(--ease); }
.task-card:hover { transform:translateY(-1px); box-shadow:var(--shadow-sm); }
.task-card.sand,.task-card.mint,.task-card.sage,.task-card.lilac,.task-card.peach,
.entity-card.sand,.entity-card.mint,.entity-card.sage,.entity-card.lilac,.entity-card.peach { border-color:transparent; }
.check-circle { width:22px; height:22px; margin-top:1px; border-radius:50%; border:1.5px solid var(--ink); background:var(--chip-bg); cursor:pointer; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:12px; color:var(--ink); }
.check-circle.done { background:var(--ink); color:var(--on-ink); }
.task-body { flex:1; min-width:0; }
.task-top-row { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.task-title { font-size:15px; font-weight:500; line-height:1.3; }
.task-title.done { text-decoration:line-through; opacity:.45; }
.task-sub { font-size:12px; color:var(--ink-soft); opacity:.75; margin-top:5px; display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.chip { display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:500; padding:3px 9px; border-radius:var(--radius-pill); background:var(--chip-bg); color:var(--ink); white-space:nowrap; }
.chip.dark { background:var(--ink); color:var(--on-ink); }
.chip.good { background:rgba(42,123,79,.16); color:var(--good); }
.chip.overdue { background:rgba(201,74,56,.16); color:var(--danger); font-weight:600; }
.triage-row { display:flex; gap:6px; margin-top:10px; flex-wrap:wrap; }
.triage-btn { border:1px solid var(--line-strong); background:var(--chip-bg); color:var(--ink); border-radius:var(--radius-pill); padding:4px 10px; font-size:11px; font-weight:500; cursor:pointer; }
.triage-btn:hover { background:var(--ink); color:var(--on-ink); }

.entity-card { border-radius:var(--radius-lg); padding:16px 18px; background:var(--surface); border:1px solid var(--line); cursor:pointer; transition:transform .16s var(--ease), box-shadow .16s var(--ease); display:flex; flex-direction:column; justify-content:space-between; gap:10px; }
.entity-card:hover { transform:translateY(-2px); box-shadow:var(--shadow-sm); }
.entity-head { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.entity-title { font-family:var(--font-display); font-size:17px; font-weight:600; letter-spacing:-.02em; }
.entity-sub { font-size:12.5px; color:var(--ink-soft); opacity:.75; margin-top:3px; line-height:1.4; }
.meta-row { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.card-tools { display:flex; align-items:center; gap:6px; flex-shrink:0; }
.card-edit-btn { width:28px; height:28px; border-radius:50%; border:1px solid var(--line-strong); background:var(--chip-bg); color:var(--ink); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; transition:all .15s; }
.card-edit-btn:hover { background:var(--ink); color:var(--on-ink); }
.card-edit-btn svg { width:13px; height:13px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

.prog-block { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-lg); padding:16px 18px; margin-bottom:18px; display:flex; flex-direction:column; gap:12px; }
.prog-head { display:flex; justify-content:space-between; font-size:12.5px; font-weight:500; margin-bottom:6px; }
.prog-track { height:6px; background:var(--track); border-radius:99px; overflow:hidden; }
.prog-track > span { display:block; height:100%; background:var(--ink); border-radius:99px; transition:width .3s var(--ease); }
.section-bar { display:flex; justify-content:space-between; align-items:center; margin:22px 0 11px; }
.section-bar h2 { font-family:var(--font-display); font-size:17px; font-weight:600; letter-spacing:-.02em; }
.divider-label { display:flex; align-items:center; gap:10px; margin:18px 0 10px; font-size:12px; font-weight:500; color:var(--muted); }
.divider-label::after { content:""; flex:1; height:1px; background:var(--line); }

.habit-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-lg); padding:16px; }
.habit-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; gap:10px; }
.habit-left { display:flex; align-items:center; gap:10px; }
.habit-days { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.habit-day { border:1px solid var(--line); background:var(--bg); border-radius:12px; padding:8px 0; text-align:center; font-size:11px; color:var(--muted); cursor:pointer; }
.habit-day.on { background:var(--ink); color:var(--on-ink); border-color:var(--ink); }
.ghost-x { border:none; background:transparent; color:var(--muted); cursor:pointer; font-size:16px; }
.ghost-x:hover { color:var(--danger); }

.wheel-layout { display:grid; grid-template-columns:1.05fr 1fr; gap:18px; align-items:start; }
.wheel-panel { background:var(--sand); border-radius:var(--radius-xl); padding:20px; text-align:center; }
.wheel-grid { fill:none; stroke:var(--line-strong); stroke-width:1; }
.wheel-axis { stroke:var(--line-strong); stroke-width:1; }
.wheel-prev { fill:none; stroke:var(--wheel-prev); stroke-width:1.5; stroke-dasharray:4 3; }
.wheel-cur { fill:var(--wheel-fill); stroke:var(--ink); stroke-width:2; }
.wheel-label { fill:var(--ink); font-size:10px; }
.stats-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-lg); padding:16px 18px; margin-top:14px; }
.trend-bars { display:flex; align-items:flex-end; gap:10px; height:76px; padding-top:10px; }
.trend-col { flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; height:100%; justify-content:flex-end; cursor:pointer; }
.trend-bar { width:100%; max-width:34px; background:var(--mint); border-radius:8px 8px 4px 4px; transition:height .25s var(--ease); }
.trend-bar.active { background:var(--ink); }
.trend-val { font-size:10.5px; font-weight:600; } .trend-lbl { font-size:10.5px; color:var(--muted); }
.slider-row { background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:12px 15px; margin-bottom:9px; }
.slider-head { display:flex; justify-content:space-between; font-size:13.5px; font-weight:500; margin-bottom:6px; }
input[type="range"] { width:100%; accent-color:var(--ink); cursor:pointer; }

/* Settings */
.settings-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-lg); padding:18px 20px; margin-bottom:14px; display:flex; flex-direction:column; gap:14px; }
.settings-card h3 { font-family:var(--font-display); font-size:16px; font-weight:600; letter-spacing:-.01em; }
.setting-row { display:flex; justify-content:space-between; align-items:center; gap:14px; flex-wrap:wrap; }
.setting-label { font-weight:500; } .setting-hint { font-size:12px; color:var(--muted); margin-top:2px; }
.seg { display:inline-flex; background:var(--bg); border:1px solid var(--line); border-radius:var(--radius-pill); padding:3px; gap:2px; }
.seg button { border:none; background:transparent; color:var(--muted); border-radius:var(--radius-pill); padding:7px 14px; font-size:12.5px; font-weight:500; cursor:pointer; transition:all .16s var(--ease); }
.seg button.active { background:var(--ink); color:var(--on-ink); }

/* Custom select + date picker */
.custom-select { position:relative; width:100%; }
.cs-trigger { width:100%; border:1px solid var(--line-strong); background:var(--field-bg); color:var(--ink); border-radius:14px; padding:9px 12px; font-size:13px; display:flex; justify-content:space-between; align-items:center; gap:8px; cursor:pointer; }
.cs-trigger:hover { border-color:var(--ink); }
.cs-menu { position:absolute; top:calc(100% + 6px); left:0; right:0; background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:5px; box-shadow:var(--shadow-md); z-index:60; max-height:220px; overflow-y:auto; animation:popIn .16s var(--ease); }
@keyframes popIn { from { opacity:0; transform:translateY(-4px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
.cs-opt { width:100%; border:none; background:transparent; color:var(--ink); text-align:left; padding:8px 10px; border-radius:10px; font-size:13px; cursor:pointer; display:flex; justify-content:space-between; align-items:center; }
.cs-opt:hover { background:var(--surface-soft); } .cs-opt.active { background:var(--sand); font-weight:500; }
.cdp-wrap { position:relative; width:100%; }
.cdp-trigger { width:100%; border-radius:20px; padding:13px 14px; min-height:88px; text-align:left; cursor:pointer; display:flex; flex-direction:column; justify-content:space-between; }
.cdp-trigger.dark { background:var(--ink); color:var(--on-ink); border:none; }
.cdp-trigger.light { background:var(--field-bg); color:var(--ink); border:1px solid var(--line-strong); }
.cdp-label { font-size:11px; opacity:.65; }
.cdp-value { font-family:var(--font-display); font-size:20px; font-weight:600; letter-spacing:-.02em; margin-top:4px; }
.cdp-sub { font-size:11px; opacity:.72; }
.cdp-popover { position:absolute; top:calc(100% + 8px); left:0; width:280px; background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:22px; padding:14px; box-shadow:var(--shadow-lg); z-index:70; animation:popIn .16s var(--ease); }
.cdp-popover.align-right { left:auto; right:0; }
.cdp-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.cdp-nav-btn { width:28px; height:28px; border-radius:50%; border:1px solid var(--line); background:var(--bg); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.cdp-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; text-align:center; }
.cdp-wd { font-size:10px; color:var(--muted); padding-bottom:4px; }
.cdp-day { border:none; background:transparent; border-radius:10px; padding:7px 0; font-size:12px; cursor:pointer; color:var(--ink); }
.cdp-day:hover { background:var(--sand); }
.cdp-day.today { border:1px solid var(--ink); font-weight:600; }
.cdp-day.selected { background:var(--ink); color:var(--on-ink); font-weight:600; }
.cdp-presets { display:flex; gap:5px; flex-wrap:wrap; margin-top:10px; padding-top:10px; border-top:1px solid var(--line); }
.cdp-presets button { border:1px solid var(--line); background:var(--bg); border-radius:var(--radius-pill); padding:4px 9px; font-size:11px; cursor:pointer; }
.cdp-presets button:hover { background:var(--ink); color:var(--on-ink); }
.cdp-time-row { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:10px; padding-top:10px; border-top:1px solid var(--line); font-size:12px; }
.cdp-time-row input { border:1px solid var(--line-strong); background:var(--bg); border-radius:10px; padding:5px 8px; font-size:12px; }

/* Drawers + modals */
.drawer-backdrop { position:fixed; inset:0; background:var(--overlay); backdrop-filter:blur(3px); z-index:45; display:flex; justify-content:flex-end; animation:fadeIn .18s ease; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.planning-drawer { width:440px; max-width:100vw; height:100%; background:var(--sand); display:flex; flex-direction:column; overflow-y:auto; box-shadow:-16px 0 50px rgba(0,0,0,.2); animation:slideInRight .24s var(--ease); }
.planning-drawer.sage { background:var(--sage); }
@keyframes slideInRight { from { transform:translateX(40px); opacity:.6; } to { transform:translateX(0); opacity:1; } }
.drawer-top { padding:20px 24px 18px; }
.drawer-nav { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.drawer-title-input { width:100%; border:none; background:transparent; font-family:var(--font-display); font-size:26px; font-weight:600; letter-spacing:-.03em; color:var(--ink); outline:none; margin-bottom:12px; }
.bento-2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:12px; }
.drawer-white { flex:1; background:var(--surface); border-radius:30px 30px 0 0; padding:22px 24px 36px; display:flex; flex-direction:column; gap:15px; }
.clean-input, .clean-textarea { width:100%; border:1px solid var(--line-strong); background:var(--bg); border-radius:14px; padding:10px 13px; font-size:13.5px; outline:none; }
.clean-input:focus, .clean-textarea:focus { border-color:var(--ink); }
.field-label { font-size:12px; color:var(--muted); margin-bottom:6px; }
.checklist-item { display:flex; align-items:center; gap:11px; padding:8px 0; border-bottom:1px solid var(--line); }
.step-num { width:26px; height:26px; border-radius:50%; background:var(--sand); color:var(--ink); font-size:12px; font-weight:600; border:none; cursor:pointer; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.step-num.alt { background:var(--mint); } .step-num.done { background:var(--ink); color:var(--on-ink); }
.modal-center { position:fixed; inset:0; background:var(--overlay); backdrop-filter:blur(3px); z-index:50; display:flex; align-items:center; justify-content:center; padding:16px; }
.modal-card { width:100%; max-width:460px; max-height:92vh; overflow-y:auto; background:var(--surface); border-radius:28px; padding:22px 24px 24px; box-shadow:var(--shadow-lg); animation:popIn .2s var(--ease); display:flex; flex-direction:column; gap:11px; }
.modal-card h3 { font-family:var(--font-display); font-size:18px; font-weight:600; }
.modal-actions { display:flex; justify-content:space-between; align-items:center; margin-top:6px; gap:10px; }
.text-btn { border:none; background:transparent; color:var(--muted); cursor:pointer; font-size:14px; }
.swatches { display:flex; gap:10px; }
.swatch { width:34px; height:34px; border-radius:50%; border:2px solid transparent; cursor:pointer; outline:1px solid var(--line-strong); }
.swatch.active { border-color:var(--ink); }

.fab-wrap { position:fixed; right:26px; bottom:26px; z-index:30; display:flex; flex-direction:column; align-items:flex-end; gap:8px; }
.fab-menu { display:flex; flex-direction:column; gap:6px; align-items:flex-end; animation:popIn .16s var(--ease); }
.fab-option { border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:var(--radius-pill); padding:10px 16px; font-size:13px; font-weight:500; cursor:pointer; box-shadow:var(--shadow-md); }
.fab-option:hover { background:var(--sand); }
.fab { width:54px; height:54px; border-radius:50%; border:none; background:var(--ink); color:var(--on-ink); font-size:26px; cursor:pointer; box-shadow:var(--shadow-md); display:flex; align-items:center; justify-content:center; user-select:none; transition:transform .16s var(--ease); }
.fab:hover { transform:scale(1.04); } .fab.holding { transform:scale(.9); }

.mobile-nav { display:none; }
.toast { position:fixed; left:50%; transform:translateX(-50%); bottom:24px; background:var(--ink); color:var(--on-ink); border-radius:var(--radius-pill); padding:11px 18px; display:flex; align-items:center; gap:14px; font-size:13px; box-shadow:var(--shadow-lg); z-index:90; animation:fadeSlideIn .2s var(--ease); }
.toast button { border:none; background:var(--on-ink); color:var(--ink); border-radius:var(--radius-pill); padding:5px 12px; font-size:12px; font-weight:600; cursor:pointer; }
.empty-box { text-align:center; color:var(--muted); font-size:13px; padding:28px 16px; border:1px dashed var(--line-strong); border-radius:var(--radius-lg); }
.danger-btn { border:1px solid var(--danger); background:transparent; color:var(--danger); border-radius:var(--radius-pill); padding:10px 16px; font-size:13px; font-weight:500; cursor:pointer; }
.danger-btn:hover { background:rgba(201,74,56,.1); }
.danger-solid { border:none; background:var(--danger); color:#fff; border-radius:var(--radius-pill); padding:9px 18px; font-size:13px; font-weight:600; cursor:pointer; }

@media (max-width:900px) {
  .sidebar, .desktop-only { display:none !important; }
  .topbar { height:58px; padding:0 18px; } .search-box { width:150px; }
  .workspace-scroll { padding:16px 18px 124px; } h1.page-title { font-size:30px; }
  .para-grid { display:flex; overflow-x:auto; gap:10px; padding-bottom:4px; scrollbar-width:none; }
  .para-grid::-webkit-scrollbar { display:none; }
  .para-card { min-width:154px; height:144px; flex-shrink:0; }
  .cards-grid, .wheel-layout { grid-template-columns:1fr; }
  .para-tab { flex-direction:column; gap:2px; font-size:11px; padding:8px 2px; }
  .fab-wrap { right:18px; bottom:84px; }
  .mobile-nav { position:fixed; left:14px; right:14px; bottom:14px; background:var(--nav-bg); border-radius:var(--radius-pill); padding:6px; display:grid; grid-template-columns:repeat(5,1fr); gap:4px; box-shadow:0 12px 30px rgba(0,0,0,.28); z-index:25; }
  .mobile-nav button { border:none; background:transparent; color:var(--nav-fg); border-radius:var(--radius-pill); padding:11px 0; cursor:pointer; display:flex; align-items:center; justify-content:center; }
  .mobile-nav button svg { width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
  .mobile-nav button.active { background:var(--nav-active-bg); color:var(--nav-active-fg); }
  .toast { bottom:84px; width:calc(100% - 36px); justify-content:space-between; }
  .modal-center { align-items:flex-end; padding:0; } .modal-card { max-width:100%; border-radius:28px 28px 0 0; }
  .cdp-popover { width:260px; }
}
