/* Fabion — vzhled jako výkres: teplý papír, silné tmavé rámy, úzké tučné nadpisy, strojopis, okrová, šrafy. */

:root {
  --papir: #F1EFEA;
  --plocha: #FAF9F6;
  --plocha-2: #F6F4EF;
  --platno: #E8E5DE;
  --inkoust: #262728;
  --uhel: #2D2E30;
  --text-2: #5E5B55;
  --text-3: #8D8980;
  --linka: #DCD8CE;
  --linka-2: #BEB9AD;
  --ram: 3px solid var(--uhel);
  --okr: #D4B783;
  --okr-svetly: #EFE3C8;
  --okr-text: #8C6B2F;
  --signal: #E4572E;
  --ok: #2BA84A;
  --srafa: repeating-linear-gradient(135deg, transparent 0 9px, rgba(45,46,48,.15) 9px 10px);
  --stin: 0 1px 2px rgba(20,20,20,.05), 0 10px 28px -12px rgba(20,20,20,.18);
  --stin-velky: 0 28px 72px -18px rgba(20,20,20,.34);
  --r: 4px;
  --r-velky: 6px;
  --pismo: "Barlow", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --nadpis: "Barlow Condensed", "Barlow", ui-sans-serif, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --bezpecne-dole: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papir); color: var(--inkoust); font: 400 15px/1.5 var(--pismo); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--okr-svetly); }
:focus-visible { outline: 2px solid var(--uhel); outline-offset: 2px; }

