:root {
  --bg: #0a1528;
  --bg-elev: #0f2140;
  --bg-card: #0c1e3a;
  --bg-deep: #060d18;
  --header-bg: rgba(10, 21, 40, 0.93);
  --line: rgba(238, 187, 0, 0.22);
  --line-tech: rgba(120, 190, 230, 0.18);
  --text: #e6edf5;
  --muted: #8fa6c0;
  --accent: #eebb00;
  --hex-frame: rgba(132, 172, 224, 0.28);
  --hex-frame-glow: rgba(238, 187, 0, 0.08);
  --accent-dim: rgba(238, 187, 0, 0.12);
  --nature-mist: rgba(64, 190, 150, 0.14);
  --tech-glow: rgba(90, 170, 255, 0.1);
  --card-bg-from: rgba(14, 44, 82, 0.68);
  --card-bg-to: rgba(10, 25, 49, 0.92);
  --card-line: rgba(238, 187, 0, 0.22);
  --card-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
  --card-shadow-hover: 0 16px 34px rgba(0, 0, 0, 0.4);
  --card-title: var(--text);
  --card-excerpt: #9ab1ca;
  --hex-gap: 0.35rem;
  /* Pravidelný „špičatý“ šestiúhelník u clip-path v % (šířka / výška ohraničujícího boxu). */
  --hex-point-ratio: 0.8660254037844386;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

:root[data-theme="light"] {
  --bg: #f2f7ff;
  --bg-elev: #ffffff;
  --bg-card: #f8fbff;
  --bg-deep: #eaf1fb;
  --header-bg: rgba(250, 252, 255, 0.92);
  --line: rgba(38, 78, 123, 0.2);
  --line-tech: rgba(61, 117, 176, 0.2);
  --text: #10243d;
  --muted: #4f6784;
  --accent: #cf9a00;
  --hex-frame: rgba(61, 117, 176, 0.28);
  --hex-frame-glow: rgba(207, 154, 0, 0.06);
  --accent-dim: rgba(207, 154, 0, 0.12);
  --nature-mist: rgba(96, 184, 146, 0.12);
  --tech-glow: rgba(89, 154, 233, 0.1);
  --card-bg-from: rgba(229, 238, 251, 0.72);
  --card-bg-to: rgba(209, 224, 244, 0.92);
  --card-line: rgba(46, 92, 140, 0.32);
  --card-shadow: 0 8px 20px rgba(28, 52, 84, 0.14);
  --card-shadow-hover: 0 12px 24px rgba(22, 45, 76, 0.2);
  --card-title: #112844;
  --card-excerpt: #314c6b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 100% 70% at 15% -10%, rgba(40, 100, 180, 0.22), transparent 52%),
    radial-gradient(ellipse 80% 55% at 100% 40%, var(--nature-mist), transparent 50%),
    radial-gradient(ellipse 60% 45% at 0% 100%, var(--tech-glow), transparent 48%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body > main,
body > #main {
  flex: 1 0 auto;
}

body > .site-footer {
  flex-shrink: 0;
}

a {
  text-decoration: none;
}
a:hover,
a:focus-visible {
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #0a1528;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.wrap {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(100, 170, 220, 0.06);
}

/* Záhlaví: mobile-first — menu je ve výchozím stavu skryté (ne spoléhat na max-width override) */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem 1rem;
  padding: 0.65rem 0;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.header-end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0;
  flex-shrink: 0;
  order: 3;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  order: 2;
  transition:
    color 0.18s,
    border-color 0.18s,
    background 0.18s;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  color: var(--accent);
  border-color: rgba(238, 187, 0, 0.45);
  outline: none;
}

.nav-toggle__icon {
  font-size: 1.15rem;
  line-height: 1;
}

/* Font Awesome načítá vlastní display — bez !important zůstaly obě ikony vidět */
.nav-toggle .nav-toggle__icon--open {
  display: inline-block !important;
}

.nav-toggle .nav-toggle__icon--close {
  display: none !important;
}

.site-header--nav-open .nav-toggle .nav-toggle__icon--open {
  display: none !important;
}

.site-header--nav-open .nav-toggle .nav-toggle__icon--close {
  display: inline-block !important;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: 1 1 auto;
  min-width: 0;
}

.logo-hex {
  width: 30px;
  height: auto;
  aspect-ratio: var(--hex-point-ratio) / 1;
  position: relative;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 236, 170, 0.9) 0%, rgba(255, 236, 170, 0) 42%),
    linear-gradient(160deg, #ffd44d 0%, var(--accent) 45%, #b67a00 100%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  box-shadow:
    0 0 20px rgba(238, 187, 0, 0.32),
    0 8px 18px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(20, 20, 20, 0.3);
  transform: translateZ(0);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.logo-hex::after {
  content: "";
  position: absolute;
  inset: 3px;
  clip-path: inherit;
  border: 1px solid rgba(100, 180, 255, 0.18);
  opacity: 0.75;
}

.logo:hover .logo-hex,
.logo:focus-visible .logo-hex {
  transform: translateY(-1px) scale(1.04);
  filter: saturate(1.07);
  box-shadow:
    0 0 28px rgba(238, 187, 0, 0.4),
    0 10px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(20, 20, 20, 0.3);
}

#main-nav.nav {
  display: none !important;
  flex: 1 1 100%;
  order: 4;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  padding: 0.35rem 0 0.75rem;
  margin: 0;
  gap: 0;
  border-top: 1px solid var(--line);
}

.site-header--nav-open #main-nav.nav {
  display: flex !important;
}

#main-nav.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
  padding: 0.65rem 0.15rem;
  border-bottom: 1px solid var(--line-tech);
  border-left: 3px solid transparent;
}

#main-nav.nav a:last-child {
  border-bottom: none;
}

#main-nav.nav a:hover,
#main-nav.nav a:focus-visible {
  color: var(--accent);
  border-left-color: var(--accent);
  border-bottom-color: var(--line-tech);
}

body.nav-open {
  overflow: hidden;
}

@media (min-width: 901px) {
  .header-inner {
    flex-wrap: nowrap;
  }

  .logo {
    flex: 0 1 auto;
  }

  .nav-toggle {
    display: none !important;
  }

  .header-end {
    order: 0;
    margin-left: auto;
  }

  #main-nav.nav {
    display: flex !important;
    flex: 1 1 auto;
    order: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 0;
    border-top: none;
    gap: 0.35rem 1rem;
  }

  #main-nav.nav a {
    font-size: 0.95rem;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    border-left: none;
  }

  #main-nav.nav a:last-child {
    border-bottom: 2px solid transparent;
  }

  #main-nav.nav a:hover,
  #main-nav.nav a:focus-visible {
    border-color: var(--accent);
  }

  body.nav-open {
    overflow: visible;
  }
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition:
    color 0.18s,
    border-color 0.18s,
    transform 0.18s;
}
.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--accent);
  border-color: rgba(238, 187, 0, 0.45);
  transform: translateY(-1px);
  outline: none;
}
.theme-toggle__icon {
  font-size: 0.95rem;
  line-height: 1;
}

@media (max-width: 880px) {
  .theme-toggle__label {
    display: none;
  }
}

.hero {
  position: relative;
  padding: 4rem 0 3rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 50% at 90% 10%, var(--tech-glow), transparent 55%),
    radial-gradient(ellipse 55% 45% at 5% 85%, var(--nature-mist), transparent 52%),
    radial-gradient(ellipse 75% 45% at 50% -25%, rgba(238, 187, 0, 0.14), transparent 55%),
    linear-gradient(180deg, var(--bg-elev) 0%, var(--bg-deep) 100%);
  pointer-events: none;
}

