/* LID – „Soumrak" (výchozí) a „Ranní světlo". Barvy jen přes tokeny v :root. */

:root {
  --bg: #1C1633;
  --bg-2: #221B3F;
  --surface: #272046;
  --surface-2: #31295B;
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #F1ECFA;
  --muted: #B8AED3;
  --faint: #8F86B2;
  --brand: #F7E3A1;
  --gold: #F4B728;
  --gold-hover: #FFC63B;
  --on-gold: #1C1633;
  --violet: #A58FE0;
  --violet-soft: rgba(156, 134, 219, .16);
  --ok: #9FD8A8;
  --ok-bg: rgba(110, 190, 125, .15);
  --no: #F2A7B5;
  --no-bg: rgba(230, 110, 135, .15);
  --warn: #F7D27A;
  --warn-bg: rgba(244, 183, 40, .13);
  --seg-pro: #F4B728;
  --seg-proti: #E07A93;
  --seg-zdrzel: #8E7CC8;
  --seg-none: rgba(255, 255, 255, .08);
  --tabs-bg: rgba(28, 22, 51, .9);
  --shadow: 0 10px 30px rgba(8, 4, 24, .28);
  --sky: url("../img/sky-dusk.svg");
  --hero: url("../img/hero-dusk.svg");
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --tabs-h: 64px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F6F1E7;
  --bg-2: #EFE8DA;
  --surface: #FFFDF8;
  --surface-2: #F2ECE1;
  --line: rgba(58, 42, 110, .09);
  --line-strong: rgba(58, 42, 110, .2);
  --text: #2B2148;
  --muted: #655B80;
  --faint: #8A7FA6;
  --brand: #3A2A6E;
  --on-gold: #2B2148;
  --violet: #6A4CA8;
  --violet-soft: rgba(106, 76, 168, .1);
  --ok: #2F6B34;
  --ok-bg: #E3F1E2;
  --no: #9B2C45;
  --no-bg: #F8E1E6;
  --warn: #7E5200;
  --warn-bg: #FFF1C9;
  --seg-proti: #D2627F;
  --seg-zdrzel: #8E72C9;
  --seg-none: rgba(58, 42, 110, .08);
  --tabs-bg: rgba(255, 253, 248, .92);
  --shadow: 0 8px 24px rgba(58, 42, 110, .1);
  --sky: url("../img/sky-dawn.svg");
  --hero: url("../img/hero-dawn.svg");
  color-scheme: light;
}

/* ---------- základ ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.i { width: 22px; height: 22px; flex: none; }
.i-inline { width: 15px; height: 15px; vertical-align: -2px; }

.only-light { display: none !important; }
:root[data-theme="light"] .only-light { display: block !important; }
:root[data-theme="light"] .only-dark { display: none !important; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
/* atribut hidden musí vyhrát i nad .btn { display: inline-flex } */
[hidden] { display: none !important; }

/* ---------- obloha nahoře ---------- */

.sky {
  position: relative;
  height: 118px;
  background: var(--sky) center bottom / cover no-repeat, var(--bg-2);
}
.sky::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 36px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.sky-inner {
  position: relative; z-index: 1;
  max-width: 640px; margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) 16px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.brand img { width: 46px; height: 44px; }
.brand span {
  font: 800 25px/1 var(--serif);
  letter-spacing: .08em;
  color: var(--brand);
  text-shadow: 0 1px 12px rgba(28, 22, 51, .35);
}
:root[data-theme="light"] .brand span { text-shadow: 0 1px 10px rgba(255, 253, 248, .6); }

/* ---------- avatary ---------- */

