/* 🏰 Panství – samostatná aplikace na gingygames.com/panstvi/
   Moderní ovládání s dobovým nádechem: bezpatkové písmo v ovládání, Cinzel jen v nadpisech stránek
   a na listinách, vosková červeň jako jediný akcent, pečeť panství. Viz DESIGN.md. */

@font-face { font-family: "Source Sans 3"; src: url(/panstvi/static/fonts/sourcesans3-latin.woff2) format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; src: url(/panstvi/static/fonts/sourcesans3-latin-ext.woff2) format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cinzel"; src: url(/panstvi/static/fonts/cinzel-latin.woff2) format("woff2"); font-weight: 600 700; font-display: swap; unicode-range: U+0000-00FF, U+2013-2014, U+2018-201E, U+2022, U+2026, U+2039-203A, U+20AC, U+2190-2193, U+2212; }
@font-face { font-family: "Cinzel"; src: url(/panstvi/static/fonts/cinzel-latin-ext.woff2) format("woff2"); font-weight: 600 700; font-display: swap; unicode-range: U+0100-017F; }
@font-face { font-family: "EB Garamond"; src: url(/panstvi/static/fonts/ebgaramond-latin.woff2) format("woff2"); font-weight: 400 600; font-display: swap; unicode-range: U+0000-00FF, U+2013-2014, U+2018-201E, U+2022, U+2026, U+2039-203A, U+20AC, U+2190-2193, U+2212; }
@font-face { font-family: "EB Garamond"; src: url(/panstvi/static/fonts/ebgaramond-latin-ext.woff2) format("woff2"); font-weight: 400 600; font-display: swap; unicode-range: U+0100-017F; }
@font-face { font-family: "EB Garamond"; src: url(/panstvi/static/fonts/ebgaramond-italic-latin.woff2) format("woff2"); font-style: italic; font-weight: 400 600; font-display: swap; unicode-range: U+0000-00FF, U+2013-2014, U+2018-201E, U+2022, U+2026, U+2039-203A, U+20AC, U+2190-2193, U+2212; }
@font-face { font-family: "EB Garamond"; src: url(/panstvi/static/fonts/ebgaramond-italic-latin-ext.woff2) format("woff2"); font-style: italic; font-weight: 400 600; font-display: swap; unicode-range: U+0100-017F; }

/* ================================================================ tokeny */
:root {
  color-scheme: light;
  interpolate-size: allow-keywords;

  --bg: oklch(0.975 0.004 75);
  --surface: oklch(0.995 0.002 75);
  --surface-2: oklch(0.962 0.005 75);
  --hover: oklch(0.94 0.006 75);
  --line: oklch(0.9 0.006 75);
  --line-soft: oklch(0.93 0.005 75);
  --line-strong: oklch(0.82 0.008 75);
  --text: oklch(0.24 0.012 60);
  --text-2: oklch(0.43 0.012 60);
  --text-3: oklch(0.53 0.012 60);
  --accent: oklch(0.52 0.18 32);
  --accent-strong: oklch(0.45 0.17 32);
  --accent-fill: oklch(0.53 0.185 32);
  --accent-fill-hover: oklch(0.47 0.175 32);
  --accent-soft: oklch(0.53 0.185 32 / 0.1);
  --on-accent: oklch(0.99 0.005 60);
  --gold: oklch(0.66 0.11 78);
  --gold-strong: oklch(0.49 0.1 72);
  --gold-soft: oklch(0.66 0.11 78 / 0.15);
  --ok: oklch(0.5 0.12 148);
  --ok-soft: oklch(0.55 0.12 148 / 0.11);
  --warn: oklch(0.55 0.13 66);
  --danger: oklch(0.52 0.19 27);
  --danger-soft: oklch(0.53 0.19 27 / 0.09);
  --info: oklch(0.5 0.11 245);
  --info-soft: oklch(0.5 0.11 245 / 0.09);
  --seal: oklch(0.46 0.17 30);
  --seal-hi: oklch(0.64 0.19 34);
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 60 / 0.07);
  --shadow-pop: 0 8px 8px -4px oklch(0.2 0.02 60 / 0.08), 0 2px 6px oklch(0.2 0.02 60 / 0.1);
  --scrim: oklch(0.18 0.01 60 / 0.42);
  --map-bg: #e9dcc0;
  /* listiny (rozkazy, glejty, daňové listy) – papír zůstává papírem i v tmavém režimu */
  --doc-paper: oklch(0.945 0.022 84);
  --doc-paper-2: oklch(0.9 0.03 80);
  --doc-ink: oklch(0.25 0.03 58);
  --doc-ink-2: oklch(0.4 0.03 58);
  --doc-rule: oklch(0.72 0.035 74);
  --doc-brass: oklch(0.55 0.09 72);

  --font-ui: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-title: "Cinzel", "Times New Roman", serif;
  --font-doc: "EB Garamond", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --r-xl: 14px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 180ms;

  --side-w: 248px;
  --bar-h: 56px;
  --tabs-h: 48px;
  --tabbar-h: 62px;
  --sticky-top: 0px;
  --z-dropdown: 30;
  --z-sticky: 40;
  --z-bar: 60;
  --z-preview: 70;
  --z-modal: 80;
  --z-toast: 90;
  --z-tour: 100;

  /* staré názvy proměnných (stránkové bloky je pořád používají) */
  --parchment: var(--surface);
  --parchment-2: var(--surface-2);
  --ink: var(--text);
  --ink-soft: var(--text-2);
  --ink-faint: var(--text-3);
  --brass: var(--gold);
  --brass-dark: var(--gold-strong);
  --wax: var(--accent);
  --wax-dark: var(--accent-strong);
  --moss: var(--ok);
  --rule: var(--line);
  --display: var(--font-ui);
  --body: var(--font-ui);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: oklch(0.175 0.006 65);
    --surface: oklch(0.205 0.007 65);
    --surface-2: oklch(0.19 0.006 65);
    --hover: oklch(0.25 0.008 65);
    --line: oklch(0.285 0.008 65);
    --line-soft: oklch(0.25 0.007 65);
    --line-strong: oklch(0.37 0.01 65);
    --text: oklch(0.935 0.006 80);
    --text-2: oklch(0.79 0.008 75);
    --text-3: oklch(0.67 0.008 72);
    --accent: oklch(0.72 0.14 38);
    --accent-strong: oklch(0.79 0.12 42);
    --accent-fill: oklch(0.55 0.17 32);
    --accent-fill-hover: oklch(0.6 0.17 33);
    --accent-soft: oklch(0.65 0.16 35 / 0.15);
    --gold: oklch(0.76 0.1 80);
    --gold-strong: oklch(0.82 0.09 82);
    --gold-soft: oklch(0.76 0.1 80 / 0.14);
    --ok: oklch(0.75 0.12 150);
    --ok-soft: oklch(0.7 0.12 150 / 0.13);
    --warn: oklch(0.8 0.12 78);
    --danger: oklch(0.72 0.15 28);
    --danger-soft: oklch(0.65 0.16 28 / 0.14);
    --info: oklch(0.76 0.09 245);
    --info-soft: oklch(0.7 0.09 245 / 0.13);
    --seal: oklch(0.47 0.16 30);
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-pop: 0 8px 8px -4px oklch(0 0 0 / 0.4), 0 2px 6px oklch(0 0 0 / 0.35);
    --scrim: oklch(0.08 0.005 60 / 0.6);
    --map-bg: oklch(0.3 0.02 70);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: oklch(0.175 0.006 65);
  --surface: oklch(0.205 0.007 65);
  --surface-2: oklch(0.19 0.006 65);
  --hover: oklch(0.25 0.008 65);
  --line: oklch(0.285 0.008 65);
  --line-soft: oklch(0.25 0.007 65);
  --line-strong: oklch(0.37 0.01 65);
  --text: oklch(0.935 0.006 80);
  --text-2: oklch(0.79 0.008 75);
  --text-3: oklch(0.67 0.008 72);
  --accent: oklch(0.72 0.14 38);
  --accent-strong: oklch(0.79 0.12 42);
  --accent-fill: oklch(0.55 0.17 32);
  --accent-fill-hover: oklch(0.6 0.17 33);
  --accent-soft: oklch(0.65 0.16 35 / 0.15);
  --gold: oklch(0.76 0.1 80);
  --gold-strong: oklch(0.82 0.09 82);
  --gold-soft: oklch(0.76 0.1 80 / 0.14);
  --ok: oklch(0.75 0.12 150);
  --ok-soft: oklch(0.7 0.12 150 / 0.13);
  --warn: oklch(0.8 0.12 78);
  --danger: oklch(0.72 0.15 28);
  --danger-soft: oklch(0.65 0.16 28 / 0.14);
  --info: oklch(0.76 0.09 245);
  --info-soft: oklch(0.7 0.09 245 / 0.13);
  --seal: oklch(0.47 0.16 30);
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-pop: 0 8px 8px -4px oklch(0 0 0 / 0.4), 0 2px 6px oklch(0 0 0 / 0.35);
  --scrim: oklch(0.08 0.005 60 / 0.6);
  --map-bg: oklch(0.3 0.02 70);
}

/* ================================================================ základ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--sticky-top) + 16px); }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font: 400 1rem/1.55 var(--font-ui); -webkit-font-smoothing: antialiased; font-optical-sizing: auto; }
img, video { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.cech [hidden] { display: none !important; }
.cech :where(p) { margin: 0 0 0.85em; text-wrap: pretty; }
.cech :where(a) { color: var(--text); text-decoration-color: color-mix(in oklch, var(--accent) 55%, transparent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.cech :where(a:hover) { color: var(--accent); text-decoration-color: currentColor; }
.cech :where(h1, h2, h3, h4) { margin: 0 0 0.4em; color: var(--text); font-family: var(--font-ui); font-weight: 650; line-height: 1.2; letter-spacing: -0.005em; text-wrap: balance; overflow-wrap: break-word; }
.cech :where(h1) { font: 600 1.75rem/1.15 var(--font-title); letter-spacing: 0.01em; }
.cech :where(h2) { font-size: 1.25rem; }
.cech :where(h3) { font-size: 1.0625rem; }
.cech :where(h4) { font-size: 0.9375rem; }
.cech :where(ul, ol) { padding-left: 1.25em; }
.cech :where(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.cech :where(::selection) { background: color-mix(in oklch, var(--accent) 28%, transparent); }
.cech :where(small) { font-size: 0.875em; }
.cech :where(code) { font: 0.9em var(--mono); padding: 0.1em 0.35em; border-radius: 4px; background: var(--surface-2); }
.cech :where(blockquote) { margin: 0 0 1em; padding: 4px 0 4px 14px; border-left: 2px solid var(--line-strong); color: var(--text-2); }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.skip { position: fixed; left: 12px; top: -60px; z-index: var(--z-tour); padding: 10px 14px; border-radius: var(--r); background: var(--text); color: var(--bg); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.cech-vh, .cech .cech-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cech kbd { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); color: var(--text-2); font: 600 0.72rem/1 var(--font-ui); }

/* ================================================================ kostra aplikace */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }
.app-side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 14px; padding: 14px 12px 12px; background: var(--surface-2); border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; view-transition-name: app-side; }
.app-brand { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px; border-radius: var(--r); color: var(--text); text-decoration: none; }
.app-brand:hover { background: var(--hover); color: var(--text); }
.app-seal { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, var(--seal-hi), var(--seal) 68%); color: oklch(0.96 0.03 70); font: 700 1.05rem/1 var(--font-title); text-shadow: 0 1px 0 oklch(0.3 0.12 30 / 0.6); box-shadow: inset 0 0 0 2px oklch(1 0 0 / 0.13), inset 0 -2px 3px oklch(0.25 0.1 30 / 0.45), 0 1px 2px oklch(0.2 0.05 30 / 0.35); }
.app-brand-text { display: grid; min-width: 0; line-height: 1.2; }
.app-brand-text strong { font: 600 1.0625rem/1.15 var(--font-title); letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-brand-text small { font-size: 0.78rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-search { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text-3); font-size: 0.9rem; text-align: left; transition: border-color var(--dur), color var(--dur); }
.app-search:hover { border-color: var(--line-strong); color: var(--text-2); }
.app-search span { flex: 1; }
.app-nav { display: grid; gap: 2px; }
.app-nav-link { position: relative; display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: var(--r); color: var(--text-2); font-size: 0.95rem; font-weight: 550; text-decoration: none; transition: background-color var(--dur), color var(--dur); }
.app-nav-link .ico { width: 19px; height: 19px; color: var(--text-3); transition: color var(--dur); }
.app-nav-link:hover { background: var(--hover); color: var(--text); }
.app-nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--text); font-weight: 650; view-transition-name: nav-current; }
.app-nav-link[aria-current="page"] .ico { color: var(--accent); }
.app-side-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.app-user { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 6px; border: 0; border-radius: var(--r); background: none; color: var(--text); text-align: left; }
.app-user:hover, .app-user:focus-visible { background: var(--hover); }
.app-user-text { display: grid; flex: 1; min-width: 0; line-height: 1.2; }
.app-user-text strong { font-size: 0.9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-user-text small { font-size: 0.78rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-user-chev { color: var(--text-3); }
.app-user.is-compact { width: auto; padding: 4px; border-radius: 50%; }
.app-user.is-compact .app-user-text, .app-user.is-compact .app-user-chev { display: none; }
.app-avatar { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--hover); color: var(--text-2); font-weight: 700; font-size: 0.9rem; }
.app-menu-who .app-avatar { width: 36px; height: 36px; }

.app-bar { display: none; position: sticky; top: 0; z-index: var(--z-bar); height: var(--bar-h); align-items: center; gap: 6px; padding: 0 12px 0 8px; background: var(--bg); border-bottom: 1px solid var(--line); view-transition-name: app-bar; }
.app-bar .app-brand { padding: 4px; }
.app-bar .app-seal { width: 32px; height: 32px; font-size: 0.95rem; }
.app-bar .app-brand-text small { display: none; }
.app-bar-gap { flex: 1; }
.app-icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border: 0; border-radius: var(--r); background: none; color: var(--text-2); }
.app-icon-btn:hover { background: var(--hover); color: var(--text); }
.app-icon-btn .ico { width: 20px; height: 20px; }

.app-main { width: 100%; max-width: 1280px; justify-self: center; min-width: 0; padding: 0 clamp(16px, 3vw, 40px) 72px; view-transition-name: app-main; }
.app-main:has(> .app-tabs) { --sticky-top: var(--tabs-h); }
.app-tabs { position: sticky; top: 0; z-index: var(--z-sticky); margin: 0 calc(-1 * clamp(16px, 3vw, 40px)); padding: 0 clamp(16px, 3vw, 40px); background: var(--bg); border-bottom: 1px solid var(--line); view-transition-name: app-tabs; }
.app-tabs-in { display: flex; gap: 2px; height: var(--tabs-h); overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.app-tabs-in::-webkit-scrollbar { display: none; }
.app-tabs-in.is-overflow { mask-image: linear-gradient(to right, transparent, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent); }
.app-tabs a { position: relative; flex: none; display: flex; align-items: center; padding: 0 12px; color: var(--text-2); font-size: 0.92rem; font-weight: 550; text-decoration: none; white-space: nowrap; transition: color var(--dur); }
.app-tabs a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: transparent; }
.app-tabs a:hover { color: var(--text); }
.app-tabs a:hover::after { background: var(--line-strong); }
.app-tabs a[aria-current="page"] { color: var(--text); font-weight: 650; view-transition-name: tab-current; }
.app-tabs a[aria-current="page"]::after { background: var(--accent); }
.app-head { padding: 28px 0 22px; }
.app-title { display: flex; align-items: center; gap: 8px; }
.app-title h1 { margin: 0; }
.app-title .app-icon-btn { width: 32px; height: 32px; color: var(--text-3); }
.app-lead { margin: 6px 0 0; max-width: 70ch; color: var(--text-2); font-size: 1.0625rem; }
.app-tabbar { display: none; }

.app.is-plain { display: block; }
.app.is-plain .app-bar { display: flex; }
.app.is-plain .app-main { max-width: 900px; margin-inline: auto; }

/* uživatelské menu (popover) */
.app-menu { position: fixed; inset: auto auto 68px 12px; margin: 0; width: calc(var(--side-w) - 24px); padding: 6px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); opacity: 0; transform: translateY(6px) scale(0.98); transform-origin: bottom left; transition: opacity 160ms var(--ease-out), transform 200ms var(--ease-out), overlay 200ms allow-discrete, display 200ms allow-discrete; }
.app-menu:popover-open { opacity: 1; transform: none; }
@starting-style { .app-menu:popover-open { opacity: 0; transform: translateY(6px) scale(0.98); } }
.app-menu-who { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.app-menu-who span { display: grid; min-width: 0; line-height: 1.25; }
.app-menu-who strong { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-menu-who small { color: var(--text-3); font-size: 0.8rem; }
.app-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 8px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text); font-size: 0.92rem; text-align: left; text-decoration: none; }
.app-menu-item .ico { color: var(--text-3); }
.app-menu-item:hover, .app-menu-item:focus-visible { background: var(--hover); color: var(--text); }
.app-menu hr { margin: 4px 0; }
body:has(.app.is-plain) .app-menu { inset: calc(var(--bar-h) + 4px) 12px auto auto; transform-origin: top right; }

/* náhled jako role / pozorovatel */
.cech-preview { position: relative; z-index: var(--z-preview); display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; background: var(--accent-fill); color: var(--on-accent); font-size: 0.9rem; font-weight: 600; text-align: center; }
.cech-preview a { color: var(--on-accent); margin-left: 6px; }
.cech-preview.is-observer { background: var(--info); }

/* ================================================================ rozvržení */
.cech .wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.cech-panel { position: relative; margin-bottom: 20px; padding: clamp(16px, 2vw, 22px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.cech-panel > :last-child { margin-bottom: 0; }
.cech-panel-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 20px; margin-bottom: 14px; }
.cech-panel-head h2 { margin: 0; font-size: 1.125rem; }
.cech-panel-head h3 { margin: 0; }
.cech-panel-head p { margin: 4px 0 0; max-width: 68ch; color: var(--text-2); font-size: 0.94rem; }
.cech-panel-head .cech-link { flex: none; font-size: 0.9rem; }
/* rámeček v rámečku ne: vnořené panely jsou jen oddíly */
.cech-panel .cech-panel, .cech-card .cech-panel, .cech-drawer .cech-panel { margin-bottom: 16px; padding: 0; border: 0; border-radius: 0; background: none; }
.cech-section { margin-top: clamp(28px, 4vw, 40px); }
.cech-section > h2:first-child { margin-bottom: 12px; }
.cech-stack { display: grid; gap: 20px; align-content: start; }
.cech-stack > .cech-panel { margin-bottom: 0; }
.cech-columns { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); align-items: start; }
.cech-columns > aside h2, .cech-columns > .cech-stack:last-child h2 { font-size: 1.0625rem; }
.cech-intro { margin-bottom: 18px; }
.cech-intro h2 { margin: 0 0 4px; }
.cech-intro p { margin: 0; max-width: 70ch; color: var(--text-2); }
.cech-narrow { max-width: 680px; margin-inline: auto; }
.cech-article { max-width: 760px; }
.cech-article .cech-prose { font-size: 1.04rem; }
.cech-muted { color: var(--text-2); font-size: 0.92rem; }
.cech-meta { margin: 0; color: var(--text-2); font-size: 0.875rem; }
.cech-link { font-weight: 600; text-decoration: none; }
.cech-link:hover { text-decoration: underline; }
.cech-prose { color: var(--text); max-width: 72ch; }
.cech-prose :where(p) { margin: 0 0 0.7em; }
.cech-prose :where(p:last-child) { margin-bottom: 0; }
.cech-prose :where(ul, ol) { margin: 0 0 0.7em; }
.cech-clip { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.cech-kicker { margin: 0 0 6px; color: var(--text-3); font-size: 0.82rem; font-weight: 600; }
.cech-warn { color: var(--danger); font-weight: 600; }
.cech-gate { max-width: 640px; margin: 8px auto 0; text-align: center; }
.cech-gate p { color: var(--text-2); }
.cech-gate .cech-actions { justify-content: center; margin-top: 18px; }
.cech-sys-box { text-align: left; }

/* ================================================================ tlačítka */
.cech-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--text); font: 600 0.9rem/1.2 var(--font-ui); text-align: center; text-decoration: none; cursor: pointer; transition: background-color var(--dur), border-color var(--dur), color var(--dur), transform 120ms var(--ease-out); }
.cech-btn:hover { background: var(--hover); color: var(--text); }
.cech-btn:active { transform: translateY(1px); }
.cech-btn:disabled, .cech-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.cech-btn .ico { width: 16px; height: 16px; }
.cech-btn-primary { background: var(--accent-fill); border-color: transparent; color: var(--on-accent); box-shadow: var(--shadow-sm); }
.cech-btn-primary:hover { background: var(--accent-fill-hover); color: var(--on-accent); }
.cech-btn-danger { color: var(--danger); border-color: color-mix(in oklch, var(--danger) 35%, var(--line)); }
.cech-btn-danger:hover { background: var(--danger); border-color: transparent; color: var(--on-accent); }
.cech-btn-sm { min-height: 30px; padding: 4px 10px; border-radius: 7px; font-size: 0.84rem; }
.cech-btn.is-on { border-color: var(--ok); color: var(--ok); }
.cech-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cech-inline { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cech-actions form, .cech-card-foot form { margin: 0; }
.cech :where(.cech-signup, .cech-vote, .cech-inline) button:not(.cech-btn) { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 11px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--text); font-size: 0.84rem; font-weight: 600; transition: background-color var(--dur), border-color var(--dur), color var(--dur); }
.cech :where(.cech-signup, .cech-vote, .cech-inline) button:not(.cech-btn):hover { background: var(--hover); }
.cech :where(.cech-signup, .cech-vote) button.is-on { background: var(--accent-soft); border-color: color-mix(in oklch, var(--accent) 45%, transparent); color: var(--accent); }
.cech-vote { display: flex; gap: 6px; }
.cech-vote button { border-radius: 999px !important; }