.hero-pattern {
  position: absolute;
  inset: -15% -8%;
  opacity: 1;
  background-image:
    linear-gradient(rgba(120, 180, 220, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 220, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 55% 48%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 75% at 55% 48%, #000 15%, transparent 72%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 880px) {
  .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  font-weight: 700;
}

.hero h1 span {
  color: var(--accent);
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 48ch;
  margin: 0;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual-inner {
  position: relative;
  width: min(320px, 80vw);
  aspect-ratio: 1;
}

.hero-viz-deco {
  position: absolute;
  inset: 4%;
  color: rgba(238, 187, 0, 0.55);
  pointer-events: none;
  z-index: 0;
}

.hero-deco-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 12px rgba(90, 170, 255, 0.12));
}

.hero-quicknav {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.hero-qhex {
  position: absolute;
  width: 42%;
  aspect-ratio: 1 / 0.866;
  background: linear-gradient(165deg, rgba(15, 40, 72, 0.95), rgba(8, 24, 48, 0.98));
  border: 1px solid var(--line);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: grid;
  place-items: center;
  font-size: clamp(0.68rem, 2.1vw, 0.78rem);
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-align: center;
  line-height: 1.15;
  padding: 0 0.35rem;
  box-shadow:
    0 0 0 1px rgba(100, 170, 220, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    border-color 0.2s,
    color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
  animation: hero-qhex-float 7s ease-in-out infinite;
}

.hero-qhex:hover,
.hero-qhex:focus-visible {
  border-color: rgba(238, 187, 0, 0.55);
  color: #fff3a8;
  box-shadow:
    0 0 28px rgba(238, 187, 0, 0.22),
    0 0 0 1px rgba(120, 190, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  outline: none;
}

.hero-qhex:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.hero-qhex:nth-child(1) {
  top: 8%;
  left: 29%;
  animation-delay: 0s;
}
.hero-qhex:nth-child(2) {
  top: 38%;
  left: 5%;
  animation-delay: 1.2s;
}
.hero-qhex:nth-child(3) {
  top: 38%;
  right: 5%;
  animation-delay: 2.4s;
}
.hero-qhex:nth-child(4) {
  bottom: 6%;
  left: 29%;
  animation-delay: 3.6s;
}

@keyframes hero-qhex-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-qhex {
    animation: none;
  }
}

.hero-photo-frame {
  position: relative;
  margin: 0;
  padding: 0;
  width: min(320px, 78vw);
}

.hero-photo-ring {
  position: absolute;
  inset: -6px;
  background: linear-gradient(135deg, rgba(238, 187, 0, 0.45), rgba(238, 187, 0, 0.08) 50%, rgba(238, 187, 0, 0.25));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  z-index: 0;
  opacity: 0.9;
}

.hero-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 32px rgba(238, 187, 0, 0.12);
}

.section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.5rem;
}
.section-head h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 0.5rem;
  background: linear-gradient(90deg, rgba(120, 190, 230, 0.5), var(--accent));
  clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%);
}

.section[id] {
  scroll-margin-top: 5.5rem;
}

.about-projects-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

.about-projects__about,
.about-projects__projects {
  scroll-margin-top: 5.5rem;
  min-width: 0;
}

.about-projects__prose {
  max-width: none;
}

.about-projects__more {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.about-more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--card-line);
  background: linear-gradient(135deg, var(--accent-dim) 0%, transparent 100%);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.about-more-link:hover,
.about-more-link:focus-visible {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-dim) 0%, var(--accent-dim) 100%);
  box-shadow: 0 6px 18px -10px var(--accent);
}

.about-more-link__arrow {
  transition: transform 0.18s ease;
}

.about-more-link:hover .about-more-link__arrow,
.about-more-link:focus-visible .about-more-link__arrow {
  transform: translateX(3px);
}

@media (min-width: 960px) {
  .about-projects-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.85fr);
    gap: 2rem 3rem;
  }

  .about-projects__projects .section-head {
    margin-bottom: 1.25rem;
  }

  .hex-grid--sidebar {
    grid-template-columns: 1fr;
  }
}

.muted {
  color: var(--muted);
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.8rem 0 1rem;
}

.social-links__title {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.social-links__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.social-link {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  color: var(--muted);
  text-decoration: none;
  transition:
    color 0.15s,
    border-color 0.15s,
    transform 0.15s;
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--accent);
  border-color: rgba(238, 187, 0, 0.5);
  transform: translateY(-1px);
  outline: none;
}

:root[data-theme="light"] .card-hex .btn {
  border-color: rgba(194, 144, 0, 0.5);
  color: #8b6200;
  background: linear-gradient(165deg, rgba(255, 216, 112, 0.25), rgba(255, 216, 112, 0.1));
}

:root[data-theme="light"] .card-hex .btn:hover,
:root[data-theme="light"] .card-hex .btn:focus-visible {
  color: #122744;
  background: linear-gradient(165deg, #ffd667, #e9b300);
  border-color: #d8a100;
}

:root[data-theme="light"] .social-link {
  color: #355a84;
  border-color: rgba(48, 92, 140, 0.3);
  background: rgba(255, 255, 255, 0.86);
}

.social-links--hero {
  margin-top: 1rem;
}

.social-links--section {
  margin-top: -0.3rem;
  margin-bottom: 1rem;
}

.social-links--project {
  margin: 0;
}

.social-links--article-share {
  margin-top: 1rem;
  margin-bottom: 0;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.social-links--article-share .social-link {
  width: 38px;
  height: 38px;
}

.prose {
  max-width: 70ch;
}
.prose p {
  margin: 0 0 1rem;
}
.prose a {
  color: var(--accent);
}

.hex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card-hex {
  background:
    linear-gradient(160deg, var(--card-bg-from), var(--card-bg-to)),
    radial-gradient(100% 120% at 100% 0%, rgba(119, 173, 236, 0.13), transparent 62%);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.35rem;
  position: relative;
  overflow: hidden;
  box-shadow:
    var(--card-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}
.card-hex::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 104px;
  background: var(--accent-dim);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  opacity: 0.9;
}

.card-hex h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  position: relative;
}

.card-hex h3 a {
  color: inherit;
  text-decoration: none;
}

.card-hex h3 a:hover,
.card-hex h3 a:focus-visible {
  color: var(--accent);
}
.card-hex p {
  margin: 0 0 1rem;
  color: var(--card-excerpt);
  font-size: 0.95rem;
  position: relative;
}

.card-hex__summary {
  margin: 0 0 1rem;
  color: var(--card-excerpt);
  font-size: 0.95rem;
  position: relative;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rich-text p {
  margin: 0 0 0.4em;
}

.rich-text p:last-child {
  margin-bottom: 0;
}

.rich-text a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s, color 0.18s;
}

.rich-text a:hover,
.rich-text a:focus-visible {
  color: var(--accent-hover, var(--accent));
  border-bottom-color: currentColor;
}

.card-hex .thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
  aspect-ratio: 16 / 10;
  background: var(--bg-elev);
}
.card-hex .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-hex__footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: relative;
}

.card-hex__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (min-width: 960px) {
  .card-hex__actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .card-hex__actions .btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    font-size: 0.85rem;
    padding: 0.4rem 0.65rem;
  }
}

.contact-aside {
  display: grid;
  gap: 1rem;
  align-self: start;
}

.card-hex--cooperation {
  align-self: start;
}

.card-hex--cooperation::before,
.card-hex--contact-details::before {
  display: none;
}

.card-hex--cooperation p {
  color: var(--card-excerpt);
  margin-bottom: 0;
}

.card-hex--contact-details {
  align-self: start;
}

.card-hex--contact-details h3 {
  margin-bottom: 0.85rem;
}

.contact-details {
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.contact-details__row {
  display: grid;
  gap: 0.15rem;
}

.contact-details__row dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--card-excerpt);
  opacity: 0.85;
}

.contact-details__row dd {
  margin: 0;
  color: var(--card-title);
  font-size: 1rem;
  font-weight: 600;
  word-break: break-word;
}

.contact-details__row a {
  color: var(--accent);
  text-decoration: none;
}

.contact-details__row a:hover,
.contact-details__row a:focus-visible {
  text-decoration: underline;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  position: relative;
  transition: background 0.15s, color 0.15s;
}
.btn:hover,
.btn:focus-visible {
  background: var(--accent);
  color: #0a1528;
}

.video-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}
.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.yt-thumb-link {
  display: block;
  position: relative;
  overflow: hidden;
}
.yt-thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.yt-thumb-link::after {
  content: "▶ Přehrát na YouTube";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
}
.yt-thumb-link:hover::after,
.yt-thumb-link:focus-visible::after {
  opacity: 1;
}

.article-card__media .article-card__video-wrap {
  position: absolute;
  inset: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  aspect-ratio: unset;
}