.avatar {
  --av: #6A4CA8;
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-grid; place-items: center; flex: none;
  background: var(--av); color: #fff;
  font: 700 14px/1 var(--font); letter-spacing: .02em;
  text-decoration: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .14);
}
.avatar.sm { width: 32px; height: 32px; font-size: 12.5px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.av-0 { --av: #6A4CA8; }
.av-1 { --av: #3F6FB0; }
.av-2 { --av: #2E857F; }
.av-3 { --av: #B0507A; }
.av-4 { --av: #B9771E; }
.av-5 { --av: #7D4A9E; }
.avatar.not-voted {
  background: transparent; color: var(--faint);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  border: 0;
}
.avatar.voted { box-shadow: 0 0 0 2px var(--gold); }

/* ---------- rozložení aplikace ---------- */

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 4px 16px calc(var(--tabs-h) + 40px + env(safe-area-inset-bottom));
}

.hello { font: 700 28px/1.15 var(--serif); letter-spacing: -.01em; }
.page-title { font: 700 26px/1.2 var(--serif); margin-bottom: 6px; }
.lead { color: var(--muted); margin: 6px 0 4px; }

.sec {
  font: 700 12px/1 var(--font);
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--faint);
  margin: 28px 0 10px;
}

.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.meta { color: var(--muted); font-size: 13.5px; }
.hint { color: var(--faint); font-size: 13px; margin-top: 10px; text-align: center; }
.more { display: inline-flex; gap: 6px; align-items: center; color: var(--violet); font-weight: 600; font-size: 14.5px; text-decoration: none; margin-top: 4px; }
.more .i { width: 18px; height: 18px; }

.back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14.5px;
  margin: 2px 0 14px; padding: 6px 0;
}
.back .i { width: 18px; height: 18px; }

/* ---------- karty ---------- */

.card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 15px 16px;
  margin-bottom: 10px;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
a.card:hover { box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow); }
a.card:active { transform: scale(.985); }
.card h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 3px; }
.card .meta + .meta { margin-top: 2px; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; line-height: 1;
  border-radius: 999px; padding: 5px 10px;
  white-space: nowrap; flex: none;
}
.chip .i { width: 13px; height: 13px; stroke-width: 2.4; }
.chip-wait { background: var(--warn-bg); color: var(--warn); }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-no { background: var(--no-bg); color: var(--no); }
.chip-gold { background: var(--gold); color: var(--on-gold); }
.chip-violet { background: var(--violet-soft); color: var(--violet); }

.progress {
  height: 6px; border-radius: 3px; overflow: hidden;
  background: var(--seg-none);
  margin: 11px 0 8px;
}
.progress i {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--seg-zdrzel), var(--gold));
}

.empty {
  text-align: center; padding: 34px 18px 26px;
}
.empty img { width: 120px; margin: 0 auto 14px; opacity: .95; }
.empty h2 { font: 700 21px/1.25 var(--serif); margin-bottom: 6px; }
.empty p { color: var(--muted); margin-bottom: 18px; }

/* ---------- tlačítka a formuláře ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 15.5px; text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.97); }
.btn .i { width: 19px; height: 19px; stroke-width: 2.2; }
.btn-gold { background: var(--gold); color: var(--on-gold); box-shadow: 0 6px 18px rgba(244, 183, 40, .28); }
.btn-gold:hover { background: var(--gold-hover); }
.btn-ghost { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-quiet { background: transparent; color: var(--muted); min-height: 40px; padding: 8px 12px; }
.btn-danger { background: var(--no-bg); color: var(--no); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.is-confirming { background: var(--text); color: var(--bg); }

.field { display: block; margin-bottom: 16px; }
.field > span {
  display: flex; justify-content: space-between;
  font-size: 13.5px; font-weight: 700; color: var(--muted);
  margin-bottom: 6px;
}
.field small { font-weight: 500; color: var(--faint); }
.input, .field input, .field textarea, .field select, .comment-form textarea {
  width: 100%;
  background: var(--surface);
  border: 0; border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  padding: 13px 14px;
  font-size: 16px; /* iOS nezoomuje */
  line-height: 1.5;
  transition: box-shadow .15s ease;
}
.field textarea, .comment-form textarea { resize: vertical; min-height: 52px; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus, .comment-form textarea:focus {
  outline: none; box-shadow: inset 0 0 0 2px var(--gold);
}
::placeholder { color: var(--faint); opacity: 1; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- toasty (flash) ---------- */

.toasts {
  position: fixed; z-index: 30;
  top: calc(10px + env(safe-area-inset-top)); left: 0; right: 0;
  display: grid; gap: 8px; justify-items: center;
  padding: 0 16px; pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  max-width: 560px; width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 12px 32px rgba(0, 0, 0, .3);
  font-size: 14.5px; font-weight: 600;
  animation: toast-in .35s cubic-bezier(.2, .9, .3, 1.2);
}
.toast .i { width: 20px; height: 20px; margin-top: 1px; }
.toast-ok .i { color: var(--ok); }
.toast-chyba .i { color: var(--no); }
.toast.is-leaving { opacity: 0; transform: translateY(-8px); transition: opacity .3s ease, transform .3s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px) scale(.98); } }

