/* Domowe aplikacje — kopia z systemu projektowego. Nie edytuj tutaj: zmiany w systemie, potem podmień plik. */
.ds {
  --bg: #f6f3ef;
  --surface: #ffffff;
  --surface-2: #efebe5;
  --line: #e2dcd3;
  --line-strong: #8c8379;
  --text: #1d1a17;
  --muted: #6f675e;
  --scrim: rgba(0,0,0,0.45);
  --ok: #1d7a45;
  --warn: #9a6608;
  --bad: #c4473a;
  --idle: #9aa5b1;
  --centrum: #c98a10;
  --on-centrum: #1b1406;
  --centrum-text: #9a6608;
  --bilans: #1f6f5c;
  --on-bilans: #ffffff;
  --bilans-soft: #e3efeb;
  --treningi: #e8590c;
  --on-treningi: #1a0d04;
  --treningi-text: #c4510a;
  --muzyka: #1db954;
  --on-muzyka: #04140a;
  --muzyka-text: #1a7f3c;
  --accent: var(--centrum);
  --on-accent: var(--on-centrum);
  --accent-text: var(--centrum-text);
  --focus: var(--accent-text);
  --pc-cpu: #2f6fbf;
  --pc-ram: #7d4fc4;
  --fin-ike: var(--bilans);
  --fin-ppk: #b5651d;
  --fin-unum: #4a5fa8;
  --fin-debt: #a33b3b;
  --fin-paid: #8a9792;
  --fin-var: #8a5a9e;
  --t-easy: #3d9a6b;
  --t-long: #2f6fb0;
  --t-tempo: #d08a1e;
  --t-interval: #c4473a;
  --t-recovery: #7aa88f;
  --t-race: #8a3fb5;
  --t-strength: #6b6b6b;
  --t-cross: #4b8f9c;
  --t-rest: #a5a5a5;
  --t-other: #888888;
  --plat-steam: #3d93cc;
  --plat-gog: #9a55d0;
  --plat-battlenet: #1d7fe0;
  --shadow-card: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.05);
  --shadow-thumb: 0 1px 2px rgba(0,0,0,.12);
  --shadow-raised: 0 6px 18px rgba(0,0,0,.25);
  --shadow-dialog: 0 20px 60px rgba(0,0,0,.4);
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-14: 14px;
  --space-16: 16px;
  --space-18: 18px;
  --space-24: 24px;
  --space-48: 48px;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-pill: 999px;
  --control: 44px;
  --control-sm: 34px;
  --tabbar: 64px;
  --rail: 220px;
  --content: 900px;
  --content-wide: 1100px;
  --font-display: "Bricolage Grotesque", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, ui-monospace, monospace;
  font: 15px/1.45 var(--font-sans);
  color: var(--text);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .ds {
  --bg: #14110f;
  --surface: #1e1a17;
  --surface-2: #29241f;
  --line: #352e28;
  --line-strong: #776c61;
  --text: #f2ece5;
  --muted: #a39a8f;
  --scrim: rgba(0,0,0,0.6);
  --ok: #5cc28a;
  --warn: #e5a83a;
  --bad: #ef6f62;
  --idle: #6c7a89;
  --centrum: #f2b84b;
  --centrum-text: #f2b84b;
  --bilans: #5cc3a6;
  --on-bilans: #0d1714;
  --bilans-soft: #1d2c27;
  --treningi: #ff7a2f;
  --treningi-text: #ff7a2f;
  --muzyka-text: #1db954;
  --pc-cpu: #6aa8f0;
  --pc-ram: #b48cf2;
  --fin-ppk: #e39a55;
  --fin-unum: #93a6f0;
  --fin-debt: #f08a8a;
  --fin-paid: #6f7d78;
  --fin-var: #c79ad9;
  --shadow-card: inset 0 1px 0 rgba(255,255,255,.03), 0 8px 24px rgba(0,0,0,.25);
}
}
:root[data-theme="dark"] .ds {
  --bg: #14110f;
  --surface: #1e1a17;
  --surface-2: #29241f;
  --line: #352e28;
  --line-strong: #776c61;
  --text: #f2ece5;
  --muted: #a39a8f;
  --scrim: rgba(0,0,0,0.6);
  --ok: #5cc28a;
  --warn: #e5a83a;
  --bad: #ef6f62;
  --idle: #6c7a89;
  --centrum: #f2b84b;
  --centrum-text: #f2b84b;
  --bilans: #5cc3a6;
  --on-bilans: #0d1714;
  --bilans-soft: #1d2c27;
  --treningi: #ff7a2f;
  --treningi-text: #ff7a2f;
  --muzyka-text: #1db954;
  --pc-cpu: #6aa8f0;
  --pc-ram: #b48cf2;
  --fin-ppk: #e39a55;
  --fin-unum: #93a6f0;
  --fin-debt: #f08a8a;
  --fin-paid: #6f7d78;
  --fin-var: #c79ad9;
  --shadow-card: inset 0 1px 0 rgba(255,255,255,.03), 0 8px 24px rgba(0,0,0,.25);
}
.ds, .ds *, .ds::before, .ds *::before, .ds::after, .ds *::after { box-sizing: border-box; }
.ds {   color: var(--text); font: 15px/1.45 var(--font-sans); -webkit-tap-highlight-color: transparent; }
.ds h1, .ds h2, .ds h3 { font-family: var(--font-display); margin: 0; letter-spacing: -.01em; }
.ds a { color: var(--accent-text); }
.ds .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ds .muted { color: var(--muted); }
.ds :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ds.app-centrum, .ds .app-centrum { --accent: var(--centrum);  --on-accent: var(--on-centrum);  --accent-text: var(--centrum-text); }
.ds.app-bilans, .ds .app-bilans { --accent: var(--bilans);   --on-accent: var(--on-bilans);   --accent-text: var(--bilans); }
.ds.app-treningi, .ds .app-treningi { --accent: var(--treningi); --on-accent: var(--on-treningi); --accent-text: var(--treningi-text); }
.ds.app-muzyka, .ds .app-muzyka { --accent: var(--muzyka);   --on-accent: var(--on-muzyka);   --accent-text: var(--muzyka-text); }
.ds .btn { font: 600 14px/20px var(--font-sans); display: inline-flex; align-items: center; justify-content: center; gap: var(--space-6);
  min-height: 40px; padding: 0 var(--space-14); border-radius: var(--radius-md); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.ds .btn:hover { border-color: var(--text); }
.ds .btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.ds .btn.primary:hover { filter: brightness(1.06); }
.ds .btn.secondary { background: var(--surface-2); border-color: transparent; }
.ds .btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.ds .btn.ghost:hover { color: var(--text); background: var(--surface-2); }
.ds .btn.danger { color: var(--bad); }
.ds .btn.danger:hover { border-color: var(--bad); }
.ds .btn.sm { min-height: var(--control-sm); padding: 0 var(--space-10); font-size: 13px; border-radius: var(--radius-sm); }
.ds .btn.touch { min-height: var(--control); border-radius: 12px; padding: 0 var(--space-16); }
.ds .btn.block { width: 100%; }
.ds .btn:disabled, .ds .btn[aria-disabled="true"] { opacity: .45; cursor: default; filter: none; }
.ds .btn svg, .ds .icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ds .icon-btn { width: var(--control); height: var(--control); border-radius: 50%; border: 0; background: none; color: var(--muted);
  display: inline-grid; place-items: center; cursor: pointer; }
.ds .icon-btn:hover { color: var(--text); background: var(--surface-2); }
.ds .row { display: flex; gap: var(--space-8); flex-wrap: wrap; align-items: center; }
.ds .chips { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.ds .chip { font: 600 13px/18px var(--font-sans); min-height: var(--control-sm); padding: 0 var(--space-12); border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); cursor: pointer; }
.ds .chip:hover { color: var(--text); }
.ds .chip[aria-pressed="true"] { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.ds .chip:disabled { opacity: .5; cursor: default; }
.ds .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--idle)); flex: none; }
.ds .dot.ok { background: var(--ok); }
.ds .dot.warn { background: var(--warn); }
.ds .dot.bad { background: var(--bad); }
.ds .dot.planned { background: transparent; box-shadow: inset 0 0 0 2px var(--c); }
.ds .dot.pulse { animation: ds-pulse 1.2s ease-in-out infinite; }
@keyframes ds-pulse { 50% { opacity: .35; } }
.ds .status { display: inline-flex; align-items: center; gap: 7px; padding: 4px var(--space-10); border-radius: var(--radius-pill);
  background: var(--surface-2); border: 1px solid var(--line); font: 600 13px/18px var(--font-sans); color: var(--text); white-space: nowrap; flex: none; }
