:root {
  --brand-950: #2b050c;
  --brand-900: #430812;
  --brand-800: #6f101f;
  --brand-700: #9f1425;
  --brand-600: #d7192d;
  --brand-500: #ef3346;
  --brand-100: #ffe7ea;
  --brand-50: #fff4f5;
  --ink: #21181b;
  --text: #34282c;
  --muted: #74666a;
  --line: #ead9dd;
  --surface: #ffffff;
  --surface-2: #fff9fa;
  --bg: #fbf4f5;
  --ok: #16803b;
  --error: #b81222;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(43, 5, 12, .05), 0 14px 34px rgba(43, 5, 12, .08);
  --shadow-lift: 0 4px 10px rgba(43, 5, 12, .08), 0 22px 50px rgba(43, 5, 12, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, #fff 0, var(--bg) 360px, #fff 980px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.reading { width: min(820px, calc(100% - 40px)); }
a { color: var(--brand-700); text-underline-offset: 3px; }
a:hover { color: var(--brand-600); }
.muted { color: var(--muted); font-size: .92em; }
h1, h2, h3 { color: var(--ink); line-height: 1.08; font-weight: 800; letter-spacing: 0; }

/* Public admin mode */
.admin-public-bar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--brand-950);
  color: #fff;
  font-size: .86rem;
}
.admin-public-bar-inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.admin-public-bar span {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.admin-public-bar nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.admin-public-bar a {
  color: #ffd8de;
  font-weight: 800;
  text-decoration: none;
}
.admin-public-bar a:hover { color: #fff; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid rgba(234, 217, 221, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.admin-public-bar + .site-header { top: 38px; }
.header-inner {
  min-height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink); text-decoration: none; font-size: 1.22rem; font-weight: 900;
}
.logo span { color: var(--brand-600); }
.logo-mark {
  width: 36px; height: 36px; border-radius: 8px;
  box-shadow: 0 10px 26px rgba(215, 25, 45, .22);
}
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: .92rem; }
.main-nav a:hover { color: var(--brand-700); }
.nav-cta {
  background: var(--brand-600); color: #fff !important;
  padding: 9px 16px; border-radius: 8px;
  box-shadow: 0 10px 22px rgba(215, 25, 45, .18);
}
.nav-cta:hover { background: var(--brand-700); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--brand-950) 0%, var(--brand-900) 48%, var(--brand-700) 100%);
  color: #fff;
  padding: clamp(54px, 8vw, 94px) 0;
  margin-bottom: 42px;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.32), transparent 72%);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .72fr);
  gap: clamp(30px, 6vw, 76px); align-items: center;
}
.hero-copy { max-width: 660px; }
.hero-kicker, .section-kicker {
  margin: 0 0 14px;
  color: #ffb6bf;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .76rem;
  font-weight: 900;
}
.hero h1 {
  margin: 0 0 18px;
  max-width: 760px;
  color: #fff;
  font-size: 4.65rem;
  letter-spacing: 0;
}
.hero-sub {
  margin: 0 0 28px;
  max-width: 600px;
  color: #ffd9de;
  font-size: 1.18rem;
}
.hero-form {
  max-width: 540px;
  padding: 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
}
.hero-form input[type="email"] { border: none; }
.hero-gdpr { color: #f5b7bf; }
.hero-gdpr a { color: inherit; }
.hero-panel {
  min-height: 420px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 26px;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(20, 0, 5, .28);
  transform: rotate(1.5deg);
}
.hero-panel-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hero-panel-top span { color: var(--muted); font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.hero-panel-top strong { color: var(--brand-700); font-size: 1.05rem; }
.hero-panel-mark {
  align-self: center; justify-self: center;
  width: min(230px, 55vw); aspect-ratio: 1;
  display: grid; place-items: center;
  background: var(--brand-600);
  color: #fff;
  clip-path: polygon(50% 0, 100% 88%, 0 88%);
}
.hero-panel-mark span { transform: translateY(18px); font-size: 8rem; font-weight: 900; line-height: 1; }
.hero-panel-lines { display: grid; gap: 10px; }
.hero-panel-lines span { display: block; height: 11px; background: var(--brand-100); border-radius: 999px; }
.hero-panel-lines span:nth-child(2) { width: 74%; }
.hero-panel-lines span:nth-child(3) { width: 48%; }

/* Layout */
main { padding-bottom: 64px; }
.content-shell { padding-top: 6px; }
.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px; margin-bottom: 20px;
}
.section-head .section-kicker { color: var(--brand-700); margin-bottom: 8px; }
.section-title { margin: 0; font-size: 2.15rem; }
.section-intro {
  max-width: 76ch;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .98rem;
}

.article-list { display: grid; gap: 14px; }
.article-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}
.article-card:hover {
  transform: translateY(-2px);
  border-color: #e8b8c0;
  box-shadow: var(--shadow-lift);
}
.card-link {
  display: grid; grid-template-columns: 156px minmax(0, 1fr);
  color: inherit;
}
.card-media {
  min-height: 164px;
  background: var(--brand-950);
  display: grid; place-items: center;
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 22px 26px; min-width: 0; }
.article-meta { margin: 0; }
.date-chip, .topic-chip {
  display: inline-flex; align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 800;
  line-height: 1;
}
.date-chip { background: var(--brand-100); color: var(--brand-800); }
.topic-chip { background: #f6f0f1; color: var(--muted); }
.article-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.article-card .article-tags { display: flex; margin-top: 10px; }
.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid #f0b8c0;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-800);
  font-size: .73rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
}
.tag-chip:hover { background: #ffdce1; border-color: #df6877; }
.article-author {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}
.article-author { text-decoration: none; }
.article-author:hover { color: var(--brand-700); text-decoration: underline; }

.scroll-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900; /* pod cookie lištou (1000) — po odsouhlasení lišta zmizí */
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .2s, transform .2s, background .15s;
}
.scroll-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.scroll-top:hover { background: var(--brand-700); }

