:root {
  --ink: #28180a;
  --muted: #5b3a1a;
  --gold: #a97424;
  --paper: rgba(255, 242, 215, 0.86);
  --paper-border: rgba(105, 68, 30, 0.45);
  --shadow: rgba(15, 8, 3, 0.34);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: #2a1a0d;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background-color: #2a1a0d;
}

body.page {
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
}

/* Pozadí jsou nastavená přímo v CSS, aby se správně načítala i lokálně z počítače. */
body.index-bg {
  background-image:
    linear-gradient(rgba(46, 29, 12, 0.32), rgba(46, 29, 12, 0.58)),
    url("bg-index.jpg");
}

body.historie-bg {
  background-image:
    linear-gradient(rgba(46, 29, 12, 0.32), rgba(46, 29, 12, 0.58)),
    url("bg-kontakt.jpg");
}

body.kontakt-bg {
  background-image:
    linear-gradient(rgba(46, 29, 12, 0.32), rgba(46, 29, 12, 0.58)),
    url("bg-kontakt.jpg");
}

body.aktualne-bg {
  background-image:
    linear-gradient(rgba(46, 29, 12, 0.32), rgba(46, 29, 12, 0.58)),
    url("bg-index.jpg");
}


body.soucasnost-bg {
  background-image:
    linear-gradient(rgba(46, 29, 12, 0.32), rgba(46, 29, 12, 0.58)),
    url("bg-kontakt.jpg");
}

body.fotogalerie-bg {
  background-image:
    linear-gradient(rgba(46, 29, 12, 0.32), rgba(46, 29, 12, 0.58)),
    url("bg-index.jpg");
}

/* pouze jemné ztmavení pro čitelnost, fotografie má zůstat výrazně vidět */
body.page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 241, 214, 0.10), rgba(58, 35, 15, 0.24)),
    radial-gradient(ellipse at center,
      rgba(255, 244, 220, 0.12) 0%,
      rgba(58, 35, 15, 0.05) 55%,
      rgba(20, 10, 4, 0.32) 100%);
  z-index: -1;
}

.site {
  width: min(1120px, calc(100% - 34px));
  margin: 0 auto;
  padding: 22px 0 34px;
}

.top-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.top-nav a {
  color: #f5dfaf;
  text-decoration: none;
  background: rgba(38, 22, 9, 0.62);
  border: 1px solid rgba(224, 184, 112, 0.40);
  padding: 8px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  background: rgba(112, 71, 31, 0.78);
}

.hero {
  position: relative;
  text-align: center;
  margin: 0 auto 12px;
  min-height: 150px;
  padding-top: 8px;
}

/* erb je vložen jako skutečný obrázek, bez přegenerování; vlevo nahoře jako rodová pečeť */
.crest {
  width: clamp(112px, 12vw, 172px);
  height: auto;
  display: block;
  position: absolute;
  left: clamp(-188px, -8.8vw, -138px);
  top: 0;
  margin: 0;
  filter: drop-shadow(0 3px 6px rgba(20, 12, 4, 0.45));
}

h1 {
  margin: 18px 0 0;
  font-size: clamp(2rem, 4.7vw, 4.05rem);
  line-height: 1.05;
  color: #2b1909;
  text-shadow:
    0 1px 0 rgba(255, 244, 220, 0.90),
    0 3px 12px rgba(255, 236, 197, 0.62);
  letter-spacing: 0.01em;
}

.subtitle {
  margin: 8px auto 8px;
  font-size: clamp(1.05rem, 2vw, 1.58rem);
  font-style: italic;
  color: #4c2e13;
  text-shadow: 0 1px 0 rgba(255, 240, 210, 0.90);
}

.ornament {
  margin: 7px auto 14px;
  width: min(330px, 60%);
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.90;
}

.ornament::before,
.ornament::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, transparent, currentColor, transparent);
}

.ornament span { font-size: 1.05rem; }

