/* Dílna F2 — timeline, kalendář, tabulka, čas, wiki, aktivita, uživatelé, vlastní pole. Barvy jen přes tokeny. */

/* ---------- společné ---------- */
.chk { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; cursor: pointer; flex: none; }
.chk input { width: 17px; height: 17px; accent-color: var(--primary); margin: 0; cursor: pointer; }
.chk span { display: none; }
.chk-sp { width: 28px; flex: none; }
@media (pointer: coarse) { .chk { width: 44px; height: 44px; margin: -8px; } .chk input { width: 22px; height: 22px; } .chk-sp { width: 36px; } }
.bulkbar {
  position: sticky; bottom: 14px; z-index: 20; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--primary); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
}
.bulkbar .bk-n { margin-right: 6px; }
@media (max-width: 768px) { .bulkbar { position: fixed; left: 10px; right: 10px; bottom: calc(var(--bottomnav-h) + 10px + env(safe-area-inset-bottom)); max-height: 40vh; overflow: auto; } }

/* ---------- timeline ---------- */
.vtl { min-width: 0; }
.tl-hint { margin: -6px 0 8px; }
.tl {
  --lw: 240px; position: relative; overflow: auto; max-height: calc(100vh - 330px); min-height: 260px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg); overscroll-behavior: contain;
}
.tl-in { position: relative; min-width: 100%; }
.tl-head { position: sticky; top: 0; z-index: 6; display: flex; background: var(--surface); border-bottom: 1px solid var(--border-strong); }
.tl-label { position: sticky; left: 0; z-index: 4; width: var(--lw); flex: none; background: var(--surface); border-right: 1px solid var(--border); display: flex; align-items: center; gap: 6px; padding: 0 10px; min-width: 0; }
.tl-corner { z-index: 7; color: var(--muted); font-size: 12px; background: var(--surface); }
.tl-hcols { position: relative; height: 56px; flex: none; }
.tl-months { display: flex; height: 26px; border-bottom: 1px solid var(--border); }
.tl-m { flex: none; padding: 4px 8px; font-weight: 650; font-size: 12.5px; border-right: 1px solid var(--border); white-space: nowrap; overflow: hidden; position: relative; text-transform: capitalize; }
.tl-sub { position: relative; height: 30px; }
.tl-d { position: absolute; top: 0; height: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; line-height: 1.1; border-right: 1px solid var(--border); color: var(--text-2); }
.tl-d small { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.tl-d.we { color: var(--muted); background: var(--surface-2); }
.tl-d.td { color: var(--danger); font-weight: 700; }
.tl-d.wk { align-items: flex-start; padding-left: 4px; font-size: 11px; color: var(--muted); border-right: 0; border-left: 1px solid var(--border); width: auto; }
.tl-row { display: flex; height: 38px; border-bottom: 1px solid var(--border); }
.tl-row:hover .tl-label, .tl-row:hover .tl-track { background-color: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
.tl-lh { height: 32px; background: var(--surface-2); }
.tl-lh .tl-label { background: var(--surface-2); font-size: 13px; }
.tl-lh .tl-track { background-image: none; }
.tl-lh .cnt { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tl-name { display: flex; align-items: center; gap: 6px; min-width: 0; width: 100%; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-size: 13px; color: var(--text); min-height: 36px; }
.tl-name:hover { color: var(--primary); }
.tl-name svg { width: 15px; height: 15px; flex: none; }
.tl-track {
  position: relative; flex: none; height: 100%;
  background-image: linear-gradient(90deg, transparent 0, transparent calc(var(--W) * 5), var(--surface-2) calc(var(--W) * 5), var(--surface-2) calc(var(--W) * 7));
  background-size: calc(var(--W) * 7) 100%;
}
.tl-track.unsched { cursor: copy; }
.tl-track.unsched::after { content: "bez termínu — kliknutím určíte den"; position: sticky; left: calc(var(--lw) + 10px); line-height: 38px; font-size: 11.5px; color: var(--muted); padding-left: 10px; }
.tl-bar {
  position: absolute; top: 6px; height: 26px; border-radius: 8px; background: var(--pc); color: #fff; display: flex; align-items: center; gap: 6px; padding: 0 9px;
  font-size: 12.5px; font-weight: 550; cursor: grab; box-shadow: var(--shadow-sm); user-select: none; touch-action: pan-x pan-y; min-width: 8px;
}
.tl-bar .bn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; pointer-events: none; }
.tl-bar.prog { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .16) 0 8px, transparent 8px 16px); }
.tl-bar.done { background: color-mix(in srgb, var(--success) 70%, var(--surface)); opacity: .85; }
.tl-bar.over { background: var(--danger); }
.tl-bar.narrow .bn { position: absolute; left: calc(100% + 6px); color: var(--text); font-weight: 500; flex: none; max-width: 260px; overflow: visible; }
.tl-bar.narrow { padding: 0; }
.tl-bar .bav { display: none; }
.tl-bar .bav .av { box-shadow: 0 0 0 1.5px #fff; width: 20px; height: 20px; font-size: 10px; }
.tl-bar:not(.narrow) .bav { display: inline-flex; }
.tl-bar:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.tl-bar.dragging { cursor: grabbing; box-shadow: var(--shadow); z-index: 5; }
.tl-bar.dragging::before { content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 0; background: var(--text); color: var(--bg); font-size: 11.5px; padding: 2px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
.tl-bar .h-l, .tl-bar .h-r { position: absolute; top: 0; bottom: 0; width: 9px; cursor: ew-resize; touch-action: none; }
.tl-bar .h-l { left: 0; } .tl-bar .h-r { right: 0; }
.tl-bar .h-l::after, .tl-bar .h-r::after { content: ""; position: absolute; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: rgba(255, 255, 255, .55); opacity: 0; transition: opacity var(--t-fast); }
.tl-bar .h-l::after { left: 3px; } .tl-bar .h-r::after { right: 3px; }
.tl-bar:hover .h-l::after, .tl-bar:hover .h-r::after, .tl-bar:focus .h-l::after, .tl-bar:focus .h-r::after { opacity: 1; }
@media (pointer: coarse) { .tl-bar .h-l, .tl-bar .h-r { width: 16px; } .tl-bar .h-l::after, .tl-bar .h-r::after { opacity: 1; } }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.tl-today span { position: sticky; top: 0; display: inline-block; transform: translateX(-50%); margin-top: 0; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 0 0 6px 6px; }
@media (max-width: 768px) { .tl { --lw: 118px; max-height: calc(100vh - 360px); } .tl-label { padding: 0 6px; } .tl-name { font-size: 12px; } }

/* ---------- kalendář ---------- */
.vcal { min-width: 0; }
.pcal-nav { display: flex; align-items: center; gap: 4px; }
.pcal-title { font-size: 18px; min-width: 150px; }
.pcal-grid.month { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.pcal-dow, .pcal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.pcal-dow div { padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.pcal-cell { min-height: 112px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 4px 4px 6px; min-width: 0; position: relative; }
.pcal-week .pcal-cell:last-child { border-right: 0; }
.pcal-week:last-child .pcal-cell { border-bottom: 0; }
.pcal-cell.we { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
.pcal-cell.out { opacity: .55; }
.pcal-cell.today { background: var(--primary-soft); }
.cc-h { display: flex; align-items: center; justify-content: space-between; min-height: 24px; }
.cc-num { font-size: 12.5px; font-weight: 600; padding: 1px 6px; border-radius: 99px; }
.pcal-cell.today .cc-num, .pcal-col.today .cc-dow + b { background: var(--primary); color: var(--primary-text); }
.cc-add { opacity: 0; width: 24px; height: 24px; }
.pcal-cell:hover .cc-add, .pcal-col:hover .cc-add, .cc-add:focus-visible { opacity: 1; }
.cc-list { display: flex; flex-direction: column; gap: 3px; min-height: 18px; }
.pcal-chip {
  display: flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--pc) 16%, var(--surface)); border-left: 3px solid var(--pc);
  font-size: 12px; cursor: grab; min-height: 22px; min-width: 0;
}
.pcal-chip:hover { background: color-mix(in srgb, var(--pc) 28%, var(--surface)); }
.pcal-chip.done { opacity: .6; text-decoration: line-through; }
.pcal-chip.over { border-left-color: var(--danger); background: var(--danger-soft); }
.pcal-chip.cont { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -4px; padding-left: 8px; }
.pcal-chip.more { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: -4px; }
.pcal-chip .cc-name { flex: 1; min-width: 0; }
.pcal-chip .av { --s: 20px; font-size: 10px; flex: none; }
.cc-more { font-size: 11.5px; color: var(--muted); background: none; border: 0; padding: 2px 6px; text-align: left; cursor: pointer; }
.cc-more:hover { color: var(--primary); }
.cc-dots { display: flex; gap: 3px; align-items: center; margin-top: 4px; }
.cc-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.cc-dots i.d { background: var(--success); opacity: .6; } .cc-dots i.o { background: var(--danger); }
.pcal-grid.weekv { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.pcal-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 8px; min-height: 280px; min-width: 0; }
.pcal-col.we { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.pcal-col.today { border-color: var(--primary); }
.pcal-col header { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 12.5px; }
.pcal-col header b { padding: 1px 7px; border-radius: 99px; }
.cc-dow { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 11px; }
.pcal-col .cc-add { margin-left: auto; }
.pcal-col .pcal-chip { padding: 5px 7px; font-size: 12.5px; }
.pcal-unsched { margin-top: 14px; padding: 10px 14px; }
.pcal-unsched summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; list-style: none; }
.pcal-unsched summary .tiny { margin-left: auto; font-weight: 400; }
.pcal-unsched .cc-list { flex-direction: row; flex-wrap: wrap; margin-top: 10px; }
.pcal-unsched .pcal-chip { max-width: 260px; }
.pcal-agenda { margin-top: 12px; padding: 4px 0; }
.ag-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.ag-item { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 14px; border-bottom: 1px solid var(--border); min-height: 48px; }
.ag-item:last-child { border-bottom: 0; }
.ag-item.done .ag-main span { text-decoration: line-through; opacity: .6; }
.ag-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: none; border: 0; text-align: left; padding: 8px 0; cursor: pointer; }
.ag-none { padding: 16px 14px; }
@media (max-width: 1100px) { .pcal-grid.weekv { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 768px) {
  .pcal-title { min-width: 0; flex: 1; font-size: 16px; }
  .pcal-cell { min-height: 54px; padding: 3px; cursor: pointer; }
  .pcal-cell.sel { box-shadow: inset 0 0 0 2px var(--primary); }
  .cc-num { font-size: 12px; }
  .pcal-grid.weekv { grid-template-columns: 1fr; }
  .pcal-col { min-height: 0; }
  .pcal-dow div { padding: 5px 2px; text-align: center; font-size: 11px; }
}

/* ---------- tabulka ---------- */
.ttable-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); max-height: calc(100vh - 340px); min-height: 160px; }
.ttable { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.ttable th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border-strong); padding: 0; white-space: nowrap; }
.th-b { background: none; border: 0; padding: 9px 10px; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; }
.th-b:hover, .th-b.on { color: var(--text); }
.th-b svg { width: 13px; height: 13px; }
.ttable td { padding: 4px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; height: 42px; }
.ttable tr:last-child td { border-bottom: 0; }
.ttable tbody tr:hover { background: color-mix(in srgb, var(--primary) 4%, var(--surface)); }
.ttable tr.sel { background: var(--primary-soft); }
.ttable tr.done .t-link span { text-decoration: line-through; opacity: .65; }
.ttable .c-sel { width: 44px; padding-left: 8px; padding-right: 0; }
.ttable th.c-sel { padding: 0 0 0 8px; }
.ttable .c-name { min-width: 240px; max-width: 360px; }
.t-link { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0; font: inherit; font-weight: 550; color: var(--text); cursor: pointer; text-align: left; }
.t-link:hover { color: var(--primary); }
.t-link svg { width: 15px; height: 15px; flex: none; }
.cell-b { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid transparent; border-radius: 7px; padding: 3px 6px; margin: -3px -6px; font: inherit; cursor: pointer; max-width: 100%; flex-wrap: wrap; min-height: 30px; }
.cell-b:hover { border-color: var(--border-strong); background: var(--surface); }
.cell-inp { height: 30px; padding: 3px 7px; font-size: 13px; min-width: 90px; border-color: transparent; background: transparent; }
.cell-inp:hover { border-color: var(--border-strong); } .cell-inp:focus { background: var(--surface); }
.ttable-foot { padding: 8px 4px 0; }
@media (max-width: 768px) {
  .ttable-wrap { border: 0; background: none; max-height: none; overflow: visible; }
  .ttable, .ttable tbody, .ttable tr, .ttable td { display: block; }
  .ttable thead { display: none; }
  .ttable tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px 12px 8px; margin-bottom: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; position: relative; }
  .ttable td { border: 0; padding: 3px 0; height: auto; min-width: 0; }
  .ttable td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 1px; }
  .ttable td.c-name { grid-column: 1 / -1; max-width: none; padding-right: 40px; }
  .ttable td.c-sel { position: absolute; top: 4px; right: 4px; width: auto; padding: 0; }
  .cell-inp { min-width: 0; width: 100%; border-color: var(--border); }
}