/* ================================================================ formuláře */
.cech-form { display: grid; gap: 14px; max-width: 760px; }
.cech-form-compact { max-width: 560px; gap: 10px; }
.cech-form label, .cech-filters label { display: grid; gap: 6px; color: var(--text-2); font-size: 0.875rem; font-weight: 600; line-height: 1.3; }
.cech :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="submit"], [type="button"]), select, textarea) { width: 100%; min-width: 0; min-height: 38px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--text); font: 400 0.95rem/1.4 var(--font-ui); transition: border-color var(--dur), box-shadow var(--dur); }
.cech :where(input, select, textarea):hover { border-color: color-mix(in oklch, var(--text-3) 60%, var(--line-strong)); }
.cech :where(input, select, textarea):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 22%, transparent); }
.cech :where(input:disabled, select:disabled, textarea:disabled) { opacity: 0.6; cursor: not-allowed; }
.cech :where(textarea) { min-height: 110px; resize: vertical; }
.cech :where(input::placeholder, textarea::placeholder) { color: var(--text-3); opacity: 1; }
.cech :where(select) { max-width: 100%; }
.cech :where(input[type="checkbox"], input[type="radio"]) { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: none; }
.cech :where(input[type="file"]) { font-size: 0.9rem; }
.cech-two { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.cech-three { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.cech-filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: end; margin-bottom: 20px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.cech-filters label { flex: 1 1 170px; }
.cech-check, .cech .cech-check { display: inline-flex; align-items: center; gap: 8px; }
.cech-form label.cech-check, .cech-filters label.cech-check { display: flex; flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.cech-checks { display: grid; gap: 6px 18px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin: 0; padding: 10px 14px 12px; border: 1px solid var(--line); border-radius: var(--r); }
.cech-checks legend { padding: 0 6px; color: var(--text-2); font-size: 0.82rem; font-weight: 600; }
.cech-checks label { display: flex; gap: 8px; align-items: center; color: var(--text); font-weight: 500; }
.cech-inline > label, .cech-inline > input, .cech-inline > select { flex: 1 1 180px; min-width: 0; }
.cech-details form.cech-inline { display: flex; flex-wrap: wrap; }
.cech-pos-form { display: flex; gap: 6px; padding-left: 42px; }
.cech-pos-form input { flex: 1 1 160px; }

/* ================================================================ hlášení, štítky, razítka */
.cech-notice { display: block; margin: 0 0 18px; padding: 11px 14px; border: 1px solid color-mix(in oklch, var(--info) 30%, var(--line)); border-radius: var(--r-lg); background: var(--info-soft); color: var(--text); font-size: 0.95rem; }
.cech-notice.ok { border-color: color-mix(in oklch, var(--ok) 35%, var(--line)); background: var(--ok-soft); }
.cech-notice.bad { border-color: color-mix(in oklch, var(--danger) 35%, var(--line)); background: var(--danger-soft); }
.cech-notice a { font-weight: 600; }
.cech-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--hover); color: var(--text-2); font-size: 0.78rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.cech-badge.is-main { background: var(--gold-soft); color: var(--gold-strong); }
.cech-stamp { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 8px; border-radius: 999px; background: color-mix(in oklch, currentColor 11%, transparent); color: var(--gold-strong); font-size: 0.78rem; font-weight: 650; line-height: 1.5; white-space: nowrap; }
.cech-stamp::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cech-stamp.author, .cech-stamp.planned { color: var(--text-2); }
.cech-stamp.verified, .cech-stamp.paid, .cech-stamp.approved, .cech-stamp.done { color: var(--ok); }
.cech-stamp.stale, .cech-stamp.rejected, .cech-stamp.revoked, .cech-stamp.cancelled { color: var(--danger); }
.cech-stamp.pending, .cech-stamp.requested { color: var(--gold-strong); }
.cech-empty { margin: 0; padding: 26px 18px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--text-2); text-align: center; }
.cech-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ================================================================ čísla a seznamy */
.cech-stats { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--line); }
.cech-stat { display: grid; gap: 2px; align-content: start; padding: 14px 16px; background: var(--surface); }
.cech-stat b { font-size: 1.5rem; font-weight: 650; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--text); }
.cech-stat span { color: var(--text-2); font-size: 0.84rem; line-height: 1.3; }
.cech-stat.is-warn b { color: var(--accent); }
.cech-panel .cech-stats { margin-bottom: 16px; }
.cech-mine { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 16px; }
.cech-mine > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); }
.cech-mine span { color: var(--text-3); font-size: 0.8rem; font-weight: 600; }
.cech-mine strong { font-size: 1.05rem; font-weight: 650; }
.cech-mine small { color: var(--text-2); font-size: 0.86rem; }
.cech-ledger { display: grid; gap: 8px; margin: 0 0 16px; }
.cech-ledger div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.cech-ledger dt { color: var(--text-2); font-size: 0.875rem; font-weight: 600; }
.cech-ledger dd { margin: 0; font-size: 1.2rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.cech-facts { display: grid; gap: 4px; margin: 4px 0 2px; padding: 10px 0 0; border-top: 1px solid var(--line-soft); }
.cech-facts div { display: flex; justify-content: space-between; gap: 12px; }
.cech-facts dt { color: var(--text-2); font-size: 0.84rem; font-weight: 600; }
.cech-facts dd { margin: 0; color: var(--gold-strong); letter-spacing: 0.1em; }
.cech-links { display: grid; margin: 0; padding: 0; list-style: none; }
.cech-links a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-weight: 600; text-decoration: none; }
.cech-links li:last-child a { border-bottom: 0; }
.cech-links a:hover { color: var(--accent); }
.cech-mini { margin: 0; padding: 0; list-style: none; }
.cech-mini li { border-bottom: 1px solid var(--line-soft); }
.cech-mini li:last-child { border-bottom: 0; }
.cech-mini a { display: grid; gap: 1px; margin: 0 -8px; padding: 9px 8px; border-radius: var(--r-sm); text-decoration: none; transition: background-color var(--dur); }
.cech-mini a:hover { background: var(--hover); }
.cech-mini strong { font-weight: 600; }
.cech-mini span { color: var(--text-2); font-size: 0.875rem; }
.cech-mini b { color: var(--accent); font-weight: 650; }
.cech-mini a:hover strong { color: var(--text); }
.cech-people-list, .cech-role-list { display: grid; margin: 0; padding: 0; list-style: none; }
.cech-people-list li, .cech-role-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.cech-people-list li:last-child, .cech-role-list li:last-child { border-bottom: 0; }
.cech-people-list a { font-weight: 600; text-decoration: none; }
.cech-people-list a:hover { color: var(--accent); }
.cech-people-list span, .cech-role-list span { grid-column: 1; color: var(--text-2); font-size: 0.875rem; }
.cech-people-list em, .cech-role-list em { grid-row: 1 / span 2; grid-column: 2; color: var(--text-3); font-size: 0.84rem; font-style: normal; white-space: nowrap; overflow-wrap: anywhere; }
.cech-role-list strong { font-weight: 600; }
.cech-role-free { opacity: 0.75; }
.cech-role-free em { color: var(--ok); font-style: italic; }
.cech-chips-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cech-chips-list li { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.92rem; }
.cech-chips-list a { font-weight: 600; text-decoration: none; }
.cech-chips-list small { color: var(--text-2); }
.cech-sub { margin: 18px 0 6px; font-size: 1rem; }

/* ================================================================ tabulky */
.cech-scroll, .cech .cech-table-wrap { max-width: 100%; overflow-x: auto; }
.cech-scroll { padding: 0 2px 4px; }
.cech .cech-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.cech-scroll .cech-table { min-width: 560px; }
.cech .cech-table th { padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--text-3); font: 600 0.8rem/1.3 var(--font-ui); text-align: left; vertical-align: bottom; white-space: nowrap; }
.cech .cech-table td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
.cech .cech-table :is(th, td):first-child { padding-left: 0; }
.cech .cech-table :is(th, td):last-child { padding-right: 0; }
.cech .cech-table tbody tr { transition: background-color var(--dur); }
.cech .cech-table tbody tr:hover { background: color-mix(in oklch, var(--hover) 55%, transparent); }
.cech .cech-table tr:last-child td { border-bottom: 0; }
.cech .cech-table a { font-weight: 600; text-decoration: none; }
.cech .cech-table a:hover { color: var(--accent); text-decoration: underline; }
.cech .cech-table td.num, .cech .cech-table th.num { text-align: right; white-space: nowrap; }
.cech .cech-table td.is-in { color: var(--ok); }
.cech .cech-table td.is-out { color: var(--danger); }
.cech-application { margin-bottom: 16px; }
.cech-application .cech-form { margin-top: 6px; }

/* ================================================================ karty */
.cech-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.cech-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.cech-card h3 { margin: 0; font-size: 1.0625rem; }
.cech-card h3 a { text-decoration: none; }
.cech-card h3 a:hover { color: var(--accent); }
a.cech-card { color: var(--text); text-decoration: none; transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur) var(--ease-out); }
a.cech-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); color: var(--text); }
a.cech-card:hover h3 { color: var(--accent); }
.cech-card.is-past, .cech-event.is-past { opacity: 0.78; }
.cech-card-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.cech-card-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.cech-card-foot > *, .cech-role-list li > *, .cech-details > * { min-width: 0; max-width: 100%; }
.cech-card-foot .cech-details { flex-basis: 100%; }
.cech-pay { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 4px; }
.cech-pay strong { font-size: 1.4rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text); }
.cech-pay span { color: var(--text-2); font-size: 0.875rem; }
.cech-contract .cech-pay strong { color: var(--accent); }
.cech-req { margin: 0; padding: 8px 12px; border-radius: var(--r); background: var(--gold-soft); font-size: 0.94rem; }
.cech-program { margin: 8px 0; padding: 8px 12px; border-radius: var(--r); background: var(--gold-soft); }
.cech-panel :is(.cech-card, .cech-pcard, .cech-top, .cech-item) { background: var(--surface-2); }
.cech-order.is-glejt { border-color: color-mix(in oklch, var(--gold) 50%, var(--line)); }
.cech-chip-alt { margin-left: auto; border-style: dashed !important; }

/* ================================================================ rozbalovací části */
.cech-drawer { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.cech-drawer > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 16px; border-radius: var(--r-lg); color: var(--text); font-weight: 650; list-style: none; cursor: pointer; transition: background-color var(--dur); }
.cech-drawer > summary:hover { background: var(--hover); }
.cech-drawer > summary::-webkit-details-marker { display: none; }
.cech-drawer > summary::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(currentColor 0 0) center / 10px 1.75px no-repeat, linear-gradient(currentColor 0 0) center / 1.75px 10px no-repeat, var(--accent-soft); color: var(--accent); transition: transform 240ms var(--ease-out); }
.cech-drawer[open] > summary::before { transform: rotate(45deg); }
.cech-drawer[open] > summary { border-bottom: 1px solid var(--line-soft); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.cech-drawer .cech-form { max-width: none; padding: 18px 16px; }
.cech-drawer > :not(summary):not(.cech-form) { margin: 16px; }
.cech-details { margin-top: 4px; }
.cech-details > summary, .cech-pcard-edit > summary, .cech .cech-plan-hours summary { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; color: var(--text-2); font-size: 0.875rem; font-weight: 600; list-style: none; cursor: pointer; }
.cech-details > summary::-webkit-details-marker, .cech-pcard-edit > summary::-webkit-details-marker { display: none; }
.cech-details > summary::before, .cech-pcard-edit > summary::before { content: ""; width: 7px; height: 7px; margin: 0 2px; border-right: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor; transform: rotate(-45deg); transition: transform 200ms var(--ease-out); }
.cech-details[open] > summary::before, .cech-pcard-edit[open] > summary::before { transform: rotate(45deg); }
.cech-details > summary:hover, .cech-pcard-edit > summary:hover { color: var(--text); }
.cech-details[open] > summary { margin-bottom: 8px; }
:is(.cech-drawer, .cech-details, .cech-help, .cech-plan-day)::details-content { block-size: 0; overflow-y: clip; transition: block-size 260ms var(--ease-out), content-visibility 260ms allow-discrete; }
:is(.cech-drawer, .cech-details, .cech-help, .cech-plan-day)[open]::details-content { block-size: auto; }

/* ================================================================ filtry a přepínače */
.cech-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cech-chips a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 0.875rem; font-weight: 600; text-decoration: none; transition: background-color var(--dur), border-color var(--dur), color var(--dur); }
.cech-chips a:hover { border-color: var(--line-strong); color: var(--text); }
.cech-chips a[aria-current="page"] { background: var(--accent-soft); border-color: color-mix(in oklch, var(--accent) 40%, transparent); color: var(--accent); }
.cech-chips a small { color: inherit; opacity: 0.7; }
.cech .cech-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 0.88rem; white-space: nowrap; cursor: pointer; }
.cech .cech-chip:has(input:checked) { border-color: color-mix(in oklch, var(--accent) 40%, transparent); background: var(--accent-soft); }

/* ================================================================ přehled: stav, práce, nejlepší */
.cech-balance { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px 32px; align-items: center; }
.cech-balance-n { margin: 0 0 6px; font-size: 2.25rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.cech-balance-n small { margin-left: 4px; color: var(--text-2); font-size: 0.45em; font-weight: 600; }
.cech-diff { margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 0.8rem; font-weight: 650; background: color-mix(in oklch, currentColor 12%, transparent); }
.cech-diff.up { color: var(--ok); }
.cech-diff.down { color: var(--danger); }
.cech-work-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); margin: 0; padding: 0; list-style: none; }
.cech-work-list a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color var(--dur), background-color var(--dur); }
.cech-work-list a:hover { border-color: var(--line-strong); background: var(--hover); color: var(--text); }
.cech-work-list strong { flex: 1; font-size: 0.94rem; font-weight: 600; line-height: 1.25; }
.cech-work-list b { min-width: 24px; padding: 1px 7px; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent); font-size: 0.8rem; font-weight: 700; line-height: 1.5; text-align: center; font-variant-numeric: tabular-nums; }
.cech-work-role { margin: -4px 0 10px; }
.cech-top3 { display: grid; gap: 8px; margin-top: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.cech-top { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 1px 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; transition: border-color var(--dur); }
.cech-top:hover { border-color: var(--line-strong); }
.cech-rank { grid-row: span 3; color: var(--gold-strong); font-size: 1.3rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.cech-top strong { font-weight: 600; line-height: 1.25; }
.cech-top span { color: var(--text-2); font-size: 0.84rem; }
.cech-top b { color: var(--accent); font-weight: 650; }
.cech-links + .cech-links { margin-top: 8px; }
.cech-admin-note p { color: var(--text-2); }

/* ================================================================ akce a kalendář */
.cech-event { flex-direction: row; gap: clamp(12px, 2vw, 20px); align-items: flex-start; }
.cech-date { flex: none; width: 64px; padding: 8px 4px 7px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); text-align: center; }
.cech-date b { display: block; font-size: 1.6rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.cech-date span { display: block; margin-top: 2px; color: var(--accent); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.cech-date small { display: block; margin-top: 2px; color: var(--text-3); font-size: 0.78rem; }
.cech-event-body { display: grid; flex: 1; gap: 8px; min-width: 0; align-content: start; }
.cech-people { display: flex; flex-wrap: wrap; gap: 5px; }
.cech-person { padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); font-size: 0.84rem; }
.cech-person.is-maybe { border-style: dashed; }

/* ================================================================ plán týdne (mřížka dny × hodiny) */
.cech-plan { display: grid; grid-template-columns: auto repeat(7, minmax(44px, 1fr)); gap: 4px; min-width: 420px; }
.cech-plan > b, .cech-plan > i { display: grid; place-items: center; padding: 4px 6px; color: var(--text-2); font-size: 0.8rem; font-style: normal; font-weight: 650; }
.cech-plan > b small { display: block; color: var(--text-3); font-size: 0.78rem; font-weight: 400; }
.cech-slot { position: relative; display: block; }
.cech-slot input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cech-slot span { display: grid; place-items: center; min-height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm); background: color-mix(in oklch, var(--ok) calc(var(--heat, 0) * 60%), transparent); color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; transition: border-color var(--dur), box-shadow var(--dur), transform 120ms var(--ease-out); }
.cech-slot input:checked + span { box-shadow: inset 0 0 0 2px var(--text); }
.cech-slot input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.cech-slot:hover span { border-color: var(--line-strong); }
.cech-slot:active span { transform: scale(0.97); }
.cech-slot.is-past span { opacity: 0.45; }

/* ================================================================ lidé a oddělení */
.cech-depts { display: grid; gap: 0 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); align-items: start; }
.cech-roster { margin: 0; padding: 0; list-style: none; }
.cech-member { display: grid; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.cech-member:last-child { border-bottom: 0; }
.cech-member-main { display: flex; gap: 10px; align-items: center; min-width: 0; }
.cech-member-main img, .cech-member-main .cech-avatar { width: 32px; height: 32px; }
.cech-member-main div { display: grid; min-width: 0; line-height: 1.3; }
.cech-member-main a { font-weight: 600; text-decoration: none; }
.cech-member-main a:hover { color: var(--accent); text-decoration: underline; }
.cech-member-main span { color: var(--text-2); font-size: 0.875rem; }
.cech-member.is-missing { margin: 0 -8px; padding-inline: 8px; border-radius: var(--r); background: var(--danger-soft); }
.cech-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--hover); object-fit: cover; }
.cech-open { margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--text-2); font-size: 0.9rem; }
.cech-dept-nav { position: sticky; top: var(--sticky-top); z-index: calc(var(--z-sticky) - 1); margin: 0 0 18px; padding: 10px 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.cech-dept { margin-bottom: 28px; scroll-margin-top: calc(var(--sticky-top) + 64px); }
.cech-dept-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cech-dept-head h2 { margin: 0; font-size: 1.125rem; }
.cech-pcards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin: 0; padding: 0; list-style: none; }
.cech-pcard { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: border-color var(--dur); }
.cech-pcard:hover { border-color: var(--line-strong); }
.cech-pcard.is-missing { border-color: color-mix(in oklch, var(--danger) 40%, var(--line)); background: var(--danger-soft); }
.cech-pcard-main { display: flex; gap: 10px; align-items: center; min-width: 0; color: var(--text); text-decoration: none; }
.cech-pcard-main:hover strong { color: var(--accent); }
.cech-pcard-main img, .cech-pcard-main .cech-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; }
.cech-pcard-main > span { display: grid; min-width: 0; line-height: 1.25; }
.cech-pcard-main strong { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cech-pcard-main em { color: var(--text-2); font-size: 0.9rem; font-style: normal; }
.cech-pcard-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--text-2); font-size: 0.84rem; }
.cech-pcard-edit[open] > summary { margin-bottom: 6px; }
.cech-pcard .cech-pos-form { padding-left: 0; }
.cech-dot::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--line-strong); vertical-align: 1px; }
.cech-dot.is-active::before { background: var(--ok); }
.cech-dot.is-away::before { background: var(--gold); }
.cech-dot.is-silent::before { background: var(--danger); }
.cech-profile { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.cech-profile > img, .cech-avatar-lg { flex: none; width: 80px; height: 80px; border-radius: 50%; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line-strong); }
.cech-profile h2 { margin: 0 0 4px; font-size: 1.5rem; }
.cech-profile .cech-kicker { margin-bottom: 4px; }
.cech-contact.rel-5, .cech-contact.rel-4 { border-color: color-mix(in oklch, var(--ok) 40%, var(--line)); }
.cech-contact.rel-1, .cech-contact.rel-2 { border-color: color-mix(in oklch, var(--danger) 40%, var(--line)); }