.article-card__media .article-card__yt-link {
  position: absolute;
  inset: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.article-card__media--video {
  height: clamp(170px, 19vw, 220px);
  aspect-ratio: auto;
}

.photo-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.95rem;
}

.photo-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(160deg, var(--card-bg-from), var(--card-bg-to)),
    radial-gradient(100% 120% at 100% 0%, rgba(119, 173, 236, 0.13), transparent 62%);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    var(--card-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}

.photo-item:hover {
  border-color: rgba(238, 187, 0, 0.35);
  box-shadow:
    var(--card-shadow-hover),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: none;
}

/* Mřížka karet: Science Reveal (RSS) i sekce Články — stejná šířka sloupce (~280px) */
.rss-cards,
.article-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
  margin: 0;
  padding: 0;
}

.rss-cards {
  list-style: none;
}

.rss-card,
.article-card {
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(160deg, var(--card-bg-from), var(--card-bg-to)),
    radial-gradient(100% 120% at 100% 0%, rgba(119, 173, 236, 0.13), transparent 62%);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    var(--card-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}

.rss-card {
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.article-card {
  color: inherit;
  height: 100%;
}

.rss-card:hover,
.rss-card:focus-visible,
.article-card:hover {
  border-color: rgba(238, 187, 0, 0.35);
  box-shadow:
    var(--card-shadow-hover),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.rss-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.rss-card__media,
.article-card__media {
  position: relative;
  height: clamp(170px, 19vw, 220px);
  aspect-ratio: auto;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
}

.rss-card__thumb,
.article-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rss-card__placeholder,
.article-card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0a1528, #0f2140);
}

.rss-card__placeholder--hidden,
.article-card__placeholder--hidden {
  display: none;
}

.rss-card__media--fallback .rss-card__placeholder,
.article-card__media--fallback .article-card__placeholder {
  display: grid;
}

.rss-card__body,
.article-card__body {
  padding: 0.9rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.rss-card__date,
.article-card__date {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-card__author,
.article-detail__author {
  margin: 0;
  color: var(--muted);
}

.article-card__author {
  font-size: 0.84rem;
}

.article-detail__author {
  margin-bottom: 0.75rem;
  font-size: 0.96rem;
}

.article-card__author a,
.article-detail__author a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.article-card__author a:hover,
.article-card__author a:focus-visible,
.article-detail__author a:hover,
.article-detail__author a:focus-visible {
  color: var(--accent-hover, var(--accent));
  text-decoration: underline;
}

.rss-card__title,
.article-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--card-title);
}

.rss-card:hover .rss-card__title,
.rss-card:focus-visible .rss-card__title,
.article-card:hover .article-card__title {
  color: var(--accent);
}

.rss-card__excerpt,
.article-card__excerpt {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--card-excerpt);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__body .btn {
  margin-top: auto;
  align-self: stretch;
  justify-content: center;
  text-align: center;
  border-color: rgba(238, 187, 0, 0.52);
  color: #f7c81a;
  background:
    linear-gradient(160deg, rgba(238, 187, 0, 0.16), rgba(238, 187, 0, 0.05)),
    rgba(10, 27, 51, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 194, 0.22),
    0 6px 14px rgba(0, 0, 0, 0.22);
  padding: 0.5rem 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.article-card__body .btn:hover,
.article-card__body .btn:focus-visible {
  color: #0a1528;
  background: linear-gradient(160deg, #ffd14b, #e5ac00);
  border-color: #ffd14b;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 225, 122, 0.25);
}

.article-card--clickable {
  cursor: pointer;
}

.article-card__detail-btn {
  position: relative;
  z-index: 2;
}

.contact-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}
.form input,
.form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
}
.form textarea {
  min-height: 140px;
  resize: vertical;
}
.form .row {
  margin-bottom: 1rem;
}
.form .hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.form button {
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #0a1528;
  font-weight: 700;
  cursor: pointer;
}
.form button:hover,
.form button:focus-visible {
  filter: brightness(1.05);
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
}
.alert.ok {
  border-color: rgba(80, 200, 120, 0.5);
  background: rgba(80, 200, 120, 0.08);
}
.alert.err {
  border-color: rgba(255, 100, 100, 0.45);
  background: rgba(255, 100, 100, 0.08);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  margin-top: 2rem;
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-deep));
  box-shadow: inset 0 1px 0 rgba(120, 190, 255, 0.05);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.footer-copyright {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.footer-copyright p {
  margin: 0;
}

.footer-hex {
  height: 56px;
  width: auto;
  aspect-ratio: var(--hex-point-ratio) / 1;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(238, 187, 0, 0.35), transparent);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.section--page {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

.section-head__more {
  display: inline-block;
  margin-left: 0.35rem;
  white-space: nowrap;
  font-size: 0.92rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.section-head__more:hover,
.section-head__more:focus-visible {
  border-color: var(--accent);
}

.section--page .section-head h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
}
.breadcrumb__sep {
  margin: 0 0.35rem;
  opacity: 0.6;
}

.archive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
}
.archive-filters__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition:
    border-color 0.15s,
    color 0.15s,
    background 0.15s;
}
.archive-filters__chip:hover,
.archive-filters__chip:focus-visible {
  color: var(--accent);
  border-color: rgba(238, 187, 0, 0.45);
}
.archive-filters__chip.is-active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(238, 187, 0, 0.5);
}

.archive-search {
  display: flex;
  gap: 0.55rem;
  margin: 0 0 1.2rem;
}
.archive-search input {
  flex: 1;
  min-width: 180px;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
}
.archive-search button {
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

.archive-pagination {
  margin-top: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--muted);
}
.archive-pagination a {
  color: var(--accent);
  text-decoration: none;
}
.archive-pagination .is-disabled {
  opacity: 0.45;
}

.archive-live-region {
  transition: opacity 0.16s ease;
}

.archive-live-region.is-loading {
  opacity: 0.65;
}

.article-detail {
  background:
    linear-gradient(160deg, var(--card-bg-from), var(--card-bg-to)),
    radial-gradient(100% 120% at 100% 0%, rgba(119, 173, 236, 0.13), transparent 62%);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  padding: 1rem;
}

.article-detail__head h1 {
  margin: 0.25rem 0 0.65rem;
  line-height: 1.2;
}

.article-detail__date {
  font-size: 0.82rem;
  color: var(--muted);
}

.article-detail__excerpt {
  margin: 0;
  color: var(--muted);
}

.article-detail__media {
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-deep);
}

.article-detail__media .article-card__thumb {
  max-height: 520px;
}

.article-detail__body {
  max-width: 100%;
}

.article-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
  align-items: center;
}

.article-detail__actions .btn {
  padding: 0.68rem 1.3rem;
  font-size: 0.98rem;
  font-weight: 700;
  border-width: 2px;
  letter-spacing: 0.01em;
}

