:root {
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, monospace;
}
/* Themes. "calm" and "mint" are Prism Focus's light skins; "forest" is its dark skin. */
:root, :root[data-theme="calm"] {
  --bg: rgb(219 230 228); --surface: rgb(240 245 244); --raised: rgb(232 239 238); --ink: #23332f; --muted: #4f6560; --faint: #7e918d;
  --line: rgb(188 203 200); --accent: rgb(15 125 120); --accent-ink: #fff; --accent-soft: rgb(15 125 120 / .14);
  --warn: rgb(154 107 22); --warn-soft: rgb(154 107 22 / .14); --ok: rgb(47 125 79); --ok-soft: rgb(47 125 79 / .14); --danger: rgb(163 74 58);
  --time: rgb(43 101 151); --music: #6d4fa0; --work: rgb(154 107 22); --money: rgb(47 125 79); --capture: #4f6560;
  --shadow: 0 1px 2px rgb(35 51 47 / .06), 0 4px 14px rgb(35 51 47 / .07);
  color-scheme: light;
}
:root[data-theme="mint"] {
  --bg: rgb(238 246 242); --surface: #fff; --raised: rgb(242 250 246); --ink: #1a3028; --muted: #3d6050; --faint: #7a9e92;
  --line: rgb(208 232 222); --accent: rgb(30 122 86); --accent-ink: #fff; --accent-soft: rgb(30 122 86 / .12);
  --warn: #a8670a; --warn-soft: rgb(245 158 11 / .16); --ok: rgb(26 128 64); --ok-soft: rgb(26 128 64 / .12); --danger: rgb(192 68 42);
  --time: rgb(29 95 168); --music: #7048b0; --work: #a8670a; --money: rgb(26 128 64); --capture: #3d6050;
  --shadow: 0 1px 2px rgb(26 48 40 / .05), 0 4px 16px rgb(26 48 40 / .06);
  color-scheme: light;
}
:root[data-theme="paper"] {
  --bg: #f5f4f0; --surface: #ffffff; --raised: #fbfaf7; --ink: #1c1e22; --muted: #686c75; --faint: #9a9da4;
  --line: #e4e1da; --accent: #2b59c3; --accent-ink: #fff; --accent-soft: #e6ecfa;
  --warn: #b5551d; --warn-soft: #fbeee4; --ok: #2f7d4f; --ok-soft: #e4f2e9; --danger: #b3261e;
  --time: #2b59c3; --music: #7a4cc2; --work: #b97a12; --money: #2f7d4f; --capture: #5b6472;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.06);
  color-scheme: light;
}
:root[data-theme="night"] {
  --bg: #111317; --surface: #1a1d23; --raised: #20242b; --ink: #e9e7e2; --muted: #a0a5ae; --faint: #6e737c;
  --line: #2b2f37; --accent: #86a6ff; --accent-ink: #0d1530; --accent-soft: #1f2a47;
  --warn: #f0a46c; --warn-soft: #3a2a1d; --ok: #7cc79a; --ok-soft: #1c3226; --danger: #ff8a80;
  --time: #86a6ff; --music: #bb9af0; --work: #e8b55a; --money: #7cc79a; --capture: #a7b0bd;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.35);
  color-scheme: dark;
}
:root[data-theme="forest"] {
  --bg: rgb(15 30 23); --surface: rgb(23 37 24); --raised: rgb(30 47 33); --ink: #e0f0e8; --muted: #90baa4; --faint: #5f8571;
  --line: rgb(44 66 52); --accent: rgb(52 201 128); --accent-ink: #072015; --accent-soft: rgb(52 201 128 / .16);
  --warn: #f2b45c; --warn-soft: rgb(242 180 92 / .16); --ok: rgb(52 201 128); --ok-soft: rgb(52 201 128 / .14); --danger: #ff8f7a;
  --time: #7fb6f0; --music: #c3a3f2; --work: #f2b45c; --money: rgb(52 201 128); --capture: #90baa4;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.35);
  color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 196px minmax(0, 1fr); height: 100dvh; }