/* deník aktivity */
.cech-act-list { display: grid; gap: 2px 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin-bottom: 14px; }
.cech-act-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.cech-act-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cech-act-row small { color: var(--text-3); }
.cech-act-row select { width: auto; min-height: 30px; flex: none; padding: 3px 8px; }
.cech-act-grid td, .cech-act-grid th { padding: 6px 4px; text-align: center; }
.cech-act-grid td:first-child, .cech-act-grid th:first-child { text-align: left; white-space: nowrap; }

/* výroba: postup */
.cech-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.cech-steps span { padding: 3px 10px; border: 1px dashed var(--line-strong); border-radius: 999px; color: var(--text-3); font-size: 0.875rem; }
.cech-steps span.is-done { border-style: solid; border-color: color-mix(in oklch, var(--ok) 45%, transparent); background: var(--ok-soft); color: var(--text); }
.cech-steps small { color: var(--text-2); }

/* ================================================================ listiny: rozkazy a glejty (papír i v tmavém režimu) */
.cech-charter { position: relative; max-width: 760px; margin: 0 auto 28px; padding: clamp(26px, 5vw, 54px) clamp(20px, 5vw, 58px); border: 1px solid var(--doc-brass); border-radius: 4px; background: linear-gradient(180deg, oklch(0.975 0.014 84), var(--doc-paper-2)); color: var(--doc-ink); font-family: var(--font-doc); box-shadow: 0 0 0 5px var(--doc-paper), 0 0 0 6px var(--doc-rule), 0 18px 28px -20px oklch(0.2 0.03 58 / 0.7); }
.cech-charter :where(h2, h3, p, strong, a) { color: var(--doc-ink); }
.cech-charter header { margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--doc-rule); text-align: center; }
.cech-charter h2 { margin: 6px 0 10px; font: 600 clamp(1.6rem, 1.3rem + 1.6vw, 2.3rem)/1.15 var(--font-title); }
.cech-charter .cech-kicker { color: var(--doc-ink-2); font: 600 0.78rem/1 var(--font-title); letter-spacing: 0.16em; text-transform: uppercase; }
.cech-charter-to { margin: 0; font-size: 1.12rem; }
.cech-charter .cech-prose { max-width: none; color: var(--doc-ink); font-size: 1.14rem; line-height: 1.7; }
.cech-charter footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--doc-rule); }
.cech-charter footer p { margin: 0; }
.cech-charter .cech-muted, .cech-charter .cech-meta { color: var(--doc-ink-2); }
.cech-charter::after { content: ""; position: absolute; right: clamp(16px, 4vw, 40px); bottom: -22px; width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle at 38% 34%, oklch(0.64 0.19 34), oklch(0.45 0.17 32) 62%); box-shadow: inset 0 0 0 3px oklch(1 0 0 / 0.1), 0 3px 6px oklch(0.2 0.03 58 / 0.45); }
.cech-charter.is-glejt::after { background: radial-gradient(circle at 38% 34%, oklch(0.8 0.11 82), oklch(0.55 0.09 72) 62%); }
.cech-charter .cech-btn { border-color: var(--doc-rule); background: transparent; color: var(--doc-ink); }
.cech .t-herald { font-family: var(--font-doc); font-size: 1.08rem; }

/* ================================================================ stránkové bloky (mapa, předměty, oprávnění, účetnictví, turnaje…) */
/* ---------------------------------------------------------------- Mapa, plánovač a katalog předmětů (1.1) */
.cech .cech-map-panel { padding: 12px; }
.cech .cech-map-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.cech .cech-map-filters { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.cech .cech-map-search { display: flex; gap: 6px; flex: 1 1 200px; min-width: 0; }
.cech .cech-map-search input, .cech .cech-map-search select { flex: 1 1 auto; min-width: 0; }
.cech .cech-map-draw { display: flex; flex-wrap: wrap; gap: 6px; }
.cech .cech-map-draw [aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent-strong); }
.cech .cech-map { position: relative; isolation: isolate; height: clamp(420px, calc(100vh - 300px), 820px); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #e9dcc0; }
.cech .cech-map.is-drawing { cursor: crosshair; }
.cech .cech-map.is-drawing .leaflet-container, .cech .cech-map.is-drawing .leaflet-interactive { cursor: crosshair; }
.cech .cech-map-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px; border: 1px solid color-mix(in oklch, var(--accent) 35%, var(--line)); background: var(--accent-soft); border-radius: var(--r); }
.cech .cech-map-hint[hidden] { display: none; }
.cech .cech-map-hint-actions { display: inline-flex; gap: 6px; margin-left: auto; }
.cech .cech-map-edit { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.cech .cech-map-err { color: var(--accent-strong); font-weight: 600; }
.cech .cech-map-coords { padding: 2px 8px; border-radius: 4px; background: rgb(255 255 255 / .8); color: #3a2a18; font: 12px/1.4 ui-monospace, monospace; }
.cech .cech-pin span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--pin, #8b5a2b); border: 2px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .45); font-size: 15px; line-height: 1; }
.cech .cech-pin span::first-line { line-height: 1; }
.cech .leaflet-marker-icon.cech-pin { background: none; border: 0; }
.cech .cech-pin span > * , .cech .cech-pin span { text-align: center; }
.cech .leaflet-popup-content { margin: 12px 14px; font-family: var(--font-ui); font-size: 15px; color: #2b2116; }
.cech .cech-map-pop h3 { margin: 2px 0 6px; font-family: var(--font-ui); font-size: 1.05rem; }
.cech .cech-map-pop p { margin: 4px 0; }
.cech .cech-map-pop-kind, .cech .cech-map-pop-meta { font-size: .85rem; color: #6b5a44; }
.cech .cech-map-pop-body { white-space: normal; }
.cech .cech-map-pop-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cech .cech-map-tip { font-family: var(--font-ui); }
.cech .cech-map-list { margin-top: 16px; }
.cech .cech-fieldset { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 12px 12px; margin: 4px 0 10px; min-width: 0; }
.cech .cech-fieldset legend { padding: 0 6px; font-family: var(--font-ui); font-size: .85rem; color: var(--text-2); }

/* plánovač */
.cech .cech-planner-form { align-items: end; }
.cech .cech-earn-plan { list-style: none; margin: 8px 0 12px; padding: 0; counter-reset: krok; display: grid; gap: 6px; }
.cech .cech-earn-plan li { min-width: 0; counter-increment: krok; display: grid; grid-template-columns: auto auto 1fr auto; gap: 4px 10px; align-items: baseline; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in oklch, var(--surface-2) 70%, transparent); }
.cech .cech-earn-plan li::before { content: counter(krok) "."; font-family: var(--font-ui); color: var(--gold-strong); }
.cech .cech-earn-time { font: 600 .9rem ui-monospace, monospace; color: var(--text-2); }
.cech .cech-earn-plan li b { color: var(--ok); white-space: nowrap; }
.cech .cech-earn-plan li small { grid-column: 2 / -1; color: var(--text-3); }

/* katalog předmětů */
.cech .cech-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 14px 0; }
.cech .cech-item { display: grid; justify-items: center; gap: 2px; padding: 12px 10px; border: 1px solid var(--line); border-radius: var(--r-lg); text-align: center; text-decoration: none; color: inherit; background: color-mix(in oklch, var(--surface-2) 55%, transparent); min-width: 0; }
.cech .cech-item:hover, .cech .cech-item:focus-visible { border-color: var(--gold); box-shadow: 0 2px 10px rgb(60 40 10 / .12); }
.cech .cech-item-name { font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.cech .cech-item small, .cech .cech-item-meta { font-size: .85rem; color: var(--text-3); }
.cech .cech-item-stats { font-size: .85rem; color: var(--text-2); }
.cech .cech-item-ico { width: 48px; height: 48px; object-fit: contain; image-rendering: auto; background: radial-gradient(circle, rgb(40 30 20 / .55), rgb(40 30 20 / .25)); border-radius: 8px; padding: 3px; }
.cech .cech-item-ico.is-empty { display: grid; place-items: center; font-size: 22px; background: var(--surface-2); }
.cech .cech-item-head { display: flex; gap: 16px; align-items: center; margin-bottom: 10px; }
.cech .cech-item-head .cech-item-ico { width: 96px; height: 96px; }
.cech .cech-item-chip { display: inline-flex; gap: 10px; align-items: center; margin: 4px 0 8px; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; color: inherit; max-width: 100%; }
.cech .cech-item-chip .cech-item-ico { width: 40px; height: 40px; flex: none; }
.cech .cech-item-chip span { display: grid; min-width: 0; }
.cech .cech-item-chip small { color: var(--text-3); overflow-wrap: anywhere; }
.cech .cech-pager { display: flex; gap: 12px; justify-content: center; align-items: center; margin: 10px 0 20px; }
.cech .cech-item-pick { position: relative; }
.cech .cech-pick-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 4px; list-style: none; max-height: 320px; overflow-y: auto; background: var(--surface); border: 1px solid var(--gold); border-radius: 8px; box-shadow: 0 8px 24px rgb(40 25 10 / .25); font-weight: 400; }
.cech .cech-pick-list[hidden] { display: none; }
.cech .cech-pick-list li { display: flex; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 6px; cursor: pointer; }
.cech .cech-pick-list li[aria-selected="true"], .cech .cech-pick-list li:hover { background: color-mix(in oklch, var(--gold) 22%, transparent); }
.cech .cech-pick-list img { width: 32px; height: 32px; flex: none; background: rgb(40 30 20 / .45); border-radius: 6px; }
.cech .cech-pick-list span { display: grid; min-width: 0; }
.cech .cech-pick-list small { color: var(--text-3); }

@media (max-width: 560px) {
  .cech .cech-map { height: 68vh; }
  .cech .cech-map-hint-actions { margin-left: 0; }
  .cech .cech-items { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .cech .cech-earn-plan li { display: flex; flex-wrap: wrap; gap: 2px 8px; }
  .cech .cech-earn-plan li strong { flex: 1 1 60%; min-width: 0; overflow-wrap: anywhere; }
  .cech .cech-earn-plan li small { flex-basis: 100%; }
}

/* ---------------------------------------------------------------- Stav, rozdělení po kusech, noční hodiny (1.2) */
.cech .cech-estate { display: inline-block; font-size: .95em; line-height: 1; vertical-align: -1px; }
.cech .cech-estate-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 12px; }
.cech .cech-estate-form .is-on { background: var(--gold); border-color: var(--gold-strong); color: #1d150c; }
.cech .cech-pcard-also { margin: 2px 0 0; font-size: .85rem; color: var(--text-3); }
.cech .cech-split { display: grid; gap: 6px; }
.cech .cech-split-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 8px; align-items: center; }
.cech .cech-split-row select { min-width: 0; }
.cech .cech-split-n { display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.cech .cech-split-n input { width: 100%; min-width: 0; }
.cech .cech-plan > i.is-night { color: var(--text-3); font-style: italic; }
.cech .cech-plan > i.is-night::after { content: " 🌙"; font-size: .8em; }

/* ---------------------------------------------------------------- Oprávnění a ruční role (1.3) */
.cech .cech-perm-cards { grid-template-columns: 1fr; }
.cech .cech-perm-card h3 { margin-bottom: 6px; }
.cech .cech-perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 14px; }
.cech .cech-perm-grid label { display: grid; gap: 3px; min-width: 0; }
.cech .cech-perm-grid label > span { font-weight: 600; font-size: .95rem; }
.cech .cech-perm-grid label small { display: block; font-weight: 400; font-size: .8rem; color: var(--text-3); }
.cech .cech-perm-grid select { min-width: 0; width: 100%; }
.cech .cech-title-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; padding: 0; }
.cech .cech-title-chips li { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border: 1px solid var(--gold); border-radius: 999px; font-size: .9rem; background: color-mix(in oklch, var(--gold) 14%, transparent); }
.cech .cech-title-chips button { border: 0; background: none; cursor: pointer; color: var(--text-3); font-size: .85rem; padding: 2px 6px; border-radius: 50%; }
.cech .cech-title-chips button:hover, .cech .cech-title-chips button:focus-visible { color: var(--accent); background: color-mix(in oklch, var(--accent) 15%, transparent); }
.cech .cech-title-edit .cech-pos-form input[name="name"] { min-width: 0; flex: 1 1 160px; }
.cech .cech-sub-block { margin-top: 10px; }
@media (max-width: 560px) { .cech .cech-perm-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Systém panství: účetnictví, daně, žold (1.4) */
.cech .cech-sys-nav { margin: 0 0 14px; }
/* člen má stejné odkazy v záložkách rozcestníku */
.app-main:has(> .app-tabs) .cech-sys-nav { display: none; }
.cech .cech-sys-box { margin-top: 16px; }
.cech .cech-lordship { border-color: color-mix(in oklch, var(--lord, var(--accent)) 45%, var(--line)); }
.cech .cech-lordship-head > :first-child::before { content: ""; display: inline-block; width: 0.62em; height: 0.62em; margin-right: 0.45em; border-radius: 50%; background: var(--lord, var(--accent)); vertical-align: 0.05em; }
.cech .cech-sheet-wrap { overflow: hidden; }
.cech .cech-sheet { display: block; width: 100%; max-width: 760px; height: auto; margin: 10px auto; border-radius: 4px; box-shadow: 0 6px 24px rgb(40 25 10 / .35); background: #e6d2a6; }
.cech .cech-spark { display: flex; align-items: flex-end; gap: 3px; height: 70px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.cech .cech-spark i { flex: 1 1 0; min-width: 4px; height: max(2px, var(--h)); background: var(--gold); border-radius: 2px 2px 0 0; }
.cech .is-archived { opacity: .7; }
@media print {
  body * { visibility: hidden; }
  .cech .cech-sheet, .cech .cech-sheet * { visibility: visible; }
  .cech .cech-sheet { position: fixed; inset: 0; width: 100%; max-width: none; box-shadow: none; margin: 0; }
}

.cech .cech-recip-row { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(70px, 1fr)); gap: 8px; align-items: end; margin-bottom: 6px; }
@media (max-width: 560px) { .cech .cech-recip-row { grid-template-columns: 1fr 1fr; } .cech .cech-recip-row label:first-child { grid-column: 1 / -1; } }

/* pečeť: volba písmen a barvy vosku */
.cech .cech-seal-colors { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.cech .cech-seal-color { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; cursor: pointer; }
.cech .cech-seal-color input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cech .cech-seal-color span { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 38% 34%, color-mix(in oklab, var(--accent) 70%, white), var(--accent) 65%); box-shadow: 0 1px 3px oklch(0.25 0.03 58 / .45); outline: 2px solid transparent; outline-offset: 2px; }
.cech .cech-seal-color span.is-lord { background: conic-gradient(#8b1e1e 0 25%, #1e3f8b 0 50%, #2f5d2a 0 75%, #b8902d 0); }
.cech .cech-seal-color input:checked + span { outline-color: var(--text); }
.cech .cech-seal-color input:focus-visible + span { outline-color: var(--accent); }

/* žádosti o smazání a přijaté listy */
.cech .cech-del-box, .cech .cech-del-req { border-color: color-mix(in oklch, var(--danger) 40%, var(--line)); }
.cech .cech-del-box blockquote, .cech .cech-del-req blockquote { margin: 6px 0 10px; padding: 6px 12px; border-left: 2px solid var(--line, currentColor); font-style: italic; white-space: pre-wrap; }
.cech .cech-row-actions { white-space: nowrap; text-align: right; }
.cech .cech-row-actions .cech-inline { display: inline-flex; margin-left: 4px; }

/* stav pro RP */
.cech .cech-rp-now { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 300px); gap: 18px 28px; align-items: start; margin-bottom: 18px; }
.cech .cech-rp-now h2 { margin: 0 0 10px; font-size: 1.3rem; }
.cech .cech-rp-now h3 { margin: 0 0 8px; font-size: 1rem; }
.cech .cech-rp-who p { margin: 0 0 6px; }
.cech .cech-rp-switch { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.cech .cech-rp-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line, currentColor); border-radius: 999px; background: transparent; color: var(--text); font: 600 .92rem/1.1 var(--font-ui); cursor: pointer; }
.cech .cech-rp-btn:hover { border-color: var(--accent); }
.cech .cech-rp-btn[aria-pressed="true"] { color: var(--on-accent); border-color: transparent; }
.cech .cech-rp-btn.is-off[aria-pressed="true"] { background: oklch(0.45 0.01 60); }
.cech .cech-rp-btn.is-afk[aria-pressed="true"] { background: oklch(0.58 0.12 75); }
.cech .cech-rp-btn.is-dc[aria-pressed="true"] { background: oklch(0.5 0.13 265); }
.cech .cech-rp-btn.is-ingame[aria-pressed="true"] { background: oklch(0.5 0.13 150); }
.cech .cech-rp-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: oklch(0.6 0.02 60 / .15); }
.cech .cech-rp-tag.is-ingame { background: oklch(0.6 0.13 150 / .2); }
.cech .cech-rp-tag.is-dc { background: oklch(0.6 0.13 265 / .2); }
.cech .cech-rp-tag.is-afk { background: oklch(0.7 0.12 75 / .25); }
@media (max-width: 760px) { .cech .cech-rp-now { grid-template-columns: 1fr; } .cech .cech-rp-btn { flex: 1 1 calc(50% - 6px); justify-content: center; } }


/* náhled daňového listu */
.cech .cech-sheet-dialog { width: min(720px, 100vw - 24px); max-height: 94dvh; box-sizing: border-box; padding: 16px 18px; border: 1px solid var(--gold); border-radius: 12px; background: var(--surface); color: var(--text); }
.cech .cech-sheet-dialog::backdrop { background: oklch(0.15 0.02 60 / .6); }
.cech .cech-sheet-dialog h2 { margin: 0; font-size: 1.2rem; }
.cech .cech-sheet-dialog img { display: block; width: 100%; height: auto; margin: 10px 0 12px; border-radius: 6px; box-shadow: 0 4px 16px rgb(40 25 10 / .25); }
.cech .cech-sheet-thumbs { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0; }
.cech .cech-sheet-thumbs figure { margin: 0; width: 132px; }
.cech .cech-sheet-thumbs figcaption { margin-top: 6px; font-size: .82rem; line-height: 1.35; }
.cech .cech-sheet-thumb { display: block; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); cursor: zoom-in; overflow: hidden; }
.cech .cech-sheet-thumb:hover, .cech .cech-sheet-thumb:focus-visible { border-color: var(--gold); }
.cech .cech-sheet-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 1240 / 1754; object-fit: cover; }
.cech .cech-table td .cech-btn[data-sheet-preview] { padding: 2px 7px; min-height: 0; }