.article-detail__actions .btn:last-child {
  background: linear-gradient(160deg, #ffd24f, #e6ad00);
  color: #0a1528;
  border-color: #ffd24f;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 226, 128, 0.2);
}

.article-detail__actions .btn:last-child:hover,
.article-detail__actions .btn:last-child:focus-visible {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.article-detail__source-btn {
  margin-left: auto;
}

.article-card__category {
  margin: 0;
}
.article-card__category a {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.article-card__category a:hover,
.article-card__category a:focus-visible {
  color: var(--accent-hover, var(--accent));
  filter: brightness(1.1);
}

.gallery-subtitle {
  margin: 1.75rem 0 0.85rem;
  font-size: 1rem;
  color: var(--text);
  font-weight: 600;
}
.gallery-hero-card {
  margin-top: 0.15rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 85% 20%, rgba(238, 187, 0, 0.12), transparent 42%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    var(--card);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.gallery-hero-card__lead {
  margin: 0;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.5;
}
.gallery-hero-card__stats {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.gallery-stat-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.36rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.78rem;
}
.gallery-stat-chip strong {
  color: var(--text);
  font-size: 0.93rem;
}
.gallery-subtitle:first-of-type {
  margin-top: 0.5rem;
}

.gallery-folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}

.gallery-folder-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-card);
  text-decoration: none;
  color: var(--text);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.gallery-folder-card:hover,
.gallery-folder-card:focus-visible {
  border-color: rgba(238, 187, 0, 0.35);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
  outline: none;
}

.gallery-folder-card__icon {
  width: 2.25rem;
  height: 1.65rem;
  flex-shrink: 0;
  border-radius: 6px;
  background: linear-gradient(165deg, rgba(238, 187, 0, 0.28), rgba(15, 42, 78, 0.5));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
}
.gallery-folder-card__icon::after {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0.24rem;
  width: 0.78rem;
  height: 0.3rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.28);
}

.gallery-folder-card__name {
  font-weight: 600;
  font-size: 0.95rem;
}

.photo-mosaic--gallery {
  margin-top: 0.25rem;
}

.photo-item__meta {
  padding: 0.62rem 0.8rem 0.82rem;
  min-height: 5.15rem;
}

.photo-item__title {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--card-title);
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.photo-item__excerpt {
  margin: 0.34rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--card-excerpt);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-lightbox-hint {
  margin: -0.25rem 0 1rem;
  font-size: 0.9rem;
}
.gallery-empty-card {
  margin-top: 0.5rem;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.gallery-empty-card__title {
  margin: 0 0 0.28rem;
  font-weight: 600;
  color: var(--text);
}

.photo-item--lightbox {
  overflow: hidden;
}

.photo-item--lightbox > a {
  display: block;
  width: 100%;
  height: 210px;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
  outline: none;
}

.photo-item--lightbox > a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .gallery-hero-card {
    padding: 0.88rem 0.8rem;
  }

  .gallery-hero-card__lead {
    font-size: 0.88rem;
  }

  .gallery-stat-chip {
    font-size: 0.74rem;
  }

  .photo-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .photo-item__meta {
    padding: 0.52rem 0.65rem 0.68rem;
    min-height: 4.7rem;
  }

  .photo-item__title {
    font-size: 0.86rem;
  }

  .photo-item--lightbox > a {
    height: 176px;
  }
}

/* Skrytý HTML pro GLightbox (popisek pod fotkou) */
.pd-glb-html {
  display: none;
}

.pd-glb-html__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}

.pd-glb-html__caption {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 0.95;
}

/* GLightbox — panel popisu (knihovna často nastaví světlé pozadí; držíme kontrast) */
.glightbox-clean .gslide-description {
  background: #1c2130 !important;
  color: #eceef3 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.glightbox-clean .gslide-description .pd-glb-html__title {
  color: #fff !important;
  font-weight: 700;
}

.glightbox-clean .gslide-description .pd-glb-html__caption {
  color: #d2d6e0 !important;
  opacity: 1 !important;
}

.glightbox-clean .gslide-description a {
  color: #eebb00;
}

.glightbox-clean .gclose,
.glightbox-clean .gnext,
.glightbox-clean .gprev {
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.glightbox-clean .gclose path,
.glightbox-clean .gnext path,
.glightbox-clean .gprev path {
  fill: #fff;
}

:root[data-theme="light"] .glightbox-clean .gclose,
:root[data-theme="light"] .glightbox-clean .gnext,
:root[data-theme="light"] .glightbox-clean .gprev {
  border-color: rgba(0, 0, 0, 0.15);
  color: #111;
}

:root[data-theme="light"] .glightbox-clean .gclose path,
:root[data-theme="light"] .glightbox-clean .gnext path,
:root[data-theme="light"] .glightbox-clean .gprev path {
  fill: #111;
}

/* GLightbox — mobil: popis pod fotkou (knihovna jinak překrývá spodní část snímku) */
@media (max-width: 768px) {
  .glightbox-mobile .glightbox-container .ginner-container.desc-bottom {
    justify-content: flex-start !important;
    height: auto !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    min-height: 0;
  }

  .glightbox-mobile .glightbox-container .gslide-inner-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    width: 100%;
    max-height: 100vh;
    max-height: 100dvh;
  }

  .glightbox-mobile .glightbox-container .gslide-media {
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(58vh, calc(100dvh - 11rem));
    margin: 0 auto;
  }

  .glightbox-mobile .glightbox-container .gslide-image img {
    max-height: 100% !important;
    width: auto !important;
    max-width: 100vw !important;
    object-fit: contain !important;
  }

  .glightbox-mobile .glightbox-container .gslide-description.description-bottom {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: none !important;
    max-height: min(42vh, 16rem) !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0.75rem 0.9rem calc(0.85rem + env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    background: #1c2130 !important;
    background-image: none !important;
    order: 2;
    box-sizing: border-box;
  }
}

/* Skrytí popisu v lightboxu (tlačítkem i) */
body.glightbox-open.pd-glb-desc-hidden .glightbox-container .gslide-description {
  display: none !important;
}

/* Ve fullscreenu zobrazujeme popis jako průsvitný overlay přes spodní část fotky. */
body.glightbox-open.pd-glb-is-fullscreen .glightbox-container .ginner-container.desc-bottom {
  position: relative;
}

body.glightbox-open.pd-glb-is-fullscreen .glightbox-container .gslide-media {
  margin: 0 auto;
}

body.glightbox-open.pd-glb-is-fullscreen .glightbox-container .gslide-description.description-bottom {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  max-height: min(34vh, 18rem) !important;
  padding: 0.85rem 1rem calc(0.9rem + env(safe-area-inset-bottom, 0px)) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  border-top: none !important;
  background: linear-gradient(
    to top,
    rgba(10, 12, 18, 0.86) 0%,
    rgba(10, 12, 18, 0.64) 56%,
    rgba(10, 12, 18, 0.22) 100%
  ) !important;
  backdrop-filter: blur(2px);
}

body.glightbox-open.pd-glb-is-fullscreen .glightbox-clean .gslide-description .pd-glb-html__title {
  color: #fff !important;
}

body.glightbox-open.pd-glb-is-fullscreen .glightbox-clean .gslide-description .pd-glb-html__caption {
  color: rgba(240, 243, 249, 0.94) !important;
}

/* Nástroje u zavíracího tlačítka GLightbox */
.pd-glb-toolbar {
  position: fixed;
  z-index: 10000001;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: calc(48px + env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: row;
  gap: 6px;
  pointer-events: none;
}

@media (max-width: 768px) {
  .pd-glb-toolbar {
    /* Na mobilu necháme tlačítka vedle sebe pod křížkem */
    top: calc(54px + env(safe-area-inset-top, 0px));
    right: calc(8px + env(safe-area-inset-right, 0px));
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 5px;
  }

  .pd-glb-toolbar__btn {
    min-width: 36px;
    height: 36px;
    padding: 0 0.45rem;
    border-radius: 7px;
  }

  .pd-glb-toolbar__ico {
    width: 18px;
    height: 18px;
  }

  .pd-glb-toolbar__txt {
    font-size: 0.67rem;
  }
}

.pd-glb-toolbar__btn {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 40px;
  height: 40px;
  padding: 0 0.58rem;
  margin: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pd-glb-toolbar__btn:hover,
.pd-glb-toolbar__btn:focus-visible {
  background: rgba(0, 0, 0, 0.78);
  border-color: rgba(238, 187, 0, 0.55);
  outline: none;
}

.pd-glb-toolbar__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pd-glb-toolbar__ico {
  display: block;
  flex-shrink: 0;
}

.pd-glb-toolbar__txt {
  margin-left: 0.33rem;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1;
}

:root[data-theme="light"] .pd-glb-toolbar__btn {
  border-color: rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.92);
  color: #111;
}

:root[data-theme="light"] .pd-glb-toolbar__btn:hover,
:root[data-theme="light"] .pd-glb-toolbar__btn:focus-visible {
  background: #fff;
  border-color: rgba(42, 86, 131, 0.45);
}

.pd-glb-toast {
  position: fixed;
  z-index: 10000002;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translate3d(-50%, 10px, 0);
  max-width: min(92vw, 22rem);
  margin: 0;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: center;
  color: #f2f4f8;
  background: rgba(28, 33, 48, 0.96);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.pd-glb-toast--visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

:root[data-theme="light"] .pd-glb-toast {
  color: #1a2230;
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(42, 86, 131, 0.18);
  box-shadow: 0 10px 28px rgba(42, 86, 131, 0.15);
}

/* ======================================================================
   Veřejná sekce „Učitel" — odevzdávárna a galerie odevzdaných prací
   (ponechává původní hlavičku a patičku webu, mění jen střed stránky)
   ====================================================================== */

.teacher-public-wrap {
  max-width: 56rem;
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
  color: var(--text);
}

.teacher-public-head {
  margin-bottom: 1.5rem;
}

.teacher-public-kicker {
  display: inline-block;
  margin: 0 0 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.teacher-public-title {
  margin: 0.2rem 0 0.3rem;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  line-height: 1.2;
  color: var(--text);
}

.teacher-public-brief,
.teacher-public-card,
.teacher-public-form {
  background: linear-gradient(180deg, var(--card-bg-from), var(--card-bg-to));
  border: 1px solid var(--card-line);
  box-shadow: var(--card-shadow);
  color: var(--text);
}

.teacher-public-brief {
  margin: 0 0 1.3rem;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  line-height: 1.6;
}

.teacher-public-brief h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.teacher-public-card {
  margin: 0 0 1.2rem;
  padding: 1.4rem 1.4rem;
  border-radius: 16px;
}

.teacher-public-card--success {
  border-color: rgba(123, 219, 157, 0.4);
  background: rgba(123, 219, 157, 0.1);
  text-align: center;
}

.teacher-public-card--success h1 {
  margin: 0.2rem 0 0.5rem;
  color: var(--text);
}

.teacher-public-card--error {
  border-color: rgba(213, 80, 80, 0.45);
  background: rgba(213, 80, 80, 0.08);
  text-align: center;
}

:root[data-theme="light"] .teacher-public-card--success {
  background: rgba(72, 170, 110, 0.12);
  border-color: rgba(72, 170, 110, 0.35);
}

:root[data-theme="light"] .teacher-public-card--error {
  background: rgba(180, 60, 60, 0.08);
  border-color: rgba(180, 60, 60, 0.3);
}

.teacher-public-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(123, 219, 157, 0.25);
  color: #5fc47f;
  font-size: 1.6rem;
  border-radius: 50%;
  font-weight: 700;
}

:root[data-theme="light"] .teacher-public-card__icon {
  background: rgba(72, 170, 110, 0.2);
  color: #2f8a54;
}

.teacher-public-alert {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(213, 80, 80, 0.4);
  background: rgba(213, 80, 80, 0.1);
  color: var(--text);
  font-size: 0.94rem;
}

:root[data-theme="light"] .teacher-public-alert {
  background: rgba(180, 60, 60, 0.08);
  border-color: rgba(180, 60, 60, 0.3);
}

.teacher-public-alert ul {
  margin: 0.3rem 0 0 1.1rem;
  padding: 0;
}

.teacher-public-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.4rem 1.4rem 1.5rem;
  border-radius: 16px;
}

.teacher-public-form__hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.teacher-public-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.teacher-public-row label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}

.teacher-public-row .req {
  color: #e26b6b;
}

:root[data-theme="light"] .teacher-public-row .req {
  color: #b84545;
}

.teacher-public-row input[type="text"],
.teacher-public-row input[type="url"],
.teacher-public-row input[type="date"],
.teacher-public-row textarea,
.teacher-public-row select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--card-line);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.teacher-public-row input[type="text"]::placeholder,
.teacher-public-row input[type="url"]::placeholder,
.teacher-public-row textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.teacher-public-row textarea {
  resize: vertical;
  min-height: 7rem;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.92rem;
}