.shell.with-panel { grid-template-columns: 196px minmax(0, 1fr) min(440px, 42vw); }
.rail { border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.brand { font-weight: 650; letter-spacing: .01em; padding: 4px 10px 14px; display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: conic-gradient(var(--time), var(--music), var(--work), var(--money), var(--time)); }
.nav-btn { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 8px; text-align: left; color: var(--muted); }
.nav-btn:hover { background: var(--raised); color: var(--ink); }
.nav-btn.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 560; }
.nav-btn .ico { width: 20px; text-align: center; color: var(--c, var(--muted)); }
.nav-btn .count { margin-left: auto; font-size: 12px; color: var(--faint); }
.rail .spacer { flex: 1; }
.rail-hint { font-size: 12px; color: var(--faint); padding: 8px 10px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-bottom: 1px solid var(--line); min-height: 52px; }
.trail { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.trail::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
button.chip:hover { border-color: var(--faint); }
.chip .ico { color: var(--c, var(--muted)); }
.chip.current { border-color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.warn { background: var(--warn); } .dot.busy { background: var(--accent); } .dot.bad { background: var(--danger); }
.timer-chip { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 560; }
.timer-chip.paused { background: var(--warn-soft); color: var(--warn); }

.content { flex: 1; overflow-y: auto; padding: 18px 22px 120px; }
.content > * { max-width: 1100px; }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 8px; font-weight: 600; }
.sub { color: var(--muted); margin: 0 0 16px; }

/* ---------- capture ---------- */
.capture { position: sticky; top: 0; z-index: 3; background: var(--bg); padding-bottom: 12px; }
.capture-box { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 14px; box-shadow: var(--shadow); }
.capture-box input { flex: 1; border: 0; background: none; outline: none; padding: 8px 0; min-width: 0; font-size: 16px; }
.capture-parts { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 4px 0; font-size: 13px; }
.part { padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); border: 0; }
.part::after { content: " ×"; opacity: .6; }
.icon-btn { border: 0; background: none; width: 36px; height: 36px; border-radius: 8px; display: inline-grid; place-items: center; color: var(--muted); flex: none; }
.icon-btn:hover { background: var(--raised); color: var(--ink); }
.icon-btn.on { background: var(--danger); color: #fff; }

/* ---------- buttons & inputs ---------- */
.btn { border: 1px solid var(--line); background: var(--surface); padding: 7px 13px; border-radius: 8px; font-size: 14px; white-space: nowrap; }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 560; }
.btn.quiet { border-color: transparent; background: none; color: var(--muted); }
.btn.quiet:hover { color: var(--ink); background: var(--raised); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 4px 9px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; padding: 2px; background: var(--surface); }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 7px; color: var(--muted); font-size: 13px; }
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 560; }
.field { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: start; padding: 6px 0; }
.field > label { color: var(--muted); font-size: 13px; padding-top: 7px; }
.input, .field input, .field select, .field textarea { width: 100%; border: 1px solid transparent; background: var(--raised); border-radius: 7px; padding: 6px 9px; outline: none; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line); }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--accent); background: var(--surface); }
.field textarea { min-height: 70px; resize: vertical; }
.field .conflict { border-color: var(--warn) !important; }
.title-input { font-size: 20px; font-weight: 650; border: 0; background: none; width: 100%; outline: none; padding: 2px 0; }

