/* ============================================================
   Trellis — design system
   Calm, Notion-adjacent: system fonts, quiet borders, hover-revealed
   controls, generous whitespace.
   ============================================================ */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
    system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #ffffff;
  --bg-side: #f7f7f5;
  --bg-hover: rgba(55, 53, 47, 0.06);
  --bg-active: rgba(55, 53, 47, 0.1);
  --bg-input: rgba(55, 53, 47, 0.04);
  --text: #37352f;
  --text-2: rgba(55, 53, 47, 0.65);
  --text-3: rgba(55, 53, 47, 0.44);
  --line: rgba(55, 53, 47, 0.09);
  --line-2: rgba(55, 53, 47, 0.16);
  --line-3: rgba(55, 53, 47, 0.28);
  --accent: #2383e2;
  --accent-soft: rgba(35, 131, 226, 0.09);
  --accent-text: #ffffff;
  --danger: #eb5757;
  --danger-soft: rgba(235, 87, 87, 0.1);
  --ok: #448361;
  --ok-soft: rgba(68, 131, 97, 0.13);
  --warn: #d9730d;
  --warn-soft: rgba(217, 115, 13, 0.12);
  --doing: #337ea9;
  --doing-soft: rgba(51, 126, 169, 0.13);
  --shadow: 0 12px 32px rgba(15, 15, 15, 0.14), 0 0 0 1px rgba(15, 15, 15, 0.04);
  --shadow-sm: 0 4px 12px rgba(15, 15, 15, 0.1), 0 0 0 1px rgba(15, 15, 15, 0.04);
  --r: 10px;
  --r-s: 6px;
  --sidebar-w: 264px;
  --peek-w: min(760px, 92vw);
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #191919;
  --bg-side: #202020;
  --bg-hover: rgba(255, 255, 255, 0.055);
  --bg-active: rgba(255, 255, 255, 0.1);
  --bg-input: rgba(255, 255, 255, 0.05);
  --text: rgba(255, 255, 255, 0.87);
  --text-2: rgba(255, 255, 255, 0.55);
  --text-3: rgba(255, 255, 255, 0.36);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --line-3: rgba(255, 255, 255, 0.3);
  --accent: #529cca;
  --accent-soft: rgba(82, 156, 202, 0.15);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}

/* ---------- accent themes ----------
   Each accent re-tints the whole surface family (paper, sidebar, lines,
   text), not just the controls. Gold is the flagship: warm cream paper with
   antique gold in light, warm charcoal with soft amber in dark. */

/* gold — light: warm paper */
html[data-theme="light"][data-accent="gold"] {
  --bg: #faf8f1; --bg-side: #f2eee1;
  --bg-hover: rgba(72, 62, 32, 0.06); --bg-active: rgba(72, 62, 32, 0.11); --bg-input: rgba(72, 62, 32, 0.045);
  --text: #3b3320; --text-2: rgba(59, 51, 32, 0.66); --text-3: rgba(59, 51, 32, 0.45);
  --line: rgba(59, 51, 32, 0.11); --line-2: rgba(59, 51, 32, 0.18); --line-3: rgba(59, 51, 32, 0.31);
  --accent: #8f7233; --accent-soft: rgba(143, 114, 51, 0.13); --accent-text: #fdf6e3;
}
/* gold — dark: warm charcoal + soft amber */
html[data-theme="dark"][data-accent="gold"] {
  --bg: #1b1812; --bg-side: #211e17;
  --bg-hover: rgba(232, 214, 166, 0.06); --bg-active: rgba(232, 214, 166, 0.11); --bg-input: rgba(232, 214, 166, 0.05);
  --text: #ede4ce; --text-2: rgba(237, 228, 206, 0.6); --text-3: rgba(237, 228, 206, 0.4);
  --line: rgba(237, 228, 206, 0.1); --line-2: rgba(237, 228, 206, 0.17); --line-3: rgba(237, 228, 206, 0.3);
  --accent: #d9ae5f; --accent-soft: rgba(217, 174, 95, 0.14); --accent-text: #251b06;
}

