:root {
  color-scheme: light;
  --bg: #ffffff;
  --side: #f6f7f9;
  --soft: #f2f3f6;
  --hover: #eceef2;
  --line: #e6e8ec;
  --line2: #d3d7de;
  --ink: #15181d;
  --ink2: #535c69;
  --ink3: #8b93a0;
  --acc: #3d5afe;
  --accInk: #ffffff;
  --accSoft: #eaeeff;
  --late: #d93a3a;
  --risk: #d98a12;
  --ok: #2f9e5b;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 12px 32px -12px rgba(16, 24, 40, .22);
  --lane-h: 20px;
  --r: 10px;
  --tabs-h: 0px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #121418;
    --side: #17191e;
    --soft: #1c1f25;
    --hover: #23272e;
    --line: #262a31;
    --line2: #353a43;
    --ink: #eceef2;
    --ink2: #a3aab6;
    --ink3: #6f7784;
    --acc: #7c8dff;
    --accInk: #0b0f2b;
    --accSoft: #232a4d;
    --late: #f06a6a;
    --risk: #f0aa45;
    --ok: #55c483;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -12px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .f { fill: currentColor; stroke: none; }
[hidden] { display: none !important; }

#app { display: grid; grid-template-columns: 248px 1fr; height: 100vh; height: 100dvh; }

/* ---------- Šoninė juosta ---------- */
#side {
  background: var(--side);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 14px 10px 10px;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 9px; padding: 4px 10px 16px; font-size: 15px; letter-spacing: -.01em; }
.mark { width: 22px; height: 22px; border-radius: 7px; background: var(--acc); position: relative; flex: none; }
.mark::after { content: ""; position: absolute; left: 6px; top: 5px; width: 5px; height: 9px; border: solid var(--accInk); border-width: 0 2.2px 2.2px 0; transform: rotate(45deg); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-i {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 8px; text-align: left; color: var(--ink2);
  min-height: 34px;
}
.nav-i span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-i em { font-style: normal; font-size: 12px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.nav-i:hover { background: var(--hover); color: var(--ink); }
.nav-i.on { background: var(--accSoft); color: var(--acc); font-weight: 600; }
.nav-i.on em { color: var(--acc); }
.side-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 10px 6px; font-size: 11.5px; font-weight: 600; color: var(--ink3); text-transform: uppercase; letter-spacing: .05em; }
.lists .nav-i { padding: 5px 10px; min-height: 30px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.big { width: 12px; height: 12px; }
.side-foot { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }

.net { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink3); padding: 2px 10px; min-height: 18px; }
.net i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink3); flex: none; }
.net[data-net="ok"] i { background: var(--ok); }
.net[data-net="syncing"] i { background: var(--acc); animation: pulse 1s infinite alternate; }
.net[data-net="offline"] i { background: var(--risk); }
.net[data-net="auth"] i { background: var(--late); }
.net[data-net="idle"] { visibility: hidden; }
.net.mob { display: none; }
@keyframes pulse { to { opacity: .3; } }

.ib { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 8px; color: var(--ink2); flex: none; }
.ib:hover { background: var(--hover); color: var(--ink); }
.ib.sm { width: 26px; height: 26px; }
.side-h .ib { width: 24px; height: 24px; }
.side-h .ib svg { width: 15px; height: 15px; }