/* předměty: lajky, oblíbené, wishlist, komentáře */
.cech .cech-item { align-content: start; }
.cech .cech-item-link { display: grid; justify-items: center; gap: 2px; color: inherit; text-decoration: none; }
.cech .cech-item:has(.cech-item-link:hover), .cech .cech-item:has(.cech-item-link:focus-visible) { border-color: var(--gold); box-shadow: 0 2px 10px rgb(60 40 10 / .12); }
.cech .cech-item-marks { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 6px; }
.cech .cech-item-marks button, .cech .cech-item-marks a { display: inline-flex; align-items: center; gap: 3px; min-height: 32px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: .85rem; cursor: pointer; text-decoration: none; filter: grayscale(.7); }
.cech .cech-item-marks button[aria-pressed="true"] { filter: none; border-color: var(--gold); background: color-mix(in oklch, var(--gold) 18%, transparent); }
.cech .cech-item-marks button:hover, .cech .cech-item-marks a:hover { filter: none; border-color: var(--gold); }
.cech .cech-item-marks small { color: var(--text-2); font-weight: 600; }
.cech .cech-item-marks.is-big { justify-content: flex-start; gap: 8px; }
.cech .cech-item-marks.is-big button { min-height: 40px; padding: 6px 14px; font-size: .95rem; }
.cech .cech-comments { list-style: none; margin: 0 0 14px; padding: 0; }
.cech .cech-comments li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.cech .cech-comments li p { margin: 0 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cech .cech-comments .cech-inline { display: inline; }
.cech .cech-sheet-dialog img[hidden] { display: none; }
.cech .cech-sheet-thumb { aspect-ratio: 1240 / 1754; width: 100%; }
.cech .cech-sheet-thumb-none { display: grid; place-items: center; height: 100%; padding: 8px; font-size: .78rem; color: var(--text-3); text-align: center; }

/* plán týdne: kdo kdy */
.cech .cech-plan-day { margin: 0 0 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: color-mix(in oklch, var(--surface-2) 50%, transparent); }
.cech .cech-plan-day > summary { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; cursor: pointer; }
.cech .cech-plan-day[open] > summary { margin-bottom: 10px; }
.cech .cech-plan-hours { margin-top: 8px; }
.cech .cech-plan-hours summary { cursor: pointer; font-weight: 600; }
.cech .cech-plan-hourlist { margin: 8px 0 0; padding: 0; list-style: none; columns: 2 260px; }
.cech .cech-plan-hourlist li { break-inside: avoid; margin: 0 0 4px; }
.cech .cech-plan-hourlist b { display: inline-block; min-width: 3.4em; }

/* předměty: varianty a barvy, podobné, sady */
.cech .cech-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--sw); border: 1px solid rgb(0 0 0 / .25); vertical-align: -1px; }
.cech .cech-item-vars { display: inline-flex; flex-wrap: wrap; gap: 3px; align-items: center; justify-content: center; font-size: .8rem; color: var(--text-2); }
.cech .cech-item-tally { margin: 6px 0 0; font-size: .85rem; color: var(--text-2); }
.cech .cech-variants { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.cech .cech-variant { display: grid; justify-items: center; gap: 2px; width: 82px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none; text-align: center; }
.cech .cech-variant small { font-size: .74rem; line-height: 1.25; color: var(--text-2); }
.cech .cech-variant:hover, .cech .cech-variant:focus-visible { border-color: var(--gold); }
.cech .cech-variant.is-on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in oklch, var(--accent) 35%, transparent); }
.cech .cech-item-chips { display: flex; flex-wrap: wrap; gap: 6px 10px; }

/* mapa: kontextové menu, zkratky, detail obce */
.cech .cech-map { position: relative; }
.cech .cech-map-menu { position: absolute; z-index: 1000; min-width: 220px; padding: 4px; border: 1px solid var(--gold); border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: 0 8px 24px rgb(30 20 10 / .3); }
.cech .cech-map-menu button { display: block; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; font-size: .92rem; text-align: left; cursor: pointer; }
.cech .cech-map-menu button:hover, .cech .cech-map-menu button:focus-visible { background: color-mix(in oklch, var(--gold) 20%, transparent); outline: none; }
.cech .cech-map-menu hr { margin: 4px 6px; border: 0; border-top: 1px solid var(--line); }
.cech .cech-map-keys { margin: 8px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: .9rem; }
.cech .cech-map-keys p { margin: 0 0 6px; }
.cech .cech-map-detail { image-rendering: auto; }
.cech .cech-map-label { pointer-events: none; }
.cech .cech-capture-img { display: block; margin: 8px 0; border-radius: 6px; overflow: hidden; border: 1px solid var(--line, #5a4630); }
.cech .cech-capture-img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.cech .cech-capture-text { max-height: 220px; overflow: auto; white-space: pre-wrap; font-size: 12px; }
.cech .cech-capture-actions { display: grid; gap: 6px; }
.cech .cech-token { width: 100%; font: 14px ui-monospace, monospace; padding: 8px; }
.cech .cech-steps { padding-left: 1.4em; display: grid; gap: 4px; }
.cech .cech-helper-status { margin: 10px 0 4px; padding: 8px 12px; border-radius: 6px; background: rgb(127 127 127 / .12); }
.cech .cech-helper-status.is-ok { background: rgb(46 125 50 / .16); }
.cech .cech-helper-status.is-err { background: rgb(183 28 28 / .16); }
.cech .cech-chips { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cech .cech-map-label span { display: inline-block; transform: translate(-50%, -50%); padding: 1px 8px; border-radius: 3px; background: rgb(244 234 210 / .88); border: 1px solid #8b6b3e; color: #3a2a18; font: 600 13px/1.4 'EB Garamond', Georgia, serif; white-space: nowrap; box-shadow: 0 1px 3px rgb(0 0 0 / .3); }

/* pokladna: finanční přehled */
.cech .cech-spark i.is-neg { background: var(--accent); }
.cech .cech-spark-net i:nth-child(n+13) { opacity: .75; background-image: repeating-linear-gradient(45deg, transparent 0 3px, rgb(255 255 255 / .35) 3px 5px); }
.cech .cech-cat-list { list-style: none; margin: 0; padding: 0; }
.cech .cech-cat-list li { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr auto; gap: 8px; align-items: center; margin: 0 0 6px; font-size: .92rem; }
.cech .cech-cat-list em { font-style: normal; color: var(--text-2); white-space: nowrap; }
.cech .cech-bar { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--gold) var(--w), color-mix(in oklch, var(--line) 60%, transparent) var(--w)); }
.cech .cech-tips ul { margin: 0 0 12px; padding: 0; list-style: none; }
.cech .cech-tips li { display: flex; gap: 8px; margin: 0 0 8px; }
.cech .cech-finance .cech-columns { margin-bottom: 14px; }


/* výběr předmětu: katalog v dialogu */
.cech .cech-item-pick-row { display: flex; gap: 6px; align-items: stretch; }
.cech .cech-item-pick-row input { flex: 1 1 auto; min-width: 0; }
.cech .cech-item-pick > small { display: block; margin-top: 3px; font-size: .78rem; font-weight: 400; }
.cech .cech-kb { width: min(860px, 100vw - 24px); }
.cech .cech-kb-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.cech .cech-kb-bar input { flex: 1 1 220px; }
.cech .cech-kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; max-height: 52dvh; overflow: auto; padding: 2px; }
.cech .cech-kb-item { display: grid; justify-items: center; gap: 2px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--text); font: inherit; text-align: center; cursor: pointer; }
.cech .cech-kb-item:hover, .cech .cech-kb-item:focus-visible { border-color: var(--gold); background: color-mix(in oklch, var(--gold) 10%, transparent); }
.cech .cech-kb-item strong { font-size: .88rem; line-height: 1.2; overflow-wrap: anywhere; }
.cech .cech-kb-item small { font-size: .75rem; color: var(--text-2); }
.cech .cech-kb-item img, .cech .cech-kb-noico { width: 48px; height: 48px; object-fit: contain; border-radius: 6px; background: radial-gradient(circle, rgb(40 30 20 / .5), rgb(40 30 20 / .2)); display: grid; place-items: center; }
.cech .cech-kb-vars { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.cech .cech-kb-varlist { display: flex; flex-wrap: wrap; gap: 8px; }
.cech .cech-kb-item.is-var { width: 96px; }


/* víc příležitostí na jednom místě */
.cech .cech-opp-checks { display: grid; gap: 2px 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); max-height: 220px; overflow: auto; margin: 6px 0; padding: 4px; border: 1px solid var(--line); border-radius: 8px; }
.cech .cech-map-pop-opps { margin: 0 0 8px; padding-left: 0; list-style: none; }
.cech .cech-map-pop-opps li { margin: 0 0 4px; }
.cech .cech-opp-row { display: grid; grid-template-columns: minmax(0, 2.4fr) repeat(4, minmax(64px, 1fr)); gap: 8px; align-items: end; margin-bottom: 6px; }
@media (max-width: 640px) { .cech .cech-opp-row { grid-template-columns: 1fr 1fr; } .cech .cech-opp-row label:first-child { grid-column: 1 / -1; } }

/* podniky */
.cech .cech-pots li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.cech .cech-pots li em { display: flex; flex-wrap: wrap; gap: 6px; font-style: normal; }
.cech .cech-pots li em .cech-inline { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.cech .cech-pots li.is-closed { opacity: .6; }

/* turnaje */
.cech .t-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 16px 0 22px; border-bottom: 1px solid var(--line); }
.cech .t-tabs a { padding: 9px 12px 8px; font: 600 .9rem/1.2 var(--font-ui); text-decoration: none; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cech .t-tabs a:hover { color: var(--text); }
.cech .t-tabs a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.cech .cech-steps span.t-now { border-style: solid; border-color: var(--accent); color: var(--text); font-weight: 600; }
.cech .t-sub { margin: 18px 0 8px; font-size: 1.02rem; }
.cech .t-todo { list-style: none; margin: 0; padding: 0; }
.cech .t-todo li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.cech .t-todo li:last-child { border-bottom: 0; }
.cech .t-todo li > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cech .t-tips { margin: 0 0 14px; padding-left: 1.2em; }
.cech .t-table .t-adv td { background: oklch(0.55 0.1 135 / .12); }
.cech .t-table .t-off td { opacity: .55; }
.cech .t-table .t-plan td { color: var(--text-2); font-style: italic; }
.cech .t-table input[type="number"] { width: 4.5em; padding: 3px 5px; }
.cech .t-table td .cech-inline { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.cech .t-more { position: relative; }
.cech .t-more > summary { cursor: pointer; padding: 2px 8px; list-style: none; font-weight: 700; }
.cech .t-more[open] { min-width: min(280px, 70vw); }
.cech .t-more .cech-actions { margin-top: 8px; }
.cech .t-podium ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cech .t-podium b { display: inline-block; min-width: 2em; }
.cech .t-q.is-on { border-color: var(--accent); }
.cech .t-q h3 small { font: italic 400 .85em var(--font-ui); color: var(--text-2); }
.cech .t-herald { margin: 4px 0 10px; font-style: italic; color: var(--text-2); }
.cech .t-result { display: grid; gap: 8px; }
.cech .t-scores { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.cech .t-score { display: grid; gap: 3px; font-size: .8rem; max-width: 9em; overflow-wrap: anywhere; }
.cech .t-score input { width: 5em; }
.cech .t-bracket-wrap { overflow-x: auto; padding-bottom: 10px; }
.cech .t-bracket { display: flex; min-width: max-content; }
.cech .t-col { display: flex; flex-direction: column; width: 190px; margin-right: 26px; }
.cech .t-col:last-child { margin-right: 0; }
.cech .t-col h4 { margin: 0 0 8px; font: 650 .8rem/1.2 var(--font-ui); color: var(--text-3); }
.cech .t-col-body { display: flex; flex-direction: column; flex: 1; }
.cech .t-pair { position: relative; display: flex; flex-direction: column; justify-content: space-around; flex: 1; gap: 8px; padding: 4px 0; }
.cech .t-pair.is-paired::after { content: ""; position: absolute; left: 100%; top: 25%; bottom: 25%; width: 13px; border: 1px solid var(--line); border-left: 0; }
.cech .t-pair.is-paired::before { content: ""; position: absolute; left: calc(100% + 13px); top: 50%; width: 13px; border-top: 1px solid var(--line); }
.cech .t-pair.is-straight::after { content: ""; position: absolute; left: 100%; top: 50%; width: 26px; border-top: 1px solid var(--line); }
.cech .t-match { display: block; border: 1px solid var(--line); background: var(--surface); color: inherit; text-decoration: none; font-size: .9rem; line-height: 1.25; }
.cech a.t-match:hover, .cech a.t-match:focus-visible { border-color: var(--accent); }
.cech .t-match.is-ready { border-color: color-mix(in oklch, var(--gold) 70%, transparent); background: color-mix(in oklch, var(--gold) 9%, var(--surface)); }
.cech .t-match.is-dead { opacity: .4; }
.cech .t-side { display: flex; justify-content: space-between; gap: 8px; padding: 4px 7px; }
.cech .t-side + .t-side { border-top: 1px solid var(--line-soft); }
.cech .t-side span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cech .t-side.is-win { font-weight: 700; }
.cech .t-side.is-out span { text-decoration: line-through; color: var(--text-3); }
.cech .t-side.is-empty span { color: var(--text-3); font-style: italic; }
.cech .t-solo, .cech .t-round { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.cech .t-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 20px; }
.cech .t-groups .cech-table { min-width: 0; }
.cech .t-heats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cech .t-heat { display: grid; gap: 6px; align-content: start; }
.cech .t-heat h4 { margin: 0; }
.cech .t-heat label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cech .t-heat input { width: 6em; }

/* hrnec štěstí */
.cech .t-draw .t-drawn { margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--gold-strong); }
.cech .t-draw .t-herald { font-size: 1.1rem; color: var(--text); }
.cech .t-winners { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.cech .t-winners li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.cech .t-winners li:last-child { border-bottom: 0; }

/* ================================================================ zásluhy: činy, úkoly, výzvy, odměny */
:root { --copper: oklch(0.62 0.12 52); --silver: oklch(0.72 0.02 250); --gold-medal: oklch(0.76 0.13 85); }
.zs-bar { position: relative; height: 8px; margin: 8px 0 6px; overflow: hidden; border-radius: 999px; background: var(--hover); }
.zs-bar i { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); border-radius: inherit; background: var(--accent-fill); transition: width 600ms var(--ease-expo); }
@starting-style { .zs-bar i { width: 0; } }
.zs-tasks { display: grid; gap: 2px; margin: 0 0 8px; padding: 0; list-style: none; }
.zs-tasks li { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.zs-tasks li:last-child { border-bottom: 0; }
.zs-tasks a { flex: 1; min-width: 0; font-weight: 600; text-decoration: none; }
.zs-tasks a:hover { color: var(--accent); }
.zs-tasks small { color: var(--text-3); font-variant-numeric: tabular-nums; }
.zs-check { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid var(--line-strong); border-radius: 50%; color: var(--on-accent); transition: background-color var(--dur), border-color var(--dur); }
.zs-check .ico { width: 14px; height: 14px; }
.zs-tasks li.is-done .zs-check { border-color: transparent; background: var(--ok); animation: zs-tick 420ms var(--ease-expo); }
.zs-tasks li.is-done a { color: var(--text-2); text-decoration: line-through; text-decoration-color: var(--text-3); }
@keyframes zs-tick { from { scale: 0.6; } }
.zs-medal { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--hover); color: var(--text-3); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.zs-medal .ico { width: 20px; height: 20px; }
.zs-medal.t-1 { background: radial-gradient(circle at 34% 30%, oklch(0.74 0.11 58), var(--copper) 70%); box-shadow: inset 0 0 0 2px oklch(1 0 0 / 0.16), 0 1px 2px oklch(0.3 0.05 50 / 0.4); color: oklch(0.99 0.01 80); }
.zs-medal.t-2 { background: radial-gradient(circle at 34% 30%, oklch(0.9 0.01 250), var(--silver) 70%); box-shadow: inset 0 0 0 2px oklch(1 0 0 / 0.25), 0 1px 2px oklch(0.3 0.02 250 / 0.4); color: oklch(0.3 0.02 250); }
.zs-medal.t-3 { background: radial-gradient(circle at 34% 30%, oklch(0.9 0.11 92), var(--gold-medal) 68%); box-shadow: inset 0 0 0 2px oklch(1 0 0 / 0.28), 0 1px 3px oklch(0.4 0.08 80 / 0.5); color: oklch(0.32 0.06 70); }
.zs-medal.is-lg { width: 48px; height: 48px; }
.zs-deeds { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); margin: 0; padding: 0; list-style: none; }
.zs-deed { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.zs-deed > div { display: grid; flex: 1; min-width: 0; gap: 2px; }
.zs-num { width: 5.5em; text-align: right; }
.zs-num.is-changed { border-color: var(--accent); }
.zs-kinds { display: flex; flex-wrap: wrap; gap: 6px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px 12px; margin: 0; }
.zs-kinds legend { padding: 0 4px; font-size: .85em; color: var(--text-2); }
.zs-deed-list { display: grid; gap: 8px; }
.zs-deed-list summary .zs-medal { vertical-align: middle; }
.zs-deed-edit { margin-top: 10px; }
.zs-deed strong { font-weight: 650; }
.zs-deed small { color: var(--text-2); font-size: 0.82rem; line-height: 1.35; }
.zs-deed .zs-bar { height: 5px; margin: 6px 0 0; }
.zs-deed.t-0 { background: none; }
.zs-pips { display: inline-flex; gap: 4px; }
.zs-pips i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.zs-deed.t-1 .zs-pips i.on { background: var(--copper); }
.zs-deed.t-2 .zs-pips i.on { background: var(--silver); }
.zs-deed.t-3 .zs-pips i.on { background: var(--gold-medal); }
.zs-badges { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 0; padding: 0; list-style: none; }
.zs-badges li { display: flex; align-items: center; gap: 10px; }
.zs-badges span { display: grid; line-height: 1.25; font-weight: 600; }
.zs-badges small { color: var(--text-3); font-size: 0.8rem; font-weight: 400; }
.zs-badges.is-list { display: grid; gap: 10px; }
.zs-badges.is-list .zs-medal { width: 34px; height: 34px; }
.zs-badges.is-list .zs-medal .ico { width: 16px; height: 16px; }
.zs-log { display: grid; margin: 0; padding: 0; list-style: none; }
.zs-log li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.zs-log li:last-child { border-bottom: 0; }
.zs-log li > .ico { margin-top: 2px; color: var(--text-3); }
.zs-log span { display: grid; min-width: 0; line-height: 1.35; }
.zs-log b { font-weight: 600; }
.zs-log small { color: var(--text-3); font-size: 0.82rem; overflow-wrap: anywhere; }
.zs-log em { color: var(--ok); font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.zs-log li.is-spend em { color: var(--text-2); }
.zs-log li.is-revoked em { color: var(--text-3); text-decoration: line-through; }
.zs-log .zs-revoke { grid-column: 2 / -1; margin: 0; }
.zs-challenges { display: grid; gap: 12px; }
.zs-challenge { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.cech-panel .zs-challenge { background: var(--surface-2); }
.zs-challenge h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1rem; }
.zs-challenge h3 .ico { color: var(--accent); }
.zs-challenge .zs-bar i { background: linear-gradient(90deg, var(--accent-fill), var(--gold)); }
.zs-challenge.is-closed { opacity: 0.8; }
.zs-challenge-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0 0 4px; font-size: 0.875rem; color: var(--text-2); }
.zs-ch-admin { margin: -4px 0 4px; }
.zs-mini { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; }
.zs-mini p { margin: 0; }
.zs-mini-n b { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.zs-mini-n span { color: var(--text-2); }
.zs-mini-ch { margin: 4px 0 12px; }
.zs-mini-ch p { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; margin: 0; }
.zs-mini-ch small { color: var(--text-3); }
.zs-board tr.is-me td { background: var(--accent-soft); }
.zs-board tr.zs-gap td { color: var(--text-3); text-align: center; }
.zs-place { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 700; color: oklch(0.3 0.04 70); }
.zs-place.p-1 { background: var(--gold-medal); }
.zs-place.p-2 { background: var(--silver); }
.zs-place.p-3 { background: var(--copper); color: oklch(0.98 0.01 70); }
.zs-claims { display: grid; margin: 0; padding: 0; list-style: none; }
.zs-claims li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.zs-claims li:last-child { border-bottom: 0; }
.zs-claims li > div { display: grid; gap: 2px; min-width: 0; }
.zs-claims small { color: var(--text-2); font-size: 0.85rem; }
.zs-reward .cech-pay strong { color: var(--gold-strong); }
/* oslava nového činu: medaile dopadne jako pečeť */
.cech-notice.is-deed { align-items: center; gap: 12px; }
.cech-notice.is-deed::before { display: none; }
.cech-notice.is-deed .zs-medal { animation: zs-seal 700ms var(--ease-expo); }
@keyframes zs-seal { 0% { scale: 1.6; rotate: -14deg; } 60% { scale: 0.94; rotate: 2deg; } 100% { scale: 1; rotate: 0deg; } }

/* ================================================================ přehled z widgetů */
.cech-dash-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; }
.cech-widgets { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; }
.cech-widgets > .cech-widget { margin: 0; }
.cech-widget.is-wide { grid-column: 1 / -1; }
.cech-widget[data-hidden] { display: none; }
.cech-grip { display: none; margin-right: 8px; color: var(--text-3); cursor: grab; }
.cech-widgets.is-editing .cech-widget { outline: 2px dashed color-mix(in oklch, var(--gold) 70%, transparent); outline-offset: 3px; }
.cech-widgets.is-editing .cech-grip { display: inline; }
.cech-widget.is-dragging { opacity: 0.4; }
.cech-widget-toggle, .cech-move button { padding: 4px 9px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.cech-move { display: inline-flex; gap: 4px; }
.cech-widgets.is-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 8px; row-gap: 0; column-gap: 16px; grid-auto-flow: row dense; align-items: start; }
.cech-widgets.is-grid > .cech-widget { position: relative; min-width: 0; margin: 0 0 16px; }
.cech-widgets.is-grid > .cech-widget.is-fixed { overflow: auto; }
.cech-widgets.is-grid > .cech-widget[data-hidden], .cech-widgets.is-editing .cech-widget[data-hidden] { display: none; }
.cech-widgets:not(.is-editing) .cech-widget { cursor: auto; outline: 0; }
.cech-widgets.is-editing .cech-widget .cech-panel-head { cursor: grab; }
.cech-widget-x { margin-left: 4px; padding: 2px 8px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font-size: 0.9rem; cursor: pointer; }
.cech-widget-x:hover { border-color: var(--danger); color: var(--danger); }
.cech-resize { position: absolute; right: 3px; bottom: 3px; width: 16px; height: 16px; cursor: nwse-resize; touch-action: none; border-radius: 0 0 var(--r) 0; background: linear-gradient(135deg, transparent 50%, var(--text-3) 50%, var(--text-3) 58%, transparent 58%, transparent 70%, var(--text-3) 70%, var(--text-3) 78%, transparent 78%); }
.cech-resize:focus-visible { outline: 2px solid var(--accent); }
.cech-widget.is-resizing { outline-style: solid !important; user-select: none; }
.cech-dash-palette { margin: 0 0 16px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.cech-dash-palette ul { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0; padding: 0; list-style: none; }
.cech-dash-palette li.is-locked { display: grid; gap: 2px; max-width: 320px; opacity: 0.55; }
.cech-dash-palette li.is-locked small { color: var(--text-2); font-size: 0.8rem; }

/* ================================================================ průvodce */
.cech-tour { position: fixed; inset: 0; z-index: var(--z-tour); pointer-events: none; }
.cech-tour-backdrop { position: absolute; inset: 0; pointer-events: auto; background: transparent; }
.cech-tour.is-dim .cech-tour-backdrop { background: var(--scrim); }
.cech-tour-spot { position: fixed; z-index: 1; pointer-events: none; border-radius: var(--r-lg); box-shadow: 0 0 0 3px var(--accent), 0 0 0 200vmax var(--scrim); transition: top 260ms var(--ease-out), left 260ms var(--ease-out), width 260ms var(--ease-out), height 260ms var(--ease-out); }
.cech-tour-pop { position: fixed; z-index: 2; width: min(400px, 100vw - 24px); max-height: calc(100dvh - 24px); overflow: auto; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); pointer-events: auto; animation: pop-in 220ms var(--ease-out); }
.cech-tour-pop.is-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.cech-tour-pop h2 { margin: 2px 0 6px; font-size: 1.15rem; }
.cech-tour-pop p { margin: 0 0 12px; color: var(--text-2); }
.cech-tour-pop .cech-kicker { margin-bottom: 4px; }
.cech-tour-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 12px; }
.cech-tour-nav span { display: flex; gap: 6px; }
.cech-tour-list summary { color: var(--text-2); font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.cech-tour-list ol { margin: 8px 0 0; padding-left: 22px; }
.cech-tour-list button { padding: 3px 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cech-tour-list button[aria-current="true"] { color: var(--accent); font-weight: 700; }
.cech .cech-tour-new { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent); font-size: 0.72rem; font-weight: 700; }
.cech .cech-tour-list-help ul { margin-top: 8px; }

/* ================================================================ nápověda */
.cech-help-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.cech-help-search { display: flex; flex: 1 1 320px; gap: 8px; }
.cech-help-search input { flex: 1; }
.cech-help { margin-bottom: 8px; padding: 0; }
.cech-help > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 16px; border-radius: var(--r-lg); font-size: 1.02rem; font-weight: 650; list-style: none; cursor: pointer; }
.cech-help > summary:hover { background: var(--hover); }
.cech-help > summary::-webkit-details-marker { display: none; }
.cech-help > summary::before { content: ""; align-self: center; width: 7px; height: 7px; margin-right: 2px; border-right: 1.75px solid var(--accent); border-bottom: 1.75px solid var(--accent); transform: rotate(-45deg); transition: transform 200ms var(--ease-out); }
.cech-help[open] > summary::before { transform: rotate(45deg); }
.cech-help > :not(summary) { padding: 0 16px 14px; }

/* ================================================================ rychlé hledání (Ctrl+K) */
.cmdk { width: min(620px, 100vw - 24px); max-height: min(560px, 100dvh - 24px); margin: 12vh auto auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); opacity: 0; transform: translateY(-6px) scale(0.985); transition: opacity 160ms var(--ease-out), transform 220ms var(--ease-out), overlay 220ms allow-discrete, display 220ms allow-discrete; }
.cmdk[open] { display: flex; flex-direction: column; opacity: 1; transform: none; }
@starting-style { .cmdk[open] { opacity: 0; transform: translateY(-6px) scale(0.985); } }
.cmdk::backdrop { background: var(--scrim); opacity: 0; transition: opacity 200ms var(--ease-out), overlay 220ms allow-discrete, display 220ms allow-discrete; }
.cmdk[open]::backdrop { opacity: 1; }
@starting-style { .cmdk[open]::backdrop { opacity: 0; } }
.cmdk-field { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.cmdk-field .ico { width: 18px; height: 18px; }
.cmdk .cmdk-input { flex: 1; min-height: 54px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--text); font-size: 1.05rem; }
.cmdk .cmdk-input:focus { box-shadow: none; }
.cmdk .cmdk-input::-webkit-search-cancel-button { display: none; }
.cmdk-list { flex: 1; margin: 0; padding: 6px; overflow-y: auto; list-style: none; overscroll-behavior: contain; scroll-padding: 8px; }
.cmdk-group { padding: 10px 10px 4px; color: var(--text-3); font-size: 0.78rem; font-weight: 650; }
.cmdk-item { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 6px 10px; border-radius: var(--r); color: var(--text); text-decoration: none; cursor: pointer; }
.cmdk-item .ico { width: 18px; height: 18px; color: var(--text-3); }
.cmdk-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item small { flex: none; color: var(--text-3); font-size: 0.8rem; }
.cmdk-item[aria-selected="true"] { background: var(--accent-soft); color: var(--text); }
.cmdk-item[aria-selected="true"] .ico { color: var(--accent); }
.cmdk-item mark { background: none; color: var(--accent); font-weight: 700; }
.cmdk-empty { padding: 28px 16px; color: var(--text-2); text-align: center; }
.cmdk-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 9px 14px; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--text-3); font-size: 0.78rem; }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 4px; }

