/* Fonty Grandstander a Andika (SIL OFL), vlastný hosting, len latin a latin-ext pre slovenčinu. */
/* latin-ext */
@font-face {
  font-family: 'Andika';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/andika-400-italic-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+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Andika';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/andika-400-italic-latin.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;
}
/* latin-ext */
@font-face {
  font-family: 'Andika';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/andika-400-normal-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+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Andika';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/andika-400-normal-latin.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;
}
/* latin-ext */
@font-face {
  font-family: 'Andika';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/andika-700-normal-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+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Andika';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/andika-700-normal-latin.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;
}
/* latin-ext */
@font-face {
  font-family: 'Grandstander';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/grandstander-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+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Grandstander';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/grandstander-latin.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;
}
/* latin-ext */
@font-face {
  font-family: 'Grandstander';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/fonts/grandstander-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+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Grandstander';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/fonts/grandstander-latin.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;
}

/* ---- Ilustrované rozprávky (rozpravky/<slug>.html) ----
 * Farby a rozloženie z ilustrovanej verzie mlyna. Platí len pre stránky s
 * <body class="illustrated-page">, takže zoznam a obyčajné rozprávky sa nemenia. */
body.illustrated-page {
  --bg: #eef3ea;
  --text: #1f2e3a;
  --muted: #5a6b76;
  --surface: #fbfcf8;
  --border: #d5decf;
  --wheat: #8f6410; /* tmavšia než pôvodná #b9831f, aby slová so zvukom čitateľne prešli kontrastom */
  --display: "Grandstander", "Comic Sans MS", "Trebuchet MS", sans-serif;
  --body: "Andika", Verdana, system-ui, sans-serif;
  font-family: var(--body);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.illustrated-page {
    --bg: #121a23;
    --text: #ece7d8;
    --muted: #a8b3ba;
    --surface: #18222d;
    --border: #2a3846;
    --wheat: #e8b85a;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] body.illustrated-page {
  --bg: #121a23;
  --text: #ece7d8;
  --muted: #a8b3ba;
  --surface: #18222d;
  --border: #2a3846;
  --wheat: #e8b85a;
  color-scheme: dark;
}

.illustrated-page .story h1 { font-family: var(--display); font-weight: 800; line-height: 1.1; text-wrap: balance; }
.illustrated-page .meta, .illustrated-page .back, .illustrated-page .story-nav, .illustrated-page .footer { font-family: var(--body); }

.illustrated { display: flex; flex-direction: column; gap: 40px; padding: 12px 0 32px; font-family: var(--body); line-height: 1.7; }
.illustrated .chapter { display: flex; flex-direction: column; gap: 18px; }
.illustrated figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 10px; }
.illustrated figure svg, .illustrated figure img { display: block; width: 100%; height: auto; border-radius: 14px; }
.illustrated figure.portrait { max-width: 26rem; margin-inline: auto; }
.illustrated figcaption { font-size: 0.85rem; color: var(--muted); text-align: center; padding-top: 8px; font-style: italic; }
.illustrated .text { display: flex; flex-direction: column; gap: 14px; max-width: 62ch; margin: 0 auto; }
.illustrated .text p { margin: 0; }
.illustrated .drop::first-letter { font-family: var(--display); font-weight: 800; float: left; font-size: 3.4rem; line-height: 0.9; padding: 6px 8px 0 0; color: var(--wheat); }
.illustrated .zvuk { font-family: var(--display); font-weight: 600; color: var(--wheat); white-space: nowrap; }
.illustrated .rec { padding-left: 14px; border-left: 3px solid var(--border); }
.illustrated .konec { text-align: center; font-family: var(--display); font-weight: 800; font-size: 1.4rem; color: var(--wheat); padding-top: 8px; margin: 0; }
.illustrated .spin { animation: spin 7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .illustrated .spin { animation: none; } }