/* ---------- spodní lišta ---------- */

.tabs {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
  background: var(--tabs-bg);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: inset 0 1px 0 var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs-inner {
  max-width: 640px; margin: 0 auto; height: var(--tabs-h);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
}
.tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--faint); text-decoration: none;
  font-size: 11px; font-weight: 700; letter-spacing: .01em;
  padding: 8px 0;
}
.tab.is-active { color: var(--brand); }
.tab.is-active .i { stroke-width: 2.2; }
.tab-plus .plus {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: var(--on-gold);
  margin-top: -26px;
  box-shadow: 0 6px 18px rgba(244, 183, 40, .4), 0 0 0 5px var(--bg);
  transition: transform .15s ease;
}
.tab-plus .plus .i { width: 26px; height: 26px; stroke-width: 2.4; }
.tab-plus:active .plus { transform: scale(.92); }
.badge {
  position: absolute; top: 3px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--gold); color: var(--on-gold);
  font: 800 11px/18px var(--font); text-align: center;
}

/* ---------- detail nápadu ---------- */

.idea-title { font: 700 28px/1.18 var(--serif); letter-spacing: -.01em; margin: 10px 0 14px; }
.byline { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; font-size: 14.5px; }
.byline b { font-weight: 700; }
.stamp { display: flex; align-items: center; gap: 5px; color: var(--faint); font-size: 12.5px; margin-top: 3px; }
.stamp .i { width: 14px; height: 14px; }
.stamp.warn { color: var(--warn); background: var(--warn-bg); border-radius: 8px; padding: 5px 8px; margin-top: 6px; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16.5px; line-height: 1.65; }
.prose.small { font-size: 15px; line-height: 1.55; }

.history { margin-top: 16px; }
.history summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; display: flex; gap: 6px; align-items: center; list-style: none; }
.history summary::-webkit-details-marker { display: none; }
.history summary .i { width: 17px; height: 17px; }
.rev { border-left: 2px solid var(--line-strong); padding: 6px 0 6px 12px; margin-top: 12px; }
.rev h4 { font-size: 15px; margin: 2px 0 4px; }

.actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 18px 16px;
  margin-top: 18px;
  scroll-margin-top: 16px;
}
.panel-title { display: flex; align-items: center; gap: 8px; font: 700 19px/1.2 var(--serif); margin-bottom: 10px; }
.panel-title .i { width: 21px; height: 21px; color: var(--violet); }
.panel-title .count { font: 700 13px/1 var(--font); color: var(--faint); background: var(--surface-2); padding: 4px 8px; border-radius: 999px; }
.panel p + p { margin-top: 8px; }

.trust {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--violet-soft); color: var(--text);
  border-radius: 14px; padding: 12px 13px; margin: 14px 0 4px;
  font-size: 14.5px;
}
.trust .i { color: var(--violet); margin-top: 1px; }

fieldset { border: 0; margin: 18px 0 0; padding: 0; min-width: 0; }
legend { font-weight: 700; font-size: 15px; margin-bottom: 10px; padding: 0; }

.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preset:last-child { grid-column: 1 / -1; }
.preset input, .choice input { position: absolute; opacity: 0; pointer-events: none; }
.preset span {
  display: block; height: 100%;
  background: var(--surface-2); border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 11px 12px; cursor: pointer;
  transition: box-shadow .15s ease, background-color .15s ease;
}
.preset b { display: block; font-size: 14.5px; }
.preset small { color: var(--muted); font-size: 12.5px; }
.preset input:checked + span { box-shadow: inset 0 0 0 2px var(--gold); background: var(--warn-bg); }
.preset input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.custom-deadline { display: none; margin-top: 10px; }
.presets:has(input[value="vlastni"]:checked) + .custom-deadline { display: block; }
.open-form .btn { margin-top: 16px; }