/* ================================================================ hlášení po akci (toast) */
.cech-notice.is-flash { display: flex; align-items: flex-start; gap: 10px; position: fixed; top: 16px; right: 16px; z-index: var(--z-toast); width: min(420px, 100vw - 32px); margin: 0; padding-right: 40px; background: var(--surface); box-shadow: var(--shadow-pop); animation: toast-in 380ms var(--ease-expo); }
.cech-notice.is-flash::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 0.45em; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.cech-notice.is-flash.bad::before { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.cech-notice.is-flash.is-leaving { animation: toast-out 220ms var(--ease-out) forwards; }
.cech-toast-x { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-3); }
.cech-toast-x:hover { background: var(--hover); color: var(--text); }

/* ================================================================ pohyb */
/* příchody jen posunem – obsah je vidět, i kdyby animace neběžela (skrytá karta, náhled) */
@keyframes pop-in { from { translate: 0 6px; scale: 0.98; } }
@keyframes toast-in { from { translate: 0 -14px; scale: 0.97; } }
@keyframes toast-out { to { opacity: 0; translate: 0 -8px; scale: 0.98; } }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-rise-in { from { opacity: 0; translate: 0 8px; } }

/* plynulé přechody mezi stránkami (prohlížeče bez podpory stránku prostě přepnou) */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 260ms; animation-timing-function: var(--ease-out); }
/* kostra se nemění: starý snímek pryč, nový hned (jinak by se dva stejné obrázky sečetly do světla) */
::view-transition-old(root), ::view-transition-old(app-side), ::view-transition-old(app-bar), ::view-transition-old(app-tabbar) { display: none; }
::view-transition-new(root), ::view-transition-new(app-side), ::view-transition-new(app-bar), ::view-transition-new(app-tabbar) { animation: none; }
::view-transition-old(app-main) { animation: vt-fade-out 110ms var(--ease-out) both; }
::view-transition-new(app-main) { animation: vt-rise-in 280ms var(--ease-expo) 40ms both; }
::view-transition-old(app-tabs) { animation: vt-fade-out 110ms var(--ease-out) both; }
::view-transition-new(app-tabs) { animation: vt-rise-in 220ms var(--ease-out) both; }
::view-transition-group(nav-current), ::view-transition-group(tab-current) { animation-duration: 300ms; animation-timing-function: var(--ease-expo); }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* ================================================================ mobil a tablet: horní lišta + spodní rozcestníky */
@media (max-width: 1023px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app-side { display: none; }
  .app-bar { display: flex; }
  .app-main:has(> .app-tabs) { --sticky-top: calc(var(--bar-h) + var(--tabs-h)); }
  .app-main { --sticky-top: var(--bar-h); padding-bottom: calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom)); }
  .app-tabs { top: var(--bar-h); }
  .app-head { padding: 20px 0 18px; }
  .cech :where(h1) { font-size: 1.5rem; }
  .app-tabbar { position: fixed; inset: auto 0 0; z-index: var(--z-bar); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 0 4px env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); view-transition-name: app-tabbar; }
  .app-tabbar-link { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: var(--tabbar-h); padding: 6px 2px; color: var(--text-3); font-size: 0.72rem; font-weight: 650; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .app-tabbar-link .ico { width: 22px; height: 22px; transition: transform 200ms var(--ease-out); }
  .app-tabbar-link[aria-current="page"] { color: var(--accent); }
  .app-tabbar-link[aria-current="page"] .ico { transform: translateY(-1px); }
  .app-tabbar-link:active .ico { transform: scale(0.9); }
  .app-menu { inset: calc(var(--bar-h) + 4px) 12px auto auto; width: min(280px, 100vw - 24px); transform-origin: top right; }
  .cech-notice.is-flash { top: calc(var(--bar-h) + 8px); right: 12px; left: 12px; width: auto; }
  .cmdk { margin-top: 8px; max-height: calc(100dvh - 16px); }
}
@media (max-width: 1180px) { .cech-columns { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .cech-balance { grid-template-columns: 1fr; }
  .cech-widgets.is-grid { grid-template-columns: 1fr; }
  .cech-resize { display: none; }
}
@media (max-width: 640px) {
  .cech-two, .cech-three { grid-template-columns: 1fr; }
  .cech .t-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cech .t-tabs a { flex: none; }
  .cech-event { flex-direction: column; }
  .cech-date { display: flex; align-items: baseline; justify-content: center; gap: 8px; width: 100%; }
  .cech-date b { font-size: 1.3rem; }
}
@media (max-width: 560px) {
  .cech-role-list li { grid-template-columns: minmax(0, 1fr); }
  .cech-role-list em { grid-row: auto; grid-column: 1; white-space: normal; }
  .cech-panel-head .cech-btn { width: 100%; }
  .cech-pos-form { padding-left: 0; }
  .cech-card-foot { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .cech-card-foot .cech-actions, .cech-card-foot .cech-inline { justify-content: flex-start; }
  .cech-chip-alt { margin-left: 0; }
  .cech-stats { grid-template-columns: 1fr 1fr; }
}

/* ================================================================ tisk listin */
@media print {
  .app-side, .app-bar, .app-tabs, .app-tabbar, .app-head, .app-menu, .cmdk, .cech-noprint, .cech-notice, .cech-preview, .skip { display: none !important; }
  .app { display: block; }
  .app-main { max-width: none; padding: 0; }
  body { background: none; }
  .cech-charter { box-shadow: none; border: 2px solid #000; }
}

/* ================================================================ 2.2: + Nové, zvonek, čísla, panel, koncepty, seznamy */
.app-side-top { display: flex; align-items: center; gap: 4px; }
.app-side-top .app-brand { flex: 1; min-width: 0; }
.app-side-row { display: flex; gap: 6px; }
.app-side-row .app-search { flex: 1; min-width: 0; }
.app-new { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid transparent; border-radius: var(--r); background: var(--accent-fill); color: var(--on-accent); box-shadow: var(--shadow-sm); transition: background-color var(--dur), transform 120ms var(--ease-out); }
.app-new:hover { background: var(--accent-fill-hover); }
.app-new:active { transform: scale(0.95); }
.app-new .ico { width: 18px; height: 18px; }
.app-bell { position: relative; }
.app-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent); font-size: 0.7rem; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; animation: badge-in 360ms var(--ease-expo); }
.app-badge[hidden] { display: none; }
@keyframes badge-in { from { scale: 0.4; } }
.app-nav-link .app-badge { margin-left: auto; }
.app-bell .app-badge { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 0.66rem; box-shadow: 0 0 0 2px var(--surface-2); }
.app-bar .app-bell .app-badge { box-shadow: 0 0 0 2px var(--bg); }
.app-tabs a .app-badge { margin-left: 6px; }
.app-tabbar-link { position: relative; }
.app-tabbar-link .app-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; height: 16px; font-size: 0.64rem; box-shadow: 0 0 0 2px var(--surface); }

.app-pop { max-height: min(72dvh, 560px); overflow-y: auto; overscroll-behavior: contain; }
.app-pop-head { margin: 4px 8px 6px; color: var(--text-3); font-size: 0.78rem; font-weight: 700; }
.app-new-menu { inset: 104px auto auto 12px; width: 248px; transform-origin: top left; }
.app-inbox { inset: 58px auto auto 12px; width: 380px; padding: 6px 6px 8px; transform-origin: top left; }
.app-inbox-list { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.app-inbox-list a { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; }
.app-inbox-list a:hover, .app-inbox-list a:focus-visible { background: var(--hover); }
.app-inbox-list .ico { margin-top: 2px; color: var(--text-3); }
.app-inbox-list span { display: grid; gap: 1px; min-width: 0; font-size: 0.92rem; line-height: 1.35; }
.app-inbox-list small { color: var(--text-3); font-size: 0.78rem; }
.app-inbox-list li.is-new a { background: var(--accent-soft); }
.app-inbox-list li.is-new .ico { color: var(--accent); }
.app-inbox-list li.is-new span { font-weight: 600; }
.app-inbox-empty { padding: 18px 10px; color: var(--text-2); font-size: 0.92rem; text-align: center; }
.app-lead b { color: var(--text); font-weight: 650; }

/* vysouvací panel pro zakládání (vpravo, na mobilu zespodu) */
.sheet { position: fixed; inset: 0 0 0 auto; width: min(540px, 100vw); height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; border-left: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); opacity: 0; transform: translateX(32px); transition: opacity 200ms var(--ease-out), transform 320ms var(--ease-expo), overlay 320ms allow-discrete, display 320ms allow-discrete; }
.sheet[open] { display: flex; flex-direction: column; opacity: 1; transform: none; }
@starting-style { .sheet[open] { opacity: 0; transform: translateX(32px); } }
.sheet::backdrop { background: var(--scrim); opacity: 0; transition: opacity 240ms var(--ease-out), overlay 320ms allow-discrete, display 320ms allow-discrete; }
.sheet[open]::backdrop { opacity: 1; }
@starting-style { .sheet[open]::backdrop { opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 4px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 1.1rem; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px calc(28px + env(safe-area-inset-bottom)); }
.sheet .cech-form { max-width: none; padding: 0; }
.sheet-body > :not(.cech-form) { margin-inline: 0; }
.sheet-skel { display: grid; gap: 12px; }
.sheet-skel i { height: 38px; border-radius: var(--r); background: linear-gradient(90deg, var(--hover), var(--surface-2), var(--hover)); background-size: 200% 100%; animation: skel 1.2s linear infinite; }
.sheet-skel i.is-tall { height: 110px; }
@keyframes skel { to { background-position: -200% 0; } }

/* koncept, rychlé přepnutí, prázdný stav */
.cech-draft-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; color: var(--text-2); font-size: 0.84rem; font-weight: 500; }
.cech-draft-note .ico { color: var(--gold-strong); }
.cech-draft-note button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 0.2em; }
.is-busy { opacity: 0.6; pointer-events: none; transition: opacity var(--dur); }
.is-updated { animation: updated 900ms var(--ease-out); }
@keyframes updated { from { box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 35%, transparent); } }
.cech-empty-cta { margin: 14px auto 0; display: flex; width: fit-content; }

/* hledání a řazení v seznamech */
.cech-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.cech-filter-bar label { position: relative; display: flex; align-items: center; flex: 0 1 380px; }
.cech-filter-bar .ico { position: absolute; left: 10px; color: var(--text-3); pointer-events: none; }
.cech .cech-filter-bar input { padding-left: 34px; }
.cech-filter-bar small { color: var(--text-3); font-size: 0.84rem; }
.cech-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: inherit; cursor: pointer; }
.cech-sort .ico { width: 13px; height: 13px; opacity: 0.35; transition: opacity var(--dur), color var(--dur); }
.cech-sort:hover .ico { opacity: 0.8; }
th[aria-sort] .cech-sort { color: var(--text); }
th[aria-sort] .cech-sort .ico { opacity: 1; color: var(--accent); }
th.num .cech-sort { flex-direction: row-reverse; }

