/* Pod košilí — paleta je vzatá z ilustrací (teplý papír, hnědá kontura).
   Barvy postav jsou orientační, ne „dobro a zlo“. */
@font-face { font-family: 'Archivo'; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url('../fonts/archivo-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url('../fonts/archivo-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --papir: #f3e6cc;
  --papir-2: #ead7b3;
  --karta: #fbf4e6;
  --inkoust: #2a1f17;
  --text: #3d3026;
  --tlumene: #6e5d4c;
  --hugo: #7a2335;
  --hugo-zlata: #b8862b;
  --eduard: #1f2a44;
  --eduard-stribro: #8a93a3;
  --david: #2f6690;
  --david-hneda: #8a6440;
  --linka: 3px solid var(--inkoust);
  --stin: 5px 5px 0 var(--inkoust);
  --radius: 6px;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papir); color: var(--text);
  font: 400 1.0625rem/1.6 var(--font);
  /* jemné zrno papíru, bez stahování obrázku */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--inkoust); line-height: 1.1; margin: 0 0 .5em; font-weight: 800; font-stretch: 85%; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.sirka { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--karta); padding: 8px 12px; border: var(--linka); }
:focus-visible { outline: 3px solid var(--david); outline-offset: 3px; }

/* Hlavička */
.hlavicka { position: sticky; top: 0; z-index: 20; background: var(--papir); border-bottom: var(--linka); }
.hlavicka__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { font-weight: 900; font-stretch: 75%; font-size: 1.5rem; letter-spacing: .02em; text-decoration: none; color: var(--inkoust); margin: 0; }
.menu { display: flex; gap: 4px; flex-wrap: wrap; }
.menu a { text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: var(--radius); }
.menu a:hover { background: var(--papir-2); }
.menu a[aria-current] { background: var(--inkoust); color: var(--papir); }
.menu-tlacitko { display: none; font: 700 1rem var(--font); background: var(--karta); border: var(--linka); border-radius: var(--radius); padding: 6px 14px; color: var(--inkoust); }
@media (max-width: 860px) {
  .menu-tlacitko { display: block; }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--papir); border-bottom: var(--linka); padding: 8px 16px 16px; }
  .menu-otevrene .menu { display: flex; }
  .menu a { padding: 12px; }
}