/* ---------- stopky v liště ---------- */
.tmr { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border)); background: var(--danger-soft); color: var(--text); cursor: pointer; max-width: 260px; font-size: 13px; }
.tmr:hover { border-color: var(--danger); }
.tmr-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); animation: tmrp 1.4s infinite; flex: none; }
@keyframes tmrp { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.tmr-clock { font-variant-numeric: tabular-nums; }
.tmr-name { color: var(--text-2); min-width: 0; }
@media (max-width: 768px) { .tmr { height: 38px; padding: 0 10px; } .tmr-name { display: none; } }
@media (prefers-reduced-motion: reduce) { .tmr-dot { animation: none; } }
.tmr-panel { padding: 6px; }
.tp-h { padding: 8px 10px 4px; }
.tp-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); }
.tp-item + .tp-item { border-top: 1px solid var(--border); }
.tp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: none; border: 0; text-align: left; cursor: pointer; padding: 0; min-height: 36px; justify-content: center; }
.tp-t { font-weight: 600; }
.tp-clock { font-variant-numeric: tabular-nums; font-size: 15px; }
.tp-foot { display: block; padding: 10px; border-top: 1px solid var(--border); margin-top: 4px; text-align: center; font-size: 13px; }
.tp-none { padding: 12px 10px; }
.timepage .now { margin-bottom: 16px; }
.timepage .now h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.timepage .now h3 svg { width: 18px; height: 18px; color: var(--danger); }
.now-empty { display: flex; gap: 12px; align-items: center; } .now-empty svg { width: 28px; height: 28px; color: var(--muted); flex: none; }

