/* Lolek — vlastní písmo Lukáše Bárczaye.
   Patrick Hand doplňuje znaky, které Lolek nemá (číslice, interpunkce, ď ň ť).
   Literata na dlouhé čtení. Obě Google Fonts, SIL OFL 1.1. */
@font-face {
  font-family: 'Lolek';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/subset-Lolek-Regular.woff2) format('woff2'),
       url(/assets/fonts/subset-Lolek-Regular.woff) format('woff');
}
@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/literata-fbe38f91.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+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/literata-75abf947.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/literata-a94ca91a.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+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/literata-87bf0650.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/literata-a94ca91a.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+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/literata-87bf0650.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Patrick Hand';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/patrick-hand-a831f71b.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+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Patrick Hand';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/patrick-hand-1b5c4cb7.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =================================================================== tokeny
   Barvy a písmo jsou z původního lolek.cz: levandule #D3A5FF, břidlice
   #2F4F4F a ručně psané písmo Lolek. Všechno ostatní je kolem nich.      */

:root {
  color-scheme: light;

  --papir: #ffffff;
  --papir-2: #faf6ff;
  --levandule: #d3a5ff;
  --levandule-svetla: #efe0ff;
  --levandule-tmava: #7e4fc4;
  --bridlice: #2f4f4f;
  --bridlice-svetla: #587070;
  --stin: 47 79 79;

  --ruka: "Lolek", "Patrick Hand", "Comic Neue", cursive;
  --cteni: "Literata", ui-serif, Georgia, serif;

  --sloupec: 40rem;
  --siroko: 72rem;
  --okraj: clamp(1.25rem, 5vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-rezim="svetlo"]) {
    color-scheme: dark;
    --papir: #1d1925;
    --papir-2: #241f2e;
    --levandule: #d3a5ff;
    --levandule-svetla: #46365e;
    --levandule-tmava: #d9b8ff;
    --bridlice: #ece6f5;
    --bridlice-svetla: #b3a9c2;
    --stin: 0 0 0;
  }
}

:root[data-rezim="tma"] {
  color-scheme: dark;
  --papir: #1d1925;
  --papir-2: #241f2e;
  --levandule: #d3a5ff;
  --levandule-svetla: #46365e;
  --levandule-tmava: #d9b8ff;
  --bridlice: #ece6f5;
  --bridlice-svetla: #b3a9c2;
  --stin: 0 0 0;
}