/* blue — cool tints */
html[data-theme="light"][data-accent="blue"] { --bg: #fbfcfd; --bg-side: #f2f5f7; }
html[data-theme="dark"][data-accent="blue"] { --bg: #17191c; --bg-side: #1c1f23; }

/* green — sage */
html[data-theme="light"][data-accent="green"] {
  --bg: #f8faf6; --bg-side: #eef2ea;
  --text: #2e352c; --text-2: rgba(46, 53, 44, 0.65); --text-3: rgba(46, 53, 44, 0.44);
  --line: rgba(46, 53, 44, 0.1); --line-2: rgba(46, 53, 44, 0.17); --line-3: rgba(46, 53, 44, 0.3);
  --accent: #3d8a5f; --accent-soft: rgba(61, 138, 95, 0.12); --accent-text: #f2faf3;
}
html[data-theme="dark"][data-accent="green"] {
  --bg: #121512; --bg-side: #181c18;
  --text: #e9ece7; --text-2: rgba(233, 236, 231, 0.58); --text-3: rgba(233, 236, 231, 0.38);
  --line: rgba(233, 236, 231, 0.1); --line-2: rgba(233, 236, 231, 0.17); --line-3: rgba(233, 236, 231, 0.3);
  --accent: #6fbf95; --accent-soft: rgba(111, 191, 149, 0.14); --accent-text: #0c231a;
}

/* purple — lavender tints */
html[data-theme="light"][data-accent="purple"] {
  --bg: #fbfafd; --bg-side: #f2f0f7;
  --accent: #7a5ac8; --accent-soft: rgba(122, 90, 200, 0.12);
}
html[data-theme="dark"][data-accent="purple"] {
  --bg: #171519; --bg-side: #1d1a20;
  --text: #e9e5f0; --text-2: rgba(233, 229, 240, 0.58); --text-3: rgba(233, 229, 240, 0.38);
  --line: rgba(233, 229, 240, 0.1); --line-2: rgba(233, 229, 240, 0.17); --line-3: rgba(233, 229, 240, 0.3);
  --accent: #a78bfa; --accent-soft: rgba(167, 139, 250, 0.16); --accent-text: #1d1439;
}

/* rose — blush tints */
html[data-theme="light"][data-accent="rose"] {
  --bg: #fcf9fa; --bg-side: #f6eef1;
  --accent: #c34b7b; --accent-soft: rgba(195, 75, 123, 0.12);
}
html[data-theme="dark"][data-accent="rose"] {
  --bg: #1a1517; --bg-side: #201a1d;
  --text: #efe6ea; --text-2: rgba(239, 230, 234, 0.58); --text-3: rgba(239, 230, 234, 0.38);
  --line: rgba(239, 230, 234, 0.1); --line-2: rgba(239, 230, 234, 0.17); --line-3: rgba(239, 230, 234, 0.3);
  --accent: #e389ae; --accent-soft: rgba(227, 137, 174, 0.16); --accent-text: #33101f;
}

/* graphite — strict neutral */
html[data-theme="light"][data-accent="graphite"] {
  --bg: #fafaf9; --bg-side: #f1f1ef;
  --accent: #55554f; --accent-soft: rgba(85, 85, 79, 0.12);
}
html[data-theme="dark"][data-accent="graphite"] {
  --bg: #1a1a1a; --bg-side: #212121;
  --accent: #c9c9c3; --accent-soft: rgba(201, 201, 195, 0.14); --accent-text: #1c1c1a;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}
#app { height: 100%; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
::placeholder { color: var(--text-3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
::selection { background: rgba(35, 131, 226, 0.25); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }
[contenteditable]:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- boot splash ---------- */
.boot { height: 100vh; display: grid; place-items: center; }
.boot svg { animation: bootpulse 1.4s ease-in-out infinite; border-radius: 14px; }
@keyframes bootpulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(0.94); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-s);
  font-size: 14px; font-weight: 500; color: var(--text);
  border: 1px solid var(--line-2);
  background: var(--bg);
  transition: background 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.big { padding: 9px 18px; font-size: 15px; border-radius: 8px; }
.btn:disabled { opacity: 0.45; cursor: default; }
.ghost-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: var(--r-s);
  font-size: 14px; color: var(--text-3); transition: background 0.12s, color 0.12s;
}
.ghost-btn:hover { background: var(--bg-hover); color: var(--text-2); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--r-s);
  color: var(--text-3); transition: background 0.12s, color 0.12s;
  flex: none;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }

/* ---------- inputs ---------- */
.inp {
  width: 100%; padding: 7px 10px;
  border: 1px solid var(--line-2); border-radius: var(--r-s);
  background: var(--bg-input); color: var(--text);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); background: var(--bg); }
.inp.ghost { border-color: transparent; background: transparent; padding: 4px 6px; }
.inp.ghost:hover { background: var(--bg-hover); }
.inp.ghost:focus { background: var(--bg); border-color: var(--accent); }
label.fld { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin: 14px 0 4px; }
select.inp { appearance: auto; background: var(--bg); }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg-side); }
.auth-card {
  width: 100%; max-width: 380px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm);
  padding: 36px 32px;
}
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.auth-logo svg { border-radius: 10px; }
.auth-logo h1 { font-size: 24px; margin: 0; letter-spacing: -0.02em; }
.auth-sub { color: var(--text-2); font-size: 14px; margin: 0 0 22px; }
.auth-tabs { display: flex; gap: 4px; background: var(--bg-input); border-radius: 8px; padding: 3px; margin-bottom: 18px; }
.auth-tabs button { flex: 1; padding: 6px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.auth-tabs button.on { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.auth-err { color: var(--danger); font-size: 13.5px; min-height: 20px; margin: 10px 0 2px; }
.auth-card .btn.primary { width: 100%; justify-content: center; margin-top: 10px; }

/* ---------- shell ---------- */
.shell { display: flex; height: 100vh; height: 100dvh; }
.main {
  flex: 1; min-width: 0; overflow-y: auto;
  padding: 0 28px;
}
.view { max-width: 920px; margin: 0 auto; padding-bottom: 120px; }
@media (min-width: 1600px) { .view { max-width: 1020px; } }

/* two-column sections on wide screens (tracker charts, etc.) */
.grid2 { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: start; }
@media (min-width: 1200px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.grid2 .chart-card { margin-top: 10px; }

/* home: content + summary rail on wide screens */
.home-cols { display: block; }
.home-rail { display: none; }
@media (min-width: 1360px) {
  .home-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
  .home-rail { display: block; position: sticky; top: 28px; }
}
.rail-card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 12px; }
.rail-title {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.04em;
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.rail-row { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 13.5px; color: var(--text-2); }
.rail-row b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.rail-row .ico { display: flex; color: var(--text-3); width: 18px; justify-content: center; flex: none; }
.rail-act { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 6px; border-radius: var(--r-s); font-size: 13.5px; text-align: left; color: var(--text); }
.rail-act:hover { background: var(--bg-hover); }
.rail-act .ra-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-act .ra-min { color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* ---------- sidebar ---------- */
.sidebar {
  width: var(--sidebar-w); flex: none;
  background: var(--bg-side);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
  user-select: none;
}
.side-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 12px; }
.side-head svg { border-radius: 7px; flex: none; }
.side-head .name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.side-head .spacer { flex: 1; }
.side-scroll { flex: 1; overflow-y: auto; padding-bottom: 12px; }
.side-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 5px 8px; border-radius: var(--r-s);
  font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: background 0.1s; text-align: left; min-height: 30px;
}
.side-item:hover { background: var(--bg-hover); }
.side-item.on { background: var(--bg-active); color: var(--text); }
.side-item .ico { display: flex; width: 20px; justify-content: center; flex: none; color: var(--text-3); }
.side-item.on .ico { color: var(--text); }
.side-label {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  padding: 14px 8px 4px; display: flex; align-items: center;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.side-label .icon-btn { width: 22px; height: 22px; margin-left: auto; opacity: 0; }
.side-label:hover .icon-btn { opacity: 1; }
.tree-row {
  display: flex; align-items: center; width: 100%;
  padding: 3px 4px 3px 0; border-radius: var(--r-s);
  font-size: 14px; color: var(--text-2); cursor: pointer;
  transition: background 0.1s; min-height: 28px;
}
.tree-row:hover { background: var(--bg-hover); }
.tree-row.on { background: var(--bg-active); color: var(--text); font-weight: 500; }
.tree-row .twirl {
  width: 22px; height: 22px; flex: none; display: flex; align-items: center; justify-content: center;
  border-radius: 4px; color: var(--text-3);
}
.tree-row .twirl:hover { background: var(--bg-active); }
.tree-row .twirl svg { transition: transform 0.15s; }
.tree-row .twirl.open svg { transform: rotate(90deg); }
.tree-row .emoji { width: 22px; text-align: center; flex: none; font-size: 14px; }
.tree-row .t-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-row .icon-btn { width: 22px; height: 22px; opacity: 0; }
.tree-row:hover .icon-btn { opacity: 1; }
.tree-kids { position: relative; }
.side-user {
  display: flex; align-items: center; gap: 8px;
  padding: 8px; border-top: 1px solid var(--line); margin-top: 4px;
}
.side-user .avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--accent); color: var(--accent-text); font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; text-transform: uppercase;
}
.side-user .u-name { flex: 1; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }

/* ---------- mobile chrome ---------- */
.topbar { display: none; }
.bottomnav { display: none; }
.backdrop {
  position: fixed; inset: 0; z-index: 40; background: rgba(15, 15, 15, 0.4);
  animation: fade 0.15s;
}
@keyframes fade { from { opacity: 0; } }
@media (max-width: 880px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 50;
    transform: translateX(-100%); transition: transform 0.2s ease;
    box-shadow: none; width: min(300px, 84vw);
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow); }
  .topbar {
    display: flex; align-items: center; gap: 4px;
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    padding: calc(6px + env(safe-area-inset-top)) 10px 6px;
    border-bottom: 1px solid var(--line);
  }
  .topbar .tb-title { font-weight: 600; font-size: 15px; flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main { padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
  .bottomnav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .bottomnav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 4px 0; font-size: 10.5px; font-weight: 500; color: var(--text-3); border-radius: 8px;
  }
  .bottomnav button.on { color: var(--accent); }
}