.card {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(22px, 3.5vw, 44px);
  background: var(--paper);
  border: 1px solid var(--paper-border);
  box-shadow:
    0 0 0 6px rgba(255, 242, 215, 0.18),
    0 16px 34px var(--shadow);
  line-height: 1.56;
  font-size: clamp(1.05rem, 1.32vw, 1.22rem);
  backdrop-filter: blur(1px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(105, 68, 30, 0.30);
  pointer-events: none;
}

.card > * { position: relative; }

.card p { margin: 0 0 1.05em; }
.card p:last-child { margin-bottom: 0; }

.card h2 {
  margin: 1.18em 0 0.42em;
  color: #3b230e;
  font-size: clamp(1.38rem, 2.2vw, 2.05rem);
  line-height: 1.16;
}

.card h2:first-child { margin-top: 0; }

.lead {
  text-align: center;
  font-size: 1.08em;
}

.footer {
  color: #edc778;
  text-align: center;
  margin: 20px auto 0;
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  letter-spacing: 0.05em;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.60);
}

.footer::before,
.footer::after {
  content: "— ❦ —";
  padding: 0 14px;
  opacity: 0.78;
}

.contact-box,
.notice-box {
  background: rgba(255, 249, 232, 0.52);
  border: 1px solid rgba(115, 78, 37, 0.26);
  padding: 16px 18px;
  margin: 1em 0 1.15em;
}

.contact-box p,
.notice-box p { margin-bottom: 0.55em; }

.small-note {
  color: var(--muted);
  font-size: 0.95em;
}

.image-placeholder {
  margin-top: 1.3em;
  padding: 18px;
  border: 2px dashed rgba(115, 78, 37, 0.35);
  background: rgba(255, 255, 255, 0.25);
  text-align: center;
  color: var(--muted);
}

code {
  background: rgba(255,255,255,0.45);
  padding: 0.08em 0.25em;
  border-radius: 3px;
}

@media (max-width: 760px) {
  body.page { background-attachment: scroll; }
  .site { width: min(100% - 22px, 1120px); padding: 14px 0 26px; }
  .top-nav { gap: 6px; }
  .top-nav a { font-size: 0.96rem; padding: 7px 11px; }
  .crest {
    position: static;
    width: clamp(86px, 22vw, 122px);
    margin: 0 auto 8px;
  }
  .card { padding: 22px 18px; }
  .lead { text-align: left; }
  .footer::before, .footer::after { content: ""; padding: 0; }
}

@media print {
  .top-nav { display: none; }
  body.page { background-image: none !important; background: white; }
  body.page::before { display: none; }
  .site { width: 100%; padding: 0; }
  .crest { width: 95px; }
  h1, .subtitle { text-shadow: none; }
  .card { box-shadow: none; border: 1px solid #8a6a45; background: white; }
  .footer { color: #3c230f; text-shadow: none; }
}


/* Úvodní strana – jemně výraznější sazba a rozčlenění textu */
.intro-card {
  font-size: clamp(1.08rem, 1.34vw, 1.24rem);
  line-height: 1.68;
}

.intro-card p {
  margin: 0 0 1.15em;
  text-indent: 0;
}

.intro-opening {
  text-align: center;
  font-size: 1.12em;
  line-height: 1.45;
  color: #3b230e;
  margin-bottom: 1.25em;
}

.intro-card strong {
  color: #39200b;
}

.chronicle-quote {
  margin: 0.3em 0 1.15em;
  padding: 0.85em 1.05em;
  background: rgba(255, 249, 237, 0.52);
  border-left: 4px solid rgba(122, 78, 29, 0.72);
  font-style: italic;
  color: #412611;
}

.closing-note {
  margin-top: 1.2em;
}


/* Fotogalerie */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 1.25em;
}

.gallery-item {
  margin: 0;
  background: rgba(255, 249, 232, 0.58);
  border: 1px solid rgba(115, 78, 37, 0.26);
  padding: 10px;
  box-shadow: 0 8px 18px rgba(39, 22, 8, 0.16);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  border: 1px solid rgba(78, 48, 18, 0.30);
}

.gallery-item figcaption {
  margin-top: 0.7em;
  font-size: 0.95em;
  line-height: 1.38;
  color: #3f2711;
}

.contact-main p:first-child {
  font-size: 1.18em;
  margin-bottom: 0.65em;
}

.contact-box a {
  color: #3b230e;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (max-width: 760px) {
  .gallery-item img { height: auto; }
}


/* Fotogalerie – sjednocená velikost náhledů a malý erb v rohu každé fotografie */
.gallery-thumb {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(78, 48, 18, 0.30);
  background: rgba(255,255,255,0.35);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  border: 0;
}

.gallery-mini-crest {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 44px;
  height: auto;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45));
  pointer-events: none;
}