.teacher-public-row input[type="file"] {
  padding: 0.5rem 0.6rem;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px dashed var(--card-line);
  border-radius: 10px;
}

.teacher-public-row input:focus,
.teacher-public-row textarea:focus,
.teacher-public-row select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.teacher-public-row .muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.teacher-public-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.teacher-public-actions .btn {
  min-width: 9rem;
}

.teacher-public-actions .btn.primary,
.teacher-gallery__body .btn.primary {
  background: var(--accent);
  color: #0a1528;
  border-color: var(--accent);
  font-weight: 700;
}

.teacher-public-actions .btn.primary:hover,
.teacher-public-actions .btn.primary:focus-visible,
.teacher-gallery__body .btn.primary:hover,
.teacher-gallery__body .btn.primary:focus-visible {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

:root[data-theme="light"] .teacher-public-actions .btn.primary,
:root[data-theme="light"] .teacher-gallery__body .btn.primary {
  color: #fff;
}

:root[data-theme="light"] .teacher-public-actions .btn.primary:hover,
:root[data-theme="light"] .teacher-public-actions .btn.primary:focus-visible,
:root[data-theme="light"] .teacher-gallery__body .btn.primary:hover,
:root[data-theme="light"] .teacher-gallery__body .btn.primary:focus-visible {
  color: var(--accent);
}

/* --- Galerie odevzdaných výstupů --- */

.teacher-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.teacher-gallery__card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--card-line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--card-bg-from), var(--card-bg-to));
  color: var(--text);
  box-shadow: var(--card-shadow);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.teacher-gallery__card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--card-shadow-hover);
}

.teacher-gallery__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.teacher-gallery__student {
  font-weight: 700;
  color: var(--text);
}