/* ---------- view headers ---------- */
.crumbs { display: flex; align-items: center; gap: 2px; padding: 20px 0 0; font-size: 13.5px; color: var(--text-3); flex-wrap: wrap; }
.crumbs button { padding: 2px 6px; border-radius: 4px; color: var(--text-3); }
.crumbs button:hover { background: var(--bg-hover); color: var(--text-2); }
.crumbs .sep { color: var(--text-3); }
.view-head { padding: 26px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.view-head .vh-row { display: flex; align-items: center; gap: 10px; }
.view-head .vh-emoji { font-size: 34px; line-height: 1; cursor: pointer; border-radius: 8px; padding: 2px; }
.view-head .vh-emoji:hover { background: var(--bg-hover); }
.view-head h1 {
  font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin: 0;
  flex: 1; min-width: 0; border: none; background: none; padding: 0; color: var(--text);
}
input.vh-title { width: 100%; border: none; background: none; padding: 0; color: var(--text); }
input.vh-title:focus { outline: none; }
.view-head .vh-sub { color: var(--text-2); font-size: 14px; margin-top: 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.view-head .vh-actions { display: flex; gap: 6px; align-items: center; }
.greet { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; padding: 34px 0 2px; }
.greet-sub { color: var(--text-2); font-size: 14.5px; margin-bottom: 12px; }
.sec-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin: 26px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.sec-title .cnt { font-weight: 500; }
.sec-title .right { margin-left: auto; display: flex; gap: 4px; }

/* ---------- cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.cat-card {
  display: flex; flex-direction: column; gap: 8px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 14px 12px; background: var(--bg);
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
  cursor: pointer; position: relative;
}
.cat-card:hover { background: var(--bg-hover); border-color: var(--line-2); transform: translateY(-1px); }
.cat-card .cc-emoji { font-size: 22px; line-height: 1; }
.cat-card .cc-name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-card .cc-meta { font-size: 12.5px; color: var(--text-3); display: flex; justify-content: space-between; }
.cat-card.new {
  border-style: dashed; border-color: var(--line-2); align-items: center; justify-content: center;
  color: var(--text-3); min-height: 106px; gap: 4px; font-size: 13.5px;
}
.cat-card.new:hover { color: var(--text-2); background: var(--bg-hover); }

.bar { height: 4px; border-radius: 99px; background: var(--bg-active); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width 0.3s ease; }

/* ---------- task rows ---------- */
.task-list { margin-top: 2px; }
.task-row {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 5px 6px; border-radius: var(--r-s);
  transition: background 0.1s; position: relative;
}
.task-row:hover { background: var(--bg-hover); }
.task-row.dragging { opacity: 0.4; }
.task-row.drop-above::before, .task-row.drop-below::after {
  content: ""; position: absolute; left: 4px; right: 4px; height: 2.5px;
  background: var(--accent); border-radius: 2px; z-index: 1;
}
.task-row.drop-above::before { top: -1.5px; }
.task-row.drop-below::after { bottom: -1.5px; }
.task-row .drag {
  width: 18px; height: 24px; display: flex; align-items: center; justify-content: center;
  color: var(--text-3); opacity: 0; cursor: grab; flex: none; margin-left: -24px;
}
.task-row:hover .drag { opacity: 0.7; }
.task-row .t-main { flex: 1; min-width: 0; }
.task-row .t-title-line { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.task-row input.t-title {
  flex: 1; min-width: 0; border: none; background: none; padding: 1px 2px;
  font-size: 15px; color: var(--text); border-radius: 4px;
}
.task-row input.t-title:focus { outline: none; background: var(--bg); box-shadow: 0 0 0 2px var(--accent-soft); }
.task-row.done input.t-title { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-3); }
.task-row .t-meta { display: flex; align-items: center; gap: 6px; flex: none; }
.task-row .t-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.1s; }
.task-row:hover .t-actions, .task-row:focus-within .t-actions { opacity: 1; }
.task-row .t-progress { margin: 3px 2px 2px; width: 130px; }
@media (max-width: 880px) {
  .task-row .t-actions { opacity: 1; }
  .task-row .drag { display: none; }
}

.check {
  width: 18px; height: 18px; margin-top: 3.5px; flex: none;
  border: 1.5px solid var(--line-3); border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-text); background: transparent;
  transition: background 0.15s, border-color 0.15s;
}
.check:hover { border-color: var(--accent); background: var(--accent-soft); }
.check svg { opacity: 0; transform: scale(0.4); transition: opacity 0.15s, transform 0.18s cubic-bezier(0.2, 1.6, 0.4, 1); }
.check.on { background: var(--accent); border-color: var(--accent); }
.check.on svg { opacity: 1; transform: scale(1); }
.check.big { width: 22px; height: 22px; border-radius: 7px; margin: 0; }