.ds .pill { display: inline-block; font: 600 12px/16px var(--font-sans); padding: 2px var(--space-8); border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.ds .pill.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.ds .pill.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.ds .pill.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.ds .pill.accent { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-text); }
.ds .tag { display: inline-block; font: 600 12px/16px var(--font-sans); padding: 1px var(--space-8); border-radius: var(--radius-pill);
  border: 1px solid currentColor; color: var(--c, var(--muted)); white-space: nowrap; }
.ds .label { font: 500 11.5px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ds .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: var(--space-18); display: flex; flex-direction: column; gap: var(--space-10); min-width: 0; }
.ds .card.flat { box-shadow: none; padding: var(--space-14); }
.ds .card-top { display: flex; align-items: flex-start; gap: var(--space-10); min-width: 0; }
.ds .card-top > :last-child.status { margin-left: auto; }
.ds .card h3 { font: 600 16px/22px var(--font-display); }
.ds .card .desc { color: var(--muted); font-size: 13px; line-height: 18px; margin-top: 2px; }
.ds .card .meta { color: var(--muted); font-size: 12px; display: flex; gap: var(--space-10); flex-wrap: wrap; }
.ds .card .actions { display: flex; gap: var(--space-8); flex-wrap: wrap; margin-top: auto; padding-top: var(--space-6); }
.ds .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-14); }
.ds .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-12); }
.ds .stat { display: flex; flex-direction: column; gap: 2px; padding: var(--space-14) var(--space-16); border: 1px solid var(--line);
  border-radius: var(--radius-md); background: var(--surface); min-width: 0; }