/* =================================================================== základ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--papir);
  color: var(--bridlice);
  font-family: var(--cteni);
  font-size: 1.0625rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration-color: var(--levandule);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: var(--levandule-tmava);
}

:focus-visible {
  outline: 2.5px dashed var(--levandule-tmava);
  outline-offset: 4px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
}

.preskoc {
  position: absolute;
  left: -9999px;
}

.preskoc:focus {
  left: var(--okraj);
  top: 0.75rem;
  z-index: 10;
  background: var(--papir);
  padding: 0.5rem 0.9rem;
}

.obal {
  max-width: var(--siroko);
  margin-inline: auto;
  padding-inline: var(--okraj);
}

/* Ruční písmo. Lolek nemá číslice ani interpunkci — ty dodá Patrick Hand. */
.ruka {
  font-family: var(--ruka);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

/* ============================================================ blob s logem */

.blob {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 9.5rem;
  aspect-ratio: 11 / 8;
  text-decoration: none;
  /* blob je levandulový v obou režimech, písmo na něm zůstává tmavé */
  color: #2f4f4f;
  font-family: var(--ruka);
  font-size: 2rem;
  letter-spacing: 0.06em;
  isolation: isolate;
}

.blob svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: visible;
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.blob path {
  fill: var(--levandule);
}

a.blob:hover svg {
  transform: scale(1.08) rotate(-4deg);
}

a.blob:active svg {
  transform: scale(0.92, 1.08);
}

/* ========================================================== hlava stránky */

.hlava {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem 2rem;
  padding-block: 1.75rem 0.5rem;
}

.hlava-titul {
  justify-self: center;
  font-family: var(--ruka);
  font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.1;
  margin: 0;
  text-align: center;
}

.rozcestnik {
  grid-column: 1 / -1;
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.2rem;
  font-family: var(--ruka);
  font-size: 1.75rem;
  margin-top: 0.5rem;
}

.rozcestnik a {
  text-decoration: none;
  color: var(--bridlice-svetla);
  position: relative;
  padding: 0.1em 0.45em;
}

.rozcestnik a:hover {
  color: var(--bridlice);
}

.rozcestnik a[aria-current="page"] {
  color: var(--bridlice);
  background: var(--levandule-svetla);
  border-radius: 1.2rem 0.9rem 1.3rem 0.8rem;
}

@media (max-width: 34rem) {
  .hlava {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .blob {
    width: 7.5rem;
    font-size: 1.6rem;
  }
}

/* ========================================== zakroužkovaná a podtržená slova */

.kruh,
.podtrh {
  position: relative;
  display: inline-block;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.kruh {
  padding: 0.02em 0.38em;
  margin-inline: 0.18em;
}

.kruh svg,
.podtrh svg {
  position: absolute;
  pointer-events: none;
  overflow: visible;
}

.kruh svg {
  inset: -14% -5% -20% -5%;
  width: 110%;
  height: 134%;
}

.podtrh svg {
  left: -3%;
  width: 106%;
  bottom: -0.12em;
  height: 0.42em;
}

a.podtrh path {
  stroke-width: 5;
}

.kruh path,
.podtrh path {
  fill: none;
  stroke: var(--levandule);
  /* Tah se roztahuje s kroužkem, takže je místy tlustší a místy tenčí — jako fixa. */
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  /* délku tahu změří web.js; bez něj se kroužek ukáže rovnou celý */
  stroke-dasharray: var(--delka, none);
  stroke-dashoffset: var(--delka, 0);
  animation: kresli 900ms cubic-bezier(0.6, 0, 0.3, 1) forwards;
  animation-delay: var(--zpozdeni, 200ms);
}

/* se skriptem začíná tah schovaný, dokud web.js nezměří jeho délku */
.js .kruh path,
.js .podtrh path {
  stroke-dasharray: var(--delka, 3000);
  stroke-dashoffset: var(--delka, 3000);
}

@keyframes kresli {
  to {
    stroke-dashoffset: 0;
  }
}

.kruh:hover svg,
.kruh:focus-visible svg,
.kruh.aktivni svg {
  animation: vlni 600ms ease-in-out;
}

.podtrh:hover svg {
  animation: vlni 600ms ease-in-out;
}

@keyframes vlni {
  0%,
  100% {
    transform: rotate(0) scale(1);
  }
  30% {
    transform: rotate(-3deg) scale(1.06, 1.1);
  }
  65% {
    transform: rotate(2deg) scale(0.98, 1.02);
  }
}

.kruh:hover path,
.kruh.aktivni path,
.podtrh:hover path {
  stroke: var(--levandule-tmava);
}

/* ============================================================ řádky textu */

.radky {
  text-align: center;
  font-family: var(--ruka);
  font-size: clamp(1.5rem, 0.95rem + 2.4vw, 2.7rem);
  line-height: 1.75;
  max-width: 48rem;
  margin: 2.5rem auto 0;
}

.radky p {
  margin: 0 0 0.45em;
  text-wrap: balance;
}

/* ================================================================== úvod */

.uvod {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 2.5rem var(--okraj) 5rem;
  overflow: hidden;
}

.scena {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.uvod-obsah {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 50rem;
  text-align: center;
}

.uvod .blob {
  width: clamp(12rem, 9rem + 10vw, 17rem);
  font-size: clamp(2.6rem, 1.8rem + 2.6vw, 3.8rem);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* když běží 3D, blob kreslí scéna a SVG zmizí */
.je-3d .uvod .blob svg,
.uvod.je-3d .blob svg {
  opacity: 0;
}

.jmeno {
  font-family: var(--ruka);
  font-size: clamp(2.6rem, 1.6rem + 4.2vw, 4.8rem);
  line-height: 1.15;
  margin-top: 1.5rem;
}

/* místo pro 3D předměty na úzkém displeji */
.predmety {
  display: none;
  height: 6.5rem;
  margin-top: 1.25rem;
}

/* o úzkém rozložení rozhoduje scena.js podle toho, jestli je místo po stranách */
.uvod.je-3d.uzke .predmety {
  display: block;
}

.napoveda {
  font-family: var(--ruka);
  font-size: clamp(1.15rem, 0.95rem + 0.8vw, 1.5rem);
  color: var(--bridlice-svetla);
  line-height: 1.35;
  margin: 2.5rem auto 1.5rem;
  transform: rotate(-3deg);
  display: inline-block;
  padding: 1rem 1.6rem 1.1rem;
  border: 2px dashed var(--levandule);
  border-radius: 1.6rem 1.2rem 1.8rem 1.1rem;
}

.napoveda p {
  margin: 0;
}

.napoveda p:first-child {
  color: var(--bridlice);
  font-size: 1.15em;
  margin-bottom: 0.15em;
}

.uvod .posledni {
  margin-top: 0.5rem;
}

/* =================================================================== rádio */

.polaroidy {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 3.5rem 3rem;
  margin: 4.5rem auto 6rem;
  max-width: 62rem;
  perspective: 1100px;
}

.polaroid {
  --rot: -2deg;
  margin: 0;
  background: #fff;
  padding: 0.85rem 0.85rem 1.1rem;
  border-radius: 4px;
  box-shadow:
    0 1px 2px rgb(var(--stin) / 0.1),
    0 18px 40px -12px rgb(var(--stin) / 0.28);
  transform: rotate(var(--rot)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 350ms;
  scroll-margin-top: 3rem;
}

.polaroid:nth-child(2n) {
  --rot: 1.8deg;
}

.polaroid:nth-child(3n) {
  --rot: -1deg;
}

.polaroid.nakloneno {
  transition: transform 80ms linear, box-shadow 350ms;
  box-shadow:
    0 1px 2px rgb(var(--stin) / 0.1),
    0 30px 60px -16px rgb(var(--stin) / 0.38);
}

.polaroid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f1ecf7;
}

.polaroid figcaption {
  font-family: var(--ruka);
  font-size: 1.7rem;
  text-align: center;
  color: #2f4f4f;
  padding-top: 0.7rem;
  line-height: 1.2;
}

.polaroid figcaption small {
  display: block;
  font-family: var(--cteni);
  font-size: 0.95rem;
  color: #587070;
  margin-top: 0.3rem;
}

.polaroid:target {
  animation: skok 900ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes skok {
  0% {
    transform: rotate(var(--rot)) scale(1);
  }
  35% {
    transform: rotate(calc(var(--rot) * -2)) scale(1.06) translateY(-14px);
  }
  100% {
    transform: rotate(var(--rot)) scale(1);
  }
}

/* ==================================================================== weby */

.okno {
  --rot: -1.5deg;
  margin: 0;
  transform: rotate(var(--rot)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
  scroll-margin-top: 3rem;
}

.okno:nth-child(2n) {
  --rot: 1.5deg;
}

.okno.nakloneno {
  transition: transform 80ms linear;
}

.okno > a {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 2px solid #2f4f4f;
  box-shadow: 6px 8px 0 var(--levandule);
  text-decoration: none;
  transition: box-shadow 250ms;
}

.okno > a:hover {
  box-shadow: 10px 13px 0 var(--levandule);
}

.okno-lista {
  display: flex;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  background: var(--levandule);
  border-bottom: 2px solid #2f4f4f;
}

.okno-lista i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 1.5px solid #2f4f4f;
  background: #ffb3c7;
}

.okno-lista i:nth-child(2) {
  background: #ffe38a;
}

.okno-lista i:nth-child(3) {
  background: #a8e6cf;
}

.okno img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}

.okno figcaption {
  font-family: var(--ruka);
  font-size: 1.6rem;
  text-align: center;
  padding-top: 1rem;
  line-height: 1.2;
}

.okno figcaption a {
  text-decoration: none;
}

.okno figcaption small {
  display: block;
  font-family: var(--cteni);
  font-size: 0.95rem;
  color: var(--bridlice-svetla);
}

.okno:target {
  animation: skok 900ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ================================================================ 3D knihy */

.kniha3d {
  --w: 7.5rem;
  --h: calc(var(--w) * 1.48);
  --t: 18px;
  perspective: 900px;
  width: var(--w);
  height: var(--h);
  margin-inline: auto;
  position: relative;
}

.kniha3d::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 2%;
  bottom: -14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--stin) / 0.25), transparent);
  transition: transform 450ms, opacity 450ms;
}

.kniha3d .telo {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateY(calc(-30deg + var(--ry, 0deg))) rotateX(var(--rx, 0deg));
  transition: transform 550ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kniha3d.nakloneno .telo {
  transition: transform 90ms linear;
}

.kniha3d .predni,
.kniha3d .zadni {
  position: absolute;
  inset: 0;
  border-radius: 2px 6px 6px 2px;
  overflow: hidden;
  backface-visibility: hidden;
}

.kniha3d .predni {
  transform: translateZ(calc(var(--t) / 2));
  background: var(--levandule);
  box-shadow: inset 4px 0 6px -3px rgb(0 0 0 / 0.35);
}

.kniha3d .predni img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kniha3d .bez-obalky {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 0.75rem;
  font-family: var(--ruka);
  font-size: 1.15rem;
  line-height: 1.15;
  text-align: center;
  color: #2f4f4f;
}

.kniha3d .zadni {
  transform: rotateY(180deg) translateZ(calc(var(--t) / 2));
  background: #c79af2;
}

.kniha3d .hrbet,
.kniha3d .strany {
  position: absolute;
  top: 0;
  height: 100%;
  width: var(--t);
  left: calc(50% - var(--t) / 2);
}

.kniha3d .hrbet {
  transform: rotateY(-90deg) translateZ(calc(var(--w) / 2));
  background: linear-gradient(90deg, #b483e8, #c99cf5 40%, #b483e8);
}

.kniha3d .strany {
  top: 2%;
  height: 96%;
  transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - 3px));
  background: repeating-linear-gradient(90deg, #fbf9f5 0 2px, #e9e3da 2px 3px);
}

a:hover .kniha3d .telo,
a:focus-visible .kniha3d .telo {
  transform: rotateY(-8deg) rotateX(4deg) translateY(-8px) translateZ(14px);
}

a:hover .kniha3d::after {
  transform: scale(0.85);
  opacity: 0.7;
}

/* ============================================================= podtrženo */

.perex {
  text-align: center;
  font-family: var(--ruka);
  font-size: clamp(1.35rem, 1rem + 1.4vw, 2rem);
  line-height: 1.5;
  max-width: 42rem;
  margin: 2.5rem auto 0;
  text-wrap: balance;
}

.hledani {
  max-width: 30rem;
  margin: 3rem auto 3.5rem;
  text-align: center;
}

.hledani label {
  display: block;
  font-family: var(--ruka);
  font-size: 1.3rem;
  color: var(--bridlice-svetla);
  margin-bottom: 0.6rem;
}

.hledani input {
  width: 100%;
  font: inherit;
  font-family: var(--ruka);
  font-size: 1.45rem;
  color: var(--bridlice);
  background: var(--papir);
  border: 2.5px solid var(--levandule);
  border-radius: 2rem 1.6rem 2.2rem 1.5rem;
  padding: 0.6rem 1.3rem;
  text-align: center;
  transition: border-color 200ms, box-shadow 200ms;
}

.hledani input::placeholder {
  color: var(--bridlice-svetla);
  opacity: 0.75;
}

.hledani input:focus {
  outline: none;
  border-color: var(--levandule-tmava);
  box-shadow: 4px 5px 0 var(--levandule-svetla);
}

.hledani-stav {
  font-family: var(--ruka);
  font-size: 1.25rem;
  color: var(--bridlice-svetla);
  margin: 0.8rem 0 0;
  min-height: 1.4em;
}

.knihy {
  list-style: none;
  padding: 0;
  margin: 0 0 5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 3.5rem 2rem;
}

.knihy > li[hidden] {
  display: none;
}

.kniha {
  display: block;
  text-decoration: none;
  text-align: center;
}

.kniha-text {
  display: block;
  margin-top: 2.6rem;
}

.kniha-titul {
  display: block;
  font-family: var(--ruka);
  font-size: 1.45rem;
  line-height: 1.2;
}

.kniha-autor {
  display: block;
  font-size: 0.92rem;
  color: var(--bridlice-svetla);
  margin-top: 0.3rem;
}

.kniha-znacky {
  display: inline-block;
  font-family: var(--ruka);
  font-size: 1.1rem;
  margin-top: 0.45rem;
  padding: 0 0.6em;
  background: var(--levandule-svetla);
  border-radius: 1rem;
}

/* při hledání se mřížka změní na seznam, ať se vejdou nalezené věty */
.knihy.hledam {
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: 46rem;
  margin-inline: auto;
}

.knihy.hledam .kniha {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1.75rem;
  align-items: center;
  text-align: left;
}

.knihy.hledam .kniha3d {
  --w: 4.5rem;
  --t: 10px;
  margin: 0;
}

.knihy.hledam .kniha-text {
  margin-top: 0;
}

.nalezy {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.nalezy li {
  font-size: 0.98rem;
  color: var(--bridlice-svetla);
  padding: 0.8rem 1rem;
  background: var(--papir-2);
  border-radius: 1rem 0.8rem 1.2rem 0.7rem;
}

.nalezy mark {
  background: var(--levandule);
  color: #2f4f4f;
  padding-inline: 0.12em;
  border-radius: 3px;
}

/* ========================================================= detail zápisku */

.kniha-hlava {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 2.5rem;
  margin: 3rem auto 3.5rem;
  max-width: var(--sloupec);
}

.kniha-hlava .kniha3d {
  --w: 11rem;
  --t: 26px;
}

.kniha-hlava h1 {
  font-family: var(--ruka);
  font-size: clamp(2.2rem, 1.4rem + 3.2vw, 3.6rem);
  line-height: 1.15;
  text-wrap: balance;
}

.kniha-hlava .autor {
  font-family: var(--ruka);
  font-size: 1.6rem;
  color: var(--bridlice-svetla);
  margin: 0.4rem 0 0;
}

.kniha-hlava .meta {
  font-family: var(--ruka);
  font-size: 1.2rem;
  margin: 0.9rem 0 0;
}

.kniha-hlava .meta span {
  display: inline-block;
  padding: 0 0.7em;
  background: var(--levandule-svetla);
  border-radius: 1rem;
  margin: 0.2rem;
}

.clanek {
  max-width: var(--sloupec);
  margin-inline: auto;
}

.clanek > p {
  margin: 0 0 1.4rem;
}

.clanek h2,
.clanek h3 {
  font-family: var(--ruka);
  font-size: 1.9rem;
  margin: 2.75rem 0 1rem;
}

/* Podtržené věty. Doslova podtržené — fixou přes spodek řádku. */
.clanek blockquote {
  margin: 2.1rem 0;
  padding: 0;
  font-size: 1.12rem;
  line-height: 1.85;
}

.clanek blockquote p {
  margin: 0 0 0.9rem;
  text-decoration-line: underline;
  text-decoration-color: var(--levandule-svetla);
  text-decoration-thickness: 0.5em;
  text-underline-offset: -0.28em;
  text-decoration-skip-ink: none;
}

.clanek blockquote p:last-child {
  margin-bottom: 0;
}

.clanek blockquote::before {
  content: "";
  display: block;
  width: 2.2rem;
  height: 0.9rem;
  margin-bottom: 0.4rem;
  background: var(--levandule);
  -webkit-mask: radial-gradient(circle at 25% 50%, #000 0.42rem, transparent 0.44rem),
    radial-gradient(circle at 75% 50%, #000 0.42rem, transparent 0.44rem);
  mask: radial-gradient(circle at 25% 50%, #000 0.42rem, transparent 0.44rem),
    radial-gradient(circle at 75% 50%, #000 0.42rem, transparent 0.44rem);
  opacity: 0.8;
}

.clanek figure {
  margin: 2.25rem 0;
}

.clanek figcaption {
  font-family: var(--ruka);
  font-size: 1.15rem;
  color: var(--bridlice-svetla);
  margin-top: 0.5rem;
  text-align: center;
}

.clanek img {
  border-radius: 6px;
  margin: 2rem auto;
}

.clanek a[target="_blank"]::after {
  content: "↗";
  font-size: 0.8em;
  margin-left: 0.15em;
  color: var(--bridlice-svetla);
}

.dalsi {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  justify-content: space-between;
  max-width: var(--sloupec);
  margin: 4.5rem auto 4rem;
  padding-top: 2rem;
  border-top: 2px dashed var(--levandule);
  font-family: var(--ruka);
}

.dalsi a {
  text-decoration: none;
  max-width: 17rem;
  font-size: 1.45rem;
  line-height: 1.2;
}

.dalsi small {
  display: block;
  font-size: 1.05rem;
  color: var(--bridlice-svetla);
}

.dalsi a:hover span {
  background: linear-gradient(transparent 55%, var(--levandule-svetla) 55%);
}

.dalsi .vpravo {
  text-align: right;
  margin-left: auto;
}

/* =================================================================== pata */

.pata {
  margin-top: 3rem;
  padding-block: 2.5rem 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 2rem;
  font-family: var(--ruka);
  font-size: 1.25rem;
  color: var(--bridlice-svetla);
  border-top: 2px dashed var(--levandule-svetla);
}

.pata a {
  text-decoration: none;
}

.pata a:hover {
  color: var(--bridlice);
}

.prepinac {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 2px solid var(--levandule);
  border-radius: 1.4rem 1.1rem 1.5rem 1rem;
  padding: 0.05rem 1rem 0.15rem;
  cursor: pointer;
}

.prepinac:hover {
  background: var(--levandule-svetla);
  color: var(--bridlice);
}

/* ==================================================================== 404 */

.chyba {
  text-align: center;
  padding-block: 4rem 6rem;
}

.chyba h1 {
  font-family: var(--ruka);
  font-size: clamp(2.4rem, 1.6rem + 3vw, 3.8rem);
}

.chyba p {
  font-family: var(--ruka);
  font-size: 1.5rem;
  margin-top: 1.25rem;
}

@media print {
  .kruh path,
  .podtrh path {
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
  }

  .scena,
  .pata,
  .hledani {
    display: none;
  }
}

/* ===================================================== omezený pohyb */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }

  .kruh path,
  .podtrh path {
    stroke-dashoffset: 0;
  }
}
