/* ============================================================
   Krasohled — sdílený styl pro všechny stránky
   Barvy obou režimů jsou nahoře v proměnných.
   ============================================================ */

/* ---------- SVĚTLO: běžný, přístupný ---------- */
:root, [data-rezim="svetlo"] {
  --pozadi: #fbfbf6;
  --text: #141410;
  --tlumeny: #55554c;
  --mech: #4d6e22;        /* zelená organismu a nadpisů */
  --akcent: #4d6e22;
  --zluta: #e8dd3e;       /* obrys hvězdice */
  --matice: 20, 20, 10;   /* tečky za nápisem (RGB) */
  --cara: rgba(20, 30, 10, .14);
  --zrnitost: .07;
}

/* ---------- TMA: podzemí, tělo, krev ---------- */
[data-rezim="tma"] {
  --pozadi: #060101;
  --text: #f3eded;
  --tlumeny: #a39191;
  --mech: #c8141f;
  --akcent: #ff2b34;
  --zluta: #9a9a9a;
  --matice: 210, 10, 20;
  --cara: rgba(255, 40, 50, .2);
  --zrnitost: .14;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--pozadi); }
body {
  background: var(--pozadi);
  color: var(--text);
  font-family: var(--pismo);
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color .8s ease, color .8s ease;
  position: relative;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.filtry { position: absolute; }

/* přírodní zrno přes celou stránku */
body::before {
  content: ""; position: fixed; inset: -50%; z-index: 100; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--zrnitost);
  mix-blend-mode: multiply;
}
[data-rezim="tma"] body::before { mix-blend-mode: screen; }

/* tma: rudá vinětá, která tepe jako srdce */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 99; pointer-events: none;
  background: radial-gradient(ellipse at 50% 55%, transparent 45%, rgba(120, 0, 8, .5) 100%);
  opacity: 0; transition: opacity .8s ease;
}
[data-rezim="tma"] body::after { opacity: 1; animation: tep 0.9s infinite; }
@keyframes tep {
  0%, 40%, 100% { opacity: .55; }
  8% { opacity: 1; }
  20% { opacity: .75; }
}

/* ---------- Trojitý nápis ---------- */
.cluster {
  text-decoration: none;
  font-weight: 300;
  line-height: 0.9;
  display: inline-block;
}
.cluster span { display: block; opacity: 0.35; transition: transform .35s ease, opacity .35s ease, letter-spacing .35s ease; }
.cluster span:nth-child(2) { opacity: 0.65; transform: translateX(3px); }
.cluster span:nth-child(3) { opacity: 1; transform: translateX(6px); }
a.cluster:hover span, a.cluster:focus-visible span, a.cluster.aktivni span {
  opacity: 1; transform: translateX(0); letter-spacing: 1px;
}
a:focus-visible { outline: 2px dashed var(--akcent); outline-offset: 6px; }