.gallery-note {
  margin-top: 0.6em;
  font-size: 0.96em;
  color: #4a2d12;
}

@media (max-width: 760px) {
  .gallery-item img { height: auto; }
  .gallery-mini-crest { width: 38px; }
}


/* Fotogalerie – jemnější a vzdušnější úprava */
.gallery-card {
  max-width: 920px;
  margin-top: 4px;
}

.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.gallery-item {
  background: rgba(255, 249, 232, 0.46);
  padding: 8px;
}

.gallery-thumb {
  background: rgba(255,255,255,0.22);
}

.gallery-item img {
  height: 160px;
}

.gallery-mini-crest {
  top: 6px;
  left: 6px;
  width: 28px;
}

.gallery-item figcaption {
  margin-top: 0.55em;
  font-size: 0.92em;
  line-height: 1.32;
}

.gallery-note {
  margin-top: 0.35em;
}

@media (max-width: 760px) {
  .gallery-card {
    max-width: 900px;
  }
  .gallery-item img {
    height: auto;
  }
  .gallery-mini-crest {
    width: 24px;
  }
}


/* Oprava fotogalerie v17 – erb je jen malá značka, hlavní obrázek zůstává fotografií */
.gallery-thumb {
  position: relative;
  overflow: hidden;
}

.gallery-item .gallery-photo {
  display: block;
  width: 100%;
  height: 165px;
  object-fit: cover;
  border: 0;
}

.gallery-item .gallery-mini-crest {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 30px !important;
  height: auto !important;
  max-width: 30px;
  object-fit: contain;
  z-index: 3;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45));
  pointer-events: none;
}

@media (max-width: 760px) {
  .gallery-item .gallery-photo {
    height: auto;
  }
  .gallery-item .gallery-mini-crest {
    width: 26px !important;
    max-width: 26px;
  }
}

/* Kontakty – jemnější sazba a vložený portrét správce */
.contact-card {
  font-size: clamp(1.06rem, 1.28vw, 1.2rem);
  line-height: 1.66;
}

.contact-card h2 {
  margin-bottom: 0.65em;
}

.contact-intro p {
  margin-bottom: 1.05em;
}

.contact-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 1.2em;
  margin-bottom: 1.15em;
}

.contact-details {
  flex: 1 1 440px;
}

.contact-main p:first-child {
  font-size: 1.2em;
  margin-bottom: 0.75em;
}

.contact-portrait-wrap {
  flex: 0 0 180px;
  margin: 0;
  text-align: center;
}

.contact-portrait {
  display: block;
  width: 168px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 16px;
  background: rgba(255, 248, 234, 0.45);
  padding: 4px;
  box-shadow:
    0 10px 22px rgba(48, 27, 9, 0.18),
    0 0 0 1px rgba(120, 82, 39, 0.18);
  opacity: 0.96;
}

.contact-note {
  margin-top: 1.1em;
}

@media (max-width: 760px) {
  .contact-layout {
    flex-direction: column-reverse;
    align-items: center;
    text-align: left;
  }

  .contact-portrait-wrap {
    flex-basis: auto;
  }

  .contact-portrait {
    width: 140px;
  }
}

