/* Vzhled podle docs/navrhy/navrh-portalu.html. Výchozí barevná varianta je Šalvěj. */
:root {
  --bg: #eff1ed; --surface: #fafbf8; --sunk: #e4e8e1; --fg: #242a25; --muted: #626c64; --line: #d6dcd3;
  --accent: #557061; --accent-soft: #e0e9e3;
  --bot: #8f6b47; --bot-soft: #f0e8dd;
  --ok: #627f45; --ok-soft: #e5ecdb; --crit: #9c5a50; --crit-soft: #f1e2de;
  /* barvy oblastí */
  --a1: var(--accent); --a2: #9a7550; --a3: #9c5a50; --a4: #5c7488; --a5: #75627f; --a6: #627f45;
  --f-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --r: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141814; --surface: #1b201b; --sunk: #212721; --fg: #dfe4dd; --muted: #929c92; --line: #2c332c;
    --accent: #93b19f; --accent-soft: #22302a; --bot: #cba982; --bot-soft: #2f2a21;
    --ok: #a3c083; --ok-soft: #232c1b; --crit: #d1918a; --crit-soft: #33221f;
    --a1: var(--accent); --a2: #cba982; --a3: #d1918a; --a4: #9db4c8; --a5: #b8a6c4; --a6: #a3c083;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #141814; --surface: #1b201b; --sunk: #212721; --fg: #dfe4dd; --muted: #929c92; --line: #2c332c;
    --accent: #93b19f; --accent-soft: #22302a; --bot: #cba982; --bot-soft: #2f2a21;
    --ok: #a3c083; --ok-soft: #232c1b; --crit: #d1918a; --crit-soft: #33221f;
    --a1: var(--accent); --a2: #cba982; --a3: #d1918a; --a4: #9db4c8; --a5: #b8a6c4; --a6: #a3c083;
    color-scheme: dark;
}
/* barevné varianty: platí na stránce i na náhledech v Nastavení */
[data-palette="salvej"] { --bg: #eff1ed; --surface: #fafbf8; --sunk: #e4e8e1; --fg: #242a25; --muted: #626c64; --line: #d6dcd3; --accent: #557061; --accent-soft: #e0e9e3; --bot: #8f6b47; --bot-soft: #f0e8dd; --ok: #627f45; --ok-soft: #e5ecdb; --crit: #9c5a50; --crit-soft: #f1e2de; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-palette="salvej"], :root:not([data-theme="light"]) [data-palette="salvej"] { --bg: #141814; --surface: #1b201b; --sunk: #212721; --fg: #dfe4dd; --muted: #929c92; --line: #2c332c; --accent: #93b19f; --accent-soft: #22302a; --bot: #cba982; --bot-soft: #2f2a21; --ok: #a3c083; --ok-soft: #232c1b; --crit: #d1918a; --crit-soft: #33221f; color-scheme: dark; } }
:root[data-theme="dark"][data-palette="salvej"], :root[data-theme="dark"] [data-palette="salvej"] { --bg: #141814; --surface: #1b201b; --sunk: #212721; --fg: #dfe4dd; --muted: #929c92; --line: #2c332c; --accent: #93b19f; --accent-soft: #22302a; --bot: #cba982; --bot-soft: #2f2a21; --ok: #a3c083; --ok-soft: #232c1b; --crit: #d1918a; --crit-soft: #33221f; color-scheme: dark; }
[data-palette="bridlice"] { --bg: #eef1f4; --surface: #fafbfc; --sunk: #e4e8ed; --fg: #222a33; --muted: #5f6a77; --line: #d5dbe2; --accent: #4c6584; --accent-soft: #e1e7ef; --bot: #8a6843; --bot-soft: #f1e8dc; --ok: #4e7763; --ok-soft: #e0ebe4; --crit: #a0544c; --crit-soft: #f2e2df; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-palette="bridlice"], :root:not([data-theme="light"]) [data-palette="bridlice"] { --bg: #13171c; --surface: #1a1f26; --sunk: #20262e; --fg: #dde2e8; --muted: #8e98a4; --line: #2b323b; --accent: #8fa6c4; --accent-soft: #232d3a; --bot: #c9a47a; --bot-soft: #2f2820; --ok: #86b19a; --ok-soft: #1c2a23; --crit: #d38b82; --crit-soft: #33211f; color-scheme: dark; } }
:root[data-theme="dark"][data-palette="bridlice"], :root[data-theme="dark"] [data-palette="bridlice"] { --bg: #13171c; --surface: #1a1f26; --sunk: #20262e; --fg: #dde2e8; --muted: #8e98a4; --line: #2b323b; --accent: #8fa6c4; --accent-soft: #232d3a; --bot: #c9a47a; --bot-soft: #2f2820; --ok: #86b19a; --ok-soft: #1c2a23; --crit: #d38b82; --crit-soft: #33211f; color-scheme: dark; }
[data-palette="len"] { --bg: #f2f0ec; --surface: #fbfaf8; --sunk: #e9e5df; --fg: #2a2724; --muted: #6b665f; --line: #ddd8d1; --accent: #5c6188; --accent-soft: #e5e5ef; --bot: #8f6841; --bot-soft: #f1e7da; --ok: #5b7a5f; --ok-soft: #e2ebe2; --crit: #a2554b; --crit-soft: #f3e1dd; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-palette="len"], :root:not([data-theme="light"]) [data-palette="len"] { --bg: #181715; --surface: #201e1b; --sunk: #272522; --fg: #e6e2dc; --muted: #9d978f; --line: #34312c; --accent: #a5a9cf; --accent-soft: #2a2b3b; --bot: #cfa57c; --bot-soft: #31291f; --ok: #95b598; --ok-soft: #1f2a20; --crit: #d68f85; --crit-soft: #36221f; color-scheme: dark; } }
:root[data-theme="dark"][data-palette="len"], :root[data-theme="dark"] [data-palette="len"] { --bg: #181715; --surface: #201e1b; --sunk: #272522; --fg: #e6e2dc; --muted: #9d978f; --line: #34312c; --accent: #a5a9cf; --accent-soft: #2a2b3b; --bot: #cfa57c; --bot-soft: #31291f; --ok: #95b598; --ok-soft: #1f2a20; --crit: #d68f85; --crit-soft: #36221f; color-scheme: dark; }
[data-palette="mlha"] { --bg: #f1f1f2; --surface: #fbfbfc; --sunk: #e7e7ea; --fg: #26262b; --muted: #686872; --line: #dadade; --accent: #6c5a78; --accent-soft: #ebe5ef; --bot: #876b4a; --bot-soft: #f0e9df; --ok: #557568; --ok-soft: #e0eae6; --crit: #9d5555; --crit-soft: #f2e2e2; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-palette="mlha"], :root:not([data-theme="light"]) [data-palette="mlha"] { --bg: #151517; --surface: #1c1c1f; --sunk: #232327; --fg: #e2e2e6; --muted: #96969f; --line: #2f2f34; --accent: #b8a3c6; --accent-soft: #2e2836; --bot: #c8a882; --bot-soft: #2f2a22; --ok: #8fb3a4; --ok-soft: #1d2a25; --crit: #d29494; --crit-soft: #352222; color-scheme: dark; } }
:root[data-theme="dark"][data-palette="mlha"], :root[data-theme="dark"] [data-palette="mlha"] { --bg: #151517; --surface: #1c1c1f; --sunk: #232327; --fg: #e2e2e6; --muted: #96969f; --line: #2f2f34; --accent: #b8a3c6; --accent-soft: #2e2836; --bot: #c8a882; --bot-soft: #2f2a22; --ok: #8fb3a4; --ok-soft: #1d2a25; --crit: #d29494; --crit-soft: #352222; color-scheme: dark; }
[data-palette="puvodni"] { --bg: #f2f4f7; --surface: #ffffff; --sunk: #e8ecf1; --fg: #17212c; --muted: #5b6979; --line: #d7dde4; --accent: #2c56c9; --accent-soft: #e2e9fb; --bot: #a85a0c; --bot-soft: #fbeedb; --ok: #1d7f55; --ok-soft: #dcf1e6; --crit: #bb3a33; --crit-soft: #f8e1df; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-palette="puvodni"], :root:not([data-theme="light"]) [data-palette="puvodni"] { --bg: #0e1319; --surface: #151c25; --sunk: #1c2530; --fg: #e3e8ee; --muted: #92a0b0; --line: #28333f; --accent: #7f9ff0; --accent-soft: #1d2a45; --bot: #e8a660; --bot-soft: #36271a; --ok: #4fbf8b; --ok-soft: #142e25; --crit: #ee7b72; --crit-soft: #3a1d1b; color-scheme: dark; } }
:root[data-theme="dark"][data-palette="puvodni"], :root[data-theme="dark"] [data-palette="puvodni"] { --bg: #0e1319; --surface: #151c25; --sunk: #1c2530; --fg: #e3e8ee; --muted: #92a0b0; --line: #28333f; --accent: #7f9ff0; --accent-soft: #1d2a45; --bot: #e8a660; --bot-soft: #36271a; --ok: #4fbf8b; --ok-soft: #142e25; --crit: #ee7b72; --crit-soft: #3a1d1b; color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 var(--f-body); }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--f-display); text-wrap: balance; line-height: 1.15; font-weight: 700; }
h2 { font-size: 22px; }
h3 { font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
form { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--f-mono); font-size: 12.5px; }
.eyebrow { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* rám aplikace */
.app { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--sunk); padding: 18px 10px; display: flex; flex-direction: column; gap: 18px; font-size: 13.5px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { font-family: var(--f-display); font-weight: 700; font-size: 16px; padding: 0 8px; color: var(--fg); display: flex; align-items: center; gap: 8px; }
.login h2 { display: flex; align-items: center; gap: 10px; }
.side .grp { display: grid; gap: 1px; }
.side .grp .eyebrow { padding: 0 8px 4px; font-size: 10.5px; }
.side .it { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; border-radius: 6px; color: var(--fg); }
.side a.it:hover { background: var(--bg); }
.side .it.on { background: var(--surface); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.side .n { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.side .foot { margin-top: auto; display: grid; gap: 1px; }
.side .foot button { border: 0; background: none; text-align: left; width: 100%; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 7px; flex: none; }
.main { padding: 26px 32px 56px; display: grid; gap: 18px; align-content: start; min-width: 0; max-width: 1180px; width: 100%; margin: 0 auto; }
.mhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }

/* prvky */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.chip.acc { background: var(--accent-soft); color: var(--accent); }
.chip.bot { background: var(--bot-soft); color: var(--bot); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.crit { background: var(--crit-soft); color: var(--crit); }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 6px 12px; font-size: 13px; font-weight: 500; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; color: var(--fg); }
.btn:hover { border-color: var(--muted); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.linkbtn { border: 0; background: none; padding: 0; font-size: 12.5px; color: var(--muted); }
.linkbtn:hover { color: var(--fg); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 10px; align-content: start; }
.row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.col { display: grid; gap: 16px; align-content: start; min-width: 0; }
.empty { color: var(--muted); font-size: 13.5px; }
.field { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; width: 100%; min-height: 36px; font-size: 14px; }
textarea.field { resize: vertical; }
.inline { display: flex; gap: 6px; flex-wrap: wrap; }
.inline .field { flex: 1 1 200px; width: auto; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px; }

/* úkoly */
.task { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: start; font-size: 13.5px; padding: 7px 0; border-top: 1px solid var(--line); }
.panel h3 + .task, .task.first { border-top: 0; }
.task .src { font-size: 12px; color: var(--muted); }
.task form.tickf { line-height: 0; }
.cb { width: 16px; height: 16px; margin-top: 2px; border: 1.5px solid var(--muted); border-radius: 4px; background: none; padding: 0; display: block; }
.cb:hover { border-color: var(--ok); background: var(--ok-soft); }
.cb.on { background: var(--ok); border-color: var(--ok); }
.task .ends { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.task s { color: var(--muted); }
.main-task { font-weight: 600; }
.routine { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
details > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }

/* Fokus */
.areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.area { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: grid; gap: 8px; align-content: start; font-size: 13px; }
.area b { font-size: 14px; display: flex; align-items: center; }
.area p { color: var(--muted); }
.area.quiet { background: var(--sunk); border-style: dashed; }
.days { display: grid; grid-template-columns: repeat(30, 1fr); gap: 1px; }
.days i { height: 14px; border-radius: 2px; background: var(--sunk); }
.area.quiet .days i { background: var(--line); }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; }
.cal { display: grid; gap: 4px; font-size: 13px; }
.cal .ev { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 7px 10px; border-radius: 6px; background: var(--sunk); }
.cal .ev.acc { background: var(--accent-soft); }
.cal .ev .mono { color: var(--muted); }

/* ranní review */
.focus-today { border: 1px dashed var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 8px; }
.focus-today ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.tri-list { display: grid; gap: 10px; }
.tri { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px 12px; background: var(--surface); transition: opacity .2s; }
.tri .num { font-family: var(--f-mono); font-size: 13px; color: var(--muted); padding-top: 2px; }
.tri .body { display: grid; gap: 8px; min-width: 0; }
.meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); }
.tri .sum { font-weight: 500; }
.tri .prop { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; background: var(--bot-soft); border-radius: 6px; padding: 8px 10px; }
.tri .prop b { color: var(--bot); font-weight: 600; white-space: nowrap; }
.tri .mem { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; }
.tri.decided { opacity: .62; }
.tri:hover, .tri:focus-within { opacity: 1; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; }
.acts button { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 3px 11px; font-size: 12.5px; min-height: 28px; }
.acts button[aria-pressed="true"] { background: var(--fg); color: var(--surface); border-color: var(--fg); }
.batchbar { position: sticky; bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--fg); color: var(--surface); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; }
.batchbar .btn { background: var(--surface); color: var(--fg); border: 0; }
.result { border: 1px solid var(--ok); background: var(--ok-soft); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 6px; font-size: 13.5px; }
.result ul { margin: 0; padding-left: 18px; }

/* deník a aktivita */
.mem-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; }
.ask { display: flex; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; align-items: center; background: var(--surface); }
.ask input { flex: 1; min-width: 0; border: 0; background: none; outline: none; min-height: 28px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters a { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 3px 11px; font-size: 12.5px; color: var(--fg); }
.filters a.on { background: var(--fg); color: var(--surface); border-color: var(--fg); }
.log { display: grid; }
.entry { display: grid; grid-template-columns: 78px 14px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; }
.entry .when { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); text-align: right; padding-top: 2px; }
.entry .rail { position: relative; display: flex; justify-content: center; }
.entry .rail::before { content: ""; position: absolute; top: 14px; bottom: -16px; width: 1px; background: var(--line); }
.entry:last-child .rail::before { display: none; }
.entry .pin { width: 11px; height: 11px; border-radius: 50%; margin-top: 4px; position: relative; background: var(--muted); }
.entry .what { display: grid; gap: 5px; min-width: 0; }
.entry .t { font-weight: 500; font-size: 14px; }
.entry .d { font-size: 13px; color: var(--muted); }
.pin.decision { background: var(--accent); } .pin.reply { background: var(--ok); } .pin.insight, .pin.agent { background: var(--bot); } .pin.preference { background: var(--crit); }

.secret { font-family: var(--f-mono); font-size: 12.5px; background: var(--sunk); padding: 8px 10px; border-radius: 6px; overflow-wrap: anywhere; }
.alert { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--crit); color: var(--surface); padding: 8px 16px; border-radius: 8px; font-size: 14px; z-index: 20; max-width: calc(100vw - 32px); }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login form { width: 100%; max-width: 340px; display: grid; gap: 12px; }

.tabbar { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 18px 16px 104px; }
  .today-grid, .mem-grid { grid-template-columns: 1fr; }
  .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn, .acts button { min-height: 44px; }
  .batchbar { bottom: 76px; }
  .entry { grid-template-columns: 54px 12px minmax(0, 1fr); gap: 8px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; background: var(--surface); border-top: 1px solid var(--line); padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); font-size: 11.5px; text-align: center; }
  .tabbar a { display: flex; align-items: center; justify-content: center; min-height: 44px; color: var(--fg); }
  .tabbar a.on { font-weight: 600; color: var(--accent); }
  .tabbar a.add { justify-self: center; width: 48px; height: 48px; border-radius: 50%; background: var(--fg); color: var(--surface); font-size: 24px; line-height: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* výběr barevnosti */
.pal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pal-grid form { display: grid; }
.pal { background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: grid; gap: 8px; text-align: left; align-content: start; }
.pal[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
.pal b { font-family: var(--f-display); font-size: 15px; }
.pal small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.sw { display: grid; grid-template-columns: repeat(5, 1fr); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.sw i { height: 20px; }

/* projekty */
.proj-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.proj { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 8px; color: var(--fg); align-content: start; }
.proj:hover { border-color: var(--muted); }
.proj b { font-family: var(--f-display); font-size: 17px; display: flex; align-items: center; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 2px; align-content: start; }
.kpi .v { font-family: var(--f-display); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--muted); }
.bar { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.gantt-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.gantt { min-width: 640px; font-size: 12.5px; }
.gantt .r { display: grid; grid-template-columns: 170px minmax(0, 1fr); border-top: 1px solid var(--line); }
.gantt .r:first-child { border-top: 0; }
.gantt .lab { padding: 9px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.gantt .lane { position: relative; min-height: 36px; }
.gantt .weeks { display: flex; }
.gantt .weeks span { flex: 1 1 0; padding: 6px 4px; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.gantt .seg { position: absolute; top: 10px; height: 16px; border-radius: 4px; background: var(--accent); opacity: .85; min-width: 6px; }
.gantt .seg.done { background: var(--ok); }
.gantt .seg.moved { background: var(--bot); }
.gantt .ms { position: absolute; top: 12px; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg); background: var(--accent); }
.gantt .ms.done { background: var(--ok); }
.gantt .ms.moved { background: var(--bot); }
.gantt .ghost { position: absolute; top: 12px; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg); border: 1.5px dashed var(--bot); }
.gantt .today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--crit); opacity: .6; }
.file { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; padding: 6px 0; border-top: 1px solid var(--line); }
.ficon { width: 34px; height: 40px; border-radius: 4px; background: var(--sunk); display: grid; place-items: center; font: 600 9.5px var(--f-mono); color: var(--muted); }
.file .src { font-size: 12px; color: var(--muted); }
.morelist { display: grid; gap: 4px; }
.morelist a, .morelist button { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--fg); width: 100%; font-size: 14px; }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, 1fr); } }

/* znalosti */
.note-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; }
.prose { font-size: 15px; max-width: 70ch; line-height: 1.6; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3 { font-family: var(--f-display); margin: 1em 0 .4em; display: block; }
.prose h1 { font-size: 24px; } .prose h2 { font-size: 20px; } .prose h3 { font-size: 16px; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table, .prose pre { margin: 0 0 .8em; }
.prose blockquote { border-left: 3px solid var(--bot); background: var(--bot-soft); padding: 8px 12px; border-radius: 0 6px 6px 0; }
.prose code { font-family: var(--f-mono); font-size: 13px; background: var(--sunk); padding: 1px 4px; border-radius: 3px; }
.prose pre { background: var(--sunk); padding: 10px; border-radius: 6px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose td, .prose th { border: 1px solid var(--line); padding: 4px 8px; }
.wl { background: var(--accent-soft); border-radius: 3px; padding: 0 3px; }
.wl.person { background: var(--bot-soft); color: var(--bot); }
.wl.project { background: var(--ok-soft); color: var(--ok); }
.wl.missing { background: none; color: var(--crit); border-bottom: 1px dashed var(--crit); border-radius: 0; padding: 0; }
.editor { font-family: var(--f-mono); font-size: 13.5px; line-height: 1.6; min-height: 420px; }
.listline { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--fg); }
.listline small { color: var(--muted); font-size: 12px; }
.stars { color: var(--bot); letter-spacing: 1px; font-size: 12px; }

/* graf */
.graph { width: 100%; height: auto; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.gl { stroke: var(--line); stroke-width: 1.3; }
.gn circle { stroke: var(--surface); stroke-width: 2; }
.gn.t-person circle { fill: var(--accent); } .gn.t-org circle { fill: var(--bot); } .gn.t-project circle { fill: var(--ok); } .gn.t-note circle { fill: var(--muted); }
.gn text { fill: var(--fg); font: 11px var(--f-body); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.gn.focus circle { stroke: var(--fg); stroke-width: 2.5; }
.graph.hl .gn:not(.nb) { opacity: .15; } .graph.hl .gl:not(.nb) { opacity: .08; } .graph.hl .gl.nb { stroke: var(--fg); }
.legend { display: flex; gap: 6px; flex-wrap: wrap; }
.legend button { display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 3px 11px; font-size: 12.5px; }
.legend button[aria-pressed="false"] { opacity: .45; }
@media (max-width: 860px) { .note-grid { grid-template-columns: 1fr; } }

/* rytmus */
.week { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--bot-soft); border-radius: 8px; padding: 10px 14px; font-size: 13.5px; color: var(--fg); }
.week b { color: var(--bot); }

/* zdraví */
.adh { display: flex; gap: 3px; align-items: center; }
.adh form { line-height: 0; }
.adh button { width: 22px; height: 22px; border-radius: 4px; background: var(--sunk); border: 1px solid var(--line); padding: 0; }
.adh button.y { background: var(--ok); border-color: var(--ok); }
.adh button:disabled { opacity: .4; cursor: default; }
.meals-wrap { overflow-x: auto; }
.meals { min-width: 620px; display: grid; grid-template-columns: 60px repeat(7, minmax(0, 1fr)); gap: 4px; font-size: 12px; }
.meals .h { font-size: 11px; color: var(--muted); font-weight: 600; padding: 2px 4px; }
.meals .c { background: var(--sunk); border-radius: 5px; padding: 6px 7px; line-height: 1.35; min-height: 46px; display: grid; align-content: space-between; gap: 2px; }
.meals .c.bot { background: var(--bot-soft); }
.meals .c.out { background: none; border: 1px dashed var(--line); }
.meals .c form { line-height: 1; }
.plants { display: flex; flex-wrap: wrap; gap: 4px; }
.plants span { font-size: 11.5px; padding: 1px 7px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); }
.disclaimer { font-size: 12.5px; color: var(--muted); }

/* finance */
.mx-wrap { overflow-x: auto; }
table.mx { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 13.5px; }
.mx th, .mx td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; font-weight: 400; }
.mx thead th { font-size: 12px; color: var(--muted); font-weight: 600; }
.mx input { width: 72px; text-align: right; font-size: 13px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); font-variant-numeric: tabular-nums; }
.mx input.money { width: 110px; }
.mx .kc { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); text-align: right; }
.mx tr.invest th, .mx tr.invest td { background: var(--ok-soft); }
.mx tfoot th, .mx tfoot td { font-weight: 600; border-bottom: 0; }
.bad { color: var(--crit); }
.fi { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 12px; border-radius: 6px; background: var(--sunk); align-items: baseline; }
.fi b { font-family: var(--f-display); font-size: 22px; font-variant-numeric: tabular-nums; }
.fi small { color: var(--muted); font-size: 12px; grid-column: 1 / -1; }
.opt { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; padding: 5px 8px; border-radius: 5px; background: var(--sunk); font-size: 13px; }

/* režim zobrazení */
.theme { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 2px; background: var(--bg); border-radius: 6px; }
.side .theme button { border: 0; background: none; text-align: center; color: var(--muted); padding: 4px 2px; border-radius: 4px; font-size: 12px; min-height: 26px; }
.side .theme button[aria-pressed="true"] { background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.morelist .theme { margin: 0 0 4px; }
.morelist .theme button { justify-content: center; min-height: 40px; border: 0; background: none; color: var(--muted); }
.morelist .theme button[aria-pressed="true"] { background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