.cookie-banner {
  position: fixed;
  z-index: 1000;
  right: 20px;
  bottom: 20px;
  width: min(560px, calc(100vw - 32px));
  border: 1px solid #efb5bd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(58, 7, 17, .2);
}
.cookie-banner-inner { padding: 22px; }
.cookie-banner h2 { margin: 0 0 8px; font-size: 1.06rem; }
.cookie-banner p { margin: 0 0 9px; color: var(--muted); font-size: .91rem; line-height: 1.55; }
.cookie-banner a { font-size: .88rem; font-weight: 750; }
.cookie-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.cookie-settings-link {
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
}
.cookie-settings-link span { text-decoration: underline; }
.cookie-settings-link:hover span { text-decoration: none; }
@media (max-width: 580px) {
  .cookie-banner { right: 16px; bottom: 16px; width: calc(100vw - 32px); }
  .cookie-banner-inner { padding: 18px; }
  .cookie-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cookie-actions .button { justify-content: center; }
}
.article-meta .article-author { margin-left: 8px; }
.article-card h2,
.article-card h3 {
  margin: 12px 0 8px;
  font-size: 1.45rem;
  letter-spacing: 0;
}
.card-title-link { color: inherit; text-decoration: none; }
.card-title-link::after { content: ""; position: absolute; inset: 0; }
.article-tags, .tag-chip { position: relative; z-index: 1; }
.article-card:hover h2,
.article-card:hover h3 { color: var(--brand-700); }
.card-perex { margin: 0 0 14px; color: var(--muted); max-width: 68ch; }
.read-more { color: var(--brand-700); font-weight: 900; font-size: .92rem; }