/* ---------- čas: výkazy, záznamy, rozpočet ---------- */
.vtime { min-width: 0; }
.tm-ctl { align-items: center; row-gap: 8px; }
.tm-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tm-sum .pstat { min-width: 0; }
.pstat.warn b { color: var(--warning); }
.tm-card { padding: 0; overflow: hidden; }
.te-day header { display: flex; justify-content: space-between; padding: 9px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 13px; position: sticky; top: 0; }
.te { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--border); min-height: 52px; }
.te:last-child { border-bottom: 0; }
.te.sel { background: var(--primary-soft); }
.te.run { background: color-mix(in srgb, var(--danger-soft) 60%, var(--surface)); }
.te-main { flex: 1; min-width: 0; }
.te-task { background: none; border: 0; padding: 0; font: inherit; font-weight: 550; color: var(--text); cursor: pointer; text-align: left; max-width: 100%; }
.te-task:hover:not(:disabled) { color: var(--primary); }
.te-main .sq { margin-right: 4px; }
.te-nums { text-align: right; display: flex; flex-direction: column; min-width: 78px; font-variant-numeric: tabular-nums; }
.te-tags { display: flex; gap: 4px; }
.te-acts { display: flex; gap: 2px; min-width: 64px; justify-content: flex-end; }
.te-clock { color: var(--danger); }
@media (max-width: 768px) {
  .te { flex-wrap: wrap; row-gap: 4px; }
  .te-main { flex: 1 1 60%; } .te-nums { min-width: 0; } .te-tags { order: 5; } .te-acts { margin-left: auto; }
}
.rp-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.rp-table { padding: 6px 14px 10px; }
.rp-row { display: grid; grid-template-columns: minmax(120px, 1.2fr) minmax(80px, 2fr) 90px 100px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.rp-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 550; }
.rp-bar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.rp-bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.rp-h2, .rp-a { text-align: right; font-variant-numeric: tabular-nums; }
.rp-tot { border-bottom: 0; border-top: 2px solid var(--border-strong); font-weight: 700; }
@media (max-width: 768px) { .rp-row { grid-template-columns: 1fr auto auto; } .rp-bar { grid-column: 1 / -1; order: 5; } }
.budget { margin-bottom: 14px; }
.bd-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.bd-h h3 { display: flex; align-items: center; gap: 8px; } .bd-h h3 svg { width: 18px; height: 18px; color: var(--primary); }
.bd-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 24px; }
.bd-bar .row { margin-bottom: 4px; } .bd-bar .progress { height: 9px; }
.bd-bar .pct { font-weight: 700; min-width: 44px; text-align: right; } .pct.warn { color: var(--warning); } .pct.over { color: var(--danger); }
.bd-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 24px; margin-top: 14px; }
.bd-p { display: grid; grid-template-columns: 24px minmax(70px, 1fr) minmax(60px, 1.2fr) auto auto; gap: 8px; align-items: center; font-size: 13px; }
.bd-p .progress { height: 6px; }
.tt-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tt-est { flex: 1 1 200px; min-width: 160px; } .tt-est .progress { height: 6px; margin-bottom: 2px; }
.tt-clock { font-variant-numeric: tabular-nums; }
.tt-list { display: flex; flex-direction: column; }
.tt-e { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border); }
.te-form .form-grid { margin-bottom: 4px; }

