/* Správa úkolů: kompaktní vzhled, světlý a tmavý režim přes tokeny na :root[data-theme]. */
:root {
  --bg: #f3f4f6; --surface: #ffffff; --surface-2: #f8f9fb; --fg: #1c2024; --muted: #6b7280; --line: #e3e6ea; --line-2: #cfd4db;
  --accent: #2f6fed; --accent-soft: #e9f0fe; --on-accent: #ffffff;
  --warn: #9a6a0f; --warn-soft: #fff6d9; --warn-line: #e6c46a;
  --danger: #c93c3c; --danger-soft: #fdeaea;
  --ok: #1f8a4c; --ok-soft: #e4f5ea;
  --violet: #6b4fd8; --violet-soft: #eee9fc;
  --sel: #e9f0fe; --hover: #f3f5f8;
  --r: 8px; --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 6px rgba(16, 24, 40, .06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1216; --surface: #171b21; --surface-2: #1d222a; --fg: #e4e7eb; --muted: #98a2b3; --line: #2a313b; --line-2: #3a4350;
  --accent: #6b9cff; --accent-soft: #1d2b47; --on-accent: #0b1220;
  --warn: #e3b341; --warn-soft: #3a3014; --warn-line: #8a7224;
  --danger: #f07070; --danger-soft: #3b1d1d;
  --ok: #5fcf85; --ok-soft: #173323;
  --violet: #b09cff; --violet-soft: #2b2446;
  --sel: #1d2b47; --hover: #1f252e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { display: flex; flex-direction: column; overflow: hidden; font: 13px/1.4 var(--font); color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; }
body.resizing { cursor: col-resize; user-select: none; }
body.resizing * { cursor: col-resize !important; }
a { color: var(--accent); }
kbd { font: 11px/1 var(--mono); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; background: var(--surface); color: var(--muted); }
code { font-family: var(--mono); font-size: 11.5px; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.mono { font-family: var(--mono); font-size: 12px; }

/* ---------- tlačítka, chipy, přepínače */
.btn { font: inherit; font-size: 12.5px; padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--fg); cursor: pointer; white-space: nowrap; line-height: 1.2; }
.btn:hover { background: var(--hover); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.del-btn.on { background: var(--danger); border-color: var(--danger); box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 30%, transparent); }
.del-btn.on:hover { filter: brightness(1.1); }
.del-btn.on:disabled, .seg.sm button.del.on:disabled { cursor: not-allowed; opacity: .85; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--fg); }
.btn.icon { padding: 4px 8px; font-size: 15px; line-height: 1; }
.btn kbd { margin-left: 6px; opacity: .8; }
.btn.primary kbd { border-color: rgba(255, 255, 255, .5); background: transparent; color: inherit; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; background: var(--surface); }
.seg button { font: inherit; font-size: 12px; padding: 4px 9px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; line-height: 1.3; }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--hover); color: var(--fg); }
.seg button.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.seg.sm button { padding: 2px 7px; font-size: 11.5px; font-weight: 600; }
.seg.sm button.on.duplicita, .seg.sm button.on.del { background: var(--danger); color: #fff; }
.seg.sm button.del { font-size: 12px; padding: 1px 5px; }
.seg.sm button.on.ne { background: var(--ok); color: #fff; }
.badge { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; vertical-align: middle; }
.badge.warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.badge.danger, .badge.duplicita { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.badge.ne { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.badge.ok, .badge.ruzne { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.badge.violet, .badge.varianta { background: var(--violet-soft); border-color: transparent; color: var(--violet); }
.badge.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip { display: inline-block; font-size: 10.5px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); margin-right: 3px; white-space: nowrap; }

/* ---------- hlavička */
header#top { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; padding: 7px 12px; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 2; }  /* vlevo značka + Hra a Druhá hra, uprostřed jazyk, vpravo uživatel a akce */
.top-l, .top-r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.top-r { justify-content: flex-end; }
.brand { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; margin-right: 4px; white-space: nowrap; }
.search { position: relative; display: flex; align-items: center; flex: 1 1 280px; min-width: 220px; }
.search svg { position: absolute; left: 9px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; font: inherit; padding: 6px 34px 6px 30px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface-2); color: var(--fg); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search kbd { position: absolute; right: 8px; pointer-events: none; }
.filters { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
select { font: inherit; font-size: 12px; padding: 5px 22px 5px 8px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.6'/></svg>") no-repeat right 7px center; color: var(--muted); appearance: none; max-width: 150px; cursor: pointer; }
select.on { color: var(--fg); border-color: var(--accent); background-color: var(--accent-soft); font-weight: 600; max-width: 230px; }  /* „typ: hodnota“ potřebuje víc místa */
.count { color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- rozložení */
main { flex: 1; display: flex; min-height: 0; }
#list-col { flex: 0 0 46%; min-width: 260px; display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
#list-tools { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; padding: 7px 8px; border-bottom: 1px solid var(--line); background: var(--surface); }  /* hledání, filtry a řazení nad seznamem */
#list-tools .search { flex: 1 1 auto; min-width: 0; }
#list-tools .filters { justify-content: flex-start; }
#list-tools .count { align-self: flex-end; margin-top: -2px; }
#list-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; background: var(--surface); }
#split { flex: 0 0 5px; cursor: col-resize; background: var(--line); transition: background .15s; }
#split:hover, body.resizing #split { background: var(--accent); }
#card { flex: 1 1 0; min-width: 320px; overflow: auto; padding: 12px 16px 24px; }
footer#status { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding: 4px 12px; background: var(--surface); border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
footer#status .st b { font-weight: 600; color: var(--fg); }
footer#status .st.warn { color: var(--warn); }

/* ---------- seznam */
table#list { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
#list th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); text-align: left; font-weight: 600; font-size: 11.5px; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: none; }
#list th .rs { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; }
#list th .rs::after { content: ""; position: absolute; top: 25%; bottom: 25%; left: 3px; width: 1px; background: var(--line-2); }
#list th .rs:hover::after, body.resizing #list th .rs::after { background: var(--accent); width: 2px; }
#list td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#list tbody tr:hover td { background: var(--hover); }
#list tr.sel td { background: var(--sel); }
#list tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
/* úkol ke smazání (čekající označení, vždy i protějšek páru): všude červený podklad a přeškrtnutý text */
#list tr.del td { color: var(--muted); background: var(--danger-soft); }
#list tr.del td.txt { text-decoration: line-through; text-decoration-color: var(--danger); }
#list tr.sel.del td { background: color-mix(in srgb, var(--danger-soft) 55%, var(--sel)); }
#list tr.sel.del td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
#list td.txt.both { line-height: 1.35; padding-top: 4px; padding-bottom: 4px; }
#list td.txt.both small { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }  /* CS + EN: EN pod CS jako u podobných */
#list tr.chg td.txt { background: var(--warn-soft); }
#list tr.sel.chg td.txt { background: color-mix(in srgb, var(--warn-soft) 60%, var(--sel)); }
/* úkol s otevřenými požadavky (zamčená pole, čeká na AI): fialový podklad a proužek vlevo, 🔒 s počtem v příznacích */
#list tr.req td { background: var(--violet-soft); }
#list tr.req td:first-child { box-shadow: inset 3px 0 0 var(--violet); }
#list tr.req.chg td.txt { background: color-mix(in srgb, var(--warn-soft) 55%, var(--violet-soft)); }
#list tr.sel.req td { background: color-mix(in srgb, var(--violet-soft) 55%, var(--sel)); }
#list tr.req .fl.lock { color: var(--violet); font-weight: 700; font-size: 11px; }
#list td.g { text-align: center; padding-left: 4px; padding-right: 4px; }
.gl { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 5px; font: 700 11px/1 var(--mono); background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); vertical-align: middle; }
.gl.Male { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.gl.Female { color: var(--violet); background: var(--violet-soft); border-color: transparent; }
.half h3 .gl { width: 22px; height: 22px; font-size: 12px; }
#list td.type { color: var(--muted); font-size: 12px; }
#list td.score { text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); }
#list td.tags { padding-top: 3px; padding-bottom: 3px; }
#list td.flags { text-align: right; padding-right: 10px; }
.fl { display: inline-block; font-weight: 700; margin-left: 3px; }
.fl.ok { color: var(--ok); } .fl.chg { color: var(--warn); } .fl.del { color: var(--danger); } .fl.nojson { color: var(--muted); opacity: .45; font-weight: 500; }
/* filtr podle indexů: plovoucí panel s posuvníkem od a do pro každou osu, vybraný rozsah modře */
#f-osy.on { color: var(--fg); border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
#osy-pop { position: fixed; z-index: 40; width: 520px; max-width: calc(100vw - 16px); max-height: calc(100vh - 70px); overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .22); padding: 10px 12px; }
.osy-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; font-size: 13px; }
.osa-f { display: grid; grid-template-columns: 200px 1fr 40px; align-items: center; gap: 10px; padding: 2px 0; font-size: 12px; }
.osa-f .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.osa-f.on .nm { color: var(--fg); font-weight: 600; }
.osa-f .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.osa-f.on .val { color: var(--accent); font-weight: 600; }
.dual { position: relative; height: 22px; }
.dual .track { position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 2px; background: var(--line-2); }
.dual .fill { position: absolute; top: 9px; height: 4px; border-radius: 2px; background: var(--accent); }
.dual input[type=range] { position: absolute; left: 0; top: 0; width: 100%; height: 22px; margin: 0; padding: 0; background: transparent; border: 0; appearance: none; -webkit-appearance: none; pointer-events: none; z-index: 2; }
.dual input[type=range]:focus-visible { outline: none; box-shadow: none; border: 0; }
.dual input[type=range]::-webkit-slider-runnable-track { background: transparent; height: 22px; }
.dual input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); cursor: grab; }
.dual input[type=range]::-moz-range-track { background: transparent; height: 22px; }
.dual input[type=range]::-moz-range-thumb { pointer-events: auto; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); cursor: grab; }
.osy-foot { display: flex; gap: 6px; margin-top: 10px; }
/* dialog duplicity: oba úkoly vedle sebe, koš = smazat kvůli duplicitě */
#dup-dlg, #zmena-dlg, #pol-dlg, #token-dlg, #zaloha-dlg { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .38); display: flex; align-items: center; justify-content: center; padding: 16px; }
#dup-dlg[hidden], #zmena-dlg[hidden], #pol-dlg[hidden], #token-dlg[hidden], #zaloha-dlg[hidden] { display: none; }
#pol-dlg .dlg { width: 640px; }
#token-dlg .dlg { width: 600px; }
/* menu ⋯ v hlavičce (jen mdo) a dialog zálohy změnových požadavků */
#menu-pop { position: fixed; z-index: 40; min-width: 250px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .22); padding: 4px; }
#menu-pop button { display: block; width: 100%; text-align: left; font: inherit; font-size: 13px; padding: 7px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--fg); cursor: pointer; white-space: nowrap; }
#menu-pop button:hover, #menu-pop button:focus-visible { background: var(--hover); outline: none; }
#zaloha-dlg .dlg { width: 680px; }
.zaloha-info { font-size: 13px; }
.zaloha-info p { margin: 6px 0; }
.zaloha-info table { border-collapse: collapse; width: 100%; font-size: 12.5px; margin: 8px 0; }
.zaloha-info td { padding: 3px 8px; border-bottom: 1px solid var(--line); }
.zaloha-info td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zaloha-info .del { color: var(--danger); }
.zaloha-info .warn { color: var(--warn); font-weight: 600; }
.zaloha-info pre { margin: 4px 0 0; padding: 6px 8px; background: var(--surface-2); border-radius: 6px; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
#token-in { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 7px 9px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface); color: var(--fg); margin: 6px 0 8px; -webkit-text-security: disc; }  /* textové pole maskované CSS, ne type=password: prohlížeč pak nenabízí uložení hesla po každém importu */
#token-info { margin-top: 4px; }
.board-export ul { margin: 2px 0 6px 16px; padding: 0; } .board-export li { margin: 1px 0; }
.board-export .imp { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line); }
.pol-lbl { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.pol-lbl textarea { font: inherit; font-size: 13px; color: var(--fg); padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface); resize: vertical; }
#zmena-dlg .dlg { width: 720px; }
.zm-ukol { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.zm-pole { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; max-height: 40vh; overflow: auto; }
.zm-f { display: grid; grid-template-columns: 150px 1fr; gap: 8px; font-size: 12.5px; align-items: start; }
.zm-f b { color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-top: 1px; }
.zm-v { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; min-width: 0; }
.zm-v s { color: var(--danger); text-decoration-color: var(--danger); white-space: pre-wrap; overflow-wrap: anywhere; }
.zm-v .arr { color: var(--muted); }
.zm-v .new { background: var(--warn-soft); border-radius: 4px; padding: 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.zm-f .zm-duvod { grid-column: 2; width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface); color: var(--fg); }
.zm-f .zm-duvod:placeholder-shown { border-color: color-mix(in srgb, var(--danger) 45%, var(--line-2)); }
.zm-f .zm-duvod.err { border-color: var(--danger); box-shadow: 0 0 0 2px var(--danger-soft); }
#zmena-save.chybi-duvod { opacity: .6; }  /* důvod chybí: tlačítko zůstává klikací, klik ukáže, co chybí */
.btn.primary:disabled { opacity: .55; cursor: not-allowed; }
/* důvod změny u pole: kompaktní štítek 💬, u os jen ikonka */
.duvod-chip { font: inherit; font-size: 10.5px; line-height: 1.3; padding: 0 6px; margin-left: 6px; border: 1px solid var(--warn-line, var(--line-2)); border-radius: 999px; background: var(--warn-soft); color: var(--fg); cursor: pointer; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.duvod-chip:hover { border-color: var(--accent); color: var(--accent); }
.duvod-chip.missing { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); background: var(--danger-soft); }
.duvod-chip.ico { padding: 0 3px; margin: 0 2px 0 0; flex: 0 0 auto; }
/* požadavek na pole: zamčené pole (jen ke čtení) se zámkem a důvodem */
.lock { display: inline-block; font-size: 10.5px; line-height: 1.3; padding: 0 6px; margin-left: 6px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface-2); color: var(--muted); max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; cursor: help; }
.lock.ico { padding: 0 2px; margin: 0 2px 0 0; flex: 0 0 auto; }
.badge.lockb { background: var(--surface-2); color: var(--muted); border-color: var(--line-2); }
.field.locked textarea, .field.locked select, .field.locked input, .osa.locked input, .stav-row.locked .btn { opacity: .55; background: var(--surface-2); cursor: not-allowed; }
/* pole s čekající změnou: zamčené (žluté zůstává), nová změna až po zrušení té čekající */
.field.frozen textarea, .field.frozen select, .field.frozen input, .osa.frozen input { cursor: not-allowed; opacity: .8; }
.osa input::-webkit-inner-spin-button, .osa input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }  /* bez šipek: každý klik na ně otvíral dialog; hodnotu mění psaní a ↑/↓ */
.osa input { -moz-appearance: textfield; appearance: textfield; text-align: center; }
.fl.lock { font-size: 10px; color: var(--violet); }
/* pokyn k úpravě (pro AI): zvětšovatelné pole, neprázdný pokyn žlutě */
.pokyn-f textarea.pokyn { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--fg); resize: vertical; min-height: 44px; }
.pokyn-f.on textarea.pokyn { border-color: var(--warn-line); background: var(--warn-soft); }
.pokyn-f label { display: flex; align-items: center; gap: 6px; }
.pokyn-f .pokyn-done { margin-left: auto; font-size: 11.5px; padding: 2px 8px; }
.stav-row label { display: flex; align-items: center; }
.stav-v { display: flex; align-items: center; gap: 8px; }
.badge.ok { color: var(--muted); }
.zm-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; }
.zm-chips .chip { cursor: pointer; font: inherit; font-size: 11.5px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--fg); }
.zm-chips .chip:hover { border-color: var(--accent); color: var(--accent); }
#dup-dlg .dlg, #zmena-dlg .dlg, #pol-dlg .dlg, #token-dlg .dlg, #zaloha-dlg .dlg { width: 980px; max-width: 100%; max-height: 100%; overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 48px rgba(0, 0, 0, .3); padding: 12px 16px 16px; }
.dlg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dlg-head h2 { margin: 0; font-size: 15px; white-space: nowrap; }
.dlg-head .btn { margin-left: auto; }
.dup-halves { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dup-half { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); min-width: 0; }
.dup-half.del { border-color: var(--danger); background: var(--danger-soft); }
.dup-half.del .t { text-decoration: line-through; text-decoration-color: var(--danger); color: var(--muted); }  /* označený úkol: přeškrtnutý CS i EN text */
.dup-half header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.dup-half .t { white-space: pre-wrap; line-height: 1.45; margin: 4px 0; overflow-wrap: anywhere; }
.dup-half .t.en { color: var(--muted); font-size: 12.5px; }
.dup-half .duvod-row { margin: 10px 0 0; }
#more { padding: 10px; text-align: center; }
/* panel Hra: deska vlevo, políčka s fází (barva pruhu), specifikací a vybraným párem */
.board { flex: 0 0 340px; min-width: 220px; overflow: auto; background: var(--surface-2); border-right: 1px solid var(--line); }
.board[hidden], .board-split[hidden] { display: none; }
.board-split { flex: 0 0 5px; cursor: col-resize; background: var(--line); transition: background .15s; }
.board-split:hover, body.resizing .board-split { background: var(--accent); }
.board-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface-2); z-index: 1; }
.board-head select { flex: 1 1 150px; max-width: 100%; }
.board-info { padding: 6px 10px; font-size: 12px; border-bottom: 1px solid var(--line); line-height: 1.4; }
.board-info details { margin-top: 4px; } .board-info pre { white-space: pre-wrap; font-size: 11px; max-height: 240px; overflow: auto; background: var(--surface); padding: 6px; border-radius: 6px; }
.board-policka { padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.board-policka .pad { padding: 10px; }
.pol { position: relative; border: 1px solid var(--line); border-left: 4px solid hsl(var(--hue) 60% 55%); border-radius: 8px; padding: 6px 8px; background: var(--surface); font-size: 12px; }
.pol.sel { outline: 2px solid var(--accent); }
.pol.free { background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface)); }
/* místo k opravě: pár navržený ke smazání, placeholder nebo pár mimo export (barva fáze vlevo zůstává) */
.pol.problem { border-top-color: var(--danger); border-right-color: var(--danger); border-bottom-color: var(--danger); background: color-mix(in srgb, var(--danger-soft) 75%, var(--surface)); box-shadow: 0 0 0 1px var(--danger); }
.pol-problem { color: var(--danger); font-weight: 600; font-size: 12px; margin: 3px 0 1px; }
.board-problem { color: var(--danger); font-weight: 700; cursor: pointer; }
.board-problem:hover { text-decoration: underline; }
option.problem { color: var(--danger); }
.vyhry-head { margin-top: 8px; padding: 6px 4px 2px; border-top: 2px solid var(--line-2); font-size: 12px; }
.pol.vyhra { border-left-color: #d4a017; }
.pol-h { display: flex; align-items: center; gap: 6px; cursor: pointer; flex-wrap: wrap; }
.pol-h b { font-size: 13px; min-width: 18px; }
.pol-grip { cursor: grab; color: var(--muted); font-size: 15px; line-height: 1; user-select: none; padding: 0 1px; }  /* úchyt pro přetažení karty */
.pol-grip:hover { color: var(--fg); } .pol-grip:active { cursor: grabbing; }
.pol.dragging { opacity: .4; }
.pol.drop-before { box-shadow: 0 -4px 0 0 var(--accent); }  /* kam se karta vloží */
.pol.drop-after { box-shadow: 0 4px 0 0 var(--accent); }
.top-c { display: flex; gap: 6px; align-items: center; }
/* Druhá hra: druhý panel (#board2) se stejnou deskou; karta políčka s párem se přetahuje na políčko druhé desky (mění se jen pár) */
.board-cmp { border-left: 1px solid var(--line); }
.board-tag { font-weight: 700; color: var(--accent); padding: 0 2px; }
.board-cmp-opts { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 5px 10px; border-bottom: 1px solid var(--line); }
.board-cmp-opts label { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; color: var(--fg); }
.pol[data-pid] .pol-sel { cursor: grab; border-radius: 4px; }  /* karta s párem jde chytit kdekoli mimo tlačítka */
.pol[data-pid] .pol-sel:hover { background: var(--hover); }
.pol[data-pid][draggable=true]:active { cursor: grabbing; }
.pol.drop-par { outline: 2px dashed var(--accent); outline-offset: 1px; background: var(--accent-soft); }  /* sem se pár přenese */
.pol.drop-par::after { content: attr(data-drop); position: absolute; top: 4px; right: 6px; z-index: 2; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 5px; background: var(--accent); color: var(--on-accent); pointer-events: none; }
.pol.twin { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }  /* stejné číslo políčka v druhé desce */
.badge.cmp { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.badge.shoda { background: var(--ok-soft); border-color: transparent; color: var(--ok); }  /* stejný pár na stejném čísle druhé desky */
.prenos-zpet { font-size: 11.5px; padding: 2px 8px; }
.pol-h .pol-pick { margin-left: auto; font-size: 11.5px; padding: 2px 7px; }
.pol-faze { color: var(--muted); font-size: 11px; flex: 1 1 100%; order: 10; line-height: 1.3; text-align: left; background: transparent; border: 0; padding: 0; font-family: inherit; cursor: pointer; border-radius: 4px; }  /* celá fáze na vlastním řádku, klik = změnit */
.pol-faze:hover { background: var(--hover); color: var(--fg); }
.faze-sel { flex: 1 1 100%; order: 10; font-size: 11px; max-width: 100%; }
.pol-cil { margin: 4px 0 4px; line-height: 1.35; }  /* zadání políčka (cil) */
.board.bez-cilu .pol-cil { display: none; }  /* tlačítko 🎯 v hlavičce desky: cíle skryté, víc místa pro text úkolu */
.board-head .btn-cile { font-size: 12px; padding: 4px 8px; white-space: nowrap; }
.pol-txt { cursor: text; border-radius: 4px; }
.pol-txt:hover { background: var(--hover); }
.pol-txt b { color: var(--muted); font-weight: 600; }
.pol-spec { display: flex; flex-wrap: wrap; gap: 3px; }
.pol-spec .chip.osa { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pol-spec button.chip { cursor: pointer; font: inherit; font-size: 10.5px; }
.pol-spec .typ-chip:hover { border-color: var(--danger); color: var(--danger); }
.pol-spec .osa-chip:hover { border-color: var(--accent); background: var(--surface); }
.pol-spec .chip.osa .eff { color: var(--muted); font-weight: 400; margin-left: 3px; }  /* filtr políčka po průniku s pásmem hry */
.board-hra-osy { padding: 5px 10px; border-bottom: 1px solid var(--line); align-items: center; }  /* pásma os celé hry (osy v scenar.json → sablona.json) */
.board-hra-osy:empty { display: none; }
.board-hra-osy > .nm { font-size: 11.5px; color: var(--muted); margin-right: 2px; }
.board-hra-osy .osa-edit { flex: 1 1 100%; }
.pol-spec .osa-add { color: var(--accent); border-color: var(--accent); background: transparent; font-weight: 700; padding: 0 5px; }
.osa-edit { grid-template-columns: 120px 1fr 36px auto auto; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.osa-edit .osa-sel { font-size: 11px; padding: 2px 18px 2px 6px; max-width: 120px; }
.osa-edit .btn { font-size: 11px; padding: 2px 7px; }
.pol-spec .typ-add { color: var(--muted); border-color: var(--line-2); background: transparent; font-weight: 700; padding: 0 5px; }  /* + typ šedé, + osy (.osa-add) zůstává modré */
.pol-spec .typ-sel { font-size: 11px; padding: 2px 18px 2px 6px; max-width: 220px; }
.typ-confirm { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; }
.typ-confirm .btn { font-size: 11px; padding: 1px 6px; }
.chip.on { background: var(--warn-soft); border-color: var(--warn-line); color: var(--fg); }
.stitky { display: flex; flex-wrap: wrap; gap: 4px; }  /* štítky JSON poznámky na kartě */
button.chip.stitek { cursor: pointer; font: inherit; font-size: 11px; padding: 1px 7px; color: var(--fg); }
button.chip.stitek:hover:not(:disabled) { border-color: var(--danger, #c33); }
.chip.stitek.smazany { text-decoration: line-through; opacity: .55; }
.chip.stitek.novy { border-style: dashed; cursor: default; }
.chip.stitek.stav { font-size: 11px; padding: 1px 7px; }
.pol-sel { margin-top: 5px; padding-top: 5px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 2px; }
.pol-sel a { cursor: pointer; color: var(--fg); font-size: 13.5px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }  /* celý text úkolu */
.pol-sel a:hover { color: var(--accent); } .pol-sel a.del { text-decoration: line-through; color: var(--danger); }
.pol-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .pol-meta .pol-x { margin-left: auto; font-size: 11px; padding: 1px 6px; }
.chip-f { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 4px 8px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent-soft); color: var(--fg); font-weight: 600; max-width: 460px; }
.chip-f span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-f button { border: 0; background: transparent; cursor: pointer; font: inherit; color: var(--muted); padding: 0 2px; }
#btn-hra.on, #btn-porovnani.on { background: var(--accent-soft); color: var(--fg); border-color: var(--accent); }
.fl.pol { color: var(--accent); font-weight: 700; font-size: 10.5px; }
.fl.kand { color: var(--violet); font-weight: 700; font-size: 10.5px; }  /* pořadí kandidáta ze souboru policka-kandidati */
.chip-f.kand { border-color: var(--violet); background: transparent; }
.pol-kands { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; justify-content: center; }  /* 🔍 pro každou sadu policka-kandidati[-<sada>]: v hlavičce karty uprostřed */
.pol-h .pol-kands + .pol-pick { margin-left: 0; }
.pol-kands .pol-kand { font-size: 11px; padding: 1px 7px; }
.pol-kands .pol-kand.cizi:not(.primary) { opacity: .6; }  /* sada jiné desky hry (hlavní nebo jiné varianty) */
#list tr.pol td.txt { background: var(--accent-soft); }
#btn-more:disabled { color: var(--muted); cursor: default; }
#list-empty { padding: 24px; text-align: center; }

/* ---------- prázdná karta */
#card-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); text-align: center; }
#card-empty .hero { font-size: 42px; opacity: .6; }
#card-empty p { margin: 0; font-size: 14px; color: var(--fg); }
#card-empty .keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; max-width: 640px; font-size: 12px; }
#card-empty kbd { margin-right: 2px; }

/* ---------- karta */
.card-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; font-size: 11.5px; color: var(--muted); }
.card-head .idchip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: copy; }
.card-head .idchip:hover { border-color: var(--accent); color: var(--fg); }
.card-head .idchip code { color: var(--fg); }
.halves { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 1100px) { .halves { grid-template-columns: 1fr; } }
.half { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 10px 12px 12px; min-width: 0; }
.half.del { border-color: color-mix(in srgb, var(--danger) 50%, transparent); background: color-mix(in srgb, var(--danger-soft) 45%, var(--surface)); }
.half.empty { color: var(--muted); }
.half > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.half h3 { margin: 0; font-size: 14px; font-weight: 700; }
.half h3 .muted { font-weight: 500; font-size: 12px; }
.half .badges { display: flex; gap: 4px; flex-wrap: wrap; }
.field { margin: 6px 0; min-width: 0; }
.field label, .field > .lbl { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 2px; letter-spacing: .01em; }
.field .sel-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }  /* výběr (type) se štítkem důvodu hned vedle */
.field .revert:hover { text-decoration: underline; }
.field textarea, .field input[type=text] { width: 100%; font: inherit; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--fg); transition: border-color .12s, box-shadow .12s; }
.field textarea { resize: vertical; min-height: 60px; max-height: 260px; field-sizing: content; line-height: 1.45; }
.field textarea.mono { font: 12px/1.4 var(--mono); max-height: 520px; tab-size: 2; }
.field select { max-width: 100%; width: auto; min-width: 240px; color: var(--fg); font-size: 13px; }
.field.changed textarea, .field.changed input[type=text], .field.changed select { background-color: var(--warn-soft); border-color: var(--warn-line); }
.field.dirty textarea, .field.dirty input[type=text], .field.dirty select { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.field.err textarea, .field.err input[type=text], .field.err select, .osa.err input { border-color: var(--danger); box-shadow: 0 0 0 2px var(--danger-soft); }
.osy { columns: 150px; column-gap: 16px; column-rule: 1px solid var(--line); }  /* osy odshora dolů a pak další sloupec (od nejjemnějších po nejtvrdší), sloupce dělí jemná čára */
.osa { display: flex; align-items: center; gap: 5px; font-size: 11.5px; min-width: 0; margin: 0 0 3px; font-weight: 400; color: var(--fg); break-inside: avoid; }
.osa span { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.field .osa input { flex: 0 0 44px; width: 44px; font: inherit; font-size: 12px; padding: 2px 2px 2px 6px; text-align: center; border: 1px solid var(--line-2); border-radius: 5px; color: var(--fg); font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
  /* intenzita 0–10 (--heat 0–100 % na labelu) → podbarvení akcentem jako skóre v tabulce podobných */
  background: color-mix(in srgb, var(--accent) calc(var(--heat, 0%) * .45), var(--surface)); }
.osa span::after { content: ""; display: block; height: 2px; margin-top: 1px; width: var(--heat, 0%); background: color-mix(in srgb, var(--accent) calc(40% + var(--heat, 0%) * .6), transparent); border-radius: 1px; }
.field .osa input::-webkit-inner-spin-button { opacity: .5; margin-left: 1px; }
.field .osa input:hover::-webkit-inner-spin-button, .field .osa input:focus::-webkit-inner-spin-button { opacity: 1; }
.osa.changed input { border-color: var(--warn-line); box-shadow: inset 0 0 0 1px var(--warn-line); }  /* čekající změna: žlutý rámeček (výplň nese intenzitu) */
.osa input.dirty { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; font-size: 12px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); max-height: 190px; overflow: auto; }
.kv b { font-weight: 500; color: var(--muted); font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.kv span { overflow-wrap: anywhere; }
.note-raw { font: 12px/1.4 var(--mono); padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 190px; overflow: auto; }
details { margin-top: 4px; }
details summary { cursor: pointer; font-size: 11.5px; color: var(--muted); user-select: none; }
details summary:hover { color: var(--fg); }
details[open] summary { margin-bottom: 4px; }
.hist { font-size: 11.5px; color: var(--muted); max-height: 140px; overflow: auto; display: grid; grid-template-columns: max-content max-content minmax(0, 1fr); gap: 1px 10px; align-items: baseline; }
.hist .t { font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.hist .w { white-space: nowrap; }
.hist .d { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist .d b { font-weight: 600; color: var(--fg); }
.hist .d s { opacity: .7; }
.hist .d a { cursor: pointer; }

/* ---------- podobné */
.sec-head { display: flex; align-items: baseline; gap: 12px; margin: 18px 0 6px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font-size: 14px; font-weight: 700; }
.sec-head h2 .count { font-weight: 500; margin-left: 4px; }
.sim-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.sim-wrap .empty { padding: 14px; color: var(--muted); }
table.sim { width: 100%; border-collapse: separate; border-spacing: 0; }
table.sim td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 12.5px; }
table.sim tr:last-child td { border-bottom: 0; }
table.sim tbody tr:hover td { background-color: var(--hover); }
table.sim tr.sel td { background-color: var(--sel); }
table.sim tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
table.sim td.n { width: 30px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
table.sim th { position: sticky; top: 0; background: var(--surface-2); font-size: 11px; font-weight: 600; color: var(--muted); text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.sim th.num { text-align: right; font-family: var(--mono); }
table.sim th.sortable { cursor: pointer; }
table.sim th.sortable:hover { color: var(--fg); }
table.sim th.sortable.on { color: var(--accent); }
table.sim th.sortable.on::after { content: " ↓"; }
table.sim td.num { width: 52px; font-family: var(--mono); font-size: 11.5px; text-align: right; color: var(--muted); padding-top: 7px; font-variant-numeric: tabular-nums; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) calc(var(--heat, 0%) * .32), transparent) 100%) no-repeat; }
table.sim td.num.on { color: var(--fg); font-weight: 700; }
table.sim th.n { text-align: right; }
/* nápověda k modelům: ikonka „i“ v hlavičce, text po najetí v plovoucím rámečku (#tip sleduje myš, nic ho neořízne) */
.info { display: inline-block; width: 13px; height: 13px; margin-left: 4px; border: 1px solid var(--muted); border-radius: 50%; color: var(--muted); font: 600 9px/11px var(--sans, system-ui); text-align: center; vertical-align: 1px; cursor: help; font-style: normal; }
.info:hover { color: var(--accent); border-color: var(--accent); }
#tip { position: fixed; z-index: 60; max-width: 380px; padding: 8px 11px; background: var(--surface-2); color: var(--fg); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); font-size: 12px; line-height: 1.45; white-space: pre-line; text-align: left; font-family: inherit; font-weight: 400; pointer-events: none; }
table.sim td.txt { cursor: pointer; line-height: 1.4; }
table.sim td.txt:hover { color: var(--accent); }
table.sim td.txt small { display: block; color: var(--muted); font-size: 11.5px; }
table.sim td.act { width: 118px; white-space: nowrap; text-align: right; }
table.sim tr.duplicita td.txt { box-shadow: inset 3px 0 0 var(--danger); }
table.sim tr.ne td.txt { box-shadow: inset 3px 0 0 var(--ok); }
.dup-stav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dup-foot { align-items: center; }
.dup-foot input { flex: 1; font: inherit; font-size: 12.5px; padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface); color: var(--fg); }
table.sim tr.del td { background: var(--danger-soft); }
table.sim tr.del td.txt { text-decoration: line-through; text-decoration-color: var(--danger); color: var(--muted); }
table.sim tr.del td.txt::before { content: "🗑 "; font-size: 10px; text-decoration: none; display: inline-block; }
.hist .d code.del, .hist .d a.del, a.badge.del { text-decoration: line-through; text-decoration-color: var(--danger); color: var(--danger); }
.dec-list { margin-top: 8px; }

/* ---------- toast */
#toast { position: fixed; bottom: 36px; right: 16px; z-index: 10; background: #23272e; color: #fff; padding: 9px 14px; border-radius: 8px; font-size: 12.5px; max-width: 50%; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
#toast.err { background: var(--danger); }
#toast.warn { background: var(--warn); color: #fff; }
a.badge { cursor: pointer; text-decoration: none; }
/* odznak „N změn čeká“ na kartě = tlačítko, které rozbalí tabulku čekajících změn (pole, v DB, čeká, důvod) */
button.badge { font-family: inherit; line-height: inherit; cursor: pointer; }
button.badge.zm-toggle:hover { text-decoration: underline; }
details.zm-det > summary { display: none; }
.zm-tab { width: 100%; border-collapse: collapse; font-size: 12px; margin: 2px 0 8px; border: 1px solid var(--warn-line); }
.zm-tab th, .zm-tab td { padding: 3px 7px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); white-space: pre-line; overflow-wrap: anywhere; }
.zm-tab tr:last-child > * { border-bottom: 0; }
.zm-tab thead th { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); background: var(--warn-soft); }
.zm-tab tbody th { font-weight: 600; white-space: nowrap; }
.zm-tab td.z { color: var(--muted); }
.zm-tab td.d { color: var(--warn); }
.zm-tab td.d span { display: block; color: var(--muted); font-size: 11px; }
a.badge:hover { text-decoration: underline; }
.hist .d code { font-size: 10.5px; color: var(--muted); }