/* karta postavy v profilu */
.zs-card-grid { display: grid; gap: 16px 28px; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); align-items: start; margin-bottom: 14px; }
.zs-card-stats { display: grid; gap: 10px; margin: 0; }
.zs-card-stats div { display: grid; gap: 1px; }
.zs-card-stats dt { color: var(--text-3); font-size: 0.8rem; font-weight: 600; }
.zs-card-stats dd { margin: 0; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.zs-heat-wrap { min-width: 0; overflow-x: auto; }
.zs-heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); grid-auto-columns: 13px; gap: 3px; width: max-content; }
.zs-heat i, .zs-heat-legend i { display: block; width: 13px; height: 13px; border-radius: 3px; background: var(--hover); }
.zs-heat i.l1, .zs-heat-legend i.l1 { background: color-mix(in oklch, var(--ok) 32%, var(--hover)); }
.zs-heat i.l2, .zs-heat-legend i.l2 { background: color-mix(in oklch, var(--ok) 55%, var(--hover)); }
.zs-heat i.l3, .zs-heat-legend i.l3 { background: color-mix(in oklch, var(--ok) 78%, var(--hover)); }
.zs-heat i.l4, .zs-heat-legend i.l4 { background: var(--ok); }
.zs-heat i.is-future { background: transparent; box-shadow: inset 0 0 0 1px var(--line-soft); }
.zs-heat-legend { display: flex; align-items: center; gap: 3px; margin: 8px 0 0; color: var(--text-3); font-size: 0.76rem; }
.zs-heat-legend i { width: 10px; height: 10px; }
.zs-card-medals { margin-bottom: 8px; }
.zs-assets .ico { color: var(--text-3); }
@media (max-width: 640px) { .zs-card-grid { grid-template-columns: 1fr; } }

/* přejetí prstem: obsah přijede ze strany, kam šla záložka */
@keyframes vt-in-left { from { translate: 48px 0; opacity: 0; } }
@keyframes vt-in-right { from { translate: -48px 0; opacity: 0; } }
@keyframes vt-out-left { to { translate: -32px 0; opacity: 0; } }
@keyframes vt-out-right { to { translate: 32px 0; opacity: 0; } }
html[data-swipe="left"]::view-transition-new(app-main) { animation: vt-in-left 300ms var(--ease-expo) both; }
html[data-swipe="left"]::view-transition-old(app-main) { animation: vt-out-left 180ms var(--ease-out) both; }
html[data-swipe="right"]::view-transition-new(app-main) { animation: vt-in-right 300ms var(--ease-expo) both; }
html[data-swipe="right"]::view-transition-old(app-main) { animation: vt-out-right 180ms var(--ease-out) both; }

@media (max-width: 1023px) {
  .app-bar { height: calc(var(--bar-h) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .app-tabs { top: calc(var(--bar-h) + env(safe-area-inset-top)); }
  .app-bar .app-icon-btn { width: 36px; height: 36px; }
  .app-new-menu, .app-inbox { inset: calc(var(--bar-h) + env(safe-area-inset-top) + 4px) 8px auto 8px; width: auto; transform-origin: top center; }
}
@media (max-width: 640px) {
  /* menu účtu jako spodní panel */
  #app-user-menu { inset: auto 0 0 0; width: 100%; max-width: none; padding: 8px 8px calc(12px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; transform: translateY(24px); transform-origin: bottom center; }
  #app-user-menu:popover-open { transform: none; }
  @starting-style { #app-user-menu:popover-open { transform: translateY(24px); } }
  #app-user-menu::before { content: ""; display: block; width: 40px; height: 4px; margin: 2px auto 8px; border-radius: 4px; background: var(--line-strong); }
  #app-user-menu .app-menu-item { min-height: 46px; font-size: 1rem; }
  .sheet { inset: auto 0 0 0; width: 100%; height: auto; max-height: 92dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; transform: translateY(40px); }
  .sheet[open] { transform: none; }
  @starting-style { .sheet[open] { transform: translateY(40px); } }
}
@media (prefers-reduced-motion: reduce) { .sheet-skel i { animation: none; } }
@media print { .app-new-menu, .app-inbox, .sheet { display: none !important; } }

/* ================================================================ předměty: kvalita, stav, porovnání */
.qc-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 0 0 14px; }
.qc-q { display: inline-flex; align-items: center; gap: 2px; margin: 0; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.qc-q legend { float: left; margin-right: 8px; padding: 0 4px 0 8px; color: var(--text-2); font-size: 0.84rem; font-weight: 600; }
.qc-q label { position: relative; }
.qc-q input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qc-q span { display: grid; place-items: center; min-width: 38px; height: 30px; padding: 0 10px; border-radius: 999px; color: var(--text-2); font-family: var(--font-title); font-weight: 700; font-size: 0.86rem; cursor: pointer; transition: background-color var(--dur), color var(--dur); }
.qc-q label:hover span { color: var(--text); }
.qc-q input:checked + span { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.qc-q input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.qc-st { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 0.84rem; font-weight: 600; }
.qc-st input { width: 160px; accent-color: var(--accent); }
.qc-st output { min-width: 3.2em; color: var(--text); font-variant-numeric: tabular-nums; }
.qc-stats dd, .qc-compare td[data-v] { font-variant-numeric: tabular-nums; transition: color var(--dur); }
.qc-stats dd { color: var(--text); letter-spacing: 0; font-weight: 650; }
.qc [data-v].is-changed { color: var(--gold-strong); }
.qc-note { margin-top: 10px; font-size: 0.84rem; }
.qc-compare th[scope="col"] { position: relative; min-width: 150px; padding-right: 28px; vertical-align: bottom; white-space: normal; }
.qc-item { display: grid; gap: 6px; justify-items: start; color: var(--text); font-weight: 650; text-decoration: none; }
.qc-item:hover { color: var(--accent); }
.qc-remove { position: absolute; top: 4px; right: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-sm); color: var(--text-3); }
.qc-remove:hover { background: var(--hover); color: var(--danger); }
.qc-compare tbody th { color: var(--text-2); font-weight: 600; white-space: nowrap; }
.qc-compare td.is-best { color: var(--ok); font-weight: 750; background: var(--ok-soft); }
.cech-item-cmp { display: inline-flex; align-items: center; justify-content: center; gap: 4px; margin-top: 6px; padding: 2px 8px; min-height: 28px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text-2); font-size: 0.8rem; font-weight: 600; }
.cech-item-cmp .ico { width: 14px; height: 14px; }
.cech-item-cmp:hover { border-color: var(--line-strong); color: var(--text); }
.cech-item-cmp[aria-pressed="true"] { border-color: color-mix(in oklch, var(--accent) 45%, transparent); background: var(--accent-soft); color: var(--accent); }
.cech-item-cmp.cech-btn { margin: 0; border-radius: 7px; }
.cmp-tray { position: fixed; left: 50%; bottom: 16px; z-index: var(--z-toast); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; width: min(760px, 100vw - 24px); padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-pop); translate: -50% 0; animation: toast-in 320ms var(--ease-expo); }
.cmp-tray ul { display: flex; flex: 1; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.cmp-tray li { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 3px 4px 3px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 0.84rem; }
.cmp-tray li img { width: 24px; height: 24px; border-radius: 50%; background: oklch(0.3 0.02 60 / 0.4); }
.cmp-tray li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-tray li button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: none; color: var(--text-3); }
.cmp-tray li button:hover { background: var(--hover); color: var(--danger); }
@media (max-width: 1023px) { .cmp-tray { bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); } }
@media print { .cmp-tray, .qc-controls { display: none !important; } }
.qc-compare-wrap .qc-compare tbody th, .qc-compare-wrap .qc-compare thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
@media (max-width: 600px) { .cmp-tray ul { flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; } .cmp-tray li { flex: none; max-width: 150px; } .cmp-tray > .cech-btn { flex: 1; justify-content: center; } }
[data-copy-btn].is-done { border-color: var(--ok); color: var(--ok); }

/* ================================================================ seznamy a ceníky */
.pr-share { margin-top: 10px; }
.sz-desc { white-space: pre-line; }
.sz-rows { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sz-rows > li { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); scroll-margin-top: 80px; }
.sz-rows > li:target { border-color: var(--gold); }
.sz-rows .cech-item-chip { margin: 0; padding: 0; border: 0; }
.sz-nums { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin: 6px 0 0; color: var(--text-2); font-variant-numeric: tabular-nums; }
.sz-price { color: var(--text); font-size: 1.1rem; font-weight: 750; }
.sz-gain { color: var(--ok); font-weight: 650; }
.sz-loss { color: var(--danger); font-weight: 650; }
.sz-note { margin: 4px 0 0; overflow-wrap: anywhere; }
.sz-recipe { display: grid; gap: 2px; margin: 6px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--line); list-style: none; }
.sz-recipe li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; justify-content: space-between; }
.sz-add-ing { margin: 12px 0; }
.qc form + .cech-actions { margin-top: 14px; }

/* ================================================================ rychlé odkazy na nástěnce */
.app-pin[aria-pressed="true"] { color: var(--accent); }
.app-pin[aria-pressed="true"] .ico { fill: color-mix(in oklch, var(--accent) 25%, transparent); }
.ql-list li, .ql-suggest li { display: flex; align-items: center; gap: 6px; }
.ql-list li a, .ql-suggest li a { flex: 1; min-width: 0; }
.ql-x { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-3); }
.ql-x:hover { background: var(--hover); color: var(--danger); }
.ql-add-one:hover { color: var(--accent); }
.ql-suggest > p { margin: 4px 0 6px; }
.ql-new { margin-top: 10px; }

/* zásluhy: co v knize panství chybí, návrhy úkolů */
.zs-facts { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.zs-facts li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.zs-facts li:last-child { border-bottom: 0; }
.zs-facts .ico { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--text-3); }
.zs-facts li.is-todo .ico { color: var(--gold-strong); }
.zs-proposal .cech-form { margin-top: 8px; }

/* předměty: kategorie a druhy jako čipy, ceny od prodejců */
.pr-kats, .pr-pods { margin: 0 0 10px; }
.pr-pods { padding-top: 10px; border-top: 1px solid var(--line-soft); }
.pr-kats small, .pr-pods small { color: var(--text-3); font-variant-numeric: tabular-nums; }
.pr-kats a[aria-current="page"] small, .pr-pods a[aria-current="page"] small { color: inherit; opacity: 0.75; }
.cech-item-meta .is-unknown { color: var(--text-3); font-style: italic; }
.pr-prices td small { font-size: 0.8rem; }
@media (max-width: 640px) { .pr-kats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } .pr-kats a { flex: none; } }

/* Dílny: recept, řádky surovin */
.cech-four { display: grid; gap: 8px 12px; grid-template-columns: 2fr 1fr 1fr 1fr; }
.cech-recipe { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 2px; font-size: .92rem; }
.cech-recipe li::before { content: '▪ '; color: var(--text-2); }
.cech-shop { margin: 14px 0 8px; font-size: 1.05rem; }
@media (max-width: 640px) { .cech-four { grid-template-columns: 1fr 1fr; } }
/* Pomocník: učení z oprav a šablona obrazovky */
.cech .cech-capture-lines { display: grid; gap: 2px; max-height: 240px; overflow: auto; font-size: 12px; padding: 4px 0; }
.cech .cech-capture-lines .cech-check { font-family: ui-monospace, monospace; }
.cech .cech-area { position: relative; touch-action: none; user-select: none; cursor: crosshair; margin: 8px 0; border: 1px solid var(--line, #5a4630); border-radius: 6px; overflow: hidden; }
.cech .cech-area img { display: block; width: 100%; height: auto; pointer-events: none; }
.cech .cech-area-box { position: absolute; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); pointer-events: none; }
.cech .cech-area-box::after { content: attr(data-label); position: absolute; left: -2px; bottom: 100%; background: var(--c); color: #111; font-size: 11px; font-weight: 600; padding: 0 4px; white-space: nowrap; border-radius: 3px 3px 0 0; }
.cech .is-amount { --c: #f2c14e; } .cech .is-village { --c: #6fcf97; } .cech .is-title { --c: #56ccf2; } .cech .is-shop { --c: #e88dd8; }
.cech .cech-area-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--c); margin-right: 6px; vertical-align: -1px; }
.cech .cech-area-pick[aria-pressed="true"] { outline: 2px solid var(--accent, #d4a64a); outline-offset: 1px; }
.cech .is-list { --c: #bb9af7; } .cech .is-ignore { --c: #eb5757; }
.cech .cech-capture-rows { width: 100%; border-collapse: collapse; font-size: 13px; }
.cech .cech-capture-rows td { padding: 4px 6px; border-bottom: 1px solid var(--line, #5a4630); vertical-align: top; }
.cech .cech-capture-rows td + td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cech .cech-capture-rows small { display: block; opacity: .7; font-size: 11px; }
.cech .cech-capture-rows .is-plus { color: #6fcf97; } .cech .cech-capture-rows .is-minus { color: #eb7a6a; }
.cech .cech-capture-rows tr.is-bad td:first-child::before { content: '⚠️ '; }
/* ceník ze hry: karta přes celou šířku; zaškrtnutí · věc (případně výběr z katalogu) · cena */
.cech .cech-capture.is-wide { grid-column: 1 / -1; }
.cech .pm-prices td:first-child { width: 28px; }
.cech .pm-prices tr.is-bad td:first-child::before { content: none; }
.cech .pm-prices tr.is-bad td:nth-child(2)::before { content: '⚠️ '; }
.cech .pm-prices td:nth-child(2) { text-align: left; white-space: normal; width: auto; }
.cech .pm-prices .cech-item-pick { display: block; position: relative; margin-top: 4px; }
.cech .pm-prices input[type="number"] { width: 6.5em; text-align: right; }
.cech .pm-prices input[type="checkbox"] { width: 18px; height: 18px; }
.cech .pm-prices .pm-new { margin-top: 4px; font-size: 12px; }
/* ceny surovin v ceníku: surovina a kde je nejlevnější · moje cena */
.cech .sz-mats input { width: 7em; text-align: right; }
.cech .sz-mats td:first-child { width: 100%; }
/* kde koupit: cena · prodejce (s historií) · smazat */
.cech .pr-offers { list-style: none; margin: 0 0 12px; padding: 0; }
.cech .pr-offers > li { display: grid; grid-template-columns: minmax(84px, auto) minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cech .pr-offer-price { font-size: 17px; font-variant-numeric: tabular-nums; text-align: right; }
.cech .pr-offers > li.is-best .pr-offer-price { color: var(--ok); }
.cech .pr-offer-who small { display: block; }
.cech .pr-history ul { margin: 4px 0 0; padding-left: 18px; }
/* přehled nákladů */
.cech .sz-costs td small { display: block; }

/* Pomocník: studio rozhraní, stav, zdroje, živý záznam, primární akce a mini-okno */
.cech .pm-stats { margin-bottom: 14px; }
.cech .pm-tabs { margin-bottom: 18px; }
.cech .pm-studio { display: grid; gap: 16px; }
.cech .pm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.cech .pm-status-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.cech .pm-status-wrap .cech-helper-status { margin: 0; padding: 0; background: none; font-weight: 600; }
.cech .pm-status-wrap .cech-helper-status.is-ok { color: var(--ok); background: none; }
.cech .pm-status-wrap .cech-helper-status.is-err { color: var(--danger); background: none; }
.cech .pm-submeta { margin: 2px 0 0; }
.cech .pm-bar-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.cech .pm-bar-tools [aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.cech .pm-dot { width: 11px; height: 11px; flex: none; border-radius: 50%; background: var(--text-3); box-shadow: 0 0 0 3px color-mix(in oklch, var(--text-3) 18%, transparent); }
.cech .pm-dot.is-watch, .cech .pm-dot.is-ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ok) 22%, transparent); animation: pm-pulse 2.2s ease-in-out infinite; }
.cech .pm-dot.is-busy { background: var(--info); box-shadow: 0 0 0 3px color-mix(in oklch, var(--info) 24%, transparent); animation: pm-pulse .9s ease-in-out infinite; }
.cech .pm-dot.is-err { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in oklch, var(--danger) 24%, transparent); }
@keyframes pm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .cech .pm-dot { animation: none !important; } }
.cech .pm-prog { width: 100%; height: 6px; border: 0; border-radius: 99px; overflow: hidden; background: var(--surface-2); accent-color: var(--accent-fill); }
.cech .pm-prog::-webkit-progress-bar { background: var(--surface-2); border-radius: 99px; }
.cech .pm-prog::-webkit-progress-value { background: var(--accent-fill); border-radius: 99px; transition: width 120ms linear; }
.cech .pm-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.55fr) minmax(260px, 1fr); align-items: start; }
.cech .pm-work { display: grid; gap: 14px; min-width: 0; }
.cech .pm-sources { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cech .pm-source { display: grid; gap: 10px; align-content: space-between; padding: 12px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.cech .pm-source-head { display: flex; gap: 9px; align-items: flex-start; }
.cech .pm-source-head .ico { flex: none; margin-top: 2px; color: var(--accent); }
.cech .pm-source-head h3 { margin: 0 0 2px; font-size: .95rem; }
.cech .pm-source-head p { margin: 0; font-size: .82rem; line-height: 1.35; }
.cech .pm-drop { border-style: dashed; transition: border-color var(--dur), background var(--dur); }
.cech .pm-drop.is-drag { border-color: var(--accent); background: var(--accent-soft); }
.cech .pm-preview { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); background: #000; }
.cech .pm-hints { margin: 0; }
.cech .pm-stack-bar { display: grid; gap: 8px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.cech .pm-stack-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.cech .pm-thumb { position: relative; width: 92px; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line-strong); background: #111; }
.cech .pm-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cech .pm-thumb span { position: absolute; left: 4px; top: 3px; padding: 0 5px; border-radius: 4px; background: rgb(0 0 0 / .72); color: #fff; font-size: 11px; font-weight: 700; }
.cech .pm-thumb button { position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgb(0 0 0 / .72); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; }
.cech .pm-feed { display: grid; gap: 10px; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface-2); }
.cech .pm-feed-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cech .pm-feed-head h3 { margin: 0; font-size: .96rem; }
.cech .pm-log { max-height: 300px; overflow: auto; }
.cech .pm-log-empty { color: var(--text-3); font-size: .88rem; padding: 6px 0; }
.cech .pm-privacy { margin: 0; font-size: .8rem; }
.cech .pm-cap-body { display: grid; gap: 14px; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); align-items: start; margin-bottom: 10px; }
.cech .pm-cap-body.is-noimg { grid-template-columns: 1fr; }
.cech .pm-cap-body .cech-capture-img { margin: 0; }
.cech .pm-cap-main { display: grid; gap: 8px; min-width: 0; }
.cech .pm-cap-main h3 { margin: 0; }
.cech .pm-cap-primary { padding: 10px 12px; border-radius: var(--r); border: 1px solid color-mix(in oklch, var(--accent) 40%, var(--line)); background: var(--accent-soft); }
.cech .pm-cap-primary-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.cech .pm-cap-primary-row small { display: block; }
.cech .cech-capture.is-review { border-color: color-mix(in oklch, var(--gold) 55%, var(--line)); }
.cech.pm-pip-body { margin: 0; padding: 12px; background: var(--bg); }
.cech .pm-pip { display: grid; gap: 10px; }
.cech .pm-pip-hints { gap: 4px 10px; font-size: .85rem; }
@media (max-width: 960px) { .cech .pm-grid { grid-template-columns: 1fr; } .cech .pm-sources { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .cech .pm-cap-body { grid-template-columns: 1fr; } }

/* ================================================================ gamifikace: hodnost, řada, síň činů, oslava */
.zs-medal.is-xl { width: 72px; height: 72px; }
.zs-medal.is-xl .ico { width: 32px; height: 32px; }
.zs-medal.is-sm { width: 24px; height: 24px; }
.zs-medal.is-sm .ico { width: 12px; height: 12px; }
.zs-medal.is-ghost { opacity: .55; filter: saturate(.6); }
.zs-medal.t-0 .ico { opacity: .5; }
.zs-medal.t-3 { overflow: hidden; }
.zs-medal.t-3::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, transparent 35%, oklch(1 0 0 / .55) 50%, transparent 65%); background-size: 250% 100%; animation: zs-shine 3.2s var(--ease-out) infinite; pointer-events: none; }
@keyframes zs-shine { 0%, 55% { background-position: 130% 0; } 100% { background-position: -130% 0; } }

.zs-rank { display: flex; gap: 12px; align-items: center; min-width: 0; }
.zs-rank > div { display: grid; gap: 4px; flex: 1; min-width: 0; }
.zs-rank p { display: grid; margin: 0; line-height: 1.15; }
.zs-rank p small { color: var(--text-3); font-size: .8rem; }
.zs-rank p b { font-size: 1.15rem; }
.zs-rank.is-compact { margin: 8px 0; }
.zs-rank.is-compact p b { font-size: 1rem; }
.zs-rank-seal { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; rotate: 45deg; background: var(--hover); box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--text-2); }
.zs-rank-seal .ico { rotate: -45deg; width: 22px; height: 22px; }
.zs-rank.is-compact .zs-rank-seal { width: 36px; height: 36px; border-radius: 10px; }
.zs-rank.is-compact .zs-rank-seal .ico { width: 17px; height: 17px; }
.zs-rank-seal.r-2, .zs-rank-seal.r-3 { background: radial-gradient(circle at 30% 30%, oklch(0.74 0.11 58), var(--copper) 75%); color: oklch(0.99 0.01 80); }
.zs-rank-seal.r-4, .zs-rank-seal.r-5 { background: radial-gradient(circle at 30% 30%, oklch(0.92 0.01 250), var(--silver) 75%); color: oklch(0.3 0.02 250); }
.zs-rank-seal.r-6, .zs-rank-seal.r-7, .zs-rank-seal.r-8 { background: radial-gradient(circle at 30% 30%, oklch(0.92 0.11 92), var(--gold-medal) 72%); color: oklch(0.32 0.06 70); }
.zs-rank-seal.is-xl { width: 72px; height: 72px; border-radius: 20px; }
.zs-rank-seal.is-xl .ico { width: 32px; height: 32px; }

.zs-streak { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.zs-streak.is-hot b { color: var(--accent); }
.zs-streak.is-hot { animation: zs-flicker 2.4s ease-in-out infinite; }
@keyframes zs-flicker { 0%, 100% { filter: none; } 50% { filter: drop-shadow(0 0 6px color-mix(in oklch, var(--accent) 45%, transparent)); } }

.zs-near { display: flex; gap: 10px; align-items: center; margin: 10px 0; padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--text); text-decoration: none; transition: background var(--dur) var(--ease-out), translate var(--dur) var(--ease-out); }
.zs-near:hover { background: var(--hover); translate: 0 -1px; }
.zs-near > span { display: grid; min-width: 0; line-height: 1.25; }
.zs-near small { color: var(--text-3); font-size: .78rem; }

.zs-hero { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; margin: 0 0 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.zs-hero > .zs-rank { flex: 1 1 280px; }
.zs-hero-side { display: grid; gap: 6px; justify-items: start; }
.zs-hero-side .zs-near { margin: 0; }
.zs-hall-sum { margin: 0; color: var(--text-2); }
.zs-hall-sum b { font-size: 1.3rem; color: var(--text); }

.zs-hall-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; border: 0; }
.zs-hall-filter label { position: relative; display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .88rem; }
.zs-hall-filter label small { color: var(--text-3); }
.zs-hall-filter input { position: absolute; opacity: 0; pointer-events: none; }
.zs-hall-filter label:has(input:checked) { background: var(--text); color: var(--surface); border-color: var(--text); }
.zs-hall-filter label:has(input:checked) small { color: inherit; opacity: .7; }
.zs-hall-filter label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.zs-hall:has(input[value="wip"]:checked) .zs-hall-card:not([data-state="wip"]),
.zs-hall:has(input[value="done"]:checked) .zs-hall-card:not([data-state="done"]),
.zs-hall:has(input[value="none"]:checked) .zs-hall-card:not([data-state="none"]) { display: none; }
.zs-hall-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.zs-hall-card { position: relative; display: grid; gap: 8px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: translate var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out); scroll-margin-top: 90px; }
.zs-hall-card:hover { translate: 0 -2px; box-shadow: 0 6px 18px oklch(0 0 0 / .12); }
.zs-hall-card:target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 30%, transparent); }
.zs-hall-card[data-state="none"] .zs-medal { filter: grayscale(1); opacity: .6; }
.zs-hall-card.t-3 { border-color: color-mix(in oklch, var(--gold-medal) 55%, var(--line)); background: linear-gradient(160deg, color-mix(in oklch, var(--gold-medal) 10%, var(--surface)), var(--surface) 55%); }
.zs-hall-card:hover .zs-medal { animation: zs-wobble 600ms var(--ease-out); }
@keyframes zs-wobble { 0% { rotate: 0deg; } 30% { rotate: -10deg; scale: 1.06; } 60% { rotate: 6deg; } 100% { rotate: 0deg; scale: 1; } }
.zs-hall-card h3 { margin: 4px 0 0; font-size: 1.08rem; }
.zs-hall-card > .cech-meta { margin: 0; }
.zs-hall-top { display: flex; align-items: flex-start; justify-content: space-between; }
.zs-rarity { padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--hover); color: var(--text-3); }
.zs-rarity.is-uncommon { color: oklch(0.6 0.12 150); }
.zs-rarity.is-rare { color: oklch(0.62 0.15 250); background: color-mix(in oklch, oklch(0.6 0.15 250) 14%, transparent); }
.zs-rarity.is-legend { color: oklch(0.62 0.17 310); background: color-mix(in oklch, oklch(0.6 0.18 310) 16%, transparent); }
.zs-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0; padding: 0; list-style: none; }
.zs-tiers li { display: grid; justify-items: center; padding: 6px 4px; border-radius: 10px; background: var(--hover); color: var(--text-3); font-size: .78rem; line-height: 1.2; }
.zs-tiers li b { color: var(--text-2); font-size: .95rem; }
.zs-tiers li.is-got.t-1 { background: color-mix(in oklch, var(--copper) 22%, transparent); color: var(--text); }
.zs-tiers li.is-got.t-2 { background: color-mix(in oklch, var(--silver) 30%, transparent); color: var(--text); }
.zs-tiers li.is-got.t-3 { background: color-mix(in oklch, var(--gold-medal) 32%, transparent); color: var(--text); }
.zs-tiers li.is-got b { color: var(--text); }
.zs-hall-done, .zs-hall-extra { display: flex; gap: 6px; align-items: center; margin: 0; font-size: .88rem; color: var(--text-2); }
.zs-hall-who summary { cursor: pointer; color: var(--text-3); font-size: .85rem; }
.zs-hall-who ul { display: grid; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; max-height: 220px; overflow: auto; }
.zs-hall-who li { display: flex; gap: 8px; align-items: center; }