.ds .stat .lbl { font: 500 11.5px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ds .stat .val { font: 500 21px/26px var(--font-mono); font-variant-numeric: tabular-nums; }
.ds .stat .note { font-size: 12px; color: var(--muted); }
.ds .stat .val.pos { color: var(--ok); }
.ds .stat .val.neg { color: var(--bad); }
.ds .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
.ds .kpi { background: var(--surface-2); border-radius: var(--radius-md); padding: var(--space-8) var(--space-10); min-width: 0; }
.ds .kpi span { display: block; font-size: 12px; color: var(--muted); }
.ds .kpi b { font: 600 16px/22px var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds .total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-10) var(--space-24);
  padding: var(--space-14) var(--space-18); border-radius: 12px; background: var(--accent); color: var(--on-accent); }
.ds .total .lbl { font: 500 11.5px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }
.ds .total .big { font: 500 36px/40px var(--font-mono); font-variant-numeric: tabular-nums; }
.ds .hero-num { font: 700 48px/48px var(--font-display); letter-spacing: -.03em; color: var(--accent-text); }
.ds .seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 3px; }
.ds .seg button { min-height: 36px; padding: 0 var(--space-12); border: 0; border-radius: 9px; background: none; font: 600 13px/18px var(--font-sans);
  color: var(--muted); cursor: pointer; }
.ds .seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-thumb); }
.ds .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: var(--tabbar); border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
.ds .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted);
  text-decoration: none; font: 500 11px/14px var(--font-sans); }