.teacher-gallery__type {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.teacher-gallery__type--code { color: #c9a3ff; background: rgba(201, 163, 255, 0.18); }
.teacher-gallery__type--file { color: #f1c86a; background: rgba(241, 200, 106, 0.18); }
.teacher-gallery__type--link { color: #8fe0d2; background: rgba(143, 224, 210, 0.18); }
.teacher-gallery__type--text { color: #f1a7c7; background: rgba(241, 167, 199, 0.18); }

:root[data-theme="light"] .teacher-gallery__type {
  background: rgba(42, 86, 131, 0.1);
  color: var(--muted);
}

:root[data-theme="light"] .teacher-gallery__type--code { color: #6b3fb0; background: rgba(107, 63, 176, 0.14); }
:root[data-theme="light"] .teacher-gallery__type--file { color: #a6730c; background: rgba(166, 115, 12, 0.14); }
:root[data-theme="light"] .teacher-gallery__type--link { color: #1f7a6a; background: rgba(31, 122, 106, 0.14); }
:root[data-theme="light"] .teacher-gallery__type--text { color: #a34877; background: rgba(163, 72, 119, 0.14); }

.teacher-gallery__title {
  margin: 0;
  font-size: 1.02rem;
  color: var(--text);
}

.teacher-gallery__body {
  color: var(--text);
}

.teacher-gallery__body .btn {
  font-size: 0.9rem;
}

.teacher-gallery__code {
  margin-top: 0.3rem;
}

.teacher-gallery__code summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
}

.teacher-gallery__code pre {
  margin: 0.4rem 0 0;
  padding: 0.75rem 0.9rem;
  background: #0b0f18;
  color: #e8ecf1;
  border-radius: 8px;
  overflow: auto;
  max-height: 360px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
}

:root[data-theme="light"] .teacher-gallery__code pre {
  background: #122035;
  color: #e6edf5;
}

.teacher-gallery__text {
  padding: 0.7rem 0.85rem;
  background: var(--bg-elev);
  border-radius: 10px;
  border: 1px solid var(--card-line);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.teacher-gallery__foot {
  margin-top: auto;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ======================================================================
   Veřejná stránka materiálu — material.php (sdílecí URL /m/TOKEN/)
   ====================================================================== */

.material-page {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.material-page__head {
  margin-bottom: 0.4rem;
}

.material-page__desc {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 60ch;
}

.material-page__body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Soubor — PDF, obrázek, audio/video */
.material-pdf {
  width: 100%;
  height: clamp(420px, 78vh, 1200px);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  background: var(--bg-elev);
}

.material-image {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--card-line);
  background: var(--bg-elev);
}

.material-image img {
  display: block;
  width: 100%;
  height: auto;
}

.material-video,
.material-audio {
  width: 100%;
  border-radius: 14px;
  background: #000;
}

.material-audio {
  background: var(--bg-elev);
  padding: 0.6rem;
}

.material-fallback {
  padding: 1rem 1.2rem;
  border: 1px dashed var(--card-line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--bg-elev);
}

.material-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
}

/* Kód — sandboxovaný runner */
.material-runner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.material-runner__frame {
  width: 100%;
  height: clamp(420px, 75vh, 1100px);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  background: #fff;
  display: block;
}

.material-runner__hint {
  font-size: 0.85rem;
}

/* Full-bleed runner — vystoupí z .wrap a využije celou šíři <main>u. */
.material-runner--full {
  width: 100%;
  margin: 1rem 0 2rem;
  padding: 0;
}

.material-runner--full .material-runner__frame {
  width: 100%;
  height: clamp(520px, 85vh, 1400px);
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.material-source {
  border: 1px solid var(--card-line);
  border-radius: 12px;
  background: var(--bg-elev);
  padding: 0.55rem 0.85rem;
}

.material-source > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  padding: 0.25rem 0;
}

.material-source > summary::-webkit-details-marker {
  display: none;
}

.material-source > summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 0.4rem;
  transition: transform 0.15s;
  color: var(--accent);
}

.material-source[open] > summary::before {
  transform: rotate(90deg);
}

.material-code {
  margin: 0.6rem 0 0.2rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card, #0f1623);
  border-radius: 10px;
  border: 1px solid var(--card-line);
  color: var(--text);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  overflow: auto;
  max-height: 60vh;
}

:root[data-theme="light"] .material-code {
  background: #0f1623;
  color: #e8eef9;
}

/* Odkaz */
.material-link-target {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  word-break: break-all;
}

/* Text */
.material-text {
  padding: 1rem 1.2rem;
  background: var(--bg-elev);
  border: 1px solid var(--card-line);
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 70ch;
  white-space: pre-wrap;
}

@media (max-width: 700px) {
  .material-pdf {
    height: clamp(360px, 70vh, 800px);
  }
  .material-runner__frame {
    height: clamp(360px, 70vh, 800px);
  }
}

/* =======================================================================
   Veřejná stránka /o-mne/ — životopis (rozklikávací akordeon)
   ======================================================================= */

.about-page {
  padding: 2.5rem 0 3.5rem;
}

.about-page__head {
  margin-bottom: 1.75rem;
}

.about-page__kicker {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.about-page__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.about-page__intro {
  margin: 0 0 1rem;
  color: var(--text);
}

.about-page__intro p:first-child {
  margin-top: 0;
}

.about-page__hint {
  margin: 0;
}

.about-page__empty {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px dashed var(--card-line);
  border-radius: 14px;
  color: var(--muted);
}

.about-page__toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 1.25rem 0 0.75rem;
}

/* Akordeon */
.about-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.about-accordion__item {
  border: 1px solid var(--card-line);
  border-radius: 14px;
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.about-accordion__item[open] {
  border-color: var(--accent);
  box-shadow: 0 10px 30px -22px var(--accent);
}

.about-accordion__summary {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.15rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-weight: 600;
  color: var(--text);
}

.about-accordion__summary::-webkit-details-marker {
  display: none;
}

.about-accordion__summary:hover {
  background: var(--bg-elev);
}

.about-accordion__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 1.05rem;
}

.about-accordion__icon i {
  color: var(--accent);
}

.about-accordion__heading {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.about-accordion__title {
  font-size: 1.05rem;
  line-height: 1.3;
}

.about-accordion__sub {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.4;
}

.about-accordion__chevron {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
  transition: transform 0.18s ease;
}

.about-accordion__item[open] .about-accordion__chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.about-accordion__body {
  padding: 0.25rem 1.15rem 1.15rem 1.15rem;
  border-top: 1px solid var(--card-line);
  background: var(--bg-elev);
  line-height: 1.65;
}

.about-accordion__body > *:first-child {
  margin-top: 0.85rem;
}

.about-accordion__body > *:last-child {
  margin-bottom: 0;
}

.about-accordion__count {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.05rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim, rgba(255, 193, 7, 0.18));
  border-radius: 999px;
  vertical-align: middle;
  letter-spacing: 0.01em;
}

.about-accordion__intro {
  margin-bottom: 0.85rem;
}

.about-accordion__intro + .about-timeline {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px dashed var(--card-line);
}

.about-timeline {
  list-style: none;
  margin: 0.6rem 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.about-timeline__item {
  position: relative;
  padding: 0.95rem 1.1rem 1rem 1.5rem;
  border: 1px solid var(--card-line);
  background: var(--bg-card);
  border-radius: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.about-timeline__item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -22px var(--accent);
}

.about-timeline__item::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 1.3rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

.about-timeline__period {
  display: inline-block;
  margin: 0 0 0.45rem;
  padding: 0.15rem 0.6rem;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-dim, rgba(255, 193, 7, 0.18));
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
}

.about-timeline__title {
  margin: 0 0 0.15rem 0;
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 700;
}

.about-timeline__title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.about-timeline__title a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.about-timeline__subtitle {
  margin: 0 0 0.4rem 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.about-timeline__body {
  margin-top: 0.45rem;
  font-size: 0.96rem;
  line-height: 1.55;
}

/* V /o-mne/ nechceme globální limit 70ch z .prose */
.about-accordion__intro.prose,
.about-timeline__body.prose {
  max-width: none;
}

.about-timeline__body > *:first-child {
  margin-top: 0;
}

.about-timeline__body > *:last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .about-timeline__item {
    padding: 0.85rem 0.9rem 0.9rem 1.3rem;
  }
  .about-timeline__title {
    font-size: 1rem;
  }
}

@media (max-width: 600px) {
  .about-accordion__summary {
    padding: 0.85rem 0.95rem;
    gap: 0.65rem;
  }
  .about-accordion__icon {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }
  .about-accordion__title {
    font-size: 1rem;
  }
  .about-accordion__body {
    padding: 0.25rem 0.95rem 1rem;
  }
}

/* =======================================================================
   Digitální herbář — veřejné rozhraní pro žáky (/herbar/…)
   ======================================================================= */

.herbar-shell {
  padding: 2rem 0 3.5rem;
}

.herbar-msg {
  padding: 1.35rem;
  border-radius: 14px;
  border: 1px solid var(--card-line);
  background: var(--bg-card);
}

.herbar-shell--narrow .herbar-msg {
  max-width: 36rem;
  margin: 2rem auto;
}

.herbar-msg--err.herbar-card {
  border-color: rgba(239, 68, 68, 0.5);
}

.herbar-top__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.herbar-kicker {
  display: inline-block;
  margin: 0 0 0.4rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--accent-dim);
  color: var(--accent);
}

.herbar-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.45rem, 3.5vw, 2rem);
}

.herbar-muted--small {
  font-size: 0.85rem;
  margin: 0.25rem 0 0;
}

.herbar-share-box {
  margin-top: 1.35rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--card-line);
  border-radius: 12px;
  background: var(--bg-card);
}

.herbar-share-box summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.herbar-share-url {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
  align-items: center;
}

.herbar-input--mono {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
}

.herbar-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.75rem 0 0;
  font-weight: 600;
}

.herbar-save-hint {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.herbar-save-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.5;
  background: var(--accent);
}

.herbar-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.herbar-toc a {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--card-line);
  background: var(--bg-elev);
  font-size: 0.86rem;
  color: var(--text);
}

.herbar-empty {
  padding: 1.75rem;
  text-align: center;
  border: 1px dashed var(--card-line);
  border-radius: 14px;
  color: var(--muted);
  margin: 1rem 0 0;
}

.herbar-plant {
  margin: 1.5rem 0 0;
  padding: 1.15rem;
  border: 1px solid var(--card-line);
  border-radius: 16px;
  background: var(--bg-card);
  scroll-margin-top: 85px;
}

.herbar-plant__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--card-line);
}

.herbar-plant__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.herbar-plant__title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
}

.herbar-badge-warn {
  flex: 0 0 auto;
  padding: 0.1rem 0.42rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

[data-theme="dark"] .herbar-badge-warn {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.herbar-rules {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.herbar-share-hint--warn {
  margin: 0.65rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.38);
  font-size: 0.86rem;
}

.herbar-h3 {
  margin: 0 0 0.75rem;
  font-size: 1.08rem;
}

.herbar-h4 {
  margin: 0 0 0.55rem;
  font-size: 0.96rem;
}

.herbar-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .herbar-grid {
    grid-template-columns: minmax(0, 320px) 1fr;
    align-items: start;
    gap: 2rem;
  }
}

.herbar-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 0.65rem;
}

.herbar-slot {
  position: relative;
  padding: 0.6rem;
  border: 1px dashed var(--card-line);
  border-radius: 12px;
  background: var(--bg-elev);
  text-align: center;
}