.app-xp { margin-left: auto; padding: 1px 7px; border-radius: 999px; background: color-mix(in oklch, var(--gold-medal) 24%, transparent); color: var(--text); font-size: .72rem; font-weight: 700; }

.cech-notice.is-gain { align-items: center; }
.zs-gain { display: grid; place-items: center; min-width: 48px; height: 48px; padding: 0 6px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, oklch(0.9 0.11 92), var(--gold-medal) 68%); color: oklch(0.32 0.06 70); font-weight: 800; animation: zs-seal 700ms var(--ease-expo); }

/* oslava nového činu nebo hodnosti */
dialog.zs-party { width: min(92vw, 420px); padding: 28px 24px 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--text); text-align: center; overflow: hidden; box-shadow: 0 24px 60px oklch(0 0 0 / .35); animation: zs-pop 520ms var(--ease-expo); }
dialog.zs-party::backdrop { background: oklch(0.15 0.02 60 / .55); backdrop-filter: blur(3px); animation: zs-fade 300ms ease-out; }
dialog.zs-party.is-leaving { animation: zs-out 240ms ease-in forwards; }
dialog.zs-party h2 { margin: 4px 0 6px; font-size: 1.5rem; }
dialog.zs-party .cech-actions { justify-content: center; margin-top: 16px; }
.zs-party-medal { position: relative; z-index: 0; display: grid; place-items: center; margin: 4px auto 10px; }
.zs-party-medal .zs-medal, .zs-party-medal .zs-rank-seal { width: 104px; height: 104px; animation: zs-seal 900ms var(--ease-expo) 120ms both; }
.zs-party-medal .zs-rank-seal { border-radius: 28px; }
.zs-party-medal .ico { width: 46px; height: 46px; }
.zs-party-medal::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, color-mix(in oklch, var(--gold-medal) 30%, transparent) 0 10deg, transparent 10deg 20deg); animation: zs-spin 14s linear infinite; z-index: -1; mask: radial-gradient(circle, #000 30%, transparent 70%); }
.zs-party-list { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; text-align: left; }
.zs-party-list li { display: flex; gap: 10px; align-items: center; animation: zs-rise 400ms var(--ease-out) both; }
.zs-party-list li:nth-child(2) { animation-delay: 120ms; }
.zs-party-list li:nth-child(3) { animation-delay: 240ms; }
.zs-party-list li:nth-child(4) { animation-delay: 360ms; }
.zs-party-list li span { display: grid; line-height: 1.2; }
.zs-party-list small { color: var(--text-3); }
.zs-party-bonus { margin: 12px 0 0; font-size: 1.6rem; font-weight: 800; color: var(--accent); animation: zs-rise 500ms var(--ease-out) 300ms both; }
.zs-party-rank { display: inline-flex; gap: 6px; align-items: center; margin: 8px 0 0; padding: 4px 12px; border-radius: 999px; background: var(--hover); }
.zs-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.zs-confetti i { position: absolute; top: -12px; left: calc(var(--x) * 1%); width: 8px; height: 12px; border-radius: 2px; background: var(--gold-medal); opacity: 0; rotate: calc(var(--i) * 33deg); animation: zs-fall 2.6s cubic-bezier(.2, .6, .4, 1) calc(var(--d) * 90ms + 200ms) 1 forwards; }
.zs-confetti i:nth-child(3n) { background: var(--copper); width: 6px; }
.zs-confetti i:nth-child(3n+1) { background: var(--accent); height: 8px; }
.zs-confetti i:nth-child(4n) { background: var(--silver); border-radius: 50%; width: 7px; height: 7px; }
@keyframes zs-fall { 0% { opacity: 1; translate: 0 0; } 100% { opacity: 0; translate: calc((var(--d) - 4) * 14px) 420px; rotate: calc(var(--i) * 90deg + 540deg); } }
@keyframes zs-pop { 0% { opacity: 0; scale: .85; } 100% { opacity: 1; scale: 1; } }
@keyframes zs-out { to { opacity: 0; scale: .94; } }
@keyframes zs-fade { from { opacity: 0; } }
@keyframes zs-rise { from { opacity: 0; translate: 0 8px; } }
@keyframes zs-spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .zs-medal.t-3::after, .zs-confetti, .zs-party-medal::before { display: none; }
  .zs-streak.is-hot, dialog.zs-party, .zs-party-medal .zs-medal, .zs-party-medal .zs-rank-seal, .zs-party-list li, .zs-party-bonus, .zs-hall-card:hover .zs-medal, .zs-gain { animation: none; }
}
.zs-streak.is-cold { filter: grayscale(1); opacity: .7; }

/* ================================================================ 3.0: vzdušnější kostra, menu ve skupinách, šuplík na mobilu */
:root { --side-w: 264px; --gap: 24px; --pad: clamp(18px, 2.2vw, 28px); }

/* typografie: jedna rodina, klidná hierarchie (Cinzel zůstává jen značce a listinám) */
.cech :where(h1) { font: 650 1.875rem/1.2 var(--font-ui); letter-spacing: -0.018em; }
.cech :where(h2) { font-size: 1.1875rem; letter-spacing: -0.01em; }
body { line-height: 1.6; }

/* obsah */
.app-main { max-width: 1200px; padding-inline: clamp(20px, 4vw, 56px); }
.app-head { padding: 40px 0 30px; }
.app-lead { margin-top: 8px; max-width: 64ch; font-size: 1rem; line-height: 1.6; }
.cech-panel { margin-bottom: var(--gap); padding: var(--pad); border-color: var(--line-soft); border-radius: 14px; }
.cech-panel-head { margin-bottom: 18px; }
.cech-panel-head h2 { font-size: 1.0625rem; font-weight: 650; }
.cech-stack { gap: var(--gap); }
.cech-columns { gap: 28px; }
.cech-section { margin-top: clamp(36px, 5vw, 56px); }
.cech-section > h2:first-child, .cech-section > .cech-panel-head { margin-bottom: 16px; }
.cech-cards { gap: 16px; }

/* boční menu */
.app-side { gap: 18px; padding: 16px 12px 12px; }
.app-side-row { display: flex; gap: 6px; }
.app-nav { gap: 1px; }
.app-nav-link { height: 36px; gap: 10px; padding: 0 10px; font-size: 0.94rem; font-weight: 550; border-radius: 8px; }
.app-nav-link .ico { width: 18px; height: 18px; }
.app-group > summary { list-style: none; cursor: pointer; user-select: none; }
.app-group > summary::-webkit-details-marker { display: none; }
.app-group-chev { margin-left: auto; width: 15px !important; height: 15px !important; color: var(--text-3); transition: rotate 200ms var(--ease-out); }
.app-group[open] > summary .app-group-chev { rotate: 90deg; }
.app-group > summary .app-badge + .app-group-chev { margin-left: 6px; }
.app-group > summary[data-current] { color: var(--text); }
.app-group > summary[data-current] .ico:not(.app-group-chev) { color: var(--accent); }
.app-group::details-content { block-size: 0; overflow: hidden; transition: block-size 220ms var(--ease-out), content-visibility 220ms allow-discrete; }
.app-group[open]::details-content { block-size: auto; }
.app-sub-list { display: grid; gap: 1px; margin: 2px 0 8px 19px; padding: 0 0 0 9px; border-left: 1px solid var(--line); list-style: none; }
.app-sub { position: relative; display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 10px; border-radius: 7px; color: var(--text-2); font-size: 0.9rem; text-decoration: none; transition: background-color var(--dur), color var(--dur); }
.app-sub:hover { background: var(--hover); color: var(--text); }
.app-sub[aria-current="page"] { background: var(--accent-soft); color: var(--text); font-weight: 650; view-transition-name: nav-current; }
.app-sub .app-badge { margin-left: auto; }
.app-nav-link[aria-current="page"] { view-transition-name: nav-current; }

/* na počítači jsou stránky skupiny v menu – záložky nahoře nejsou potřeba */
@media (min-width: 1024px) {
  .app-tabs { display: none; }
  .app-main:has(> .app-tabs) { --sticky-top: 0px; }
}

/* šuplík s celým menu (mobil a tablet) */
.app-drawer { position: fixed; inset: 0 auto 0 0; width: min(320px, 88vw); height: 100dvh; max-height: none; margin: 0; padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); border: 0; border-right: 1px solid var(--line); background: var(--surface-2); color: var(--text); overflow-y: auto; overscroll-behavior: contain; translate: -100% 0; transition: translate 260ms var(--ease-out), overlay 260ms allow-discrete, display 260ms allow-discrete; }
.app-drawer:popover-open { translate: 0 0; }
@starting-style { .app-drawer:popover-open { translate: -100% 0; } }
.app-drawer::backdrop { background: var(--scrim); opacity: 0; transition: opacity 220ms var(--ease-out), overlay 220ms allow-discrete, display 220ms allow-discrete; }
.app-drawer:popover-open::backdrop { opacity: 1; }
@starting-style { .app-drawer:popover-open::backdrop { opacity: 0; } }
.app-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.app-drawer .app-nav-link { height: 44px; font-size: 1rem; }
.app-drawer .app-sub { min-height: 40px; font-size: 0.97rem; }
@media (min-width: 1024px) { .app-drawer { display: none !important; } }