/* Kontakty – vzhled portrétu upraven podle odsouhlaseného náhledu */
.contact-card {
  font-size: clamp(1.06rem, 1.28vw, 1.2rem);
  line-height: 1.66;
}

.contact-card h2 {
  margin-bottom: 0.65em;
}

.contact-intro p {
  margin-bottom: 1.05em;
}

.contact-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 1.2em;
  margin-bottom: 1.15em;
}

.contact-details {
  flex: 1 1 480px;
  min-width: 0;
}

.contact-main {
  padding: 18px 20px;
}

.contact-main p:first-child {
  font-size: 1.2em;
  margin-bottom: 0.75em;
}

.contact-portrait-wrap {
  flex: 0 0 180px;
  width:  180px;
  margin: 0;
  text-align: center;
}

.contact-portrait {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 16px;
  background: rgba(255, 248, 234, 0.45);
  padding: 4px;
  box-shadow:
    0 10px 22px rgba(48, 27, 9, 0.18),
    0 0 0 1px rgba(120, 82, 39, 0.18);
  opacity: 0.96;
}

.contact-note {
  margin-top: 1.1em;
}

@media (max-width: 760px) {
  .contact-layout {
    flex-direction: column-reverse;
    align-items: center;
    text-align: left;
  }

  .contact-portrait-wrap {
    flex-basis: auto;
    width: auto;
  }

  .contact-portrait {
    width: 130px;
  }
}


/* Nové stránky – Pro badatele a Rodové větve */
body.badatele-bg {
  background-image:
    linear-gradient(rgba(46, 29, 12, 0.32), rgba(46, 29, 12, 0.58)),
    url("bg-kontakt.jpg");
}

body.vetve-bg {
  background-image:
    linear-gradient(rgba(46, 29, 12, 0.32), rgba(46, 29, 12, 0.58)),
    url("bg-historie.jpg");
}

.researcher-card,
.branch-card {
  line-height: 1.66;
}

.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 14px;
  margin: 1.15em 0 1.35em;
}

.branch-box {
  background: rgba(255, 249, 232, 0.48);
  border: 1px solid rgba(115, 78, 37, 0.24);
  padding: 14px 16px;
  box-shadow: 0 7px 16px rgba(39, 22, 8, 0.10);
}

.branch-box h3 {
  margin: 0 0 0.45em;
  color: #3b230e;
  font-size: 1.08em;
}

.branch-box p {
  margin-bottom: 0;
}


/* Nová stránka v32 – Pověsti a prameny */
body.povesti-bg {
  background-image:
    linear-gradient(rgba(46, 29, 12, 0.32), rgba(46, 29, 12, 0.58)),
    url("bg-historie.jpg");
}

.sources-card {
  line-height: 1.66;
}


/* Nová stránka v33 – Osobnosti rodu */
body.osobnosti-bg {
  background-image:
    linear-gradient(rgba(46, 29, 12, 0.32), rgba(46, 29, 12, 0.58)),
    url("bg-kontakt.jpg");
}

.people-card,
.person-box {
  line-height: 1.66;
}

.person-box {
  margin-top: 1.2em;
  padding: 1em 1.1em;
  background: rgba(255, 249, 232, 0.42);
  border: 1px solid rgba(115, 78, 37, 0.24);
  box-shadow: 0 7px 16px rgba(39, 22, 8, 0.10);
}


/* Kontextové odkazy mezi listy – v36 */
.related-links {
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(112, 76, 36, 0.28);
}

.related-links h2 {
  font-size: 1.18rem;
  margin-bottom: 0.55rem;
}

.related-links p {
  margin-bottom: 0;
}

.related-links a {
  font-weight: 700;
}