.ds .tabbar a[aria-current="page"] { color: var(--accent-text); font-weight: 600; }
.ds .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ds .nav { display: flex; gap: var(--space-6); overflow-x: auto; scrollbar-width: none; }
.ds .nav a { flex: none; font: 600 13px/18px var(--font-sans); color: var(--muted); text-decoration: none; padding: 6px var(--space-12);
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); }
.ds .nav a:hover { color: var(--text); border-color: var(--line-strong); }
.ds .nav a[aria-current="true"] { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.ds .progress { height: 8px; border-radius: var(--radius-pill); background: var(--surface-2); overflow: hidden; }
.ds .progress > i { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--c, var(--accent)); }
.ds .progress.thin { height: 4px; }
.ds .progress.ok > i { background: var(--ok); }
.ds .progress.warn > i { background: var(--warn); }
.ds .progress.bad > i { background: var(--bad); }
.ds .field { display: grid; gap: 5px; min-width: 0; }
.ds .field > label { font: 500 13px/18px var(--font-sans); color: var(--muted); }
.ds .input { font: 15px/22px var(--font-sans); width: 100%; min-height: var(--control); padding: 10px var(--space-12); border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); min-width: 0; }
.ds .input.num { font-family: var(--font-mono); }
.ds .input:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.ds .field .hint { font-size: 12px; color: var(--muted); }
.ds .field .err { font-size: 12px; color: var(--bad); }
.ds .field.invalid .input { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
.ds .list { display: flex; flex-direction: column; gap: var(--space-8); }
.ds .item { display: grid; grid-template-columns: 4px 1fr auto; gap: var(--space-12); align-items: center; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: var(--space-10) var(--space-12) var(--space-10) 0;
  color: var(--text); font: inherit; cursor: pointer; }
.ds .item::before { content: ""; align-self: stretch; background: var(--c, var(--line)); border-radius: 0 4px 4px 0; }
.ds .item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds .item .s { font-size: 13px; color: var(--muted); }
.ds .item .r { text-align: right; font: 14px/20px var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds .item.done .t { text-decoration: line-through; color: var(--muted); }
.ds .msg { font-size: 13px; line-height: 18px; padding: var(--space-8) var(--space-10); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); }
.ds .msg.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.ds .msg.err { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.ds .banner { display: grid; gap: 4px; padding: var(--space-14) var(--space-16); border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ds .banner span { color: var(--muted); font-size: 14px; }
.ds .empty { text-align: center; color: var(--muted); padding: 22px var(--space-10); border: 1px dashed var(--line-strong); border-radius: 12px; }
.ds .empty strong { display: block; color: var(--text); font: 600 16px/22px var(--font-display); margin-bottom: 4px; }
.ds .toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); opacity: 0; background: var(--text); color: var(--bg);
  padding: var(--space-10) var(--space-16); border-radius: var(--radius-md); font-size: 14px; transition: .2s; pointer-events: none; z-index: 30;
  max-width: calc(100vw - 32px); }
.ds .toast.show { opacity: 1; transform: translate(-50%, 0); }
.ds .toast.static { position: static; transform: none; opacity: 1; display: inline-block; }
@media (prefers-reduced-motion: reduce) {
.ds .toast { transition: none; }
.ds .dot.pulse { animation: none; }
}
.ds .sheet { border: 0; border-radius: var(--radius-xl); padding: 0; width: min(520px, 100vw - 24px); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-dialog); }
.ds .sheet::backdrop { background: var(--scrim); }
.ds .sheet .sheet-head { display: flex; align-items: center; gap: var(--space-8); padding: var(--space-8) var(--space-8) var(--space-8) var(--space-18); border-bottom: 1px solid var(--line); }
.ds .sheet .sheet-head h3 { font: 600 16px/22px var(--font-display); flex: 1; }
.ds .sheet .sheet-body { padding: var(--space-18); display: flex; flex-direction: column; gap: var(--space-12); }
.ds .sheet .sheet-foot { display: flex; gap: var(--space-8); justify-content: flex-end; padding: 0 var(--space-18) var(--space-18); }
@media (max-width: 760px) {
.ds .sheet { margin: auto auto 0; width: 100vw; max-width: 100vw; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
}
.ds .tbl { overflow-x: auto; }
.ds .tbl table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ds .tbl th { text-align: left; font: 500 11.5px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  padding: 6px var(--space-8); border-bottom: 1px solid var(--line); }
.ds .tbl td { padding: var(--space-8); border-bottom: 1px solid var(--line); }
.ds .tbl tr:last-child td { border-bottom: 0; }
.ds .tbl .n { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds .sr-only { position: absolute; width: 1px; height: 1px; min-width: 0; max-width: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ds .ds-icon { flex: none; }
.ds .progress-row { display: grid; gap: 4px; }
.ds .progress-head { display: flex; justify-content: space-between; gap: var(--space-8); font-size: 13px; }
.ds .sheet.inline { position: static; display: block; margin: 0 auto; }
.ds .hint { font-size: 12px; color: var(--muted); margin: var(--space-6) 0 0; }
.ds .chart { position: relative; margin: 0; min-width: 0; --prev-bar: color-mix(in srgb, var(--muted) 45%, transparent); }
.ds .chart-title { font: 600 13px/18px var(--font-sans); color: var(--text); margin-bottom: var(--space-8); }
.ds .chart-legend { display: flex; flex-wrap: wrap; gap: var(--space-6) var(--space-14); font-size: 12px; color: var(--muted); margin: 0 0 var(--space-8); }
.ds .chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ds .chart-legend .key { display: inline-block; background: var(--c); }
.ds .chart-legend .key.rect { width: 10px; height: 10px; border-radius: 2px; }
.ds .chart-legend .key.line { width: 16px; height: 2px; border-radius: 1px; }
.ds .chart-legend .key.line.dashed { background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); }
.ds .chart-legend .key.pin-key { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.ds .chart-tip { position: absolute; pointer-events: none; z-index: 5; min-width: 96px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-raised);
  padding: var(--space-6) var(--space-10); font-size: 12px; white-space: nowrap; }
.ds .chart-tip .tip-title { color: var(--muted); margin-bottom: 2px; }
.ds .chart-tip .tip-row { display: flex; align-items: center; gap: 6px; }
.ds .chart-tip .tip-row b { font: 600 13px/18px var(--font-mono); font-variant-numeric: tabular-nums; }
.ds .chart-tip .tip-row span { color: var(--muted); }
.ds .chart-tip .tip-key { width: 12px; height: 2px; border-radius: 1px; flex: none; }
.ds .cc-body { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-8); margin-top: 16px; }
.ds .cc-y { position: relative; min-width: 28px; }
.ds .cc-y span { position: absolute; right: 0; transform: translateY(50%); font: 11px/1 var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds .cc-plot { position: relative; border-bottom: 1px solid var(--line-strong, var(--line)); }
.ds .cc-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line); pointer-events: none; }
.ds .cc-avg { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px dashed var(--muted); pointer-events: none; z-index: 1; }
.ds .cc-avg span { position: absolute; right: 0; bottom: 3px; font-size: 11px; color: var(--muted); background: var(--surface); padding: 0 4px; border-radius: 4px; }
.ds .cols { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 100%; touch-action: pan-y; cursor: crosshair; outline: none; }
.ds .cols:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-xs); }
.ds .cols .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; border-radius: var(--radius-xs) var(--radius-xs) 0 0; }
.ds .cols .col i { display: block; width: 100%; max-width: 40px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--c) 62%, transparent); }
.ds .cols .col.on i { background: var(--c); }
.ds .cols .col.zero i { background: var(--line); }
.ds .cols .col.act { background: color-mix(in srgb, var(--text) 7%, transparent); }
.ds .cols .col.act i { background: var(--c); filter: brightness(1.08); }
.ds .cols .cap { font: 500 11px/1 var(--font-mono); color: var(--text); margin-bottom: 4px; white-space: nowrap; }
.ds .col-labels { display: flex; gap: 2px; margin-top: 6px; }
.ds .col-labels span { flex: 1; min-width: 0; text-align: center; font-size: 11px; color: var(--muted); overflow: visible; white-space: nowrap; }
.ds .col-labels span.on { color: var(--text); font-weight: 600; }
.ds .col-labels span.act { color: var(--text); }
.ds .line-svg { display: block; max-width: 100%; overflow: visible; touch-action: pan-y; }
.ds .line-svg, .ds .spark { stroke: none; stroke-width: 1; fill: none; }
.ds .line-svg .grid { stroke: var(--line); stroke-width: 1; }
.ds .line-svg .axis { font: 11px var(--font-mono); fill: var(--muted); font-variant-numeric: tabular-nums; }
.ds .line-svg .crosshair { stroke: var(--muted); stroke-width: 1; }
.ds .line-svg .mark, .ds .spark .mark { stroke: var(--surface); stroke-width: 2; }
.ds .line-svg:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-xs); }
.ds .barlist { display: flex; flex-direction: column; gap: var(--space-8); }
.ds .bl-row { display: grid; grid-template-columns: minmax(96px, 168px) 1fr auto; gap: var(--space-10); align-items: center; font-size: 13px; }
.ds .bl-label { overflow-wrap: anywhere; }
.ds .bl-bars { position: relative; display: flex; flex-direction: column; gap: 2px; }
.ds .bl-bars i { display: block; height: 10px; border-radius: 0 4px 4px 0; background: var(--c); min-width: 2px; }
.ds .bl-bars i.prev { height: 4px; background: var(--prev-bar); }
.ds .bl-bars .limit { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--text); border-radius: 1px; }
.ds .bl-value { white-space: nowrap; text-align: right; font-size: 13px; }
.ds .bl-value small { color: var(--muted); font-size: 12px; }
.ds .bl-value small.over { color: var(--bad); }
@media (max-width: 560px) {
.ds .bl-row { grid-template-columns: 1fr auto; }
.ds .bl-bars { grid-column: 1 / -1; order: 3; }
}
.ds .spark { display: block; margin: 2px 0; }
.ds .rmap { position: relative; width: 100%; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-2); }
.ds .rmap-tiles { position: absolute; inset: 0; }
.ds .rmap-tiles img { position: absolute; display: block; max-width: none; }
.ds .rmap.dark .rmap-tiles { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.5); }
.ds .rmap svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ds .rmap-grid line { stroke: var(--line); stroke-width: 1; }
.ds .rmap .route-halo { fill: none; stroke: var(--bg); stroke-opacity: .7; stroke-width: 7; stroke-linejoin: round; stroke-linecap: round; }
.ds .rmap .route { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.ds .rmap .pin { stroke: var(--surface); stroke-width: 2; }
.ds .rmap .pin.start { fill: var(--ok); }
.ds .rmap .pin.end { fill: var(--bad); }
.ds .rmap-attr { position: absolute; right: 6px; bottom: 5px; font-size: 10px; padding: 1px 6px; border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--muted); text-decoration: none; }
.ds .crop-wrap { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: var(--radius-md);
  overflow: hidden; background: var(--surface-2); line-height: 0; }