.herbar-slot__label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.herbar-slot__preview {
  margin: 0.45rem 0;
  min-height: 88px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
}

.herbar-slot__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1;
  display: block;
}

.herbar-slot__busy {
  position: absolute;
  right: 0.45rem;
  top: 0.35rem;
  font-size: 1rem;
}

.herbar-upload-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.4rem;
  margin-top: 0.35rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--accent-dim);
  color: var(--accent);
  cursor: pointer;
}

.herbar-extras-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.5rem 0 0.75rem;
}

.herbar-extra-thumb {
  position: relative;
  width: 72px;
  height: 72px;
}

.herbar-extra-thumb img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--card-line);
}

.herbar-photo-del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: #b91c1c;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.herbar-photo-rot {
  box-sizing: border-box;
  font: inherit;
  cursor: pointer;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.herbar-photo-rot:focus-visible {
  outline: 2px solid var(--accent, #eab308);
  outline-offset: 2px;
}

.herbar-photo-rot:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.herbar-photo-rot--slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  margin-top: 0.38rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--card-line);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
}

.herbar-photo-rot--slot span[aria-hidden] {
  font-size: 1rem;
  line-height: 1;
}

.herbar-photo-rot--slot:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.herbar-photo-rot--extra {
  position: absolute;
  bottom: -5px;
  left: -5px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--bg-card, #0c1e3a);
  background: linear-gradient(160deg, #2a5588 0%, #1f3f66 100%);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
}

:root[data-theme="light"] .herbar-photo-rot--extra {
  border-color: #fff;
}

.herbar-photo-rot--extra:hover:not(:disabled) {
  opacity: 0.92;
  transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
  .herbar-photo-rot--slot:hover:not(:disabled),
  .herbar-photo-rot--extra:hover:not(:disabled) {
    transform: none;
  }
}

.herbar-field {
  margin-bottom: 1rem;
}

.herbar-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.herbar-input,
.herbar-textarea {
  width: 100%;
  border: 1px solid var(--card-line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  box-sizing: border-box;
}

.herbar-textarea {
  resize: vertical;
  min-height: 4rem;
}

.herbar-field-row {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 600px) {
  .herbar-field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.herbar-locality-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: stretch;
}

.herbar-locality-row .herbar-input {
  flex: 1 1 180px;
}

.herbar-maplink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--accent, #eab308);
  text-decoration: none;
  vertical-align: middle;
  transition: opacity 0.12s ease, transform 0.12s ease, color 0.12s ease;
  font: inherit;
  cursor: pointer;
  box-sizing: border-box;
}

button.herbar-maplink {
  -webkit-appearance: none;
  appearance: none;
}

.herbar-maplink:hover {
  opacity: 0.92;
}

.herbar-maplink:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent, #eab308) 65%, transparent);
  outline-offset: 2px;
  border-radius: 10px;
}

.herbar-maplink__svg {
  display: block;
}

.herbar-maplink--field {
  width: 2.65rem;
  min-height: 2.65rem;
  border: 1px solid var(--card-line);
  border-radius: 10px;
  background: var(--bg-elev, rgba(0, 0, 0, 0.04));
}

.herbar-maplink--sheet {
  margin-left: 0.35rem;
  padding: 0.2rem;
  border-radius: 8px;
}

.herbar-plant-sheet__coord-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin: 0.35rem 0 0;
  line-height: 1.35;
}

.herbar-plant-sheet__coord-row .herbar-plant-sheet__coord {
  margin: 0;
}

.herbar-map-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.herbar-map-preview-modal__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
}

.herbar-map-preview-modal__note {
  margin: 0 0 0.65rem;
}

.herbar-map-preview-modal__fs-target {
  width: 100%;
  background: var(--bg-elev, rgba(0, 0, 0, 0.04));
  border-radius: 14px;
}

.herbar-map-preview-modal__mapwrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--card-line);
}

.herbar-map-preview-canvas {
  height: min(52vh, 340px);
  width: 100%;
  background: var(--bg-muted, #e8edf4);
}

.herbar-map-preview-modal__fs-target:fullscreen {
  background: #0f172a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.75rem;
}

.herbar-map-preview-modal__fs-target:fullscreen .herbar-map-preview-modal__mapwrap {
  flex: 1;
  min-height: 0;
}

.herbar-map-preview-modal__fs-target:fullscreen .herbar-map-preview-canvas {
  height: 100%;
  min-height: 60vh;
}

.herbar-map-preview-modal__actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.95rem;
}

@media (max-width: 520px) {
  .herbar-map-preview-modal .herbar-modal__dialog {
    padding: 0.85rem;
  }

  .herbar-map-preview-modal__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .herbar-map-preview-modal__actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* Text v herbáři — bez limitu 70ch jako u .prose */
.herbar-plant-form .herbar-plain,
.herbar-plant-form textarea {
  max-width: none;
}

.herbar-modal[hidden] {
  display: none !important;
}

.herbar-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 24, 40, 0.55);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.herbar-modal__dialog {
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid var(--card-line);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.22);
}