.pill {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
  padding: 2px 8px; border-radius: 99px; white-space: nowrap;
  color: var(--text-2); background: var(--bg-active);
}
.pill.todo { color: var(--text-2); background: var(--bg-active); }
.pill.doing { color: var(--doing); background: var(--doing-soft); }
.pill.done { color: var(--ok); background: var(--ok-soft); }
button.pill { cursor: pointer; border: none; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-2); padding: 1px 7px;
  border-radius: 99px; background: var(--bg-active); white-space: nowrap;
}
.chip.overdue { color: var(--danger); background: var(--danger-soft); font-weight: 500; }
.chip.today { color: var(--warn); background: var(--warn-soft); font-weight: 500; }
.chip.crumb { cursor: pointer; }
.chip.crumb:hover { background: var(--bg-hover); }

.quick-add {
  display: flex; align-items: center; gap: 8px;
  padding: 6px; border-radius: var(--r-s); color: var(--text-3);
  transition: background 0.1s;
}
.quick-add:focus-within, .quick-add:hover { background: var(--bg-hover); }
.quick-add .qa-plus { width: 18px; display: flex; justify-content: center; flex: none; }
.quick-add input { flex: 1; border: none; background: none; font-size: 15px; padding: 1px 2px; color: var(--text); }
.quick-add input:focus { outline: none; }