/* Barevné doladění textových odkazů – v37 */
.card a,
.related-links a,
.sources-card a,
.researcher-card a,
.branch-card a,
.people-card a {
  color: #6b3f1f;
  text-decoration-color: rgba(107, 63, 31, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  font-weight: 700;
}

.card a:visited,
.related-links a:visited,
.sources-card a:visited,
.researcher-card a:visited,
.branch-card a:visited,
.people-card a:visited {
  color: #5b3419;
}

.card a:hover,
.card a:focus,
.related-links a:hover,
.related-links a:focus,
.sources-card a:hover,
.sources-card a:focus,
.researcher-card a:hover,
.researcher-card a:focus,
.branch-card a:hover,
.branch-card a:focus,
.people-card a:hover,
.people-card a:focus {
  color: #3b230e;
  text-decoration-color: rgba(59, 35, 14, 0.85);
}

/* Horní menu ponechává vlastní vzhled a není touto úpravou dotčeno. */


/* Doladění pouze spodních textových odkazů – v39
   Horní menu není tímto pravidlem dotčeno. */
.related-links a,
.related-links a:link,
.related-links a:visited {
  color: #6b3f1f !important;
  text-decoration-color: rgba(107, 63, 31, 0.58) !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  font-weight: 700;
}

.related-links a:hover,
.related-links a:focus {
  color: #3b230e !important;
  text-decoration-color: rgba(59, 35, 14, 0.9) !important;
}

/* Zmenšení nadpisu v blocích „Související listy“ / „Dále v těchto rodových stránkách“. */
.related-links h2,
.related-links h3 {
  font-size: 1.36rem !important;
  line-height: 1.25;
  margin-bottom: 0.55rem;
}

.related-links {
  margin-top: 1.55rem;
  padding-top: 0.85rem;
}


/* Portrét osobnosti rodu – v40 */
.person-portrait {
  float: right;
  width: min(245px, 42%);
  margin: 0.25rem 0 1rem 1.35rem;
  text-align: center;
}

.person-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(91, 52, 25, 0.35);
  box-shadow: 0 8px 18px rgba(39, 22, 8, 0.20);
  background: rgba(255, 249, 232, 0.35);
}

.person-portrait figcaption,
.source-note {
  font-size: 0.92rem;
  color: #5b3a1a;
}

.source-note {
  clear: both;
  margin-top: 1rem;
}

@media (max-width: 720px) {
  .person-portrait {
    float: none;
    width: min(280px, 100%);
    margin: 0.6rem auto 1rem;
  }
}

/* Rozcestník na stránce Rodové větve – v46 */
.branch-toc {
  margin: 1.25rem 0 1.5rem;
  padding: 0.95rem 1.05rem;
  background: rgba(255, 249, 232, 0.46);
  border: 1px solid rgba(115, 78, 37, 0.24);
  box-shadow: 0 7px 16px rgba(39, 22, 8, 0.08);
}

.branch-toc h2 {
  margin: 0 0 0.65rem;
  font-size: 1.22rem;
  color: #3b230e;
}

.branch-toc p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem 0.52rem;
  margin: 0;
}

.branch-toc a,
.branch-toc a:link,
.branch-toc a:visited {
  display: inline-block;
  padding: 0.28rem 0.58rem;
  border: 1px solid rgba(107, 63, 31, 0.30);
  background: rgba(255, 255, 255, 0.28);
  color: #6b3f1f !important;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.25;
}

.branch-toc a:hover,
.branch-toc a:focus {
  color: #3b230e !important;
  border-color: rgba(59, 35, 14, 0.55);
  background: rgba(255, 249, 232, 0.70);
  text-decoration: underline;
}

.branch-box {
  scroll-margin-top: 1rem;
}

/* Časová osa rodu – v48 */
body.casova-bg {
  background-image:
    linear-gradient(rgba(46, 29, 12, 0.22), rgba(46, 29, 12, 0.48)),
    url("galerie-grunt-c-9.jpg");
  background-position: center top;
}

.timeline-card { line-height: 1.66; }

.timeline-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.15rem 0 1.55rem;
}

.timeline-key span {
  display: inline-block;
  padding: 0.42rem 0.7rem;
  background: rgba(255, 249, 232, 0.46);
  border: 1px solid rgba(115, 78, 37, 0.24);
  color: #4a2b13;
}

