/* Experiment: neutrální čistý vzhled pro dotazníky i administraci. */
/* Značkový font MUNI (cdn.muni.cz) pro nadpisy; tělo textu Inter. */
@font-face { font-family: "Muni"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/muni-bold.woff2") format("woff2"); }
:root {
  --pozadi: #f6f7f9;
  --karta: #ffffff;
  --text: #1b1f27;
  --text2: #5a6270;
  --linka: #e1e5eb;
  --akcent: #1f5fbf;
  --akcent-svetly: #e8f0fc;
  --akcent-tmavy: #174a96;
  --chyba: #c0392b;
  --chyba-svetla: #fdecea;
  --ok: #1e8e5a;
  --radius: 14px;
  --stin: 0 1px 2px rgba(20, 30, 50, .06), 0 6px 20px rgba(20, 30, 50, .05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--pozadi); color: var(--text);
  font: 16px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--akcent); }
button { font: inherit; }
.obal { max-width: 760px; margin: 0 auto; padding: 16px 16px 48px; }
.hlava { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0 18px; }
.hlava img { height: 34px; width: auto; flex: none; }
.hlava .nazev { font-size: 14px; color: var(--text2); text-align: right; }
@media (max-width: 480px) { .hlava { padding: 6px 0 14px; } .hlava img { height: 24px; } .hlava .nazev { font-size: 12px; } }
.postup { height: 6px; background: var(--linka); border-radius: 3px; overflow: hidden; margin-bottom: 20px; }
.postup > i { display: block; height: 100%; background: var(--akcent); border-radius: 3px; transition: width .3s; }
.postup-text { font-size: 13px; color: var(--text2); margin: -14px 0 18px; }
.karta { background: var(--karta); border: 1px solid var(--linka); border-radius: var(--radius); box-shadow: var(--stin); padding: 24px; }
@media (max-width: 480px) { .karta { padding: 18px 16px; } }
h1 { font-family: var(--nadpisy, inherit); font-size: 26px; line-height: 1.2; margin: 0 0 14px; }
h2 { font-family: var(--nadpisy, inherit); font-size: 20px; line-height: 1.3; margin: 0 0 12px; }
@media (max-width: 480px) { h1 { font-size: 22px; } h2 { font-size: 18px; } }
h3 { font-size: 16px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.uvod p { color: var(--text); }
.pozn { color: var(--text2); font-size: 14px; }
.tlacitka { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.tl { border: 0; border-radius: 10px; padding: 12px 22px; background: var(--akcent); color: #fff; font-weight: 600; cursor: pointer; }
.tl:hover { background: var(--akcent-tmavy); }
.tl:disabled { opacity: .5; cursor: default; }
.tl.sekundarni { background: var(--akcent-svetly); color: var(--akcent-tmavy); }
.tl.nebezpecne { background: var(--chyba-svetla); color: var(--chyba); }

/* Scénář: alternativy jako karty vedle sebe, na mobilu pod sebou. */
.otazka-scenar { font-weight: 600; font-size: 19px; line-height: 1.35; margin: 0 0 8px; }
@media (max-width: 480px) { .otazka-scenar { font-size: 17px; } }
.alternativy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
@media (max-width: 760px) and (min-width: 641px) { .alternativy { gap: 8px; } .alt { padding: 10px; } .alt dd { font-size: 14px; } }
@media (max-width: 640px) { .alternativy { grid-template-columns: 1fr; } }
.alt { border: 2px solid var(--linka); border-radius: 12px; padding: 12px; background: #fff; cursor: pointer; text-align: left; width: 100%; transition: border-color .15s, background .15s; }
.alt:hover { border-color: #b9c8e0; }
.alt.vybrana { border-color: var(--akcent); background: var(--akcent-svetly); }
.alt .alt-nazev { font-weight: 700; font-size: 17px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.ikona { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.ikona-alt { margin-left: auto; width: 26px; height: 26px; color: var(--akcent); opacity: .85; }
.ikona-atribut { width: 14px; height: 14px; margin-right: 5px; color: var(--text2); vertical-align: -2px; }
.alt dt { display: flex; align-items: center; }
.alt .alt-nazev::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #b4bcc8; flex: none; }
.alt.vybrana .alt-nazev::before { border-color: var(--akcent); background: radial-gradient(circle, var(--akcent) 45%, #fff 50%); }
.alt dl { margin: 0; display: grid; grid-template-columns: auto; gap: 6px; }
.alt dt { font-size: 12px; color: var(--text2); text-transform: uppercase; letter-spacing: .03em; }
.alt dd { margin: 0 0 4px; font-size: 15px; }
@media (max-width: 640px) {
  .alt dl { grid-template-columns: 1fr 1fr; gap: 4px 10px; align-items: baseline; }
  .alt dt { text-transform: none; font-size: 14px; letter-spacing: 0; }
  .alt dd { margin: 0; text-align: right; }
}

/* Otázky */
.otazka { padding: 18px 0; border-top: 1px solid var(--linka); }
.otazka:first-of-type { border-top: 0; padding-top: 4px; }
.otazka.chybna { background: var(--chyba-svetla); margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
@media (max-width: 480px) { .otazka.chybna { margin: 0 -16px; padding-left: 16px; padding-right: 16px; } }
.otazka .text { font-weight: 600; margin-bottom: 4px; }
.otazka .napoveda { color: var(--text2); font-size: 14px; margin-bottom: 8px; }
.otazka .chyba { color: var(--chyba); font-size: 14px; margin-top: 6px; }
.moznosti { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.moznosti.svisle { flex-direction: column; }
.moznost { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--linka); border-radius: 10px; padding: 9px 14px; background: #fff; cursor: pointer; }
.moznost:hover { border-color: #b9c8e0; }
.moznost input { margin: 0; accent-color: var(--akcent); width: 18px; height: 18px; }
.moznost:has(input:checked) { border-color: var(--akcent); background: var(--akcent-svetly); }
.skala .moznost { min-width: 48px; justify-content: center; }
.skala .moznost input { position: absolute; opacity: 0; pointer-events: none; }
.skala-popis { display: flex; justify-content: space-between; font-size: 13px; color: var(--text2); margin-top: 4px; }
input[type=number], input[type=text], input[type=password] { font: inherit; border: 1.5px solid var(--linka); border-radius: 10px; padding: 10px 12px; width: 100%; max-width: 320px; }
input:focus-visible, .alt:focus-visible, .moznost:focus-within, .tl:focus-visible { outline: 3px solid #9dbdf0; outline-offset: 2px; }

/* Matice: na počítači tabulka, na mobilu řádek za řádkem. */
.matice { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
@media (max-width: 900px) { .matice { font-size: 13px; } .matice th { font-size: 11px; } }
.matice th { font-weight: 500; color: var(--text2); text-align: center; padding: 6px 4px; vertical-align: bottom; font-size: 12px; line-height: 1.25; }
.matice th:first-child { text-align: left; }
.matice td { padding: 8px 4px; border-top: 1px solid var(--linka); text-align: center; }
.matice td:first-child { text-align: left; }
.matice tr.chybny td { background: var(--chyba-svetla); }
.matice input { accent-color: var(--akcent); width: 18px; height: 18px; margin: 0; }
.matice-mobil { display: none; }
@media (max-width: 640px) {
  .matice { display: none; }
  .matice-mobil { display: block; }
  .matice-mobil .radek { padding: 10px 0; border-top: 1px solid var(--linka); }
  .matice-mobil .radek.chybny { background: var(--chyba-svetla); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .matice-mobil .radek-text { margin-bottom: 6px; }
  .matice-mobil .kraje { display: flex; justify-content: space-between; font-size: 12px; color: var(--text2); padding: 4px 0 6px; gap: 12px; }
  .matice-mobil .kraje span:last-child { text-align: right; }
  .matice-mobil .skala-radek { display: flex; justify-content: space-between; align-items: center; padding: 2px 6px; }
  .matice-mobil .kolecko { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }
  .matice-mobil .kolecko input { width: 26px; height: 26px; margin: 0; accent-color: var(--akcent); }
  .matice-mobil .zvoleno { font-size: 13px; color: var(--akcent-tmavy); text-align: center; min-height: 18px; }
}

.konec { text-align: center; padding: 20px 0; }
.konec .ikona { width: 56px; height: 56px; border-radius: 50%; background: #e6f6ee; color: var(--ok); display: inline-flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 12px; }
.upozorneni { background: #fff7e0; border: 1px solid #f3dd9a; border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.pata { text-align: center; color: var(--text2); font-size: 13px; margin-top: 24px; }

/* Administrace */
.admin .obal { max-width: 1040px; }
.admin h1 { font-size: 22px; }
.admin .mriz { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 12px 0 18px; }
.admin .cislo { background: var(--karta); border: 1px solid var(--linka); border-radius: 12px; padding: 14px; }
.admin .cislo b { display: block; font-size: 26px; line-height: 1.1; }
.admin .cislo span { color: var(--text2); font-size: 13px; }
.admin table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin table.data th, .admin table.data td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--linka); }
.admin table.data th { color: var(--text2); font-weight: 500; border-top: 0; }
.admin table.data td.cis, .admin table.data th.cis { text-align: right; }
.admin .radek-akce { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.admin .stav { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.admin .stav.otevreno { background: #e6f6ee; color: var(--ok); }
.admin .stav.zavreno { background: var(--chyba-svetla); color: var(--chyba); }
.admin .odkazy a { display: inline-block; margin-right: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.admin textarea { width: 100%; min-height: 360px; font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; border: 1.5px solid var(--linka); border-radius: 10px; padding: 10px; }
.admin .login { max-width: 380px; margin: 60px auto; }
.admin .login input { max-width: none; margin: 10px 0; }
.admin .zprava { margin: 10px 0; font-size: 14px; }
.admin .zprava.chyba { color: var(--chyba); }
.admin .zprava.ok { color: var(--ok); }
.admin .horni { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.admin .horni a { font-size: 14px; }
.admin details { margin-top: 18px; }
.admin summary { cursor: pointer; font-weight: 600; }
.skryte { display: none !important; }

/* Editor dotazníku */
.ed-liste { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin: 8px 0 12px; position: sticky; top: 0; background: var(--pozadi); padding: 8px 0; z-index: 2; }
.ed-obsah { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .ed-obsah { grid-template-columns: 1fr; } }
.ed-levy { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 56px; }
@media (max-width: 760px) { .ed-levy { position: static; flex-direction: row; flex-wrap: wrap; } }
.ed-nav { text-align: left; border: 1px solid var(--linka); background: #fff; border-radius: 10px; padding: 9px 12px; cursor: pointer; display: flex; gap: 8px; align-items: center; font-size: 14px; }
.ed-nav.aktivni { border-color: var(--akcent); background: var(--akcent-svetly); font-weight: 600; }
.ed-typ { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text2); background: var(--pozadi); border-radius: 6px; padding: 2px 6px; flex: none; }
.ed-pravy { min-width: 0; }
.ed-pole { margin: 0 0 14px; }
.ed-pole > label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.ed-pole input[type=text], .ed-pole input[type=number], .ed-pole textarea, .ed-pole select { font: inherit; border: 1.5px solid var(--linka); border-radius: 10px; padding: 8px 10px; width: 100%; max-width: none; }
.ed-pole select { background: #fff; }
.ed-jazyk { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.ed-kod { flex: none; width: 28px; font-size: 11px; font-weight: 700; color: var(--text2); padding-top: 11px; }
.ed-radek { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.ed-radek > .ed-pole { flex: 1; min-width: 160px; }
.ed-hlava { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ed-akce { display: flex; gap: 6px; flex-wrap: wrap; }
.ed-akce button:not(.tl) { border: 1px solid var(--linka); background: #fff; border-radius: 8px; padding: 5px 9px; cursor: pointer; font-size: 13px; }
.ed-akce button.ed-smazat { color: var(--chyba); }
.ed-karta { border: 1px solid var(--linka); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; background: #fff; }
.ed-otazka summary { display: flex; gap: 8px; align-items: center; cursor: pointer; font-weight: 500; }
.ed-otazka .ed-telo { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--linka); }
.ed-seznam { margin: 0 0 14px; }
.ed-seznam > label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.ed-polozka { display: grid; grid-template-columns: 110px 1fr auto; gap: 6px; margin-bottom: 6px; align-items: center; }
.ed-polozka input { font: inherit; border: 1.5px solid var(--linka); border-radius: 8px; padding: 6px 8px; width: 100%; max-width: none; font-size: 14px; }
.ed-polozka .ed-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.ed-polozka .ed-akce { flex-wrap: nowrap; }
@media (max-width: 560px) { .ed-polozka { grid-template-columns: 1fr 1fr !important; } .ed-polozka .ed-id { grid-column: 1 / -1; } .ed-polozka .ed-akce { grid-column: 1 / -1; justify-content: flex-end; } }
.ed-pridat { padding: 6px 12px; font-size: 13px; }
.ed-pridat-otazku .tl { padding: 7px 12px; font-size: 13px; }
.ed-polozka .ed-ikona, .ed-pole .ed-ikona { font: inherit; font-size: 13px; border: 1.5px solid var(--linka); border-radius: 8px; padding: 6px 8px; background: #fff; }