.herbar-modal__close {
  float: right;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.herbar-map-canvas {
  height: 320px;
  border-radius: 12px;
  margin-top: 0.5rem;
  border: 1px solid var(--card-line);
}

.herbar-map-wrap {
  position: relative;
  z-index: 0;
  overflow: hidden;
  margin-top: 0.5rem;
}

.herbar-map-wrap .herbar-map-canvas {
  margin-top: 0;
}

.herbar-modal__actions {
  margin-top: 0.85rem;
  display: flex;
  justify-content: flex-end;
}

/* Nad pane Leafletu (typ. z-index až ~700), jinak „Moje poloha“ pod mapou nebere klik/tap. */
.herbar-modal__actions--map {
  position: relative;
  z-index: 5000;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.herbar-modal__actions--map .btn.primary {
  margin-left: auto;
}

/* Veřejný / soukromý náhled — karta .herbar-plant-sheet níže */

/* Sdílený náhled herbáře — záložky + „vše najednou“ */
.herbar-share-ui-hint {
  margin-top: 0.35rem;
}

.herbar-share-toolbar {
  margin: 0.75rem 0 0.5rem;
}

.herbar-share-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
  align-items: stretch;
}

@media (max-width: 640px) {
  .herbar-share-panels--multi .herbar-share-tablist {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
    margin-bottom: 0.85rem;
    scrollbar-width: thin;
  }
}

.herbar-share-tab {
  flex: 0 0 auto;
  font: inherit;
  font-weight: 650;
  font-size: 0.88rem;
  line-height: 1.25;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--card-line);
  background: var(--bg-elev, transparent);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.herbar-share-tab:hover {
  border-color: color-mix(in srgb, var(--accent, #eab308) 45%, var(--card-line));
}

.herbar-share-tab.is-active,
.herbar-share-tab[aria-selected="true"] {
  background: color-mix(in srgb, var(--accent, #eab308) 22%, transparent);
  border-color: color-mix(in srgb, var(--accent, #eab308) 55%, var(--card-line));
  color: var(--text);
}

.herbar-share-panels--expanded .herbar-share-panel + .herbar-share-panel {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--card-line);
}

.herbar-plain {
  line-height: 1.62;
  color: var(--text);
}

.herbar-photo-gallery {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  margin: 0.95rem 0;
}

.herbar-shell--readonly .herbar-photo-gallery--sheet {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (min-width: 520px) {
  .herbar-shell--readonly .herbar-photo-gallery--sheet {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  }
}

.herbar-photo-tile__open {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg-elev, rgba(0, 0, 0, 0.04));
  box-shadow: 0 1px 0 var(--card-line);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.herbar-photo-tile__open:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.herbar-photo-tile__open:focus-visible {
  outline: 2px solid var(--accent, #eab308);
  outline-offset: 2px;
}

.herbar-photo-tile__open img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  vertical-align: middle;
}

@media (min-width: 640px) {
  .herbar-photo-tile__open img {
    height: 180px;
  }
}

.herbar-photo-tile__label {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

/* Readonly sekce Fotografie — panel ve stylu „listu“ + dlaždice jako nalepané vzorky */
.herbar-shell--readonly .herbar-photo-panel {
  position: relative;
  padding: 1rem 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid var(--card-line);
  background:
    linear-gradient(180deg, var(--accent-dim) 0%, transparent 38%),
    linear-gradient(150deg, var(--bg-card) 0%, var(--bg-deep) 110%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 26px rgba(0, 0, 0, 0.14);
}

:root[data-theme="light"] .herbar-shell--readonly .herbar-photo-panel {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 10px 34px rgba(28, 52, 84, 0.12);
}

.herbar-shell--readonly .herbar-photo-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, transparent 5%, var(--accent) 50%, transparent 95%);
  opacity: 0.82;
}

.herbar-photo-panel__head {
  position: relative;
  margin: 0 0 0.35rem;
  padding-left: 0.72rem;
  border-left: 3px solid var(--accent);
}

.herbar-photo-panel__kicker {
  margin: 0 0 0.3rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.herbar-photo-panel__title.herbar-h3 {
  margin: 0 0 0.3rem;
  font-size: clamp(1rem, 2.8vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--card-title, var(--text));
}

.herbar-photo-panel__subtitle {
  margin: 0;
  max-width: 52ch;
  line-height: 1.45;
}

.herbar-photo-panel__subtitle kbd {
  display: inline-block;
  padding: 0.08rem 0.32rem;
  margin: 0 0.05rem;
  font-family: inherit;
  font-size: 0.86em;
  font-weight: 700;
  line-height: 1.35;
  vertical-align: 0.04em;
  border-radius: 5px;
  border: 1px solid var(--card-line);
  background: var(--bg-deep);
  color: var(--text);
}

.herbar-shell--readonly .herbar-photo-panel .herbar-photo-gallery--sheet {
  margin-top: 0.65rem;
}

.herbar-shell--readonly .herbar-photo-tile--sheet {
  margin: 0;
  display: flex;
  flex-direction: column;
  padding: 0.42rem 0.42rem 0.52rem;
  border-radius: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--card-line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.16);
}

:root[data-theme="light"] .herbar-shell--readonly .herbar-photo-tile--sheet {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 7px 22px rgba(28, 52, 84, 0.13);
}

.herbar-shell--readonly .herbar-photo-tile--sheet .herbar-photo-tile__open {
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.herbar-shell--readonly .herbar-photo-tile--sheet .herbar-photo-tile__open:hover {
  box-shadow:
    inset 0 0 0 1px var(--accent),
    0 6px 18px rgba(0, 0, 0, 0.12);
}

.herbar-shell--readonly .herbar-photo-tile--sheet .herbar-photo-tile__label {
  margin-top: 0.48rem;
  padding-top: 0.42rem;
  border-top: 1px dashed var(--card-line);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--card-title, var(--text));
}

@media (prefers-reduced-motion: reduce) {
  .herbar-photo-tile__open {
    transition: none;
  }

  .herbar-photo-tile__open:hover {
    transform: none;
  }

  .herbar-shell--readonly .herbar-photo-tile--sheet .herbar-photo-tile__open:hover {
    box-shadow: inset 0 0 0 1px var(--accent);
  }
}

.herbar-plant-sheet {
  margin: 1.25rem 0 2rem;
  padding: 1.1rem 1.2rem 1.35rem;
  border: 1px solid var(--card-line);
  border-radius: 16px;
  background: var(--bg-card);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.herbar-plant-sheet__head {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--card-line);
}

.herbar-plant-sheet__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.herbar-plant-sheet__loc {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.herbar-plant-sheet__loc::before {
  content: "📍 ";
}

.herbar-plant-sheet__coord {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
}

.herbar-plant-sheet__hint {
  margin: 0 0 0.6rem;
}

.herbar-plant-sheet__grid {
  display: grid;
  gap: 1.35rem;
  align-items: start;
}

@media (min-width: 860px) {
  .herbar-plant-sheet__grid {
    grid-template-columns: minmax(260px, 400px) minmax(0, 1fr);
    gap: 1.75rem;
  }
}

.herbar-detail-block--sheet {
  margin-top: 0;
  margin-bottom: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--card-line);
}

.herbar-detail-block--sheet:last-child {
  margin-bottom: 0;
}

.herbar-detail-block--sheet .herbar-h3 {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.herbar-sheet__method {
  margin: 0 0 0.35rem;
  line-height: 1.5;
}

.herbar-sheet__verification {
  margin-top: 0.5rem;
}

.herbar-album-toprow {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  align-items: flex-start;
  justify-content: space-between;
}

.herbar-album-intro {
  flex: 1 1 16rem;
  min-width: 0;
}

.herbar-album-tocwrap {
  margin: 1.15rem 0 1.35rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--card-line);
  border-radius: 14px;
  background: var(--bg-card);
}

.herbar-album-tocwrap__title {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.herbar-album-toc {
  margin: 0;
}

.herbar-album-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  padding: 0.45rem 0.15rem;
}

.herbar-album-pager__cell {
  min-height: 2.25rem;
  display: flex;
  align-items: center;
}

.herbar-album-pager__cell--prev {
  justify-content: flex-start;
}

.herbar-album-pager__cell--next {
  justify-content: flex-end;
}

.herbar-album-pager__mid {
  justify-self: center;
  white-space: nowrap;
}

.herbar-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0)
    env(safe-area-inset-left, 0);
}

.herbar-photo-lightbox[hidden] {
  display: none !important;
}

.herbar-photo-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  cursor: zoom-out;
  background: rgba(15, 23, 42, 0.82);
}

.herbar-photo-lightbox__frame {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(96vw, 1100px);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  touch-action: pan-y pinch-zoom;
}

.herbar-photo-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.75rem;
  height: min(52px, 16vh);
  min-width: 44px;
  border: none;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
  color: #f8fafc;
  font-size: 2rem;
  line-height: 1;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 0.12em;
}

.herbar-photo-lightbox__nav:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.68);
}

.herbar-photo-lightbox__nav:focus-visible:not(:disabled) {
  outline: 2px solid var(--accent, #eab308);
  outline-offset: 2px;
}

.herbar-photo-lightbox__nav:disabled {
  opacity: 0.22;
  cursor: default;
}

.herbar-photo-lightbox__nav--prev {
  left: max(0.25rem, env(safe-area-inset-left));
}

.herbar-photo-lightbox__nav--next {
  right: max(0.25rem, env(safe-area-inset-right));
}

.herbar-photo-lightbox__meta {
  margin: 0;
  padding: 0 2.85rem;
  width: 100%;
  box-sizing: border-box;
}

.herbar-photo-lightbox__cap {
  margin: 0;
  padding: 0 0.35rem;
  font-size: 0.92rem;
  text-align: center;
  color: #e2e8f0;
}

.herbar-photo-lightbox__counter {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  text-align: center;
  opacity: 0.85;
}

.herbar-photo-lightbox__img {
  max-width: 100%;
  max-height: min(78vh, 820px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  background: #0f172a;
  -webkit-touch-callout: none;
}

.herbar-photo-lightbox__close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.herbar-photo-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 600px) {
  .herbar-photo-lightbox__close {
    top: auto;
    bottom: calc(-3rem + env(safe-area-inset-bottom, 0));
    right: 50%;
    transform: translateX(50%);
  }
}

.herbar-detail-block h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.herbar-top__actions--stack {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  max-width: 28rem;
}

.herbar-new-plant--blocked {
  opacity: 0.72;
  cursor: not-allowed;
}

.herbar-hub {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-top: 1.35rem;
}

.herbar-hub__empty {
  grid-column: 1 / -1;
}

.herbar-hub-card {
  display: flex;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--card-line);
  border-radius: 14px;
  background: var(--bg-card);
  align-items: flex-start;
}

.herbar-hub-card__thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.herbar-hub-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.herbar-hub-card__ph {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--muted);
}

.herbar-hub-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.herbar-hub-card__badge {
  margin: 0 0 0.5rem;
}

.herbar-toc.herbar-toc--sibs {
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  display: flex;
  padding: 0.55rem 0 0;
  margin: 0.5rem 0 0;
  list-style: none;
}

.herbar-toc.herbar-toc--sibs li {
  margin: 0;
}

.herbar-toc__here {
  font-weight: 700;
}

.herbar-album-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.herbar-album-toprow .herbar-album-toolbar {
  margin-top: 0;
  justify-content: flex-end;
}

.herbar-album-footer {
  margin-top: 2rem;
}

.herbar-gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
}