.deadline { font-size: 15px; margin-bottom: 14px; }
.deadline b { color: var(--gold); }
:root[data-theme="light"] .deadline b { color: #9A6A00; }

.voters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }

.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 14px; }
.choice span {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--surface-2); border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 16px 6px 13px; cursor: pointer; text-align: center;
  transition: box-shadow .15s ease, background-color .15s ease, transform .12s ease;
}
.choice span:active { transform: scale(.97); }
.choice .i { width: 26px; height: 26px; stroke-width: 2.2; color: var(--muted); }
.choice b { font-size: 14px; }
.choice-pro input:checked + span { box-shadow: inset 0 0 0 2px var(--seg-pro); background: var(--warn-bg); }
.choice-pro input:checked + span .i { color: var(--seg-pro); }
.choice-proti input:checked + span { box-shadow: inset 0 0 0 2px var(--seg-proti); background: var(--no-bg); }
.choice-proti input:checked + span .i { color: var(--seg-proti); }
.choice-zdrzel input:checked + span { box-shadow: inset 0 0 0 2px var(--seg-zdrzel); background: var(--violet-soft); }
.choice-zdrzel input:checked + span .i { color: var(--seg-zdrzel); }
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.voted-box {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--ok-bg); border-radius: 14px; padding: 13px 14px; margin-top: 14px;
}
.voted-box .i { color: var(--ok); margin-top: 2px; }
.voted-box .meta { margin-top: 3px; }
[data-my-vote]:not(:empty) { display: block; margin-top: 4px; color: var(--text); font-weight: 600; }

.verdict {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  border-radius: 14px; padding: 14px 15px; margin-bottom: 14px;
}
.verdict b { font: 800 22px/1 var(--serif); }
.verdict span { font-size: 14px; font-weight: 600; }
.verdict.ok { background: var(--ok-bg); color: var(--ok); }
.verdict.no { background: var(--no-bg); color: var(--no); }