/* Tlačítka a štítky */
.btn { display: inline-block; font-weight: 700; text-decoration: none; padding: 12px 22px; border: var(--linka); border-radius: var(--radius); background: var(--karta); color: var(--inkoust); box-shadow: 3px 3px 0 var(--inkoust); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--stin); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--inkoust); }
.btn--hlavni { background: var(--inkoust); color: var(--papir); box-shadow: 3px 3px 0 var(--hugo-zlata); }
.btn--hlavni:hover { box-shadow: 5px 5px 0 var(--hugo-zlata); }
.stitky { display: flex; flex-wrap: wrap; gap: 6px; }
.stitek { font-size: .8125rem; font-weight: 600; text-decoration: none; padding: 2px 10px; border: 2px solid var(--inkoust); border-radius: 99px; background: var(--karta); }
.stitek:hover { background: var(--papir-2); }
.stitek--hugo { background: var(--hugo); color: #fff; border-color: var(--hugo); }
.stitek--eduard { background: var(--eduard); color: #fff; border-color: var(--eduard); }
.stitek--david { background: var(--david); color: #fff; border-color: var(--david); }

/* Hero — nadpis stojí nad obrázkem, ne přes něj: v ilustraci je nahoře málo místa
   a přes obličeje by se nečetl. */
.hero { border-bottom: var(--linka); background: var(--papir-2); }
.hero__text { text-align: center; padding: clamp(20px, 4vw, 40px) 0 clamp(16px, 3vw, 28px); }
.hero h1 { font-size: clamp(2.8rem, 10vw, 7.5rem); font-weight: 900; font-stretch: 68%; letter-spacing: .02em; line-height: .95; margin: 0; color: var(--inkoust); }
.hero__slogan { display: inline-block; font-size: clamp(1.05rem, 2.4vw, 1.6rem); font-weight: 700; background: var(--inkoust); color: var(--papir); padding: 4px 16px; transform: rotate(-1.2deg); margin: .5em 0 0; }
.hero__obr { width: 100%; max-height: 72vh; object-fit: cover; object-position: center 20%; border-top: var(--linka); }

/* Sekce */
.sekce { padding-block: clamp(36px, 6vw, 72px); }
.sekce--papir { background: var(--papir-2); border-block: var(--linka); }
.nadpis-pruh { font-size: clamp(1.5rem, 3vw, 2.1rem); display: flex; align-items: center; gap: 16px; margin-bottom: 1.2em; }
.nadpis-pruh::after { content: ""; flex: 1; height: 3px; background: var(--inkoust); }
.nadpis-stranky { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 900; font-stretch: 72%; }
.podnadpis { font-size: 1.2rem; max-width: 60ch; color: var(--tlumene); margin-bottom: 2em; }
.vice { text-align: center; margin-top: 2em; }

/* Karty epizod */
.mrizka { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.karta { background: var(--karta); border: var(--linka); border-radius: var(--radius); box-shadow: var(--stin); overflow: hidden; display: flex; flex-direction: column; --barva: var(--inkoust); }
.karta--hugo { --barva: var(--hugo); } .karta--eduard { --barva: var(--eduard); } .karta--david { --barva: var(--david); } .karta--spolecny { --barva: var(--hugo-zlata); }
.karta__nahled { text-decoration: none; }
.karta__nahled { display: block; border-bottom: var(--linka); background: var(--barva); aspect-ratio: 16 / 9; }
.karta__nahled img { width: 100%; height: 100%; object-fit: cover; }
.karta__telo { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.karta__telo h3 { font-size: 1.35rem; margin: 0 0 .2em; }
.karta__telo h3 a { text-decoration: none; }
.karta__telo h3 a:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.karta__cislo { font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--tlumene); margin: 0; }
.karta__perex { color: var(--text); flex: 1; }

/* Storyboard — čtyři rámečky, dokud nejsou nakreslené panely */
.storyboard { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; padding: 10px; height: 100%; }
.storyboard__ramec img { width: 100%; height: 100%; object-fit: cover; }
.storyboard__ramec { overflow: hidden; background: var(--karta); border: 2px solid var(--inkoust); border-radius: 3px; display: grid; place-items: center; font-weight: 900; color: var(--barva); font-size: 1.1rem; opacity: .92; }
.storyboard__ramec:has(img) { opacity: 1; min-height: 0; }

.karta__nahled { display: block; background: var(--barva); border-right: var(--linka); min-height: 280px; }

/* Postavy */
.postavy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .postavy { grid-template-columns: 1fr; } }
.postava { background: var(--karta); border: var(--linka); border-radius: var(--radius); box-shadow: var(--stin); overflow: hidden; display: flex; flex-direction: column; --barva: var(--inkoust); }
.postava--hugo, .profil--hugo { --barva: var(--hugo); }
.postava--eduard, .profil--eduard { --barva: var(--eduard); }
.postava--david, .profil--david { --barva: var(--david); }
.postava img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-bottom: var(--linka); background: var(--papir-2); }
.postava__telo { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.postava__telo p:last-of-type { flex: 1; }
.postava h3 { font-size: 1.6rem; color: var(--barva); }
.postava__claim { font-weight: 700; color: var(--inkoust); }
.postava .btn { align-self: flex-start; }
@media (max-width: 900px) and (min-width: 520px) {
  .postava { flex-direction: row; } .postava img { width: 40%; aspect-ratio: auto; border-bottom: 0; border-right: var(--linka); }
}

.profil { display: grid; grid-template-columns: 300px 1fr; gap: clamp(20px, 4vw, 48px); padding: 28px; margin-bottom: 32px; background: var(--karta); border: var(--linka); border-left: 12px solid var(--barva); border-radius: var(--radius); box-shadow: var(--stin); scroll-margin-top: 90px; }
.profil img { border: var(--linka); border-radius: var(--radius); background: var(--papir-2); }
.profil h2 { font-size: clamp(2rem, 4vw, 3rem); color: var(--barva); font-weight: 900; font-stretch: 78%; }
@media (max-width: 700px) { .profil { grid-template-columns: 1fr; padding: 20px; } .profil img { max-width: 260px; } }
.znaky { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 1.5em; }
.znaky li { font-size: .875rem; padding: 3px 10px; background: var(--papir-2); border-radius: 99px; }
.seznam-epizod { list-style: none; padding: 0; margin: 0; columns: 2 220px; }
.seznam-epizod a { display: block; padding: 6px 0; text-decoration: none; font-weight: 600; break-inside: avoid; }
.seznam-epizod a:hover { text-decoration: underline; }
.seznam-epizod span { color: var(--barva); font-weight: 800; margin-right: 6px; }

/* Filtry */
.filtr { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 32px; }
.filtr a { font-size: .9rem; font-weight: 600; text-decoration: none; padding: 3px 12px; border: 2px solid var(--inkoust); border-radius: 99px; background: var(--karta); }
.filtr a:hover { background: var(--papir); }
.filtr a[aria-current] { background: var(--inkoust); color: var(--papir); }
.prazdno { font-size: 1.15rem; padding: 32px; text-align: center; border: 3px dashed var(--tlumene); border-radius: var(--radius); }

/* Detail epizody */
.epizoda { padding-block: clamp(32px, 6vw, 64px); max-width: 980px; }
.epizoda__hlava { margin-bottom: 32px; }
.epizoda__nazev { font-size: clamp(2.4rem, 7vw, 4.4rem); font-weight: 900; font-stretch: 72%; margin: .15em 0 .3em; }
.epizoda__perex { font-size: 1.25rem; max-width: 55ch; }
.panely { list-style: none; padding: 0; margin: 0 0 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; counter-reset: panel; }
@media (max-width: 640px) { .panely { grid-template-columns: 1fr; } }
.panel { background: var(--karta); border: var(--linka); border-radius: var(--radius); box-shadow: var(--stin); overflow: hidden; }
.panel img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: var(--linka); }
.panel__skica { aspect-ratio: 4 / 3; border-bottom: var(--linka); display: grid; place-items: center;
  background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(42,31,23,.05) 14px 16px), var(--papir-2); }
.panel__skica span { font-size: 4rem; font-weight: 900; font-stretch: 70%; color: rgba(42,31,23,.25); }
.panel__popis { padding: 14px 18px 16px; margin: 0; }
.panel__popis b { color: var(--inkoust); }
.epizoda__pointa { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 800; font-stretch: 82%; line-height: 1.2; color: var(--inkoust); text-align: center; max-width: 30ch; margin: 0 auto 32px; }
.pouceni { position: relative; margin: 0 auto 48px; max-width: 640px; padding: 22px 28px 22px 64px; background: var(--inkoust); color: var(--papir); border-radius: var(--radius); transform: rotate(-.6deg); box-shadow: 5px 5px 0 var(--hugo-zlata); }
.pouceni::before { content: "“"; position: absolute; left: 18px; top: -6px; font-size: 4.5rem; font-weight: 900; color: var(--hugo-zlata); line-height: 1; }
.pouceni p { margin: 0; font-size: 1.2rem; font-weight: 600; }
.listovani { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: var(--linka); padding-top: 20px; }
.listovani a { font-weight: 700; text-decoration: none; }

/* Text, patička */
.text-stranka { max-width: 760px; }
.text-stranka h2 { font-size: 1.8rem; margin-top: 1.6em; scroll-margin-top: 90px; }
.text-stranka .pouceni { margin-block: 40px; }
.paticka { background: var(--inkoust); color: var(--papir); padding-block: 48px 24px; margin-top: 32px; }
.paticka .logo { color: var(--papir); margin-bottom: .4em; }
.paticka__in { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 40px; align-items: start; }
.paticka blockquote { margin: 0; font-size: 1.1rem; font-style: italic; border-left: 4px solid var(--hugo-zlata); padding-left: 18px; }
.paticka nav { display: flex; flex-direction: column; gap: 6px; }
.paticka nav a { text-decoration: none; } .paticka nav a:hover { text-decoration: underline; }
.paticka__fikce { margin-top: 32px; padding-top: 16px; border-top: 1px solid rgba(243,230,204,.25); font-size: .875rem; opacity: .75; }
@media (max-width: 800px) { .paticka__in { grid-template-columns: 1fr; gap: 24px; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Lišta pro přihlášeného admina a náhled neveřejné epizody */
.admin-lista { background: var(--inkoust); color: var(--papir); font-size: .875rem; }
.admin-lista .sirka { display: flex; justify-content: space-between; gap: 12px; padding-block: 6px; }
.admin-lista a { color: var(--hugo-zlata); font-weight: 700; }
.nahled-pruh { margin-top: 24px; padding: 12px 16px; border: 3px dashed var(--hugo); border-radius: var(--radius); background: var(--karta); font-weight: 600; }
.nahled-pruh a { color: var(--hugo); }
.pristi { margin-bottom: 0; text-align: center; font-size: 1.1rem; }
.pristi strong { color: var(--inkoust); }

/* Díly s méně panely (úvody, speciály) */
.storyboard--1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.storyboard--2 { grid-template-rows: 1fr; }
.storyboard--3 .storyboard__ramec:first-child { grid-column: 1 / -1; }
.panely--1 { grid-template-columns: 1fr; }
.panely--1 .panel img, .panely--1 .panel__skica { aspect-ratio: 16 / 9; }
.panely--3 .panel:first-child { grid-column: 1 / -1; }
.epizoda__text { max-width: 68ch; margin: 0 auto 40px; font-size: 1.15rem; line-height: 1.7; }
.epizoda__text p:first-child::first-letter { font-size: 3.2em; font-weight: 900; float: left; line-height: .9; margin: .05em .08em 0 0; color: var(--inkoust); }