/* ---------- přihlášení */
body.login { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { width: min(340px, calc(100vw - 32px)); display: grid; gap: 12px; padding: 24px 22px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.login-box .brand { justify-content: center; font-size: 16px; margin: 0 0 4px; }
.login-box label { display: grid; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.login-box input { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--fg); }
.login-box .btn { padding: 8px 12px; font-size: 13.5px; }
.login-box .err { color: var(--danger); font-size: 12px; text-align: center; }
.login-box .hint { color: var(--muted); font-size: 11.5px; text-align: center; line-height: 1.4; }
/* ---------- přihlášený uživatel, důvod úpravy */
.who { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--fg); padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.who::before { content: "👤"; font-size: 11px; }
.duvod-row { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.duvod-row .btn { flex: 0 0 auto; }
.duvod { display: flex; align-items: center; gap: 8px; margin: 0; flex: 1 1 auto; min-width: 0; }
.duvod span { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; letter-spacing: .01em; }
.duvod input { flex: 1; font: inherit; font-size: 13px; padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--fg); }
.duvod input.on { border-color: var(--warn-line); background: var(--warn-soft); }
.hist .d em { font-style: normal; color: var(--warn); }

/* „✓ v pořádku“ na kartě: kontrola páru (učební negativ pro AI) */
.badge.kontrola { background: var(--ok-soft); border-color: transparent; color: var(--ok); font-size: 11.5px; }
.btn.kontrola { color: var(--ok); border-color: var(--ok); font-weight: 600; }
.btn.kontrola:hover { background: var(--ok-soft); }
.sim-stary { margin: 0 0 8px; padding: 6px 10px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-line); font-size: 12.5px; }

/* ---------- oblíbené: ★ u úkolu v barvě seznamu (víc seznamů = pruhy), nabídka seznamů */
.fav { font: inherit; font-size: 16px; line-height: 1; padding: 0 2px; border: 0; background: transparent; color: var(--muted); cursor: pointer; opacity: .45; vertical-align: middle; }
.fav:hover { opacity: 1; color: var(--fg); }
.fav.on { color: var(--fav); opacity: 1; text-shadow: 0 0 1px color-mix(in srgb, var(--fg) 45%, transparent); }
.fav.cizi { color: #d99a00; opacity: 1; }  /* nemám ho já, ale má ho v oblíbených někdo jiný */
.fav.sdil { border-bottom: 2px dotted #d99a00; padding-bottom: 1px; }  /* v oblíbených ho má (i) jiný uživatel */
.fav-kde { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 6px; font-size: 12px; margin: 2px 0 6px; }
.fav-kde:empty { display: none; }
.fav-kde-h { color: var(--muted); font-weight: 600; margin-right: 2px; }
.fav-chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 6px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.fav-chip.ja { font-weight: 600; }
.fav-chip .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.fav.multi { color: transparent; background: var(--fav-bg); -webkit-background-clip: text; background-clip: text; text-shadow: none; }
#list td.fav-td { text-align: center; padding-left: 2px; padding-right: 2px; }
table.sim td.act .fav { margin-right: 4px; }
.half h3 .fav { font-size: 19px; margin-right: 2px; }
.favx-slot .fav-x { font-size: 11.5px; padding: 2px 7px; margin-left: 8px; font-weight: 500; }
#fav-menu { position: fixed; z-index: 45; min-width: 240px; max-width: 320px; max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .22); padding: 4px; }
#fav-menu .fav-h { font-size: 11px; font-weight: 700; color: var(--muted); padding: 5px 9px 3px; text-transform: uppercase; letter-spacing: .03em; }
#fav-menu .fav-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; font: inherit; font-size: 13px; padding: 6px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--fg); cursor: pointer; }
#fav-menu .fav-item:hover { background: var(--hover); }
#fav-menu .fav-item.on { font-weight: 600; }
#fav-menu .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fav-menu .n { color: var(--muted); font-size: 11.5px; }
#fav-menu .ck { width: 14px; color: var(--accent); }
#fav-menu .dot { flex: none; width: 11px; height: 11px; border-radius: 50%; }
#fav-menu .fav-empty { padding: 4px 9px 6px; }
#fav-menu .fav-new { display: flex; align-items: center; gap: 6px; padding: 6px 7px 5px 9px; border-top: 1px solid var(--line); margin-top: 3px; }
#fav-menu .fav-new input { flex: 1; min-width: 0; font: inherit; font-size: 12.5px; padding: 4px 7px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--fg); }
#fav-menu .fav-new .btn { padding: 4px 8px; font-size: 12px; }
#fav-menu .fav-all { color: var(--danger); border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; margin-top: 3px; }
select.on.fav-sel { border-color: var(--fav); box-shadow: inset 4px 0 0 var(--fav); }  /* filtr ★: vybraný seznam v jeho barvě */