/* Article */
.article-full { padding-top: 44px; }
.article-page-layout .reading { width: auto; margin: 0; }
.desktop-ad-sidebar { display: none; }
.public-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px;
  background: var(--brand-50);
  border: 1px solid #f0b8c0;
  border-radius: 8px;
}
.public-edit-actions span {
  color: var(--brand-800);
  font-weight: 900;
}
.article-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 176px;
  gap: 34px; align-items: center;
  padding-bottom: 28px; margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.article-head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.article-icon {
  width: 176px; height: 176px; object-fit: cover;
  border-radius: 8px; box-shadow: var(--shadow);
}
.article-cover-photo { width: 100%; height: 300px; object-fit: cover; }
.article-full h1 {
  margin: 0;
  color: var(--ink);
  font-size: 3.4rem;
  letter-spacing: 0;
}
.perex {
  margin: 18px 0 0;
  max-width: 68ch;
  color: #59474c;
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.55;
}
.article-content { font-size: 1.055rem; }
.article-content h2 { margin: 2.1em 0 .7em; font-size: 1.55rem; }
.article-content h3 { margin: 1.7em 0 .55em; font-size: 1.2rem; }
.article-content p { margin: 1em 0; }
.article-content img { max-width: 100%; border-radius: 8px; }
.article-content blockquote {
  margin: 1.5em 0;
  padding: 14px 18px;
  color: #59474c;
  background: var(--surface-2);
  border-left: 5px solid var(--brand-600);
}
.article-content .table-scroll {
  margin: 1.2em 0;
  box-shadow: none;
  padding-bottom: 6px;
  /* trvale viditelný posuvník — na mobilu jinak není poznat, že tabulka pokračuje */
  scrollbar-width: thin;
  scrollbar-color: var(--brand-600) #f1e4e7;
}
.article-content .table-scroll::-webkit-scrollbar {
  height: 9px;
  -webkit-appearance: none;
}
.article-content .table-scroll::-webkit-scrollbar-track {
  background: #f1e4e7;
  border-radius: 999px;
}
.article-content .table-scroll::-webkit-scrollbar-thumb {
  background: var(--brand-600);
  border-radius: 999px;
}
.article-content table {
  width: 100%; border-collapse: collapse; overflow: hidden;
  border-radius: 8px; border: 1px solid var(--line);
  min-width: 520px; /* ať se sloupce na mobilu nemačkají — obal se posouvá do strany */
}
.article-content td, .article-content th {
  border-bottom: 1px solid var(--line);
  padding: 10px 14px; text-align: left;
}
.article-content th { background: var(--surface-2); }
.article-content code {
  background: #f7ecef; padding: 2px 6px; border-radius: 5px; font-size: .9em;
  overflow-wrap: anywhere; /* dlouhé adresy v kódu jinak roztáhnou stránku na mobilu */
}
.article-content a { overflow-wrap: anywhere; }