@media (max-width: 1023px) {
  .app-head { padding: 24px 0 22px; }
  .cech :where(h1) { font-size: 1.5rem; }
  .app-main { padding-inline: 16px; }
  .app-tabbar { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-flow: row; }
  .app-tabbar-link { border: 0; background: none; font-family: inherit; }
  :root { --pad: 18px; --gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-drawer, .app-drawer::backdrop, .app-group::details-content, .app-group-chev { transition: none; }
}
.app-group > summary > span:not(.app-badge) { flex: 1; min-width: 0; }
.app-group > summary .app-badge { order: 2; margin-left: 0; }
.app-group > summary .app-group-chev { order: 3; margin-left: 4px; }

/* ================================================================ karavana, nástěnka na tvrzi, služba a hlášení */
.kv-hero { display: grid; gap: 18px; }
.kv-hero-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.kv-hero-top h2 { margin: 2px 0 0; font-size: 1.5rem; }
.kv-hero-top h2 small { color: var(--text-2); font-size: 1rem; font-weight: 550; }
.kv-load { display: grid; gap: 8px; }
.kv-load-n { display: flex; align-items: baseline; gap: 10px; }
.kv-load-n b { font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.kv-load-n span { color: var(--text-2); }
.kv-bar { position: relative; display: block; height: 8px; border-radius: 999px; background: var(--hover); overflow: visible; }
.kv-bar i { display: block; height: 100%; border-radius: inherit; background: var(--gold); transition: width 400ms var(--ease-out); }
.kv-bar.is-full i { background: var(--ok); }
.kv-bar b { position: absolute; top: -4px; width: 2px; height: 16px; margin-left: -1px; border-radius: 1px; background: var(--text-2); }
.kv-load .kv-bar { height: 12px; }
.kv-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 20px; margin: 0; }
.kv-facts div { display: grid; gap: 2px; }
.kv-facts dt { color: var(--text-3); font-size: 0.85rem; }
.kv-facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.kv-escort { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.kv-items { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.kv-item { padding: 10px 0; border-bottom: 1px solid var(--line-soft); scroll-margin-top: 90px; }
.kv-item:last-child { border-bottom: 0; }
.kv-item:target { background: var(--accent-soft); border-radius: 10px; }
.kv-item-main { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(120px, 190px) auto; gap: 12px; align-items: center; }
.kv-item-txt { min-width: 0; }
.kv-item-name { margin: 0; font-weight: 650; }
.kv-item-name a { text-decoration: none; }
.kv-item-num { display: grid; gap: 4px; justify-items: end; font-variant-numeric: tabular-nums; }
.kv-item-num .kv-bar { width: 100%; }
.kv-item-num small { color: var(--text-2); font-size: 0.8rem; }
.kv-item-num small.is-good, .kv-good { color: var(--ok); font-weight: 600; }
.kv-item-num small.is-bad { color: var(--text-3); }
.kv-item.is-done .kv-item-name { color: var(--text-2); }
.kv-nobody { color: var(--warn); }
.kv-note { margin-top: 2px; }
.kv-src { margin-top: 8px; }
.kv-alerts, .kv-loaders { display: grid; gap: 8px; margin: 0 0 10px; padding: 0; list-style: none; }
.kv-alerts li { display: grid; gap: 2px; }
.kv-loaders li { display: flex; align-items: baseline; gap: 8px; }
.kv-loaders li b { margin-left: auto; font-variant-numeric: tabular-nums; }
.kv-loaders li small { color: var(--text-3); min-width: 56px; text-align: right; }
@media (max-width: 640px) {
  .kv-item-main { grid-template-columns: 40px minmax(0, 1fr); }
  .kv-item-num, .kv-item-act { grid-column: 2; justify-items: start; }
}

.nb-post { display: grid; gap: 10px; }
.nb-post.is-late { opacity: 0.7; }
.nb-field { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto auto; gap: 4px 8px; align-items: start; }
.nb-field > span { color: var(--text-3); font-size: 0.85rem; padding-top: 2px; }
.nb-field output { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.nb-field small { color: var(--text-3); font-size: 0.75rem; padding-top: 3px; font-variant-numeric: tabular-nums; }
.nb-copy { width: 30px !important; height: 30px !important; }
.nb-copy.is-done { color: var(--ok); }

.sl-reports { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.sl-report { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.sl-report:last-child { border-bottom: 0; }
.sl-report p { margin: 0; }
.sl-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--hover); }

/* zvířata a zahrady */
.ch-due { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ch-due li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.ch-due li:last-child { border-bottom: 0; }
.ch-due li > span { display: grid; gap: 2px; min-width: 0; }
.ch-due .ch-what { display: block; }

/* mapa: bublina a popisek v barvách tématu (dřív bílé pozadí a světlý text v tmavém režimu) */
.cech .leaflet-popup-content-wrapper, .cech .leaflet-popup-tip { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-pop); }
.cech .leaflet-popup-content-wrapper { border-radius: 12px; }
.cech .leaflet-popup-content { color: var(--text); }
.cech .leaflet-container a.leaflet-popup-close-button { color: var(--text-2); }
.cech .leaflet-container a.leaflet-popup-close-button:hover { color: var(--text); }
.cech .cech-map-pop h3 { color: var(--text); }
.cech .cech-map-pop a { color: var(--text); }
.cech .cech-map-pop-kind, .cech .cech-map-pop-meta { color: var(--text-2); }
.cech .leaflet-tooltip.cech-map-tip, .cech .leaflet-tooltip { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.cech .leaflet-tooltip-top::before { border-top-color: var(--surface); }
.cech .leaflet-tooltip-bottom::before { border-bottom-color: var(--surface); }
.cech .leaflet-tooltip-left::before { border-left-color: var(--surface); }
.cech .leaflet-tooltip-right::before { border-right-color: var(--surface); }
.cech .cech-map-pop-edit { margin-left: 4px; font-size: .82rem; color: var(--text-2) !important; }
.cech .cech-map-pop-items { display: grid; gap: 4px; margin: 6px 0 8px; padding: 0; list-style: none; }
.cech .cech-map-pop-items a { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.cech .cech-map-pop-items span { display: grid; line-height: 1.2; }
.cech .cech-map-pop-items small { color: var(--text-2); }
/* marker jako ve hře: obrázek věci s obrysem a stínem, pod ním malý barevný bod druhu */
.cech .leaflet-marker-icon.cech-pin-art { background: none; border: 0; }
.cech .cech-pin-art { display: grid; place-items: center; }
.cech .cech-pin-art img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 0 1px oklch(0.98 0.02 85)) drop-shadow(0 0 1px oklch(0.98 0.02 85)) drop-shadow(0 2px 2px oklch(0.15 0.02 60 / .55)); transition: transform 160ms var(--ease-out); }
.cech .cech-pin-art:hover img, .cech .cech-pin-art:focus-visible img { transform: scale(1.15); }
.cech .cech-pin-art i { position: absolute; bottom: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--pin); box-shadow: 0 0 0 2px oklch(0.98 0.02 85); }
.cech .cech-map-opp-open { margin-left: 4px; text-decoration: none; color: var(--text-2); font-weight: 700; }
.cech .cech-map-opp-open:hover { color: var(--accent); }
.cech .cech-map-items-picked, .cech .cech-map-items-found { display: grid; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; }
.cech .cech-map-items-picked li { display: grid; grid-template-columns: 32px auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.cech .cech-map-items-found button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); text-align: left; }
.cech .cech-map-items-found button:hover { background: var(--hover); }
.cech .cech-map-items-add { display: flex; gap: 6px; margin-bottom: 8px; }
.cech .cech-map-items-add input { flex: 1; min-width: 0; }
.cech .cech-map-icon-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.cech .cech-map-icon-pick img { vertical-align: middle; }
.ch-act { display: inline-flex; gap: 4px; align-items: center; }
.ch-qty { width: 4.5em; }
.cech .cech-map-pop { min-width: 230px; }

/* návštěvy a aktivita: heatmapa den × hodina */
.nv-heats { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.nv-heats h3 { margin: 0 0 8px; font-size: .95rem; color: var(--text-2); }
.nv-heat { display: grid; grid-template-columns: 22px repeat(24, minmax(0, 1fr)); gap: 2px; align-items: center; }
.nv-heat > span { font-size: .72rem; color: var(--text-3); }
.nv-heat > b { font-size: .65rem; font-weight: 500; color: var(--text-3); text-align: left; }
.nv-heat > i, .nv-legend i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--hover); }
.nv-heat > i.l1, .nv-legend .l1 { background: color-mix(in oklch, var(--accent) 22%, var(--hover)); }
.nv-heat > i.l2, .nv-legend .l2 { background: color-mix(in oklch, var(--accent) 45%, var(--hover)); }
.nv-heat > i.l3, .nv-legend .l3 { background: color-mix(in oklch, var(--accent) 70%, var(--hover)); }
.nv-heat > i.l4, .nv-legend .l4 { background: var(--accent); }
.nv-legend { display: flex; align-items: center; gap: 4px; margin: 10px 0 0; font-size: .78rem; color: var(--text-3); }
.nv-legend i { width: 12px; }

/* kůň: stav ze hry */
.kn-attrs { display: grid; gap: 4px; margin: 8px 0; padding: 0; list-style: none; }
.kn-attrs li { display: grid; grid-template-columns: 76px minmax(0, 1fr) 56px; gap: 8px; align-items: center; font-size: .88rem; }
.kn-attrs b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.kn-bar { display: block; height: 6px; border-radius: 999px; background: var(--hover); }
.kn-bar i { display: block; height: 100%; border-radius: inherit; background: var(--gold); }

/* síň činů 2: kruh postupu, skupiny, sledování, % lidí */
.zs-ring { --p: 0; position: relative; display: inline-grid; place-items: center; padding: 5px; border-radius: 50%; background: conic-gradient(var(--gold-medal) calc(var(--p) * 1%), var(--hover) 0); }
.zs-ring > .zs-medal { box-shadow: 0 0 0 3px var(--surface); }
.zs-ring.is-big { width: 64px; height: 64px; padding: 0; }
.zs-ring.is-big::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.zs-ring.is-big b { position: relative; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.zs-hall-score { display: flex; align-items: center; gap: 12px; }
.zs-hall-score small { color: var(--text-2); }
.zs-hall-side { display: grid; justify-items: end; gap: 6px; }
.zs-track-btn { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--text-2); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.zs-track-btn:hover { border-color: var(--gold-medal); color: var(--text); }
.zs-track-btn[aria-pressed="true"] { border-color: var(--gold-medal); background: color-mix(in oklch, var(--gold-medal) 22%, transparent); color: var(--text); }
.zs-hall-card.is-tracked { border-color: color-mix(in oklch, var(--gold-medal) 70%, var(--line)); }
.zs-tiers li em { font-style: normal; font-size: .72rem; color: var(--text-3); }
.zs-tiers li.is-got em { color: var(--text-2); }
.zs-hall-you { margin: 0; font-size: .9rem; color: var(--text-2); }
.zs-hall-you b { color: var(--text); }
.zs-hall-who li small { margin-left: auto; color: var(--text-3); font-size: .78rem; }
.zs-hall-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.zs-hall-bar .zs-hall-filter { margin: 0; }
.zs-hall-group { margin-top: 26px; }
.zs-hall-group > h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1.05rem; }
.zs-hall-group > h2 small { color: var(--text-3); font-weight: 500; }
.zs-hall:has(input[value="wip"]:checked) .zs-hall-group:not(:has([data-state="wip"])),
.zs-hall:has(input[value="done"]:checked) .zs-hall-group:not(:has([data-state="done"])),
.zs-hall:has(input[value="none"]:checked) .zs-hall-group:not(:has([data-state="none"])) { display: none; }
.zs-track { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); margin: 0; padding: 0; list-style: none; }
.zs-track a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--text); text-decoration: none; }
.zs-track a:hover { background: var(--hover); }
.zs-track span { display: grid; gap: 3px; flex: 1; min-width: 0; }
.zs-track small { color: var(--text-2); font-size: .8rem; }
.cech-widget .zs-track { grid-template-columns: 1fr; margin: 8px 0; }
.zs-sort { display: flex; gap: 4px; }
.zs-sort a { padding: 5px 10px; border-radius: 999px; color: var(--text-2); font-size: .86rem; font-weight: 600; text-decoration: none; }
.zs-sort a:hover { background: var(--hover); color: var(--text); }
.zs-sort a[aria-current="page"] { background: var(--hover); color: var(--text); }

/* ================================================================ trofeje: kovový rám, obrázek ze hry, odemknutí, detail */
.zs-trophy { overflow: hidden; background: radial-gradient(circle at 50% 40%, oklch(0.32 0.02 60), oklch(0.18 0.015 60) 72%); box-shadow: inset 0 0 0 3px var(--line-strong), 0 1px 3px oklch(0.15 0.02 60 / .4); }
.zs-trophy.t-1 { box-shadow: inset 0 0 0 3px var(--copper), inset 0 0 0 5px oklch(0.8 0.08 60 / .35), 0 2px 6px oklch(0.4 0.1 50 / .45); }
.zs-trophy.t-2 { box-shadow: inset 0 0 0 3px var(--silver), inset 0 0 0 5px oklch(0.95 0.01 250 / .4), 0 2px 6px oklch(0.4 0.02 250 / .45); }
.zs-trophy.t-3 { box-shadow: inset 0 0 0 3px var(--gold-medal), inset 0 0 0 5px oklch(0.95 0.1 92 / .45), 0 2px 10px oklch(0.6 0.13 85 / .55); background: radial-gradient(circle at 50% 35%, oklch(0.42 0.06 80), oklch(0.2 0.03 70) 72%); }
.zs-trophy img { width: 74%; height: 74%; object-fit: contain; filter: drop-shadow(0 2px 2px oklch(0 0 0 / .5)); transition: transform 300ms var(--ease-out); }
.zs-trophy.t-0 img { filter: grayscale(1) brightness(.55) contrast(.9); opacity: .6; }
.zs-trophy.t-0::before { content: "🔒"; position: absolute; right: 8%; bottom: 6%; z-index: 1; font-size: max(10px, 22%); filter: grayscale(1); opacity: .8; }
.zs-medal.is-huge { width: 168px; height: 168px; }
.zs-medal.is-xs { width: 22px; height: 22px; }
.zs-medal.is-xs.zs-trophy::before { display: none; }
.zs-ring.is-huge { padding: 8px; }
.zs-hall-card h3 a { color: inherit; text-decoration: none; }
.zs-hall-card h3 a::after { content: ""; position: absolute; inset: 0; }
.zs-hall-card form, .zs-hall-card details, .zs-hall-card .zs-track-btn { position: relative; z-index: 2; }

/* karta: naklonění a odlesk (jako vitrína s trofejí) */
.zs-hall-card { transform-style: preserve-3d; perspective: 900px; overflow: hidden; }
.zs-hall-card::before { content: ""; position: absolute; inset: -40% -60%; background: linear-gradient(105deg, transparent 40%, oklch(1 0 0 / .08) 48%, oklch(1 0 0 / .16) 50%, oklch(1 0 0 / .08) 52%, transparent 60%); transform: translateX(-60%); transition: transform 700ms var(--ease-out); pointer-events: none; }
.zs-hall-card:hover::before { transform: translateX(60%); }
.zs-hall-card:hover { transform: translateY(-3px) rotateX(2deg); }
.zs-hall-card:hover .zs-trophy img { transform: scale(1.08) rotate(-4deg); }
.zs-hall-card.t-3 .zs-trophy img { animation: zs-float 4s ease-in-out infinite; }
@keyframes zs-float { 50% { transform: translateY(-2px) scale(1.03); } }

/* úroveň trofejí */
.zs-level { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.zs-level > span:last-child { display: grid; gap: 4px; flex: 1; }
.zs-level small { color: var(--text-3); font-size: .8rem; }
.zs-level-n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(145deg, oklch(0.55 0.12 260), oklch(0.38 0.1 270)); color: oklch(0.98 0.01 260); font-weight: 800; font-size: 1.2rem; box-shadow: inset 0 0 0 2px oklch(1 0 0 / .2); }
.zs-hall-nav { margin: 0 0 16px; }

/* detail trofeje */
.zs-detail { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; }
.zs-detail h2 { margin: 2px 0 8px; font-size: 1.8rem; }
.zs-detail-art { display: grid; place-items: center; }
.zs-detail.t-3 .zs-detail-art { filter: drop-shadow(0 0 24px color-mix(in oklch, var(--gold-medal) 45%, transparent)); }
.zs-detail .zs-trophy img { animation: zs-pop-in 700ms var(--ease-expo) both; }
@keyframes zs-pop-in { from { transform: scale(.6) rotate(-12deg); opacity: 0; } }
.zs-howto { align-items: center; margin-top: 10px; }
.zs-tier-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-bottom: 24px; }
.zs-tier-card { margin: 0; }
.zs-tier-card.is-got { border-color: color-mix(in oklch, var(--gold-medal) 50%, var(--line)); }
.zs-tier-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.zs-tier-head > div { flex: 1; min-width: 0; }
.zs-tier-head h3 { margin: 0; }
.zs-tier-pct { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.zs-holders { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); margin: 0; padding: 0; list-style: none; }
.zs-holders li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line-soft); border-radius: 10px; }
.zs-holders small { margin-left: auto; color: var(--text-3); font-size: .8rem; white-space: nowrap; }
@media (max-width: 640px) { .zs-detail { grid-template-columns: 1fr; text-align: center; } .zs-medal.is-huge { width: 128px; height: 128px; } }

/* kdo co má */
.zs-matrix-wrap { overflow-x: auto; }
.zs-matrix th, .zs-matrix td { padding: 4px 6px; }
.zs-mx-h a { display: inline-block; }
.zs-mx { text-align: center; }
.zs-mx i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--hover); }

/* trofej získána – pruh shora jako na konzoli */
.cech-notice.zs-unlock { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 999px; animation: zs-unlock-in 650ms var(--ease-expo) both; }
.cech-notice.zs-unlock span { display: grid; line-height: 1.2; }
.cech-notice.zs-unlock small { color: var(--text-2); font-size: .78rem; }
.cech-notice.zs-unlock .zs-trophy { animation: zs-seal 800ms var(--ease-expo) 150ms both; }
@keyframes zs-unlock-in { from { opacity: 0; transform: translateY(-120%) scale(.96); } }
@media (prefers-reduced-motion: reduce) {
  .zs-hall-card, .zs-hall-card::before, .zs-trophy img { transition: none; animation: none !important; }
  .zs-hall-card:hover { transform: none; }
  .cech-notice.zs-unlock, .cech-notice.zs-unlock .zs-trophy, .zs-detail .zs-trophy img { animation: none; }
}

/* ================================================================ trofeje 2: kovové rámy, vzácnost, hodnosti, sledované */
/* sledované: medaile se nesmí roztáhnout (pravidlo pro text platí jen pro textový sloupec) */
.zs-track span { display: inline; flex: none; }
.zs-track a > span:not(.zs-medal) { display: grid; gap: 3px; flex: 1; min-width: 0; }
.zs-track .zs-medal { flex: none; aspect-ratio: 1; }
.zs-medal { aspect-ratio: 1; }

/* kovový rám: kuželový přechod jako leštěný kov */
.zs-trophy.t-1 { background: radial-gradient(circle at 50% 42%, oklch(0.3 0.03 50), oklch(0.17 0.02 50) 64%, transparent 65%), conic-gradient(from 210deg, oklch(0.5 0.1 45), oklch(0.78 0.11 62), oklch(0.46 0.1 42), oklch(0.72 0.1 58), oklch(0.5 0.1 45)); box-shadow: 0 2px 6px oklch(0.35 0.08 45 / .5); }
.zs-trophy.t-2 { background: radial-gradient(circle at 50% 42%, oklch(0.32 0.01 250), oklch(0.18 0.01 250) 64%, transparent 65%), conic-gradient(from 210deg, oklch(0.62 0.01 250), oklch(0.95 0.005 250), oklch(0.55 0.01 250), oklch(0.88 0.01 250), oklch(0.62 0.01 250)); box-shadow: 0 2px 6px oklch(0.3 0.02 250 / .5); }
.zs-trophy.t-3 { background: radial-gradient(circle at 50% 40%, oklch(0.4 0.07 80), oklch(0.2 0.04 70) 64%, transparent 65%), conic-gradient(from 210deg, oklch(0.62 0.12 75), oklch(0.93 0.12 95), oklch(0.58 0.12 72), oklch(0.86 0.13 90), oklch(0.62 0.12 75)); box-shadow: 0 2px 12px oklch(0.65 0.14 85 / .55); }
.zs-trophy.t-0 { background: radial-gradient(circle at 50% 42%, oklch(0.24 0.01 60), oklch(0.15 0.01 60) 64%, transparent 65%), conic-gradient(oklch(0.32 0.01 60), oklch(0.42 0.01 60), oklch(0.3 0.01 60), oklch(0.4 0.01 60), oklch(0.32 0.01 60)); }

/* vzácnost: barva štítku, okraje a záře karty */
.zs-rarity.is-common { color: var(--text-3); }
.zs-rarity.is-uncommon { color: oklch(0.72 0.14 150); background: color-mix(in oklch, oklch(0.7 0.14 150) 14%, transparent); }
.zs-rarity.is-rare { color: oklch(0.72 0.13 245); background: color-mix(in oklch, oklch(0.65 0.14 245) 16%, transparent); }
.zs-rarity.is-epic { color: oklch(0.74 0.15 305); background: color-mix(in oklch, oklch(0.62 0.17 305) 18%, transparent); }
.zs-rarity.is-legend { color: oklch(0.8 0.15 70); background: color-mix(in oklch, oklch(0.75 0.15 70) 18%, transparent); }
.zs-rarity.is-myth { color: oklch(0.82 0.14 20); background: linear-gradient(90deg, color-mix(in oklch, oklch(0.65 0.2 20) 22%, transparent), color-mix(in oklch, oklch(0.65 0.18 300) 22%, transparent)); }
.zs-rarity.is-unfound { color: var(--text-3); border: 1px dashed var(--line-strong); background: none; }
.zs-hall-card.is-rare { box-shadow: inset 0 3px 0 oklch(0.65 0.14 245 / .7); }
.zs-hall-card.is-epic { box-shadow: inset 0 3px 0 oklch(0.62 0.17 305 / .8), 0 0 0 1px oklch(0.62 0.17 305 / .25); }
.zs-hall-card.is-legend { box-shadow: inset 0 3px 0 oklch(0.75 0.15 70 / .85), 0 0 18px -6px oklch(0.75 0.15 70 / .6); }
.zs-hall-card.is-myth { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, conic-gradient(from var(--zs-a, 0deg), oklch(0.7 0.2 20), oklch(0.75 0.16 70), oklch(0.65 0.18 300), oklch(0.7 0.2 20)) border-box; animation: zs-myth 6s linear infinite; }
@property --zs-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes zs-myth { to { --zs-a: 360deg; } }
.zs-hall-card.t-3 { background: linear-gradient(170deg, color-mix(in oklch, var(--gold-medal) 12%, var(--surface)), var(--surface) 50%); }
.zs-hall-card.t-2 { background: linear-gradient(170deg, color-mix(in oklch, var(--silver) 10%, var(--surface)), var(--surface) 50%); }
.zs-hall-card.t-1 { background: linear-gradient(170deg, color-mix(in oklch, var(--copper) 10%, var(--surface)), var(--surface) 50%); }
.zs-hall-card.is-myth.t-3, .zs-hall-card.is-myth.t-2, .zs-hall-card.is-myth.t-1 { background: linear-gradient(170deg, color-mix(in oklch, var(--gold-medal) 10%, var(--surface)), var(--surface) 50%) padding-box, conic-gradient(from var(--zs-a, 0deg), oklch(0.7 0.2 20), oklch(0.75 0.16 70), oklch(0.65 0.18 300), oklch(0.7 0.2 20)) border-box; }

/* hodnosti a výsady */
.zs-ranks { display: grid; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; }
.zs-ranks li { display: flex; align-items: center; gap: 10px; }
.zs-ranks .zs-rank-seal { width: 30px; height: 30px; border-radius: 8px; }
.zs-ranks .zs-rank-seal .ico { width: 15px; height: 15px; }
.zs-ranks li > span:last-child { display: grid; line-height: 1.25; }
.zs-ranks small { color: var(--text-3); font-size: .8rem; }
.zs-rank-perk { color: var(--text-2); font-size: .8rem; }
.zs-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .zs-hall-card.is-myth { animation: none; } }
.zs-rank-edit input:not(.zs-num) { width: 100%; min-width: 120px; }
.zs-rank-edit tr.is-new td { opacity: .75; }
