/* Slávek Honzík: vzhled „Moderní magazín“ */
:root {
  --text: #111;
  --muted: #555;
  --accent: #0f766e;
  --accent-dark: #0b5d57;
  --soft: #f5f5f4;
  --line: #e7e5e4;
  --dark: #111;
  --radius: 10px;
  --wrap: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0;
  font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.15; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* lišta */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; padding-top: 12px; padding-bottom: 12px; position: relative; }
.brand { font-weight: 800; letter-spacing: .06em; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--text); }
.nav { flex: 1; min-width: 0; }
.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; align-items: center; justify-content: flex-end; }
.nav li { max-width: 100%; }
.nav a {
  display: block; padding: 8px 10px; border-radius: 8px; color: #333; text-decoration: none;
  font: inherit; font-size: 14px; font-weight: 500; background: none; border: 0; cursor: pointer;
}
.nav a:hover { background: var(--soft); color: var(--text); }
.nav a[aria-current="page"] { color: var(--accent-dark); background: #e4f2ef; }
.nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav .lang { border: 1px solid #ccc; font-size: 12px; font-weight: 700; padding: 3px 8px; margin-left: 6px; width: 36px; text-align: center; justify-content: center; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 10px; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 2px; background: var(--text); border-radius: 2px; }
.menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* hlavička podstránky */
.page-head { background: var(--soft); padding: 48px 0 40px; }
.label { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); margin: 0; }

/* tlačítka */
.btn { display: inline-block; background: var(--accent); color: #fff; padding: 10px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; text-decoration: none; border: 1.5px solid var(--accent); }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--text); }
.btn-outline:hover { background: var(--text); color: #fff; border-color: var(--text); }

/* sekce */
.section { padding: 56px 0; }
.section.alt { background: var(--soft); }
.section h2 { font-size: clamp(24px, 3.4vw, 30px); margin: 4px 0 18px; }

/* textový obsah */
.prose { max-width: 720px; margin: 0 auto; padding: 40px 0 64px; font-size: 17px; overflow-wrap: anywhere; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.8em 0 .6em; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1em; }
.prose img { margin: 1.2em auto; border-radius: 8px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose .photo { margin: 1.4em 0; }
.prose .photo img { margin: 0 auto; }
/* Barevné zvýraznění informací podle původního webu. */
.travel-info .travel-heading, .travel-info .travel-topic, .travel-info mark, .travel-info .travel-label {
  padding: .06em .2em;
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.travel-info .travel-heading { color: #a61b1b; background: #d3d3d3; }
.travel-info .travel-topic { color: #111; background: #00ffff; font-weight: 700; }
.travel-info mark { color: #111; background: #ffff00; }
.travel-info .travel-label { color: #111; background: #d3d3d3; font-weight: 600; }
.travel-info .travel-label--salmon { background: #ffa07a; }
.prose-center p, .prose-center h3 { text-align: center; }
/* rámeček: obrázek a texty, které k němu patří */
.prose-center .item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 20px; margin: 0 0 32px; }
.prose-center .item .photo { margin: 0; }
.prose-center .item p { margin: 12px 0 0; }
.prose-center .item > p:first-child:not(.photo) { margin: 0 0 12px; font-weight: 700; }  /* název nad obrázkem */
.prose-center .item > :last-child { margin-bottom: 0; }
.prose-center p.long { text-align: left; }
/* Partneři: každé logo patří ke svému obsahu. */
.partner-gabreti { max-width: 227px; margin: 0 auto 48px; }
.partners-content .partner-gabreti img { width: 100%; margin: 0; border-radius: 0; }
.partner-alvarez { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: start; margin-bottom: 48px; }
.partners-content .partner-alvarez-logo img { width: 100%; margin: 0; border-radius: 0; }
.partner-alvarez-text > :last-child { margin-bottom: 0; }
.partner-municipality { text-align: center; margin-bottom: 40px; }
.partners-content .partner-municipality .photo { margin-top: 0; }
.partners-content .partner-municipality h3 { margin: 16px 0 0; }
.partner-logos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 2vw, 24px); align-items: center; }
.partner-logos a { display: flex; align-items: center; justify-content: center; min-width: 0; height: clamp(90px, 20vw, 180px); }
.partners-content .partner-logos img { width: 100%; height: 100%; object-fit: contain; margin: 0; border-radius: 0; }
@media (max-width: 600px) {
  .partner-alvarez { grid-template-columns: 1fr; gap: 20px; }
  .partner-alvarez-logo { width: min(200px, 100%); margin: 0 auto; }
}
@media (min-width: 600px) {
  .prose-center p.long { text-align: justify; hyphens: auto; }  /* na úzkém displeji by blok dělal díry */
}
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 1.5em 0; align-items: start; }
.gallery a, .gallery img { display: block; width: 100%; margin: 0; border-radius: 8px; }
.table-wrap { overflow-x: auto; margin: 1.5em 0; }
.table-wrap table { border-collapse: collapse; min-width: 100%; }
.table-wrap td, .table-wrap th { border: 1px solid var(--line); padding: 6px 10px; vertical-align: top; }
a.lb { cursor: zoom-in; }
img.icon, .prose img.icon { display: inline; width: auto; height: 1.1em; margin: 0 .15em; vertical-align: -.15em; border-radius: 0; }

/* expedice */
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/barlow-condensed-bold-latin.woff2") format("woff2");
}
.ex-timeline { padding-top: 40px; }
.ex-year { display: flex; align-items: center; gap: 14px; font-size: 26px; margin: 34px 0 14px; }
.ex-year::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.ex-card { border: 2px solid #000; border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.ex-logo { background: #0b0b0b; height: 220px; display: flex; align-items: center; justify-content: center; padding: 10px; }
.ex-logo a { display: block; height: 100%; }
.ex-logo img { height: 100%; width: auto; object-fit: contain; margin: 0 auto; }
.is-planned .ex-logo:has(.ex-nologo) { background: var(--soft); }
.ex-body { padding: 12px 14px 14px; }
.ex-name { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-weight: 700; font-size: 27px; line-height: 1.15; margin: 0; letter-spacing: 0; color: #582277; overflow-wrap: normal; }
/* Delší názvy zůstávají pod logem, druhé slovo je menší, ale dobře čitelné. */
#expedice-18 .ex-body, #expedice-21 .ex-body { container-type: inline-size; }
.ex-name.ex-name--compact { white-space: nowrap; font-size: min(27px, 12cqi); }
.ex-name-secondary { font-size: .65em; }
.ex-num { color: inherit; }
.ex-countries { margin: 2px 0 0; color: #008000; font-size: 14px; font-weight: 700; }
.ex-alt { margin: 8px 0 0; font-size: 12px; color: #777; }
.ex-intro { color: var(--muted); margin: 8px 0 24px; }
.ex-card[id] { scroll-margin-top: 190px; }
.ex-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.ex-card-link .ex-body { display: flex; flex-direction: column; flex: 1; }
.has-gallery { transition: border-color .2s, box-shadow .2s; }
.has-gallery:hover, .has-gallery:focus-within { border-color: #000; box-shadow: 0 4px 18px rgba(0, 0, 0, .08); }
.ex-card-link:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: var(--radius); }
.ex-gallery-link { margin: auto 0 0; padding-top: 16px; font-size: 14px; font-weight: 700; color: #111; }
.ex-gallery-link span { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; }
.ex-logo .ex-cover { width: 100%; height: 100%; object-fit: contain; }
.expedition-back { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; color: var(--accent-dark); font-weight: 600; text-underline-offset: 4px; }
.expedition-head .expedition-back { margin-bottom: 18px; }
.expedition-head h1 { overflow-wrap: anywhere; color: #582277; }
.expedition-countries { color: #008000; margin: 14px 0 0; font-size: 18px; font-weight: 700; }
.expedition-gallery-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 24px; }
.expedition-gallery-heading h2 { margin: 0; font-size: 24px; }
.expedition-gallery-heading p { margin: 0; color: var(--muted); }
.gallery.expedition-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; margin: 24px 0 32px; }
.expedition-photo { margin: 0; min-width: 0; }
.expedition-photo a { background: var(--soft); overflow: hidden; }
.expedition-photo a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.expedition-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.expedition-photo figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
@media (max-width: 900px) { .gallery.expedition-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .ex-card[id] { scroll-margin-top: 90px; } }
@media (max-width: 520px) { .gallery.expedition-gallery { grid-template-columns: 1fr; gap: 24px; } }

/* fotoalbum a dlaždice: poměr 3:2, ořez podle ohniska (object-position z generátoru) */
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.album a, .tile a { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius); background: var(--soft); }
.album img, .tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.album a:hover img, .tile a:hover img { transform: scale(1.03); }
.album { align-items: start; }
.album a { aspect-ratio: auto; }
.album img { height: auto; object-fit: contain; }
.album a:hover img { transform: none; }
.album .album-portrait-first { grid-column: 1; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.tile { margin: 0; }
.tile figcaption { font-weight: 700; font-size: 14px; margin-top: 8px; letter-spacing: .02em; }
.prose-wide { max-width: none; }

/* navštívené státy */
.stat-row { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; margin-bottom: 32px; }
.big-stat .n { display: block; font-size: clamp(64px, 10vw, 110px); font-weight: 800; line-height: 1; color: var(--accent); }
.big-stat .l { display: block; font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--muted); margin-top: 6px; }
.stat-logo { flex: 1; min-width: 240px; max-width: 520px; }
.stat-logo img { width: 100%; }
.cont-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.cont-card { min-width: 0; background: var(--soft); border-radius: var(--radius); padding: 16px; }
.cont-card h2 { font-size: 18px; margin: 0 0 12px; letter-spacing: .04em; }
/* seznam států: mřížka 9 políček jako na Slávkově obrázku, vektorové vlajky (tools/fetch_flags.py), jména jako text */
.flags { display: grid; grid-template-columns: repeat(9, 1fr); gap: 12px 10px; }
.flag-cell { margin: 0; text-align: center; min-width: 0; }
.flag-cell img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border: 2px solid #4b4b4b; border-radius: 2px; }
.flag-box { display: block; aspect-ratio: 4 / 3; border: 2px solid #4b4b4b; border-radius: 2px; background: #fff; }
.flag-cell figcaption { font-size: 11px; font-weight: 800; line-height: 1.2; margin-top: 4px; overflow-wrap: normal; hyphens: manual; }
.cont-orig { display: inline-block; margin-top: 12px; font-size: 13px; }

/* přednášky */
.talks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; align-items: start; margin-top: 8px; }
.talks-past { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.talk-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.talk-poster { background: var(--soft); padding: 10px; }
.talk-poster img { width: 100%; border-radius: 6px; }
.talk-body { padding: 12px 14px 14px; }
.talk-when { font-weight: 800; margin: 0; }
.talk-place { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.topics { list-style: none; margin: 0; padding: 0; columns: 2 320px; column-gap: 40px; }
.topic { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.t-num { font-weight: 800; color: var(--accent); min-width: 2.6em; font-variant-numeric: tabular-nums; }
.t-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.sub-title { font-size: 20px; margin: 40px 0 0; }
.muted { color: var(--muted); }

/* cestovatelské pomůcky */
.gear-list { display: grid; gap: 22px; }
.gear-card { display: grid; grid-template-columns: 260px 1fr; gap: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; align-items: start; }
.gear-card > .gear-body:first-child { grid-column: 1 / -1; }
.gear-img { background: var(--soft); border-radius: 8px; padding: 12px; }
.gear-img img { width: 100%; border-radius: 6px; }
.gear-body { font-size: 16px; overflow-wrap: anywhere; min-width: 0; }
.gear-body h2 { font-size: 20px; margin: 0 0 10px; }
.gear-body p { margin: 0 0 .8em; }
.gear-body ul { padding-left: 1.2em; }

/* úvodní stránka */
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.hero { padding: 48px 0 44px; }
.hero-in { display: block; }
.hero h1 { font-size: clamp(40px, 6vw, 60px); line-height: 1.02; margin: 6px 0 16px; }
.hero-banner { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.crests { background: var(--soft); padding: 22px 0; }
.crests-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px 18px; }
.crests figure { margin: 0; text-align: center; }
.crests img { height: 48px; width: auto; margin: 0 auto; }
.about { display: grid; grid-template-columns: 320px 1fr; gap: 40px; align-items: start; }
.about-media img { width: 100%; border-radius: var(--radius); margin-bottom: 14px; }
.about-text h2 { margin-top: 4px; }
.about-text .prose, .about-text p { color: #333; }
.prose-flat { max-width: 820px; margin: 0; padding: 0; }
.sec-title { margin: 0 0 18px; }
.sec-title a { color: inherit; text-decoration: none; }
.sec-title a:hover { color: var(--accent); }
.photo-row { columns: 4 200px; column-gap: 10px; }
.photo-row a { display: block; break-inside: avoid; margin-bottom: 10px; }
.photo-row img { width: 100%; border-radius: 8px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.plans-img { margin: 0; }
.plans-img img { width: 100%; border-radius: var(--radius); }
.plans-img figcaption { font-weight: 800; margin-top: 10px; font-size: 15px; letter-spacing: .02em; }
.contact { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; }
.contact h2 { margin: 4px 0 14px; }
.en-flag { justify-self: end; }
.en-flag img { width: 72px; height: auto; border-radius: 4px; border: 1px solid var(--line); }

/* patička */
.footer { background: var(--dark); color: #cfcfcf; padding: 48px 0; font-size: 14px; line-height: 1.9; }
.footer-in { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; }
.footer a { color: #e7e7e7; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer .brand { color: #fff; display: inline-block; margin-bottom: 4px; }
.footer p { margin: 0 0 8px; }
.footer ul { list-style: none; margin: 0; padding: 0; }

/* zvětšení fotek */
.lightbox { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 100; isolation: isolate; }
.lightbox.open { display: flex; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(10, 10, 10, .94); z-index: -1; pointer-events: none; }
.lightbox img { max-width: 92vw; max-height: 84vh; width: auto; height: auto; border-radius: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .lightbox.open .lb-backdrop { will-change: opacity; }
  .lightbox.open img { will-change: transform, opacity; }
}
.lb-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .14); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; }
.lb-btn:hover, .lb-btn:focus-visible { background: rgba(255, 255, 255, .28); }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-close { top: 14px; right: 14px; transform: none; font-size: 26px; }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #ddd; font-size: 13px; }
.lb-orig { position: absolute; bottom: 12px; right: 16px; color: #ddd; font-size: 13px; }
.lb-orig:hover { color: #fff; }
.lb-caption { position: absolute; bottom: 40px; left: 0; right: 0; width: fit-content; max-width: min(720px, calc(100% - 140px)); margin: 0 auto; color: #f2f2f2; font-size: 15px; line-height: 1.4; text-align: center; }
@media (max-width: 520px) {
  .lb-count { left: 16px; right: auto; text-align: left; }
  .lb-caption { left: 16px; right: 16px; width: auto; max-width: none; margin: 0; font-size: 14px; text-align: left; }
}

/* tlačítko Nahoru s letadlem */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); opacity: 0; visibility: hidden; transform: translateY(12px); }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-dark); }
.to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 760px) { .to-top { right: 14px; bottom: 14px; width: 44px; height: 44px; } }
@media print { .to-top { display: none; } }

@media (max-width: 1000px) {
  .topbar-in { flex-direction: column; align-items: flex-start; gap: 8px; }
  .nav { width: 100%; }
  .nav > ul { justify-content: flex-start; }
  .flags { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 760px) {
  .wrap { padding: 0 18px; }
  .topbar-in { flex-direction: row; align-items: center; gap: 16px; padding-top: 0; padding-bottom: 0; }
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; width: auto; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 18px 18px; max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; box-shadow: 0 12px 24px rgba(0, 0, 0, .08); }
  .nav-open .nav { display: block; }
  .nav > ul { flex-direction: column; align-items: stretch; }
  .nav a { min-height: 44px; display: flex; align-items: center; }
  .nav .lang { display: inline-flex; margin: 8px 0 0 10px; }
  .page-head { padding: 32px 0 28px; }
  .section { padding: 40px 0; }
  .prose { padding: 28px 0 48px; font-size: 16px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ex-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ex-logo { height: 170px; }
  .ex-year { font-size: 22px; margin-top: 26px; }
  .album { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .flags { grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
  .stat-logo { min-width: 0; }
  .talks, .talks-past { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gear-card { grid-template-columns: 1fr; padding: 16px; gap: 14px; }
  .hero { padding: 28px 0 32px; }
  .about, .plans, .contact { grid-template-columns: 1fr; gap: 24px; }
  .about-media { max-width: 360px; }
  .crests-in { justify-content: center; }
  .photo-row { columns: 2; column-gap: 8px; }
  .footer-in { grid-template-columns: 1fr; gap: 18px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
}

/* zalamování */
/* buňky mřížek a flexu smí zalomit dlouhé řetězce (adresy, e-maily) */
.about-text, .plans-text, .tile figcaption, .cont-card h2, .ex-body, .talk-body, .contact > div, .big-stat { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 360px) {
  .flags { gap: 10px 6px; }
  .flag-cell figcaption { font-size: 9.5px; letter-spacing: -.02em; }
  .ex-name { font-size: 22.5px; }  /* Na nejmenších displejích zachováme celé názvy bez dělení slov. */
  .ex-body { padding-left: 8px; padding-right: 8px; }
}

/* Počítadlo návštěvnosti původního webu. */
.site-statistics { border-top: 1px solid #444; padding-top: 26px; margin-top: 26px; max-width: 560px; }
.statistics-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; }
.statistics-heading h2 { margin: 0; font-size: 20px; }
.statistics-heading a { font-size: 13px; text-underline-offset: 3px; }
.statistics-values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0 10px; }
.statistics-values dt { color: #bbb; font-size: 13px; }
.statistics-values dd { margin: 2px 0 0; color: #fff; font-size: 24px; line-height: 1.3; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.statistics-status { margin: 0; color: #aaa; font-size: 12px; }
@media (max-width: 360px) { .statistics-values { gap: 8px; } .statistics-values dd { font-size: 20px; } }

/* Animace. Pohyb odpovídá na akci návštěvníka nebo jednou ukáže, co je na stránce důležité.
   Třídu js-motion přidává site.js jen tehdy, když návštěvník nemá v systému omezené animace. */
/* mobilní nabídka: hamburger se změní v křížek, nabídka sjede dolů */
.menu-btn span { transform-origin: center; }
.nav-open .menu-btn span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.nav-open .menu-btn span:nth-child(2) { opacity: 0; }
.nav-open .menu-btn span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }
/* expedice: karta, na kterou se návštěvník vrátil z galerie */
.ex-card:target { border-color: #000; }
/* navštívené státy: vlajka se kymácí od žerdi, číslice se nepřelévají */
.flag-cell img { transform-origin: left center; }
.big-stat .n { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: no-preference) {
  /* přechod mezi stránkami: obsah se prolne, hlavička s nabídkou zůstane na místě */
  .topbar { view-transition-name: topbar; }
  ::view-transition-old(root) { animation: page-out .16s ease-in both; }
  ::view-transition-new(root) { animation: page-in .3s ease-out both; }
  .menu-btn span { transition: transform .25s ease, opacity .2s ease; }
  .nav-open .nav { animation: nav-drop .22s ease-out; }
  .ex-card:target { animation: ex-arrive 1.8s ease-out .35s; }
  .flag-cell.is-waving img { animation: flag-wave .9s ease-in-out; }
  .to-top { transition: opacity .25s, transform .25s, visibility 0s .25s; }
  .to-top.is-visible { transition: opacity .25s, transform .25s; }
  .to-top svg { transition: transform .2s; }
  .to-top:hover svg { transform: translateY(-3px); }
}
@media screen and (prefers-reduced-motion: no-preference) {
  .js-motion .flag-cell:not(.is-empty) { opacity: 0; }
  .js-motion .flag-cell.is-stamped { animation: flag-stamp .5s cubic-bezier(.3, 1.45, .55, 1) var(--delay, 0ms) both; }
  img.img-fade { opacity: 0; transition: opacity .5s ease-out, transform .3s; }
  img.img-fade.is-loaded { opacity: 1; }
}
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes nav-drop { from { opacity: 0; transform: translateY(-8px); } }
@keyframes ex-arrive {
  0% { box-shadow: 0 0 0 0 rgba(15, 118, 110, .55); }
  45% { box-shadow: 0 0 0 14px rgba(15, 118, 110, 0); }
  46% { box-shadow: 0 0 0 0 rgba(15, 118, 110, .55); }
  100% { box-shadow: 0 0 0 14px rgba(15, 118, 110, 0); }
}
@keyframes flag-stamp {
  0% { opacity: 0; transform: scale(1.7) rotate(var(--tilt, -4deg)); }
  55% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes flag-wave {
  0%, 100% { transform: none; }
  20% { transform: perspective(260px) rotateY(-22deg) skewY(4deg); }
  45% { transform: perspective(260px) rotateY(12deg) skewY(-2.5deg); }
  70% { transform: perspective(260px) rotateY(-7deg) skewY(1.2deg); }
}