/* ---------- Pagrindinė dalis ---------- */
#main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#top { padding: 18px 28px 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
.top-row { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.top-t { flex: 1; min-width: 0; }
.top-t h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; line-height: 1.15; }
.sub { color: var(--ink3); font-size: 13px; margin-top: 2px; }
.top-a { display: flex; align-items: center; gap: 6px; }
#view { flex: 1; overflow-y: auto; min-height: 0; }
.wrap { max-width: 860px; padding: 8px 28px 60px; }
.wrap.narrow { max-width: 680px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 8px;
  border: 1px solid var(--line2); background: var(--bg); font-weight: 500; white-space: nowrap;
}
.btn:hover { background: var(--hover); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.sm svg { width: 15px; height: 15px; }
.btn.pri { background: var(--acc); border-color: var(--acc); color: var(--accInk); }
.btn.pri:hover { filter: brightness(1.07); }
.btn.danger { color: var(--late); }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* Greitas įvedimas */
.qa {
  position: relative; display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding: 0 12px; border-radius: 9px; background: var(--soft); border: 1px solid transparent;
}
.qa:focus-within { background: var(--bg); border-color: var(--acc); box-shadow: 0 0 0 3px var(--accSoft); }
.qa-plus { color: var(--acc); display: grid; }
.qa input { flex: 1; min-width: 0; border: 0; background: none; padding: 10px 0; font-size: 15px; outline: none; }
.qa input::placeholder { color: var(--ink3); }
.qa-hint { font-size: 12px; color: var(--acc); white-space: nowrap; font-weight: 500; }
.qa-hint:empty { display: none; }

/* Sekcijos ir eilutės */
.sec { margin-top: 22px; }
.sec h2 { font-size: 13px; font-weight: 650; color: var(--ink2); margin: 0 0 6px; display: flex; align-items: center; gap: 8px; letter-spacing: -.005em; }
.sec h2 em { font-style: normal; color: var(--ink3); font-weight: 500; }
.sec.late h2 { color: var(--late); }
.sec.card { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 16px; }
.sec.card h2 { font-size: 15px; color: var(--ink); margin-bottom: 8px; }
.empty { color: var(--ink3); padding: 8px 0; margin: 0; }
.muted { color: var(--ink3); }
.sm { font-size: 12px; }

.row { display: flex; align-items: flex-start; gap: 11px; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.row:hover { background: color-mix(in srgb, var(--hover) 50%, transparent); }
.row-b { flex: 1; min-width: 0; cursor: pointer; }
.row-t { font-size: 14.5px; overflow-wrap: anywhere; }
.row-m { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--ink3); margin-top: 2px; }
.row-m span { display: inline-flex; align-items: center; gap: 4px; }
.row-m .late { color: var(--late); font-weight: 500; }
.row-m .rep svg { width: 12px; height: 12px; }
.row-m .note { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.done .row-t { color: var(--ink3); text-decoration: line-through; text-decoration-color: var(--line2); }
.chip { background: color-mix(in srgb, var(--c) 14%, transparent); color: color-mix(in srgb, var(--c) 75%, var(--ink)); padding: 0 7px; border-radius: 5px; font-weight: 500; }
.lst { color: var(--ink3); }

.chk {
  width: 20px; height: 20px; border-radius: 50%; border: 1.6px solid color-mix(in srgb, var(--c) 70%, var(--line2));
  flex: none; margin-top: 1px; position: relative; transition: background .12s, transform .12s;
}
.chk:hover { background: color-mix(in srgb, var(--c) 15%, transparent); }
.chk:active { transform: scale(.88); }
.done > .chk, .chk.on { background: var(--c); border-color: var(--c); }
.done > .chk::after, .chk.on::after {
  content: ""; position: absolute; left: 6px; top: 2.5px; width: 4.5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.chk.sm { width: 14px; height: 14px; border-width: 1.4px; margin-top: 1px; }
.done > .chk.sm::after { left: 3.6px; top: 1px; width: 3.2px; height: 6.5px; border-width: 0 1.6px 1.6px 0; }
.chk.lg { width: 24px; height: 24px; margin-top: 3px; }
.chk.lg.on::after { left: 7.5px; top: 3.5px; width: 5.5px; height: 11px; }

.evs { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 8px; }
.ev { display: flex; gap: 10px; align-items: baseline; padding: 6px 10px; border-radius: 7px; background: color-mix(in srgb, var(--c) 10%, transparent); border-left: 3px solid var(--c); font-size: 13.5px; }
.ev-t { color: var(--ink2); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 74px; }
.ev-n { min-width: 0; overflow-wrap: anywhere; }

details.done-box { margin-top: 14px; }
details.done-box summary { cursor: pointer; color: var(--ink3); font-size: 13px; padding: 6px 0; list-style: none; }
details.done-box summary::before { content: "▸ "; }
details.done-box[open] summary::before { content: "▾ "; }

.ahead { margin-bottom: 14px; }
.ahead h3 { font-size: 14px; margin: 10px 0 2px; font-weight: 600; cursor: pointer; }
.ahead h3 span { color: var(--ink3); font-weight: 400; font-size: 12.5px; margin-left: 4px; }

/* Projektų kortelės */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.proj-grid.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin-top: 18px; }
.proj {
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px 10px; background: var(--bg);
  border-top: 3px solid var(--c); display: flex; flex-direction: column; min-width: 0;
}
.proj-h { cursor: pointer; }
.proj-t { font-weight: 650; font-size: 15px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.proj-m { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: 12px; color: var(--ink3); margin-top: 3px; }
.proj-m span { display: inline-flex; align-items: center; gap: 4px; }
.h-ok .due { color: var(--ink2); }
.h-risk .due { color: var(--risk); font-weight: 600; }
.h-late .due { color: var(--late); font-weight: 600; }
.h-done .due { color: var(--ok); }
.bar { height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; background: var(--c); border-radius: 3px; transition: width .25s; }
.proj-p { font-size: 12px; color: var(--ink3); margin: 5px 0 2px; }
.proj-s .row { padding: 5px 0; }
.proj-s .row:last-child { border-bottom: 0; }
.proj-s .row-t { font-size: 13.5px; }
.proj .qa { margin-top: 8px; }
.proj .qa input { font-size: 13.5px; padding: 7px 0; }
.more { font-size: 12px; color: var(--acc); text-align: left; padding: 4px 0; }
.h-done { opacity: .7; }
.empty-big { text-align: center; padding: 50px 20px; }
.empty-big p { margin: 0 0 6px; font-size: 15px; }
.empty-big .muted { font-size: 13.5px; max-width: 420px; margin: 0 auto 18px; }

/* ---------- Savaitė ---------- */
.wk { --lane-top: 0px; padding: 12px 20px 40px; position: relative; }
.wk-bars { position: relative; height: calc(var(--lanes) * var(--lane-h) + 4px); margin-bottom: 6px; }
.wk-cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.wk-col { border-right: 1px solid var(--line); min-height: 320px; display: flex; flex-direction: column; position: relative; }
.wk-col:last-child { border-right: 0; }
.wk-col.past { background: color-mix(in srgb, var(--soft) 45%, transparent); }
.wk-h { display: flex; align-items: baseline; gap: 6px; padding: 9px 10px 7px; border-bottom: 1px solid var(--line); cursor: pointer; }
.wk-h span { font-size: 12px; color: var(--ink3); font-weight: 600; }
.wk-h b { font-size: 17px; font-weight: 600; }
.is-today .wk-h b { background: var(--acc); color: var(--accInk); border-radius: 13px; padding: 0 8px; }
.wk-b { padding: 6px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.wk-add { position: absolute; right: 6px; top: 6px; opacity: 0; color: var(--ink3); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; }
.wk-add svg { width: 15px; height: 15px; }
.wk-col:hover .wk-add { opacity: 1; }
.wk-add:hover { background: var(--hover); color: var(--acc); }

.pbar {
  position: absolute; height: calc(var(--lane-h) - 3px); border-radius: 5px; padding: 0 7px;
  background: color-mix(in srgb, var(--c) 20%, var(--bg)); color: color-mix(in srgb, var(--c) 70%, var(--ink));
  font-size: 11.5px; font-weight: 600; text-align: left; overflow: hidden; display: flex; align-items: center;
  box-sizing: border-box; border: 0; z-index: 1;
}
.pbar i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--c) 32%, var(--bg)); z-index: -1; }
.pbar span { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar.cl { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.pbar.cr { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.pbar.h-late { box-shadow: inset 0 0 0 1.5px var(--late); }
.pbar.h-risk { box-shadow: inset 0 0 0 1.5px var(--risk); }
.pbar.h-done { opacity: .5; }
.pbar:hover { filter: brightness(.96); }
.pbar.ebar { background: var(--c); color: #fff; font-weight: 500; }
.pbar.ebar b { font-weight: 650; opacity: .85; }
.ci.multi { display: none; }

.ci { display: flex; align-items: flex-start; gap: 5px; font-size: 12px; line-height: 1.3; padding: 2px 4px; border-radius: 5px; min-width: 0; }
.ci span { min-width: 0; overflow: hidden; text-overflow: ellipsis; overflow-wrap: anywhere; cursor: pointer; }
.ci b { font-weight: 600; color: var(--ink2); margin-right: 4px; font-variant-numeric: tabular-nums; }
.ev-c { background: color-mix(in srgb, var(--c) 13%, transparent); border-left: 2.5px solid var(--c); border-radius: 3px; }
.ev-c span { cursor: default; }
.due-c { color: color-mix(in srgb, var(--c) 75%, var(--ink)); font-weight: 600; cursor: pointer; }
.tk:hover { background: var(--hover); }
.tk.done span { color: var(--ink3); text-decoration: line-through; }
.pfx { font-style: normal; font-size: 10.5px; font-weight: 600; color: color-mix(in srgb, var(--c) 75%, var(--ink)); background: color-mix(in srgb, var(--c) 14%, transparent); border-radius: 3px; padding: 0 4px; margin-right: 4px; }
.tk[draggable="true"] { cursor: grab; }
.dragging { opacity: .4; }
.drop-on { background: var(--accSoft) !important; }

/* ---------- Mėnuo ---------- */
.mo { padding: 0 0 30px; }
.mo-h { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 3; }
.mo-h span { padding: 8px 10px; font-size: 12px; color: var(--ink3); font-weight: 600; text-align: right; }
.mr { --lane-top: 28px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); position: relative; border-bottom: 1px solid var(--line); min-height: 118px; }
.mr-bars { position: absolute; inset: 0; pointer-events: none; }
.mr-bars .pbar { pointer-events: auto; }
.mc { border-right: 1px solid var(--line); padding: 4px 4px 6px; min-width: 0; cursor: default; padding-top: calc(var(--lane-top) + var(--lanes) * var(--lane-h) + 2px); position: relative; }
.mc:last-child { border-right: 0; }
.mc.out { background: color-mix(in srgb, var(--soft) 55%, transparent); }
.mc.out .mc-n { color: var(--ink3); }
.mc-n { position: absolute; top: 4px; right: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink2); }
.is-today .mc-n span { background: var(--acc); color: var(--accInk); border-radius: 11px; padding: 1px 7px; font-weight: 600; }
.mc-b { display: flex; flex-direction: column; gap: 1px; }
.mc-dots { display: none; }
.mc .ci { padding: 1px 3px; font-size: 11.5px; }
.mc .ci span { white-space: nowrap; }

/* ---------- Sąrašai (mobilus) ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.tile { background: var(--soft); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; text-align: left; align-items: center; }
.tile svg { color: var(--acc); }
.tile em { grid-column: 1 / -1; font-style: normal; font-size: 22px; font-weight: 700; }
.list-rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.lrow:last-child { border-bottom: 0; }
.lrow span { flex: 1; }
.lrow em { font-style: normal; color: var(--ink3); }

/* ---------- Nustatymai ---------- */
.in { width: 100%; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 8px; background: var(--bg); font-size: 14px; min-width: 0; }
.in:focus { outline: 2px solid var(--acc); outline-offset: -1px; border-color: transparent; }
select.in { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink3) 50%), linear-gradient(135deg, var(--ink3) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 26px; }
.cal-item { padding: 8px 0 10px; border-bottom: 1px solid var(--line); }
.cal-row { display: flex; align-items: center; gap: 8px; }
.cal-url { margin-top: 6px; font-size: 12.5px; color: var(--ink2); font-family: ui-monospace, Menlo, monospace; }
.cal-warn { margin-top: 6px; font-size: 12.5px; color: var(--late); }
.ckeys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.ckey { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 4px; border-radius: 14px; background: var(--soft); font-size: 12.5px; cursor: pointer; }
.ckey input[type=color] { width: 20px; height: 20px; border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; }
.ckey input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.ckey input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.ckey .x { color: var(--ink3); font-size: 14px; line-height: 1; padding: 0 2px; }
.ckey-add .in { width: 170px; padding: 4px 10px; border-radius: 14px; font-size: 12.5px; }
.cal-row input[type=color] { width: 30px; height: 30px; border: 0; padding: 0; background: none; border-radius: 6px; flex: none; }
.cal-row .in { flex: 1; }
.cal-row .muted { white-space: nowrap; }
.sw { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink2); white-space: nowrap; }
.cal-add { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; margin: 12px 0 10px; }
.key { display: flex; gap: 8px; align-items: center; background: var(--soft); border-radius: 8px; padding: 8px 10px; margin: 8px 0 4px; }
.key code { flex: 1; font-size: 12.5px; overflow-wrap: anywhere; user-select: all; }

/* ---------- Detali panelė ---------- */
#scrim { display: none; }
#detail {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw;
  background: var(--bg); border-left: 1px solid var(--line); box-shadow: var(--shadow);
  transform: translateX(105%); transition: transform .22s cubic-bezier(.2, .8, .2, 1);
  z-index: 20; display: flex; flex-direction: column; overflow: hidden;
}
.has-detail #detail { transform: none; }
.d-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px 20px; border-bottom: 1px solid var(--line); }
.d-k { flex: 1; font-size: 12px; font-weight: 600; color: var(--ink3); text-transform: uppercase; letter-spacing: .05em; }
.d-body { padding: 16px 20px 40px; overflow-y: auto; flex: 1; }
.d-title { display: flex; gap: 12px; align-items: flex-start; }
.ttl { flex: 1; border: 0; background: none; resize: none; font-size: 20px; font-weight: 650; letter-spacing: -.015em; line-height: 1.3; padding: 0; outline: none; min-height: 28px; overflow: hidden; field-sizing: content; }
.pmark { width: 6px; align-self: stretch; border-radius: 3px; background: var(--c); flex: none; }
.notes { margin-top: 12px; resize: vertical; min-height: 64px; line-height: 1.45; field-sizing: content; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.fields label, .lbl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink3); }
.fields .full { grid-column: 1 / -1; }
.lbl { margin-bottom: 14px; }
.quick-dates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pill { font-size: 12.5px; padding: 4px 10px; border-radius: 14px; background: var(--soft); color: var(--ink2); }
.pill:hover { background: var(--accSoft); color: var(--acc); }
.d-foot { display: flex; justify-content: space-between; gap: 8px; margin: 22px 0 10px; flex-wrap: wrap; }
.d-sub { font-size: 13px; font-weight: 650; color: var(--ink2); margin: 22px 0 6px; }
.d-prog { margin-top: 12px; }
.d-prog .bar { margin-top: 0; }
.d-prog span { display: block; font-size: 12.5px; color: var(--ink2); margin-top: 6px; }
.d-prog.h-risk span { color: var(--risk); }
.d-prog.h-late span { color: var(--late); }
.step { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.step .chk { margin-top: 0; }
.step-t { flex: 1; min-width: 0; border: 0; background: none; padding: 4px 2px; font-size: 14px; border-radius: 5px; outline: none; }
.step-t:focus { background: var(--soft); }
.step.done .step-t { color: var(--ink3); text-decoration: line-through; }
.step-d { border: 0; background: none; font-size: 12px; color: var(--ink3); width: 118px; padding: 2px; border-radius: 5px; }
.step-d:focus { background: var(--soft); outline: none; }
.step[draggable="true"] { cursor: grab; }
.d-day { font-size: 22px; margin: 0 0 4px; display: flex; align-items: baseline; gap: 10px; letter-spacing: -.02em; }
.d-day span { font-size: 13px; color: var(--ink3); font-weight: 500; }
#detail .proj { margin-bottom: 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.sw-c { width: 26px; height: 26px; border-radius: 50%; }
.sw-c.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }

/* ---------- Mobilus ---------- */
#tabs { display: none; }
#toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--tabs-h)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 20px; font-size: 13.5px; font-weight: 500;
  transition: opacity .2s, transform .2s; z-index: 40; max-width: calc(100vw - 32px); text-align: center;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .has-detail #scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .18); z-index: 15; }
}

@media (max-width: 760px) {
  :root { --tabs-h: calc(56px + env(safe-area-inset-bottom)); --lane-h: 16px; }
  #app { grid-template-columns: 1fr; }
  #side { display: none; }
  #top { padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
  .top-t h1 { font-size: 26px; }
  .net.mob { display: flex; padding: 0; }
  .net.mob span { display: none; }
  .wrap { padding: 4px 16px calc(var(--tabs-h) + 30px); }
  #view { padding-bottom: 0; }
  .qa input { font-size: 16px; }
  .qa-hint { position: absolute; right: 10px; bottom: -18px; font-size: 11px; }
  .top-a .btn.sm { padding: 5px 8px; }
  .row { padding: 9px 2px; }
  .chk { width: 22px; height: 22px; }
  .done > .chk::after { left: 7px; top: 3px; }

  #tabs {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabs-h);
    padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); z-index: 10;
  }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10.5px; color: var(--ink3); font-weight: 500; }
  .tab svg { width: 22px; height: 22px; }
  .tab.on { color: var(--acc); }

  #detail { width: 100vw; border-left: 0; padding-top: env(safe-area-inset-top); z-index: 30; }
  .d-body { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .fields { grid-template-columns: 1fr 1fr; }
  .in { font-size: 16px; }
  .step-t { font-size: 15px; }

  /* Savaitė telefone – dienos viena po kitos */
  .wk { padding: 10px 12px calc(var(--tabs-h) + 20px); }
  .wk-bars { display: none; }
  .wk-cols { grid-template-columns: 1fr; }
  .wk-col { border-right: 0; border-bottom: 1px solid var(--line); min-height: 0; }
  .wk-col:last-child { border-bottom: 0; }
  .wk-b:empty { display: none; }
  .wk .ci.multi { display: flex; }
  .wk-add { opacity: 1; }
  .ci { font-size: 13.5px; padding: 4px; }
  .chk.sm { width: 18px; height: 18px; }
  .done > .chk.sm::after { left: 5px; top: 1.6px; width: 4px; height: 8.5px; }

  /* Mėnuo telefone – taškai, smulkmenos per dienos langą */
  .mo { padding-bottom: calc(var(--tabs-h) + 10px); }
  .mo-h span { text-align: center; padding: 6px 0; }
  .mr { min-height: 64px; --lane-top: 24px; }
  .mc { padding-left: 2px; padding-right: 2px; cursor: pointer; }
  .mc-n { left: 0; right: 0; text-align: center; }
  .mc-b { display: none; }
  .mc-dots { display: flex; gap: 3px; justify-content: center; margin-top: 2px; }
  .mc-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink3); }
  .pbar { font-size: 9.5px; padding: 0 3px; }
  .cal-add { grid-template-columns: 1fr; }
  .proj-grid, .proj-grid.wide { grid-template-columns: 1fr; }
}