.timeline {
  margin: 1.25rem 0 1.45rem;
  border-left: 3px solid rgba(107, 63, 31, 0.32);
  padding-left: 1.05rem;
}

.timeline-item {
  position: relative;
  margin: 0 0 1rem;
  padding: 0.82rem 0.95rem;
  background: rgba(255, 249, 232, 0.46);
  border: 1px solid rgba(115, 78, 37, 0.22);
  box-shadow: 0 7px 16px rgba(39, 22, 8, 0.08);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.23rem;
  top: 1.05rem;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: #6b3f1f;
  box-shadow: 0 0 0 3px rgba(255, 249, 232, 0.85);
}

.timeline-item h3 {
  margin: 0 0 0.35rem;
  color: #3b230e;
  font-size: 1.05rem;
}

.timeline-item p { margin: 0; }

.timeline-summary {
  margin-top: 1.35rem;
  padding: 0.95rem 1.05rem;
  background: rgba(255, 249, 232, 0.42);
  border: 1px solid rgba(115, 78, 37, 0.24);
}

@media (max-width: 720px) {
  .timeline { padding-left: 0.8rem; }
  .timeline-item::before { left: -1.03rem; }
}

/* Přehlednější stránka Pro badatele – v52 */
.researcher-quick-grid,
.researcher-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 0.85rem;
  margin: 1.05rem 0 1.35rem;
}

.researcher-box,
.researcher-columns > div,
.researcher-note,
.researcher-details {
  background: rgba(255, 249, 232, 0.46);
  border: 1px solid rgba(115, 78, 37, 0.24);
  box-shadow: 0 7px 16px rgba(39, 22, 8, 0.08);
}

.researcher-box,
.researcher-columns > div,
.researcher-note {
  padding: 0.85rem 0.95rem;
}

.researcher-box h3,
.researcher-columns h3,
.researcher-note h3 {
  margin-top: 0;
  margin-bottom: 0.45rem;
  color: #3b230e;
  font-size: 1.05rem;
}

.researcher-box p,
.researcher-note p {
  margin: 0;
}

.researcher-columns ul {
  margin: 0.25rem 0 0;
  padding-left: 1.2rem;
}

.researcher-columns li {
  margin: 0.18rem 0;
}

.researcher-note {
  margin: 1rem 0 1.35rem;
}

.researcher-details {
  margin: 0.72rem 0;
  padding: 0.75rem 0.95rem;
}

.researcher-details summary {
  cursor: pointer;
  font-weight: 700;
  color: #3b230e;
}

.researcher-details p {
  margin: 0.65rem 0 0;
}

.researcher-card h2 {
  scroll-margin-top: 1rem;
}

/* Tlačítko zpět nahoru – v55 */
html {
  scroll-behavior: smooth;
}

.back-to-top {
  position: fixed;
  right: clamp(14px, 2.3vw, 28px);
  bottom: clamp(14px, 2.3vw, 28px);
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  background: rgba(58, 35, 14, 0.82);
  border: 1px solid rgba(224, 184, 112, 0.55);
  color: #f5dfaf !important;
  text-decoration: none;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(15, 8, 3, 0.32);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease, background 0.18s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus {
  background: rgba(112, 71, 31, 0.92);
  color: #fff2cf !important;
}

@media (max-width: 720px) {
  .back-to-top {
    width: 2.45rem;
    height: 2.45rem;
    font-size: 1.42rem;
  }
}



/* Právní upozornění a autorská patička – v61 */
.legal-notice {
  margin-top: 1.2rem;
}

.legal-notice h2 {
  margin-top: 0;
}

.legal-contact {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(115, 78, 37, 0.28);
}

.legal-contact p {
  margin: 0.28rem 0;
}

.footer {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  align-items: center;
  text-align: center;
}

.footer-copyright {
  max-width: 62rem;
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 0.88;
}

@media (max-width: 720px) {
  .footer-copyright {
    font-size: 0.78rem;
  }
}