/* ---------- wiki ---------- */
.wiki-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; align-items: start; }
.wiki-side { padding: 10px; position: sticky; top: 12px; max-height: calc(100vh - 140px); overflow: auto; }
.wiki-sh { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; }
.wiki-tree, .wiki-tree ul { list-style: none; margin: 0; padding: 0; }
.wiki-item { display: flex; align-items: center; border-radius: 8px; }
.wiki-item:hover, .wiki-node.on > .wiki-item { background: var(--surface-2); }
.wiki-node.on > .wiki-item { background: var(--primary-soft); }
.wiki-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; background: none; border: 0; padding: 7px 8px; font: inherit; color: var(--text); cursor: pointer; text-align: left; min-height: 38px; }
.wiki-node.on > .wiki-item .wiki-link { color: var(--primary); font-weight: 600; }
.wiki-link svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.wiki-more { opacity: 0; } .wiki-item:hover .wiki-more, .wiki-more:focus-visible { opacity: 1; }
@media (pointer: coarse) { .wiki-more { opacity: 1; } }
.wiki-main { min-height: 320px; min-width: 0; }
.wiki-h { margin-bottom: 14px; } .wiki-h h2 { font-size: 22px; }
.wiki-crumbs a { color: var(--muted); }
.wiki-md { font-size: 14.5px; line-height: 1.65; }
.wiki-subs { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wiki-subs h4 { width: 100%; color: var(--muted); }
.wiki-subs a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
.wiki-subs svg { width: 15px; height: 15px; color: var(--muted); }
.wiki-title { font-size: 20px; font-weight: 650; }
.wiki-tools { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; margin-bottom: 8px; }
.wiki-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wiki-ta { min-height: 340px; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; resize: vertical; }
.wiki-prev { border: 1px dashed var(--border-strong); border-radius: var(--r); padding: 12px 16px; min-height: 340px; overflow: auto; }
.wiki-prevseg { display: none; }
@media (max-width: 900px) {
  .wiki-layout { grid-template-columns: 1fr; }
  .wiki-side { position: static; max-height: 260px; }
  .wiki-panes { grid-template-columns: 1fr; } .wiki-panes .wiki-prev { display: none; } .wiki-panes.prev .wiki-prev { display: block; } .wiki-panes.prev .wiki-ta { display: none; }
  .wiki-prevseg { display: inline-flex; }
}

/* ---------- aktivita ---------- */
.vact .card { padding: 0; }
.ac-day header { padding: 9px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-weight: 600; font-size: 13px; }
.ac-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.ac-ic { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); flex: none; } .ac-ic svg { width: 14px; height: 14px; }
.ac-t { flex: 1; min-width: 0; padding-top: 2px; overflow-wrap: anywhere; }
.ac-link { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.ac-when { padding-top: 4px; }
.ac-more, .ac-end { padding: 14px; text-align: center; }

/* ---------- uživatelé a pole (nastavení) ---------- */
.ulist, .flist { display: flex; flex-direction: column; }
.urow, .frow { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.urow.off { opacity: .6; }
.u-main { flex: 1 1 220px; min-width: 0; }
.u-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.role-chip { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); }
.role-chip.r-owner { background: var(--primary-soft); color: var(--primary); } .role-chip.r-admin { background: var(--info-soft); color: var(--info); } .role-chip.r-guest { background: var(--warning-soft); color: var(--warning); }
.u-facts { display: flex; gap: 16px; margin: 0; flex-wrap: wrap; }
.u-facts div { min-width: 64px; } .u-facts dt { font-size: 11px; color: var(--muted); } .u-facts dd { margin: 0; font-weight: 600; font-size: 13px; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.sw { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.sw.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.frow .f-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; } .frow .f-ic svg { width: 16px; height: 16px; }
.pl-url { display: flex; gap: 8px; } .pl-url .inp { flex: 1; min-width: 0; }
.n-toggle { margin-left: 4px; opacity: 0; } .notif:hover .n-toggle, .n-toggle:focus-visible { opacity: 1; }
@media (pointer: coarse) { .n-toggle { opacity: 1; } }
@media (max-width: 768px) { .u-facts { gap: 10px; } .urow .btn { margin-left: auto; } }
.pcal-chip.ghost { visibility: hidden; border: 0; }
.cell-b { flex-wrap: nowrap; }
.cell-b .cb-t { white-space: nowrap; }
.cell-b .label, .cell-b .pill { flex: none; }
.urow .btn { margin-left: auto; }
.pcal-unsched summary svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.vtl svg, .vcal svg, .vtable svg, .vtime svg, .vwiki svg, .vact svg { flex: none; }

/* H2: závislosti a milníky na timeline */
.tl-deps { position: absolute; left: 0; pointer-events: none; z-index: 2; overflow: visible; color: var(--muted); }
.tl-deps path { fill: none; stroke: currentColor; stroke-width: 1.5; opacity: .85; }
.tl-deps path.bad { stroke: var(--danger); color: var(--danger); }
.tl-bar.ms { background: none; box-shadow: none; padding: 0; overflow: visible; border-radius: 0; }
.tl-bar.ms .dia { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; transform: rotate(45deg); background: var(--primary); border-radius: 3px; box-shadow: 0 0 0 2px var(--surface); }
.tl-bar.ms.done .dia { background: var(--success); }
.tl-bar.ms.over .dia { background: var(--danger); }
.tl-bar.ms .bn { left: calc(50% + 14px); font-weight: 650; }