.ik { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ik.m { width: 17px; height: 17px; }

/* Strojopis a nadpisy */
.stitek, .mono { font-family: var(--mono); font-size: 12.5px; font-weight: 400; color: var(--text-2); }
.kod { font-family: var(--mono); font-size: 13px; color: var(--okr-text); }
.mono-cislo { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.nadpis, .serif { font-family: var(--nadpis); font-weight: 700; letter-spacing: .005em; }
.velkymi { text-transform: uppercase; letter-spacing: .045em; }
.srafa { background-image: var(--srafa); }

/* Tlačítka */
.tl { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--r); border: 1.5px solid var(--uhel);
  background: var(--uhel); color: #fff; font-weight: 500; font-size: 15.5px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s, opacity .15s; }
.tl:hover { background: #141516; }
.tl:active { transform: translateY(1px); }
.tl[disabled], .tl.ceka { opacity: .45; pointer-events: none; }
.tl.vedlejsi { background: var(--plocha); color: var(--inkoust); border-color: var(--linka-2); }
.tl.vedlejsi:hover { border-color: var(--uhel); background: #fff; }
.tl.okr { background: var(--okr); border-color: var(--okr); color: var(--inkoust); }
.tl.okr:hover { background: #C9A96F; border-color: #C9A96F; }
.tl.tichy { background: transparent; border-color: transparent; color: var(--text-2); padding: 0 12px; }
.tl.tichy:hover { color: var(--inkoust); background: rgba(45,46,48,.06); }
.tl.velke { height: 52px; padding: 0 26px; font-size: 16.5px; }
.tl.male { height: 34px; padding: 0 12px; font-size: 14px; }
.tl.ikona { width: 40px; height: 40px; padding: 0; }
.tl.nebezpecne { color: #A3321A; }
.tl.plna-sirka { width: 100%; }

/* Formuláře */
label.pole { display: grid; gap: 7px; }
label.pole > span:first-child { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }
.vstup { width: 100%; min-height: 46px; padding: 11px 13px; border: 1.5px solid var(--linka-2); border-radius: var(--r); background: #fff; outline: none; font-size: 15.5px; transition: border-color .15s, box-shadow .15s; }
textarea.vstup { resize: vertical; line-height: 1.55; }
.vstup:focus { border-color: var(--uhel); box-shadow: 0 0 0 3px rgba(212,183,131,.35); }
.vstup::placeholder { color: var(--text-3); }
.hlaska { margin: 0; padding: 11px 14px; border-left: 3px solid #A3321A; background: #F7E6DF; color: #7A2612; font-size: 14px; }
.hlaska.ok { border-color: var(--ok); background: #E6F1E8; color: #1E6B33; }

/* Horní lišta stránek mimo editor */
.lista { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 76px; padding: 0 max(40px, env(safe-area-inset-left));
  background: rgba(241,239,234,.92); backdrop-filter: saturate(1.3) blur(12px); -webkit-backdrop-filter: saturate(1.3) blur(12px); border-bottom: 1px solid var(--linka); }
.znacka { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 700 23px/1 var(--nadpis); letter-spacing: .07em; text-transform: uppercase; }
.znacka-a { display: grid; place-items: center; width: 34px; height: 34px; border: var(--ram); color: var(--uhel); font: 700 20px/1 var(--nadpis); }
.lista-nav { display: flex; gap: 4px; }
.lista-nav a { padding: 9px 16px; text-decoration: none; color: var(--text-2); font-size: 16px; border-bottom: 3px solid transparent; }
.lista-nav a:hover { color: var(--inkoust); }
.lista-nav a[aria-current] { color: var(--inkoust); border-bottom-color: var(--uhel); }

.stranka { max-width: 1560px; margin: 0 auto; padding: 56px 40px 140px; }

/* ── Úvod a přihlášení ───────────────────────────────────────── */
.uvod { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(420px, .65fr); }
.uvod-levy { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding: 44px clamp(24px, 5vw, 72px); overflow: hidden; background: var(--uhel); color: #fff; isolation: isolate; }
.uvod-obraz { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
.uvod-levy::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(16,17,20,.5), rgba(16,17,20,0) 26%, rgba(16,17,20,0) 58%, rgba(16,17,20,.72)); }
.uvod-levy .znacka { color: #fff; }
.uvod-levy .znacka-a { border-color: #fff; }
.uvod-veta { margin: 0; font: 700 clamp(34px, 4.2vw, 64px)/1 var(--nadpis); text-transform: uppercase; letter-spacing: .01em; max-width: 16ch; }
.uvod-pravy { display: flex; align-items: center; justify-content: center; padding: 48px 40px; background: var(--plocha); border-left: var(--ram); }
.prihlaseni { width: 100%; max-width: 380px; display: grid; gap: 20px; }
.prihlaseni h2 { margin: 6px 0 0; font: 700 42px/.98 var(--nadpis); text-transform: uppercase; letter-spacing: .02em; }
.prihlaseni .zahlavi { padding-bottom: 18px; border-bottom: var(--ram); }
.prihlaseni-odkazy { display: flex; justify-content: space-between; gap: 16px; margin: 0; font-size: 15px; }
.prihlaseni-odkazy a { color: var(--text-2); }

/* ── Projekty ─────────────────────────────────────────────────── */
.hlavicka-stranky { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: var(--ram); margin-bottom: 40px; }
.hlavicka-stranky h1 { margin: 4px 0 0; font: 700 clamp(48px, 5.4vw, 76px)/.95 var(--nadpis); letter-spacing: .005em; }
.hlavicka-stranky .podtitul { margin: 10px 0 0; }
.mrizka-projektu { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 32px 28px; }
.projekt-karta { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--plocha); border: var(--ram); transition: transform .2s, box-shadow .2s; }
.projekt-karta:hover { transform: translateY(-2px); box-shadow: var(--stin); }
.projekt-hlava { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 18px 0; }
.projekt-karta h2 { margin: 4px 18px 12px; font: 700 26px/1.05 var(--nadpis); text-transform: uppercase; letter-spacing: .03em; }
.projekt-obr { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--platno); border-top: var(--ram); border-bottom: var(--ram); }
.projekt-obr img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.projekt-karta:hover .projekt-obr img { transform: scale(1.025); }
.projekt-obr .prazdny { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); background-image: var(--srafa); }
.projekt-pata { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px 14px; }
.novy-projekt { display: grid; place-items: center; min-height: 100%; border: 3px dashed var(--linka-2); background: transparent; cursor: pointer; transition: border-color .15s, background .15s; text-align: center; padding: 32px; }
.novy-projekt:hover, .novy-projekt.nad { border-color: var(--uhel); background: var(--plocha); }
.novy-projekt .ik { width: 32px; height: 32px; margin: 0 auto 14px; }
.novy-projekt b { display: block; font: 700 26px/1 var(--nadpis); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 8px; }
.novy-projekt span { color: var(--text-2); font-size: 14.5px; }
.prazdne-projekty { padding: 88px 32px; text-align: center; border: var(--ram); background: var(--plocha) var(--srafa); }
.prazdne-projekty > * { position: relative; }
.prazdne-projekty .obsah { display: inline-block; max-width: 640px; padding: 40px 44px; background: var(--plocha); border: var(--ram); }
.prazdne-projekty h2 { font: 700 52px/.95 var(--nadpis); text-transform: uppercase; margin: 6px 0 14px; }
.prazdne-projekty p { color: var(--text-2); font-size: 17px; max-width: 52ch; margin: 0 auto 28px; }
.formaty { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 22px; }
.formaty span { padding: 3px 9px; border: 1.5px solid var(--linka-2); font: 400 12px var(--mono); color: var(--text-2); }

/* Dialog */
dialog.okno { width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: var(--ram); border-radius: 0; background: var(--plocha); color: var(--inkoust); box-shadow: var(--stin-velky); overflow: auto; }
dialog.okno::backdrop { background: rgba(38,39,40,.42); backdrop-filter: blur(3px); }
dialog.okno.siroke { width: min(1180px, calc(100vw - 32px)); }
.okno-hlava { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 16px; background: var(--plocha); border-bottom: var(--ram); }
.okno-hlava h2 { margin: 0; font: 700 32px/1 var(--nadpis); text-transform: uppercase; letter-spacing: .02em; }
.okno-telo { padding: 24px; display: grid; gap: 18px; }
.okno-pata { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; background: var(--uhel); color: #fff; }
.okno-pata .mono { color: #CFCBC2; }
.okno-pata .tl.vedlejsi { background: transparent; color: #fff; border-color: #5A5B5D; }
.okno-pata .tl.vedlejsi:hover { border-color: #fff; }
.okno-pata .tl:not(.vedlejsi):not(.tichy) { background: var(--okr); border-color: var(--okr); color: var(--inkoust); }
.okno-pata .tl.tichy { color: #E7A08B; }

/* Oznámení */
.toasty { position: fixed; left: 50%; bottom: calc(28px + var(--bezpecne-dole)); transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: var(--uhel); color: #fff; box-shadow: var(--stin-velky); font-size: 15px; animation: toast-in .3s cubic-bezier(.2,.8,.2,1); pointer-events: auto; border-left: 4px solid var(--okr); }
.toast.chyba { border-left-color: #E4572E; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Účet */
.ucet-mrizka { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 28px; }
.karta { background: var(--plocha); border: var(--ram); padding: 26px; display: grid; gap: 18px; align-content: start; }
.karta h2 { margin: 0; font: 700 30px/1 var(--nadpis); text-transform: uppercase; letter-spacing: .03em; }
.tabulka { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabulka td, .tabulka th { padding: 11px 0; border-bottom: 1px solid var(--linka); text-align: left; vertical-align: top; }
.tabulka th { font: 400 12.5px var(--mono); color: var(--text-3); }
.tabulka td:last-child, .tabulka th:last-child { text-align: right; }
.velke-cislo { font: 700 64px/1 var(--nadpis); letter-spacing: .005em; }
.kopirovat { display: flex; gap: 8px; }
.kopirovat input { flex: 1; font: 13px var(--mono); }

/* ── Editor ───────────────────────────────────────────────────── */
body.editor { height: 100vh; height: 100dvh; overflow: hidden; display: grid; grid-template-rows: 64px minmax(0, 1fr); }
.ed-lista { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; padding: 0 16px; background: var(--plocha); border-bottom: var(--ram); z-index: 10; }
.ed-lista-levo { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ed-nazev { min-width: 0; max-width: 460px; padding: 6px 10px; border: 1.5px solid transparent; background: transparent; font: 700 24px/1.1 var(--nadpis); letter-spacing: .01em; text-overflow: ellipsis; }
.ed-nazev:hover { border-color: var(--linka); }
.ed-nazev:focus { border-color: var(--uhel); outline: none; background: #fff; }
.ed-kod { white-space: nowrap; }
.prepinac-zalozek { display: inline-flex; gap: 0; border: var(--ram); }
.prepinac-zalozek button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 20px; border: 0; background: var(--plocha); color: var(--text-2); cursor: pointer; font: 600 17px/1 var(--nadpis); text-transform: uppercase; letter-spacing: .06em; }
.prepinac-zalozek button + button { border-left: var(--ram); }
.prepinac-zalozek button[aria-selected=true] { background: var(--uhel); color: #fff; }
.prepinac-zalozek .pocet { min-width: 22px; height: 20px; padding: 0 6px; background: var(--okr); color: var(--inkoust); font: 500 12px/20px var(--mono); text-align: center; letter-spacing: 0; }
.ed-lista-pravo { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.ulozeno { font: 12.5px var(--mono); color: var(--text-3); display: inline-flex; align-items: center; gap: 7px; }
.ulozeno::before { content: ""; width: 7px; height: 7px; background: var(--ok); }
.ulozeno.uklada::before { background: var(--okr); animation: pulz 1s infinite; }
@keyframes pulz { 50% { opacity: .3; } }

.ed-telo { position: relative; display: grid; grid-template-columns: 68px minmax(0, 1fr) 440px; min-height: 0; }
.ed-telo[hidden], .galerie[hidden] { display: none; }

/* Nástroje vlevo */
.nastroje { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 0; background: var(--plocha); border-right: var(--ram); z-index: 5; }
.nastroje hr { width: 28px; border: 0; border-top: 1.5px solid var(--linka-2); margin: 6px 0; }
.nastroj { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border: 1.5px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; }
.nastroj:hover { border-color: var(--linka-2); color: var(--inkoust); background: #fff; }
.nastroj[aria-pressed=true] { background: var(--uhel); border-color: var(--uhel); color: #fff; }
.nastroj .ik { width: 22px; height: 22px; }
.nastroj .klavesa { position: absolute; right: 2px; bottom: 0; font: 400 10px var(--mono); opacity: .6; }
.nastroj[data-tip]:hover::after { content: attr(data-tip) "   " attr(data-klavesa); white-space: pre; position: absolute; left: 56px; top: 50%; transform: translateY(-50%); padding: 7px 12px; background: var(--uhel); color: #fff; font: 14px var(--pismo); pointer-events: none; z-index: 30; }
.nastroje-mezera { flex: 1; }
.ed-historie { display: inline-flex; gap: 2px; margin-left: 8px; padding-left: 10px; border-left: 1.5px solid var(--linka); }
.ed-historie .tl[disabled] { opacity: .3; }
kbd { display: inline-block; min-width: 20px; padding: 1px 6px; border: 1.5px solid var(--linka-2); border-bottom-width: 2.5px; border-radius: 4px; background: #fff; font: 500 11.5px/1.5 var(--mono); color: var(--inkoust); text-align: center; vertical-align: 1px; }

/* Kontextová lišta nad plátnem: nástroj, aktivní poznámka, rada, akce */
.kontext { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 0; max-width: calc(100% - 40px); background: var(--uhel); color: #fff; box-shadow: var(--stin); font-size: 14px; white-space: nowrap; }
.kontext > * { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 40px; }
.kontext > * + * { border-left: 1px solid #47484B; }
.kontext-nastroj { font: 700 15px/1 var(--nadpis); text-transform: uppercase; letter-spacing: .06em; background: #1F2022; }
.kontext-pozn { font-weight: 600; }
.kontext-pozn i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--barva); color: #fff; font: 500 11px var(--mono); font-style: normal; border: 2px solid #fff; }
.kontext-pozn small { color: #BDB9B0; font: 400 12px var(--mono); }
.kontext-rada { color: #DCD8CF; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex-shrink: 1; }
.kontext-akce { gap: 4px; padding-right: 6px; }
.kontext-akce button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid #55565A; background: transparent; color: #fff; cursor: pointer; font-size: 13.5px; }
.kontext-akce button:hover { border-color: var(--okr); color: var(--okr); }
.kontext kbd { background: transparent; color: #CFCBC2; border-color: #66676B; font-size: 10.5px; min-width: 0; padding: 0 5px; }

/* Nápověda se zkratkami */
.zkratky { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px 32px; }
.zkratky section { display: grid; align-content: start; gap: 0; }
.zkratky h3 { margin: 0 0 8px; padding-bottom: 8px; border-bottom: var(--ram); font: 700 20px/1 var(--nadpis); text-transform: uppercase; letter-spacing: .05em; }
.zkratka { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--linka); font-size: 14.5px; }
.zkratka > span:first-child { color: var(--text-2); font-size: 13px; }
.velikost-stetce { display: grid; justify-items: center; gap: 4px; padding: 6px 0; }
.velikost-stetce input { writing-mode: vertical-lr; direction: rtl; width: 24px; height: 96px; accent-color: var(--uhel); }

/* Plátno */
.platno { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--platno); touch-action: none; user-select: none; -webkit-user-select: none; }
.platno canvas.gl, .platno canvas.obr { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.platno.kurzor-krizek canvas { cursor: crosshair; }
.platno.kurzor-kyblik canvas { cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2228%22%20height%3D%2228%22%20viewBox%3D%220%200%2028%2028%22%3E%3Cg%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5.5%2013.5l7-7%208%208-7%207z%22%20fill%3D%22%23fff%22%20stroke%3D%22%23000%22%20stroke-width%3D%223.5%22/%3E%3Cpath%20d%3D%22M5.5%2013.5l7-7%208%208-7%207z%22%20fill%3D%22%23fff%22%20stroke%3D%22%232D2E30%22%20stroke-width%3D%221.6%22/%3E%3Cpath%20d%3D%22M5.5%2013.5h15%22%20stroke%3D%22%232D2E30%22%20stroke-width%3D%221.6%22/%3E%3Cpath%20d%3D%22M23%2017.5c.9%201.4%201.4%202.4%201.4%203.2a1.4%201.4%200%200%201-2.8%200c0-.8.5-1.8%201.4-3.2z%22%20fill%3D%22%23E4572E%22%20stroke%3D%22%23fff%22%20stroke-width%3D%221%22/%3E%3C/g%3E%3C/svg%3E") 23 22, crosshair; }
.platno.kurzor-stetec canvas { cursor: none; }
.platno.kurzor-posun canvas { cursor: grab; }
.platno .vrstva { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.ram-zaberu { position: absolute; pointer-events: none; box-shadow: 0 0 0 9999px rgba(232,229,222,.7); outline: 1.5px solid var(--uhel); z-index: 2; }
.ram-zaberu::before, .ram-zaberu::after { content: ""; position: absolute; width: 18px; height: 18px; border: 3px solid var(--uhel); }
.ram-zaberu::before { left: -3px; top: -3px; border-right: 0; border-bottom: 0; }
.ram-zaberu::after { right: -3px; bottom: -3px; border-left: 0; border-top: 0; }
.ram-popis { position: absolute; right: 0; bottom: -24px; font: 400 12px var(--mono); color: var(--text-2); white-space: nowrap; }
.stetec-kruh { position: absolute; border: 1.5px solid var(--uhel); border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 1px rgba(255,255,255,.85); transform: translate(-50%, -50%); display: none; z-index: 4; }
.laso-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 4; }
.laso-svg path { fill: rgba(212,183,131,.25); stroke: var(--uhel); stroke-width: 1.5; stroke-dasharray: 6 4; }

/* Tečky poznámek */
.tecka { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 2.5px solid #fff;
  background: var(--barva, var(--signal)); color: #fff; font: 500 13px/1 var(--mono); box-shadow: 0 2px 8px rgba(0,0,0,.3); cursor: pointer; pointer-events: auto; transition: transform .15s, opacity .2s; will-change: transform; }
.tecka:hover { transform: scale(1.12); }
.tecka.vybrana { box-shadow: 0 0 0 3px var(--uhel), 0 4px 14px rgba(0,0,0,.35); }
.tecka.zakryta { opacity: .38; }
.tecka.mimo { display: none; }
.vrstva.propust .tecka { pointer-events: none; }
.tecka-popis { position: absolute; left: 34px; top: 50%; transform: translateY(-50%); padding: 4px 9px; background: var(--uhel); color: #fff; font: 500 13.5px var(--pismo); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s; }
.tecka:hover .tecka-popis, .tecka.vybrana .tecka-popis { opacity: 1; }

/* Plovoucí lišta záběru */
.zaberova-lista { position: absolute; left: 50%; bottom: calc(18px + var(--bezpecne-dole)); transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 5px; background: var(--plocha); border: var(--ram); box-shadow: var(--stin); z-index: 6; max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; }
.zaberova-lista::-webkit-scrollbar { display: none; }
.zaberova-lista .oddel { width: 1.5px; height: 24px; background: var(--linka-2); margin: 0 5px; flex: none; }
.zl-tl { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; white-space: nowrap; font-size: 14.5px; flex: none; }
.zl-tl:hover { background: var(--plocha-2); color: var(--inkoust); }
.zl-tl[aria-pressed=true] { background: var(--uhel); color: #fff; }
.zl-tl .mono-cislo { font-size: 13px; }
.zl-vyber { position: relative; }
.zl-nabidka { position: fixed; min-width: 200px; padding: 6px; background: var(--plocha); border: var(--ram); box-shadow: var(--stin-velky); display: grid; gap: 1px; z-index: 40; }
.zl-nabidka button { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 9px 12px; border: 0; background: transparent; cursor: pointer; text-align: left; font-size: 14.5px; }
.zl-nabidka button:hover { background: var(--plocha-2); }
.zl-nabidka button[aria-checked=true] { background: var(--okr-svetly); font-weight: 600; }
.zl-nabidka button span:last-child { color: var(--text-3); font: 12px var(--mono); }

/* Uložené záběry */
.zabery { position: absolute; left: 16px; top: 16px; display: flex; gap: 10px; z-index: 6; max-width: calc(100% - 32px); overflow-x: auto; padding: 3px; scrollbar-width: none; }
.zabery::-webkit-scrollbar { display: none; }
.zaber { position: relative; flex: none; width: 128px; border: 2px solid var(--uhel); background: var(--plocha); overflow: hidden; cursor: pointer; padding: 0; text-align: left; }
.zaber img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--platno); }
.zaber span { display: block; padding: 5px 8px; font: 400 12px var(--mono); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-top: 2px solid var(--uhel); }
.zaber[aria-current=true] { outline: 3px solid var(--okr); outline-offset: 0; }
.zaber .smazat-zaber { position: absolute; right: 4px; top: 4px; width: 24px; height: 24px; border: 0; background: rgba(250,249,246,.95); display: none; place-items: center; cursor: pointer; }
.zaber:hover .smazat-zaber { display: grid; }

/* Načítání */
.nacitani { position: absolute; inset: 0; display: grid; place-items: center; z-index: 7; background: var(--platno) var(--srafa); transition: opacity .4s; }
.nacitani.pryc { opacity: 0; pointer-events: none; }
.nacitani-obsah { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 28px 36px; background: var(--plocha); border: var(--ram); }
.nacitani-obsah .nadpis { font-size: 26px; text-transform: uppercase; letter-spacing: .05em; }
.nacitani-pruh { width: 260px; height: 6px; background: var(--linka); overflow: hidden; }
.nacitani-pruh i { display: block; height: 100%; width: 0; background: var(--uhel); transition: width .2s; }
.napoveda-platna { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); padding: 9px 16px; background: var(--uhel); color: #fff; font-size: 14.5px; z-index: 6; pointer-events: none; white-space: nowrap; transition: opacity .3s; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis; border-left: 4px solid var(--okr); }
.napoveda-platna:empty { display: none; }

/* Panel vpravo */
.panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; background: var(--plocha); border-left: var(--ram); z-index: 5; }
.panel-zalozky { display: grid; grid-template-columns: 1fr 1fr; border-bottom: var(--ram); }
.panel-zalozky button { position: relative; height: 54px; padding: 0 16px; border: 0; background: var(--plocha-2); color: var(--text-3); cursor: pointer; font: 700 19px/1 var(--nadpis); text-transform: uppercase; letter-spacing: .06em; }
.panel-zalozky button + button { border-left: var(--ram); }
.panel-zalozky button[aria-selected=true] { color: var(--inkoust); background: var(--plocha); box-shadow: inset 0 -4px 0 var(--okr); }
.panel-zalozky .pocet { margin-left: 6px; color: var(--okr-text); font: 400 13px var(--mono); letter-spacing: 0; }
.panel-obsah { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.panel-sekce { padding: 22px 24px; display: grid; gap: 16px; }
.panel-sekce + .panel-sekce { border-top: 1.5px solid var(--linka); }
.panel-sekce h3 { margin: 0; font: 700 18px/1 var(--nadpis); letter-spacing: .07em; text-transform: uppercase; display: flex; justify-content: space-between; align-items: baseline; }
.panel-sekce h3 .mono { text-transform: none; letter-spacing: 0; font-weight: 400; }

/* Legenda poznámek */
.legenda { display: grid; padding: 16px 20px; gap: 12px; }
.legenda-polozka { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border: 2px solid var(--uhel); background: var(--plocha); text-align: left; cursor: pointer; width: 100%; transition: background .12s; }
.legenda-polozka:hover { background: #fff; }
.legenda-polozka.vybrana { background: var(--okr-svetly); }
.legenda-polozka.bez-textu { background-image: var(--srafa); }
.legenda-cislo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--barva); color: #fff; font: 500 13px var(--mono); }
.legenda-text b { display: block; font: 700 19px/1.1 var(--nadpis); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legenda-text span { display: block; margin-top: 3px; color: var(--text-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legenda-fotky { display: flex; }
.legenda-fotky img { width: 34px; height: 34px; object-fit: cover; border: 2px solid var(--plocha); margin-left: -10px; }
.legenda-prazdna { padding: 36px 28px; display: grid; gap: 16px; }
.legenda-prazdna .nadpis { font-size: 34px; line-height: .98; text-transform: uppercase; }
.legenda-prazdna ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; border: var(--ram); counter-reset: krok; }
.legenda-prazdna li { padding: 14px 16px 14px 56px; position: relative; font-size: 15px; color: var(--text-2); counter-increment: krok; }
.legenda-prazdna li + li { border-top: 1.5px solid var(--linka); }
.legenda-prazdna li::before { content: "0." counter(krok); position: absolute; left: 16px; top: 15px; font: 400 13px var(--mono); color: var(--okr-text); }
.legenda-prazdna li b { color: var(--inkoust); font-weight: 600; }

/* Detail poznámky */
.detail-zpet { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; color: var(--text-2); cursor: pointer; font: 400 13px var(--mono); justify-self: start; }
.detail-zpet:hover { color: var(--inkoust); }
.detail-hlava { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: var(--ram); }
.detail-hlava .legenda-cislo { width: 38px; height: 38px; font-size: 14px; flex: none; }
.detail-hlava input { flex: 1; border: 0; padding: 4px 0; font: 700 28px/1 var(--nadpis); text-transform: uppercase; letter-spacing: .03em; background: transparent; outline: none; min-width: 0; }
.detail-hlava input::placeholder { color: var(--text-3); }
.segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 2px solid var(--uhel); }
.segment button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; border: 0; background: var(--plocha); color: var(--text-2); cursor: pointer; font-size: 15px; }
.segment button + button { border-left: 2px solid var(--uhel); }
.segment button:hover { background: #fff; color: var(--inkoust); }
.segment button[aria-pressed=true] { background: var(--okr); color: var(--inkoust); font-weight: 600; }
.navrhy { display: flex; flex-wrap: wrap; gap: 6px; }
.navrhy button { height: 30px; padding: 0 10px; border: 1.5px dashed var(--linka-2); background: transparent; color: var(--text-2); cursor: pointer; font-size: 13.5px; }
.navrhy button:hover { border-style: solid; border-color: var(--uhel); color: var(--inkoust); }
.fotky-mrizka { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fotka { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--platno); border: 2px solid var(--uhel); }
.fotka img { width: 100%; height: 100%; object-fit: cover; }
.fotka button { position: absolute; right: 5px; top: 5px; width: 26px; height: 26px; border: 0; background: rgba(250,249,246,.95); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; }
.fotka:hover button, .fotka:focus-within button { opacity: 1; }
.fotka .fotka-stitek { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 6px; background: rgba(45,46,48,.85); color: #fff; font: 400 10.5px var(--mono); }
.fotka .fotka-znovu { right: 34px; }
.fotka.auto { border-style: dashed; }
.fotka.nahrava::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.6) linear-gradient(90deg, transparent, rgba(255,255,255,.8), transparent) -100% 0 / 50% 100% no-repeat; animation: lesk 1.2s infinite; }
@keyframes lesk { to { background-position: 200% 0; } }
.pridat-fotku { display: grid; place-content: center; justify-items: center; gap: 6px; aspect-ratio: 1; border: 2px dashed var(--linka-2); background: transparent; color: var(--text-2); cursor: pointer; font-size: 13px; text-align: center; padding: 6px; }
.pridat-fotku:hover, .pridat-fotku.nad { border-color: var(--uhel); color: var(--inkoust); background: #fff; }
.oblast-info { display: grid; gap: 8px; padding: 12px 14px; border: 2px solid var(--uhel); background: var(--plocha-2); }
.oblast-info .rady { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.7; }
.oblast-info.prazdna { background-image: var(--srafa); }
.oblast-info .radek { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14.5px; }
.oblast-info .barevny { display: inline-block; width: 14px; height: 14px; background: var(--barva); margin-right: 9px; vertical-align: -2px; }
.oblast-akce { display: flex; flex-wrap: wrap; gap: 6px; }
.rady { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; color: var(--text-3); font-size: 13.5px; }

/* Zadání */
.volba { display: grid; gap: 9px; }
.volba > span { font: 400 12.5px var(--mono); color: var(--text-2); }
.cipy { display: flex; flex-wrap: wrap; gap: 6px; }
.cip { height: 34px; padding: 0 13px; border: 1.5px solid var(--linka-2); background: var(--plocha); color: var(--text-2); cursor: pointer; font-size: 14.5px; transition: all .12s; }
.cip:hover { border-color: var(--uhel); color: var(--inkoust); }
.cip[aria-pressed=true] { background: var(--okr); border-color: var(--okr); color: var(--inkoust); font-weight: 600; }

/* Pata panelu: generovat */
.panel-pata { padding: 18px 24px calc(18px + var(--bezpecne-dole)); background: var(--uhel); color: #fff; display: grid; gap: 12px; }
.gen-volby { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.panel-pata .segment { border-color: #5A5B5D; }
.panel-pata .segment button { height: 34px; font-size: 14px; background: transparent; color: #CFCBC2; }
.panel-pata .segment button + button { border-left-color: #5A5B5D; }
.panel-pata .segment button:hover { color: #fff; background: rgba(255,255,255,.06); }
.panel-pata .segment button[aria-pressed=true] { background: var(--okr); color: var(--inkoust); }
.gen-souhrn { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.gen-souhrn .mono { color: #CFCBC2; }
.gen-souhrn .nadpis { font-size: 30px; line-height: 1; }
.gen-tl { height: 54px; font: 700 21px/1 var(--nadpis); text-transform: uppercase; letter-spacing: .06em; background: var(--okr); border-color: var(--okr); color: var(--inkoust); }
.gen-tl:hover { background: #E0C793; border-color: #E0C793; }
.odkaz-co-jde { justify-self: center; border: 0; background: none; color: #CFCBC2; font: 400 12.5px var(--mono); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #6A6B6D; }
.odkaz-co-jde:hover { color: #fff; }

/* Co jde do modelu */
.vstupy-mrizka { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.vstup-obr { display: grid; gap: 0; border: 2px solid var(--uhel); background: var(--plocha); }
.vstup-obr img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: var(--platno); border-bottom: 2px solid var(--uhel); }
.vstup-obr span { padding: 7px 9px; font: 400 12px var(--mono); color: var(--text-2); }
.vstup-obr span b { color: var(--okr-text); font-weight: 500; margin-right: 6px; }
.prompt-pole { font: 13px/1.6 var(--mono); min-height: 320px; background: #fff; }

/* ── Galerie vizualizací ─────────────────────────────────────── */
.galerie { overflow-y: auto; min-height: 0; background: var(--papir); }
.galerie-vnitrek { max-width: 1680px; margin: 0 auto; padding: 40px 40px 140px; display: grid; gap: 56px; }
.gen-blok { display: grid; gap: 16px; }
.gen-hlava { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding-bottom: 12px; border-bottom: var(--ram); }
.gen-hlava h3 { margin: 4px 0 0; font: 700 32px/1 var(--nadpis); text-transform: uppercase; letter-spacing: .03em; }
.gen-hlava .zadani-text { margin: 6px 0 0; color: var(--text-2); font-size: 15px; max-width: 80ch; }
.gen-obrazky { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr)); }
.gen-obrazky.jeden { max-width: 1240px; }
.gen-obr { position: relative; overflow: hidden; background: var(--platno); border: var(--ram); cursor: zoom-in; }
.gen-obr img { width: 100%; height: auto; }
.gen-obr .oblibeny { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; border: 2px solid var(--uhel); display: grid; place-items: center; background: var(--plocha); cursor: pointer; opacity: 0; transition: opacity .15s; }
.gen-obr:hover .oblibeny, .gen-obr .oblibeny.ano { opacity: 1; }
.gen-obr .oblibeny.ano { background: var(--okr); }
.gen-obr .oblibeny.ano .ik { fill: var(--inkoust); }
.gen-obr .cislo-obr { position: absolute; left: 12px; top: 12px; padding: 3px 8px; background: var(--plocha); border: 2px solid var(--uhel); font: 400 12px var(--mono); }
.gen-ceka { cursor: default; }
.gen-ceka .stav { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--platno) var(--srafa); }
@keyframes lesk2 { from { background-position: 100% 0; } to { background-position: -200% 0; } }
.gen-ceka .stav > div { position: relative; z-index: 1; padding: 16px 22px; background: var(--plocha); border: var(--ram); text-align: center; }
.gen-ceka .stav b { display: block; font: 700 24px/1 var(--nadpis); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.gen-chyba { padding: 18px 20px; border: 2px solid #A3321A; background: #F7E6DF; color: #7A2612; font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.gen-akce { display: flex; flex-wrap: wrap; gap: 6px; }
.galerie-prazdna { margin: 48px auto; max-width: 640px; padding: 44px; text-align: center; color: var(--text-2); border: var(--ram); background: var(--plocha); font-size: 16px; }
.galerie-prazdna .nadpis { font-size: 48px; color: var(--inkoust); line-height: .95; margin-bottom: 14px; text-transform: uppercase; }

/* Prohlížeč vizualizace */
.prohlizec { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-rows: 64px minmax(0, 1fr) auto; background: #161718; color: #fff; }
.prohlizec[hidden] { display: none; }
.proh-lista { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; border-bottom: 1px solid #333436; }
.proh-lista .nadpis { font-size: 22px; text-transform: uppercase; letter-spacing: .05em; }
.proh-lista .mono { color: #A9A59C; }
.prohlizec .tl.vedlejsi { background: transparent; color: #fff; border-color: #4A4B4D; }
.prohlizec .tl.vedlejsi:hover { border-color: #fff; }
.prohlizec .tl.vedlejsi[aria-pressed=true] { background: var(--okr); border-color: var(--okr); color: var(--inkoust); }
.prohlizec .tl.tichy { color: #CFCBC2; }
.prohlizec .tl.tichy:hover { background: #26272A; color: #fff; }
.prohlizec .tl:not(.vedlejsi):not(.tichy) { background: var(--okr); color: var(--inkoust); border-color: var(--okr); }
.proh-plocha { position: relative; min-height: 0; display: grid; place-items: center; padding: 24px; overflow: hidden; touch-action: none; }
.proh-ramec { position: relative; max-width: 100%; max-height: 100%; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.proh-ramec img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
.proh-ramec.porovnava { cursor: ew-resize; touch-action: none; }
.proh-ramec.porovnava img { pointer-events: none; }
.proh-ramec > img, .proh-ramec > canvas.obr-proh { display: block; max-width: 100%; max-height: calc(100vh - 64px - 48px - 80px); max-height: calc(100dvh - 64px - 48px - 80px); width: auto; height: auto; }
.proh-ramec canvas.maska { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; cursor: none; touch-action: none; }
.kurzor-stetce { position: absolute; display: none; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.65), inset 0 0 0 1px rgba(0,0,0,.35); transform: translate(-50%, -50%); pointer-events: none; z-index: 2; }
.kurzor-stetce::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.kurzor-stetce.guma { border-style: dashed; }
.prohlizec.upravuje .proh-plocha { padding-right: 496px; }
.proh-ramec .porovnani { position: absolute; inset: 0; overflow: hidden; }

.proh-ramec .kontrola { position: absolute; inset: 0; pointer-events: none; }
.proh-ramec .kontrola-hrany { position: absolute; inset: 0; width: 100%; height: 100%; }
.proh-ramec .tahlo { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--okr); cursor: ew-resize; }
.proh-ramec .tahlo::after { content: "◂ ▸"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 46px; height: 32px; background: var(--okr); color: var(--inkoust); font: 500 12px var(--mono); }
.proh-ramec .popis-porovnani { position: absolute; top: 12px; padding: 3px 8px; background: rgba(22,23,24,.8); font: 400 12px var(--mono); }
.proh-ramec .porovnani { background: #F1F0EC; }
.proh-ramec .porovnani img { position: absolute; max-width: none; max-height: none; }
.porovnani-lista { position: absolute; right: 12px; top: 12px; display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; background: rgba(22,23,24,.85); z-index: 2; }
.porovnani-lista .mono { color: #CFCBC2; font-size: 12px; margin-right: 4px; }
.porovnani-lista button { height: 28px; padding: 0 10px; border: 1px solid #55565A; background: transparent; color: #fff; cursor: pointer; font-size: 13px; }
.porovnani-lista button:hover, .porovnani-lista button[aria-pressed=true] { border-color: var(--okr); color: var(--okr); }
.proh-ramec.doladuje { cursor: move; }
.proh-pata { display: flex; justify-content: center; gap: 10px; padding: 14px 16px calc(14px + var(--bezpecne-dole)); border-top: 1px solid #333436; flex-wrap: wrap; }
.uprava-panel { position: absolute; right: 24px; top: 88px; bottom: 24px; width: 448px; background: var(--plocha); color: var(--inkoust); border: var(--ram); box-shadow: var(--stin-velky); display: flex; flex-direction: column; z-index: 3; }
.uprava-sekce { display: grid; gap: 10px; padding-bottom: 16px; border-bottom: 1.5px solid var(--linka); }
.uprava-sekce:last-child { border-bottom: 0; padding-bottom: 0; }
.uprava-sekce h4 { margin: 0; display: flex; gap: 10px; align-items: baseline; font: 700 18px/1 var(--nadpis); text-transform: uppercase; letter-spacing: .05em; }
.uprava-sekce .rady { margin: 0; color: var(--text-2); }
.uprava-nastroje { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: center; }
.uprava-nastroje input[type=range] { width: 100%; accent-color: var(--uhel); }
.cip-barva { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--barva); margin-right: 7px; }
.uprava-panel .fotka { padding: 0; cursor: pointer; }
.uprava-panel .fotka.vybrana { outline: 3px solid var(--okr); outline-offset: -1px; }
.uprava-panel .obsah { overflow-y: auto; min-height: 0; flex: 1; }
.uprava-panel .tl.tichy { color: var(--text-2); }
.uprava-panel .tl.tichy:hover { background: var(--plocha-2); color: var(--inkoust); }
.uprava-panel .obsah { padding: 20px 22px; display: grid; gap: 14px; }
.uprava-panel h3 { margin: 0; font: 700 28px/1 var(--nadpis); text-transform: uppercase; letter-spacing: .03em; padding: 18px 22px 14px; border-bottom: var(--ram); }
.uprava-panel .pata { padding: 14px 22px; background: var(--uhel); display: flex; gap: 8px; justify-content: flex-end; }
.uprava-panel .pata .tl.vedlejsi { color: #fff; }
.prepinac-radek { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14.5px; color: var(--text-2); }

/* Přepínač */
.prepinac { position: relative; width: 40px; height: 22px; flex: none; appearance: none; -webkit-appearance: none; border: 2px solid var(--uhel); background: var(--plocha); cursor: pointer; transition: background .15s; margin: 0; }
.prepinac::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; background: var(--uhel); transition: transform .15s; }
.prepinac:checked { background: var(--okr); }
.prepinac:checked::after { transform: translateX(18px); }

/* ── Mobil ────────────────────────────────────────────────────── */
.jen-mobil { display: none !important; }
@media (max-width: 1180px) { .ed-telo { grid-template-columns: 60px minmax(0, 1fr) 380px; } }
@media (max-width: 900px) {
  .uvod { grid-template-columns: 1fr; }
  .uvod-levy { min-height: 240px; padding: 20px 16px; gap: 24px; }
  .uvod-pravy { border-left: 0; border-top: var(--ram); padding: 36px 20px; }
  .lista { padding: 0 16px; height: 64px; }
  .stranka { padding: 32px 16px 96px; }
  .hlavicka-stranky { flex-direction: column; align-items: flex-start; }
  .mrizka-projektu { grid-template-columns: 1fr; }

  body.editor { grid-template-rows: 56px minmax(0, 1fr); }
  .ed-lista { grid-template-columns: auto minmax(0, 1fr) auto; padding: 0 6px; gap: 6px; }
  .ed-lista-levo .ed-nazev, .ed-kod { display: none; }
  .ed-lista .prepinac-zalozek { justify-self: center; }
  .prepinac-zalozek button { padding: 0 12px; font-size: 15px; }
  .ed-lista-pravo .ulozeno { display: none; }
  .ed-telo { grid-template-columns: minmax(0, 1fr); }
  .nastroje { position: absolute; left: 8px; right: 8px; top: 8px; flex-direction: row; justify-content: flex-start; border: var(--ram); padding: 3px; box-shadow: var(--stin); overflow-x: auto; scrollbar-width: none; }
  .nastroje::-webkit-scrollbar { display: none; }
  .nastroje hr { width: 0; height: 24px; margin: 0 4px; border-top: 0; border-left: 1.5px solid var(--linka-2); }
  .velikost-stetce, .zabery { display: none !important; }
  .kontext { top: 64px; flex-wrap: wrap; white-space: normal; max-width: calc(100% - 16px); font-size: 13px; }
  .kontext > * { height: 34px; padding: 0 10px; }
  .kontext-rada { display: none; }
  .ed-historie { margin-left: 0; padding-left: 4px; }
  .nastroje-mezera { display: none; }
  .nastroj { width: 40px; height: 40px; }
  .nastroj[data-tip]:hover::after, .nastroj .klavesa { display: none; }
  .panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 82%; border-left: 0; border-top: var(--ram); box-shadow: 0 -12px 40px rgba(0,0,0,.16); transform: translateY(calc(100% - 262px - var(--bezpecne-dole))); transition: transform .3s cubic-bezier(.2,.8,.2,1); z-index: 8; }
  .panel.otevreny { transform: none; }
  .panel { grid-template-rows: auto auto minmax(0, 1fr); }
  .panel-obsah { min-height: 120px; }
  .panel-pata { order: -1; padding: 12px 14px; }
  .panel-pata { gap: 8px; }
  .panel-pata .segment button { height: 30px; font-size: 13px; }
  .odkaz-co-jde { display: none; }
  .gen-tl { height: 46px; }
  .zaberova-lista { bottom: calc(272px + var(--bezpecne-dole)); }
  .jen-mobil { display: inline-flex !important; }
  .bez-mobilu { display: none !important; }
  .galerie-vnitrek { padding: 24px 14px 120px; }
  .proh-lista .popis-proh { display: none; }
  .uprava-panel { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; height: 58%; }
  .prohlizec.upravuje .proh-plocha { padding: 12px 12px 60%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Kredity a ceník */
.cenik { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 28px; }
.plan.doporuceny { border-color: var(--okr); box-shadow: inset 0 0 0 2px var(--okr); }
.plan .velke-cislo { font-size: 52px; }
.plan-seznam { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 15px; }
.kredity-stav { display: block; text-align: center; font-size: 12px; color: inherit; opacity: .75; text-decoration: none; margin-top: 8px; }
.kredity-stav:hover { opacity: 1; text-decoration: underline; }
.tl[disabled] { opacity: .45; cursor: not-allowed; }
@media (max-width: 560px) {
  .lista { gap: 8px; }
}
.zamek-stav { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 8px 0 0; font-size: 12px; color: var(--okr); }
.zamek-stav button { border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
.zamek-stav[hidden] { display: none; }
.videa { display: grid; gap: 14px; margin-bottom: 36px; }
.videa-mrizka { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.video-karta { margin: 0; display: grid; gap: 8px; }
.video-karta video, .video-bezi { display: block; width: 100%; aspect-ratio: 3 / 2; background: #161718 center / cover; }
.video-bezi { display: grid; place-items: end start; padding: 10px; }
.video-bezi span { padding: 3px 8px; background: rgba(22,23,24,.85); color: #fff; font-size: 12px; }
.video-karta figcaption { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.video-karta figcaption span { display: flex; gap: 12px; }
.video-karta figcaption button { border: 0; background: none; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
.uprava-video { display: grid; gap: 10px; }
.uprava-video h4 { margin: 6px 0 0; font: 400 12.5px var(--mono); color: var(--text-3); }
.uprava-video .segment { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); height: auto; }
.uprava-video .segment button { height: auto; min-height: 40px; padding: 8px 10px; }
.okno-video .segment:first-of-type { grid-template-columns: 1fr; }
.uprava-video .pata .tl.vedlejsi { color: var(--inkoust); background: transparent; border-color: var(--linka-2); }
.uprava-video .pata { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.video-cile { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.video-cile button { padding: 0; border: 2px solid transparent; background: none; cursor: pointer; }
.video-cile button[aria-pressed="true"] { border-color: var(--okr); }
.video-cile img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.pata-odkazy { margin-top: 36px; display: flex; gap: 18px; font-size: 13px; }
.pravidla { max-width: 760px; }
.pravidla h2 { margin: 32px 0 10px; }
.pravidla li { margin-bottom: 8px; }
@media (max-width: 420px) {
}
.styl-vzor { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* Mobil: vysouvací panely zdola */
.panel-uchop { display: none; }
.seznam-akci { display: grid; gap: 8px; padding: 12px 16px calc(16px + var(--bezpecne-dole)); }
.seznam-akci .tl { width: 100%; justify-content: flex-start; height: 50px; color: var(--inkoust) !important; background: var(--plocha) !important; border-color: var(--linka-2) !important; }
.seznam-akci .tl[aria-pressed="true"] { border-color: var(--okr); box-shadow: inset 0 0 0 1px var(--okr); }
@media (max-width: 900px) {
  input, textarea, select { font-size: 16px !important; }   /* menší písmo v poli iPhone přiblíží stránku */
  .tl { min-height: 44px; }
  .pata-odkazy { flex-wrap: wrap; }
  .tabulka { display: block; overflow-x: auto; }
  .tabulka tbody { display: table; width: 100%; }
  .kopirovat { flex-wrap: wrap; }

  dialog.okno, dialog.okno.siroke { width: 100%; max-width: 100%; margin: auto 0 0; max-height: 88dvh; border-width: 2px 0 0; transition: transform .22s ease; animation: panel-nahoru .22s ease; padding-bottom: var(--bezpecne-dole); }
  .okno-hlava { padding: 26px 16px 12px; }
  .okno-hlava::before { content: ""; position: absolute; top: 10px; left: 50%; width: 44px; height: 4px; margin-left: -22px; background: var(--linka-2); }
  .okno-hlava h2 { font-size: 24px; }
  .okno-telo { padding: 16px; }
  .okno-pata { padding: 12px 16px; flex-wrap: wrap; }
  .zl-nabidka { position: fixed !important; left: 0 !important; right: 0; top: auto !important; bottom: 0; width: 100%; max-height: 70dvh; overflow-y: auto; border-width: 2px 0 0; padding-bottom: var(--bezpecne-dole); animation: panel-nahoru .22s ease; z-index: 60; }
  .zl-nabidka button { min-height: 50px; }

  .panel-uchop { display: block !important; position: relative; height: 20px; flex: none; touch-action: none; cursor: grab; }
  .panel-uchop::before { content: ""; position: absolute; top: 8px; left: 50%; width: 44px; height: 4px; margin-left: -22px; background: #6A6B6E; }
  .panel { grid-template-rows: auto auto auto minmax(0, 1fr); transform: translateY(calc(100% - 174px - var(--bezpecne-dole))); }
  .panel .panel-uchop { order: -2; background: var(--uhel); }
  .panel-pata { order: -1; touch-action: none; padding-top: 2px; }
  .zaberova-lista { bottom: calc(182px + var(--bezpecne-dole)); }
  .kredity-stav { margin-top: 2px; }
  .panel:not(.otevreny) .kredity-stav, .panel:not(.otevreny) .zamek-stav { display: none; }

  /* Výběr ploch: nástroje jen pro označování, panel zasunutý, lišta dole; panel se vysune až pro popis povrchu */
  .nastroj[data-nastroj="vyber"], .nastroj[data-nastroj="otacet"], .nastroj[data-nastroj="posun"], .nastroje hr, #napoveda-tl { display: none; }
  .nastroje { left: 50%; right: auto; transform: translateX(-50%); gap: 6px; }
  .nastroj { width: 48px; height: 44px; }
  .kontext { top: 66px; left: 50%; right: auto; pointer-events: none; }
  .kontext:empty { display: none; }
  .kontext-tip { font-size: 13px; color: #fff; white-space: nowrap; }
  body.vyberove .panel { transform: translateY(calc(100% + 140px)); }
  body.vyberove .zaberova-lista { display: none; }
  body.popisuje .panel-pata, body.popisuje .kontext { display: none; }
  body.vyberove .kontext { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; top: auto; left: 8px; right: 8px; bottom: calc(10px + var(--bezpecne-dole)); max-width: none; padding: 8px; transform: none; pointer-events: auto; touch-action: none; animation: panel-nahoru .22s ease; }
  body.vyberove .kontext > * { height: 44px; padding: 0; border: 0; }
  body.vyberove .kontext-pozn { justify-content: flex-start; }
  body.vyberove .kontext-pozn small { font-size: 13px; color: #fff; white-space: nowrap; }
  .kontext-rezim { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
  .kontext-rezim button { border: 0; background: transparent; color: #DCD8CF; font-size: 13px; }
  .kontext-rezim button[aria-pressed="true"] { background: #fff; color: var(--uhel); font-weight: 600; }
  .kontext-hotovo, .kontext-popsat { font-weight: 600; font-size: 15px; }
  body.vyberove .kontext .kontext-hotovo, body.vyberove .kontext .kontext-popsat { justify-content: center; }
  body.vyberove .kontext .kontext-hotovo { border: 1px solid #66676B; background: transparent; color: #fff; }
  body.vyberove .kontext .kontext-popsat { background: var(--okr); color: var(--uhel); }

  .proh-pata { flex-wrap: nowrap; gap: 8px; padding: 10px 12px calc(10px + var(--bezpecne-dole)); }
  .proh-pata .tl { flex: 1 1 auto; min-width: 0; justify-content: center; padding: 0 10px; white-space: nowrap; font-size: 14px; }
  .proh-pata .tl svg { flex: none; width: 20px; height: 20px; }
  .proh-lista { min-width: 0; padding: 0 8px; }
  .proh-lista > div { min-width: 0; }
  .proh-lista .nadpis { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .proh-lista .tl { flex: none; }
  .uprava-video .segment { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .okno-video .segment:first-of-type { grid-template-columns: 1fr; }
  .uprava-video .segment button { min-width: 0; }
  .panel-obsah .rady { display: none; }
  .proh-lista .jen-mobil { color: #A9A59C; }
  .proh-plocha { touch-action: pan-y pinch-zoom; }
  .porovnani-lista, .kontrola .porovnani-lista { left: 0; right: 0; top: calc(100% + 10px); flex-wrap: wrap; padding: 0; background: none; pointer-events: auto; }
  .porovnani-lista .mono { flex: 1 1 100%; margin: 0 0 4px; }

  .uprava-panel { left: 0; right: 0; bottom: 0; height: 56dvh; border-width: 2px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.3); transition: height .22s ease; animation: panel-nahoru .22s ease; }
  .uprava-panel h3 { position: relative; padding: 24px 16px 10px; font-size: 22px; touch-action: none; cursor: grab; }
  .uprava-panel h3::before { content: ""; position: absolute; top: 9px; left: 50%; width: 44px; height: 4px; margin-left: -22px; background: var(--linka-2); }
  .uprava-panel.sbaleny { height: calc(132px + var(--bezpecne-dole)); }
  .uprava-panel.sbaleny .obsah { display: none; }
  .uprava-panel .obsah { padding: 14px 16px; }
  .uprava-panel .pata { padding: 10px 16px calc(10px + var(--bezpecne-dole)); margin-top: auto; }
  .prohlizec.upravuje .proh-plocha { padding: 8px 8px calc(56dvh + 8px); align-items: flex-start; }
  .prohlizec.upravuje .proh-pata { display: none; }
}
@media (max-width: 420px) {
  .prepinac-zalozek button { padding: 0 9px; font-size: 13.5px; }
  #krok-vpred { display: none; }
}
@keyframes panel-nahoru { from { transform: translateY(100%); } to { transform: none; } }

/* Čekání na výsledek: běží vždy, i s Omezit pohyb (jinak by to vypadalo jako zaseknuté) */
.gen-ceka .stav, .video-bezi { overflow: hidden; }
.gen-ceka .stav::after, .video-bezi::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; background: linear-gradient(100deg, transparent, rgba(214,178,116,.5) 75%, rgba(214,178,116,.95) 99%, #B98A3C 100%); animation: skener 2s cubic-bezier(.45,0,.55,1) infinite !important; pointer-events: none; }
.video-bezi { position: relative; }
.video-bezi span { position: relative; z-index: 1; }
.gen-ceka .stav > div b::before { content: ""; display: inline-block; width: 15px; height: 15px; margin-right: 9px; vertical-align: -2px; border: 3px solid var(--linka-2); border-top-color: var(--inkoust); border-radius: 50%; animation: tocit .8s linear infinite !important; }
.gen-tl.ceka, .tl.ceka { opacity: 1; position: relative; color: transparent !important; }
.tl.ceka > * { visibility: hidden; }
.tl.ceka::after { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border: 3px solid rgba(0,0,0,.2); border-top-color: var(--inkoust); border-radius: 50%; animation: tocit .8s linear infinite !important; }
@keyframes skener { from { transform: translateX(-100%); } to { transform: translateX(222%); } }
@keyframes tocit { to { transform: rotate(360deg); } }
.banka-vzorku { display: grid; gap: 6px; }
.banka-vzorku > span { font: 400 12px var(--mono); color: var(--text-3); }
.banka-radek { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.banka-radek::-webkit-scrollbar { display: none; }
.banka-radek button { flex: none; width: 74px; padding: 0; border: 1.5px solid var(--linka-2); background: var(--plocha); cursor: pointer; font-size: 10.5px; line-height: 1.2; text-align: left; color: var(--text-2); }
.banka-radek button:hover { border-color: var(--okr); }
.banka-radek img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.banka-radek span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 3px 4px; height: 2.9em; }

/* Vlaječka jazyka */
.jazyky { display: inline-flex; align-items: center; gap: 2px; margin-left: 8px; font: 500 14px/1 var(--mono, monospace); color: var(--text-2); flex: none; }
.jazyky button { min-width: 40px; height: 40px; padding: 0 4px; border: 0; background: none; color: var(--text-2); font: inherit; cursor: pointer; }
.jazyky button:hover { color: var(--inkoust); text-decoration: underline; }
.jazyk-ten { min-width: 40px; text-align: center; color: var(--inkoust); font-weight: 600; }
.jazyky-del { color: var(--linka-2); }
.jazyky-roh { position: absolute; top: 8px; right: 10px; z-index: 30; padding: 0 2px; background: var(--plocha); border: 1px solid var(--linka); }
.jazyky-roh .jazyky { margin-left: 0; }
.hamburger { display: none; width: 44px; height: 44px; margin-right: -10px; padding: 0; place-items: center; border: 0; background: none; color: var(--uhel); cursor: pointer; }
.lista-nav { align-items: center; }
.prepinac-radek.jen-mobil { justify-content: space-between; width: 100%; }

/* Správa překladů */
.prekl-stat { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin: 0 0 20px; }
.prekl-radek { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 90px; gap: 12px; padding: 12px 0; border-top: 1px solid var(--linka); align-items: start; }
.prekl-radek textarea { width: 100%; min-height: 44px; }
.prekl-radek small { display: block; color: var(--text-3); font-family: var(--mono); font-size: 12px; margin-top: 4px; }
.prekl-radek.novy { background: var(--okr-svetly); }
@media (max-width: 700px) { .prekl-radek { grid-template-columns: 1fr; } }

/* Mobil: lišta s hamburgerem, volby v rozbalovacím panelu */
@media (max-width: 900px) {
  .hamburger { display: grid; }
  .lista-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 6px 16px 12px; background: var(--plocha); border-bottom: var(--ram); box-shadow: 0 12px 24px rgba(0,0,0,.14); }
  .hamburger[aria-expanded=true] + .lista-nav { display: flex; }
  .lista-nav a { padding: 15px 2px; font-size: 18px; border-bottom: 1px solid var(--linka); overflow-wrap: anywhere; }
  .lista-nav a[aria-current] { font-weight: 600; border-bottom-color: var(--linka); }
  .lista-nav .jazyky { margin: 8px 0 0 -4px; align-self: flex-start; }
}

/* Mobil: hlavička vizualizace pod sebou, delší popisky tlačítek nesmí rozšířit stránku */
@media (max-width: 700px) {
  .galerie-vnitrek, .gen-blok { grid-template-columns: minmax(0, 1fr); }
  .gen-hlava { flex-direction: column; align-items: stretch; gap: 12px; }
  .gen-hlava > * { min-width: 0; }
}
@media (max-width: 560px) {
  .prepinac-zalozek .ik { display: none; }
  .prepinac-zalozek button { gap: 6px; padding: 0 8px; }
}
@media (max-width: 360px) {
  .prepinac-zalozek button { padding: 0 5px; font-size: 12.5px; letter-spacing: .02em; }
  .prepinac-zalozek .pocet { display: none; }
}

/* Zkušební období */
.pruh-zkouska { margin: 0; padding: 10px max(40px, env(safe-area-inset-left)); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; background: var(--okr-svetly); border-bottom: 1px solid var(--linka); font-size: 14.5px; }
.pruh-zkouska a { color: var(--inkoust); font-weight: 600; }
.pruh-zkouska.konec { background: #F7E6DF; color: #7A2612; }
@media (max-width: 900px) { .pruh-zkouska { padding: 10px 16px; } }
.registrace { max-width: 480px; margin: 40px auto; }

/* Místo stavby */
.okno-misto .misto-telo { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.misto-mapa { display: block; width: 100%; aspect-ratio: 1; cursor: crosshair; touch-action: none; background: #ddd; }
.misto-bok { display: grid; gap: 10px; }
.misto-bok h4 { margin: 8px 0 0; }
.misto-bok .pata { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px; }
.misto-hledani { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.misto-vysledky { display: flex; flex-wrap: wrap; gap: 6px; }
.misto-vysledky .cip { height: auto; min-height: 34px; padding: 6px 12px; text-align: left; }
.misto-volba { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
@media (max-width: 800px) { .okno-misto .misto-telo { grid-template-columns: minmax(0, 1fr); } }

/* Plovoucí panely a prezentace */
.uchop-panelu { display: none; }
.gal-lista { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.prez-vyber button[aria-pressed=true] { outline: 3px solid var(--okr); outline-offset: -3px; }
.prez-reakce p { margin: 0 0 6px; }
.okno-telo .pata { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (min-width: 1001px) {
  body.plovouci .ed-telo { grid-template-columns: minmax(0, 1fr); }
  body.plovouci .panel, body.plovouci .nastroje { position: fixed; z-index: 30; box-shadow: 0 10px 34px rgba(38,39,40,.28); border: var(--ram); }
  body.plovouci .panel { left: calc(100vw - 460px); top: 84px; width: 430px; height: calc(100vh - 110px); max-height: calc(100dvh - 40px); }
  body.plovouci .nastroje { left: 16px; top: 84px; width: 64px; height: auto; max-height: calc(100vh - 100px); overflow: auto; }
  body.plovouci .nastroje-mezera { display: none; }
  body.plovouci .uchop-panelu { display: block; width: 100%; height: 22px; padding: 0; border: 0; background: var(--uhel); color: #CFCBC2; cursor: move; font: 400 14px/22px monospace; touch-action: none; }
  body.plovouci .panel { grid-template-rows: auto auto minmax(0, 1fr) auto; }
}
@media (max-width: 1000px) { .jen-desktop { display: none; } }

/* Prezentace: firma a barvy */
.prez-pole { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.prez-logo { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 14px; align-items: center; }
.prez-logo > img { width: 180px; height: 90px; object-fit: contain; background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.prez-logo-akce { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.prez-barvy { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.prez-barva { display: flex; align-items: center; gap: 7px; font-size: 14.5px; }
.prez-barva input { width: 40px; height: 34px; padding: 0; border: 1.5px solid var(--linka-2); background: none; cursor: pointer; }
.prez-nahled { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1.5px solid var(--linka-2); flex: 1 1 280px; font-size: 14.5px; }
.prez-nahled span, .prez-nahled i { padding: 5px 10px; font-style: normal; }
.prez-tecky { display: inline-block; width: 30px; height: 14px; margin-right: 7px; vertical-align: -2px; border: 1px solid var(--linka-2); }
.prez-vyber button { position: relative; }
.prez-znacka { position: absolute; left: 4px; bottom: 4px; padding: 1px 5px; background: rgba(0,0,0,.7); color: #fff; font: 400 11px var(--mono); }
@media (max-width: 700px) { .prez-pole, .prez-logo { grid-template-columns: minmax(0, 1fr); } }
.segment a { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 12px; background: var(--plocha); color: var(--text-2); text-decoration: none; font-size: 14.5px; }
.segment a + a { border-left: 2px solid var(--uhel); }
.segment a.zapnuto { background: var(--okr); color: var(--inkoust); font-weight: 600; }
.segment-volba { display: grid; cursor: pointer; }
.segment-volba input { position: absolute; opacity: 0; }
.segment-volba span { display: grid; place-items: center; height: 40px; font-weight: 500; }
.segment-volba + .segment-volba { border-left: 2px solid var(--uhel); }
.segment-volba input:checked + span { background: var(--okr); font-weight: 600; }
.zl-tl[aria-pressed=true] { background: var(--uhel); color: #fff; }
.volba[hidden] { display: none; }
.zl-tl[hidden] { display: none; }

/* Admin */
.adm-zpet { margin: 0 0 6px; } .adm-zpet a { color: var(--text-3); text-decoration: none; }
.adm-rozcestnik { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.adm-rozcestnik a { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.adm-rozcestnik a:hover { border-color: var(--okr); transform: translateY(-2px); }
.adm-rozcestnik p { margin: 0; color: var(--text-2); }
.adm-rozcestnik .mono { font-size: 13px; color: var(--okr-text); }
.adm-atelier { border-top: 1px solid var(--linka); }
.adm-atelier:last-of-type { border-bottom: 1px solid var(--linka); }
.adm-atelier summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 110px; gap: 16px; align-items: center; padding: 14px 0; cursor: pointer; list-style: none; }
.adm-atelier summary::-webkit-details-marker { display: none; }
.adm-atelier summary b { display: block; font-weight: 600; }
.adm-atelier small { display: block; color: var(--text-3); font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.adm-zust { text-align: right; } .adm-zust b { display: inline; font: 700 26px/1 var(--nadpis); }
.adm-formy { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; padding: 8px 0 20px; }
.adm-formy > form { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; align-items: end; }
.adm-tl { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.adm-sloupec { display: grid; gap: 12px; align-content: start; }
.adm-radek { display: flex; gap: 8px; } .adm-radek .vstup { width: 76px; }
.adm-dlazdice { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 24px; }
.adm-dlazdice > div { display: grid; gap: 2px; padding: 16px 18px; background: var(--plocha); border: var(--ram); }
.adm-dlazdice span, .adm-dlazdice small { font: 400 12.5px var(--mono); color: var(--text-3); }
.adm-dlazdice b { font: 700 36px/1.05 var(--nadpis); }
.adm-mrizka { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; }
.adm-mrizka .karta { min-width: 0; }
.adm-graf { display: block; width: 100%; height: auto; }
.adm-graf line { stroke: var(--linka); stroke-width: 1; }
.adm-graf text { font: 400 11px var(--mono); fill: var(--text-3); }
.adm-graf .r0 { fill: #B8863B; } .adm-graf .r1 { fill: var(--uhel); }
.adm-graf .zasah { fill: transparent; }
.adm-mrizka section:nth-child(2) .adm-graf .r0 { fill: var(--uhel); }
.adm-legenda { display: flex; gap: 8px; align-items: center; margin: 0; font: 400 13px var(--mono); color: var(--text-2); }
.adm-legenda i { width: 12px; height: 12px; } .adm-legenda i.r0 { background: #B8863B; } .adm-legenda i.r1 { background: var(--uhel); margin-left: 12px; }
.adm-pruhy { display: grid; gap: 8px; }
.adm-pruhy > div { display: grid; grid-template-columns: 130px minmax(0, 1fr) 84px; gap: 10px; align-items: center; font-size: 15px; }
.adm-pruhy > div { position: relative; }
.adm-pruhy i { display: block; height: 12px; background: #B8863B; border-radius: 0 3px 3px 0; grid-column: 2; }
.adm-pruhy b { font-weight: 500; text-align: right; grid-column: 3; white-space: nowrap; }
.adm-tabulka { overflow-x: auto; }
.adm-tabulka .tabulka { min-width: 1080px; font-size: 14px; } .adm-tabulka td, .adm-tabulka th { padding-right: 14px; white-space: nowrap; }
.adm-tip { position: absolute; z-index: 40; padding: 6px 10px; background: var(--uhel); color: #fff; font: 400 12.5px var(--mono); pointer-events: none; white-space: nowrap; }
@media (max-width: 900px) { .adm-mrizka, .adm-formy { grid-template-columns: minmax(0, 1fr); } .adm-atelier summary { grid-template-columns: minmax(0, 1fr) auto; } .adm-atelier summary .mono { grid-row: 2; grid-column: 1 / -1; } .adm-pruhy > div { grid-template-columns: 110px minmax(0, 1fr) 76px; } }
.adm-uloha { display: grid; grid-template-columns: 190px repeat(3, minmax(0, 1fr)) auto; gap: 14px; align-items: start; padding: 16px 0; border-top: 1px solid var(--linka); scroll-margin-top: 90px; }
.adm-uloha-nazev b { display: block; font: 700 22px/1.1 var(--nadpis); text-transform: uppercase; letter-spacing: .02em; }
.adm-uloha-nazev small, .adm-vysledek { display: block; color: var(--text-3); font: 400 12px/1.4 var(--mono); }
.adm-pole { display: grid; grid-template-columns: minmax(0, 1fr) 108px; gap: 6px 8px; align-items: end; min-width: 0; }
.adm-pole select { width: 100%; min-width: 0; }
.adm-pole .tl { justify-self: start; }
.adm-pole .adm-vysledek { grid-column: 1 / -1; }
.adm-uloha > .tl { margin-top: 24px; }
.adm-model { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 4px 0 18px; }
.adm-cela { grid-column: 1 / -1; }
.adm-atelier { scroll-margin-top: 90px; }
@media (max-width: 1100px) { .adm-uloha { grid-template-columns: minmax(0, 1fr); } .adm-uloha > .tl { margin-top: 0; justify-self: start; } .adm-model { grid-template-columns: minmax(0, 1fr); } }
.uvod-levy .znacka-a { color: #fff; }
@media (max-width: 900px) { .uvod-veta { font-size: 28px; max-width: 18ch; } }

/* Plugin */
.plugin-pruh { display: flex; align-items: center; gap: 14px; margin: 0 0 28px; padding: 12px 14px 12px 18px; background: var(--plocha); border: 1px solid var(--linka); border-left: 4px solid var(--okr); }
.plugin-pruh[hidden] { display: none; }
.plugin-pruh svg:not(.ik) { flex: none; width: 28px; height: 28px; fill: var(--inkoust); }
.plugin-pruh p { flex: 1; margin: 0; min-width: 0; color: var(--text-2); font-size: 15.5px; }
.plugin-pruh p b { color: var(--inkoust); font-weight: 600; }
.plugin-pruh .tl { flex: none; }
.plugin-odkaz { flex: none; color: var(--text-2); font-size: 15px; white-space: nowrap; }
.plugin-kroky { display: grid; gap: 8px; margin: 0; padding-left: 20px; color: var(--text-2); font-size: 15px; }
#sketchup { scroll-margin-top: 90px; }
@media (max-width: 900px) { .plugin-pruh { display: none; } }

/* Korektury */
.proh-ramec canvas.korektura { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.korektury-seznam { display: grid; gap: 10px; }
.korektura-radek { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.korektura-radek textarea { width: 100%; min-height: 58px; resize: vertical; }
.korektura-cislo { display: grid; place-items: center; width: 26px; height: 26px; margin-top: 8px; border-radius: 50%; background: #E5211C; color: #fff; font: 700 14px var(--pismo); }
.korektura-akce { display: grid; gap: 2px; justify-items: center; }
.korektura-foto { display: grid; justify-items: center; gap: 2px; width: 52px; padding: 4px 0; color: var(--text-2); font-size: 12px; cursor: pointer; }
.korektura-foto img { width: 36px; height: 36px; object-fit: cover; border: 1.5px solid var(--uhel); }
@media (min-width: 901px) { .prohlizec.upravuje .proh-pata { padding-right: 496px; flex-wrap: wrap; } }