.done-toggle { margin-top: 10px; }

/* ---------- empty states ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty .e-ico { font-size: 34px; margin-bottom: 10px; opacity: 0.8; }
.empty .e-title { font-weight: 600; font-size: 15px; color: var(--text-2); margin-bottom: 4px; }
.empty .e-body { font-size: 13.5px; max-width: 340px; margin: 0 auto 14px; }

/* ---------- peek panel ---------- */
.peek-wrap { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; }
.peek-wrap .peek-backdrop { position: absolute; inset: 0; background: rgba(15, 15, 15, 0.25); animation: fade 0.18s; }
.peek {
  position: relative; width: var(--peek-w); height: 100%;
  background: var(--bg); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  animation: peekin 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes peekin { from { transform: translateX(40px); opacity: 0.4; } }
.peek-top {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 14px; border-bottom: 1px solid var(--line); flex: none;
}
.peek-top .save-state { font-size: 12px; color: var(--text-3); margin-left: 6px; }
.peek-top .spacer { flex: 1; }
.peek-scroll { flex: 1; overflow-y: auto; padding: 30px 56px 100px; }
.peek-scroll .p-emoji { font-size: 46px; line-height: 1; cursor: pointer; border-radius: 10px; display: inline-block; padding: 2px; }
.peek-scroll .p-emoji:hover { background: var(--bg-hover); }
.p-title {
  width: 100%; border: none; background: none; padding: 6px 0 2px;
  font-size: 32px; font-weight: 700; letter-spacing: -0.02em; color: var(--text);
  font-family: var(--font);
}
.p-title:focus { outline: none; }
.meta-grid { display: grid; grid-template-columns: 120px 1fr; gap: 4px 12px; margin: 14px 0 6px; font-size: 14px; }
.meta-grid .m-label { display: flex; align-items: center; gap: 7px; color: var(--text-3); min-height: 32px; font-size: 13.5px; }
.meta-grid .m-val { display: flex; align-items: center; gap: 8px; min-height: 32px; flex-wrap: wrap; }
.meta-grid input[type="date"] {
  border: none; background: none; color: var(--text); padding: 3px 6px; border-radius: 4px; font-size: 14px;
}
.meta-grid input[type="date"]:hover { background: var(--bg-hover); }
.slider { -webkit-appearance: none; appearance: none; width: 150px; height: 4px; border-radius: 99px; background: var(--bg-active); cursor: pointer; }
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: none; margin-top: 0;
}
.slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: none; }
.peek-divider { border: none; border-top: 1px solid var(--line); margin: 18px 0 10px; }
@media (max-width: 880px) {
  .peek { width: 100%; animation: sheetin 0.22s cubic-bezier(0.2, 0.9, 0.3, 1); }
  @keyframes sheetin { from { transform: translateY(6%); opacity: 0.5; } }
  .peek-scroll { padding: 20px 20px 100px; }
  .p-title { font-size: 26px; }
  .meta-grid { grid-template-columns: 104px 1fr; }
}