.ds .crop-wrap img { display: block; width: 100%; height: auto; pointer-events: none; }
.ds .crop-rect { position: absolute; border: 2px solid var(--accent); box-shadow: 0 0 0 9999px rgb(0 0 0 / .5); cursor: move; }
.ds .crop-rect:focus-visible { outline: 2px solid var(--surface); outline-offset: 2px; }
.ds .crop-rect i { position: absolute; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; }
.ds .crop-rect i[data-h="nw"] { left: -15px; top: -15px; cursor: nwse-resize; }
.ds .crop-rect i[data-h="ne"] { right: -15px; top: -15px; cursor: nesw-resize; }
.ds .crop-rect i[data-h="sw"] { left: -15px; bottom: -15px; cursor: nesw-resize; }
.ds .crop-rect i[data-h="se"] { right: -15px; bottom: -15px; cursor: nwse-resize; }
@keyframes ds-grow-y { from { transform: scaleY(0); } }
@keyframes ds-grow-x { from { transform: scaleX(0); } }
@keyframes ds-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ds-fade { from { opacity: 0; } }
.ds .cols .col i { transform-origin: 50% 100%; animation: ds-grow-y .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 30ms); }
.ds .bl-bars i { transform-origin: 0 50%; animation: ds-grow-x .6s cubic-bezier(.2, .7, .2, 1) both; }
.ds .line-svg .ds-draw, .ds .spark .ds-draw { stroke-dasharray: 1; animation: ds-draw .9s cubic-bezier(.3, .6, .2, 1) both; }
.ds .line-svg .mark.end, .ds .spark .mark.end { animation: ds-fade .3s .7s both; }
@media (prefers-reduced-motion: reduce) {
.ds .cols .col i, .ds .bl-bars i, .ds .line-svg .ds-draw, .ds .spark .ds-draw, .ds .line-svg .mark.end, .ds .spark .mark.end { animation: none; }
}