/* Ads */
.zetpos-ad {
  margin: 42px 0;
  padding: 22px;
  background: linear-gradient(135deg, var(--brand-950), var(--brand-800));
  color: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.zetpos-ad.has-image { display: flex; gap: 22px; align-items: center; overflow: hidden; }
.ad-image { flex: 0 0 186px; width: 186px; height: 132px; object-fit: cover; border-radius: 8px; }
.ad-content { flex: 1; min-width: 0; }
.ad-thumb {
  width: 84px; height: 60px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line);
}
.zetpos-ad .kicker {
  color: #ffbac2;
  text-transform: uppercase; letter-spacing: .12em;
  font-size: .72rem; font-weight: 900;
}
.zetpos-ad-body {
  display: flex; align-items: center; justify-content: space-between;
  gap: 22px; flex-wrap: wrap; margin-top: 8px;
}
.zetpos-ad h3 { margin: 0 0 6px; color: #fff; font-size: 1.22rem; }
.zetpos-ad p { margin: 0; color: #ffdce1; }

@media (min-width: 1040px) {
  .article-page-layout.has-sidebar,
  .index-page-layout.has-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 30px;
    align-items: start;
  }
  .desktop-ad-sidebar {
    position: sticky;
    top: 96px;
    display: block;
    min-width: 0;
  }
  .desktop-ad-sidebar .zetpos-ad {
    margin: 0;
    padding: 18px;
  }
  .desktop-ad-sidebar .zetpos-ad.has-image {
    display: block;
  }
  .desktop-ad-sidebar .ad-image {
    width: 100%;
    height: 138px;
    margin-bottom: 14px;
  }
  .desktop-ad-sidebar .zetpos-ad-body {
    display: block;
  }
  .desktop-ad-sidebar .zetpos-ad h3 { font-size: 1.08rem; }
  .desktop-ad-sidebar .zetpos-ad p { font-size: .9rem; }
  .desktop-ad-sidebar .zetpos-ad .button { width: 100%; margin-top: 16px; }
}

/* Buttons and forms */
.button,
button,
.newsletter-form button {
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.button:hover { background: var(--brand-800); color: #fff; }
.button:active { transform: translateY(1px); }
.button.accent {
  background: #fff;
  color: var(--brand-800);
  white-space: nowrap;
}
.button.accent:hover { background: var(--brand-100); color: var(--brand-900); }
.button.ghost {
  background: #fff;
  color: var(--brand-800);
  border: 1px solid var(--line);
}
.button.ghost:hover { background: var(--brand-50); }
.button.small { min-height: 32px; padding: 6px 12px; font-size: .84rem; }

input[type="text"], input[type="email"], input[type="url"],
input[type="password"], textarea, select {
  display: block;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 4px rgba(215, 25, 45, .12);
}
input[readonly] { background: #f7ecef; color: var(--muted); cursor: not-allowed; }
input[type="file"] { margin-top: 6px; font-weight: 400; }
.input-hint {
  display: block; margin-top: 5px;
  color: var(--muted); font-size: .82rem; font-weight: 500;
}

.newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-form input[type="email"] { flex: 1; min-width: 220px; width: auto; }
.newsletter-form button {
  min-height: 44px;
  padding: 10px 18px;
  background: var(--brand-600);
  color: #fff;
  transition: background .15s;
}
.newsletter-form button:hover { background: var(--brand-700); }
.hero-form button { background: #fff; color: var(--brand-800); }
.hero-form button:hover { background: var(--brand-100); }
.newsletter-slim {
  margin: 28px 0;
  padding: 14px 16px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.gdpr-note { margin: 10px 0 0; color: var(--muted); font-size: .78rem; }
.gdpr-note a { color: inherit; }

/* Comments */
.comments { margin-top: 48px; }
.comments h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.count-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; min-height: 26px;
  background: var(--brand-100);
  color: var(--brand-800);
  font-size: .85rem; font-weight: 900;
  border-radius: 999px;
}
.comment {
  display: flex; gap: 14px;
  padding: 16px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.avatar {
  flex: 0 0 38px; width: 38px; height: 38px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-600);
  color: #fff; font-weight: 900;
}
.comment-main { min-width: 0; flex: 1; }
.comment-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.comment-main p { margin: 5px 0 0; white-space: pre-line; overflow-wrap: break-word; }
.comment-pending { background: #fff9e8; border-color: #eed68e; }
.comment-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.vote-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  background: #f7ecef;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: .85rem;
}
.vote-btn:hover, .vote-btn.active {
  background: var(--brand-100);
  border-color: #f0b8c0;
  color: var(--brand-800);
}
.reply-btn {
  padding: 5px 8px;
  background: none;
  color: var(--brand-700);
  font-size: .85rem;
}
.reply-btn:hover { text-decoration: underline; }
.replies {
  margin-top: 14px; padding-left: 16px;
  border-left: 2px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.comment-reply { margin-bottom: 0; background: var(--surface-2); }
.comment-reply .avatar { flex-basis: 32px; width: 32px; height: 32px; font-size: .9rem; }
.reply-banner[hidden] { display: none; }
.reply-banner {
  display: flex; gap: 10px; align-items: center;
  padding: 9px 12px; margin-bottom: 14px;
  background: var(--brand-100);
  border: 1px solid #f0b8c0;
  border-radius: 8px;
  font-size: .92rem;
}
.reply-banner button {
  margin-left: auto;
  padding: 2px 6px !important;
  background: none !important;
  color: var(--muted) !important;
}
.reply-banner button:hover { color: var(--error) !important; }

/* Admin and shared panels */
.comment-form, .admin-form {
  margin-top: 28px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.comment-form h3 { margin-top: 0; }
.comment-form label, .admin-form label {
  display: block;
  margin-bottom: 16px;
  font-size: .95rem;
  font-weight: 800;
}
.comment-form label input, .comment-form label textarea,
.admin-form label input, .admin-form label textarea { margin-top: 6px; font-weight: 400; }
/* Tlačítka uvnitř Toast UI editoru si stylizuje editor sám (ikony přes sprite) */
.comment-form button[type="submit"], .admin-form button:not(.toastui-editor-defaultUI *) {
  padding: 10px 18px;
  background: var(--brand-600);
  color: #fff;
  transition: background .15s;
}
.comment-form button[type="submit"]:hover, .admin-form button:not(.toastui-editor-defaultUI *):hover { background: var(--brand-700); }
.cf-turnstile { margin-bottom: 16px; }

.flash {
  padding: 12px 16px;
  border-radius: 8px;
  margin: 18px 0 0;
  font-weight: 700;
}
.flash-success { background: #e8f8ef; border: 1px solid #b8e6cb; color: #14532d; }
.flash-error { background: #fdecec; border: 1px solid #f3c4c4; color: #7f1d1d; }

.site-footer {
  margin-top: 44px;
  padding: 48px 0;
  background: var(--brand-950);
  color: #ffd8de;
}
.footer-inner { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col { flex: 1; min-width: 260px; }
.site-footer h3 { margin-top: 0; color: #fff; }
.site-footer a { color: #ffbac2; }
.site-footer .gdpr-note, .footer-copy { color: #dca9b2; }
.footer-copy { margin-top: 20px; font-size: .85rem; }

.pagination {
  display: flex; gap: 14px; align-items: center; justify-content: center;
  margin-top: 30px;
}
.center-box { text-align: center; padding: 72px 0; }
.center-box h1 { font-size: 2.35rem; }

.admin-head {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px; padding-top: 32px; margin-bottom: 18px;
}
.admin-head h1 { margin: 0; font-size: 1.7rem; }
.admin-nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.admin-nav .inline-form { display: inline; margin: 0; }
.admin-nav a { font-weight: 700; text-decoration: none; }
.admin-nav a:not(.button):hover { text-decoration: underline; }
.table-scroll { overflow-x: auto; border-radius: 8px; box-shadow: var(--shadow); }
.admin-table {
  width: 100%; min-width: 720px;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
}
.admin-table th, .admin-table td {
  padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line);
  vertical-align: top; font-size: .92rem;
}
.admin-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table a { text-decoration: none; }
.badge {
  display: inline-flex; align-items: center;
  min-height: 24px; padding: 3px 10px;
  border-radius: 999px;
  font-size: .76rem; font-weight: 900;
}
.badge-ok { background: #e8f8ef; color: var(--ok); }
.badge-warn { background: #fff1d9; color: #8a4700; }
.badge-muted { background: #f7ecef; color: var(--muted); }
.badge-error { background: #fdecec; color: var(--error); }
.admin-form.narrow { max-width: 520px; }
.autosave-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 0 18px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #f7ecef;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
}
.autosave-status[data-state="saved"] { background: #e8f8ef; color: var(--ok); }
.autosave-status[data-state="dirty"],
.autosave-status[data-state="saving"] { background: var(--brand-100); color: var(--brand-800); }
.autosave-status[data-state="error"] { background: #fdecec; color: var(--error); }
.edit-version-banner {
  display: grid;
  gap: 4px;
  margin: 0 0 18px;
  padding: 13px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--muted);
  border-radius: 8px;
}
.edit-version-banner.has-draft {
  border-left-color: var(--brand-600);
  background: var(--brand-50);
}
.edit-version-banner strong {
  color: var(--ink);
}
.edit-version-banner span {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 650;
}
.editor-block { margin: 0 0 8px; }
.content-source {
  display: none;
  width: 100%;
  margin-top: 8px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .88rem;
}
.editor-block .toastui-editor-defaultUI {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.editor-block .toastui-editor-defaultUI .toastui-editor-md-tab-container { border-top-left-radius: 8px; }
.editor-block .toastui-editor-contents { font-size: 1rem; }
.editor-block .toastui-editor-contents a { color: var(--brand-700); }
.server-preview { margin-top: 10px; }
.server-preview summary {
  cursor: pointer;
  padding: 6px 0;
  font-size: .95rem;
  font-weight: 800;
  color: var(--brand-800);
}
.label-text { display: block; margin-bottom: 6px; font-size: .95rem; font-weight: 800; }
.preview-box {
  min-height: 300px; max-height: 600px;
  padding: 14px 18px;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px dashed #d7b6bd;
  border-radius: 8px;
}
.labels-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.web-image-preview {
  display: grid;
  gap: 10px;
  max-width: 420px;
  margin-top: 12px;
}
.web-image-preview img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.tag-option {
  position: relative;
  display: inline-flex !important;
  margin: 0 !important;
  cursor: pointer;
}
.tag-option input { position: absolute; opacity: 0; }
.tag-option span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
}
.tag-option:has(input:checked) span {
  border-color: var(--brand-600);
  background: var(--brand-50);
  color: var(--brand-800);
  box-shadow: 0 0 0 3px rgba(215, 25, 45, .1);
}
fieldset {
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
legend { padding: 0 8px; font-size: .95rem; font-weight: 900; }
.toggles { display: flex; gap: 22px; flex-wrap: wrap; }
.toggles label { margin: 0; font-weight: 700; }
.toggles input { margin-right: 6px; accent-color: var(--brand-600); }
.social-preview { margin-bottom: 18px; }
.social-preview img {
  max-width: 320px; width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.social-preview-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .84rem;
}
.publish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.publish-option {
  position: relative;
  display: flex !important;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  margin: 0 !important;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .1s;
}
.publish-option:hover {
  border-color: #e8aeb8;
  transform: translateY(-1px);
}
.publish-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.publish-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f7ecef;
  color: var(--brand-800);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: 0;
}
.publish-option strong {
  display: block;
  color: var(--ink);
  line-height: 1.2;
}
.publish-option small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.25;
}
.publish-option:has(input:checked) {
  border-color: var(--brand-600);
  background: var(--brand-50);
  box-shadow: 0 0 0 4px rgba(215, 25, 45, .08);
}
.publish-option:has(input:checked)::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-600);
  box-shadow: 0 0 0 4px rgba(215, 25, 45, .12);
}
.publish-option:has(input:checked) .publish-icon {
  background: var(--brand-600);
  color: #fff;
}
.schedule-panel { background: var(--surface-2); }
.publish-mode {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.mode-option {
  position: relative;
  display: flex !important;
  align-items: center;
  min-height: 54px;
  margin: 0 !important;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.mode-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.mode-option span { font-weight: 900; }
.mode-option:has(input:checked) {
  border-color: var(--brand-600);
  background: var(--brand-50);
  box-shadow: 0 0 0 4px rgba(215, 25, 45, .08);
}
.schedule-picker {
  display: none;
  grid-template-columns: minmax(0, 500px);
  gap: 12px;
  align-items: start;
}
.schedule-picker.is-active { display: grid; }
.schedule-picker > input[type="datetime-local"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}
.calendar-widget {
  width: 100%;
  max-width: 500px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.calendar-head {
  display: grid; grid-template-columns: 42px 1fr 42px; gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.calendar-head strong { text-align: center; color: var(--ink); font-size: 1rem; }
.calendar-head button,
.calendar-days button {
  min-height: 40px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}
.calendar-head button:hover,
.calendar-days button:hover { background: var(--brand-50); }
.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.calendar-weekdays {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}
.calendar-days span { min-height: 36px; }
.calendar-days button {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 4px 0;
  font-size: .84rem;
}
.calendar-blank {
  background: transparent;
  border-radius: 8px;
}
.calendar-days button.is-past { color: #c8b9bc; background: #faf6f7; cursor: not-allowed; }
.calendar-days button:disabled:hover { background: #faf6f7; }
.calendar-days button.today {
  border-color: var(--brand-600);
  color: var(--brand-800);
}
.calendar-days button.active {
  background: var(--brand-600);
  color: #fff;
  border-color: var(--brand-600);
}
.calendar-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.calendar-controls label { flex: 0 1 150px; margin: 0; }
.calendar-controls input[type="time"] { margin-top: 5px; }
.calendar-today {
  min-height: 42px;
  padding: 8px 13px !important;
  background: var(--brand-50) !important;
  color: var(--brand-800) !important;
  border: 1px solid #f0b8c0 !important;
}
.calendar-today:hover { background: var(--brand-100) !important; }
.calendar-summary {
  margin: 14px 0 0; padding: 0;
  color: var(--brand-800); font-size: .92rem; font-weight: 850;
}
.icon-picker { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.icon-option { cursor: pointer; margin: 0 !important; }
.icon-option input { position: absolute; opacity: 0; }
.icon-option img {
  display: block;
  width: 92px; height: 92px;
  object-fit: cover;
  border-radius: 8px;
  border: 3px solid transparent;
  transition: border-color .15s, transform .1s, box-shadow .15s;
}
.icon-option:hover img { transform: translateY(-1px); }
.icon-option input:checked + img {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 4px rgba(215, 25, 45, .14);
}
.form-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: stretch; }
.admin-actions {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.action-group {
  flex: 1 1 280px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.action-group-primary {
  background: #fff;
  border-color: #efbac2;
}
.new-article-publish { margin-top: 14px; }
.action-label {
  flex: 1 0 100%;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.clicks-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
  margin: 0 0 18px;
}
.clicks-filter label { display: grid; gap: 4px; font-weight: 700; font-size: .92rem; }
.clicks-filter select, .clicks-filter input {
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}
.prompt-history-title { margin: 34px 0 12px; font-size: 1.3rem; }
.prompt-history { display: grid; gap: 10px; }
.prompt-version {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
}
.prompt-version.is-active { border-color: var(--brand-600); }
.prompt-version summary { cursor: pointer; font-size: .95rem; }
.prompt-version summary .badge { background: var(--brand-100); color: var(--brand-800); margin: 0 4px; }
.prompt-version pre {
  margin: 12px 0;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: 8px;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-size: .84rem;
}
.secondary-action {
  background: #fff !important;
  color: var(--brand-800) !important;
  border: 1px solid var(--line) !important;
}
.secondary-action:hover { background: var(--brand-50) !important; }
.schedule-action {
  background: var(--brand-800) !important;
  color: #fff !important;
}
.schedule-action:hover { background: var(--brand-900) !important; }
.form-actions .primary { background: var(--ok); }
.form-actions .primary:hover { background: #126b32; }
button.danger { background: var(--error) !important; }
button.danger:hover { background: #8f0d19 !important; }
button.small { padding: 6px 12px !important; font-size: .85rem !important; border-radius: 8px !important; }
.admin-tools { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.admin-tools form { display: inline; }
.tool-btn {
  padding: 4px 9px !important;
  background: #f7ecef;
  color: var(--muted) !important;
  border-radius: 7px;
  font-size: .78rem !important;
  font-weight: 900;
  text-decoration: none;
}
.tool-btn:hover { background: #efd8dd; }
.tool-btn.ok { background: #e8f8ef; color: var(--ok) !important; }
.tool-btn.danger { background: #fdecec !important; color: var(--error) !important; }
button.approve { background: var(--ok) !important; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions form { display: inline; }
.delete-article-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}

@media (max-width: 860px) {
  .hero-grid, .article-hero, .labels-grid { grid-template-columns: 1fr; }
  .schedule-picker { grid-template-columns: 1fr; }
  .schedule-picker > input[type="datetime-local"],
  .calendar-widget { max-width: none; }
  .hero-panel { min-height: 320px; transform: none; }
  .article-icon { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .delete-article-action { align-items: flex-start; flex-direction: column; }
  .hero h1 { font-size: 3.35rem; }
  .article-full h1 { font-size: 2.8rem; }
}

@media (max-width: 680px) {
  .admin-public-bar { position: relative; }
  .admin-public-bar + .site-header { top: 0; }
  .container, .reading { width: min(100% - 32px, 1120px); }
  .header-inner { min-height: 62px; }
  .logo { font-size: 1.08rem; }
  .logo-mark { width: 30px; height: 30px; }
  .main-nav { gap: 12px; }
  .main-nav a:not(.nav-cta) { display: none; }
  .nav-cta { padding: 8px 12px; font-size: .84rem; }
  .hero { padding: 46px 0; margin-bottom: 28px; }
  .hero h1 { font-size: 2.35rem; }
  .hero-panel { display: none; }
  .section-head { align-items: start; flex-direction: column; gap: 6px; }
  /* Na mobilu zůstává obrázek ve sloupci vlevo; absolutní pozice drží obrázek
     v rozměrech sloupce (height:100% v gridu přetéká) a ikonka se vejde celá */
  .card-link { grid-template-columns: 96px minmax(0, 1fr); }
  .card-media { min-height: 100%; position: relative; }
  .card-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
  .card-media--icon { background: #d7192d; }
  .card-media--icon img { object-fit: contain; padding: 8px 6px; }
  .card-body { padding: 16px; }
  .card-perex { display: none; }
  .article-card h2, .article-card h3 { font-size: 1.08rem; }
  .section-title { font-size: 1.7rem; }
  .article-full h1 { font-size: 2.2rem; }
  .perex { font-size: 1.05rem; }
  .article-full { padding-top: 28px; }
  .article-hero { gap: 18px; }
  .zetpos-ad.has-image { flex-direction: column; align-items: stretch; }
  .ad-image { flex-basis: auto; width: 100%; height: 160px; }
  .zetpos-ad-body .button { width: 100%; }
  .comment-form, .admin-form { padding: 18px; }
  .comment { padding: 13px; }
  .newsletter-form button { width: 100%; }
  .action-group { flex-basis: 100%; }
  .action-group button { flex: 1 1 100%; }
  .footer-inner { gap: 28px; }
  .center-box { padding: 48px 0; }
}