/* docked mode: the page lives beside the content instead of over it */
.peek.docked {
  position: static; flex: none; height: auto;
  width: clamp(400px, 42%, 640px);
  border-left: 1px solid var(--line);
  box-shadow: none; animation: none;
}
.peek.docked .peek-scroll { padding: 26px 36px 100px; }
.peek.docked .p-title { font-size: 27px; }

/* ---------- editor ---------- */
.ed { margin-top: 6px; }
.ed-block { display: flex; gap: 6px; position: relative; border-radius: 4px; }
.ed-block .eb-handle {
  width: 22px; height: 26px; flex: none; display: flex; align-items: center; justify-content: center;
  color: var(--text-3); opacity: 0; cursor: pointer; border-radius: 4px; margin-top: 2px;
  margin-left: -28px;
}
.ed-block:hover .eb-handle { opacity: 0.7; }
.ed-block .eb-handle:hover { background: var(--bg-hover); opacity: 1; }
.ed-text { flex: 1; min-width: 0; padding: 3px 2px; white-space: pre-wrap; word-break: break-word; }
.ed-text:empty::before { content: attr(data-ph); color: var(--text-3); pointer-events: none; }
.ed-block.h1 .ed-text { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; padding-top: 16px; }
.ed-block.h2 .ed-text { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; padding-top: 12px; }
.ed-block.h3 .ed-text { font-size: 17px; font-weight: 600; padding-top: 8px; }
.ed-block.bullet::before {
  content: "•"; flex: none; width: 18px; text-align: center; padding-top: 3px; color: var(--text);
}
.ed-block.todo .check { margin-top: 6px; }
.ed-block.todo.checked .ed-text { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-3); }
.ed-hr { flex: 1; display: flex; align-items: center; padding: 10px 0; cursor: default; }
.ed-hr i { display: block; width: 100%; border-top: 1px solid var(--line-2); }
.ed-tasks {
  flex: 1; border: 1px solid var(--line); border-radius: var(--r);
  padding: 10px 12px 8px; margin: 6px 0; background: var(--bg-side);
}
.ed-tasks .et-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.slash-menu, .menu-pop {
  position: fixed; z-index: 90; min-width: 220px; max-height: 320px; overflow-y: auto;
  background: var(--bg); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 6px; animation: popin 0.12s ease;
}
@keyframes popin { from { opacity: 0; transform: translateY(4px); } }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 10px; border-radius: var(--r-s); font-size: 14px; text-align: left;
  color: var(--text);
}
.menu-item:hover, .menu-item.hot { background: var(--bg-hover); }
.menu-item .mi-ico { color: var(--text-2); display: flex; width: 20px; justify-content: center; flex: none; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger .mi-ico { color: var(--danger); }
.menu-item .mi-sub { font-size: 12px; color: var(--text-3); margin-left: auto; }
.menu-sep { border-top: 1px solid var(--line); margin: 5px 8px; }

/* ---------- modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.modal-wrap .peek-backdrop { position: absolute; inset: 0; background: rgba(15, 15, 15, 0.35); animation: fade 0.15s; }
.modal {
  position: relative; width: 100%; max-width: 440px; max-height: min(640px, 90vh);
  background: var(--bg); border-radius: 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; animation: modalin 0.18s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes modalin { from { transform: scale(0.96) translateY(8px); opacity: 0; } }
.modal .m-head { display: flex; align-items: center; padding: 16px 20px 0; }
.modal .m-head h2 { font-size: 17px; font-weight: 600; margin: 0; flex: 1; }
.modal .m-body { padding: 6px 20px 8px; overflow-y: auto; }
.modal .m-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; }
.modal .hint { font-size: 13px; color: var(--text-3); margin-top: 8px; }

/* ---------- pickers ---------- */
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 4px; }
.emoji-grid button { font-size: 19px; padding: 5px; border-radius: 6px; line-height: 1.2; }
.emoji-grid button:hover { background: var(--bg-hover); }
.color-row { display: flex; gap: 7px; flex-wrap: wrap; padding: 4px 0; }
.color-row button {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent;
  transition: transform 0.1s;
}
.color-row button:hover { transform: scale(1.15); }
.color-row button.on { border-color: var(--text); }
.dur-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.dur-chips button {
  padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line-2);
  font-size: 14px; font-weight: 500; transition: all 0.12s;
}
.dur-chips button:hover { background: var(--bg-hover); }
.dur-chips button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ---------- ongoing ---------- */
.act-card {
  display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; background: var(--bg); cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.act-card:hover { background: var(--bg-hover); border-color: var(--line-2); }
.act-card .ac-top { display: flex; align-items: center; gap: 10px; }
.act-card .ac-emoji {
  width: 38px; height: 38px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.act-card .ac-name { font-weight: 600; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-card .ac-week { font-size: 13px; color: var(--text-2); display: flex; justify-content: space-between; gap: 8px; }
.act-card .ac-week b { color: var(--text); font-weight: 600; }
.act-card .ac-btns { display: flex; gap: 6px; }
.act-card .ac-btns .btn { flex: 1; justify-content: center; padding: 5px 8px; font-size: 13.5px; }
.entry-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px;
  border-radius: var(--r-s); font-size: 14px;
}
.entry-row:hover { background: var(--bg-hover); }
.entry-row .e-min { font-weight: 600; min-width: 56px; }
.entry-row .e-note { color: var(--text-2); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-row .e-date { color: var(--text-3); font-size: 12.5px; }
.entry-row .icon-btn { opacity: 0; }
.entry-row:hover .icon-btn { opacity: 1; }

/* ---------- focus ---------- */
.focus-stage { display: flex; flex-direction: column; align-items: center; padding: 30px 0 20px; }
.focus-setup { width: 100%; max-width: 560px; margin: 0 auto; }
.focus-ring-wrap { position: relative; margin: 12px 0 8px; }
.focus-clock {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
}
.focus-clock .fc-time { font-size: 54px; font-weight: 200; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.focus-clock .fc-sub { font-size: 13.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.focus-controls { display: flex; gap: 10px; margin: 18px 0 6px; align-items: center; }
.focus-controls .round {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s; color: var(--text);
}
.focus-controls .round:hover { background: var(--bg-hover); }
.focus-controls .round.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); width: 64px; height: 64px; }
.focus-controls .round.primary:hover { filter: brightness(1.08); }
.focus-tasks { width: 100%; max-width: 480px; margin: 16px auto 0; }
.focus-pill {
  position: fixed; right: 18px; bottom: 18px; z-index: 35;
  display: flex; align-items: center; gap: 8px;
  background: var(--text); color: var(--bg);
  padding: 9px 16px; border-radius: 99px; box-shadow: var(--shadow);
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
  animation: popin 0.2s;
}
.focus-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #6ee7a0; animation: blink 2s infinite; }
.focus-pill.paused .dot { background: var(--warn); animation: none; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@media (max-width: 880px) {
  .focus-pill { bottom: calc(74px + env(safe-area-inset-bottom)); right: 12px; }
  .focus-clock .fc-time { font-size: 44px; }
}

/* ---------- tracker ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.stat-card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.stat-card .s-label { font-size: 12.5px; color: var(--text-3); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat-card .s-val { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; }
.stat-card .s-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.chart-card { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-top: 10px; }
.chart-card .c-title { font-size: 13.5px; font-weight: 600; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.chart-card .c-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); font-weight: 400; }
.chart-card .c-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 4px; }
.tbl-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line); font-size: 14px; }
.tbl-row:first-child { border-top: none; }
.tbl-row .r-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; }
.tbl-row .r-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-row .r-bar { flex: 2; min-width: 60px; }
.tbl-row .r-val { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 13px; white-space: nowrap; }
.sess-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-s); font-size: 14px; }
.sess-row:hover { background: var(--bg-hover); }
.sess-row .s-ico { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex: none; }
.sess-row .s-ico.completed { background: var(--ok-soft); color: var(--ok); }
.sess-row .s-ico.stopped { background: var(--bg-active); color: var(--text-2); }
.sess-row .s-ico.abandoned { background: var(--danger-soft); color: var(--danger); }
.sess-row .s-main { flex: 1; min-width: 0; }
.sess-row .s-t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sess-row .s-sub { font-size: 12px; color: var(--text-3); }
.sess-row .icon-btn { opacity: 0; }
.sess-row:hover .icon-btn { opacity: 1; }

/* ---------- toasts + status chips ---------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
@media (max-width: 880px) { .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); } }
.toast {
  background: var(--text); color: var(--bg); font-size: 13.5px; font-weight: 500;
  padding: 9px 16px; border-radius: 99px; box-shadow: var(--shadow);
  animation: toastin 0.2s cubic-bezier(0.2, 0.9, 0.3, 1); max-width: 90vw;
  display: flex; align-items: center; gap: 8px; pointer-events: auto;
}
.toast.err { background: var(--danger); color: #fff; }
@keyframes toastin { from { transform: translateY(12px); opacity: 0; } }
.net-chip {
  position: fixed; top: 12px; right: 14px; z-index: 95;
  font-size: 12px; font-weight: 600; color: var(--warn);
  background: var(--warn-soft); border: 1px solid rgba(217, 115, 13, 0.25);
  padding: 4px 11px; border-radius: 99px; display: flex; align-items: center; gap: 6px;
  animation: popin 0.2s;
}
@media (max-width: 880px) { .net-chip { top: calc(8px + env(safe-area-inset-top)); } }

/* ---------- panel (composed card sections) ---------- */
.panel {
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg); padding: 20px 24px 22px;
}
.panel hr.split { border: none; border-top: 1px solid var(--line); margin: 18px -24px; }
.panel .fld:first-child { margin-top: 2px; }

/* ---------- segmented control ---------- */
.seg { display: inline-flex; gap: 2px; background: var(--bg-input); border-radius: 8px; padding: 2px; }
.seg button {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  min-width: 28px; height: 24px; padding: 0 7px; border-radius: 6px;
  color: var(--text-3); font-size: 12.5px; font-weight: 500;
}
.seg button:hover { color: var(--text-2); }
.seg button.on { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- board view ---------- */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; margin-top: 6px; }
.board-col {
  background: var(--bg-side); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px; min-height: 120px;
  transition: border-color 0.12s, background 0.12s;
}
.board-col.over { border-color: var(--accent); background: var(--accent-soft); }
.board-col .bc-head {
  display: flex; align-items: center; gap: 7px; padding: 4px 6px 8px;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
.board-col .bc-head .cnt { color: var(--text-3); font-weight: 500; }
.board-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 11px; margin-bottom: 7px; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.12s, transform 0.12s;
}
.board-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.board-card.dragging { opacity: 0.4; }
.board-card .bd-title { font-size: 14px; line-height: 1.35; display: flex; gap: 8px; align-items: flex-start; }
.board-card .bd-title .check { margin-top: 1px; width: 16px; height: 16px; }
.board-card.done .bd-text { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-3); }
.board-card .bd-meta { display: flex; gap: 6px; align-items: center; padding-left: 24px; }
.board-add {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px;
  border-radius: 7px; color: var(--text-3);
}
.board-add:focus-within { background: var(--bg-hover); }
.board-add input { flex: 1; min-width: 0; border: none; background: none; font-size: 13.5px; color: var(--text); }
.board-add input:focus { outline: none; }
@media (max-width: 880px) {
  .board { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .board-col { flex: 0 0 80vw; scroll-snap-align: start; }
}

/* ---------- home categories: list mode ---------- */
.cat-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 10px; border-radius: 9px; text-align: left;
  transition: background 0.1s; color: var(--text);
}
.cat-row:hover { background: var(--bg-hover); }
.cat-row .cr-emoji { font-size: 18px; width: 26px; text-align: center; flex: none; }
.cat-row .cr-name { font-weight: 500; font-size: 14.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-row .cr-bar { width: 26%; max-width: 180px; flex: none; }
.cat-row .cr-cnt { font-size: 12.5px; color: var(--text-3); min-width: 70px; text-align: right; font-variant-numeric: tabular-nums; }
.cat-row .cr-chev { color: var(--text-3); display: flex; }

/* ---------- floating focus window ---------- */
.focus-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 75;
  width: 254px; background: var(--bg);
  border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: var(--shadow); padding: 11px 13px 12px;
  user-select: none; touch-action: none; animation: popin 0.18s;
}
.focus-float .ff-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  cursor: grab; padding-bottom: 2px;
}
.focus-float .ff-head:active { cursor: grabbing; }
.focus-float .ff-head .ff-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-float .ff-head .icon-btn { width: 24px; height: 24px; }
.focus-float .ff-time {
  font-size: 31px; font-weight: 200; text-align: center;
  font-variant-numeric: tabular-nums; line-height: 1.15; margin: 3px 0 7px;
}
.focus-float .ff-time.paused { color: var(--text-3); }
.focus-float .ff-controls { display: flex; justify-content: center; gap: 6px; margin-top: 9px; }
.focus-float .ff-controls .icon-btn { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; }
.focus-pill { cursor: grab; touch-action: none; }
.focus-pill:active { cursor: grabbing; }
@media (max-width: 880px) {
  .focus-float { bottom: calc(76px + env(safe-area-inset-bottom)); right: 12px; }
}

/* ---------- misc ---------- */
.muted { color: var(--text-3); }
.small { font-size: 13px; }
.row-flex { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
kbd {
  font-family: var(--font); font-size: 11px; color: var(--text-2);
  background: var(--bg-active); border-radius: 4px; padding: 1px 5px;
}