.result-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--seg-none); gap: 2px; }
.result-bar i { display: block; height: 100%; }
.result-bar .pro { background: var(--seg-pro); }
.result-bar .proti { background: var(--seg-proti); }
.result-bar .zdrzel { background: var(--seg-zdrzel); }
.legend { list-style: none; padding: 0; margin: 10px 0 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend b { color: var(--text); }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw.pro { background: var(--seg-pro); }
.sw.proti { background: var(--seg-proti); }
.sw.zdrzel { background: var(--seg-zdrzel); }
.sw.none { background: var(--seg-none); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* cesta nápadu: přijato → předloženo → splněno */
.stepper { list-style: none; padding: 0; margin: 18px 0 6px; display: grid; grid-template-columns: repeat(3, 1fr); }
.step { position: relative; text-align: center; padding-top: 30px; font-size: 12.5px; color: var(--faint); font-weight: 600; }
.step::before {
  content: ""; position: absolute; top: 9px; left: 50%; width: 100%; height: 2px;
  background: var(--line-strong);
}
.step:last-child::before { display: none; }
.step .dot {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-strong);
  display: grid; place-items: center; z-index: 1;
}
.step .dot .i { width: 12px; height: 12px; stroke-width: 3; }
.step.done { color: var(--text); }
.step.done .dot { background: var(--gold); box-shadow: none; color: var(--on-gold); }
.step.done:not(:last-child)::before { background: var(--gold); }
.step.current .dot { box-shadow: 0 0 0 4px var(--warn-bg); }
.step.is-fail.done .dot { background: var(--no); }
.step small { display: block; font-weight: 500; color: var(--faint); margin-top: 2px; }
.stage-notes { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.stage-notes li { font-size: 14px; border-left: 2px solid var(--gold); padding: 2px 0 2px 10px; }
.stage-form { display: grid; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

/* diskuze */
.comment { display: flex; gap: 10px; margin-bottom: 14px; }
.bubble { background: var(--surface-2); border-radius: 4px 16px 16px 16px; padding: 10px 13px; flex: 1; min-width: 0; }
.bubble .meta { font-size: 12.5px; margin-bottom: 3px; }
.bubble .meta b { color: var(--text); }
.comment-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 6px; }
.comment-form textarea { min-height: 48px; padding: 12px 14px; }
.comment-form .btn { flex: none; }

/* ---------- nový nápad ---------- */

.quote {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--violet-soft); border-radius: 14px; padding: 12px 14px; margin: 12px 0 18px;
  font-size: 14.5px; white-space: pre-wrap;
}
.quote .i { color: var(--violet); margin-top: 1px; }
.idea-form { margin-top: 18px; }
.idea-form .stamp { margin: -4px 0 18px; font-size: 13px; }

/* ---------- prosadili ---------- */

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 6px; }
.stat { background: var(--surface); border-radius: 16px; padding: 14px 10px 12px; text-align: center; box-shadow: inset 0 0 0 1px var(--line); }
.stat b { display: block; font: 800 28px/1 var(--serif); color: var(--brand); }
.stat span { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ---------- schránka uvnitř ---------- */

.parl-link { margin-top: 12px; }
.parl-link h3 { display: flex; align-items: center; gap: 8px; }
.parl-link h3 .i { width: 19px; height: 19px; color: var(--violet); }
.agenda { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.agenda-item { background: var(--surface); border-radius: var(--radius); padding: 16px 16px 14px; box-shadow: inset 0 0 0 1px var(--line); }
.agenda-head { display: grid; grid-template-columns: 32px 1fr auto; column-gap: 10px; align-items: start; margin-bottom: 8px; }
.agenda-num {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--violet-soft); color: var(--violet); font: 800 15px/1 var(--serif);
}
.agenda-head h2 { font: 700 18px/1.3 var(--serif); padding-top: 4px; overflow-wrap: anywhere; }
.agenda-head h2 a { color: inherit; text-decoration: none; }
.agenda-pick { display: grid; place-items: center; width: 44px; height: 44px; margin: -6px -10px 0 0; cursor: pointer; }
.agenda-pick input { width: 22px; height: 22px; margin: 0; accent-color: var(--gold); cursor: pointer; }
.agenda-item .meta { margin-top: 10px; }
.present-form { display: grid; gap: 10px; margin-top: 18px; }
.present-form .panel-title { margin-bottom: 0; }
.msg .prose { font-size: 15.5px; margin: 2px 0 10px; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.share-box {
  display: flex; gap: 8px; align-items: center;
  background: var(--surface); border-radius: 14px; padding: 8px 8px 8px 14px; margin: 14px 0 6px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; color: var(--muted);
}
.share-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font: 600 14px var(--font); }

/* ---------- já ---------- */

.me-head { display: flex; gap: 14px; align-items: center; margin: 4px 0 6px; }
.me-head h1 { font: 700 26px/1.15 var(--serif); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .meta { font-size: 12.5px; }
.list form { flex: none; }
.push-row { display: flex; align-items: center; gap: 12px; }
.push-row .grow { flex: 1; min-width: 0; }
.push-row .meta { font-size: 12.5px; }
[data-install] { margin-bottom: 14px; }
.push-row + .btn { margin-top: 10px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 14px; }
.seg button {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 10px; padding: 10px; background: transparent; color: var(--muted);
  font-weight: 700; font-size: 14px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.seg .i { width: 18px; height: 18px; }
.inline-form { display: flex; gap: 8px; margin-top: 12px; }
.inline-form .input { flex: 1; min-width: 0; }
.rules { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.rules li { display: flex; gap: 10px; font-size: 14.5px; }
.rules .i { color: var(--gold); width: 19px; height: 19px; margin-top: 2px; }
.link-list a { display: flex; align-items: center; gap: 10px; padding: 13px 0; text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
.link-list a .i:last-child { margin-left: auto; color: var(--faint); width: 18px; height: 18px; }

/* kronika */
.timeline { list-style: none; padding: 0; margin: 12px 0 0; }
.timeline li { display: flex; gap: 12px; padding: 0 0 18px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: 2px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.tl-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; flex: none; }
.tl-icon .i { width: 18px; height: 18px; color: var(--violet); }
.tl-icon.shield .i { color: var(--gold); }
.timeline p { font-size: 14.5px; padding-top: 7px; }
.timeline a { text-decoration-color: var(--line-strong); text-underline-offset: 3px; }

/* kód */
.code-card { text-align: center; padding: 26px 18px; }
.code-big { font: 800 34px/1 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .12em; color: var(--brand); margin: 14px 0 8px; user-select: all; }
.code-card .share-box { text-align: left; }

/* ---------- veřejná stránka ---------- */

.public .hero {
  position: relative;
  min-height: min(94vh, 760px);
  display: flex; flex-direction: column;
  background: var(--hero) center bottom / cover no-repeat, var(--bg-2);
  text-align: center;
}
.public .hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 90px;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
/* jemná clona za textem, ať je čitelný i přes slunce a vlnky */
.public .hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse 75% 46% at 50% 50%, rgba(20, 14, 44, .62), rgba(20, 14, 44, 0) 72%);
}
:root[data-theme="light"] .public .hero::before {
  background: radial-gradient(ellipse 75% 46% at 50% 50%, rgba(255, 250, 240, .7), rgba(255, 250, 240, 0) 72%);
}
.hero-nav {
  position: relative; z-index: 2;
  display: flex; justify-content: flex-end;
  padding: calc(14px + env(safe-area-inset-top)) 18px 0;
}
.link-quiet {
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px;
  background: rgba(28, 22, 51, .35); padding: 8px 14px; border-radius: 999px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
:root[data-theme="light"] .link-quiet { background: rgba(255, 253, 248, .55); }
.hero-inner {
  position: relative; z-index: 2;
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 20px 120px;
}
.hero-logo { width: 150px; height: auto; filter: drop-shadow(0 8px 30px rgba(10, 6, 30, .35)); }
.wordmark {
  font: 800 clamp(64px, 18vw, 112px)/.95 var(--serif);
  letter-spacing: .1em; margin: 8px 0 0 .1em;
  color: var(--brand);
  text-shadow: 0 2px 30px rgba(20, 12, 50, .45);
}
:root[data-theme="light"] .wordmark { text-shadow: 0 2px 24px rgba(255, 253, 248, .7); }
.tagline { font: 600 13px/1 var(--font); letter-spacing: .26em; text-transform: uppercase; margin-top: 14px; color: var(--text); }
.motto { font: 600 22px/1.3 var(--serif); margin-top: 14px; color: var(--text); }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 28px; }
.btn-glass {
  background: rgba(255, 255, 255, .12); color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
:root[data-theme="light"] .btn-glass { background: rgba(255, 253, 248, .55); box-shadow: inset 0 0 0 1px var(--line-strong); }

.public-main { max-width: 760px; margin: 0 auto; padding: 0 18px 30px; }
.block { padding: 34px 0; }
.intro .big { font: 500 clamp(20px, 4.6vw, 25px)/1.45 var(--serif); text-align: center; color: var(--text); max-width: 34ch; margin: 0 auto; }
.brush {
  font: 700 clamp(24px, 6vw, 30px)/1.2 var(--serif);
  display: inline-block; margin-bottom: 20px;
  padding-bottom: 10px;
  background: url("../img/brush-gold.svg") left bottom / 100% 12px no-repeat;
}
.values { display: grid; gap: 12px; }
.value {
  position: relative; overflow: hidden;
  background: var(--surface); border-radius: var(--radius);
  padding: 18px 18px 18px 84px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.value-letter {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  font: 800 52px/1 var(--serif); color: var(--gold);
}
.value h3 { font: 700 19px/1.2 var(--serif); margin-bottom: 4px; }
.value p { color: var(--muted); font-size: 15px; }
.team { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.person {
  background: var(--surface); border-radius: var(--radius);
  padding: 18px 18px 18px 21px;
  box-shadow: inset 3px 0 0 var(--gold), inset 0 0 0 1px var(--line);
}
.person h3 { font: 700 19px/1.2 var(--serif); }
.person-role { color: var(--violet); font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin: 4px 0 6px; }
.person-role:last-child { margin-bottom: 0; }
.person p:not(.person-role) { color: var(--muted); font-size: 15px; }
.team-note { margin-top: 12px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; }
.steps li::before {
  content: counter(s); grid-row: span 2;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--violet-soft); color: var(--violet);
  display: grid; place-items: center; font: 800 17px/1 var(--serif);
}
.steps b { font-size: 16.5px; padding-top: 7px; }
.steps span { color: var(--muted); font-size: 15px; }
.tally { color: var(--muted); font-size: 15.5px; margin: -4px 0 12px; }
.tally b { font: 800 26px/1 var(--serif); color: var(--brand); margin: 0 2px; }
.wins { padding: 4px 16px; }
.wins ul { list-style: none; margin: 0; padding: 0; }
.win { display: grid; grid-template-columns: 22px 1fr auto; column-gap: 10px; align-items: baseline; padding: 11px 0; }
.win + .win, .wins-more .win:first-child { border-top: 1px solid var(--line); }
.win-mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); align-self: start; }
.win-mark .i { width: 13px; height: 13px; stroke-width: 2.6; }
.win-text { min-width: 0; }
.win-text h3, .win-text .meta { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.win-text h3 { font-size: 16px; margin: 0; -webkit-line-clamp: 2; line-clamp: 2; }
.win-text .meta { -webkit-line-clamp: 1; line-clamp: 1; margin-top: 1px; }
.win-when { color: var(--faint); font-size: 13px; white-space: nowrap; }
.wins-more summary {
  cursor: pointer; list-style: none; border-top: 1px solid var(--line);
  padding: 11px 0; color: var(--violet); font-size: 14.5px; font-weight: 700; text-align: center;
}
.wins-more summary::-webkit-details-marker { display: none; }
.wins-more .if-open, .wins-more[open] .if-closed { display: none; }
.wins-more[open] .if-open { display: inline; }
.cta-box {
  text-align: center; margin: 10px 0 20px; padding: 34px 20px;
  border-radius: 24px;
  background: var(--sky) center bottom / cover no-repeat, var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.cta-box h2 { font: 700 25px/1.2 var(--serif); }
.cta-box p { color: var(--text); margin: 8px 0 18px; }
.public-footer {
  max-width: 760px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 20px 18px calc(28px + env(safe-area-inset-bottom));
  color: var(--faint); font-size: 13.5px;
  border-top: 1px solid var(--line);
}
.public-footer a { color: var(--muted); font-weight: 700; text-decoration: none; }
.public-footer a:hover { color: var(--text); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

.narrow { max-width: 480px; margin: 0 auto; padding: 0 16px 40px; }
.narrow .page-title { margin-top: 6px; }
.form-card { background: var(--surface); border-radius: 22px; padding: 22px 18px; box-shadow: inset 0 0 0 1px var(--line), var(--shadow); margin-top: 16px; }
.code-input { text-align: center; font: 800 26px/1.2 ui-monospace, "SF Mono", Consolas, monospace !important; letter-spacing: .14em; text-transform: uppercase; }
.success { text-align: center; padding: 30px 10px 10px; }
.success img { width: 110px; margin: 0 auto 12px; }
.success h1 { font: 700 26px/1.2 var(--serif); margin-bottom: 8px; }
.success p { color: var(--muted); }
.error-page { text-align: center; padding: 50px 20px; }
.error-page .code { font: 800 64px/1 var(--serif); color: var(--gold); }
.error-page h1 { font: 700 24px/1.2 var(--serif); margin: 10px 0 8px; }
.error-page p { color: var(--muted); margin-bottom: 22px; }

/* ---------- větší obrazovky ---------- */

@media (min-width: 720px) {
  .sky { height: 140px; }
  .hello { font-size: 32px; }
  .values { grid-template-columns: repeat(3, 1fr); }
  .team { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .value { padding: 22px 20px 20px; }
  .value-letter { position: static; transform: none; display: block; margin-bottom: 8px; }
  .presets { grid-template-columns: repeat(5, 1fr); }
  .preset:last-child { grid-column: auto; }
}

/* Tisk podkladu pro parlament: černá na bílém, bez navigace. */
@media print {
  :root, :root[data-theme="light"] {
    --bg: #fff; --bg-2: #fff; --surface: #fff; --surface-2: #fff;
    --text: #000; --muted: #333; --faint: #555; --brand: #000; --violet: #000;
    --line: #bbb; --line-strong: #888; --violet-soft: transparent; --shadow: none;
  }
  body { background: #fff; }
  .sky, .tabs, .toasts, .no-print { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .agenda-item { break-inside: avoid; }
  .agenda-num { box-shadow: inset 0 0 0 1px var(--line-strong); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