/* ---------- Mechové / krvavé nadpisy, kurzívní řádky ---------- */
.mech {
  font-family: var(--pismo);
  font-weight: bold;
  color: var(--mech);
  filter: url(#mech);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
[data-rezim="tma"] .mech { filter: url(#krev); }
.mech a { text-decoration: none; }
.podpis {
  font-style: italic;
  font-weight: 400;   /* Coolvetica Book Italic (Light Italic v projektu není) */
  font-size: clamp(1.25rem, 2.6vw, 2rem);
  color: var(--tlumeny);
  letter-spacing: -0.01em;
}
.podpis a { text-decoration: none; border-bottom: 1px solid var(--cara); transition: color .3s, border-color .3s; }
.podpis a:hover { color: var(--text); border-color: var(--akcent); }

/* ---------- LED písmo (Superscore) — jen na velké věci ----------
   použití v manifestu: <h2 class="tecky">…</h2>
   v tmě se písmo „rozpadá" (osa FLUX) */
.tecky {
  font-family: var(--pismo-tecky);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 6rem);
  line-height: 1;
  text-align: center;
  color: var(--text);
  margin: .4em 0;
}
[data-rezim="tma"] .tecky { color: var(--akcent); text-shadow: 0 0 14px rgba(255, 30, 40, .5); animation: flux 2.6s steps(6) infinite; }
@keyframes flux {
  0%, 100% { font-variation-settings: "FLUX" 0; }
  40% { font-variation-settings: "FLUX" 35; }
  55% { font-variation-settings: "FLUX" 90; }
  70% { font-variation-settings: "FLUX" 10; }
}

/* ============================================================
   ZNAK (krasohled + hvězdice + tečková matice)
   ============================================================ */
.znak {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  text-decoration: none;
  color: var(--text);
  font-weight: bold;
  line-height: 1;
}
.matice { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.znak-telo { position: relative; display: inline-flex; align-items: center; z-index: 1; }
.slovo { display: inline-flex; letter-spacing: -0.035em; filter: url(#zrno); }
.slovo span { display: inline-block; transform: translateY(var(--d)); transition: transform .25s ease; }
.slovo span.skok { transform: translate(.04em, calc(var(--d) - .08em)) skewX(-8deg); }
/* starší design prosvítá pod aktuálním */
.slovo.stara {
  position: absolute; left: .78em; top: 0;
  font-family: var(--pismo-ozdobne);
  font-weight: 300; font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1px var(--tlumeny);
  opacity: .35;
  pointer-events: none;
  animation: drift 11s ease-in-out infinite alternate;
  filter: none;
}
@keyframes drift {
  from { transform: translate(-.05em, .03em); clip-path: inset(0 55% 0 0); }
  to   { transform: translate(.06em, -.04em); clip-path: inset(0 0 0 45%); }
}

.hvezda {
  width: 1.05em; height: 1.05em;
  margin-right: -.32em;
  position: relative; z-index: 2;
  overflow: visible;
  animation: otacka 60s linear infinite;
}
.hvezda rect { fill: rgba(240, 230, 80, .14); stroke: var(--zluta); stroke-width: 3; transition: fill .8s, stroke .8s; }
[data-rezim="tma"] .hvezda rect { fill: #9a9a9a; stroke: none; filter: url(#kamen); }
@keyframes otacka { to { transform: rotate(360deg); } }
.znak:hover .hvezda { animation-duration: 6s; }

.znak-velky { font-size: clamp(3.2rem, 10vw, 8rem); padding: .3em 0 .2em; }
.znak-maly { font-size: 1.7rem; padding: .3em .6em; }

/* ---------- Přepínač režimu ---------- */
.prepinac {
  display: inline-flex; align-items: center; gap: .5em;
  font: inherit; font-size: .85rem; letter-spacing: .18em; text-transform: lowercase;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--cara);
  border-radius: 999px;
  padding: .45em .95em;
  cursor: pointer;
  transition: border-color .3s, color .3s;
}
.prepinac:hover { border-color: var(--akcent); }
.prepinac-tecka { width: .55em; height: .55em; border-radius: 50%; background: var(--text); }
[data-rezim="tma"] .prepinac-tecka { background: var(--akcent); box-shadow: 0 0 8px var(--akcent); animation: blik 1.8s steps(2) infinite; }
.na-svetlo { display: none; }
[data-rezim="tma"] .na-tmu { display: none; }
[data-rezim="tma"] .na-svetlo { display: inline; }
@keyframes blik { 50% { opacity: .25; } }

/* ============================================================
   ÚVOD — organický rozcestník
   ============================================================ */
.uvod-hlavicka { position: relative; z-index: 3; text-align: center; }
.uvod-podtitul {
  font-size: clamp(.75rem, 1.3vw, .95rem);
  letter-spacing: .35em; text-transform: uppercase; color: var(--tlumeny);
  margin-top: -.6em;
}
.uvod-hlavicka .prepinac { position: absolute; top: 16px; right: 16px; }

.organismus {
  position: relative;
  width: 100%;
  height: clamp(480px, calc(100svh - 230px), 900px);
  touch-action: pan-y;
}
.tkan { position: absolute; inset: 0; width: 100%; height: 100%; }

/* staré designy prosvítající pod organismem */
.vrstvy { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.vrstva {
  position: absolute; inset: 4% 10%;
  background: center / contain no-repeat;
  opacity: var(--o);
  mix-blend-mode: multiply;
  animation: vrstva 40s ease-in-out infinite alternate;
  transition: filter .8s;
}
[data-rezim="tma"] .vrstva { mix-blend-mode: screen; filter: grayscale(1) sepia(1) hue-rotate(-40deg) saturate(5) brightness(.55); }
@keyframes vrstva { from { transform: rotate(-3deg) scale(1); } to { transform: rotate(4deg) scale(1.06); } }

/* bez JavaScriptu: obyčejný seznam uprostřed */
.uzly {
  list-style: none;
  display: flex; flex-direction: column; align-items: center; gap: 1.6rem;
  padding: 3rem 0;
  position: relative; z-index: 2;
}
.uzel {
  font-family: var(--pismo-ozdobne);
  font-size: clamp(1.2rem, 1.9vw, 1.7rem);
  color: var(--mech);
  text-align: center;
  white-space: nowrap;
  transition: color .8s;
}
[data-rezim="tma"] .uzel { color: #f1dede; text-shadow: 0 0 12px rgba(255, 30, 40, .45); }
.organismus.zive .uzly { position: absolute; inset: 0; padding: 0; display: block; }
.organismus.zive .uzel {
  position: absolute;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity .6s ease, color .8s;
  padding: .5em;
}
.organismus.zive .uzel.viditelny { opacity: 1; }

/* ---------- Opencall pás ---------- */
.opencall {
  position: relative; display: block; overflow: hidden;
  text-decoration: none; color: var(--text);
  border-block: 1px solid var(--cara);
  margin-top: 2rem;
  transition: background .3s ease, color .3s ease;
}
.opencall:hover { background: var(--mech); color: var(--pozadi); }
[data-rezim="tma"] .opencall { color: var(--akcent); }
[data-rezim="tma"] .opencall:hover { background: var(--akcent); color: #000; }
.opencall-obrazek { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pas {
  position: relative; z-index: 1;
  display: flex; width: max-content;
  font-weight: bold;
  font-size: clamp(5rem, 16vw, 15rem);
  line-height: 1.05;
  white-space: nowrap;
  animation: pas 22s linear infinite;
}
.pas span { padding-right: .4em; }
.pas i { font-style: normal; font-weight: 300; font-size: .5em; vertical-align: middle; opacity: .6; }
@keyframes pas { to { transform: translateX(-50%); } }

/* ============================================================
   PODSTRÁNKY
   ============================================================ */
.lista {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1.5rem;
  padding: 10px clamp(12px, 3vw, 36px);
  position: relative; z-index: 5;
}
.lista .znak { min-width: 250px; }
.lista-nav { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; font-size: 1rem; }
.lista-nav a { text-decoration: none; opacity: .65; transition: opacity .2s; }
.lista-nav a:hover, .lista-nav a[aria-current] { opacity: 1; }
.lista-nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--akcent); text-underline-offset: .3em; }

.obsah {
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(20px, 5vw, 64px) 20px 90px;
  font-size: 1.2rem;
  line-height: 1.55;
  position: relative;
}
.obsah > p { max-width: 680px; margin: 0 auto 1.1em; }
.obsah > .mech { text-align: center; font-size: clamp(2rem, 5.4vw, 4.2rem); margin: .6em 0 .25em; }
.obsah > .podpis { text-align: center; max-width: none; }
.zpet { text-decoration: none; opacity: .65; font-size: 1rem; }
.zpet:hover { opacity: 1; }

/* nadpis stránky: ozdobné písmo, písmena dýchají */
.titulek {
  font-family: var(--pismo-ozdobne);
  font-weight: 400;
  font-size: clamp(3rem, 10vw, 7.5rem);
  line-height: 1;
  text-align: center;
  margin: .1em 0 .55em;
  filter: url(#zrno);
}
.titulek span { display: inline-block; animation: dych 5s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -0.7s); }
.titulek .mezera { width: .3em; }
@keyframes dych {
  from { transform: translateY(-.03em) rotate(-2deg); }
  to   { transform: translateY(.04em) rotate(2.5deg); }
}

/* ---------- Akce ---------- */
.prazdno { text-align: center; }
.prazdno .mech { font-size: clamp(2rem, 5.4vw, 4.2rem); margin: .5em 0 .3em; }
.prazdno .podpis { margin-bottom: 2.2em; }
.akce-seznam { list-style: none; max-width: 820px; margin: 0 auto; }
.akce-karta { padding: 1.6rem 1.4rem; border-top: 1px solid var(--cara); transition: background .8s, color .8s; }
.akce-karta time { font-size: .9rem; letter-spacing: .12em; color: var(--tlumeny); }
.akce-karta .mech { font-size: clamp(1.8rem, 4vw, 3rem); margin: .2rem 0 .3rem; }
.akce-karta .podpis { font-size: 1.3rem; }
.probehle { opacity: .5; }
.mezititulek { margin: 3rem 0 1rem; font-size: 1rem; letter-spacing: .25em; text-transform: uppercase; color: var(--tlumeny); text-align: center; }
/* podzemní akce: i ve světlém režimu tmavá karta */
.akce-tma { background: #070101; color: #f3eded; border-top-color: #3a0005; }
.akce-tma .mech { filter: url(#krev); color: #c8141f; }
.akce-tma .podpis, .akce-tma time { color: #b39a9a; }
.led { display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: #ff2b34; box-shadow: 0 0 8px #ff2b34; margin: 0 .2em 0 .5em; animation: blik 1.1s steps(2) infinite; }
.akce-meta { text-align: center; margin-bottom: 2em; }

/* ---------- Archiv: pruhy ročníků ---------- */
.rocniky { display: grid; gap: clamp(18px, 3vw, 36px); margin-top: 1rem; }
.rocnik-pruh {
  position: relative; display: block; overflow: hidden;
  height: clamp(120px, 17vw, 230px);
  background: #000; color: #fff;
  text-decoration: none;
}
.rocnik-obal {
  position: absolute; inset: 0; background: center / cover no-repeat;
  opacity: 0; filter: grayscale(1) contrast(1.2);
  transform: scale(1.08);
  transition: opacity .7s ease, transform 1.2s ease, filter .7s ease;
}
.rocnik-pruh:hover .rocnik-obal, .rocnik-pruh:focus-visible .rocnik-obal { opacity: .55; transform: scale(1); filter: none; }
.rocnik-cisla {
  position: absolute; top: 0; bottom: 0; right: 4%;
  font-weight: 400;
  font-size: clamp(64px, 10.5vw, 150px);
  line-height: .86;
  letter-spacing: -0.03em;
}
.rocnik-sloupec { display: flex; flex-direction: column; animation: sjezd 7s linear infinite; }
.rocnik-pruh:hover .rocnik-sloupec { animation-duration: 2.4s; }
@keyframes sjezd { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.rocnik-vstup {
  position: absolute; left: 4%; bottom: 12%;
  font-style: italic; font-weight: 400; font-size: 1.2rem; opacity: 0; transform: translateX(-10px);
  transition: opacity .4s, transform .4s;
}
.rocnik-pruh:hover .rocnik-vstup { opacity: 1; transform: none; }

/* ---------- Galerie (ročníky i profily) ---------- */
.rocnik-stranka { position: relative; min-height: 100vh; padding: 0 0 60px; }
.galerie-zpet { position: absolute; top: 18px; left: 22px; z-index: 3; font-size: 58px; line-height: 0; }
.galerie-zpet .hvezda { margin: 0; animation-duration: 30s; }
.galerie-zpet:hover .hvezda { animation-duration: 3s; }
.rocnik-stranka > .prepinac { position: absolute; top: 18px; right: 18px; z-index: 3; }
.galerie-plocha {
  --sipka: clamp(52px, 8vw, 120px);
  display: grid; align-items: center;
  grid-template-columns: var(--sipka) minmax(0, 1fr) var(--sipka);
  grid-template-rows: var(--vyska, 60vh) auto;
  grid-template-areas: "vlevo snimek vpravo" ". osa .";
}
/* s kapitolami: text vpravo vedle fotky */
.galerie.ma-panel .galerie-plocha {
  grid-template-columns: var(--sipka) minmax(0, 1fr) clamp(220px, 22vw, 340px) var(--sipka);
  grid-template-areas: "vlevo snimek panel vpravo" ". osa . .";
}
.galerie-sipka.vlevo { grid-area: vlevo; }
.galerie-sipka.vpravo { grid-area: vpravo; }
.galerie-snimek { grid-area: snimek; }
.galerie-cela .galerie-plocha { --vyska: min(74vh, 820px); padding-top: 70px; }
.galerie-plocha.prazdna { display: flex; justify-content: center; height: 60vh; }
.galerie-snimek { height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.galerie-snimek img {
  max-height: 100%; max-width: 100%; object-fit: contain;
  transition: opacity .45s ease, transform .6s ease, filter .6s ease;
}
.galerie-snimek img.mizi { opacity: 0; transform: scale(.985); filter: blur(6px); }
.galerie-sipka {
  background: none; border: 0; color: var(--text); cursor: pointer;
  font: 300 clamp(2.6rem, 6vw, 5rem) var(--pismo);
  height: 100%; opacity: .7; transition: opacity .2s, transform .2s;
}
.galerie-sipka:hover { opacity: 1; }
.galerie-sipka.vlevo:hover { transform: translateX(-4px); }
.galerie-sipka.vpravo:hover { transform: translateX(4px); }
.galerie-pocitadlo { text-align: center; font-size: .9rem; letter-spacing: .2em; color: var(--tlumeny); margin-top: .8rem; }
.galerie-text { max-width: 720px; margin: 3rem auto 0; padding: 0 20px; font-size: 1.2rem; line-height: 1.55; }
.galerie-text p { margin-bottom: 1em; }
/* pás galerie na profilu (rámeček jako ve skici) */
.galerie-pas { margin-top: 4rem; border: 2px solid var(--text); border-radius: 6px 14px 8px 18px / 16px 6px 14px 8px; padding: 1.4rem 0 1rem; }
.galerie-pas .galerie-plocha { --vyska: clamp(260px, 52vh, 620px); }

/* text kapitoly vedle fotky */
.galerie-panel {
  grid-area: panel; align-self: center;
  max-height: 100%; overflow: auto;
  padding: 0 .5rem 0 clamp(1rem, 2vw, 2rem);
  font-size: 1.05rem; line-height: 1.55;
  transition: opacity .2s ease;
}
.galerie-panel.mizi { opacity: 0; }
.galerie-panel h2 { font-family: var(--pismo-ozdobne); font-weight: 400; font-size: clamp(1.6rem, 2.4vw, 2.4rem); line-height: 1.05; margin-bottom: .5em; }
.galerie-panel p { margin-bottom: .8em; }

/* osa pro přeskakování mezi fotkami */
.osa { grid-area: osa; padding-top: 1.6rem; }
.osa-cara { position: relative; height: 28px; cursor: pointer; touch-action: none; border-radius: 6px; }
.osa-cara:focus-visible { outline: 2px dashed var(--akcent); outline-offset: 4px; }
.osa-cara::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: var(--cara); }
.osa-bod {
  position: absolute; top: 50%;
  width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%;
  background: var(--tlumeny); opacity: .5; pointer-events: none;
  transition: transform .2s, opacity .2s, background .2s, color .2s;
}
.osa-bod.osa-zacatek {           /* začátek kapitoly = hvězdička */
  width: auto; height: auto; margin: 0; background: none; opacity: .9;
  color: var(--text); font-size: 16px; line-height: 1;
  transform: translate(-50%, -50%);
}
.osa-bod.osa-zacatek::before { content: "✳"; }
.osa-bod.pod-mysi { opacity: 1; transform: scale(2); }
.osa-bod.aktivni { opacity: 1; background: var(--akcent); transform: scale(2.4); }
.osa-bod.osa-zacatek.pod-mysi, .osa-bod.osa-zacatek.aktivni { background: none; transform: translate(-50%, -50%) scale(1.5); }
.osa-bod.osa-zacatek.aktivni { color: var(--akcent); }
.osa-bublina {
  position: absolute; bottom: 100%; margin-bottom: 2px; transform: translateX(-50%);
  padding: .15em .6em; border-radius: 999px;
  background: var(--text); color: var(--pozadi);
  font-size: .85rem; white-space: nowrap; pointer-events: none;
}
.osa-stitky { position: relative; height: 1.7em; margin-top: .25rem; }
.osa-stitek {
  position: absolute; top: 0;
  font: italic 400 .95rem var(--pismo); color: var(--tlumeny);
  background: none; border: 0; cursor: pointer; white-space: nowrap; padding: 0 .2em;
}
.osa-stitek:hover, .osa-stitek.aktivni { color: var(--text); }
.osa-kraje { display: flex; justify-content: space-between; align-items: baseline; font-size: .85rem; color: var(--tlumeny); margin-top: .3rem; }
.osa-kraje .galerie-pocitadlo { margin: 0; }

/* ============================================================
   KOMUNITA — nástěnka
   ============================================================ */
.typ-komunita .obsah { max-width: 1280px; }
.typ-komunita .obsah > .podpis { margin-bottom: 1.5rem; }
.pridej { text-align: center; margin-bottom: 2.5rem; }
.tlacitko {
  display: inline-block; text-decoration: none;
  border: 2px solid var(--text); padding: .6em 1.3em;
  border-radius: 40% 60% 55% 45% / 60% 45% 55% 40%;
  font-style: italic; font-weight: 400; font-size: 1.2rem;
  transition: background .3s, color .3s, border-radius .6s;
}
.tlacitko:hover { background: var(--text); color: var(--pozadi); border-radius: 55% 45% 40% 60% / 45% 60% 40% 55%; }

.filtry-panel {
  display: grid; gap: 1rem;
  padding: 1.4rem clamp(1rem, 3vw, 2rem);
  margin-bottom: 2.5rem;
  border: 1.5px solid var(--cara);
  border-radius: 18px 8px 22px 10px / 10px 22px 8px 18px;
}
.hledani input {
  width: 100%; font: inherit; font-size: 1.15rem; color: var(--text);
  background: transparent; border: 0; border-bottom: 1.5px solid var(--cara);
  padding: .4em .1em; outline: none;
}
.hledani input:focus { border-color: var(--akcent); }
.filtr-skupina { border: 0; display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.filtr-skupina legend {
  float: left; width: 7.5rem; margin-right: .4rem;
  font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--tlumeny);
}
.filtr {
  font: inherit; font-size: .95rem; color: var(--text); cursor: pointer;
  background: transparent; border: 1.5px solid var(--cara);
  border-radius: 999px; padding: .28em .85em;
  transition: background .25s, color .25s, border-color .25s, opacity .25s;
}
.filtr small { margin-left: .4em; font-size: .75em; opacity: .5; }
.filtr:hover { border-color: var(--mech); }
.filtr[aria-pressed="true"] { background: var(--mech); border-color: var(--mech); color: var(--pozadi); }
[data-rezim="tma"] .filtr[aria-pressed="true"] { color: #fff; }
.filtr:disabled { opacity: .28; cursor: default; }
.filtr-stav { display: flex; gap: 1rem; align-items: center; font-size: .95rem; color: var(--tlumeny); }
.filtr-zrusit { font: inherit; color: var(--text); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .25em; }

.profily {
  list-style: none;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 42vw), 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 3vw, 2.5rem);
}
.profil-karta { transition: opacity .4s, transform .4s; }
.profil-karta[hidden] { display: none; }
.profil-karta:nth-child(3n+2) { transform: translateY(1.6rem); }   /* nepravidelná nástěnka */
.profil-karta:nth-child(4n+3) { transform: rotate(1.5deg); }
.profil-karta a { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--text); }
.profil-karta:hover .ramecek { animation: vrtni .5s ease-in-out; }
@keyframes vrtni { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
.jmenovka {
  font-family: var(--pismo-ozdobne);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.1;
  margin-top: -.9em; position: relative; z-index: 2;
  background: var(--pozadi);
  border: 2px solid var(--text);
  border-radius: 999px / 60%;
  padding: .15em .8em;
  text-align: center;
  transition: background .8s, color .8s;
}
.profil-obory { font-size: .9rem; color: var(--tlumeny); margin-top: .45rem; text-align: center; }
.profily-prazdno { text-align: center; margin-top: 2rem; }
/* podzemní profil na světlé nástěnce */
.profil-tma .ramecek::before {
  content: ""; position: absolute; inset: 0; background: #070101;
  -webkit-mask: var(--maska) center / 100% 100% no-repeat; mask: var(--maska) center / 100% 100% no-repeat;
}
.profil-tma .obrys path { stroke: #c8141f; }
.profil-tma .duch { stroke: #ff3b42; }
.profil-tma .jmenovka { background: #070101; color: #f3eded; border-color: #c8141f; }

/* rámeček: fotka oříznutá do tvaru + roztřesený obrys */
.ramecek {
  position: relative; display: block; width: 100%;
  aspect-ratio: 100 / 126;
}
.ramecek img, .ramecek .duch {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  -webkit-mask: var(--maska) center / 100% 100% no-repeat;
  mask: var(--maska) center / 100% 100% no-repeat;
}
.duch { fill: none; stroke: var(--text); stroke-width: 2.4; stroke-linecap: round; filter: url(#rucne); }
.duch circle { fill: var(--text); stroke: none; }
.obrys { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.obrys path { fill: none; stroke: var(--text); stroke-width: 2.6px; vector-effect: non-scaling-stroke; stroke-linejoin: round; filter: url(#rucne); }

/* ---------- Profil ---------- */
.typ-profil .obsah { max-width: 1180px; }
.typ-profil .titulek { text-align: left; margin-bottom: .3em; }
.profil { display: grid; grid-template-columns: minmax(220px, 380px) 1fr; gap: clamp(1.5rem, 5vw, 4.5rem); align-items: start; }
.ramecek-velky { max-width: 380px; }
.profil-odkazy { list-style: none; margin-top: 1.4rem; display: grid; gap: .35rem; font-size: 1.1rem; }
.profil-odkazy a { text-decoration: none; border-bottom: 1px solid var(--cara); }
.profil-odkazy a:hover { border-color: var(--akcent); }
.kategorie { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.kategorie a {
  display: inline-block; text-decoration: none;
  border: 1.5px solid var(--text); border-radius: 999px; padding: .25em .9em;
  font-size: 1.05rem;
  transition: background .25s, color .25s;
}
.kategorie a:hover { background: var(--text); color: var(--pozadi); }
.profil-skola { margin-bottom: 1.5rem; }
.typ-profil .mezititulek { text-align: left; margin: 2rem 0 .6rem; }
.medailon { font-size: 1.2rem; line-height: 1.6; }
.medailon p { margin-bottom: 1em; }
.video { margin-top: 2.5rem; aspect-ratio: 16 / 9; }
.video iframe { width: 100%; height: 100%; border: 0; }

/* ============================================================
   OPENCALL — plakát
   ============================================================ */
.oc {
  position: relative; overflow: hidden;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 28fr) minmax(0, 56fr) minmax(0, 12fr);
  grid-template-areas:
    "vyzva   hvezda  bok"
    "vyzva   nadpis  bok"
    "termin  sloupce bok"
    "obsah   obsah   bok";
  column-gap: clamp(1rem, 2.5vw, 3rem);
  padding: clamp(24px, 3vw, 48px) clamp(16px, 2vw, 32px) 80px;
  font-family: var(--pismo);
}
.oc > .prepinac { position: absolute; top: 16px; right: 16px; z-index: 5; }

/* rozmazané vrstvy v pozadí */
.oc-duchove { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.oc-duch {
  position: absolute; white-space: nowrap;
  font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em;
  font-size: clamp(5rem, 13vw, 17rem); line-height: .8;
  color: #ececea;
  text-shadow: 0 .03em .04em rgba(0, 0, 0, .18);
  filter: blur(3px) url(#zrno);
  animation: oc-drift 26s ease-in-out infinite alternate;
}
.oc-duch-a { top: 1%; left: 38%; }
.oc-duch-b { top: 44%; left: 4%; animation-duration: 33s; animation-direction: alternate-reverse; }
.oc-duch-c { top: 76%; left: 25%; animation-duration: 29s; }
.oc-duch-d { top: 95%; left: 26%; animation-duration: 37s; animation-direction: alternate-reverse; }
[data-rezim="tma"] .oc-duch { color: #1d0607; text-shadow: 0 0 .1em rgba(255, 20, 30, .25); }
@keyframes oc-drift { from { transform: translateX(-3%); } to { transform: translateX(3%); } }

.oc > :is(.oc-hvezda, .oc-vyzva, .oc-nadpis, .oc-prijmeme, .oc-temata, .oc-termin-blok, .oc-obsah) { position: relative; z-index: 1; }
.oc > .oc-bok { z-index: 1; }

.oc-hvezda { grid-area: hvezda; justify-self: center; width: clamp(56px, 6vw, 96px); line-height: 0; }
.oc-hvezda-svg { width: 100%; overflow: visible; animation: otacka 50s linear infinite; }
.oc-hvezda:hover .oc-hvezda-svg { animation-duration: 4s; }
.oc-hvezda .tah rect { fill: none; stroke: var(--text); stroke-width: 6; }
.oc-hvezda .vypln rect { fill: var(--pozadi); stroke: none; transition: fill .8s; }

.oc-vyzva {
  grid-area: vyzva; text-align: right;
  font-size: clamp(1.1rem, 1.75vw, 2rem); line-height: 1.15; font-weight: 500;
  padding-top: clamp(1rem, 3vw, 3rem);
}
.oc-vyzva p { margin-bottom: .75em; }
@media (min-width: 1100px) { .oc-vyzva p { white-space: nowrap; } }
.oc-cta a {
  font-weight: 900; text-decoration: none;
  background-image: linear-gradient(var(--akcent), var(--akcent));
  background-size: 0 .12em; background-position: 100% 100%; background-repeat: no-repeat;
  transition: background-size .4s ease;
}
.oc-cta a:hover { background-size: 100% .12em; background-position: 0 100%; }

.oc-nadpis {
  grid-area: nadpis;
  font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em;
  font-size: clamp(3.4rem, 9.6vw, 13rem); line-height: .85;
  color: transparent;
  -webkit-text-stroke: clamp(1px, .18vw, 3px) var(--text);
  margin: clamp(2rem, 13vh, 10rem) 0 .45em -0.08em;   /* středová část níž, hvězda zůstává */
  white-space: nowrap;
  transition: color .5s ease;
}
.oc-nadpis:hover { color: var(--text); }
[data-rezim="tma"] .oc-nadpis { -webkit-text-stroke-color: var(--akcent); text-shadow: 0 0 18px rgba(255, 30, 40, .35); }

.oc-prijmeme, .oc-temata { grid-area: sloupce; font-size: clamp(1.1rem, 1.75vw, 2rem); line-height: 1.2; }
.oc-temata { text-align: right; }
.oc-prijmeme h2, .oc-temata h2 { font: inherit; font-weight: 500; margin-bottom: 2.2em; }
.oc-prijmeme ul, .oc-temata ul { list-style: none; display: grid; gap: .45em; }
.oc-temata li { font-weight: 500; }
.oc-prijmeme { justify-self: start; }
.oc-temata { justify-self: end; }

.oc-termin-blok { grid-area: termin; display: flex; flex-direction: column; align-items: center; padding-top: 3.2em; }
.oc-prijmeme a { text-decoration: none; border-bottom: 1.5px solid transparent; transition: border-color .3s; }
.oc-prijmeme a:hover { border-color: var(--akcent); }
.oc-prijmeme .sipka { font-size: .7em; opacity: .5; }
.oc-termin { font-weight: 900; font-size: clamp(1.1rem, 1.75vw, 2rem); letter-spacing: -0.01em; margin-bottom: 1.4rem; }
.oc-tecky { display: block; width: clamp(56px, 4.6vw, 90px); color: var(--text); }
/* svislý nápis po pravé straně: pomalu projíždí shora dolů */
.oc-bok {
  grid-area: bok; justify-self: end;
  position: absolute; top: 64px; bottom: 0; right: clamp(8px, 2vw, 32px);
  overflow: hidden;
  -webkit-mask: linear-gradient(transparent, #000 8%, #000 92%, transparent);
  mask: linear-gradient(transparent, #000 8%, #000 92%, transparent);
}
.oc-bok-pas {
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--pismo-tecky); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.6rem, 5.2vw, 6rem); line-height: 1; letter-spacing: -0.12em;
  color: var(--text);
  animation: oc-bok 40s linear infinite;
}
.oc-bok-pas span { writing-mode: vertical-rl; text-orientation: upright; padding-bottom: .5em; }
@keyframes oc-bok { from { transform: translateY(-50%); } to { transform: translateY(0); } }
[data-rezim="tma"] .oc-bok-pas { color: var(--akcent); text-shadow: 0 0 14px rgba(255, 30, 40, .5); animation: oc-bok 40s linear infinite, flux 2.6s steps(6) infinite; }
[data-rezim="tma"] .oc-tecky { color: #b3a3a3; }

.oc-obsah { grid-area: obsah; max-width: 720px; margin: 4rem auto 0; font-size: 1.2rem; line-height: 1.55; }
.oc-obsah p { margin-bottom: 1em; }

@media (max-width: 900px) {
  .oc {
    grid-template-columns: 1fr;
    grid-template-areas: "hvezda" "vyzva" "nadpis" "sloupce" "temata" "termin" "obsah";
    text-align: center;
  }
  .oc-vyzva { text-align: center; padding-top: .5rem; }
  .oc-nadpis { justify-self: center; margin: .4em 0; font-size: 16vw; }
  .oc { grid-template-columns: 1fr; }
  .oc-prijmeme, .oc-temata { justify-self: center; text-align: center; }
  .oc-temata { grid-area: temata; margin-top: 2rem; }
  .oc-prijmeme h2, .oc-temata h2 { margin-bottom: .8em; }
  .oc-bok { display: none; }
  .oc-nadpis { margin-top: .4em; }
  .oc-termin-blok { padding-top: 2.5rem; }
  .oc-duch { font-size: 22vw; }
}

/* ---------- Přihlášky ---------- */
.typ-prihlasky .obsah { max-width: 1200px; }
.typ-prihlasky .obsah > .podpis { margin-bottom: 3rem; }
.prihlasky { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); }
.prihlaska a {
  display: flex; flex-direction: column; gap: .8rem; height: 100%;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  text-decoration: none; color: var(--text);
  border: 2px solid var(--text);
  border-radius: 8px 22px 12px 26px / 24px 10px 20px 8px;
  transition: background .35s, color .35s, border-radius .8s, transform .35s;
}
.prihlaska a:hover {
  background: var(--text); color: var(--pozadi);
  border-radius: 24px 10px 26px 12px / 10px 24px 8px 22px;
  transform: translateY(-4px) rotate(-.4deg);
}
.prihlaska:target a { outline: 3px solid var(--akcent); outline-offset: 6px; }
.prihlaska-cislo { font-size: .9rem; letter-spacing: .2em; color: var(--tlumeny); }
.prihlaska a:hover .prihlaska-cislo { color: inherit; opacity: .6; }
.prihlaska-nazev {
  font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em;
  font-size: clamp(2rem, 3.6vw, 3.2rem); line-height: .95;
  color: transparent; -webkit-text-stroke: 1.5px currentColor;
}
.prihlaska a { -webkit-text-stroke-color: var(--text); }
.prihlaska a:hover .prihlaska-nazev { -webkit-text-stroke-color: var(--pozadi); }
.prihlaska-nazev { -webkit-text-stroke-color: inherit; }
.prihlaska-popis { font-size: 1.1rem; line-height: 1.45; flex: 1; }
.prihlaska-akce { font-weight: 700; font-size: 1.15rem; }
.obsah > .prihlasky-odkaz { text-align: center; margin-top: 3.5rem; }

/* ---------- Sponzoři (úvod) ---------- */
.sponzori { padding: clamp(3rem, 7vw, 6rem) 20px clamp(2rem, 4vw, 3rem); text-align: center; }
.sponzori .mezititulek { margin: 0 0 2rem; }
.sponzori ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(2rem, 6vw, 5rem); }
.sponzori a { display: block; transition: transform .4s, opacity .4s; opacity: .9; }
.sponzori a:hover { transform: scale(1.04); opacity: 1; }
.sponzori img { height: clamp(56px, 7vw, 90px); width: auto; }
.sponzori .logo-tma { display: none; }
[data-rezim="tma"] .sponzori a:has(.logo-tma) .logo-svetlo { display: none; }
[data-rezim="tma"] .sponzori .logo-tma { display: block; }

/* ---------- Kontakty ---------- */
.kontakty-obecne { text-align: center; margin-bottom: 3.5rem; }
.kontakty-obecne .podpis { margin-bottom: .4em; }
.lide { list-style: none; display: grid; gap: 3rem; max-width: 760px; margin: 0 auto; }
.clovek { display: flex; align-items: center; gap: clamp(1.2rem, 4vw, 3rem); }
.clovek-foto {
  flex: none;
  width: clamp(130px, 22vw, 220px); aspect-ratio: 1;
  object-fit: cover;
  background: var(--cara);
  border-radius: 50%;
  animation: blob 14s ease-in-out infinite alternate;
}
@keyframes blob {
  0%   { border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%; }
  33%  { border-radius: 58% 42% 55% 45% / 47% 56% 44% 53%; }
  66%  { border-radius: 44% 56% 46% 54% / 56% 44% 58% 42%; }
  100% { border-radius: 52% 48% 41% 59% / 45% 53% 47% 55%; }
}
.clovek-jmeno { font-style: italic; font-weight: 400; font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--text); }
.clovek .podpis { font-size: clamp(1.2rem, 2.4vw, 1.8rem); }

/* ---------- Dlaždice (O nás: archiv, partneři) ---------- */
.dlazdice { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 3rem; }
.dlazdice-polozka {
  position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden;
  background: #111; color: #fff; text-decoration: none;
}
.dlazdice-obr { position: absolute; inset: 0; background: center / cover no-repeat; transition: transform 1.2s ease, filter .6s; }
.dlazdice-polozka:hover .dlazdice-obr { transform: scale(1.06); }
[data-rezim="tma"] .dlazdice-obr { filter: grayscale(.6) sepia(.4) hue-rotate(-30deg); }
.dlazdice-nazev {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.6em .9em .7em;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7));
  font-size: 1.15rem;
}

/* ---------- Patička ---------- */
.patka {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem;
  padding: 28px clamp(20px, 4vw, 48px);
  font-size: .95rem;
  border-top: 1px solid var(--cara);
}
.patka a { text-decoration: none; opacity: .75; }
.patka a:hover { opacity: 1; text-decoration: underline; }
.patka-nav, .patka-info, .partneri { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.uvod .patka { border-top: 0; }

/* ---------- Telefon ---------- */
@media (max-width: 700px) {
  .lista { justify-content: center; }
  .lista .znak { min-width: 0; width: 100%; }
  .lista-nav { justify-content: center; font-size: .95rem; }
  .uvod-hlavicka .prepinac { top: 10px; right: 10px; font-size: .75rem; }
  .uvod-hlavicka { padding-top: 34px; }
  .clovek { flex-direction: column; text-align: center; }
  .galerie-plocha, .galerie.ma-panel .galerie-plocha {
    --sipka: 40px;
    grid-template-columns: var(--sipka) minmax(0, 1fr) var(--sipka);
    grid-template-rows: auto auto auto;
    grid-template-areas: "snimek snimek snimek" "vlevo osa vpravo" "panel panel panel";
  }
  .galerie-snimek img { max-height: 62vh; }
  .galerie-cela .galerie-plocha { padding-top: 92px; }
  .galerie-sipka { height: auto; font-size: 2.2rem; }
  .galerie-panel { padding: 1.6rem 20px 0; max-height: none; }
  .profil { grid-template-columns: 1fr; }
  .typ-profil .titulek { text-align: center; }
  .ramecek-velky { margin: 0 auto; max-width: 300px; }
  .profil-odkazy { text-align: center; }
  .filtr-skupina legend { float: none; width: 100%; margin-bottom: .2rem; }
  /* štítky v jednom posuvném řádku, ať filtry nezaberou celou obrazovku */
  .filtr-skupina { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -1rem; padding-right: 1rem; }
  .filtr-skupina::-webkit-scrollbar { display: none; }
  .filtr { flex: none; }
  .filtry-panel { overflow: hidden; }
  .filtr-skupina legend { position: sticky; left: 0; }
  .profil-karta:nth-child(3n+2) { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