/* ---------- lists & cards ---------- */
.list { display: flex; flex-direction: column; gap: 6px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.item { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 12px; cursor: pointer; min-height: 46px; }
.item:hover { border-color: var(--faint); }
.item.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.item .ico { color: var(--c, var(--muted)); width: 18px; text-align: center; flex: none; }
.item .meta { font-size: 13px; color: var(--muted); white-space: nowrap; }
.item .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item.done .title { text-decoration: line-through; color: var(--faint); }
.check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--faint); background: none; flex: none; display: grid; place-items: center; padding: 0; font-size: 12px; color: transparent; }
.check:hover { border-color: var(--ok); color: var(--ok); }
.check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.badge { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--raised); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.empty { color: var(--muted); padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.tile h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.stat { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- panel ---------- */
.panel { border-left: 1px solid var(--line); background: var(--surface); overflow-y: auto; display: flex; flex-direction: column; min-height: 0; }
.panel-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.panel-body { padding: 14px 18px 80px; }
.type-tag { font-size: 12px; color: var(--c); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.conn-group { margin-top: 6px; }
.conn { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; cursor: pointer; }
.conn:hover { background: var(--raised); }
.conn .ico { color: var(--c); width: 18px; text-align: center; }
.history li { font-size: 13px; color: var(--muted); margin: 3px 0; }
.conflict-box { background: var(--warn-soft); border-radius: 8px; padding: 10px 12px; margin: 8px 0; font-size: 14px; }
.subtasks .st { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.subtasks .st input[type=text] { flex: 1; border: 0; background: none; outline: none; padding: 4px 0; }
.subtasks .st.done input[type=text] { text-decoration: line-through; color: var(--faint); }

/* ---------- time ---------- */
.timeline { position: relative; border-left: 1px solid var(--line); margin-left: 52px; }
.hour { height: 48px; border-top: 1px solid var(--line); position: relative; }
.hour span { position: absolute; left: -50px; top: -9px; font-size: 12px; color: var(--faint); width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.block { position: absolute; left: 6px; right: 6px; border-radius: 7px; padding: 4px 8px; font-size: 13px; overflow: hidden; cursor: pointer; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 13%, var(--surface)); touch-action: none; }
.block .t { font-weight: 560; }
.block.done { opacity: .5; }
.now-line { position: absolute; left: -4px; right: 0; height: 2px; background: var(--danger); z-index: 1; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week .day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; min-height: 160px; }
.week .day.today { border-color: var(--accent); }
.week .day h4 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.mini { font-size: 12.5px; padding: 3px 6px; border-radius: 5px; margin: 3px 0; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 10%, var(--surface)); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.time-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 22px; align-items: start; }

/* ---------- music ---------- */
.set-strip { display: flex; height: 26px; border-radius: 7px; overflow: hidden; gap: 2px; margin: 10px 0 4px; }
.set-strip div { background: color-mix(in srgb, var(--music) 35%, var(--surface)); min-width: 3px; cursor: pointer; }
.set-strip div.est { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--music) 22%, var(--surface)) 0 4px, var(--surface) 4px 7px); }
.set-strip div.ready { background: color-mix(in srgb, var(--ok) 55%, var(--surface)); }
.set-row { display: grid; grid-template-columns: 28px 26px minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px; padding: 7px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.set-row .n { color: var(--faint); font-variant-numeric: tabular-nums; text-align: right; }
.set-row .grip { cursor: grab; color: var(--faint); border: 0; background: none; touch-action: none; padding: 4px; }
.set-row.dragging { opacity: .6; border-style: dashed; }
.bar { height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--music); }

/* ---------- timer overlay ---------- */
.timer-panel { position: fixed; right: 18px; bottom: 18px; z-index: 20; width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 14px; }
.timer-big { font: 600 40px/1 var(--mono); text-align: center; margin: 8px 0 12px; font-variant-numeric: tabular-nums; }
.timer-full { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: grid; place-items: center; text-align: center; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.timer-full .timer-big { font-size: min(22vw, 160px); }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 30; display: grid; place-items: center; padding: 16px; }
.sheet { background: var(--surface); border-radius: 14px; padding: 18px; width: min(520px, 100%); max-height: 86dvh; overflow-y: auto; box-shadow: var(--shadow); }
.palette input { width: 100%; font-size: 18px; border: 0; outline: none; background: none; padding: 6px 2px 12px; border-bottom: 1px solid var(--line); }
.palette .res { padding: 7px 8px; border-radius: 7px; display: flex; gap: 10px; align-items: center; cursor: pointer; }
.palette .res.sel, .palette .res:hover { background: var(--accent-soft); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 9px 14px; border-radius: 10px; z-index: 50; display: flex; gap: 12px; align-items: center; font-size: 14px; box-shadow: var(--shadow); }
.toast button { background: none; border: 0; color: var(--accent-soft); font-weight: 600; }

/* ---------- sync ---------- */
.sync-hero { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.sync-hero .big-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--ok); flex: none; }
.sync-hero .big-dot.warn { background: var(--warn); }
.change { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }

/* ---------- phone ---------- */
.tabbar { display: none; }
@media (max-width: 760px) {
  .shell, .shell.with-panel { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .content { padding: 12px 14px 140px; }
  .topbar { padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
  .panel { position: fixed; inset: 0; z-index: 25; border-left: 0; padding-top: env(safe-area-inset-top); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px max(6px, env(safe-area-inset-bottom)); justify-content: space-around; }
  .tabbar button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 10.5px; color: var(--muted); padding: 5px 8px; min-width: 56px; }
  .tabbar button .ico { font-size: 18px; color: var(--c, var(--muted)); }
  .tabbar button.active { color: var(--ink); font-weight: 600; }
  .field { grid-template-columns: 1fr; gap: 2px; }
  .field > label { padding-top: 0; }
  .time-split { grid-template-columns: 1fr; }
  .week { grid-template-columns: 1fr; }
  .week .day { min-height: 0; }
  .timer-panel { left: 10px; right: 10px; width: auto; bottom: calc(70px + env(safe-area-inset-bottom)); }
  .set-row { grid-template-columns: 22px 24px minmax(0, 1fr) auto; }
  .set-row .hide-sm { display: none; }
  .capture-box input { font-size: 17px; }
}
@media (pointer: coarse) { .block { touch-action: pan-y; } }
.panel-slot { min-height: 0; display: flex; }
.panel-slot > .panel { flex: 1; min-width: 0; }

@media (max-width: 1180px) and (min-width: 761px) {
  .shell.with-panel { grid-template-columns: 58px minmax(0, 1fr) min(420px, 46vw); }
  .shell.with-panel .rail .nav-btn > span:not(.ico), .shell.with-panel .rail .nav-btn .count, .shell.with-panel .rail-hint, .shell.with-panel .brand-text { display: none; }
  .shell.with-panel .rail .nav-btn { justify-content: center; padding: 9px 0; }
  .shell.with-panel .brand { justify-content: center; padding: 4px 0 14px; }
  .shell.with-panel .time-split { grid-template-columns: 1fr; }
}

.phone-only { display: none; }
@media (max-width: 760px) { .phone-only { display: inline-grid; } }
.ring-stack { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 45; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 24px)); }
.ring-card { background: var(--surface); border: 1px solid var(--accent); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); animation: ring-in .18s ease-out; }
.ring-ico { font-size: 20px; color: var(--accent); width: 28px; text-align: center; }
@keyframes ring-in { from { transform: translateY(-6px); opacity: 0; } }
.alarm-mark { position: absolute; right: 4px; transform: translateY(-50%); font-size: 11.5px; background: var(--surface); border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; padding: 0 8px; z-index: 2; cursor: pointer; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }

.block.draft { border: 2px dashed var(--accent); border-left-width: 3px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); cursor: default; overflow: visible; touch-action: manipulation; }
.timeline { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.timeline input { -webkit-user-select: text; user-select: text; }

.scratch-line .line-actions { opacity: .35; transition: opacity .15s; }
.scratch-line:hover .line-actions, .scratch-line:focus-within .line-actions { opacity: 1; }
@media (pointer: coarse) { .scratch-line .line-actions { opacity: .8; } .scratch-line .line-actions .icon-btn { width: 32px; height: 32px; } }
@media (max-width: 760px) {
  .time-split, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .row.wrap > h1.grow { flex-basis: 100%; font-size: 20px; }
  .content { overflow-x: hidden; }
}

html, body { touch-action: manipulation; } /* no double-tap zoom anywhere; pinch zoom still works */
#content.drawing { overflow: hidden; touch-action: none; overscroll-behavior: contain; }
#content.drawing .timeline { touch-action: none; }
.draw-line { position: absolute; left: -6px; right: 0; height: 3px; margin-top: -1px; background: var(--accent); z-index: 4; pointer-events: none; }
.draw-line.flash { animation: draw-flash 1s ease-in-out infinite; }
.draw-line.held { animation: none; height: 4px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.draw-line.set { opacity: .55; }
.draw-tag { position: absolute; left: 10px; top: -26px; background: var(--accent); color: var(--accent-ink); font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.draw-line.set .draw-tag { background: var(--surface); color: var(--accent); border: 1px solid var(--accent); }
@keyframes draw-flash { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .draw-line.flash { animation: none; outline: 2px dashed var(--accent); } }

.draw-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 30; width: min(560px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--accent); color: var(--accent); font-weight: 600; font-size: 13.5px; border-radius: 12px; padding: 8px 10px 8px 14px; box-shadow: var(--shadow); }
@media (max-width: 760px) { .draw-bar { bottom: calc(76px + env(safe-area-inset-bottom)); } }
